Auto-commit of generated files.
[bpt/emacs.git] / autogen / configure
CommitLineData
067d23c9
KY
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
250c8ab9 3# Generated by GNU Autoconf 2.65 for emacs 24.2.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'
250c8ab9
GM
552PACKAGE_VERSION='24.2.50'
553PACKAGE_STRING='emacs 24.2.50'
067d23c9
KY
554PACKAGE_BUGREPORT=''
555PACKAGE_URL=''
556
557ac_unique_file="src/lisp.h"
558# Factoring default headers for most tests.
559ac_includes_default="\
560#include <stdio.h>
561#ifdef HAVE_SYS_TYPES_H
562# include <sys/types.h>
563#endif
564#ifdef HAVE_SYS_STAT_H
565# include <sys/stat.h>
566#endif
567#ifdef STDC_HEADERS
568# include <stdlib.h>
569# include <stddef.h>
570#else
571# ifdef HAVE_STDLIB_H
572# include <stdlib.h>
573# endif
574#endif
575#ifdef HAVE_STRING_H
576# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
577# include <memory.h>
578# endif
579# include <string.h>
580#endif
581#ifdef HAVE_STRINGS_H
582# include <strings.h>
583#endif
584#ifdef HAVE_INTTYPES_H
585# include <inttypes.h>
586#endif
587#ifdef HAVE_STDINT_H
588# include <stdint.h>
589#endif
590#ifdef HAVE_UNISTD_H
591# include <unistd.h>
592#endif"
593
f199cab1 594ac_header_list=
5476a9a4 595ac_func_list=
e275c824 596gl_getopt_required=POSIX
7e723570 597gl_getopt_required=POSIX
743c80a7
PE
598ac_subst_vars='gltests_LTLIBOBJS
599gltests_LIBOBJS
600gl_LTLIBOBJS
601gl_LIBOBJS
602am__EXEEXT_FALSE
603am__EXEEXT_TRUE
604LTLIBOBJS
1f5d53eb 605LIBOBJS
73b78882 606SUBDIR_MAKEFILES_IN
42dcba54 607WINDOW_SYSTEM_OBJ
067d23c9
KY
608LIB_GCC
609LD_FIRSTFLAG
610LD_SWITCH_SYSTEM_TEMACS
743c80a7
PE
611LIBGNU_LTLIBDEPS
612LIBGNU_LIBDEPS
613gltests_WITNESS
6d153f56
GM
614gl_GNULIB_ENABLED_verify_FALSE
615gl_GNULIB_ENABLED_verify_TRUE
616gl_GNULIB_ENABLED_strtoull_FALSE
617gl_GNULIB_ENABLED_strtoull_TRUE
3e0be4ab
GM
618gl_GNULIB_ENABLED_strtoll_FALSE
619gl_GNULIB_ENABLED_strtoll_TRUE
6d153f56
GM
620gl_GNULIB_ENABLED_stat_FALSE
621gl_GNULIB_ENABLED_stat_TRUE
a0a61e58
GM
622gl_GNULIB_ENABLED_pathmax_FALSE
623gl_GNULIB_ENABLED_pathmax_TRUE
6d153f56
GM
624gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
625gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
626gl_GNULIB_ENABLED_dosname_FALSE
627gl_GNULIB_ENABLED_dosname_TRUE
628LTLIBINTL
629LIBINTL
f199cab1 630WINDOWS_64_BIT_OFF_T
e275c824
PE
631HAVE_UNISTD_H
632NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
633NEXT_UNISTD_H
1fd182f0
PE
634PTHREAD_H_DEFINES_STRUCT_TIMESPEC
635SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
636TIME_H_DEFINES_STRUCT_TIMESPEC
637NEXT_AS_FIRST_DIRECTIVE_TIME_H
638NEXT_TIME_H
0eb775a3 639WINDOWS_64_BIT_ST_SIZE
5fa4ac76
PE
640NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
641NEXT_SYS_STAT_H
1f5d53eb
PE
642NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
643NEXT_STDLIB_H
6ad6792b
GM
644NEXT_AS_FIRST_DIRECTIVE_STDIO_H
645NEXT_STDIO_H
646REPLACE_VSPRINTF
647REPLACE_VSNPRINTF
648REPLACE_VPRINTF
649REPLACE_VFPRINTF
650REPLACE_VDPRINTF
651REPLACE_VASPRINTF
652REPLACE_TMPFILE
653REPLACE_STDIO_WRITE_FUNCS
ca36e0ff 654REPLACE_STDIO_READ_FUNCS
6ad6792b
GM
655REPLACE_SPRINTF
656REPLACE_SNPRINTF
657REPLACE_RENAMEAT
658REPLACE_RENAME
659REPLACE_REMOVE
660REPLACE_PRINTF
661REPLACE_POPEN
662REPLACE_PERROR
663REPLACE_OBSTACK_PRINTF
664REPLACE_GETLINE
665REPLACE_GETDELIM
666REPLACE_FTELLO
667REPLACE_FTELL
668REPLACE_FSEEKO
669REPLACE_FSEEK
670REPLACE_FREOPEN
671REPLACE_FPURGE
672REPLACE_FPRINTF
673REPLACE_FOPEN
674REPLACE_FFLUSH
2b1928b8 675REPLACE_FDOPEN
6ad6792b
GM
676REPLACE_FCLOSE
677REPLACE_DPRINTF
678HAVE_VDPRINTF
679HAVE_VASPRINTF
680HAVE_RENAMEAT
2b1928b8
GM
681HAVE_POPEN
682HAVE_PCLOSE
6ad6792b
GM
683HAVE_FTELLO
684HAVE_FSEEKO
685HAVE_DPRINTF
686HAVE_DECL_VSNPRINTF
687HAVE_DECL_SNPRINTF
688HAVE_DECL_OBSTACK_PRINTF
689HAVE_DECL_GETLINE
690HAVE_DECL_GETDELIM
691HAVE_DECL_FTELLO
692HAVE_DECL_FSEEKO
693HAVE_DECL_FPURGE
694GNULIB_VSPRINTF_POSIX
695GNULIB_VSNPRINTF
696GNULIB_VPRINTF_POSIX
697GNULIB_VPRINTF
698GNULIB_VFPRINTF_POSIX
699GNULIB_VFPRINTF
700GNULIB_VDPRINTF
ca36e0ff
GM
701GNULIB_VSCANF
702GNULIB_VFSCANF
6ad6792b
GM
703GNULIB_VASPRINTF
704GNULIB_TMPFILE
705GNULIB_STDIO_H_SIGPIPE
ca36e0ff 706GNULIB_STDIO_H_NONBLOCKING
6ad6792b
GM
707GNULIB_SPRINTF_POSIX
708GNULIB_SNPRINTF
ca36e0ff 709GNULIB_SCANF
6ad6792b
GM
710GNULIB_RENAMEAT
711GNULIB_RENAME
712GNULIB_REMOVE
713GNULIB_PUTS
714GNULIB_PUTCHAR
715GNULIB_PUTC
716GNULIB_PRINTF_POSIX
717GNULIB_PRINTF
718GNULIB_POPEN
719GNULIB_PERROR
2b1928b8 720GNULIB_PCLOSE
6ad6792b
GM
721GNULIB_OBSTACK_PRINTF_POSIX
722GNULIB_OBSTACK_PRINTF
723GNULIB_GETLINE
724GNULIB_GETDELIM
ca36e0ff
GM
725GNULIB_GETCHAR
726GNULIB_GETC
6ad6792b
GM
727GNULIB_FWRITE
728GNULIB_FTELLO
729GNULIB_FTELL
730GNULIB_FSEEKO
731GNULIB_FSEEK
ca36e0ff 732GNULIB_FSCANF
6ad6792b 733GNULIB_FREOPEN
ca36e0ff 734GNULIB_FREAD
6ad6792b
GM
735GNULIB_FPUTS
736GNULIB_FPUTC
737GNULIB_FPURGE
738GNULIB_FPRINTF_POSIX
739GNULIB_FPRINTF
740GNULIB_FOPEN
ca36e0ff
GM
741GNULIB_FGETS
742GNULIB_FGETC
6ad6792b 743GNULIB_FFLUSH
2b1928b8 744GNULIB_FDOPEN
6ad6792b
GM
745GNULIB_FCLOSE
746GNULIB_DPRINTF
1fd182f0
PE
747NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
748NEXT_STDDEF_H
6c051bab
GM
749GL_GENERATE_STDDEF_H_FALSE
750GL_GENERATE_STDDEF_H_TRUE
1fd182f0
PE
751STDDEF_H
752HAVE_WCHAR_T
753REPLACE_NULL
16c3e636 754HAVE__BOOL
6c051bab
GM
755GL_GENERATE_STDBOOL_H_FALSE
756GL_GENERATE_STDBOOL_H_TRUE
16c3e636 757STDBOOL_H
6d153f56
GM
758GL_GENERATE_STDARG_H_FALSE
759GL_GENERATE_STDARG_H_TRUE
760STDARG_H
761NEXT_AS_FIRST_DIRECTIVE_STDARG_H
762NEXT_STDARG_H
0eb775a3
GM
763GL_GENERATE_STDALIGN_H_FALSE
764GL_GENERATE_STDALIGN_H_TRUE
765STDALIGN_H
3e0be4ab
GM
766NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
767NEXT_SIGNAL_H
0eb775a3 768LIB_PTHREAD_SIGMASK
2b1928b8 769REPLACE_RAISE
3e0be4ab
GM
770REPLACE_PTHREAD_SIGMASK
771HAVE_SIGHANDLER_T
772HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
773HAVE_STRUCT_SIGACTION_SA_SIGACTION
774HAVE_SIGACTION
775HAVE_SIGINFO_T
776HAVE_SIGSET_T
2b1928b8 777HAVE_RAISE
3e0be4ab
GM
778HAVE_PTHREAD_SIGMASK
779HAVE_POSIX_SIGNALBLOCKING
780GNULIB_SIGACTION
781GNULIB_SIGPROCMASK
782GNULIB_SIGNAL_H_SIGPIPE
2b1928b8 783GNULIB_RAISE
3e0be4ab 784GNULIB_PTHREAD_SIGMASK
f199cab1
GM
785HAVE_SYS_SELECT_H
786NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
787NEXT_SYS_SELECT_H
788REPLACE_SELECT
789REPLACE_PSELECT
790HAVE_PSELECT
791GNULIB_SELECT
792GNULIB_PSELECT
1fd182f0
PE
793REPLACE_TIMEGM
794REPLACE_NANOSLEEP
795REPLACE_MKTIME
796REPLACE_LOCALTIME_R
797HAVE_TIMEGM
798HAVE_STRPTIME
799HAVE_NANOSLEEP
800HAVE_DECL_LOCALTIME_R
801GNULIB_TIME_R
802GNULIB_TIMEGM
803GNULIB_STRPTIME
804GNULIB_NANOSLEEP
805GNULIB_MKTIME
ae0d7250
PE
806REPLACE_UTIMENSAT
807REPLACE_STAT
808REPLACE_MKNOD
809REPLACE_MKFIFO
810REPLACE_MKDIR
811REPLACE_LSTAT
812REPLACE_FUTIMENS
813REPLACE_FSTATAT
814REPLACE_FSTAT
815HAVE_UTIMENSAT
816HAVE_MKNODAT
817HAVE_MKNOD
818HAVE_MKFIFOAT
819HAVE_MKFIFO
820HAVE_MKDIRAT
821HAVE_LSTAT
822HAVE_LCHMOD
823HAVE_FUTIMENS
824HAVE_FSTATAT
825HAVE_FCHMODAT
826GNULIB_UTIMENSAT
827GNULIB_STAT
828GNULIB_MKNODAT
829GNULIB_MKNOD
830GNULIB_MKFIFOAT
831GNULIB_MKFIFO
832GNULIB_MKDIRAT
833GNULIB_LSTAT
834GNULIB_LCHMOD
835GNULIB_FUTIMENS
836GNULIB_FSTATAT
2b1928b8 837GNULIB_FSTAT
ae0d7250 838GNULIB_FCHMODAT
4fda9c95
GM
839NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
840NEXT_INTTYPES_H
841UINT64_MAX_EQ_ULONG_MAX
842UINT32_MAX_LT_UINTMAX_MAX
843PRIPTR_PREFIX
844PRI_MACROS_BROKEN
845INT64_MAX_EQ_LONG_MAX
846INT32_MAX_LT_INTMAX_MAX
0eb775a3 847REPLACE_STRTOIMAX
4fda9c95
GM
848HAVE_DECL_STRTOUMAX
849HAVE_DECL_STRTOIMAX
850HAVE_DECL_IMAXDIV
851HAVE_DECL_IMAXABS
852GNULIB_STRTOUMAX
853GNULIB_STRTOIMAX
854GNULIB_IMAXDIV
855GNULIB_IMAXABS
856GL_GENERATE_STDINT_H_FALSE
857GL_GENERATE_STDINT_H_TRUE
858STDINT_H
859WINT_T_SUFFIX
860WCHAR_T_SUFFIX
861SIG_ATOMIC_T_SUFFIX
862SIZE_T_SUFFIX
863PTRDIFF_T_SUFFIX
864HAVE_SIGNED_WINT_T
865HAVE_SIGNED_WCHAR_T
866HAVE_SIGNED_SIG_ATOMIC_T
867BITSIZEOF_WINT_T
868BITSIZEOF_WCHAR_T
869BITSIZEOF_SIG_ATOMIC_T
870BITSIZEOF_SIZE_T
871BITSIZEOF_PTRDIFF_T
872APPLE_UNIVERSAL_BUILD
873HAVE_SYS_BITYPES_H
874HAVE_SYS_INTTYPES_H
875HAVE_STDINT_H
876NEXT_AS_FIRST_DIRECTIVE_STDINT_H
877NEXT_STDINT_H
878HAVE_SYS_TYPES_H
879HAVE_INTTYPES_H
880HAVE_WCHAR_H
881HAVE_UNSIGNED_LONG_LONG_INT
882HAVE_LONG_LONG_INT
f199cab1
GM
883HAVE_WINSOCK2_H
884NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
885NEXT_SYS_TIME_H
886REPLACE_STRUCT_TIMEVAL
887REPLACE_GETTIMEOFDAY
888HAVE_SYS_TIME_H
889HAVE_STRUCT_TIMEVAL
890HAVE_GETTIMEOFDAY
891GNULIB_GETTIMEOFDAY
0eb775a3 892GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
893GETOPT_H
894HAVE_GETOPT_H
895NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
896NEXT_GETOPT_H
897PRAGMA_COLUMNS
898PRAGMA_SYSTEM_HEADER
899INCLUDE_NEXT_AS_FIRST_DIRECTIVE
900INCLUDE_NEXT
7d2a1c5e
GM
901GETLOADAVG_LIBS
902REPLACE_WCTOMB
903REPLACE_UNSETENV
904REPLACE_STRTOD
905REPLACE_SETENV
906REPLACE_REALPATH
907REPLACE_REALLOC
0eb775a3 908REPLACE_RANDOM_R
7d2a1c5e 909REPLACE_PUTENV
0eb775a3 910REPLACE_PTSNAME_R
7d2a1c5e
GM
911REPLACE_MKSTEMP
912REPLACE_MBTOWC
913REPLACE_MALLOC
914REPLACE_CANONICALIZE_FILE_NAME
915REPLACE_CALLOC
916HAVE_DECL_UNSETENV
917HAVE_UNLOCKPT
918HAVE_SYS_LOADAVG_H
919HAVE_STRUCT_RANDOM_DATA
920HAVE_STRTOULL
921HAVE_STRTOLL
922HAVE_STRTOD
923HAVE_DECL_SETENV
924HAVE_SETENV
925HAVE_RPMATCH
926HAVE_REALPATH
927HAVE_RANDOM_R
928HAVE_RANDOM_H
0eb775a3
GM
929HAVE_RANDOM
930HAVE_PTSNAME_R
7d2a1c5e 931HAVE_PTSNAME
0eb775a3 932HAVE_POSIX_OPENPT
7d2a1c5e
GM
933HAVE_MKSTEMPS
934HAVE_MKSTEMP
935HAVE_MKOSTEMPS
936HAVE_MKOSTEMP
937HAVE_MKDTEMP
938HAVE_GRANTPT
939HAVE_GETSUBOPT
940HAVE_DECL_GETLOADAVG
941HAVE_CANONICALIZE_FILE_NAME
942HAVE_ATOLL
943HAVE__EXIT
944GNULIB_WCTOMB
945GNULIB_UNSETENV
946GNULIB_UNLOCKPT
947GNULIB_SYSTEM_POSIX
948GNULIB_STRTOULL
949GNULIB_STRTOLL
950GNULIB_STRTOD
951GNULIB_SETENV
952GNULIB_RPMATCH
953GNULIB_REALPATH
954GNULIB_REALLOC_POSIX
955GNULIB_RANDOM_R
0eb775a3 956GNULIB_RANDOM
7d2a1c5e 957GNULIB_PUTENV
0eb775a3 958GNULIB_PTSNAME_R
7d2a1c5e 959GNULIB_PTSNAME
0eb775a3 960GNULIB_POSIX_OPENPT
7d2a1c5e
GM
961GNULIB_MKSTEMPS
962GNULIB_MKSTEMP
963GNULIB_MKOSTEMPS
964GNULIB_MKOSTEMP
965GNULIB_MKDTEMP
966GNULIB_MBTOWC
967GNULIB_MALLOC_POSIX
968GNULIB_GRANTPT
969GNULIB_GETSUBOPT
970GNULIB_GETLOADAVG
971GNULIB_CANONICALIZE_FILE_NAME
972GNULIB_CALLOC_POSIX
973GNULIB_ATOLL
974GNULIB__EXIT
8966cbff
GM
975GL_GENERATE_EXECINFO_H_FALSE
976GL_GENERATE_EXECINFO_H_TRUE
977LIB_EXECINFO
978EXECINFO_H
e275c824
PE
979UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
980UNISTD_H_HAVE_WINSOCK2_H
981REPLACE_WRITE
982REPLACE_USLEEP
983REPLACE_UNLINKAT
984REPLACE_UNLINK
985REPLACE_TTYNAME_R
986REPLACE_SYMLINK
987REPLACE_SLEEP
988REPLACE_RMDIR
989REPLACE_READLINK
ca36e0ff 990REPLACE_READ
e275c824
PE
991REPLACE_PWRITE
992REPLACE_PREAD
993REPLACE_LSEEK
994REPLACE_LINKAT
995REPLACE_LINK
996REPLACE_LCHOWN
0eb775a3 997REPLACE_ISATTY
e275c824
PE
998REPLACE_GETPAGESIZE
999REPLACE_GETGROUPS
1000REPLACE_GETLOGIN_R
1001REPLACE_GETDOMAINNAME
1002REPLACE_GETCWD
0eb775a3 1003REPLACE_FTRUNCATE
e275c824
PE
1004REPLACE_FCHOWNAT
1005REPLACE_DUP2
1006REPLACE_DUP
1007REPLACE_CLOSE
1008REPLACE_CHOWN
1009HAVE_SYS_PARAM_H
1010HAVE_OS_H
1011HAVE_DECL_TTYNAME_R
0eb775a3 1012HAVE_DECL_SETHOSTNAME
e275c824
PE
1013HAVE_DECL_GETUSERSHELL
1014HAVE_DECL_GETPAGESIZE
1015HAVE_DECL_GETLOGIN_R
1016HAVE_DECL_GETDOMAINNAME
2b1928b8 1017HAVE_DECL_FDATASYNC
e275c824
PE
1018HAVE_DECL_FCHDIR
1019HAVE_DECL_ENVIRON
1020HAVE_USLEEP
1021HAVE_UNLINKAT
1022HAVE_SYMLINKAT
1023HAVE_SYMLINK
1024HAVE_SLEEP
0eb775a3 1025HAVE_SETHOSTNAME
e275c824
PE
1026HAVE_READLINKAT
1027HAVE_READLINK
1028HAVE_PWRITE
1029HAVE_PREAD
1030HAVE_PIPE2
1031HAVE_PIPE
1032HAVE_LINKAT
1033HAVE_LINK
1034HAVE_LCHOWN
da6c8463 1035HAVE_GROUP_MEMBER
e275c824
PE
1036HAVE_GETPAGESIZE
1037HAVE_GETLOGIN
1038HAVE_GETHOSTNAME
1039HAVE_GETGROUPS
1040HAVE_GETDTABLESIZE
1041HAVE_FTRUNCATE
1042HAVE_FSYNC
2b1928b8 1043HAVE_FDATASYNC
e275c824
PE
1044HAVE_FCHOWNAT
1045HAVE_FCHDIR
1046HAVE_FACCESSAT
1047HAVE_EUIDACCESS
1048HAVE_DUP3
1049HAVE_DUP2
1050HAVE_CHOWN
1051GNULIB_WRITE
1052GNULIB_USLEEP
1053GNULIB_UNLINKAT
1054GNULIB_UNLINK
1055GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1056GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1057GNULIB_TTYNAME_R
1058GNULIB_SYMLINKAT
1059GNULIB_SYMLINK
1060GNULIB_SLEEP
0eb775a3 1061GNULIB_SETHOSTNAME
e275c824
PE
1062GNULIB_RMDIR
1063GNULIB_READLINKAT
1064GNULIB_READLINK
ca36e0ff 1065GNULIB_READ
e275c824
PE
1066GNULIB_PWRITE
1067GNULIB_PREAD
1068GNULIB_PIPE2
1069GNULIB_PIPE
1070GNULIB_LSEEK
1071GNULIB_LINKAT
1072GNULIB_LINK
1073GNULIB_LCHOWN
0eb775a3 1074GNULIB_ISATTY
da6c8463 1075GNULIB_GROUP_MEMBER
e275c824
PE
1076GNULIB_GETUSERSHELL
1077GNULIB_GETPAGESIZE
1078GNULIB_GETLOGIN_R
1079GNULIB_GETLOGIN
1080GNULIB_GETHOSTNAME
1081GNULIB_GETGROUPS
1082GNULIB_GETDTABLESIZE
1083GNULIB_GETDOMAINNAME
1084GNULIB_GETCWD
1085GNULIB_FTRUNCATE
1086GNULIB_FSYNC
2b1928b8 1087GNULIB_FDATASYNC
e275c824
PE
1088GNULIB_FCHOWNAT
1089GNULIB_FCHDIR
1090GNULIB_FACCESSAT
1091GNULIB_EUIDACCESS
1092GNULIB_ENVIRON
1093GNULIB_DUP3
1094GNULIB_DUP2
2b1928b8 1095GNULIB_DUP
e275c824
PE
1096GNULIB_CLOSE
1097GNULIB_CHOWN
2b1928b8 1098GNULIB_CHDIR
f199cab1 1099LIB_CLOCK_GETTIME
4fc2b746
GM
1100GL_GENERATE_ALLOCA_H_FALSE
1101GL_GENERATE_ALLOCA_H_TRUE
1102ALLOCA_H
1103ALLOCA
743c80a7
PE
1104GL_COND_LIBTOOL_FALSE
1105GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1106POST_ALLOC_OBJ
1107PRE_ALLOC_OBJ
1108CYGWIN_OBJ
1109RALLOC_OBJ
1110OLDXMENU_DEPS
1111LIBX_OTHER
1112LIBXMENU
1113OLDXMENU
1114OLDXMENU_TARGET
1115LIBXT_OTHER
1116TOOLKIT_LIBW
1117WIDGET_OBJ
1118XOBJ
1119XMENU_OBJ
1120FONT_OBJ
1121OTHER_FILES
1122GNU_OBJC_CFLAGS
1123ns_appsrc
1124ns_appresdir
1125ns_appbindir
1126ns_appdir
5476a9a4
GM
1127X_TOOLKIT_TYPE
1128GNUSTEP_CFLAGS
1129C_SWITCH_X_SITE
1130LD_SWITCH_X_SITE
1131gameuser
1132gamedir
1133bitmapdir
1134archlibdir
1135etcdir
1136x_default_search_path
1137lisppath
1138locallisppath
1139standardlisppath
1140leimdir
1141lispdir
1142srcdir
1143canonical
1144configuration
1145version
1146KRB4LIB
1147DESLIB
1148KRB5LIB
1149CRYPTOLIB
1150COM_ERRLIB
1151LIBRESOLV
1152LIBHESIOD
1153TERMCAP_OBJ
1154LIBS_TERMCAP
1155BLESSMAIL_TARGET
1156LIBS_MAIL
1157liblockfile
1158LIBXML2_LIBS
1159LIBXML2_CFLAGS
1160LIBXSM
1161LIBGPM
1162LIBGIF
1163LIBTIFF
1164LIBPNG
1165LIBJPEG
1166LIBXPM
1167M17N_FLT_LIBS
1168M17N_FLT_CFLAGS
1169LIBOTF_LIBS
1170LIBOTF_CFLAGS
1171FREETYPE_LIBS
1172FREETYPE_CFLAGS
1173XFT_LIBS
1174XFT_CFLAGS
1175FONTCONFIG_LIBS
1176FONTCONFIG_CFLAGS
1177LIBXMU
1178LIBXTR6
1179LIBGNUTLS_LIBS
1180LIBGNUTLS_CFLAGS
1181LIBSELINUX_LIBS
1182SETTINGS_LIBS
1183SETTINGS_CFLAGS
dcde497f
GM
1184GOBJECT_LIBS
1185GOBJECT_CFLAGS
5476a9a4
GM
1186GCONF_LIBS
1187GCONF_CFLAGS
1188GSETTINGS_LIBS
1189GSETTINGS_CFLAGS
1190DBUS_OBJ
1191DBUS_LIBS
1192DBUS_CFLAGS
1193GTK_OBJ
1194GTK_LIBS
1195GTK_CFLAGS
1196IMAGEMAGICK_LIBS
1197IMAGEMAGICK_CFLAGS
1198RSVG_LIBS
1199RSVG_CFLAGS
1200LIB_PTHREAD
1201VMLIMIT_OBJ
1202GMALLOC_OBJ
1203HAVE_XSERVER
1204LIB_STANDARD
1205NS_OBJC_OBJ
1206NS_OBJ
1207ns_self_contained
1208INSTALL_ARCH_INDEP_EXTRA
1209TEMACS_LDFLAGS2
1210LD_SWITCH_X_SITE_RPATH
1211XMKMF
1212DEPFLAGS
1213MKDEPDIR
1214CFLAGS_SOUND
1215ALSA_LIBS
1216ALSA_CFLAGS
1217LIBSOUND
1218PKG_CONFIG
130f1dac 1219CRT_DIR
067d23c9
KY
1220START_FILES
1221LIB_MATH
067d23c9
KY
1222LIBS_SYSTEM
1223C_SWITCH_SYSTEM
1224UNEXEC_OBJ
1225C_SWITCH_MACHINE
1226LD_SWITCH_SYSTEM
1227CANNOT_DUMP
141d074d
GM
1228INFO_OPTS
1229INFO_EXT
96f129d5 1230HAVE_MAKEINFO
9c29597b 1231PAXCTL
067d23c9
KY
1232GZIP_PROG
1233INSTALL_INFO
0e733db9 1234LN_S
a6b92a4a 1235GNULIB_WARN_CFLAGS
0eb775a3 1236WARN_CFLAGS
a6b92a4a 1237WERROR_CFLAGS
369e19fc
PE
1238RANLIB
1239ARFLAGS
1240AR
067d23c9
KY
1241EGREP
1242GREP
1243CPP
743c80a7
PE
1244am__fastdepCC_FALSE
1245am__fastdepCC_TRUE
1246CCDEPMODE
1247AMDEPBACKSLASH
1248AMDEP_FALSE
1249AMDEP_TRUE
1250am__quote
1251am__include
1252DEPDIR
067d23c9
KY
1253OBJEXT
1254EXEEXT
1255ac_ct_CC
1256CPPFLAGS
1257LDFLAGS
1258CFLAGS
1259CC
1260host_os
1261host_vendor
1262host_cpu
1263host
1264build_os
1265build_vendor
1266build_cpu
1267build
1268PROFILING_CFLAGS
067d23c9 1269GZIP_INFO
c3a461a5 1270cache_file
743c80a7
PE
1271am__untar
1272am__tar
1273AMTAR
1274am__leading_dot
1275SET_MAKE
1276AWK
1277mkdir_p
1278MKDIR_P
1279INSTALL_STRIP_PROGRAM
1280STRIP
1281install_sh
1282MAKEINFO
1283AUTOHEADER
1284AUTOMAKE
1285AUTOCONF
1286ACLOCAL
1287VERSION
1288PACKAGE
1289CYGPATH_W
1290am__isrc
1291INSTALL_DATA
1292INSTALL_SCRIPT
1293INSTALL_PROGRAM
067d23c9
KY
1294target_alias
1295host_alias
1296build_alias
1297LIBS
1298ECHO_T
1299ECHO_N
1300ECHO_C
1301DEFS
1302mandir
1303localedir
1304libdir
1305psdir
1306pdfdir
1307dvidir
1308htmldir
1309infodir
1310docdir
1311oldincludedir
1312includedir
1313localstatedir
1314sharedstatedir
1315sysconfdir
1316datadir
1317datarootdir
1318libexecdir
1319sbindir
1320bindir
1321program_transform_name
1322prefix
1323exec_prefix
1324PACKAGE_URL
1325PACKAGE_BUGREPORT
1326PACKAGE_STRING
1327PACKAGE_VERSION
1328PACKAGE_TARNAME
1329PACKAGE_NAME
1330PATH_SEPARATOR
1331SHELL'
1332ac_subst_files='deps_frag
4d4b75e8 1333lisp_frag
067d23c9
KY
1334ns_frag'
1335ac_user_opts='
1336enable_option_checking
ee77919d 1337with_all
067d23c9
KY
1338with_pop
1339with_kerberos
1340with_kerberos5
1341with_hesiod
1342with_mmdf
1343with_mail_unlink
1344with_mailhost
1345with_sound
1346with_sync_input
1347with_x_toolkit
0442dc7f 1348with_wide_int
067d23c9
KY
1349with_xpm
1350with_jpeg
1351with_tiff
1352with_gif
1353with_png
1354with_rsvg
1355with_xml2
1356with_imagemagick
1357with_xft
1358with_libotf
1359with_m17n_flt
1360with_toolkit_scroll_bars
1361with_xaw3d
1362with_xim
1363with_ns
1364with_gpm
1365with_dbus
1366with_gconf
f527bd02 1367with_gsettings
067d23c9
KY
1368with_selinux
1369with_gnutls
1370with_makeinfo
1371with_compress_info
1372with_pkg_config_prog
1373with_crt_dir
4fc5868a 1374with_gameuser
067d23c9
KY
1375with_gnustep_conf
1376enable_ns_self_contained
067d23c9
KY
1377enable_locallisppath
1378enable_checking
afd07e01 1379enable_check_lisp_object_type
067d23c9
KY
1380enable_profiling
1381enable_autodepend
743c80a7 1382enable_dependency_tracking
067d23c9 1383enable_largefile
a6b92a4a 1384enable_gcc_warnings
e4d35030 1385enable_link_time_optimization
067d23c9
KY
1386with_x
1387'
1388 ac_precious_vars='build_alias
1389host_alias
1390target_alias
1391CC
1392CFLAGS
1393LDFLAGS
1394LIBS
1395CPPFLAGS
1396CPP
1397XMKMF'
1398
1399
1400# Initialize some variables set by options.
1401ac_init_help=
1402ac_init_version=false
1403ac_unrecognized_opts=
1404ac_unrecognized_sep=
1405# The variables have the same names as the options, with
1406# dashes changed to underlines.
1407cache_file=/dev/null
1408exec_prefix=NONE
1409no_create=
1410no_recursion=
1411prefix=NONE
1412program_prefix=NONE
1413program_suffix=NONE
1414program_transform_name=s,x,x,
1415silent=
1416site=
1417srcdir=
1418verbose=
1419x_includes=NONE
1420x_libraries=NONE
1421
1422# Installation directory options.
1423# These are left unexpanded so users can "make install exec_prefix=/foo"
1424# and all the variables that are supposed to be based on exec_prefix
1425# by default will actually change.
1426# Use braces instead of parens because sh, perl, etc. also accept them.
1427# (The list follows the same order as the GNU Coding Standards.)
1428bindir='${exec_prefix}/bin'
1429sbindir='${exec_prefix}/sbin'
1430libexecdir='${exec_prefix}/libexec'
1431datarootdir='${prefix}/share'
1432datadir='${datarootdir}'
1433sysconfdir='${prefix}/etc'
1434sharedstatedir='${prefix}/com'
1435localstatedir='${prefix}/var'
1436includedir='${prefix}/include'
1437oldincludedir='/usr/include'
1438docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1439infodir='${datarootdir}/info'
1440htmldir='${docdir}'
1441dvidir='${docdir}'
1442pdfdir='${docdir}'
1443psdir='${docdir}'
1444libdir='${exec_prefix}/lib'
1445localedir='${datarootdir}/locale'
1446mandir='${datarootdir}/man'
1447
1448ac_prev=
1449ac_dashdash=
1450for ac_option
1451do
1452 # If the previous option needs an argument, assign it.
1453 if test -n "$ac_prev"; then
1454 eval $ac_prev=\$ac_option
1455 ac_prev=
1456 continue
1457 fi
1458
1459 case $ac_option in
a9bec17c
GM
1460 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1461 *) ac_optarg=yes ;;
067d23c9
KY
1462 esac
1463
1464 # Accept the important Cygnus configure options, so we can diagnose typos.
1465
1466 case $ac_dashdash$ac_option in
1467 --)
1468 ac_dashdash=yes ;;
1469
1470 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1471 ac_prev=bindir ;;
1472 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1473 bindir=$ac_optarg ;;
1474
1475 -build | --build | --buil | --bui | --bu)
1476 ac_prev=build_alias ;;
1477 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1478 build_alias=$ac_optarg ;;
1479
1480 -cache-file | --cache-file | --cache-fil | --cache-fi \
1481 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1482 ac_prev=cache_file ;;
1483 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1484 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1485 cache_file=$ac_optarg ;;
1486
1487 --config-cache | -C)
1488 cache_file=config.cache ;;
1489
1490 -datadir | --datadir | --datadi | --datad)
1491 ac_prev=datadir ;;
1492 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1493 datadir=$ac_optarg ;;
1494
1495 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1496 | --dataroo | --dataro | --datar)
1497 ac_prev=datarootdir ;;
1498 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1499 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1500 datarootdir=$ac_optarg ;;
1501
1502 -disable-* | --disable-*)
1503 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1504 # Reject names that are not valid shell variable names.
1505 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1506 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1507 ac_useropt_orig=$ac_useropt
1508 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1509 case $ac_user_opts in
1510 *"
1511"enable_$ac_useropt"
1512"*) ;;
1513 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1514 ac_unrecognized_sep=', ';;
1515 esac
1516 eval enable_$ac_useropt=no ;;
1517
1518 -docdir | --docdir | --docdi | --doc | --do)
1519 ac_prev=docdir ;;
1520 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1521 docdir=$ac_optarg ;;
1522
1523 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1524 ac_prev=dvidir ;;
1525 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1526 dvidir=$ac_optarg ;;
1527
1528 -enable-* | --enable-*)
1529 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1530 # Reject names that are not valid shell variable names.
1531 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1532 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1533 ac_useropt_orig=$ac_useropt
1534 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1535 case $ac_user_opts in
1536 *"
1537"enable_$ac_useropt"
1538"*) ;;
1539 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1540 ac_unrecognized_sep=', ';;
1541 esac
1542 eval enable_$ac_useropt=\$ac_optarg ;;
1543
1544 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1545 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1546 | --exec | --exe | --ex)
1547 ac_prev=exec_prefix ;;
1548 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1549 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1550 | --exec=* | --exe=* | --ex=*)
1551 exec_prefix=$ac_optarg ;;
1552
1553 -gas | --gas | --ga | --g)
1554 # Obsolete; use --with-gas.
1555 with_gas=yes ;;
1556
1557 -help | --help | --hel | --he | -h)
1558 ac_init_help=long ;;
1559 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1560 ac_init_help=recursive ;;
1561 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1562 ac_init_help=short ;;
1563
1564 -host | --host | --hos | --ho)
1565 ac_prev=host_alias ;;
1566 -host=* | --host=* | --hos=* | --ho=*)
1567 host_alias=$ac_optarg ;;
1568
1569 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1570 ac_prev=htmldir ;;
1571 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1572 | --ht=*)
1573 htmldir=$ac_optarg ;;
1574
1575 -includedir | --includedir | --includedi | --included | --include \
1576 | --includ | --inclu | --incl | --inc)
1577 ac_prev=includedir ;;
1578 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1579 | --includ=* | --inclu=* | --incl=* | --inc=*)
1580 includedir=$ac_optarg ;;
1581
1582 -infodir | --infodir | --infodi | --infod | --info | --inf)
1583 ac_prev=infodir ;;
1584 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1585 infodir=$ac_optarg ;;
1586
1587 -libdir | --libdir | --libdi | --libd)
1588 ac_prev=libdir ;;
1589 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1590 libdir=$ac_optarg ;;
1591
1592 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1593 | --libexe | --libex | --libe)
1594 ac_prev=libexecdir ;;
1595 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1596 | --libexe=* | --libex=* | --libe=*)
1597 libexecdir=$ac_optarg ;;
1598
1599 -localedir | --localedir | --localedi | --localed | --locale)
1600 ac_prev=localedir ;;
1601 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1602 localedir=$ac_optarg ;;
1603
1604 -localstatedir | --localstatedir | --localstatedi | --localstated \
1605 | --localstate | --localstat | --localsta | --localst | --locals)
1606 ac_prev=localstatedir ;;
1607 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1608 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1609 localstatedir=$ac_optarg ;;
1610
1611 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1612 ac_prev=mandir ;;
1613 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1614 mandir=$ac_optarg ;;
1615
1616 -nfp | --nfp | --nf)
1617 # Obsolete; use --without-fp.
1618 with_fp=no ;;
1619
1620 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1621 | --no-cr | --no-c | -n)
1622 no_create=yes ;;
1623
1624 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1625 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1626 no_recursion=yes ;;
1627
1628 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1629 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1630 | --oldin | --oldi | --old | --ol | --o)
1631 ac_prev=oldincludedir ;;
1632 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1633 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1634 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1635 oldincludedir=$ac_optarg ;;
1636
1637 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1638 ac_prev=prefix ;;
1639 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1640 prefix=$ac_optarg ;;
1641
1642 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1643 | --program-pre | --program-pr | --program-p)
1644 ac_prev=program_prefix ;;
1645 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1646 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1647 program_prefix=$ac_optarg ;;
1648
1649 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1650 | --program-suf | --program-su | --program-s)
1651 ac_prev=program_suffix ;;
1652 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1653 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1654 program_suffix=$ac_optarg ;;
1655
1656 -program-transform-name | --program-transform-name \
1657 | --program-transform-nam | --program-transform-na \
1658 | --program-transform-n | --program-transform- \
1659 | --program-transform | --program-transfor \
1660 | --program-transfo | --program-transf \
1661 | --program-trans | --program-tran \
1662 | --progr-tra | --program-tr | --program-t)
1663 ac_prev=program_transform_name ;;
1664 -program-transform-name=* | --program-transform-name=* \
1665 | --program-transform-nam=* | --program-transform-na=* \
1666 | --program-transform-n=* | --program-transform-=* \
1667 | --program-transform=* | --program-transfor=* \
1668 | --program-transfo=* | --program-transf=* \
1669 | --program-trans=* | --program-tran=* \
1670 | --progr-tra=* | --program-tr=* | --program-t=*)
1671 program_transform_name=$ac_optarg ;;
1672
1673 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1674 ac_prev=pdfdir ;;
1675 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1676 pdfdir=$ac_optarg ;;
1677
1678 -psdir | --psdir | --psdi | --psd | --ps)
1679 ac_prev=psdir ;;
1680 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1681 psdir=$ac_optarg ;;
1682
1683 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1684 | -silent | --silent | --silen | --sile | --sil)
1685 silent=yes ;;
1686
1687 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1688 ac_prev=sbindir ;;
1689 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1690 | --sbi=* | --sb=*)
1691 sbindir=$ac_optarg ;;
1692
1693 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1694 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1695 | --sharedst | --shareds | --shared | --share | --shar \
1696 | --sha | --sh)
1697 ac_prev=sharedstatedir ;;
1698 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1699 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1700 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1701 | --sha=* | --sh=*)
1702 sharedstatedir=$ac_optarg ;;
1703
1704 -site | --site | --sit)
1705 ac_prev=site ;;
1706 -site=* | --site=* | --sit=*)
1707 site=$ac_optarg ;;
1708
1709 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1710 ac_prev=srcdir ;;
1711 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1712 srcdir=$ac_optarg ;;
1713
1714 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1715 | --syscon | --sysco | --sysc | --sys | --sy)
1716 ac_prev=sysconfdir ;;
1717 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1718 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1719 sysconfdir=$ac_optarg ;;
1720
1721 -target | --target | --targe | --targ | --tar | --ta | --t)
1722 ac_prev=target_alias ;;
1723 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1724 target_alias=$ac_optarg ;;
1725
1726 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1727 verbose=yes ;;
1728
1729 -version | --version | --versio | --versi | --vers | -V)
1730 ac_init_version=: ;;
1731
1732 -with-* | --with-*)
1733 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1734 # Reject names that are not valid shell variable names.
1735 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1736 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1737 ac_useropt_orig=$ac_useropt
1738 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1739 case $ac_user_opts in
1740 *"
1741"with_$ac_useropt"
1742"*) ;;
1743 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1744 ac_unrecognized_sep=', ';;
1745 esac
1746 eval with_$ac_useropt=\$ac_optarg ;;
1747
1748 -without-* | --without-*)
1749 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1750 # Reject names that are not valid shell variable names.
1751 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1752 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1753 ac_useropt_orig=$ac_useropt
1754 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1755 case $ac_user_opts in
1756 *"
1757"with_$ac_useropt"
1758"*) ;;
1759 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1760 ac_unrecognized_sep=', ';;
1761 esac
1762 eval with_$ac_useropt=no ;;
1763
1764 --x)
1765 # Obsolete; use --with-x.
1766 with_x=yes ;;
1767
1768 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1769 | --x-incl | --x-inc | --x-in | --x-i)
1770 ac_prev=x_includes ;;
1771 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1772 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1773 x_includes=$ac_optarg ;;
1774
1775 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1776 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1777 ac_prev=x_libraries ;;
1778 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1779 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1780 x_libraries=$ac_optarg ;;
1781
a9bec17c
GM
1782 -*) as_fn_error "unrecognized option: \`$ac_option'
1783Try \`$0 --help' for more information."
067d23c9
KY
1784 ;;
1785
1786 *=*)
1787 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1788 # Reject names that are not valid shell variable names.
1789 case $ac_envvar in #(
1790 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1791 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1792 esac
1793 eval $ac_envvar=\$ac_optarg
1794 export $ac_envvar ;;
1795
1796 *)
1797 # FIXME: should be removed in autoconf 3.0.
1798 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1799 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1800 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1801 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1802 ;;
1803
1804 esac
1805done
1806
1807if test -n "$ac_prev"; then
1808 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1809 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1810fi
1811
1812if test -n "$ac_unrecognized_opts"; then
1813 case $enable_option_checking in
1814 no) ;;
a9bec17c 1815 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1816 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1817 esac
1818fi
1819
1820# Check all directory arguments for consistency.
1821for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1822 datadir sysconfdir sharedstatedir localstatedir includedir \
1823 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1824 libdir localedir mandir
1825do
1826 eval ac_val=\$$ac_var
1827 # Remove trailing slashes.
1828 case $ac_val in
1829 */ )
1830 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1831 eval $ac_var=\$ac_val;;
1832 esac
1833 # Be sure to have absolute directory names.
1834 case $ac_val in
1835 [\\/$]* | ?:[\\/]* ) continue;;
1836 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1837 esac
a9bec17c 1838 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
1839done
1840
1841# There might be people who depend on the old broken behavior: `$host'
1842# used to hold the argument of --host etc.
1843# FIXME: To remove some day.
1844build=$build_alias
1845host=$host_alias
1846target=$target_alias
1847
1848# FIXME: To remove some day.
1849if test "x$host_alias" != x; then
1850 if test "x$build_alias" = x; then
1851 cross_compiling=maybe
a9bec17c
GM
1852 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1853 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
1854 elif test "x$build_alias" != "x$host_alias"; then
1855 cross_compiling=yes
1856 fi
1857fi
1858
1859ac_tool_prefix=
1860test -n "$host_alias" && ac_tool_prefix=$host_alias-
1861
1862test "$silent" = yes && exec 6>/dev/null
1863
1864
1865ac_pwd=`pwd` && test -n "$ac_pwd" &&
1866ac_ls_di=`ls -di .` &&
1867ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 1868 as_fn_error "working directory cannot be determined"
067d23c9 1869test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 1870 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
1871
1872
1873# Find the source files, if location was not specified.
1874if test -z "$srcdir"; then
1875 ac_srcdir_defaulted=yes
1876 # Try the directory containing this script, then the parent directory.
1877 ac_confdir=`$as_dirname -- "$as_myself" ||
1878$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1879 X"$as_myself" : 'X\(//\)[^/]' \| \
1880 X"$as_myself" : 'X\(//\)$' \| \
1881 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1882$as_echo X"$as_myself" |
1883 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1884 s//\1/
1885 q
1886 }
1887 /^X\(\/\/\)[^/].*/{
1888 s//\1/
1889 q
1890 }
1891 /^X\(\/\/\)$/{
1892 s//\1/
1893 q
1894 }
1895 /^X\(\/\).*/{
1896 s//\1/
1897 q
1898 }
1899 s/.*/./; q'`
1900 srcdir=$ac_confdir
1901 if test ! -r "$srcdir/$ac_unique_file"; then
1902 srcdir=..
1903 fi
1904else
1905 ac_srcdir_defaulted=no
1906fi
1907if test ! -r "$srcdir/$ac_unique_file"; then
1908 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 1909 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
1910fi
1911ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1912ac_abs_confdir=`(
a9bec17c 1913 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
1914 pwd)`
1915# When building in place, set srcdir=.
1916if test "$ac_abs_confdir" = "$ac_pwd"; then
1917 srcdir=.
1918fi
1919# Remove unnecessary trailing slashes from srcdir.
1920# Double slashes in file names in object file debugging info
1921# mess up M-x gdb in Emacs.
1922case $srcdir in
1923*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1924esac
1925for ac_var in $ac_precious_vars; do
1926 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1927 eval ac_env_${ac_var}_value=\$${ac_var}
1928 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1929 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1930done
1931
1932#
1933# Report the --help message.
1934#
1935if test "$ac_init_help" = "long"; then
1936 # Omit some internal or obsolete options to make the list less imposing.
1937 # This message is too long to be a string in the A/UX 3.1 sh.
1938 cat <<_ACEOF
250c8ab9 1939\`configure' configures emacs 24.2.50 to adapt to many kinds of systems.
067d23c9
KY
1940
1941Usage: $0 [OPTION]... [VAR=VALUE]...
1942
1943To assign environment variables (e.g., CC, CFLAGS...), specify them as
1944VAR=VALUE. See below for descriptions of some of the useful variables.
1945
1946Defaults for the options are specified in brackets.
1947
1948Configuration:
1949 -h, --help display this help and exit
1950 --help=short display options specific to this package
1951 --help=recursive display the short help of all the included packages
1952 -V, --version display version information and exit
a9bec17c 1953 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
1954 --cache-file=FILE cache test results in FILE [disabled]
1955 -C, --config-cache alias for \`--cache-file=config.cache'
1956 -n, --no-create do not create output files
1957 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1958
1959Installation directories:
1960 --prefix=PREFIX install architecture-independent files in PREFIX
1961 [$ac_default_prefix]
1962 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1963 [PREFIX]
1964
1965By default, \`make install' will install all the files in
1966\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1967an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1968for instance \`--prefix=\$HOME'.
1969
1970For better control, use the options below.
1971
1972Fine tuning of the installation directories:
1973 --bindir=DIR user executables [EPREFIX/bin]
1974 --sbindir=DIR system admin executables [EPREFIX/sbin]
1975 --libexecdir=DIR program executables [EPREFIX/libexec]
1976 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1977 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1978 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1979 --libdir=DIR object code libraries [EPREFIX/lib]
1980 --includedir=DIR C header files [PREFIX/include]
1981 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1982 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1983 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1984 --infodir=DIR info documentation [DATAROOTDIR/info]
1985 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1986 --mandir=DIR man documentation [DATAROOTDIR/man]
1987 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1988 --htmldir=DIR html documentation [DOCDIR]
1989 --dvidir=DIR dvi documentation [DOCDIR]
1990 --pdfdir=DIR pdf documentation [DOCDIR]
1991 --psdir=DIR ps documentation [DOCDIR]
1992_ACEOF
1993
1994 cat <<\_ACEOF
1995
1996Program names:
1997 --program-prefix=PREFIX prepend PREFIX to installed program names
1998 --program-suffix=SUFFIX append SUFFIX to installed program names
1999 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2000
2001X features:
2002 --x-includes=DIR X include files are in DIR
2003 --x-libraries=DIR X library files are in DIR
2004
2005System types:
2006 --build=BUILD configure for building on BUILD [guessed]
2007 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2008_ACEOF
2009fi
2010
2011if test -n "$ac_init_help"; then
2012 case $ac_init_help in
250c8ab9 2013 short | recursive ) echo "Configuration of emacs 24.2.50:";;
067d23c9
KY
2014 esac
2015 cat <<\_ACEOF
2016
2017Optional Features:
2018 --disable-option-checking ignore unrecognized --enable/--with options
2019 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2020 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2021 --disable-ns-self-contained
2022 disable self contained build under NeXTstep
067d23c9
KY
2023 --enable-locallisppath=PATH
2024 directories Emacs should search for lisp files
2025 specific to this site
2026 --enable-checking[=LIST]
2027 enable expensive run-time checks. With LIST, enable
2028 only specific categories of checks. Categories are:
2029 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2030 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2031 --enable-check-lisp-object-type
2032 enable compile time checks for the Lisp_Object data
2033 type. This is useful for development for catching
2034 certain types of bugs.
067d23c9
KY
2035 --enable-profiling build emacs with profiling support. This might not
2036 work on all platforms
2037 --enable-autodepend automatically generate dependencies to .h-files.
2038 Requires GNU Make and Gcc. Enabled if GNU Make and
2039 Gcc is found
743c80a7
PE
2040 --disable-dependency-tracking speeds up one-time build
2041 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2042 --disable-largefile omit support for large files
938a4ef9
GM
2043 --enable-gcc-warnings turn on lots of GCC warnings. This is intended for
2044 developers, and may generate false alarms when used
2045 with older or non-GNU development tools.
e4d35030
GM
2046 --enable-link-time-optimization
2047 build emacs with link-time optimization. This is
2048 supported only for GCC since 4.5.0.
067d23c9
KY
2049
2050Optional Packages:
2051 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2052 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
ee77919d
GM
2053 --without-all omit almost all features and build small executable
2054 with minimal dependencies
067d23c9
KY
2055 --without-pop don't support POP mail retrieval with movemail
2056 --with-kerberos support Kerberos-authenticated POP
2057 --with-kerberos5 support Kerberos version 5 authenticated POP
2058 --with-hesiod support Hesiod to get the POP server host
2059 --with-mmdf support MMDF mailboxes
2060 --with-mail-unlink unlink, rather than empty, mail spool after reading
2061 --with-mailhost=HOSTNAME
2062 string giving default POP mail host
2063 --without-sound don't compile with sound support
2064 --without-sync-input process async input synchronously
4fa92495
GM
2065 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk2,
2066 gtk3, lucid or athena, motif, no)
0442dc7f 2067 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2068 --without-xpm don't compile with XPM image support
2069 --without-jpeg don't compile with JPEG image support
2070 --without-tiff don't compile with TIFF image support
2071 --without-gif don't compile with GIF image support
2072 --without-png don't compile with PNG image support
2073 --without-rsvg don't compile with SVG image support
2074 --without-xml2 don't compile with XML parsing support
2075 --without-imagemagick don't compile with ImageMagick image support
2076 --without-xft don't use XFT for anti aliased fonts
2077 --without-libotf don't use libotf for OpenType font support
2078 --without-m17n-flt don't use m17n-flt for text shaping
2079 --without-toolkit-scroll-bars
2080 don't use Motif or Xaw3d scroll bars
2081 --without-xaw3d don't use Xaw3d
2082 --without-xim don't use X11 XIM
7834125e 2083 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
067d23c9
KY
2084 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2085 console
2086 --without-dbus don't compile with D-Bus support
2087 --without-gconf don't compile with GConf support
f527bd02 2088 --without-gsettings don't compile with GSettings support
067d23c9
KY
2089 --without-selinux don't compile with SELinux support
2090 --without-gnutls don't use -lgnutls for SSL/TLS support
2091 --without-makeinfo don't require makeinfo for building manuals
2092 --without-compress-info don't compress the installed Info pages
2093 --with-pkg-config-prog=PATH
2094 path to pkg-config for finding GTK and librsvg
2095 --with-crt-dir=DIR directory containing crtn.o etc. The default is
2096 /usr/lib, or /usr/lib64 on some platforms.
4fc5868a 2097 --with-gameuser=USER user for shared game score files
067d23c9
KY
2098 --with-gnustep-conf=PATH
2099 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2100 or /etc/GNUstep/GNUstep.conf
2101 --with-x use the X Window System
2102
2103Some influential environment variables:
2104 CC C compiler command
2105 CFLAGS C compiler flags
2106 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2107 nonstandard directory <lib dir>
2108 LIBS libraries to pass to the linker, e.g. -l<library>
2109 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2110 you have headers in a nonstandard directory <include dir>
2111 CPP C preprocessor
2112 XMKMF Path to xmkmf, Makefile generator for X Window System
2113
2114Use these variables to override the choices made by `configure' or to help
2115it to find libraries and programs with nonstandard names/locations.
2116
2117Report bugs to the package provider.
2118_ACEOF
2119ac_status=$?
2120fi
2121
2122if test "$ac_init_help" = "recursive"; then
2123 # If there are subdirs, report their specific --help.
2124 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2125 test -d "$ac_dir" ||
2126 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2127 continue
2128 ac_builddir=.
2129
2130case "$ac_dir" in
2131.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2132*)
2133 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2134 # A ".." for each directory in $ac_dir_suffix.
2135 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2136 case $ac_top_builddir_sub in
2137 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2138 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2139 esac ;;
2140esac
2141ac_abs_top_builddir=$ac_pwd
2142ac_abs_builddir=$ac_pwd$ac_dir_suffix
2143# for backward compatibility:
2144ac_top_builddir=$ac_top_build_prefix
2145
2146case $srcdir in
2147 .) # We are building in place.
2148 ac_srcdir=.
2149 ac_top_srcdir=$ac_top_builddir_sub
2150 ac_abs_top_srcdir=$ac_pwd ;;
2151 [\\/]* | ?:[\\/]* ) # Absolute name.
2152 ac_srcdir=$srcdir$ac_dir_suffix;
2153 ac_top_srcdir=$srcdir
2154 ac_abs_top_srcdir=$srcdir ;;
2155 *) # Relative name.
2156 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2157 ac_top_srcdir=$ac_top_build_prefix$srcdir
2158 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2159esac
2160ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2161
2162 cd "$ac_dir" || { ac_status=$?; continue; }
2163 # Check for guested configure.
2164 if test -f "$ac_srcdir/configure.gnu"; then
2165 echo &&
2166 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2167 elif test -f "$ac_srcdir/configure"; then
2168 echo &&
2169 $SHELL "$ac_srcdir/configure" --help=recursive
2170 else
2171 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2172 fi || ac_status=$?
2173 cd "$ac_pwd" || { ac_status=$?; break; }
2174 done
2175fi
2176
2177test -n "$ac_init_help" && exit $ac_status
2178if $ac_init_version; then
2179 cat <<\_ACEOF
250c8ab9 2180emacs configure 24.2.50
a9bec17c 2181generated by GNU Autoconf 2.65
067d23c9 2182
a9bec17c 2183Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2184This configure script is free software; the Free Software Foundation
2185gives unlimited permission to copy, distribute and modify it.
2186_ACEOF
2187 exit
2188fi
2189
2190## ------------------------ ##
2191## Autoconf initialization. ##
2192## ------------------------ ##
2193
2194# ac_fn_c_try_compile LINENO
2195# --------------------------
2196# Try to compile conftest.$ac_ext, and return whether this succeeded.
2197ac_fn_c_try_compile ()
2198{
2199 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2200 rm -f conftest.$ac_objext
2201 if { { ac_try="$ac_compile"
2202case "(($ac_try" in
2203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2204 *) ac_try_echo=$ac_try;;
2205esac
2206eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2207$as_echo "$ac_try_echo"; } >&5
2208 (eval "$ac_compile") 2>conftest.err
2209 ac_status=$?
2210 if test -s conftest.err; then
2211 grep -v '^ *+' conftest.err >conftest.er1
2212 cat conftest.er1 >&5
2213 mv -f conftest.er1 conftest.err
2214 fi
2215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2216 test $ac_status = 0; } && {
2217 test -z "$ac_c_werror_flag" ||
2218 test ! -s conftest.err
2219 } && test -s conftest.$ac_objext; then :
2220 ac_retval=0
2221else
2222 $as_echo "$as_me: failed program was:" >&5
2223sed 's/^/| /' conftest.$ac_ext >&5
2224
2225 ac_retval=1
2226fi
a9bec17c 2227 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2228 as_fn_set_status $ac_retval
2229
2230} # ac_fn_c_try_compile
2231
067d23c9
KY
2232# ac_fn_c_try_cpp LINENO
2233# ----------------------
2234# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2235ac_fn_c_try_cpp ()
2236{
2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238 if { { ac_try="$ac_cpp conftest.$ac_ext"
2239case "(($ac_try" in
2240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2241 *) ac_try_echo=$ac_try;;
2242esac
2243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2244$as_echo "$ac_try_echo"; } >&5
2245 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2246 ac_status=$?
2247 if test -s conftest.err; then
2248 grep -v '^ *+' conftest.err >conftest.er1
2249 cat conftest.er1 >&5
2250 mv -f conftest.er1 conftest.err
2251 fi
2252 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2253 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2254 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2255 test ! -s conftest.err
2256 }; then :
2257 ac_retval=0
2258else
2259 $as_echo "$as_me: failed program was:" >&5
2260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262 ac_retval=1
2263fi
a9bec17c 2264 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2265 as_fn_set_status $ac_retval
2266
2267} # ac_fn_c_try_cpp
2268
2269# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2270# -------------------------------------------------------
2271# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2272# the include files in INCLUDES and setting the cache variable VAR
2273# accordingly.
2274ac_fn_c_check_header_mongrel ()
2275{
2276 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2277 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2279$as_echo_n "checking for $2... " >&6; }
a9bec17c 2280if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2281 $as_echo_n "(cached) " >&6
2282fi
2283eval ac_res=\$$3
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2285$as_echo "$ac_res" >&6; }
2286else
2287 # Is the header compilable?
2288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2289$as_echo_n "checking $2 usability... " >&6; }
2290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$4
2293#include <$2>
2294_ACEOF
2295if ac_fn_c_try_compile "$LINENO"; then :
2296 ac_header_compiler=yes
2297else
2298 ac_header_compiler=no
2299fi
2300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2302$as_echo "$ac_header_compiler" >&6; }
2303
2304# Is the header present?
2305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2306$as_echo_n "checking $2 presence... " >&6; }
2307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309#include <$2>
2310_ACEOF
2311if ac_fn_c_try_cpp "$LINENO"; then :
2312 ac_header_preproc=yes
2313else
2314 ac_header_preproc=no
2315fi
a9bec17c 2316rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2318$as_echo "$ac_header_preproc" >&6; }
2319
2320# So? What about this header?
2321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2322 yes:no: )
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2324$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2326$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2327 ;;
2328 no:yes:* )
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2330$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2332$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2334$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2336$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2338$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2339 ;;
2340esac
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2342$as_echo_n "checking for $2... " >&6; }
a9bec17c 2343if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2344 $as_echo_n "(cached) " >&6
2345else
2346 eval "$3=\$ac_header_compiler"
2347fi
2348eval ac_res=\$$3
2349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350$as_echo "$ac_res" >&6; }
2351fi
a9bec17c 2352 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2353
2354} # ac_fn_c_check_header_mongrel
2355
2356# ac_fn_c_try_run LINENO
2357# ----------------------
2358# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2359# that executables *can* be run.
2360ac_fn_c_try_run ()
2361{
2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2363 if { { ac_try="$ac_link"
2364case "(($ac_try" in
2365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2366 *) ac_try_echo=$ac_try;;
2367esac
2368eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2369$as_echo "$ac_try_echo"; } >&5
2370 (eval "$ac_link") 2>&5
2371 ac_status=$?
2372 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2373 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2374 { { case "(($ac_try" in
2375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2376 *) ac_try_echo=$ac_try;;
2377esac
2378eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2379$as_echo "$ac_try_echo"; } >&5
2380 (eval "$ac_try") 2>&5
2381 ac_status=$?
2382 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2383 test $ac_status = 0; }; }; then :
2384 ac_retval=0
2385else
2386 $as_echo "$as_me: program exited with status $ac_status" >&5
2387 $as_echo "$as_me: failed program was:" >&5
2388sed 's/^/| /' conftest.$ac_ext >&5
2389
2390 ac_retval=$ac_status
2391fi
2392 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2393 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2394 as_fn_set_status $ac_retval
2395
2396} # ac_fn_c_try_run
2397
2398# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2399# -------------------------------------------------------
2400# Tests whether HEADER exists and can be compiled using the include files in
2401# INCLUDES, setting the cache variable VAR accordingly.
2402ac_fn_c_check_header_compile ()
2403{
2404 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2406$as_echo_n "checking for $2... " >&6; }
a9bec17c 2407if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2408 $as_echo_n "(cached) " >&6
2409else
2410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2411/* end confdefs.h. */
2412$4
2413#include <$2>
2414_ACEOF
2415if ac_fn_c_try_compile "$LINENO"; then :
2416 eval "$3=yes"
2417else
2418 eval "$3=no"
2419fi
2420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421fi
2422eval ac_res=\$$3
2423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2424$as_echo "$ac_res" >&6; }
a9bec17c 2425 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2426
2427} # ac_fn_c_check_header_compile
2428
1fd182f0
PE
2429# ac_fn_c_try_link LINENO
2430# -----------------------
2431# Try to link conftest.$ac_ext, and return whether this succeeded.
2432ac_fn_c_try_link ()
2433{
2434 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435 rm -f conftest.$ac_objext conftest$ac_exeext
2436 if { { ac_try="$ac_link"
2437case "(($ac_try" in
2438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2439 *) ac_try_echo=$ac_try;;
2440esac
2441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2442$as_echo "$ac_try_echo"; } >&5
2443 (eval "$ac_link") 2>conftest.err
2444 ac_status=$?
2445 if test -s conftest.err; then
2446 grep -v '^ *+' conftest.err >conftest.er1
2447 cat conftest.er1 >&5
2448 mv -f conftest.er1 conftest.err
2449 fi
2450 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451 test $ac_status = 0; } && {
2452 test -z "$ac_c_werror_flag" ||
2453 test ! -s conftest.err
2454 } && test -s conftest$ac_exeext && {
2455 test "$cross_compiling" = yes ||
2456 $as_test_x conftest$ac_exeext
2457 }; then :
2458 ac_retval=0
2459else
2460 $as_echo "$as_me: failed program was:" >&5
2461sed 's/^/| /' conftest.$ac_ext >&5
2462
2463 ac_retval=1
2464fi
2465 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2466 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2467 # interfere with the next link command; also delete a directory that is
2468 # left behind by Apple's compiler. We do this before executing the actions.
2469 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2470 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2471 as_fn_set_status $ac_retval
2472
2473} # ac_fn_c_try_link
2474
42bbbe8b
GM
2475# ac_fn_c_check_decl LINENO SYMBOL VAR
2476# ------------------------------------
2477# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2478ac_fn_c_check_decl ()
2479{
2480 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2482$as_echo_n "checking whether $2 is declared... " >&6; }
2483if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2484 $as_echo_n "(cached) " >&6
2485else
2486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2487/* end confdefs.h. */
2488$4
2489int
2490main ()
2491{
2492#ifndef $2
2493 (void) $2;
2494#endif
2495
2496 ;
2497 return 0;
2498}
2499_ACEOF
2500if ac_fn_c_try_compile "$LINENO"; then :
2501 eval "$3=yes"
2502else
2503 eval "$3=no"
2504fi
2505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2506fi
2507eval ac_res=\$$3
2508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2509$as_echo "$ac_res" >&6; }
2510 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2511
2512} # ac_fn_c_check_decl
2513
5476a9a4
GM
2514# ac_fn_c_check_header_preproc LINENO HEADER VAR
2515# ----------------------------------------------
2516# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2517ac_fn_c_check_header_preproc ()
067d23c9
KY
2518{
2519 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2521$as_echo_n "checking for $2... " >&6; }
a9bec17c 2522if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2523 $as_echo_n "(cached) " >&6
2524else
2525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2526/* end confdefs.h. */
5476a9a4
GM
2527#include <$2>
2528_ACEOF
2529if ac_fn_c_try_cpp "$LINENO"; then :
2530 eval "$3=yes"
2531else
2532 eval "$3=no"
2533fi
2534rm -f conftest.err conftest.$ac_ext
2535fi
2536eval ac_res=\$$3
2537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2538$as_echo "$ac_res" >&6; }
2539 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2540
5476a9a4 2541} # ac_fn_c_check_header_preproc
067d23c9 2542
5476a9a4
GM
2543# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2544# ----------------------------------------------------
2545# Tries to find if the field MEMBER exists in type AGGR, after including
2546# INCLUDES, setting cache variable VAR accordingly.
2547ac_fn_c_check_member ()
2548{
2549 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2551$as_echo_n "checking for $2.$3... " >&6; }
2552if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2553 $as_echo_n "(cached) " >&6
2554else
2555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2556/* end confdefs.h. */
2557$5
2558int
2559main ()
2560{
2561static $2 ac_aggr;
2562if (ac_aggr.$3)
2563return 0;
2564 ;
2565 return 0;
2566}
2567_ACEOF
2568if ac_fn_c_try_compile "$LINENO"; then :
2569 eval "$4=yes"
2570else
2571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2572/* end confdefs.h. */
2573$5
2574int
2575main ()
2576{
2577static $2 ac_aggr;
2578if (sizeof ac_aggr.$3)
2579return 0;
2580 ;
2581 return 0;
2582}
2583_ACEOF
2584if ac_fn_c_try_compile "$LINENO"; then :
2585 eval "$4=yes"
2586else
2587 eval "$4=no"
2588fi
2589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2590fi
2591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2592fi
2593eval ac_res=\$$4
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2595$as_echo "$ac_res" >&6; }
2596 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2597
2598} # ac_fn_c_check_member
2599
2600# ac_fn_c_check_func LINENO FUNC VAR
2601# ----------------------------------
2602# Tests whether FUNC exists, setting the cache variable VAR accordingly
2603ac_fn_c_check_func ()
2604{
2605 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2607$as_echo_n "checking for $2... " >&6; }
2608if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2609 $as_echo_n "(cached) " >&6
2610else
2611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2612/* end confdefs.h. */
2613/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2614 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2615#define $2 innocuous_$2
2616
2617/* System header to define __stub macros and hopefully few prototypes,
2618 which can conflict with char $2 (); below.
2619 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2620 <limits.h> exists even on freestanding compilers. */
2621
2622#ifdef __STDC__
067d23c9
KY
2623# include <limits.h>
2624#else
2625# include <assert.h>
2626#endif
2627
2628#undef $2
2629
2630/* Override any GCC internal prototype to avoid an error.
2631 Use char because int might match the return type of a GCC
2632 builtin and then its argument prototype would still apply. */
2633#ifdef __cplusplus
2634extern "C"
2635#endif
2636char $2 ();
2637/* The GNU C library defines this for functions which it implements
2638 to always fail with ENOSYS. Some functions are actually named
2639 something starting with __ and the normal name is an alias. */
2640#if defined __stub_$2 || defined __stub___$2
2641choke me
2642#endif
2643
2644int
2645main ()
2646{
2647return $2 ();
2648 ;
2649 return 0;
2650}
2651_ACEOF
2652if ac_fn_c_try_link "$LINENO"; then :
2653 eval "$3=yes"
2654else
2655 eval "$3=no"
2656fi
2657rm -f core conftest.err conftest.$ac_objext \
2658 conftest$ac_exeext conftest.$ac_ext
2659fi
2660eval ac_res=\$$3
2661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2662$as_echo "$ac_res" >&6; }
a9bec17c 2663 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2664
2665} # ac_fn_c_check_func
2666
5476a9a4
GM
2667# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2668# -------------------------------------------
2669# Tests whether TYPE exists after having included INCLUDES, setting cache
2670# variable VAR accordingly.
2671ac_fn_c_check_type ()
3e0be4ab
GM
2672{
2673 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2675$as_echo_n "checking for $2... " >&6; }
2676if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2677 $as_echo_n "(cached) " >&6
2678else
5476a9a4 2679 eval "$3=no"
3e0be4ab
GM
2680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2681/* end confdefs.h. */
5476a9a4 2682$4
3e0be4ab
GM
2683int
2684main ()
2685{
5476a9a4
GM
2686if (sizeof ($2))
2687 return 0;
3e0be4ab
GM
2688 ;
2689 return 0;
2690}
2691_ACEOF
2692if ac_fn_c_try_compile "$LINENO"; then :
2693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2694/* end confdefs.h. */
5476a9a4 2695$4
3e0be4ab
GM
2696int
2697main ()
2698{
5476a9a4
GM
2699if (sizeof (($2)))
2700 return 0;
3e0be4ab
GM
2701 ;
2702 return 0;
2703}
2704_ACEOF
2705if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2706
3e0be4ab 2707else
5476a9a4 2708 eval "$3=yes"
3e0be4ab
GM
2709fi
2710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2711fi
2712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2713fi
5476a9a4 2714eval ac_res=\$$3
3e0be4ab
GM
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2716$as_echo "$ac_res" >&6; }
a9bec17c 2717 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2718
5476a9a4 2719} # ac_fn_c_check_type
3e0be4ab 2720
5f90be1b
PE
2721# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2722# --------------------------------------------
2723# Tries to find the compile-time value of EXPR in a program that includes
2724# INCLUDES, setting VAR accordingly. Returns whether the value could be
2725# computed
2726ac_fn_c_compute_int ()
2727{
2728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2729 if test "$cross_compiling" = yes; then
2730 # Depending upon the size, compute the lo and hi bounds.
2731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2732/* end confdefs.h. */
2733$4
2734int
2735main ()
2736{
2737static int test_array [1 - 2 * !(($2) >= 0)];
2738test_array [0] = 0
2739
2740 ;
2741 return 0;
2742}
2743_ACEOF
2744if ac_fn_c_try_compile "$LINENO"; then :
2745 ac_lo=0 ac_mid=0
2746 while :; do
2747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2748/* end confdefs.h. */
2749$4
2750int
2751main ()
2752{
2753static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2754test_array [0] = 0
2755
2756 ;
2757 return 0;
2758}
2759_ACEOF
2760if ac_fn_c_try_compile "$LINENO"; then :
2761 ac_hi=$ac_mid; break
2762else
2763 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2764 if test $ac_lo -le $ac_mid; then
2765 ac_lo= ac_hi=
2766 break
2767 fi
2768 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2769fi
2770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2771 done
2772else
2773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2774/* end confdefs.h. */
2775$4
2776int
2777main ()
2778{
2779static int test_array [1 - 2 * !(($2) < 0)];
2780test_array [0] = 0
2781
2782 ;
2783 return 0;
2784}
2785_ACEOF
2786if ac_fn_c_try_compile "$LINENO"; then :
2787 ac_hi=-1 ac_mid=-1
2788 while :; do
2789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790/* end confdefs.h. */
2791$4
2792int
2793main ()
2794{
2795static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2796test_array [0] = 0
2797
2798 ;
2799 return 0;
2800}
2801_ACEOF
2802if ac_fn_c_try_compile "$LINENO"; then :
2803 ac_lo=$ac_mid; break
2804else
2805 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2806 if test $ac_mid -le $ac_hi; then
2807 ac_lo= ac_hi=
2808 break
2809 fi
2810 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2811fi
2812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2813 done
2814else
2815 ac_lo= ac_hi=
2816fi
2817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2818fi
2819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2820# Binary search between lo and hi bounds.
2821while test "x$ac_lo" != "x$ac_hi"; do
2822 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h. */
2825$4
2826int
2827main ()
2828{
2829static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2830test_array [0] = 0
2831
2832 ;
2833 return 0;
2834}
2835_ACEOF
2836if ac_fn_c_try_compile "$LINENO"; then :
2837 ac_hi=$ac_mid
2838else
2839 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2840fi
2841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2842done
2843case $ac_lo in #((
2844?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2845'') ac_retval=1 ;;
2846esac
2847 else
2848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2849/* end confdefs.h. */
2850$4
2851static long int longval () { return $2; }
2852static unsigned long int ulongval () { return $2; }
2853#include <stdio.h>
2854#include <stdlib.h>
2855int
2856main ()
2857{
2858
2859 FILE *f = fopen ("conftest.val", "w");
2860 if (! f)
2861 return 1;
2862 if (($2) < 0)
2863 {
2864 long int i = longval ();
2865 if (i != ($2))
2866 return 1;
2867 fprintf (f, "%ld", i);
2868 }
2869 else
2870 {
2871 unsigned long int i = ulongval ();
2872 if (i != ($2))
2873 return 1;
2874 fprintf (f, "%lu", i);
2875 }
2876 /* Do not output a trailing newline, as this causes \r\n confusion
2877 on some platforms. */
2878 return ferror (f) || fclose (f) != 0;
2879
2880 ;
2881 return 0;
2882}
2883_ACEOF
2884if ac_fn_c_try_run "$LINENO"; then :
2885 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2886else
2887 ac_retval=1
2888fi
2889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2890 conftest.$ac_objext conftest.beam conftest.$ac_ext
2891rm -f conftest.val
2892
2893 fi
a9bec17c 2894 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
2895 as_fn_set_status $ac_retval
2896
2897} # ac_fn_c_compute_int
067d23c9
KY
2898cat >config.log <<_ACEOF
2899This file contains any messages produced by compilers while
2900running configure, to aid debugging if configure makes a mistake.
2901
250c8ab9 2902It was created by emacs $as_me 24.2.50, which was
a9bec17c 2903generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
2904
2905 $ $0 $@
2906
2907_ACEOF
2908exec 5>>config.log
2909{
2910cat <<_ASUNAME
2911## --------- ##
2912## Platform. ##
2913## --------- ##
2914
2915hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2916uname -m = `(uname -m) 2>/dev/null || echo unknown`
2917uname -r = `(uname -r) 2>/dev/null || echo unknown`
2918uname -s = `(uname -s) 2>/dev/null || echo unknown`
2919uname -v = `(uname -v) 2>/dev/null || echo unknown`
2920
2921/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2922/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2923
2924/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2925/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2926/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2927/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2928/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2929/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2930/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2931
2932_ASUNAME
2933
2934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2935for as_dir in $PATH
2936do
2937 IFS=$as_save_IFS
2938 test -z "$as_dir" && as_dir=.
2939 $as_echo "PATH: $as_dir"
2940 done
2941IFS=$as_save_IFS
2942
2943} >&5
2944
2945cat >&5 <<_ACEOF
2946
2947
2948## ----------- ##
2949## Core tests. ##
2950## ----------- ##
2951
2952_ACEOF
2953
2954
2955# Keep a trace of the command line.
2956# Strip out --no-create and --no-recursion so they do not pile up.
2957# Strip out --silent because we don't want to record it for future runs.
2958# Also quote any args containing shell meta-characters.
2959# Make two passes to allow for proper duplicate-argument suppression.
2960ac_configure_args=
2961ac_configure_args0=
2962ac_configure_args1=
2963ac_must_keep_next=false
2964for ac_pass in 1 2
2965do
2966 for ac_arg
2967 do
2968 case $ac_arg in
2969 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2970 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2971 | -silent | --silent | --silen | --sile | --sil)
2972 continue ;;
2973 *\'*)
2974 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2975 esac
2976 case $ac_pass in
2977 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2978 2)
2979 as_fn_append ac_configure_args1 " '$ac_arg'"
2980 if test $ac_must_keep_next = true; then
2981 ac_must_keep_next=false # Got value, back to normal.
2982 else
2983 case $ac_arg in
2984 *=* | --config-cache | -C | -disable-* | --disable-* \
2985 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2986 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2987 | -with-* | --with-* | -without-* | --without-* | --x)
2988 case "$ac_configure_args0 " in
2989 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2990 esac
2991 ;;
2992 -* ) ac_must_keep_next=true ;;
2993 esac
2994 fi
2995 as_fn_append ac_configure_args " '$ac_arg'"
2996 ;;
2997 esac
2998 done
2999done
3000{ ac_configure_args0=; unset ac_configure_args0;}
3001{ ac_configure_args1=; unset ac_configure_args1;}
3002
3003# When interrupted or exit'd, cleanup temporary files, and complete
3004# config.log. We remove comments because anyway the quotes in there
3005# would cause problems or look ugly.
3006# WARNING: Use '\'' to represent an apostrophe within the trap.
3007# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3008trap 'exit_status=$?
3009 # Save into config.log some information that might help in debugging.
3010 {
3011 echo
3012
a9bec17c
GM
3013 cat <<\_ASBOX
3014## ---------------- ##
067d23c9 3015## Cache variables. ##
a9bec17c
GM
3016## ---------------- ##
3017_ASBOX
067d23c9
KY
3018 echo
3019 # The following way of writing the cache mishandles newlines in values,
3020(
3021 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3022 eval ac_val=\$$ac_var
3023 case $ac_val in #(
3024 *${as_nl}*)
3025 case $ac_var in #(
3026 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3027$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3028 esac
3029 case $ac_var in #(
3030 _ | IFS | as_nl) ;; #(
3031 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3032 *) { eval $ac_var=; unset $ac_var;} ;;
3033 esac ;;
3034 esac
3035 done
3036 (set) 2>&1 |
3037 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3038 *${as_nl}ac_space=\ *)
3039 sed -n \
3040 "s/'\''/'\''\\\\'\'''\''/g;
3041 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3042 ;; #(
3043 *)
3044 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3045 ;;
3046 esac |
3047 sort
3048)
3049 echo
3050
a9bec17c
GM
3051 cat <<\_ASBOX
3052## ----------------- ##
067d23c9 3053## Output variables. ##
a9bec17c
GM
3054## ----------------- ##
3055_ASBOX
067d23c9
KY
3056 echo
3057 for ac_var in $ac_subst_vars
3058 do
3059 eval ac_val=\$$ac_var
3060 case $ac_val in
3061 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3062 esac
3063 $as_echo "$ac_var='\''$ac_val'\''"
3064 done | sort
3065 echo
3066
3067 if test -n "$ac_subst_files"; then
a9bec17c
GM
3068 cat <<\_ASBOX
3069## ------------------- ##
067d23c9 3070## File substitutions. ##
a9bec17c
GM
3071## ------------------- ##
3072_ASBOX
067d23c9
KY
3073 echo
3074 for ac_var in $ac_subst_files
3075 do
3076 eval ac_val=\$$ac_var
3077 case $ac_val in
3078 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3079 esac
3080 $as_echo "$ac_var='\''$ac_val'\''"
3081 done | sort
3082 echo
3083 fi
3084
3085 if test -s confdefs.h; then
a9bec17c
GM
3086 cat <<\_ASBOX
3087## ----------- ##
067d23c9 3088## confdefs.h. ##
a9bec17c
GM
3089## ----------- ##
3090_ASBOX
067d23c9
KY
3091 echo
3092 cat confdefs.h
3093 echo
3094 fi
3095 test "$ac_signal" != 0 &&
3096 $as_echo "$as_me: caught signal $ac_signal"
3097 $as_echo "$as_me: exit $exit_status"
3098 } >&5
3099 rm -f core *.core core.conftest.* &&
3100 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3101 exit $exit_status
3102' 0
3103for ac_signal in 1 2 13 15; do
3104 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3105done
3106ac_signal=0
3107
3108# confdefs.h avoids OS command line length limits that DEFS can exceed.
3109rm -f -r conftest* confdefs.h
3110
3111$as_echo "/* confdefs.h */" > confdefs.h
3112
3113# Predefined preprocessor variables.
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_NAME "$PACKAGE_NAME"
3117_ACEOF
3118
3119cat >>confdefs.h <<_ACEOF
3120#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3121_ACEOF
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_VERSION "$PACKAGE_VERSION"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_STRING "$PACKAGE_STRING"
3129_ACEOF
3130
3131cat >>confdefs.h <<_ACEOF
3132#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3133_ACEOF
3134
3135cat >>confdefs.h <<_ACEOF
3136#define PACKAGE_URL "$PACKAGE_URL"
3137_ACEOF
3138
3139
3140# Let the site file select an alternate cache file if it wants to.
3141# Prefer an explicitly selected file to automatically selected ones.
3142ac_site_file1=NONE
3143ac_site_file2=NONE
3144if test -n "$CONFIG_SITE"; then
a9bec17c 3145 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3146elif test "x$prefix" != xNONE; then
3147 ac_site_file1=$prefix/share/config.site
3148 ac_site_file2=$prefix/etc/config.site
3149else
3150 ac_site_file1=$ac_default_prefix/share/config.site
3151 ac_site_file2=$ac_default_prefix/etc/config.site
3152fi
3153for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3154do
3155 test "x$ac_site_file" = xNONE && continue
3156 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3157 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3158$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3159 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3160 . "$ac_site_file"
067d23c9
KY
3161 fi
3162done
3163
3164if test -r "$cache_file"; then
3165 # Some versions of bash will fail to source /dev/null (special files
3166 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3167 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3168 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3169$as_echo "$as_me: loading cache $cache_file" >&6;}
3170 case $cache_file in
3171 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3172 *) . "./$cache_file";;
3173 esac
3174 fi
3175else
3176 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3177$as_echo "$as_me: creating cache $cache_file" >&6;}
3178 >$cache_file
3179fi
3180
5476a9a4
GM
3181as_fn_append ac_header_list " linux/version.h"
3182as_fn_append ac_header_list " sys/systeminfo.h"
3183as_fn_append ac_header_list " stdio_ext.h"
3184as_fn_append ac_header_list " fcntl.h"
3185as_fn_append ac_header_list " coff.h"
3186as_fn_append ac_header_list " pty.h"
3187as_fn_append ac_header_list " sys/vlimit.h"
3188as_fn_append ac_header_list " sys/resource.h"
3189as_fn_append ac_header_list " sys/utsname.h"
3190as_fn_append ac_header_list " pwd.h"
3191as_fn_append ac_header_list " utmp.h"
3192as_fn_append ac_header_list " dirent.h"
3193as_fn_append ac_header_list " util.h"
3194as_fn_append ac_header_list " sys/socket.h"
3195as_fn_append ac_header_list " stdlib.h"
3196as_fn_append ac_header_list " unistd.h"
7e723570 3197as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3198as_fn_append ac_header_list " pthread.h"
3199as_fn_append ac_header_list " malloc/malloc.h"
3200as_fn_append ac_header_list " maillock.h"
3201as_fn_append ac_header_list " sys/un.h"
3202as_fn_append ac_func_list " tzset"
3203as_fn_append ac_func_list " readlinkat"
8966cbff 3204as_fn_append ac_header_list " execinfo.h"
f199cab1
GM
3205gl_getopt_required=GNU
3206as_fn_append ac_header_list " getopt.h"
3207as_fn_append ac_func_list " gettimeofday"
3208as_fn_append ac_func_list " nanotime"
e700232f 3209as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3210as_fn_append ac_header_list " wchar.h"
3211as_fn_append ac_header_list " stdint.h"
3212as_fn_append ac_header_list " inttypes.h"
3213as_fn_append ac_func_list " lstat"
f199cab1
GM
3214as_fn_append ac_func_list " alarm"
3215as_fn_append ac_header_list " sys/select.h"
3216as_fn_append ac_func_list " pselect"
3217as_fn_append ac_func_list " pthread_sigmask"
3218as_fn_append ac_func_list " readlink"
f199cab1
GM
3219as_fn_append ac_func_list " strtoimax"
3220as_fn_append ac_func_list " strtoumax"
3221as_fn_append ac_func_list " symlink"
3222as_fn_append ac_header_list " sys/stat.h"
3223as_fn_append ac_func_list " localtime_r"
e700232f 3224as_fn_append ac_header_list " utime.h"
f199cab1
GM
3225as_fn_append ac_func_list " futimes"
3226as_fn_append ac_func_list " futimesat"
3227as_fn_append ac_func_list " futimens"
3228as_fn_append ac_func_list " utimensat"
3229as_fn_append ac_func_list " lutimes"
067d23c9
KY
3230# Check that the precious variables saved in the cache have kept the same
3231# value.
3232ac_cache_corrupted=false
3233for ac_var in $ac_precious_vars; do
3234 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3235 eval ac_new_set=\$ac_env_${ac_var}_set
3236 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3237 eval ac_new_val=\$ac_env_${ac_var}_value
3238 case $ac_old_set,$ac_new_set in
3239 set,)
3240 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3241$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3242 ac_cache_corrupted=: ;;
3243 ,set)
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3245$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3246 ac_cache_corrupted=: ;;
3247 ,);;
3248 *)
3249 if test "x$ac_old_val" != "x$ac_new_val"; then
3250 # differences in whitespace do not lead to failure.
3251 ac_old_val_w=`echo x $ac_old_val`
3252 ac_new_val_w=`echo x $ac_new_val`
3253 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3254 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3255$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3256 ac_cache_corrupted=:
3257 else
3258 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3259$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3260 eval $ac_var=\$ac_old_val
3261 fi
3262 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3263$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3264 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3265$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3266 fi;;
3267 esac
3268 # Pass precious variables to config.status.
3269 if test "$ac_new_set" = set; then
3270 case $ac_new_val in
3271 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3272 *) ac_arg=$ac_var=$ac_new_val ;;
3273 esac
3274 case " $ac_configure_args " in
3275 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3276 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3277 esac
3278 fi
3279done
3280if $ac_cache_corrupted; then
3281 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3283 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3284$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3285 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3286fi
3287## -------------------- ##
3288## Main body of script. ##
3289## -------------------- ##
3290
3291ac_ext=c
3292ac_cpp='$CPP $CPPFLAGS'
3293ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3294ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3295ac_compiler_gnu=$ac_cv_c_compiler_gnu
3296
3297
3298ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3299
3300
743c80a7 3301ac_aux_dir=
369e19fc 3302for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3303 for ac_t in install-sh install.sh shtool; do
3304 if test -f "$ac_dir/$ac_t"; then
3305 ac_aux_dir=$ac_dir
3306 ac_install_sh="$ac_aux_dir/$ac_t -c"
3307 break 2
3308 fi
3309 done
743c80a7
PE
3310done
3311if test -z "$ac_aux_dir"; then
a9bec17c 3312 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3313fi
067d23c9 3314
743c80a7
PE
3315# These three variables are undocumented and unsupported,
3316# and are intended to be withdrawn in a future Autoconf release.
3317# They can cause serious problems if a builder's source tree is in a directory
3318# whose full name contains unusual characters.
3319ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3320ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3321ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3322
067d23c9 3323
369e19fc
PE
3324am__api_version='1.11'
3325
743c80a7
PE
3326# Find a good install program. We prefer a C program (faster),
3327# so one script is as good as another. But avoid the broken or
3328# incompatible versions:
3329# SysV /etc/install, /usr/sbin/install
3330# SunOS /usr/etc/install
3331# IRIX /sbin/install
3332# AIX /bin/install
3333# AmigaOS /C/install, which installs bootblocks on floppy discs
3334# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3335# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3336# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3337# OS/2's system install, which has a completely different semantic
3338# ./install, which can be erroneously created by make from ./install.sh.
3339# Reject install programs that cannot install multiple files.
3340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3341$as_echo_n "checking for a BSD-compatible install... " >&6; }
3342if test -z "$INSTALL"; then
a9bec17c 3343if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3344 $as_echo_n "(cached) " >&6
3345else
3346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3347for as_dir in $PATH
3348do
3349 IFS=$as_save_IFS
3350 test -z "$as_dir" && as_dir=.
3351 # Account for people who put trailing slashes in PATH elements.
3352case $as_dir/ in #((
3353 ./ | .// | /[cC]/* | \
3354 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3355 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3356 /usr/ucb/* ) ;;
3357 *)
3358 # OSF1 and SCO ODT 3.0 have their own names for install.
3359 # Don't use installbsd from OSF since it installs stuff as root
3360 # by default.
3361 for ac_prog in ginstall scoinst install; do
3362 for ac_exec_ext in '' $ac_executable_extensions; do
3363 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3364 if test $ac_prog = install &&
3365 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3366 # AIX install. It has an incompatible calling convention.
3367 :
3368 elif test $ac_prog = install &&
3369 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3370 # program-specific install script used by HP pwplus--don't use.
3371 :
3372 else
3373 rm -rf conftest.one conftest.two conftest.dir
3374 echo one > conftest.one
3375 echo two > conftest.two
3376 mkdir conftest.dir
3377 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3378 test -s conftest.one && test -s conftest.two &&
3379 test -s conftest.dir/conftest.one &&
3380 test -s conftest.dir/conftest.two
3381 then
3382 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3383 break 3
3384 fi
3385 fi
3386 fi
3387 done
3388 done
3389 ;;
3390esac
067d23c9 3391
743c80a7
PE
3392 done
3393IFS=$as_save_IFS
067d23c9 3394
743c80a7 3395rm -rf conftest.one conftest.two conftest.dir
067d23c9 3396
067d23c9 3397fi
743c80a7
PE
3398 if test "${ac_cv_path_install+set}" = set; then
3399 INSTALL=$ac_cv_path_install
3400 else
3401 # As a last resort, use the slow shell script. Don't cache a
3402 # value for INSTALL within a source directory, because that will
3403 # break other packages using the cache if that directory is
3404 # removed, or if the value is a relative name.
3405 INSTALL=$ac_install_sh
3406 fi
067d23c9 3407fi
743c80a7
PE
3408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3409$as_echo "$INSTALL" >&6; }
067d23c9 3410
743c80a7
PE
3411# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3412# It thinks the first close brace ends the variable substitution.
3413test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3414
743c80a7 3415test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3416
743c80a7 3417test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3418
743c80a7
PE
3419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3420$as_echo_n "checking whether build environment is sane... " >&6; }
3421# Just in case
3422sleep 1
3423echo timestamp > conftest.file
3424# Reject unsafe characters in $srcdir or the absolute working directory
3425# name. Accept space and tab only in the latter.
3426am_lf='
3427'
3428case `pwd` in
3429 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3430 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3431esac
3432case $srcdir in
3433 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3434 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3435esac
067d23c9 3436
743c80a7
PE
3437# Do `set' in a subshell so we don't clobber the current shell's
3438# arguments. Must try -L first in case configure is actually a
3439# symlink; some systems play weird games with the mod time of symlinks
3440# (eg FreeBSD returns the mod time of the symlink's containing
3441# directory).
3442if (
3443 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3444 if test "$*" = "X"; then
3445 # -L didn't work.
3446 set X `ls -t "$srcdir/configure" conftest.file`
3447 fi
3448 rm -f conftest.file
3449 if test "$*" != "X $srcdir/configure conftest.file" \
3450 && test "$*" != "X conftest.file $srcdir/configure"; then
3451
3452 # If neither matched, then we have a broken ls. This can happen
3453 # if, for instance, CONFIG_SHELL is bash and it inherits a
3454 # broken ls alias from the environment. This has actually
3455 # happened. Such a system could not be considered "sane".
a9bec17c 3456 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3457alias in your environment" "$LINENO" 5
3458 fi
067d23c9 3459
743c80a7
PE
3460 test "$2" = conftest.file
3461 )
3462then
3463 # Ok.
3464 :
067d23c9 3465else
a9bec17c 3466 as_fn_error "newly created file is older than distributed files!
743c80a7 3467Check your system clock" "$LINENO" 5
067d23c9 3468fi
743c80a7
PE
3469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3470$as_echo "yes" >&6; }
3471test "$program_prefix" != NONE &&
3472 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3473# Use a double $ so make ignores it.
3474test "$program_suffix" != NONE &&
3475 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3476# Double any \ or $.
3477# By default was `s,x,x', remove it if useless.
3478ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3479program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3480
743c80a7
PE
3481# expand $ac_aux_dir to an absolute path
3482am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3483
743c80a7
PE
3484if test x"${MISSING+set}" != xset; then
3485 case $am_aux_dir in
3486 *\ * | *\ *)
3487 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3488 *)
3489 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3490 esac
067d23c9 3491fi
743c80a7
PE
3492# Use eval to expand $SHELL
3493if eval "$MISSING --run true"; then
3494 am_missing_run="$MISSING --run "
067d23c9 3495else
743c80a7
PE
3496 am_missing_run=
3497 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3498$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3499fi
3500
743c80a7
PE
3501if test x"${install_sh}" != xset; then
3502 case $am_aux_dir in
3503 *\ * | *\ *)
3504 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3505 *)
3506 install_sh="\${SHELL} $am_aux_dir/install-sh"
3507 esac
067d23c9
KY
3508fi
3509
743c80a7
PE
3510# Installed binaries are usually stripped using `strip' when the user
3511# run `make install-strip'. However `strip' might not be the right
3512# tool to use in cross-compilation environments, therefore Automake
3513# will honor the `STRIP' environment variable to overrule this program.
3514if test "$cross_compiling" != no; then
3515 if test -n "$ac_tool_prefix"; then
3516 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3517set dummy ${ac_tool_prefix}strip; ac_word=$2
3518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3519$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3520if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3521 $as_echo_n "(cached) " >&6
067d23c9 3522else
743c80a7
PE
3523 if test -n "$STRIP"; then
3524 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3525else
3526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3527for as_dir in $PATH
3528do
3529 IFS=$as_save_IFS
3530 test -z "$as_dir" && as_dir=.
3531 for ac_exec_ext in '' $ac_executable_extensions; do
3532 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3533 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3535 break 2
3536 fi
3537done
3538 done
3539IFS=$as_save_IFS
067d23c9
KY
3540
3541fi
067d23c9 3542fi
743c80a7
PE
3543STRIP=$ac_cv_prog_STRIP
3544if test -n "$STRIP"; then
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3546$as_echo "$STRIP" >&6; }
3547else
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3549$as_echo "no" >&6; }
067d23c9
KY
3550fi
3551
3552
067d23c9 3553fi
743c80a7
PE
3554if test -z "$ac_cv_prog_STRIP"; then
3555 ac_ct_STRIP=$STRIP
3556 # Extract the first word of "strip", so it can be a program name with args.
3557set dummy strip; ac_word=$2
3558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3559$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3560if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3561 $as_echo_n "(cached) " >&6
3562else
3563 if test -n "$ac_ct_STRIP"; then
3564 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3565else
3566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3567for as_dir in $PATH
3568do
3569 IFS=$as_save_IFS
3570 test -z "$as_dir" && as_dir=.
3571 for ac_exec_ext in '' $ac_executable_extensions; do
3572 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3573 ac_cv_prog_ac_ct_STRIP="strip"
3574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3575 break 2
3576 fi
3577done
3578 done
3579IFS=$as_save_IFS
3580
3581fi
3582fi
3583ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3584if test -n "$ac_ct_STRIP"; then
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3586$as_echo "$ac_ct_STRIP" >&6; }
3587else
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3589$as_echo "no" >&6; }
3590fi
3591
3592 if test "x$ac_ct_STRIP" = x; then
3593 STRIP=":"
3594 else
3595 case $cross_compiling:$ac_tool_warned in
3596yes:)
3597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3599ac_tool_warned=yes ;;
3600esac
3601 STRIP=$ac_ct_STRIP
3602 fi
3603else
3604 STRIP="$ac_cv_prog_STRIP"
3605fi
3606
3607fi
3608INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3609
3610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3611$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3612if test -z "$MKDIR_P"; then
a9bec17c 3613 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3614 $as_echo_n "(cached) " >&6
3615else
3616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3618do
3619 IFS=$as_save_IFS
3620 test -z "$as_dir" && as_dir=.
3621 for ac_prog in mkdir gmkdir; do
3622 for ac_exec_ext in '' $ac_executable_extensions; do
3623 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3624 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3625 'mkdir (GNU coreutils) '* | \
3626 'mkdir (coreutils) '* | \
3627 'mkdir (fileutils) '4.1*)
3628 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3629 break 3;;
3630 esac
3631 done
3632 done
3633 done
3634IFS=$as_save_IFS
3635
3636fi
3637
3638 test -d ./--version && rmdir ./--version
3639 if test "${ac_cv_path_mkdir+set}" = set; then
3640 MKDIR_P="$ac_cv_path_mkdir -p"
3641 else
3642 # As a last resort, use the slow shell script. Don't cache a
3643 # value for MKDIR_P within a source directory, because that will
3644 # break other packages using the cache if that directory is
3645 # removed, or if the value is a relative name.
3646 MKDIR_P="$ac_install_sh -d"
3647 fi
3648fi
3649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3650$as_echo "$MKDIR_P" >&6; }
3651
a451f14b 3652
743c80a7
PE
3653mkdir_p="$MKDIR_P"
3654case $mkdir_p in
3655 [\\/$]* | ?:[\\/]*) ;;
3656 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3657esac
3658
3659for ac_prog in gawk mawk nawk awk
3660do
3661 # Extract the first word of "$ac_prog", so it can be a program name with args.
3662set dummy $ac_prog; ac_word=$2
3663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3665if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3666 $as_echo_n "(cached) " >&6
3667else
3668 if test -n "$AWK"; then
3669 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3670else
3671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672for as_dir in $PATH
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
3676 for ac_exec_ext in '' $ac_executable_extensions; do
3677 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3678 ac_cv_prog_AWK="$ac_prog"
3679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3680 break 2
3681 fi
3682done
3683 done
3684IFS=$as_save_IFS
3685
3686fi
3687fi
3688AWK=$ac_cv_prog_AWK
3689if test -n "$AWK"; then
3690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3691$as_echo "$AWK" >&6; }
3692else
3693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3694$as_echo "no" >&6; }
3695fi
3696
3697
3698 test -n "$AWK" && break
3699done
3700
3701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3702$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3703set x ${MAKE-make}
3704ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3705if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3706 $as_echo_n "(cached) " >&6
3707else
3708 cat >conftest.make <<\_ACEOF
3709SHELL = /bin/sh
3710all:
3711 @echo '@@@%%%=$(MAKE)=@@@%%%'
3712_ACEOF
a9bec17c 3713# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3714case `${MAKE-make} -f conftest.make 2>/dev/null` in
3715 *@@@%%%=?*=@@@%%%*)
3716 eval ac_cv_prog_make_${ac_make}_set=yes;;
3717 *)
3718 eval ac_cv_prog_make_${ac_make}_set=no;;
3719esac
3720rm -f conftest.make
3721fi
3722if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3724$as_echo "yes" >&6; }
3725 SET_MAKE=
3726else
3727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3728$as_echo "no" >&6; }
3729 SET_MAKE="MAKE=${MAKE-make}"
3730fi
3731
3732rm -rf .tst 2>/dev/null
3733mkdir .tst 2>/dev/null
3734if test -d .tst; then
3735 am__leading_dot=.
3736else
3737 am__leading_dot=_
3738fi
3739rmdir .tst 2>/dev/null
3740
3741if test "`cd $srcdir && pwd`" != "`pwd`"; then
3742 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3743 # is not polluted with repeated "-I."
3744 am__isrc=' -I$(srcdir)'
3745 # test to see if srcdir already configured
3746 if test -f $srcdir/config.status; then
a9bec17c 3747 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3748 fi
3749fi
3750
3751# test whether we have cygpath
3752if test -z "$CYGPATH_W"; then
3753 if (cygpath --version) >/dev/null 2>/dev/null; then
3754 CYGPATH_W='cygpath -w'
3755 else
3756 CYGPATH_W=echo
3757 fi
3758fi
3759
3760
3761# Define the identity of the package.
3762 PACKAGE='emacs'
250c8ab9 3763 VERSION='24.2.50'
743c80a7
PE
3764
3765
3766cat >>confdefs.h <<_ACEOF
3767#define PACKAGE "$PACKAGE"
3768_ACEOF
3769
3770
3771cat >>confdefs.h <<_ACEOF
3772#define VERSION "$VERSION"
3773_ACEOF
3774
3775# Some tools Automake needs.
3776
3777ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3778
3779
3780AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3781
3782
3783AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3784
3785
3786AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3787
3788
3789MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3790
3791# We need awk for the "check" target. The system "awk" is bad on
3792# some platforms.
3793# Always define AMTAR for backward compatibility.
3794
3795AMTAR=${AMTAR-"${am_missing_run}tar"}
3796
3797am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3798
3799
3800
3801
3802
3803
3804
3805
3806lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 3807leimdir='${datadir}/emacs/${version}/leim'
397f7161 3808standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
3809locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3810'${datadir}/emacs/site-lisp'
397f7161 3811lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
3812etcdir='${datadir}/emacs/${version}/etc'
3813archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3814docdir='${datadir}/emacs/${version}/etc'
3815gamedir='${localstatedir}/games/emacs'
3816
ee77919d
GM
3817
3818# Check whether --with-all was given.
3819if test "${with_all+set}" = set; then :
3820 withval=$with_all; with_features=$withval
c0528ebe 3821else
ee77919d 3822 with_features=yes
c0528ebe
GM
3823fi
3824
3825
743c80a7
PE
3826
3827
3828
3829# Check whether --with-pop was given.
3830if test "${with_pop+set}" = set; then :
3831 withval=$with_pop;
3832else
ee77919d 3833 with_pop=$with_features
743c80a7
PE
3834fi
3835
3836if test "$with_pop" = yes; then
3837 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3838
3839fi
3840
3841
3842# Check whether --with-kerberos was given.
3843if test "${with_kerberos+set}" = set; then :
3844 withval=$with_kerberos;
3845else
3846 with_kerberos=no
3847fi
3848
3849if test "$with_kerberos" != no; then
3850 $as_echo "#define KERBEROS 1" >>confdefs.h
3851
3852fi
3853
3854
3855# Check whether --with-kerberos5 was given.
3856if test "${with_kerberos5+set}" = set; then :
3857 withval=$with_kerberos5;
3858else
3859 with_kerberos5=no
3860fi
3861
3862if test "${with_kerberos5}" != no; then
3863 if test "${with_kerberos}" = no; then
3864 with_kerberos=yes
3865 $as_echo "#define KERBEROS 1" >>confdefs.h
3866
3867 fi
3868
3869$as_echo "#define KERBEROS5 1" >>confdefs.h
3870
3871fi
3872
3873
3874# Check whether --with-hesiod was given.
3875if test "${with_hesiod+set}" = set; then :
3876 withval=$with_hesiod;
3877else
3878 with_hesiod=no
3879fi
3880
3881if test "$with_hesiod" != no; then
3882
3883$as_echo "#define HESIOD 1" >>confdefs.h
3884
3885fi
3886
3887
3888# Check whether --with-mmdf was given.
3889if test "${with_mmdf+set}" = set; then :
3890 withval=$with_mmdf;
3891else
3892 with_mmdf=no
3893fi
3894
3895if test "$with_mmdf" != no; then
3896
3897$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
3898
3899fi
3900
3901
3902# Check whether --with-mail-unlink was given.
3903if test "${with_mail_unlink+set}" = set; then :
3904 withval=$with_mail_unlink;
3905else
3906 with_mail_unlink=no
3907fi
3908
3909if test "$with_mail_unlink" != no; then
3910
3911$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
3912
3913fi
3914
3915
3916# Check whether --with-mailhost was given.
3917if test "${with_mailhost+set}" = set; then :
3918 withval=$with_mailhost;
3919cat >>confdefs.h <<_ACEOF
3920#define MAILHOST "$withval"
3921_ACEOF
3922
3923fi
3924
3925
3926
067d23c9
KY
3927# Check whether --with-sound was given.
3928if test "${with_sound+set}" = set; then :
3929 withval=$with_sound;
3930else
ee77919d 3931 with_sound=$with_features
067d23c9
KY
3932fi
3933
3934
3935
3936# Check whether --with-sync-input was given.
3937if test "${with_sync_input+set}" = set; then :
3938 withval=$with_sync_input;
3939else
ee77919d 3940 with_sync_input=$with_features
067d23c9
KY
3941fi
3942
3943if test "$with_sync_input" = yes; then
3944
3945$as_echo "#define SYNC_INPUT 1" >>confdefs.h
3946
3947fi
3948
3949
3950# Check whether --with-x-toolkit was given.
3951if test "${with_x_toolkit+set}" = set; then :
3952 withval=$with_x_toolkit; case "${withval}" in
3953 y | ye | yes ) val=gtk ;;
3954 n | no ) val=no ;;
3955 l | lu | luc | luci | lucid ) val=lucid ;;
3956 a | at | ath | athe | athen | athena ) val=athena ;;
3957 m | mo | mot | moti | motif ) val=motif ;;
3958 g | gt | gtk ) val=gtk ;;
4fa92495 3959 gtk2 ) val=gtk2 ;;
067d23c9
KY
3960 gtk3 ) val=gtk3 ;;
3961 * )
a9bec17c 3962as_fn_error "\`--with-x-toolkit=$withval' is invalid;
4fa92495
GM
3963this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk',
3964\`gtk2' or \`gtk3'. \`yes' and \`gtk' are synonyms.
3965\`athena' and \`lucid' are synonyms." "$LINENO" 5
067d23c9
KY
3966 ;;
3967 esac
3968 with_x_toolkit=$val
3969
3970fi
3971
3972
3973
0442dc7f
GM
3974# Check whether --with-wide-int was given.
3975if test "${with_wide_int+set}" = set; then :
3976 withval=$with_wide_int;
3977else
3978 with_wide_int=no
3979fi
3980
3981if test "$with_wide_int" = yes; then
3982
3983$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
3984
3985fi
3986
3987
067d23c9
KY
3988# Check whether --with-xpm was given.
3989if test "${with_xpm+set}" = set; then :
3990 withval=$with_xpm;
3991else
ee77919d 3992 with_xpm=$with_features
067d23c9
KY
3993fi
3994
3995
3996# Check whether --with-jpeg was given.
3997if test "${with_jpeg+set}" = set; then :
3998 withval=$with_jpeg;
3999else
ee77919d 4000 with_jpeg=$with_features
067d23c9
KY
4001fi
4002
4003
4004# Check whether --with-tiff was given.
4005if test "${with_tiff+set}" = set; then :
4006 withval=$with_tiff;
4007else
ee77919d 4008 with_tiff=$with_features
067d23c9
KY
4009fi
4010
4011
4012# Check whether --with-gif was given.
4013if test "${with_gif+set}" = set; then :
4014 withval=$with_gif;
4015else
ee77919d 4016 with_gif=$with_features
067d23c9
KY
4017fi
4018
4019
4020# Check whether --with-png was given.
4021if test "${with_png+set}" = set; then :
4022 withval=$with_png;
4023else
ee77919d 4024 with_png=$with_features
067d23c9
KY
4025fi
4026
4027
4028# Check whether --with-rsvg was given.
4029if test "${with_rsvg+set}" = set; then :
4030 withval=$with_rsvg;
4031else
ee77919d 4032 with_rsvg=$with_features
067d23c9
KY
4033fi
4034
4035
4036# Check whether --with-xml2 was given.
4037if test "${with_xml2+set}" = set; then :
4038 withval=$with_xml2;
4039else
ee77919d 4040 with_xml2=$with_features
067d23c9
KY
4041fi
4042
4043
4044# Check whether --with-imagemagick was given.
4045if test "${with_imagemagick+set}" = set; then :
4046 withval=$with_imagemagick;
4047else
ee77919d 4048 with_imagemagick=$with_features
067d23c9
KY
4049fi
4050
4051
4052
4053# Check whether --with-xft was given.
4054if test "${with_xft+set}" = set; then :
4055 withval=$with_xft;
4056else
ee77919d 4057 with_xft=$with_features
067d23c9
KY
4058fi
4059
4060
4061# Check whether --with-libotf was given.
4062if test "${with_libotf+set}" = set; then :
4063 withval=$with_libotf;
4064else
ee77919d 4065 with_libotf=$with_features
067d23c9
KY
4066fi
4067
4068
4069# Check whether --with-m17n-flt was given.
4070if test "${with_m17n_flt+set}" = set; then :
4071 withval=$with_m17n_flt;
4072else
ee77919d 4073 with_m17n_flt=$with_features
067d23c9
KY
4074fi
4075
4076
4077
4078# Check whether --with-toolkit-scroll-bars was given.
4079if test "${with_toolkit_scroll_bars+set}" = set; then :
4080 withval=$with_toolkit_scroll_bars;
4081else
ee77919d 4082 with_toolkit_scroll_bars=$with_features
067d23c9
KY
4083fi
4084
4085
4086# Check whether --with-xaw3d was given.
4087if test "${with_xaw3d+set}" = set; then :
4088 withval=$with_xaw3d;
4089else
ee77919d 4090 with_xaw3d=$with_features
067d23c9
KY
4091fi
4092
4093
4094# Check whether --with-xim was given.
4095if test "${with_xim+set}" = set; then :
4096 withval=$with_xim;
4097else
ee77919d 4098 with_xim=$with_features
067d23c9
KY
4099fi
4100
4101
4102# Check whether --with-ns was given.
4103if test "${with_ns+set}" = set; then :
4104 withval=$with_ns;
4105else
4106 with_ns=no
4107fi
4108
4109
4110
4111# Check whether --with-gpm was given.
4112if test "${with_gpm+set}" = set; then :
4113 withval=$with_gpm;
4114else
ee77919d 4115 with_gpm=$with_features
067d23c9
KY
4116fi
4117
4118
4119# Check whether --with-dbus was given.
4120if test "${with_dbus+set}" = set; then :
4121 withval=$with_dbus;
4122else
ee77919d 4123 with_dbus=$with_features
067d23c9
KY
4124fi
4125
4126
4127# Check whether --with-gconf was given.
4128if test "${with_gconf+set}" = set; then :
4129 withval=$with_gconf;
4130else
ee77919d 4131 with_gconf=$with_features
067d23c9
KY
4132fi
4133
4134
f527bd02
GM
4135# Check whether --with-gsettings was given.
4136if test "${with_gsettings+set}" = set; then :
4137 withval=$with_gsettings;
4138else
ee77919d 4139 with_gsettings=$with_features
f527bd02
GM
4140fi
4141
4142
067d23c9
KY
4143# Check whether --with-selinux was given.
4144if test "${with_selinux+set}" = set; then :
4145 withval=$with_selinux;
4146else
ee77919d 4147 with_selinux=$with_features
067d23c9
KY
4148fi
4149
4150
4151# Check whether --with-gnutls was given.
4152if test "${with_gnutls+set}" = set; then :
4153 withval=$with_gnutls;
4154else
ee77919d 4155 with_gnutls=$with_features
067d23c9
KY
4156fi
4157
4158
4159## For the times when you want to build Emacs but don't have
4160## a suitable makeinfo, and can live without the manuals.
4161
4162# Check whether --with-makeinfo was given.
4163if test "${with_makeinfo+set}" = set; then :
4164 withval=$with_makeinfo;
4165else
ee77919d 4166 with_makeinfo=$with_features
067d23c9
KY
4167fi
4168
4169
c3a461a5
GM
4170## Makefile.in needs the cache file name.
4171
4172
067d23c9
KY
4173## This is an option because I do not know if all info/man support
4174## compressed files, nor how to test if they do so.
4175
4176# Check whether --with-compress-info was given.
4177if test "${with_compress_info+set}" = set; then :
4178 withval=$with_compress_info;
4179else
ee77919d 4180 with_compress_info=$with_features
067d23c9
KY
4181fi
4182
4183if test $with_compress_info = yes; then
4184 GZIP_INFO=yes
4185else
4186 GZIP_INFO=
4187fi
4188
4189
4190
4191# Check whether --with-pkg-config-prog was given.
4192if test "${with_pkg_config_prog+set}" = set; then :
4193 withval=$with_pkg_config_prog;
4194fi
4195
4196if test "X${with_pkg_config_prog}" != X; then
4197 if test "${with_pkg_config_prog}" != yes; then
4198 PKG_CONFIG="${with_pkg_config_prog}"
4199 fi
4200fi
4201
4202CRT_DIR=
4203
4204# Check whether --with-crt-dir was given.
4205if test "${with_crt_dir+set}" = set; then :
4206 withval=$with_crt_dir;
4207fi
4208
4209CRT_DIR="${with_crt_dir}"
4210
4211
4fc5868a
UM
4212# Check whether --with-gameuser was given.
4213if test "${with_gameuser+set}" = set; then :
4214 withval=$with_gameuser;
4215fi
4216
4217test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4218 && gameuser="${with_gameuser}"
4219test "X$gameuser" = X && gameuser=games
4220
4221
067d23c9
KY
4222# Check whether --with-gnustep-conf was given.
4223if test "${with_gnustep_conf+set}" = set; then :
4224 withval=$with_gnustep_conf;
4225fi
4226
4227test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4228 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4229test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4230 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4231
4232# Check whether --enable-ns-self-contained was given.
4233if test "${enable_ns_self_contained+set}" = set; then :
4234 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4235else
4236 EN_NS_SELF_CONTAINED=yes
4237fi
4238
4239
067d23c9
KY
4240# Check whether --enable-locallisppath was given.
4241if test "${enable_locallisppath+set}" = set; then :
4242 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4243 locallisppath=
4244elif test "${enableval}" != "yes"; then
4245 locallisppath=${enableval}
4246fi
4247fi
4248
4249
4250# Check whether --enable-checking was given.
4251if test "${enable_checking+set}" = set; then :
4252 enableval=$enable_checking; ac_checking_flags="${enableval}"
4253fi
4254
4255IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4256for check in $ac_checking_flags
4257do
4258 case $check in
4259 # these set all the flags to specific states
4260 yes) ac_enable_checking=1 ;;
4261 no) ac_enable_checking= ;
4262 ac_gc_check_stringbytes= ;
4263 ac_gc_check_string_overrun= ;
4264 ac_gc_check_string_free_list= ;
4265 ac_xmalloc_overrun= ;
7ee3791f 4266 ac_gc_check_cons_list= ;
e4d35030 4267 ac_glyphs_debug= ;;
067d23c9
KY
4268 all) ac_enable_checking=1 ;
4269 ac_gc_check_stringbytes=1 ;
4270 ac_gc_check_string_overrun=1 ;
4271 ac_gc_check_string_free_list=1 ;
4272 ac_xmalloc_overrun=1 ;
7ee3791f 4273 ac_gc_check_cons_list=1 ;
e4d35030 4274 ac_glyphs_debug=1 ;;
067d23c9
KY
4275 # these enable particular checks
4276 stringbytes) ac_gc_check_stringbytes=1 ;;
4277 stringoverrun) ac_gc_check_string_overrun=1 ;;
4278 stringfreelist) ac_gc_check_string_free_list=1 ;;
4279 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4280 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4281 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4282 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4283 esac
4284done
4285IFS="$ac_save_IFS"
4286
4287if test x$ac_enable_checking != x ; then
4288
4289$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4290
4291fi
4292if test x$ac_gc_check_stringbytes != x ; then
4293
4294$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4295
4296fi
4fda9c95 4297if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4298
4299$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4300
4301fi
4302if test x$ac_gc_check_string_free_list != x ; then
4303
4304$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4305
4306fi
4307if test x$ac_xmalloc_overrun != x ; then
4308
4309$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4310
4311fi
4312if test x$ac_gc_check_cons_list != x ; then
4313
4314$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4315
7ee3791f 4316fi
e4d35030 4317if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4318
4319$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4320
067d23c9
KY
4321fi
4322
afd07e01
GM
4323# Check whether --enable-check-lisp-object-type was given.
4324if test "${enable_check_lisp_object_type+set}" = set; then :
4325 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4326
afd07e01 4327$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4328
4329fi
4330fi
4331
4332
4333
4334# Check whether --enable-profiling was given.
4335if test "${enable_profiling+set}" = set; then :
4336 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4337fi
4338
4339if test x$ac_enable_profiling != x ; then
4340 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4341else
4342 PROFILING_CFLAGS=
4343fi
4344
4345
4346# Check whether --enable-autodepend was given.
4347if test "${enable_autodepend+set}" = set; then :
4348 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4349else
4350 ac_enable_autodepend=yes
4351fi
4352
4353
4354#### Make srcdir absolute, if it isn't already. It's important to
4355#### avoid running the path through pwd unnecessarily, since pwd can
4356#### give you automounter prefixes, which can go away. We do all this
4357#### so Emacs can find its files when run uninstalled.
4358## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4359unset CDPATH
4360case "${srcdir}" in
4361 /* ) ;;
4362 . )
4363 ## We may be able to use the $PWD environment variable to make this
4364 ## absolute. But sometimes PWD is inaccurate.
4365 ## Note: we used to use ${PWD} at the end instead of `pwd`,
4366 ## but that tested only for a well-formed and valid PWD,
4367 ## it did not object when PWD was well-formed and valid but just wrong.
4368 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
4369 then
4370 srcdir="$PWD"
4371 else
4372 srcdir="`(cd ${srcdir}; pwd)`"
4373 fi
4374 ;;
4375 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
4376esac
4377
067d23c9
KY
4378### Canonicalize the configuration name.
4379
067d23c9
KY
4380# Make sure we can run config.sub.
4381$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4382 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4383
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4385$as_echo_n "checking build system type... " >&6; }
a9bec17c 4386if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4387 $as_echo_n "(cached) " >&6
4388else
4389 ac_build_alias=$build_alias
4390test "x$ac_build_alias" = x &&
4391 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4392test "x$ac_build_alias" = x &&
a9bec17c 4393 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4394ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4395 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4396
4397fi
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4399$as_echo "$ac_cv_build" >&6; }
4400case $ac_cv_build in
4401*-*-*) ;;
a9bec17c 4402*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4403esac
4404build=$ac_cv_build
4405ac_save_IFS=$IFS; IFS='-'
4406set x $ac_cv_build
4407shift
4408build_cpu=$1
4409build_vendor=$2
4410shift; shift
4411# Remember, the first character of IFS is used to create $*,
4412# except with old shells:
4413build_os=$*
4414IFS=$ac_save_IFS
4415case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4416
4417
4418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4419$as_echo_n "checking host system type... " >&6; }
a9bec17c 4420if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4421 $as_echo_n "(cached) " >&6
4422else
4423 if test "x$host_alias" = x; then
4424 ac_cv_host=$ac_cv_build
4425else
4426 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4427 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4428fi
4429
4430fi
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4432$as_echo "$ac_cv_host" >&6; }
4433case $ac_cv_host in
4434*-*-*) ;;
a9bec17c 4435*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4436esac
4437host=$ac_cv_host
4438ac_save_IFS=$IFS; IFS='-'
4439set x $ac_cv_host
4440shift
4441host_cpu=$1
4442host_vendor=$2
4443shift; shift
4444# Remember, the first character of IFS is used to create $*,
4445# except with old shells:
4446host_os=$*
4447IFS=$ac_save_IFS
4448case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4449
4450
4451canonical=$host
4452configuration=${host_alias-${build_alias-$host}}
4453
4454
4455
4456### If you add support for a new configuration, add code to this
4457### switch statement to recognize your configuration name and select
42bbbe8b 4458### the appropriate operating system file.
067d23c9 4459
42bbbe8b 4460### You would hope that you could choose an s/*.h
067d23c9 4461### file based on the operating system portion. However, it turns out
42bbbe8b 4462### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4463### So we basically have to have a special case for each
4464### configuration name.
4465###
4466### As far as handling version numbers on operating systems is
4467### concerned, make sure things will fail in a fixable way. If
4468### /etc/MACHINES doesn't say anything about version numbers, be
4469### prepared to handle anything reasonably. If version numbers
4470### matter, be sure /etc/MACHINES says something about it.
4471
42bbbe8b 4472opsys='' unported=no
067d23c9
KY
4473case "${canonical}" in
4474
9b6e5515
GM
4475 ## GNU/Linux and similar ports
4476 *-*-linux* )
d6a003a8 4477 opsys=gnu-linux
d6a003a8
AS
4478 ;;
4479
067d23c9
KY
4480 ## FreeBSD ports
4481 *-*-freebsd* )
4482 opsys=freebsd
067d23c9
KY
4483 ;;
4484
4485 ## FreeBSD kernel + glibc based userland
4486 *-*-kfreebsd*gnu* )
4487 opsys=gnu-kfreebsd
067d23c9
KY
4488 ;;
4489
4490 ## NetBSD ports
4491 *-*-netbsd* )
4492 opsys=netbsd
067d23c9
KY
4493 ;;
4494
4495 ## OpenBSD ports
4496 *-*-openbsd* )
4497 opsys=openbsd
067d23c9
KY
4498 ;;
4499
067d23c9
KY
4500 ## Apple Darwin / Mac OS X
4501 *-apple-darwin* )
4502 case "${canonical}" in
42bbbe8b
GM
4503 i[3456]86-* ) ;;
4504 powerpc-* ) ;;
4505 x86_64-* ) ;;
067d23c9
KY
4506 * ) unported=yes ;;
4507 esac
4508 opsys=darwin
adf4198e
GM
4509 ## Use fink packages if available.
4510 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4511## if test -d /sw/include && test -d /sw/lib; then
4512## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4513## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4514## fi
067d23c9
KY
4515 ;;
4516
4517 ## HP 9000 series 700 and 800, running HP/UX
4518 hppa*-hp-hpux10.2* )
d6a003a8 4519 opsys=hpux10-20
067d23c9
KY
4520 ;;
4521 hppa*-hp-hpux1[1-9]* )
d6a003a8 4522 opsys=hpux11
067d23c9
KY
4523 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4524 ;;
4525
067d23c9 4526 ## IBM machines
067d23c9 4527 rs6000-ibm-aix4.[23]* )
42bbbe8b 4528 opsys=aix4-2
067d23c9
KY
4529 ;;
4530 powerpc-ibm-aix4.[23]* )
42bbbe8b 4531 opsys=aix4-2
067d23c9
KY
4532 ;;
4533 rs6000-ibm-aix[56]* )
42bbbe8b 4534 opsys=aix4-2
067d23c9
KY
4535 ;;
4536 powerpc-ibm-aix[56]* )
42bbbe8b 4537 opsys=aix4-2
067d23c9
KY
4538 ;;
4539
067d23c9
KY
4540 ## Silicon Graphics machines
4541 ## Iris 4D
4542 mips-sgi-irix6.5 )
fd44db7f 4543 opsys=irix6-5
067d23c9
KY
4544 # Without defining _LANGUAGE_C, things get masked out in the headers
4545 # so that, for instance, grepping for `free' in stdlib.h fails and
4546 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4547 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4548 ;;
4549
4550 ## Suns
067d23c9
KY
4551 *-sun-solaris* \
4552 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4553 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4554 case "${canonical}" in
42bbbe8b
GM
4555 i[3456]86-*-* ) ;;
4556 amd64-*-*|x86_64-*-*) ;;
4557 sparc* ) ;;
067d23c9
KY
4558 * ) unported=yes ;;
4559 esac
4560 case "${canonical}" in
4561 *-sunos5.6* | *-solaris2.6* )
4562 opsys=sol2-6
067d23c9
KY
4563 RANLIB="ar -ts"
4564 ;;
4565 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4566 opsys=sol2-6
4567 emacs_check_sunpro_c=yes
067d23c9
KY
4568 ;;
4569 *-sunos5* | *-solaris* )
4570 opsys=sol2-10
4571 emacs_check_sunpro_c=yes
067d23c9
KY
4572 ;;
4573 esac
4574 ## Watch out for a compiler that we know will not work.
4575 case "${canonical}" in
4576 *-solaris* | *-sunos5* )
4577 if [ "x$CC" = x/usr/ucb/cc ]; then
4578 ## /usr/ucb/cc doesn't work;
4579 ## we should find some other compiler that does work.
4580 unset CC
4581 fi
4582 ;;
4583 *) ;;
4584 esac
4585 ;;
4586
067d23c9
KY
4587 ## Intel 386 machines where we don't care about the manufacturer.
4588 i[3456]86-*-* )
067d23c9
KY
4589 case "${canonical}" in
4590 *-cygwin ) opsys=cygwin ;;
5ec54608
GM
4591 *-darwin* ) opsys=darwin ;;
4592 *-sysv4.2uw* ) opsys=unixware ;;
4593 *-sysv5uw* ) opsys=unixware ;;
4594 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4595 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4596 esac
4597 ;;
4598
067d23c9
KY
4599 * )
4600 unported=yes
4601 ;;
4602esac
4603
4604### If the code above didn't choose an operating system, just choose
4605### an operating system based on the configuration name. You really
4606### only want to use this when you have no idea what the right
4607### operating system is; if you know what operating systems a machine
4608### runs, it's cleaner to make it explicit in the case statement
4609### above.
4610if test x"${opsys}" = x; then
4611 case "${canonical}" in
4612 *-gnu* ) opsys=gnu ;;
4613 * )
4614 unported=yes
4615 ;;
4616 esac
4617fi
4618
4619
4620
4621if test $unported = yes; then
a9bec17c 4622 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4623Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4624fi
4625
067d23c9
KY
4626
4627#### Choose a compiler.
067d23c9
KY
4628
4629ac_ext=c
4630ac_cpp='$CPP $CPPFLAGS'
4631ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4632ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4633ac_compiler_gnu=$ac_cv_c_compiler_gnu
4634if test -n "$ac_tool_prefix"; then
4635 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4636set dummy ${ac_tool_prefix}gcc; ac_word=$2
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4639if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4640 $as_echo_n "(cached) " >&6
4641else
4642 if test -n "$CC"; then
4643 ac_cv_prog_CC="$CC" # Let the user override the test.
4644else
4645as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4646for as_dir in $PATH
4647do
4648 IFS=$as_save_IFS
4649 test -z "$as_dir" && as_dir=.
4650 for ac_exec_ext in '' $ac_executable_extensions; do
4651 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4652 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4653 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4654 break 2
4655 fi
4656done
4657 done
4658IFS=$as_save_IFS
4659
4660fi
4661fi
4662CC=$ac_cv_prog_CC
4663if test -n "$CC"; then
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4665$as_echo "$CC" >&6; }
4666else
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4668$as_echo "no" >&6; }
4669fi
4670
4671
4672fi
4673if test -z "$ac_cv_prog_CC"; then
4674 ac_ct_CC=$CC
4675 # Extract the first word of "gcc", so it can be a program name with args.
4676set dummy gcc; ac_word=$2
4677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4678$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4679if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4680 $as_echo_n "(cached) " >&6
4681else
4682 if test -n "$ac_ct_CC"; then
4683 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4684else
4685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4686for as_dir in $PATH
4687do
4688 IFS=$as_save_IFS
4689 test -z "$as_dir" && as_dir=.
4690 for ac_exec_ext in '' $ac_executable_extensions; do
4691 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4692 ac_cv_prog_ac_ct_CC="gcc"
4693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4694 break 2
4695 fi
4696done
4697 done
4698IFS=$as_save_IFS
4699
4700fi
4701fi
4702ac_ct_CC=$ac_cv_prog_ac_ct_CC
4703if test -n "$ac_ct_CC"; then
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4705$as_echo "$ac_ct_CC" >&6; }
4706else
4707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708$as_echo "no" >&6; }
4709fi
4710
4711 if test "x$ac_ct_CC" = x; then
4712 CC=""
4713 else
4714 case $cross_compiling:$ac_tool_warned in
4715yes:)
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4718ac_tool_warned=yes ;;
4719esac
4720 CC=$ac_ct_CC
4721 fi
4722else
4723 CC="$ac_cv_prog_CC"
4724fi
4725
4726if test -z "$CC"; then
4727 if test -n "$ac_tool_prefix"; then
4728 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4729set dummy ${ac_tool_prefix}cc; ac_word=$2
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4731$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4732if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4733 $as_echo_n "(cached) " >&6
4734else
4735 if test -n "$CC"; then
4736 ac_cv_prog_CC="$CC" # Let the user override the test.
4737else
4738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
4743 for ac_exec_ext in '' $ac_executable_extensions; do
4744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4745 ac_cv_prog_CC="${ac_tool_prefix}cc"
4746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747 break 2
4748 fi
4749done
4750 done
4751IFS=$as_save_IFS
4752
4753fi
4754fi
4755CC=$ac_cv_prog_CC
4756if test -n "$CC"; then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4758$as_echo "$CC" >&6; }
4759else
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
4762fi
4763
4764
4765 fi
4766fi
4767if test -z "$CC"; then
4768 # Extract the first word of "cc", so it can be a program name with args.
4769set dummy cc; ac_word=$2
4770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4771$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4772if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4773 $as_echo_n "(cached) " >&6
4774else
4775 if test -n "$CC"; then
4776 ac_cv_prog_CC="$CC" # Let the user override the test.
4777else
4778 ac_prog_rejected=no
4779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in $PATH
4781do
4782 IFS=$as_save_IFS
4783 test -z "$as_dir" && as_dir=.
4784 for ac_exec_ext in '' $ac_executable_extensions; do
4785 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4786 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4787 ac_prog_rejected=yes
4788 continue
4789 fi
4790 ac_cv_prog_CC="cc"
4791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792 break 2
4793 fi
4794done
4795 done
4796IFS=$as_save_IFS
4797
4798if test $ac_prog_rejected = yes; then
4799 # We found a bogon in the path, so make sure we never use it.
4800 set dummy $ac_cv_prog_CC
4801 shift
4802 if test $# != 0; then
4803 # We chose a different compiler from the bogus one.
4804 # However, it has the same basename, so the bogon will be chosen
4805 # first if we set CC to just the basename; use the full file name.
4806 shift
4807 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4808 fi
4809fi
4810fi
4811fi
4812CC=$ac_cv_prog_CC
4813if test -n "$CC"; then
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4815$as_echo "$CC" >&6; }
4816else
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4818$as_echo "no" >&6; }
4819fi
4820
4821
4822fi
4823if test -z "$CC"; then
4824 if test -n "$ac_tool_prefix"; then
4825 for ac_prog in cl.exe
4826 do
4827 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4828set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4830$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4831if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4832 $as_echo_n "(cached) " >&6
4833else
4834 if test -n "$CC"; then
4835 ac_cv_prog_CC="$CC" # Let the user override the test.
4836else
4837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4838for as_dir in $PATH
4839do
4840 IFS=$as_save_IFS
4841 test -z "$as_dir" && as_dir=.
4842 for ac_exec_ext in '' $ac_executable_extensions; do
4843 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4844 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4846 break 2
4847 fi
4848done
4849 done
4850IFS=$as_save_IFS
4851
4852fi
4853fi
4854CC=$ac_cv_prog_CC
4855if test -n "$CC"; then
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4857$as_echo "$CC" >&6; }
4858else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860$as_echo "no" >&6; }
4861fi
4862
4863
4864 test -n "$CC" && break
4865 done
4866fi
4867if test -z "$CC"; then
4868 ac_ct_CC=$CC
4869 for ac_prog in cl.exe
4870do
4871 # Extract the first word of "$ac_prog", so it can be a program name with args.
4872set dummy $ac_prog; ac_word=$2
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4875if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4876 $as_echo_n "(cached) " >&6
4877else
4878 if test -n "$ac_ct_CC"; then
4879 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4880else
4881as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4882for as_dir in $PATH
4883do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
4886 for ac_exec_ext in '' $ac_executable_extensions; do
4887 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4888 ac_cv_prog_ac_ct_CC="$ac_prog"
4889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4890 break 2
4891 fi
4892done
4893 done
4894IFS=$as_save_IFS
4895
4896fi
4897fi
4898ac_ct_CC=$ac_cv_prog_ac_ct_CC
4899if test -n "$ac_ct_CC"; then
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4901$as_echo "$ac_ct_CC" >&6; }
4902else
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4904$as_echo "no" >&6; }
4905fi
4906
4907
4908 test -n "$ac_ct_CC" && break
4909done
4910
4911 if test "x$ac_ct_CC" = x; then
4912 CC=""
4913 else
4914 case $cross_compiling:$ac_tool_warned in
4915yes:)
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4917$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4918ac_tool_warned=yes ;;
4919esac
4920 CC=$ac_ct_CC
4921 fi
4922fi
4923
4924fi
4925
4926
4927test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
4929as_fn_error "no acceptable C compiler found in \$PATH
4930See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
4931
4932# Provide some information about the compiler.
4933$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4934set X $ac_compile
4935ac_compiler=$2
4936for ac_option in --version -v -V -qversion; do
4937 { { ac_try="$ac_compiler $ac_option >&5"
4938case "(($ac_try" in
4939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4940 *) ac_try_echo=$ac_try;;
4941esac
4942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4943$as_echo "$ac_try_echo"; } >&5
4944 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4945 ac_status=$?
4946 if test -s conftest.err; then
4947 sed '10a\
4948... rest of stderr output deleted ...
4949 10q' conftest.err >conftest.er1
4950 cat conftest.er1 >&5
4951 fi
4952 rm -f conftest.er1 conftest.err
4953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4954 test $ac_status = 0; }
4955done
4956
4957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4958/* end confdefs.h. */
4959
4960int
4961main ()
4962{
4963
4964 ;
4965 return 0;
4966}
4967_ACEOF
4968ac_clean_files_save=$ac_clean_files
4969ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4970# Try to create an executable without -o first, disregard a.out.
4971# It will help us diagnose broken compilers, and finding out an intuition
4972# of exeext.
4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4974$as_echo_n "checking whether the C compiler works... " >&6; }
4975ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4976
4977# The possible output files:
4978ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4979
4980ac_rmfiles=
4981for ac_file in $ac_files
4982do
4983 case $ac_file in
4984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4985 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4986 esac
4987done
4988rm -f $ac_rmfiles
4989
4990if { { ac_try="$ac_link_default"
4991case "(($ac_try" in
4992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4993 *) ac_try_echo=$ac_try;;
4994esac
4995eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4996$as_echo "$ac_try_echo"; } >&5
4997 (eval "$ac_link_default") 2>&5
4998 ac_status=$?
4999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5000 test $ac_status = 0; }; then :
5001 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5002# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5003# in a Makefile. We should not override ac_cv_exeext if it was cached,
5004# so that the user can short-circuit this test for compilers unknown to
5005# Autoconf.
5006for ac_file in $ac_files ''
5007do
5008 test -f "$ac_file" || continue
5009 case $ac_file in
5010 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5011 ;;
5012 [ab].out )
5013 # We found the default executable, but exeext='' is most
5014 # certainly right.
5015 break;;
5016 *.* )
5017 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5018 then :; else
5019 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5020 fi
5021 # We set ac_cv_exeext here because the later test for it is not
5022 # safe: cross compilers may not add the suffix if given an `-o'
5023 # argument, so we may need to know it at that point already.
5024 # Even if this section looks crufty: it has the advantage of
5025 # actually working.
5026 break;;
5027 * )
5028 break;;
5029 esac
5030done
5031test "$ac_cv_exeext" = no && ac_cv_exeext=
5032
5033else
5034 ac_file=''
5035fi
5036if test -z "$ac_file"; then :
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038$as_echo "no" >&6; }
5039$as_echo "$as_me: failed program was:" >&5
5040sed 's/^/| /' conftest.$ac_ext >&5
5041
5042{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5044{ as_fn_set_status 77
5045as_fn_error "C compiler cannot create executables
5046See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5047else
5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5049$as_echo "yes" >&6; }
5050fi
5051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5052$as_echo_n "checking for C compiler default output file name... " >&6; }
5053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5054$as_echo "$ac_file" >&6; }
5055ac_exeext=$ac_cv_exeext
5056
5057rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5058ac_clean_files=$ac_clean_files_save
5059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5060$as_echo_n "checking for suffix of executables... " >&6; }
5061if { { ac_try="$ac_link"
5062case "(($ac_try" in
5063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5064 *) ac_try_echo=$ac_try;;
5065esac
5066eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5067$as_echo "$ac_try_echo"; } >&5
5068 (eval "$ac_link") 2>&5
5069 ac_status=$?
5070 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5071 test $ac_status = 0; }; then :
5072 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5073# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5074# work properly (i.e., refer to `conftest.exe'), while it won't with
5075# `rm'.
5076for ac_file in conftest.exe conftest conftest.*; do
5077 test -f "$ac_file" || continue
5078 case $ac_file in
5079 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5080 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5081 break;;
5082 * ) break;;
5083 esac
5084done
5085else
5086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5088as_fn_error "cannot compute suffix of executables: cannot compile and link
5089See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5090fi
5091rm -f conftest conftest$ac_cv_exeext
5092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5093$as_echo "$ac_cv_exeext" >&6; }
5094
5095rm -f conftest.$ac_ext
5096EXEEXT=$ac_cv_exeext
5097ac_exeext=$EXEEXT
5098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5099/* end confdefs.h. */
5100#include <stdio.h>
5101int
5102main ()
5103{
5104FILE *f = fopen ("conftest.out", "w");
5105 return ferror (f) || fclose (f) != 0;
5106
5107 ;
5108 return 0;
5109}
5110_ACEOF
5111ac_clean_files="$ac_clean_files conftest.out"
5112# Check that the compiler produces executables we can run. If not, either
5113# the compiler is broken, or we cross compile.
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5115$as_echo_n "checking whether we are cross compiling... " >&6; }
5116if test "$cross_compiling" != yes; then
5117 { { ac_try="$ac_link"
5118case "(($ac_try" in
5119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5120 *) ac_try_echo=$ac_try;;
5121esac
5122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5123$as_echo "$ac_try_echo"; } >&5
5124 (eval "$ac_link") 2>&5
5125 ac_status=$?
5126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5127 test $ac_status = 0; }
5128 if { ac_try='./conftest$ac_cv_exeext'
5129 { { case "(($ac_try" in
5130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5131 *) ac_try_echo=$ac_try;;
5132esac
5133eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5134$as_echo "$ac_try_echo"; } >&5
5135 (eval "$ac_try") 2>&5
5136 ac_status=$?
5137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5138 test $ac_status = 0; }; }; then
5139 cross_compiling=no
5140 else
5141 if test "$cross_compiling" = maybe; then
5142 cross_compiling=yes
5143 else
5144 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5146as_fn_error "cannot run C compiled programs.
067d23c9 5147If you meant to cross compile, use \`--host'.
a9bec17c 5148See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5149 fi
5150 fi
5151fi
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5153$as_echo "$cross_compiling" >&6; }
5154
5155rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5156ac_clean_files=$ac_clean_files_save
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5158$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5159if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5160 $as_echo_n "(cached) " >&6
5161else
5162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5163/* end confdefs.h. */
5164
5165int
5166main ()
5167{
5168
5169 ;
5170 return 0;
5171}
5172_ACEOF
5173rm -f conftest.o conftest.obj
5174if { { ac_try="$ac_compile"
5175case "(($ac_try" in
5176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5177 *) ac_try_echo=$ac_try;;
5178esac
5179eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5180$as_echo "$ac_try_echo"; } >&5
5181 (eval "$ac_compile") 2>&5
5182 ac_status=$?
5183 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5184 test $ac_status = 0; }; then :
5185 for ac_file in conftest.o conftest.obj conftest.*; do
5186 test -f "$ac_file" || continue;
5187 case $ac_file in
5188 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5189 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5190 break;;
5191 esac
5192done
5193else
5194 $as_echo "$as_me: failed program was:" >&5
5195sed 's/^/| /' conftest.$ac_ext >&5
5196
5197{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5198$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5199as_fn_error "cannot compute suffix of object files: cannot compile
5200See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5201fi
5202rm -f conftest.$ac_cv_objext conftest.$ac_ext
5203fi
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5205$as_echo "$ac_cv_objext" >&6; }
5206OBJEXT=$ac_cv_objext
5207ac_objext=$OBJEXT
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5209$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5210if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5211 $as_echo_n "(cached) " >&6
5212else
5213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5214/* end confdefs.h. */
5215
5216int
5217main ()
5218{
5219#ifndef __GNUC__
5220 choke me
5221#endif
5222
5223 ;
5224 return 0;
5225}
5226_ACEOF
5227if ac_fn_c_try_compile "$LINENO"; then :
5228 ac_compiler_gnu=yes
5229else
5230 ac_compiler_gnu=no
5231fi
5232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5233ac_cv_c_compiler_gnu=$ac_compiler_gnu
5234
5235fi
5236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5237$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5238if test $ac_compiler_gnu = yes; then
5239 GCC=yes
5240else
5241 GCC=
5242fi
5243ac_test_CFLAGS=${CFLAGS+set}
5244ac_save_CFLAGS=$CFLAGS
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5246$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5247if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5248 $as_echo_n "(cached) " >&6
5249else
5250 ac_save_c_werror_flag=$ac_c_werror_flag
5251 ac_c_werror_flag=yes
5252 ac_cv_prog_cc_g=no
5253 CFLAGS="-g"
5254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5255/* end confdefs.h. */
5256
5257int
5258main ()
5259{
5260
5261 ;
5262 return 0;
5263}
5264_ACEOF
5265if ac_fn_c_try_compile "$LINENO"; then :
5266 ac_cv_prog_cc_g=yes
5267else
5268 CFLAGS=""
5269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5270/* end confdefs.h. */
5271
5272int
5273main ()
5274{
5275
5276 ;
5277 return 0;
5278}
5279_ACEOF
5280if ac_fn_c_try_compile "$LINENO"; then :
5281
5282else
5283 ac_c_werror_flag=$ac_save_c_werror_flag
5284 CFLAGS="-g"
5285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5286/* end confdefs.h. */
5287
5288int
5289main ()
5290{
5291
5292 ;
5293 return 0;
5294}
5295_ACEOF
5296if ac_fn_c_try_compile "$LINENO"; then :
5297 ac_cv_prog_cc_g=yes
5298fi
5299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5300fi
5301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5302fi
5303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5304 ac_c_werror_flag=$ac_save_c_werror_flag
5305fi
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5307$as_echo "$ac_cv_prog_cc_g" >&6; }
5308if test "$ac_test_CFLAGS" = set; then
5309 CFLAGS=$ac_save_CFLAGS
5310elif test $ac_cv_prog_cc_g = yes; then
5311 if test "$GCC" = yes; then
5312 CFLAGS="-g -O2"
5313 else
5314 CFLAGS="-g"
5315 fi
5316else
5317 if test "$GCC" = yes; then
5318 CFLAGS="-O2"
5319 else
5320 CFLAGS=
5321 fi
5322fi
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5324$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5325if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5326 $as_echo_n "(cached) " >&6
5327else
5328 ac_cv_prog_cc_c89=no
5329ac_save_CC=$CC
5330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5331/* end confdefs.h. */
5332#include <stdarg.h>
5333#include <stdio.h>
5334#include <sys/types.h>
5335#include <sys/stat.h>
5336/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5337struct buf { int x; };
5338FILE * (*rcsopen) (struct buf *, struct stat *, int);
5339static char *e (p, i)
5340 char **p;
5341 int i;
5342{
5343 return p[i];
5344}
5345static char *f (char * (*g) (char **, int), char **p, ...)
5346{
5347 char *s;
5348 va_list v;
5349 va_start (v,p);
5350 s = g (p, va_arg (v,int));
5351 va_end (v);
5352 return s;
5353}
5354
5355/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5356 function prototypes and stuff, but not '\xHH' hex character constants.
5357 These don't provoke an error unfortunately, instead are silently treated
5358 as 'x'. The following induces an error, until -std is added to get
5359 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5360 array size at least. It's necessary to write '\x00'==0 to get something
5361 that's true only with -std. */
5362int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5363
5364/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5365 inside strings and character constants. */
5366#define FOO(x) 'x'
5367int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5368
5369int test (int i, double x);
5370struct s1 {int (*f) (int a);};
5371struct s2 {int (*f) (double a);};
5372int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5373int argc;
5374char **argv;
5375int
5376main ()
5377{
5378return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5379 ;
5380 return 0;
5381}
5382_ACEOF
5383for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5384 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5385do
5386 CC="$ac_save_CC $ac_arg"
5387 if ac_fn_c_try_compile "$LINENO"; then :
5388 ac_cv_prog_cc_c89=$ac_arg
5389fi
5390rm -f core conftest.err conftest.$ac_objext
5391 test "x$ac_cv_prog_cc_c89" != "xno" && break
5392done
743c80a7
PE
5393rm -f conftest.$ac_ext
5394CC=$ac_save_CC
5395
5396fi
5397# AC_CACHE_VAL
5398case "x$ac_cv_prog_cc_c89" in
5399 x)
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5401$as_echo "none needed" >&6; } ;;
5402 xno)
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5404$as_echo "unsupported" >&6; } ;;
5405 *)
5406 CC="$CC $ac_cv_prog_cc_c89"
5407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5408$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5409esac
5410if test "x$ac_cv_prog_cc_c89" != xno; then :
5411
5412fi
5413
5414ac_ext=c
5415ac_cpp='$CPP $CPPFLAGS'
5416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5418ac_compiler_gnu=$ac_cv_c_compiler_gnu
5419DEPDIR="${am__leading_dot}deps"
5420
5421ac_config_commands="$ac_config_commands depfiles"
5422
5423
5424am_make=${MAKE-make}
5425cat > confinc << 'END'
5426am__doit:
5427 @echo this is the am__doit target
5428.PHONY: am__doit
5429END
5430# If we don't find an include directive, just comment out the code.
5431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5432$as_echo_n "checking for style of include used by $am_make... " >&6; }
5433am__include="#"
5434am__quote=
5435_am_result=none
5436# First try GNU make style include.
5437echo "include confinc" > confmf
5438# Ignore all kinds of additional output from `make'.
5439case `$am_make -s -f confmf 2> /dev/null` in #(
5440*the\ am__doit\ target*)
5441 am__include=include
5442 am__quote=
5443 _am_result=GNU
5444 ;;
5445esac
5446# Now try BSD make style include.
5447if test "$am__include" = "#"; then
5448 echo '.include "confinc"' > confmf
5449 case `$am_make -s -f confmf 2> /dev/null` in #(
5450 *the\ am__doit\ target*)
5451 am__include=.include
5452 am__quote="\""
5453 _am_result=BSD
5454 ;;
5455 esac
5456fi
5457
5458
5459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5460$as_echo "$_am_result" >&6; }
5461rm -f confinc confmf
5462
5463# Check whether --enable-dependency-tracking was given.
5464if test "${enable_dependency_tracking+set}" = set; then :
5465 enableval=$enable_dependency_tracking;
5466fi
5467
5468if test "x$enable_dependency_tracking" != xno; then
5469 am_depcomp="$ac_aux_dir/depcomp"
5470 AMDEPBACKSLASH='\'
5471fi
5472 if test "x$enable_dependency_tracking" != xno; then
5473 AMDEP_TRUE=
5474 AMDEP_FALSE='#'
5475else
5476 AMDEP_TRUE='#'
5477 AMDEP_FALSE=
5478fi
5479
5480
5481
5482depcc="$CC" am_compiler_list=
5483
5484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5485$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5486if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5487 $as_echo_n "(cached) " >&6
5488else
5489 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5490 # We make a subdir and do the tests there. Otherwise we can end up
5491 # making bogus files that we don't know about and never remove. For
5492 # instance it was reported that on HP-UX the gcc test will end up
5493 # making a dummy file named `D' -- because `-MD' means `put the output
5494 # in D'.
5495 mkdir conftest.dir
5496 # Copy depcomp to subdir because otherwise we won't find it if we're
5497 # using a relative directory.
5498 cp "$am_depcomp" conftest.dir
5499 cd conftest.dir
5500 # We will build objects and dependencies in a subdirectory because
5501 # it helps to detect inapplicable dependency modes. For instance
5502 # both Tru64's cc and ICC support -MD to output dependencies as a
5503 # side effect of compilation, but ICC will put the dependencies in
5504 # the current directory while Tru64 will put them in the object
5505 # directory.
5506 mkdir sub
5507
5508 am_cv_CC_dependencies_compiler_type=none
5509 if test "$am_compiler_list" = ""; then
5510 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5511 fi
5512 am__universal=false
5513 case " $depcc " in #(
5514 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5515 esac
5516
5517 for depmode in $am_compiler_list; do
5518 # Setup a source with many dependencies, because some compilers
5519 # like to wrap large dependency lists on column 80 (with \), and
5520 # we should not choose a depcomp mode which is confused by this.
5521 #
5522 # We need to recreate these files for each test, as the compiler may
5523 # overwrite some of them when testing with obscure command lines.
5524 # This happens at least with the AIX C compiler.
5525 : > sub/conftest.c
5526 for i in 1 2 3 4 5 6; do
5527 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5528 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5529 # Solaris 8's {/usr,}/bin/sh.
5530 touch sub/conftst$i.h
5531 done
5532 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5533
5534 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5535 # mode. It turns out that the SunPro C++ compiler does not properly
5536 # handle `-M -o', and we need to detect this. Also, some Intel
5537 # versions had trouble with output in subdirs
5538 am__obj=sub/conftest.${OBJEXT-o}
5539 am__minus_obj="-o $am__obj"
5540 case $depmode in
5541 gcc)
5542 # This depmode causes a compiler race in universal mode.
5543 test "$am__universal" = false || continue
5544 ;;
5545 nosideeffect)
5546 # after this tag, mechanisms are not by side-effect, so they'll
5547 # only be used when explicitly requested
5548 if test "x$enable_dependency_tracking" = xyes; then
5549 continue
5550 else
5551 break
5552 fi
5553 ;;
5554 msvisualcpp | msvcmsys)
5555 # This compiler won't grok `-c -o', but also, the minuso test has
5556 # not run yet. These depmodes are late enough in the game, and
5557 # so weak that their functioning should not be impacted.
5558 am__obj=conftest.${OBJEXT-o}
5559 am__minus_obj=
5560 ;;
5561 none) break ;;
5562 esac
5563 if depmode=$depmode \
5564 source=sub/conftest.c object=$am__obj \
5565 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5566 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5567 >/dev/null 2>conftest.err &&
5568 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5569 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5570 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5571 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5572 # icc doesn't choke on unknown options, it will just issue warnings
5573 # or remarks (even with -Werror). So we grep stderr for any message
5574 # that says an option was ignored or not supported.
5575 # When given -MP, icc 7.0 and 7.1 complain thusly:
5576 # icc: Command line warning: ignoring option '-M'; no argument required
5577 # The diagnosis changed in icc 8.0:
5578 # icc: Command line remark: option '-MP' not supported
5579 if (grep 'ignoring option' conftest.err ||
5580 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5581 am_cv_CC_dependencies_compiler_type=$depmode
5582 break
5583 fi
5584 fi
5585 done
5586
5587 cd ..
5588 rm -rf conftest.dir
5589else
5590 am_cv_CC_dependencies_compiler_type=none
5591fi
5592
5593fi
5594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5595$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5596CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5597
5598 if
5599 test "x$enable_dependency_tracking" != xno \
5600 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5601 am__fastdepCC_TRUE=
5602 am__fastdepCC_FALSE='#'
5603else
5604 am__fastdepCC_TRUE='#'
5605 am__fastdepCC_FALSE=
5606fi
5607
5608
5609if test "x$CC" != xcc; then
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5611$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5612else
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5614$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5615fi
5616set dummy $CC; ac_cc=`$as_echo "$2" |
5617 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5618if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5619 $as_echo_n "(cached) " >&6
5620else
5621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5622/* end confdefs.h. */
5623
5624int
5625main ()
5626{
5627
5628 ;
5629 return 0;
5630}
5631_ACEOF
5632# Make sure it works both with $CC and with simple cc.
5633# We do the test twice because some compilers refuse to overwrite an
5634# existing .o file with -o, though they will create one.
5635ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5636rm -f conftest2.*
5637if { { case "(($ac_try" in
5638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5639 *) ac_try_echo=$ac_try;;
5640esac
5641eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5642$as_echo "$ac_try_echo"; } >&5
5643 (eval "$ac_try") 2>&5
5644 ac_status=$?
5645 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5646 test $ac_status = 0; } &&
5647 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5649 *) ac_try_echo=$ac_try;;
5650esac
5651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5652$as_echo "$ac_try_echo"; } >&5
5653 (eval "$ac_try") 2>&5
5654 ac_status=$?
5655 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5656 test $ac_status = 0; };
5657then
5658 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5659 if test "x$CC" != xcc; then
5660 # Test first that cc exists at all.
5661 if { ac_try='cc -c conftest.$ac_ext >&5'
5662 { { case "(($ac_try" in
5663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5664 *) ac_try_echo=$ac_try;;
5665esac
5666eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5667$as_echo "$ac_try_echo"; } >&5
5668 (eval "$ac_try") 2>&5
5669 ac_status=$?
5670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5671 test $ac_status = 0; }; }; then
5672 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5673 rm -f conftest2.*
5674 if { { case "(($ac_try" in
5675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5676 *) ac_try_echo=$ac_try;;
5677esac
5678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5679$as_echo "$ac_try_echo"; } >&5
5680 (eval "$ac_try") 2>&5
5681 ac_status=$?
5682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5683 test $ac_status = 0; } &&
5684 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5686 *) ac_try_echo=$ac_try;;
5687esac
5688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5689$as_echo "$ac_try_echo"; } >&5
5690 (eval "$ac_try") 2>&5
5691 ac_status=$?
5692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5693 test $ac_status = 0; };
5694 then
5695 # cc works too.
5696 :
5697 else
5698 # cc exists but doesn't like -o.
5699 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5700 fi
5701 fi
5702 fi
5703else
5704 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5705fi
5706rm -f core conftest*
5707
5708fi
5709if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5711$as_echo "yes" >&6; }
5712else
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5714$as_echo "no" >&6; }
5715
5716$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5717
5718fi
5719
5720# FIXME: we rely on the cache variable name because
5721# there is no other way.
5722set dummy $CC
5723am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5724eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5725if test "$am_t" != yes; then
5726 # Losing compiler, so override with the script.
5727 # FIXME: It is wrong to rewrite CC.
5728 # But if we don't then we get into trouble of one sort or another.
5729 # A longer-term fix would be to have automake use am__CC in this case,
5730 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5731 CC="$am_aux_dir/compile $CC"
5732fi
5733
5734
5735
5ec54608
GM
5736if test x$GCC = xyes; then
5737 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5738else
5739 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5740fi
5741
5742# Initialize gnulib right after choosing the compiler.
743c80a7 5743
067d23c9
KY
5744ac_ext=c
5745ac_cpp='$CPP $CPPFLAGS'
5746ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5747ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5748ac_compiler_gnu=$ac_cv_c_compiler_gnu
5749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5750$as_echo_n "checking how to run the C preprocessor... " >&6; }
5751# On Suns, sometimes $CPP names a directory.
5752if test -n "$CPP" && test -d "$CPP"; then
5753 CPP=
5754fi
5755if test -z "$CPP"; then
a9bec17c 5756 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5757 $as_echo_n "(cached) " >&6
5758else
5759 # Double quotes because CPP needs to be expanded
5760 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5761 do
5762 ac_preproc_ok=false
5763for ac_c_preproc_warn_flag in '' yes
5764do
5765 # Use a header file that comes with gcc, so configuring glibc
5766 # with a fresh cross-compiler works.
5767 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5768 # <limits.h> exists even on freestanding compilers.
5769 # On the NeXT, cc -E runs the code through the compiler's parser,
5770 # not just through cpp. "Syntax error" is here to catch this case.
5771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5772/* end confdefs.h. */
5773#ifdef __STDC__
5774# include <limits.h>
5775#else
5776# include <assert.h>
5777#endif
5778 Syntax error
5779_ACEOF
5780if ac_fn_c_try_cpp "$LINENO"; then :
5781
5782else
5783 # Broken: fails on valid input.
5784continue
5785fi
a9bec17c 5786rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5787
5788 # OK, works on sane cases. Now check whether nonexistent headers
5789 # can be detected and how.
5790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5791/* end confdefs.h. */
5792#include <ac_nonexistent.h>
5793_ACEOF
5794if ac_fn_c_try_cpp "$LINENO"; then :
5795 # Broken: success on invalid input.
5796continue
5797else
5798 # Passes both tests.
5799ac_preproc_ok=:
5800break
5801fi
a9bec17c 5802rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5803
5804done
5805# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5806rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5807if $ac_preproc_ok; then :
5808 break
5809fi
5810
5811 done
5812 ac_cv_prog_CPP=$CPP
5813
5814fi
5815 CPP=$ac_cv_prog_CPP
5816else
5817 ac_cv_prog_CPP=$CPP
5818fi
5819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5820$as_echo "$CPP" >&6; }
5821ac_preproc_ok=false
5822for ac_c_preproc_warn_flag in '' yes
5823do
5824 # Use a header file that comes with gcc, so configuring glibc
5825 # with a fresh cross-compiler works.
5826 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5827 # <limits.h> exists even on freestanding compilers.
5828 # On the NeXT, cc -E runs the code through the compiler's parser,
5829 # not just through cpp. "Syntax error" is here to catch this case.
5830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5831/* end confdefs.h. */
5832#ifdef __STDC__
5833# include <limits.h>
5834#else
5835# include <assert.h>
5836#endif
5837 Syntax error
5838_ACEOF
5839if ac_fn_c_try_cpp "$LINENO"; then :
5840
5841else
5842 # Broken: fails on valid input.
5843continue
5844fi
a9bec17c 5845rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5846
5847 # OK, works on sane cases. Now check whether nonexistent headers
5848 # can be detected and how.
5849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5850/* end confdefs.h. */
5851#include <ac_nonexistent.h>
5852_ACEOF
5853if ac_fn_c_try_cpp "$LINENO"; then :
5854 # Broken: success on invalid input.
5855continue
5856else
5857 # Passes both tests.
5858ac_preproc_ok=:
5859break
5860fi
a9bec17c 5861rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5862
5863done
5864# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5865rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5866if $ac_preproc_ok; then :
5867
5868else
5869 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5871as_fn_error "C preprocessor \"$CPP\" fails sanity check
5872See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5873fi
5874
5875ac_ext=c
5876ac_cpp='$CPP $CPPFLAGS'
5877ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5878ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5879ac_compiler_gnu=$ac_cv_c_compiler_gnu
5880
5881
5882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5883$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 5884if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
5885 $as_echo_n "(cached) " >&6
5886else
5887 if test -z "$GREP"; then
5888 ac_path_GREP_found=false
5889 # Loop through the user's path and test for each of PROGNAME-LIST
5890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5892do
5893 IFS=$as_save_IFS
5894 test -z "$as_dir" && as_dir=.
5895 for ac_prog in grep ggrep; do
5896 for ac_exec_ext in '' $ac_executable_extensions; do
5897 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5898 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5899# Check for GNU ac_path_GREP and select it if it is found.
5900 # Check for GNU $ac_path_GREP
5901case `"$ac_path_GREP" --version 2>&1` in
5902*GNU*)
5903 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5904*)
5905 ac_count=0
5906 $as_echo_n 0123456789 >"conftest.in"
5907 while :
5908 do
5909 cat "conftest.in" "conftest.in" >"conftest.tmp"
5910 mv "conftest.tmp" "conftest.in"
5911 cp "conftest.in" "conftest.nl"
5912 $as_echo 'GREP' >> "conftest.nl"
5913 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5914 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5915 as_fn_arith $ac_count + 1 && ac_count=$as_val
5916 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5917 # Best one so far, save it but keep looking for a better one
5918 ac_cv_path_GREP="$ac_path_GREP"
5919 ac_path_GREP_max=$ac_count
5920 fi
5921 # 10*(2^10) chars as input seems more than enough
5922 test $ac_count -gt 10 && break
5923 done
5924 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5925esac
5926
5927 $ac_path_GREP_found && break 3
5928 done
5929 done
5930 done
5931IFS=$as_save_IFS
5932 if test -z "$ac_cv_path_GREP"; then
a9bec17c 5933 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
5934 fi
5935else
5936 ac_cv_path_GREP=$GREP
5937fi
5938
5939fi
5940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5941$as_echo "$ac_cv_path_GREP" >&6; }
5942 GREP="$ac_cv_path_GREP"
5943
5944
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5946$as_echo_n "checking for egrep... " >&6; }
a9bec17c 5947if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
5948 $as_echo_n "(cached) " >&6
5949else
5950 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5951 then ac_cv_path_EGREP="$GREP -E"
5952 else
5953 if test -z "$EGREP"; then
5954 ac_path_EGREP_found=false
5955 # Loop through the user's path and test for each of PROGNAME-LIST
5956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5958do
5959 IFS=$as_save_IFS
5960 test -z "$as_dir" && as_dir=.
5961 for ac_prog in egrep; do
5962 for ac_exec_ext in '' $ac_executable_extensions; do
5963 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5964 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5965# Check for GNU ac_path_EGREP and select it if it is found.
5966 # Check for GNU $ac_path_EGREP
5967case `"$ac_path_EGREP" --version 2>&1` in
5968*GNU*)
5969 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5970*)
5971 ac_count=0
5972 $as_echo_n 0123456789 >"conftest.in"
5973 while :
5974 do
5975 cat "conftest.in" "conftest.in" >"conftest.tmp"
5976 mv "conftest.tmp" "conftest.in"
5977 cp "conftest.in" "conftest.nl"
5978 $as_echo 'EGREP' >> "conftest.nl"
5979 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5980 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5981 as_fn_arith $ac_count + 1 && ac_count=$as_val
5982 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5983 # Best one so far, save it but keep looking for a better one
5984 ac_cv_path_EGREP="$ac_path_EGREP"
5985 ac_path_EGREP_max=$ac_count
5986 fi
5987 # 10*(2^10) chars as input seems more than enough
5988 test $ac_count -gt 10 && break
5989 done
5990 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5991esac
5992
5993 $ac_path_EGREP_found && break 3
5994 done
5995 done
5996 done
5997IFS=$as_save_IFS
5998 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 5999 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6000 fi
6001else
6002 ac_cv_path_EGREP=$EGREP
6003fi
6004
6005 fi
6006fi
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6008$as_echo "$ac_cv_path_EGREP" >&6; }
6009 EGREP="$ac_cv_path_EGREP"
6010
6011
369e19fc
PE
6012
6013
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6015$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 6016if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
6017 $as_echo_n "(cached) " >&6
6018else
6019
6020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6021/* end confdefs.h. */
6022
6023#ifdef __ACK__
6024Amsterdam
6025#endif
6026
6027_ACEOF
6028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6029 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6030 gl_cv_c_amsterdam_compiler=yes
6031else
6032 gl_cv_c_amsterdam_compiler=no
6033fi
6034rm -f conftest*
6035
6036
6037fi
6038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6039$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6040 if test -z "$AR"; then
6041 if test $gl_cv_c_amsterdam_compiler = yes; then
6042 AR='cc -c.a'
6043 if test -z "$ARFLAGS"; then
6044 ARFLAGS='-o'
6045 fi
6046 else
6047 if test -n "$ac_tool_prefix"; then
6048 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6049set dummy ${ac_tool_prefix}ar; ac_word=$2
6050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6051$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6052if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6053 $as_echo_n "(cached) " >&6
6054else
6055 if test -n "$AR"; then
6056 ac_cv_prog_AR="$AR" # Let the user override the test.
6057else
6058as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6059for as_dir in $PATH
6060do
6061 IFS=$as_save_IFS
6062 test -z "$as_dir" && as_dir=.
6063 for ac_exec_ext in '' $ac_executable_extensions; do
6064 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6065 ac_cv_prog_AR="${ac_tool_prefix}ar"
6066 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6067 break 2
6068 fi
6069done
6070 done
6071IFS=$as_save_IFS
6072
6073fi
6074fi
6075AR=$ac_cv_prog_AR
6076if test -n "$AR"; then
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6078$as_echo "$AR" >&6; }
6079else
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6081$as_echo "no" >&6; }
6082fi
6083
6084
6085fi
6086if test -z "$ac_cv_prog_AR"; then
6087 ac_ct_AR=$AR
6088 # Extract the first word of "ar", so it can be a program name with args.
6089set dummy ar; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6092if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6093 $as_echo_n "(cached) " >&6
6094else
6095 if test -n "$ac_ct_AR"; then
6096 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6097else
6098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101 IFS=$as_save_IFS
6102 test -z "$as_dir" && as_dir=.
6103 for ac_exec_ext in '' $ac_executable_extensions; do
6104 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6105 ac_cv_prog_ac_ct_AR="ar"
6106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107 break 2
6108 fi
6109done
6110 done
6111IFS=$as_save_IFS
6112
6113fi
6114fi
6115ac_ct_AR=$ac_cv_prog_ac_ct_AR
6116if test -n "$ac_ct_AR"; then
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6118$as_echo "$ac_ct_AR" >&6; }
6119else
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6121$as_echo "no" >&6; }
6122fi
6123
6124 if test "x$ac_ct_AR" = x; then
6125 AR="ar"
6126 else
6127 case $cross_compiling:$ac_tool_warned in
6128yes:)
6129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6131ac_tool_warned=yes ;;
6132esac
6133 AR=$ac_ct_AR
6134 fi
6135else
6136 AR="$ac_cv_prog_AR"
6137fi
6138
6139 if test -z "$ARFLAGS"; then
6140 ARFLAGS='cru'
6141 fi
6142 fi
6143 else
6144 if test -z "$ARFLAGS"; then
6145 ARFLAGS='cru'
6146 fi
6147 fi
6148
6149
6150 if test -z "$RANLIB"; then
6151 if test $gl_cv_c_amsterdam_compiler = yes; then
6152 RANLIB=':'
6153 else
6154 if test -n "$ac_tool_prefix"; then
6155 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6156set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6158$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6159if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6160 $as_echo_n "(cached) " >&6
6161else
6162 if test -n "$RANLIB"; then
6163 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6164else
6165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6166for as_dir in $PATH
6167do
6168 IFS=$as_save_IFS
6169 test -z "$as_dir" && as_dir=.
6170 for ac_exec_ext in '' $ac_executable_extensions; do
6171 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6172 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6173 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6174 break 2
6175 fi
6176done
6177 done
6178IFS=$as_save_IFS
6179
6180fi
6181fi
6182RANLIB=$ac_cv_prog_RANLIB
6183if test -n "$RANLIB"; then
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6185$as_echo "$RANLIB" >&6; }
6186else
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6188$as_echo "no" >&6; }
6189fi
6190
6191
6192fi
6193if test -z "$ac_cv_prog_RANLIB"; then
6194 ac_ct_RANLIB=$RANLIB
6195 # Extract the first word of "ranlib", so it can be a program name with args.
6196set dummy ranlib; ac_word=$2
6197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6198$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6199if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6200 $as_echo_n "(cached) " >&6
6201else
6202 if test -n "$ac_ct_RANLIB"; then
6203 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6204else
6205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6206for as_dir in $PATH
6207do
6208 IFS=$as_save_IFS
6209 test -z "$as_dir" && as_dir=.
6210 for ac_exec_ext in '' $ac_executable_extensions; do
6211 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6212 ac_cv_prog_ac_ct_RANLIB="ranlib"
6213 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6214 break 2
6215 fi
6216done
6217 done
6218IFS=$as_save_IFS
6219
6220fi
6221fi
6222ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6223if test -n "$ac_ct_RANLIB"; then
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6225$as_echo "$ac_ct_RANLIB" >&6; }
6226else
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6228$as_echo "no" >&6; }
6229fi
6230
6231 if test "x$ac_ct_RANLIB" = x; then
6232 RANLIB=":"
6233 else
6234 case $cross_compiling:$ac_tool_warned in
6235yes:)
6236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6238ac_tool_warned=yes ;;
6239esac
6240 RANLIB=$ac_ct_RANLIB
6241 fi
6242else
6243 RANLIB="$ac_cv_prog_RANLIB"
6244fi
6245
6246 fi
6247 fi
6248
6249
067d23c9
KY
6250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6251$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6252if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6253 $as_echo_n "(cached) " >&6
6254else
6255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6256/* end confdefs.h. */
6257#include <stdlib.h>
6258#include <stdarg.h>
6259#include <string.h>
6260#include <float.h>
6261
6262int
6263main ()
6264{
6265
6266 ;
6267 return 0;
6268}
6269_ACEOF
6270if ac_fn_c_try_compile "$LINENO"; then :
6271 ac_cv_header_stdc=yes
6272else
6273 ac_cv_header_stdc=no
6274fi
6275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6276
6277if test $ac_cv_header_stdc = yes; then
6278 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6280/* end confdefs.h. */
6281#include <string.h>
6282
6283_ACEOF
6284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6285 $EGREP "memchr" >/dev/null 2>&1; then :
6286
6287else
6288 ac_cv_header_stdc=no
6289fi
6290rm -f conftest*
6291
6292fi
6293
6294if test $ac_cv_header_stdc = yes; then
6295 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6297/* end confdefs.h. */
6298#include <stdlib.h>
6299
6300_ACEOF
6301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6302 $EGREP "free" >/dev/null 2>&1; then :
6303
6304else
6305 ac_cv_header_stdc=no
6306fi
6307rm -f conftest*
6308
6309fi
6310
6311if test $ac_cv_header_stdc = yes; then
6312 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6313 if test "$cross_compiling" = yes; then :
6314 :
6315else
6316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6317/* end confdefs.h. */
6318#include <ctype.h>
6319#include <stdlib.h>
6320#if ((' ' & 0x0FF) == 0x020)
6321# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6322# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6323#else
6324# define ISLOWER(c) \
6325 (('a' <= (c) && (c) <= 'i') \
6326 || ('j' <= (c) && (c) <= 'r') \
6327 || ('s' <= (c) && (c) <= 'z'))
6328# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6329#endif
6330
6331#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6332int
6333main ()
6334{
6335 int i;
6336 for (i = 0; i < 256; i++)
6337 if (XOR (islower (i), ISLOWER (i))
6338 || toupper (i) != TOUPPER (i))
6339 return 2;
6340 return 0;
6341}
6342_ACEOF
6343if ac_fn_c_try_run "$LINENO"; then :
6344
6345else
6346 ac_cv_header_stdc=no
6347fi
6348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6349 conftest.$ac_objext conftest.beam conftest.$ac_ext
6350fi
6351
6352fi
6353fi
6354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6355$as_echo "$ac_cv_header_stdc" >&6; }
6356if test $ac_cv_header_stdc = yes; then
6357
6358$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6359
6360fi
6361
6362# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6363for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6364 inttypes.h stdint.h unistd.h
6365do :
6366 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6367ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6368"
a9bec17c
GM
6369eval as_val=\$$as_ac_Header
6370 if test "x$as_val" = x""yes; then :
067d23c9
KY
6371 cat >>confdefs.h <<_ACEOF
6372#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6373_ACEOF
6374
6375fi
6376
6377done
6378
6379
6380
1fd182f0
PE
6381
6382
067d23c9 6383 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6384if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6385 MINIX=yes
6386else
6387 MINIX=
6388fi
6389
6390
6391 if test "$MINIX" = yes; then
6392
6393$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6394
6395
6396$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6397
6398
6399$as_echo "#define _MINIX 1" >>confdefs.h
6400
6401 fi
6402
1fd182f0
PE
6403 case "$host_os" in
6404 hpux*)
6405
6406$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6407
6408 ;;
6409 esac
6410
067d23c9
KY
6411
6412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6413$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6414if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6415 $as_echo_n "(cached) " >&6
6416else
6417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6418/* end confdefs.h. */
369e19fc
PE
6419
6420# define __EXTENSIONS__ 1
6421 $ac_includes_default
6422int
6423main ()
6424{
6425
6426 ;
6427 return 0;
6428}
6429_ACEOF
6430if ac_fn_c_try_compile "$LINENO"; then :
6431 ac_cv_safe_to_define___extensions__=yes
6432else
6433 ac_cv_safe_to_define___extensions__=no
6434fi
6435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6436fi
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6438$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6439 test $ac_cv_safe_to_define___extensions__ = yes &&
6440 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6441
6442 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6443
6444 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6445
6446 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6447
6448 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6449
6450 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6451
6452
6453
6454
6455
6456
6457
6458
6459# Check whether --enable-largefile was given.
6460if test "${enable_largefile+set}" = set; then :
6461 enableval=$enable_largefile;
6462fi
6463
6464if test "$enable_largefile" != no; then
6465
6466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6467$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6468if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6469 $as_echo_n "(cached) " >&6
6470else
6471 ac_cv_sys_largefile_CC=no
6472 if test "$GCC" != yes; then
6473 ac_save_CC=$CC
6474 while :; do
6475 # IRIX 6.2 and later do not support large files by default,
6476 # so use the C compiler's -n32 option if that helps.
6477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6478/* end confdefs.h. */
6479#include <sys/types.h>
6480 /* Check that off_t can represent 2**63 - 1 correctly.
6481 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6482 since some C++ compilers masquerading as C compilers
6483 incorrectly reject 9223372036854775807. */
6484#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6485 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6486 && LARGE_OFF_T % 2147483647 == 1)
6487 ? 1 : -1];
6488int
6489main ()
6490{
6491
6492 ;
6493 return 0;
6494}
6495_ACEOF
6496 if ac_fn_c_try_compile "$LINENO"; then :
6497 break
6498fi
6499rm -f core conftest.err conftest.$ac_objext
6500 CC="$CC -n32"
6501 if ac_fn_c_try_compile "$LINENO"; then :
6502 ac_cv_sys_largefile_CC=' -n32'; break
6503fi
6504rm -f core conftest.err conftest.$ac_objext
6505 break
6506 done
6507 CC=$ac_save_CC
6508 rm -f conftest.$ac_ext
6509 fi
6510fi
6511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6512$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6513 if test "$ac_cv_sys_largefile_CC" != no; then
6514 CC=$CC$ac_cv_sys_largefile_CC
6515 fi
6516
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6518$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6519if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6520 $as_echo_n "(cached) " >&6
6521else
6522 while :; do
6523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6524/* end confdefs.h. */
6525#include <sys/types.h>
6526 /* Check that off_t can represent 2**63 - 1 correctly.
6527 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6528 since some C++ compilers masquerading as C compilers
6529 incorrectly reject 9223372036854775807. */
6530#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6531 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6532 && LARGE_OFF_T % 2147483647 == 1)
6533 ? 1 : -1];
6534int
6535main ()
6536{
6537
6538 ;
6539 return 0;
6540}
6541_ACEOF
6542if ac_fn_c_try_compile "$LINENO"; then :
6543 ac_cv_sys_file_offset_bits=no; break
6544fi
6545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6547/* end confdefs.h. */
6548#define _FILE_OFFSET_BITS 64
6549#include <sys/types.h>
6550 /* Check that off_t can represent 2**63 - 1 correctly.
6551 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6552 since some C++ compilers masquerading as C compilers
6553 incorrectly reject 9223372036854775807. */
6554#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6555 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6556 && LARGE_OFF_T % 2147483647 == 1)
6557 ? 1 : -1];
6558int
6559main ()
6560{
6561
6562 ;
6563 return 0;
6564}
6565_ACEOF
6566if ac_fn_c_try_compile "$LINENO"; then :
6567 ac_cv_sys_file_offset_bits=64; break
6568fi
6569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6570 ac_cv_sys_file_offset_bits=unknown
6571 break
6572done
6573fi
6574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6575$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6576case $ac_cv_sys_file_offset_bits in #(
6577 no | unknown) ;;
6578 *)
6579cat >>confdefs.h <<_ACEOF
6580#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6581_ACEOF
6582;;
6583esac
6584rm -rf conftest*
6585 if test $ac_cv_sys_file_offset_bits = unknown; then
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6587$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6588if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6589 $as_echo_n "(cached) " >&6
6590else
6591 while :; do
6592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6593/* end confdefs.h. */
6594#include <sys/types.h>
6595 /* Check that off_t can represent 2**63 - 1 correctly.
6596 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6597 since some C++ compilers masquerading as C compilers
6598 incorrectly reject 9223372036854775807. */
6599#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6600 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6601 && LARGE_OFF_T % 2147483647 == 1)
6602 ? 1 : -1];
6603int
6604main ()
6605{
6606
6607 ;
6608 return 0;
6609}
6610_ACEOF
6611if ac_fn_c_try_compile "$LINENO"; then :
6612 ac_cv_sys_large_files=no; break
6613fi
6614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6616/* end confdefs.h. */
6617#define _LARGE_FILES 1
6618#include <sys/types.h>
6619 /* Check that off_t can represent 2**63 - 1 correctly.
6620 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6621 since some C++ compilers masquerading as C compilers
6622 incorrectly reject 9223372036854775807. */
6623#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6624 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6625 && LARGE_OFF_T % 2147483647 == 1)
6626 ? 1 : -1];
067d23c9
KY
6627int
6628main ()
6629{
6630
6631 ;
6632 return 0;
6633}
6634_ACEOF
6635if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6636 ac_cv_sys_large_files=1; break
067d23c9
KY
6637fi
6638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6639 ac_cv_sys_large_files=unknown
6640 break
6641done
067d23c9 6642fi
369e19fc
PE
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6644$as_echo "$ac_cv_sys_large_files" >&6; }
6645case $ac_cv_sys_large_files in #(
6646 no | unknown) ;;
6647 *)
6648cat >>confdefs.h <<_ACEOF
6649#define _LARGE_FILES $ac_cv_sys_large_files
6650_ACEOF
6651;;
6652esac
6653rm -rf conftest*
6654 fi
1fd182f0
PE
6655
6656
369e19fc 6657fi
1fd182f0 6658
6d153f56
GM
6659 case $ac_cv_prog_cc_stdc in #(
6660 no) :
6661 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6662 *) :
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6664$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6665if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6666 $as_echo_n "(cached) " >&6
6667else
6668 ac_cv_prog_cc_c99=no
6669ac_save_CC=$CC
6670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6671/* end confdefs.h. */
6672#include <stdarg.h>
6673#include <stdbool.h>
6674#include <stdlib.h>
6675#include <wchar.h>
6676#include <stdio.h>
6677
6678// Check varargs macros. These examples are taken from C99 6.10.3.5.
6679#define debug(...) fprintf (stderr, __VA_ARGS__)
6680#define showlist(...) puts (#__VA_ARGS__)
6681#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6682static void
6683test_varargs_macros (void)
6684{
6685 int x = 1234;
6686 int y = 5678;
6687 debug ("Flag");
6688 debug ("X = %d\n", x);
6689 showlist (The first, second, and third items.);
6690 report (x>y, "x is %d but y is %d", x, y);
6691}
6692
6693// Check long long types.
6694#define BIG64 18446744073709551615ull
6695#define BIG32 4294967295ul
6696#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6697#if !BIG_OK
6698 your preprocessor is broken;
6699#endif
6700#if BIG_OK
6701#else
6702 your preprocessor is broken;
6703#endif
6704static long long int bignum = -9223372036854775807LL;
6705static unsigned long long int ubignum = BIG64;
6706
6707struct incomplete_array
6708{
6709 int datasize;
6710 double data[];
6711};
6712
6713struct named_init {
6714 int number;
6715 const wchar_t *name;
6716 double average;
6717};
6718
6719typedef const char *ccp;
6720
6721static inline int
6722test_restrict (ccp restrict text)
6723{
6724 // See if C++-style comments work.
6725 // Iterate through items via the restricted pointer.
6726 // Also check for declarations in for loops.
6727 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6728 continue;
6729 return 0;
6730}
6731
6732// Check varargs and va_copy.
6733static void
6734test_varargs (const char *format, ...)
6735{
6736 va_list args;
6737 va_start (args, format);
6738 va_list args_copy;
6739 va_copy (args_copy, args);
6740
6741 const char *str;
6742 int number;
6743 float fnumber;
6744
6745 while (*format)
6746 {
6747 switch (*format++)
6748 {
6749 case 's': // string
6750 str = va_arg (args_copy, const char *);
6751 break;
6752 case 'd': // int
6753 number = va_arg (args_copy, int);
6754 break;
6755 case 'f': // float
6756 fnumber = va_arg (args_copy, double);
6757 break;
6758 default:
6759 break;
6760 }
6761 }
6762 va_end (args_copy);
6763 va_end (args);
6764}
6765
6766int
6767main ()
6768{
6769
6770 // Check bool.
6771 _Bool success = false;
6772
6773 // Check restrict.
6774 if (test_restrict ("String literal") == 0)
6775 success = true;
6776 char *restrict newvar = "Another string";
6777
6778 // Check varargs.
6779 test_varargs ("s, d' f .", "string", 65, 34.234);
6780 test_varargs_macros ();
6781
6782 // Check flexible array members.
6783 struct incomplete_array *ia =
6784 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6785 ia->datasize = 10;
6786 for (int i = 0; i < ia->datasize; ++i)
6787 ia->data[i] = i * 1.234;
6788
6789 // Check named initializers.
6790 struct named_init ni = {
6791 .number = 34,
6792 .name = L"Test wide string",
6793 .average = 543.34343,
6794 };
6795
6796 ni.number = 58;
6797
6798 int dynamic_array[ni.number];
6799 dynamic_array[ni.number - 1] = 543;
6800
6801 // work around unused variable warnings
6802 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6803 || dynamic_array[ni.number - 1] != 543);
6804
6805 ;
6806 return 0;
6807}
6808_ACEOF
6809for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
6810do
6811 CC="$ac_save_CC $ac_arg"
6812 if ac_fn_c_try_compile "$LINENO"; then :
6813 ac_cv_prog_cc_c99=$ac_arg
6814fi
6815rm -f core conftest.err conftest.$ac_objext
6816 test "x$ac_cv_prog_cc_c99" != "xno" && break
6817done
6818rm -f conftest.$ac_ext
6819CC=$ac_save_CC
6820
6821fi
6822# AC_CACHE_VAL
6823case "x$ac_cv_prog_cc_c99" in
6824 x)
6825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6826$as_echo "none needed" >&6; } ;;
6827 xno)
6828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6829$as_echo "unsupported" >&6; } ;;
6830 *)
6831 CC="$CC $ac_cv_prog_cc_c99"
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6833$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6834esac
6835if test "x$ac_cv_prog_cc_c99" != xno; then :
6836 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6837else
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6839$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 6840if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
6841 $as_echo_n "(cached) " >&6
6842else
6843 ac_cv_prog_cc_c89=no
6844ac_save_CC=$CC
6845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6846/* end confdefs.h. */
6847#include <stdarg.h>
6848#include <stdio.h>
6849#include <sys/types.h>
6850#include <sys/stat.h>
6851/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6852struct buf { int x; };
6853FILE * (*rcsopen) (struct buf *, struct stat *, int);
6854static char *e (p, i)
6855 char **p;
6856 int i;
6857{
6858 return p[i];
6859}
6860static char *f (char * (*g) (char **, int), char **p, ...)
6861{
6862 char *s;
6863 va_list v;
6864 va_start (v,p);
6865 s = g (p, va_arg (v,int));
6866 va_end (v);
6867 return s;
6868}
6869
6870/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6871 function prototypes and stuff, but not '\xHH' hex character constants.
6872 These don't provoke an error unfortunately, instead are silently treated
6873 as 'x'. The following induces an error, until -std is added to get
6874 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6875 array size at least. It's necessary to write '\x00'==0 to get something
6876 that's true only with -std. */
6877int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6878
6879/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6880 inside strings and character constants. */
6881#define FOO(x) 'x'
6882int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6883
6884int test (int i, double x);
6885struct s1 {int (*f) (int a);};
6886struct s2 {int (*f) (double a);};
6887int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6888int argc;
6889char **argv;
6890int
6891main ()
6892{
6893return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6894 ;
6895 return 0;
6896}
6897_ACEOF
6898for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6899 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6900do
6901 CC="$ac_save_CC $ac_arg"
6902 if ac_fn_c_try_compile "$LINENO"; then :
6903 ac_cv_prog_cc_c89=$ac_arg
6904fi
6905rm -f core conftest.err conftest.$ac_objext
6906 test "x$ac_cv_prog_cc_c89" != "xno" && break
6907done
6908rm -f conftest.$ac_ext
6909CC=$ac_save_CC
6910
6911fi
6912# AC_CACHE_VAL
6913case "x$ac_cv_prog_cc_c89" in
6914 x)
6915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6916$as_echo "none needed" >&6; } ;;
6917 xno)
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6919$as_echo "unsupported" >&6; } ;;
6920 *)
6921 CC="$CC $ac_cv_prog_cc_c89"
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6923$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6924esac
6925if test "x$ac_cv_prog_cc_c89" != xno; then :
6926 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6927else
6928 ac_cv_prog_cc_stdc=no
6929fi
6930
6931fi
6932 ;;
6933esac
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6935$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 6936 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
6937 $as_echo_n "(cached) " >&6
6938fi
6939
6940 case $ac_cv_prog_cc_stdc in #(
6941 no) :
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6943$as_echo "unsupported" >&6; } ;; #(
6944 '') :
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6946$as_echo "none needed" >&6; } ;; #(
6947 *) :
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6949$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6950esac
6951
1fd182f0
PE
6952
6953
4fc2b746 6954 # Code from module alloca-opt:
8d8af66d 6955 # Code from module allocator:
938a4ef9
GM
6956 # Code from module c-ctype:
6957 # Code from module c-strcase:
6c051bab 6958 # Code from module careadlinkat:
f199cab1 6959 # Code from module clock-time:
942f733f 6960 # Code from module crypto/md5:
40e27e7f 6961 # Code from module crypto/sha1:
d87ffdb7
GM
6962 # Code from module crypto/sha256:
6963 # Code from module crypto/sha512:
36f13e16 6964 # Code from module dosname:
f737437b 6965 # Code from module dtoastr:
f199cab1 6966 # Code from module dtotimespec:
7d2a1c5e 6967 # Code from module dup2:
93131e11 6968 # Code from module environ:
8966cbff 6969 # Code from module execinfo:
1fd182f0
PE
6970 # Code from module extensions:
6971
7cd2ed2c 6972 # Code from module extern-inline:
5fa4ac76 6973 # Code from module filemode:
1f5d53eb 6974 # Code from module getloadavg:
e275c824
PE
6975 # Code from module getopt-gnu:
6976 # Code from module getopt-posix:
6977 # Code from module gettext-h:
f199cab1
GM
6978 # Code from module gettime:
6979 # Code from module gettimeofday:
67342916 6980 # Code from module ignore-value:
1fd182f0
PE
6981 # Code from module include_next:
6982 # Code from module intprops:
4fda9c95 6983 # Code from module inttypes-incomplete:
369e19fc
PE
6984 # Code from module largefile:
6985
ae0d7250 6986 # Code from module lstat:
ac1ca7e9 6987 # Code from module manywarnings:
1fd182f0
PE
6988 # Code from module mktime:
6989 # Code from module multiarch:
369e19fc 6990 # Code from module nocrash:
a0a61e58 6991 # Code from module pathmax:
f199cab1 6992 # Code from module pselect:
3e0be4ab 6993 # Code from module pthread_sigmask:
ae0d7250 6994 # Code from module readlink:
2b1928b8 6995 # Code from module signal-h:
369e19fc
PE
6996 # Code from module snippet/_Noreturn:
6997 # Code from module snippet/arg-nonnull:
6998 # Code from module snippet/c++defs:
6999 # Code from module snippet/warn-on-use:
6ad6792b 7000 # Code from module socklen:
6c051bab 7001 # Code from module ssize_t:
ae0d7250 7002 # Code from module stat:
f199cab1 7003 # Code from module stat-time:
0eb775a3 7004 # Code from module stdalign:
6d153f56
GM
7005 # Code from module stdarg:
7006
8c069cc7
GM
7007
7008
16c3e636 7009 # Code from module stdbool:
1fd182f0 7010 # Code from module stddef:
5f90be1b 7011 # Code from module stdint:
6ad6792b 7012 # Code from module stdio:
1f5d53eb 7013 # Code from module stdlib:
16c3e636 7014 # Code from module strftime:
3e0be4ab
GM
7015 # Code from module strtoimax:
7016 # Code from module strtoll:
4fda9c95
GM
7017 # Code from module strtoull:
7018 # Code from module strtoumax:
ae0d7250 7019 # Code from module symlink:
f199cab1 7020 # Code from module sys_select:
5fa4ac76 7021 # Code from module sys_stat:
f199cab1 7022 # Code from module sys_time:
1fd182f0
PE
7023 # Code from module time:
7024 # Code from module time_r:
f199cab1
GM
7025 # Code from module timespec:
7026 # Code from module timespec-add:
7027 # Code from module timespec-sub:
d87ffdb7 7028 # Code from module u64:
e275c824 7029 # Code from module unistd:
f199cab1 7030 # Code from module utimens:
4fda9c95 7031 # Code from module verify:
ac1ca7e9 7032 # Code from module warnings:
1fd182f0
PE
7033
7034
6bd1cda5
GM
7035# It's helpful to have C macros available to GDB, so prefer -g3 to -g
7036# if -g3 works and the user does not specify CFLAGS.
7037# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
7038if test "$ac_test_CFLAGS" != set; then
7039 case $CFLAGS in
7040 '-g')
7041 emacs_g3_CFLAGS='-g3';;
7042 '-g -O2')
7043 emacs_g3_CFLAGS='-g3 -O2';;
7044 *)
7045 emacs_g3_CFLAGS='';;
7046 esac
7047 if test -n "$emacs_g3_CFLAGS"; then
7048 emacs_save_CFLAGS=$CFLAGS
7049 CFLAGS=$emacs_g3_CFLAGS
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts $emacs_g3_CFLAGS" >&5
7051$as_echo_n "checking whether $CC accepts $emacs_g3_CFLAGS... " >&6; }
7052if test "${emacs_cv_prog_cc_g3+set}" = set; then :
7053 $as_echo_n "(cached) " >&6
7054else
7055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7056/* end confdefs.h. */
7057
7058int
7059main ()
7060{
7061
7062 ;
7063 return 0;
7064}
7065_ACEOF
7066if ac_fn_c_try_link "$LINENO"; then :
7067 emacs_cv_prog_cc_g3=yes
7068else
7069 emacs_cv_prog_cc_g3=no
7070fi
7071rm -f core conftest.err conftest.$ac_objext \
7072 conftest$ac_exeext conftest.$ac_ext
7073fi
7074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
7075$as_echo "$emacs_cv_prog_cc_g3" >&6; }
7076 if test $emacs_cv_prog_cc_g3 = yes; then
7077 CFLAGS=$emacs_g3_CFLAGS
7078 else
7079 CFLAGS=$emacs_save_CFLAGS
7080 fi
7081 fi
7082fi
7083
a6b92a4a
GM
7084# Check whether --enable-gcc-warnings was given.
7085if test "${enable_gcc_warnings+set}" = set; then :
7086 enableval=$enable_gcc_warnings; case $enableval in
7087 yes|no) ;;
7088 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7089 esac
7090 gl_gcc_warnings=$enableval
7091else
7092 gl_gcc_warnings=no
7093
7094fi
7095
7096
e4d35030
GM
7097# Check whether --enable-link-time-optimization was given.
7098if test "${enable_link_time_optimization+set}" = set; then :
7099 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7101$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7102 ac_lto_supported=no
7103 if test x$GCC = xyes; then
7104 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7105 if test x$CPUS != x; then
7106 LTO="-flto=$CPUS"
7107 else
7108 LTO="-flto"
7109 fi
7110 old_CFLAGS=$CFLAGS
7111 CFLAGS="$CFLAGS $LTO"
7112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113/* end confdefs.h. */
7114
7115int
7116main ()
7117{
7118
7119 ;
7120 return 0;
7121}
7122_ACEOF
7123if ac_fn_c_try_compile "$LINENO"; then :
7124 ac_lto_supported=yes
7125else
7126 ac_lto_supported=no
7127fi
7128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7129 CFLAGS="$old_CFLAGS"
7130 fi
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7132$as_echo "$ac_lto_supported" >&6; }
7133 if test "$ac_lto_supported" = "yes"; then
7134 CFLAGS="$CFLAGS $LTO"
7135 fi
7136fi
7137fi
7138
7139
a6b92a4a
GM
7140# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7141# ------------------------------------------------
7142# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7143# Otherwise, run RUN-IF-NOT-FOUND.
7144
7145
7146# When compiling with GCC, prefer -isystem to -I when including system
7147# include files, to avoid generating useless diagnostics for the files.
7148if test "$gl_gcc_warnings" != yes; then
7149 isystem='-I'
7150else
7151 isystem='-isystem '
7152
7153 # This, $nw, is the list of warnings we disable.
7154 nw=
7155
7156 case $with_x_toolkit in
7157 lucid | athena | motif)
7158 # Old toolkits mishandle 'const'.
7159 nw="$nw -Wwrite-strings"
7160 ;;
7161 *)
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7163$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7164if test "${gl_cv_warn_c__Werror+set}" = set; then :
7165 $as_echo_n "(cached) " >&6
7166else
7167
7168 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7169 as_fn_append CFLAGS " -Werror"
a6b92a4a 7170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7171/* end confdefs.h. */
7172
7173int
7174main ()
7175{
7176
7177 ;
7178 return 0;
7179}
7180_ACEOF
7181if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7182 gl_cv_warn_c__Werror=yes
067d23c9 7183else
a6b92a4a 7184 gl_cv_warn_c__Werror=no
067d23c9
KY
7185fi
7186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7187 CFLAGS="$gl_save_compiler_FLAGS"
7188
7189fi
7190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7191$as_echo "$gl_cv_warn_c__Werror" >&6; }
7192if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7193 as_fn_append WERROR_CFLAGS " -Werror"
7194fi
7195
0eb775a3 7196
a6b92a4a
GM
7197 ;;
7198 esac
7199
7200
7201 nw="$nw -Waggregate-return" # anachronistic
ca0294bb 7202 nw="$nw -Wlong-long" # C90 is anachronistic
a6b92a4a
GM
7203 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7204 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7205 nw="$nw -Wtraditional" # Warns on #elif which we use often
7206 nw="$nw -Wcast-qual" # Too many warnings for now
7207 nw="$nw -Wconversion" # Too many warnings for now
7208 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7209 nw="$nw -Wsign-conversion" # Too many warnings for now
7210 nw="$nw -Woverlength-strings" # Not a problem these days
7211 nw="$nw -Wtraditional-conversion" # Too many warnings for now
fd9d2a9d 7212 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
a6b92a4a 7213 nw="$nw -Wpadded" # Our structs are not padded
fd9d2a9d 7214 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
a6b92a4a 7215 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7216 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7217 nw="$nw -Wvla" # warnings in gettext.h
7218 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7219 nw="$nw -Wswitch-enum" # Too many warnings for now
7220 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d
GM
7221 nw="$nw -Wfloat-equal" # warns about high-quality code
7222 nw="$nw -Winline" # OK to ignore 'inline'
6ec9a5a7 7223 nw="$nw -Wjump-misses-init" # We sometimes safely jump over init.
fd9d2a9d
GM
7224 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7225 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
a6b92a4a
GM
7226
7227 # Emacs doesn't care about shadowing; see
7228 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7229 nw="$nw -Wshadow"
7230
7231 # The following lines should be removable at some point.
7232 nw="$nw -Wstack-protector"
7233 nw="$nw -Wstrict-overflow"
a6b92a4a
GM
7234 nw="$nw -Wsuggest-attribute=pure"
7235
7236
7237
7238 if test -n "$GCC"; then
7239
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7241$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7242 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7243 $as_echo_n "(cached) " >&6
7244else
7245
7246 gl_save_CFLAGS="$CFLAGS"
7247 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7249/* end confdefs.h. */
7250
7251int
7252main ()
7253{
7254
7255 ;
7256 return 0;
7257}
7258_ACEOF
7259if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7260 gl_cv_cc_nomfi_supported=yes
067d23c9 7261else
a6b92a4a 7262 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7263fi
7264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7265 CFLAGS="$gl_save_CFLAGS"
7266fi
7267
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7269$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7270
7271 if test "$gl_cv_cc_nomfi_supported" = yes; then
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7273$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7274 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7275 $as_echo_n "(cached) " >&6
7276else
7277
7278 gl_save_CFLAGS="$CFLAGS"
7279 CFLAGS="$CFLAGS -W -Werror"
7280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7281/* end confdefs.h. */
7282void f (void)
7283 {
7284 typedef struct { int a; int b; } s_t;
7285 s_t s1 = { 0, };
7286 }
7287
7288int
7289main ()
7290{
7291
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296if ac_fn_c_try_compile "$LINENO"; then :
7297 gl_cv_cc_nomfi_needed=no
7298else
7299 gl_cv_cc_nomfi_needed=yes
7300fi
7301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7302 CFLAGS="$gl_save_CFLAGS"
7303
7304fi
7305
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7307$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7308 fi
7309 fi
7310
7311 gl_manywarn_set=
7312 for gl_manywarn_item in \
a6b92a4a 7313 -W \
dcde497f
GM
7314 -Wabi \
7315 -Waddress \
7316 -Wall \
7317 -Warray-bounds \
7318 -Wattributes \
a6b92a4a 7319 -Wbad-function-cast \
a6b92a4a 7320 -Wbuiltin-macro-redefined \
dcde497f
GM
7321 -Wcast-align \
7322 -Wchar-subscripts \
7323 -Wclobbered \
7324 -Wcomment \
7325 -Wcomments \
a6b92a4a 7326 -Wcoverage-mismatch \
a6b92a4a
GM
7327 -Wcpp \
7328 -Wdeprecated \
7329 -Wdeprecated-declarations \
dcde497f 7330 -Wdisabled-optimization \
a6b92a4a
GM
7331 -Wdiv-by-zero \
7332 -Wdouble-promotion \
dcde497f 7333 -Wempty-body \
a6b92a4a 7334 -Wendif-labels \
dcde497f 7335 -Wenum-compare \
a6b92a4a
GM
7336 -Wextra \
7337 -Wformat-contains-nul \
7338 -Wformat-extra-args \
dcde497f
GM
7339 -Wformat-nonliteral \
7340 -Wformat-security \
7341 -Wformat-y2k \
a6b92a4a
GM
7342 -Wformat-zero-length \
7343 -Wformat=2 \
dcde497f
GM
7344 -Wfree-nonheap-object \
7345 -Wignored-qualifiers \
7346 -Wimplicit \
7347 -Wimplicit-function-declaration \
7348 -Wimplicit-int \
7349 -Winit-self \
7350 -Winline \
7351 -Wint-to-pointer-cast \
7352 -Winvalid-memory-model \
7353 -Winvalid-pch \
7354 -Wjump-misses-init \
7355 -Wlogical-op \
7356 -Wmain \
7357 -Wmaybe-uninitialized \
7358 -Wmissing-braces \
7359 -Wmissing-declarations \
7360 -Wmissing-field-initializers \
7361 -Wmissing-format-attribute \
7362 -Wmissing-include-dirs \
7363 -Wmissing-noreturn \
7364 -Wmissing-parameter-type \
7365 -Wmissing-prototypes \
7366 -Wmudflap \
a6b92a4a 7367 -Wmultichar \
dcde497f
GM
7368 -Wnarrowing \
7369 -Wnested-externs \
7370 -Wnonnull \
a6b92a4a 7371 -Wnormalized=nfc \
dcde497f
GM
7372 -Wold-style-declaration \
7373 -Wold-style-definition \
a6b92a4a 7374 -Woverflow \
dcde497f
GM
7375 -Woverlength-strings \
7376 -Woverride-init \
7377 -Wpacked \
7378 -Wpacked-bitfield-compat \
7379 -Wparentheses \
7380 -Wpointer-arith \
7381 -Wpointer-sign \
a6b92a4a
GM
7382 -Wpointer-to-int-cast \
7383 -Wpragmas \
dcde497f
GM
7384 -Wreturn-type \
7385 -Wsequence-point \
7386 -Wshadow \
7387 -Wsizeof-pointer-memaccess \
7388 -Wstack-protector \
7389 -Wstrict-aliasing \
7390 -Wstrict-overflow \
7391 -Wstrict-prototypes \
a6b92a4a 7392 -Wsuggest-attribute=const \
dcde497f 7393 -Wsuggest-attribute=format \
a6b92a4a
GM
7394 -Wsuggest-attribute=noreturn \
7395 -Wsuggest-attribute=pure \
dcde497f
GM
7396 -Wswitch \
7397 -Wswitch-default \
7398 -Wsync-nand \
7399 -Wsystem-headers \
a6b92a4a 7400 -Wtrampolines \
dcde497f
GM
7401 -Wtrigraphs \
7402 -Wtype-limits \
7403 -Wuninitialized \
7404 -Wunknown-pragmas \
7405 -Wunreachable-code \
7406 -Wunsafe-loop-optimizations \
7407 -Wunused \
7408 -Wunused-but-set-parameter \
7409 -Wunused-but-set-variable \
7410 -Wunused-function \
7411 -Wunused-label \
7412 -Wunused-local-typedefs \
7413 -Wunused-macros \
7414 -Wunused-parameter \
7415 -Wunused-result \
7416 -Wunused-value \
7417 -Wunused-variable \
7418 -Wvarargs \
7419 -Wvariadic-macros \
7420 -Wvector-operation-performance \
7421 -Wvla \
7422 -Wvolatile-register-var \
7423 -Wwrite-strings \
7424 \
a6b92a4a
GM
7425 ; do
7426 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7427 done
7428
7429 # Disable the missing-field-initializers warning if needed
7430 if test "$gl_cv_cc_nomfi_needed" = yes; then
7431 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7432 fi
7433
7434 ws=$gl_manywarn_set
7435
7436
7437 gl_warn_set=
7438 set x $ws; shift
7439 for gl_warn_item
7440 do
7441 case " $nw " in
7442 *" $gl_warn_item "*)
7443 ;;
7444 *)
7445 gl_warn_set="$gl_warn_set $gl_warn_item"
7446 ;;
7447 esac
7448 done
7449 ws=$gl_warn_set
7450
7451 for w in $ws; do
7452 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7454$as_echo_n "checking whether C compiler handles $w... " >&6; }
7455if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7456 $as_echo_n "(cached) " >&6
7457else
7458
7459 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7460 as_fn_append CFLAGS " $w"
a6b92a4a
GM
7461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7462/* end confdefs.h. */
7463
7464int
7465main ()
7466{
7467
7468 ;
7469 return 0;
7470}
7471_ACEOF
7472if ac_fn_c_try_compile "$LINENO"; then :
7473 eval "$as_gl_Warn=yes"
7474else
7475 eval "$as_gl_Warn=no"
7476fi
7477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7478 CFLAGS="$gl_save_compiler_FLAGS"
7479
7480fi
7481eval ac_res=\$$as_gl_Warn
7482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7483$as_echo "$ac_res" >&6; }
7484eval as_val=\$$as_gl_Warn
7485 if test "x$as_val" = x""yes; then :
7486 as_fn_append WARN_CFLAGS " $w"
7487fi
7488
0eb775a3 7489
a6b92a4a
GM
7490 done
7491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7492$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7493if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7494 $as_echo_n "(cached) " >&6
7495else
7496
7497 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7498 as_fn_append CFLAGS " -Wno-missing-field-initializers"
a6b92a4a
GM
7499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7500/* end confdefs.h. */
7501
7502int
7503main ()
7504{
7505
7506 ;
7507 return 0;
7508}
7509_ACEOF
7510if ac_fn_c_try_compile "$LINENO"; then :
7511 gl_cv_warn_c__Wno_missing_field_initializers=yes
7512else
7513 gl_cv_warn_c__Wno_missing_field_initializers=no
7514fi
7515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7516 CFLAGS="$gl_save_compiler_FLAGS"
7517
7518fi
7519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7520$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7521if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7522 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7523fi
0eb775a3 7524
a6b92a4a
GM
7525 # We need this one
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7527$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7528if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7529 $as_echo_n "(cached) " >&6
7530else
7531
7532 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7533 as_fn_append CFLAGS " -Wno-sign-compare"
a6b92a4a
GM
7534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7535/* end confdefs.h. */
7536
7537int
7538main ()
7539{
7540
7541 ;
7542 return 0;
7543}
7544_ACEOF
7545if ac_fn_c_try_compile "$LINENO"; then :
7546 gl_cv_warn_c__Wno_sign_compare=yes
7547else
7548 gl_cv_warn_c__Wno_sign_compare=no
7549fi
7550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7551 CFLAGS="$gl_save_compiler_FLAGS"
7552
7553fi
7554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7555$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7556if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7557 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7558fi
0eb775a3 7559
a6b92a4a
GM
7560 # Too many warnings for now
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7562$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7563if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7564 $as_echo_n "(cached) " >&6
7565else
7566
7567 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7568 as_fn_append CFLAGS " -Wno-type-limits"
a6b92a4a
GM
7569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7570/* end confdefs.h. */
7571
7572int
7573main ()
7574{
7575
7576 ;
7577 return 0;
7578}
7579_ACEOF
7580if ac_fn_c_try_compile "$LINENO"; then :
7581 gl_cv_warn_c__Wno_type_limits=yes
7582else
7583 gl_cv_warn_c__Wno_type_limits=no
7584fi
7585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7586 CFLAGS="$gl_save_compiler_FLAGS"
7587
7588fi
7589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7590$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7591if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7592 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7593fi
0eb775a3 7594
a6b92a4a
GM
7595 # Too many warnings for now
7596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7597$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7598if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7599 $as_echo_n "(cached) " >&6
7600else
7601
7602 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7603 as_fn_append CFLAGS " -Wno-switch"
a6b92a4a
GM
7604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7605/* end confdefs.h. */
7606
7607int
7608main ()
7609{
7610
7611 ;
7612 return 0;
7613}
7614_ACEOF
7615if ac_fn_c_try_compile "$LINENO"; then :
7616 gl_cv_warn_c__Wno_switch=yes
7617else
7618 gl_cv_warn_c__Wno_switch=no
7619fi
7620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7621 CFLAGS="$gl_save_compiler_FLAGS"
7622
7623fi
7624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7625$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7626if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7627 as_fn_append WARN_CFLAGS " -Wno-switch"
7628fi
0eb775a3 7629
a6b92a4a
GM
7630 # Too many warnings for now
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7632$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7633if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7634 $as_echo_n "(cached) " >&6
7635else
7636
7637 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7638 as_fn_append CFLAGS " -Wno-unused-parameter"
a6b92a4a
GM
7639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640/* end confdefs.h. */
7641
7642int
7643main ()
7644{
7645
7646 ;
7647 return 0;
7648}
7649_ACEOF
7650if ac_fn_c_try_compile "$LINENO"; then :
7651 gl_cv_warn_c__Wno_unused_parameter=yes
7652else
7653 gl_cv_warn_c__Wno_unused_parameter=no
7654fi
7655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7656 CFLAGS="$gl_save_compiler_FLAGS"
7657
7658fi
7659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7660$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7661if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7662 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7663fi
0eb775a3 7664
a6b92a4a
GM
7665 # Too many warnings for now
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7667$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7668if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7669 $as_echo_n "(cached) " >&6
7670else
7671
7672 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7673 as_fn_append CFLAGS " -Wno-format-nonliteral"
a6b92a4a
GM
7674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7675/* end confdefs.h. */
7676
7677int
7678main ()
7679{
7680
7681 ;
7682 return 0;
7683}
7684_ACEOF
7685if ac_fn_c_try_compile "$LINENO"; then :
7686 gl_cv_warn_c__Wno_format_nonliteral=yes
7687else
7688 gl_cv_warn_c__Wno_format_nonliteral=no
7689fi
7690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7691 CFLAGS="$gl_save_compiler_FLAGS"
7692
7693fi
7694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7695$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7696if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7697 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7698fi
7699
7700
0eb775a3 7701
a6b92a4a
GM
7702 # In spite of excluding -Wlogical-op above, it is enabled, as of
7703 # gcc 4.5.0 20090517.
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7705$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7706if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7707 $as_echo_n "(cached) " >&6
7708else
7709
7710 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7711 as_fn_append CFLAGS " -Wno-logical-op"
a6b92a4a
GM
7712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7713/* end confdefs.h. */
7714
7715int
7716main ()
7717{
7718
7719 ;
7720 return 0;
7721}
7722_ACEOF
7723if ac_fn_c_try_compile "$LINENO"; then :
7724 gl_cv_warn_c__Wno_logical_op=yes
7725else
7726 gl_cv_warn_c__Wno_logical_op=no
7727fi
7728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7729 CFLAGS="$gl_save_compiler_FLAGS"
7730
7731fi
7732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
7733$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
7734if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
7735 as_fn_append WARN_CFLAGS " -Wno-logical-op"
7736fi
7737
7738
0eb775a3 7739
a6b92a4a
GM
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7741$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7742if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
7743 $as_echo_n "(cached) " >&6
7744else
7745
7746 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7747 as_fn_append CFLAGS " -fdiagnostics-show-option"
a6b92a4a 7748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7749/* end confdefs.h. */
7750
7751int
7752main ()
7753{
7754
7755 ;
7756 return 0;
7757}
7758_ACEOF
7759if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7760 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 7761else
a6b92a4a 7762 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
7763fi
7764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7765 CFLAGS="$gl_save_compiler_FLAGS"
7766
7767fi
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7769$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7770if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
7771 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 7772fi
067d23c9 7773
0eb775a3 7774
a6b92a4a
GM
7775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7776$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7777if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
7778 $as_echo_n "(cached) " >&6
7779else
7780
7781 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7782 as_fn_append CFLAGS " -funit-at-a-time"
a6b92a4a
GM
7783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7784/* end confdefs.h. */
7785
7786int
7787main ()
7788{
7789
7790 ;
7791 return 0;
7792}
7793_ACEOF
7794if ac_fn_c_try_compile "$LINENO"; then :
7795 gl_cv_warn_c__funit_at_a_time=yes
7796else
7797 gl_cv_warn_c__funit_at_a_time=no
7798fi
7799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7800 CFLAGS="$gl_save_compiler_FLAGS"
7801
7802fi
7803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7804$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7805if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
7806 as_fn_append WARN_CFLAGS " -funit-at-a-time"
7807fi
7808
7809
7810
0eb775a3 7811
a6b92a4a
GM
7812$as_echo "#define lint 1" >>confdefs.h
7813
7814
a6b92a4a
GM
7815
7816$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
7817
7818
7819 # We use a slightly smaller set of warning options for lib/.
7820 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
7821 nw=
7822 nw="$nw -Wunused-macros"
7823
7824
7825 gl_warn_set=
7826 set x $WARN_CFLAGS; shift
7827 for gl_warn_item
7828 do
7829 case " $nw " in
7830 *" $gl_warn_item "*)
7831 ;;
7832 *)
7833 gl_warn_set="$gl_warn_set $gl_warn_item"
7834 ;;
7835 esac
7836 done
7837 GNULIB_WARN_CFLAGS=$gl_warn_set
7838
7839
7840fi
067d23c9
KY
7841
7842
7843
0e733db9
GM
7844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7845$as_echo_n "checking whether ln -s works... " >&6; }
7846LN_S=$as_ln_s
7847if test "$LN_S" = "ln -s"; then
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7849$as_echo "yes" >&6; }
7850else
7851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7852$as_echo "no, using $LN_S" >&6; }
7853fi
7854
067d23c9 7855
067d23c9
KY
7856# Extract the first word of "install-info", so it can be a program name with args.
7857set dummy install-info; ac_word=$2
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7859$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 7860if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
7861 $as_echo_n "(cached) " >&6
7862else
7863 case $INSTALL_INFO in
7864 [\\/]* | ?:[\\/]*)
7865 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7866 ;;
7867 *)
7868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 7869for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
7870do
7871 IFS=$as_save_IFS
7872 test -z "$as_dir" && as_dir=.
7873 for ac_exec_ext in '' $ac_executable_extensions; do
7874 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7875 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7877 break 2
7878 fi
7879done
7880 done
7881IFS=$as_save_IFS
7882
7883 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
7884 ;;
7885esac
7886fi
7887INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7888if test -n "$INSTALL_INFO"; then
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7890$as_echo "$INSTALL_INFO" >&6; }
7891else
7892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7893$as_echo "no" >&6; }
7894fi
7895
7896
7897# Extract the first word of "gzip", so it can be a program name with args.
7898set dummy gzip; ac_word=$2
7899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7900$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 7901if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
7902 $as_echo_n "(cached) " >&6
7903else
7904 case $GZIP_PROG in
7905 [\\/]* | ?:[\\/]*)
7906 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
7907 ;;
7908 *)
7909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7910for as_dir in $PATH
7911do
7912 IFS=$as_save_IFS
7913 test -z "$as_dir" && as_dir=.
7914 for ac_exec_ext in '' $ac_executable_extensions; do
7915 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7916 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
7917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7918 break 2
7919 fi
7920done
7921 done
7922IFS=$as_save_IFS
7923
7924 ;;
7925esac
7926fi
7927GZIP_PROG=$ac_cv_path_GZIP_PROG
7928if test -n "$GZIP_PROG"; then
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
7930$as_echo "$GZIP_PROG" >&6; }
7931else
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933$as_echo "no" >&6; }
7934fi
7935
7936
7ee3791f
GM
7937
7938if test $opsys = gnu-linux; then
7939 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
7940set dummy paxctl; ac_word=$2
7941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7942$as_echo_n "checking for $ac_word... " >&6; }
7943if test "${ac_cv_path_PAXCTL+set}" = set; then :
7944 $as_echo_n "(cached) " >&6
7945else
7946 case $PAXCTL in
7947 [\\/]* | ?:[\\/]*)
7948 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
7949 ;;
7950 *)
7951 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7952for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
7953do
7954 IFS=$as_save_IFS
7955 test -z "$as_dir" && as_dir=.
7956 for ac_exec_ext in '' $ac_executable_extensions; do
7957 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7958 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
7959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7960 break 2
7961 fi
7962done
7963 done
7964IFS=$as_save_IFS
7965
7966 ;;
7967esac
7968fi
7969PAXCTL=$ac_cv_path_PAXCTL
7970if test -n "$PAXCTL"; then
7971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
7972$as_echo "$PAXCTL" >&6; }
7973else
7974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7975$as_echo "no" >&6; }
7976fi
7977
7978
685e57ea
GM
7979 if test "X$PAXCTL" != X; then
7980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether binaries have a PT_PAX_FLAGS header" >&5
7981$as_echo_n "checking whether binaries have a PT_PAX_FLAGS header... " >&6; }
7982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7983/* end confdefs.h. */
7984
7985int
7986main ()
7987{
7988
7989 ;
7990 return 0;
7991}
7992_ACEOF
7993if ac_fn_c_try_link "$LINENO"; then :
7994 if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7995$as_echo "yes" >&6; }
7996 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7997$as_echo "no" >&6; }; PAXCTL=""; fi
7998fi
7999rm -f core conftest.err conftest.$ac_objext \
8000 conftest$ac_exeext conftest.$ac_ext
8001 fi
7ee3791f 8002fi
067d23c9 8003
9e40dda4 8004## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
8005# Extract the first word of "makeinfo", so it can be a program name with args.
8006set dummy makeinfo; ac_word=$2
8007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8008$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 8009if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
8010 $as_echo_n "(cached) " >&6
8011else
8012 case $MAKEINFO in
8013 [\\/]* | ?:[\\/]*)
8014 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
8015 ;;
8016 *)
8017 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8018for as_dir in $PATH
8019do
8020 IFS=$as_save_IFS
8021 test -z "$as_dir" && as_dir=.
8022 for ac_exec_ext in '' $ac_executable_extensions; do
8023 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8024 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
8025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8026 break 2
8027 fi
8028done
8029 done
8030IFS=$as_save_IFS
8031
8032 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
8033 ;;
8034esac
8035fi
8036MAKEINFO=$ac_cv_path_MAKEINFO
8037if test -n "$MAKEINFO"; then
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
8039$as_echo "$MAKEINFO" >&6; }
8040else
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8042$as_echo "no" >&6; }
8043fi
8044
8045
8046if test "$MAKEINFO" != "no" && \
9e40dda4 8047 test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[7-9]|4\.[1-6][0-9]+)'`" = x; then
067d23c9
KY
8048 MAKEINFO=no
8049fi
8050
8051## Makeinfo is unusual. For a released Emacs, the manuals are
8052## pre-built, and not deleted by the normal clean rules. makeinfo is
8053## therefore in the category of "special tools" not normally required, which
8054## configure does not have to check for (eg autoconf itself).
8055## In a Bazaar checkout on the other hand, the manuals are not included.
8056## So makeinfo is a requirement to build from Bazaar, and configure
8057## should test for it as it does for any other build requirement.
8058## We use the presence of $srcdir/info/emacs to distinguish a release,
8059## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
8060HAVE_MAKEINFO=yes
8061
067d23c9 8062if test "$MAKEINFO" = "no"; then
96f129d5 8063 MAKEINFO=makeinfo
067d23c9 8064 if test "x${with_makeinfo}" = "xno"; then
96f129d5 8065 HAVE_MAKEINFO=no
067d23c9 8066 elif test ! -e $srcdir/info/emacs; then
9e40dda4 8067 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
8068source tree does not seem to have pre-built manuals in the \`info' directory.
8069Either install a suitable version of makeinfo, or re-run configure
8070with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
8071 fi
8072fi
8073
8074
141d074d
GM
8075INFO_EXT=.info
8076INFO_OPTS=--no-split
8077
8078
8079
96f129d5 8080
067d23c9
KY
8081if test x$GCC = xyes; then
8082 test "x$GCC_LINK_TEST_OPTIONS" != x && \
8083 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
8084else
8085 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
8086 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
8087fi
8088
8089
8090late_LDFLAGS=$LDFLAGS
8091if test x$GCC = xyes; then
8092 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
8093else
8094 LDFLAGS="$LDFLAGS -znocombreloc"
8095fi
8096
8097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
8098$as_echo_n "checking for -znocombreloc... " >&6; }
8099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8100/* end confdefs.h. */
8101
8102int
8103main ()
8104{
8105
8106 ;
8107 return 0;
8108}
8109_ACEOF
8110if ac_fn_c_try_link "$LINENO"; then :
8111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8112$as_echo "yes" >&6; }
8113else
8114 LDFLAGS=$late_LDFLAGS
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
8117fi
8118rm -f core conftest.err conftest.$ac_objext \
8119 conftest$ac_exeext conftest.$ac_ext
8120
8121
125c3718 8122test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 8123case "$opsys" in
125c3718
PE
8124 your-opsys-here) CANNOT_DUMP=yes ;;
8125esac
8126
8127test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
8128
8129$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8130
125c3718 8131
067d23c9
KY
8132
8133
8134
8135UNEXEC_OBJ=unexelf.o
8136case "$opsys" in
8137 # MSDOS uses unexcoff.o
8138 # MSWindows uses unexw32.o
8139 aix4-2)
8140 UNEXEC_OBJ=unexaix.o
8141 ;;
8142 cygwin)
8143 UNEXEC_OBJ=unexcw.o
8144 ;;
8145 darwin)
8146 UNEXEC_OBJ=unexmacosx.o
8147 ;;
8148 hpux10-20 | hpux11)
8149 UNEXEC_OBJ=unexhp9k800.o
8150 ;;
8151 sol2-10)
8152 # Use the Solaris dldump() function, called from unexsol.c, to dump
8153 # emacs, instead of the generic ELF dump code found in unexelf.c.
8154 # The resulting binary has a complete symbol table, and is better
8155 # for debugging and other observability tools (debuggers, pstack, etc).
8156 #
8157 # If you encounter a problem using dldump(), please consider sending
8158 # a message to the OpenSolaris tools-linking mailing list:
8159 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8160 #
8161 # It is likely that dldump() works with older Solaris too, but this has
8162 # not been tested, so for now this change is for Solaris 10 or newer.
8163 UNEXEC_OBJ=unexsol.o
8164 ;;
8165esac
8166
8167LD_SWITCH_SYSTEM=
8168case "$opsys" in
8169 freebsd)
8170 ## Let `ld' find image libs and similar things in /usr/local/lib.
8171 ## The system compiler, GCC, has apparently been modified to not
8172 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8173### It's not our place to do this. See bug#10313#17.
8174### LD_SWITCH_SYSTEM=-L/usr/local/lib
8175 :
067d23c9
KY
8176 ;;
8177
8178 gnu-linux)
8179 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8180 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8181 ;;
8182
8183 netbsd)
a7479549
GM
8184### It's not our place to do this. See bug#10313#17.
8185### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8186 :
067d23c9
KY
8187 ;;
8188
8189 openbsd)
8190 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8191 ## otherwise Emacs dumps core on elf systems.
8192 LD_SWITCH_SYSTEM="-Z"
8193 ;;
8194esac
8195
8196
8197ac_link="$ac_link $LD_SWITCH_SYSTEM"
8198
ae629dae 8199## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8200## which has not been defined yet. When this was handled with cpp,
8201## it was expanded to null when configure sourced the s/*.h file.
8202## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8203## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8204## (or somesuch), but because it is supposed to go at the _front_
8205## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8206## Compare with the gnu-linux case below, which added to the end
8207## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8208## LD_SWITCH_SYSTEM_TEMACS.
8209case "$opsys" in
8210 netbsd|openbsd)
ae629dae 8211 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8212esac
8213
8214
8215C_SWITCH_MACHINE=
42bbbe8b
GM
8216case $canonical in
8217 alpha*)
067d23c9 8218 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8219if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8220
8221fi
8222
8223 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8224 ## With ELF, make sure that all common symbols get allocated to in the
8225 ## data section. Otherwise, the dump of temacs may miss variables in
8226 ## the shared library that have been initialized. For example, with
8227 ## GNU libc, __malloc_initialized would normally be resolved to the
8228 ## shared library's .bss section, which is fatal.
8229 if test "x$GCC" = "xyes"; then
8230 C_SWITCH_MACHINE="-fno-common"
8231 else
a9bec17c 8232 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8233 fi
8234 else
8235 UNEXEC_OBJ=unexalpha.o
8236 fi
42bbbe8b
GM
8237 ;;
8238esac
067d23c9
KY
8239
8240
8241
8242
8243C_SWITCH_SYSTEM=
8244## Some programs in src produce warnings saying certain subprograms
8245## are too complex and need a MAXMEM value greater than 2000 for
8246## additional optimization. --nils@exp-math.uni-essen.de
8247test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8248 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8249## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8250## It is redundant in glibc2, since we define _GNU_SOURCE.
8251
8252
8253
8254LIBS_SYSTEM=
8255case "$opsys" in
8256 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8257 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8258
8259 freebsd) LIBS_SYSTEM="-lutil" ;;
8260
8261 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8262
1f5d53eb 8263 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8264
8265 ## Motif needs -lgen.
8266 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8267esac
8268
8269
8270
8271### Make sure subsequent tests use flags consistent with the build flags.
8272
8273if test x"${OVERRIDE_CPPFLAGS}" != x; then
8274 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8275else
8276 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8277fi
8278
4fda9c95
GM
8279# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8280
3e0be4ab
GM
8281# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8282
4fda9c95 8283
067d23c9 8284
067d23c9
KY
8285LIB_MATH=-lm
8286LIB_STANDARD=
8287START_FILES=
4717915f 8288SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8289
8290case $opsys in
8291 cygwin )
8292 LIB_MATH=
8293 START_FILES='pre-crt0.o'
8294 ;;
8295 darwin )
8296 ## Adding -lm confuses the dynamic linker, so omit it.
8297 LIB_MATH=
8298 START_FILES='pre-crt0.o'
8299 ;;
8300 freebsd )
6b10626d
GM
8301 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8302 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
15f79fcd 8303 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8304 ;;
8305 gnu-linux | gnu-kfreebsd )
8306 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8307 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8308 ;;
8309 hpux10-20 | hpux11 )
8310 LIB_STANDARD=-lc
8311 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
8312 ;;
bb72ce91
GM
8313 netbsd | openbsd )
8314 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8315 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
15f79fcd 8316 SYSTEM_TYPE=berkeley-unix
067d23c9 8317 ;;
15f79fcd
GM
8318
8319 sol2* | unixware )
8320 SYSTEM_TYPE=usg-unix-v
8321 ;;
8322
067d23c9
KY
8323esac
8324
8325
8326
8327
15f79fcd
GM
8328cat >>confdefs.h <<_ACEOF
8329#define SYSTEM_TYPE "$SYSTEM_TYPE"
8330_ACEOF
8331
8332
130f1dac
GM
8333crt_files=
8334
8335for file in x $LIB_STANDARD $START_FILES; do
8336 case "$file" in
8337 *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
8338 esac
8339done
8340
8341if test "x$crt_files" != x; then
8342
8343 ## If user specified a crt-dir, use that unconditionally.
8344 crt_gcc=no
8345
8346 if test "X$CRT_DIR" = "X"; then
8347
8348 CRT_DIR=/usr/lib # default
8349
8350 case "$canonical" in
8351 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
8352 ## On x86-64 and s390x GNU/Linux distributions, the standard library
8353 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
8354 ## For anything else (eg /usr/lib32), it is up the user to specify
8355 ## the location (bug#5655).
8356 ## Test for crtn.o, not just the directory, because sometimes the
8357 ## directory exists but does not have the relevant files (bug#1287).
8358 ## FIXME better to test for binary compatibility somehow.
8359 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
8360 ;;
8361
8362 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
8363 esac
8364
8365 case "$opsys" in
8366 hpux10-20) CRT_DIR=/lib ;;
8367 esac
8368
8369 test "x${GCC}" = xyes && crt_gcc=yes
8370
8371 fi # CRT_DIR = ""
8372
8373 crt_missing=
8374
8375 for file in $crt_files; do
8376
8377 ## If we're using gcc, try to determine it automatically by asking
8378 ## gcc. [If this doesn't work, CRT_DIR will remain at the
8379 ## system-dependent default from above.]
8380 if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
8381
8382 crt_file=`$CC --print-file-name=$file 2>/dev/null`
8383 case "$crt_file" in
8384 */*)
8385 CRT_DIR=`$as_dirname -- "$crt_file" ||
8386$as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8387 X"$crt_file" : 'X\(//\)[^/]' \| \
8388 X"$crt_file" : 'X\(//\)$' \| \
8389 X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
8390$as_echo X"$crt_file" |
8391 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8392 s//\1/
8393 q
8394 }
8395 /^X\(\/\/\)[^/].*/{
8396 s//\1/
8397 q
8398 }
8399 /^X\(\/\/\)$/{
8400 s//\1/
8401 q
8402 }
8403 /^X\(\/\).*/{
8404 s//\1/
8405 q
8406 }
8407 s/.*/./; q'`
8408 ;;
8409 esac
8410 fi
8411
8412 crt_gcc=no
8413
8414 test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
8415 done # $crt_files
8416
8417 test "x$crt_missing" = x || \
a9bec17c 8418 as_fn_error "Required file(s) not found:$crt_missing
130f1dac
GM
8419Try using the --with-crt-dir option." "$LINENO" 5
8420
8421fi # crt_files != ""
8422
8423
8424
bb72ce91
GM
8425case $opsys in
8426 netbsd | openbsd )
8427 if test -f $CRT_DIR/crti.o; then
8428
8429 test -f $CRT_DIR/crtn.o || \
8430 as_fn_error "Required file not found: crtn.o" "$LINENO" 5
8431
8432 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8433 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8434 fi
8435 ;;
8436esac
8437
130f1dac 8438
5476a9a4
GM
8439pre_PKG_CONFIG_CFLAGS=$CFLAGS
8440pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 8441
5476a9a4
GM
8442# Extract the first word of "pkg-config", so it can be a program name with args.
8443set dummy pkg-config; ac_word=$2
8444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8445$as_echo_n "checking for $ac_word... " >&6; }
8446if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8447 $as_echo_n "(cached) " >&6
8448else
8449 case $PKG_CONFIG in
8450 [\\/]* | ?:[\\/]*)
8451 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8452 ;;
8453 *)
8454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8455for as_dir in $PATH
8456do
8457 IFS=$as_save_IFS
8458 test -z "$as_dir" && as_dir=.
8459 for ac_exec_ext in '' $ac_executable_extensions; do
8460 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8461 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8463 break 2
8464 fi
8465done
8466 done
8467IFS=$as_save_IFS
8468
8469 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8470 ;;
8471esac
8472fi
8473PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8474if test -n "$PKG_CONFIG"; then
8475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8476$as_echo "$PKG_CONFIG" >&6; }
8477else
8478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8479$as_echo "no" >&6; }
8480fi
f199cab1
GM
8481
8482
f199cab1 8483
5476a9a4
GM
8484
8485
8486
8487if test "${with_sound}" != "no"; then
8488 # Sound support for GNU/Linux and the free BSDs.
8489 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8490do :
8491 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8492ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8493eval as_val=\$$as_ac_Header
8494 if test "x$as_val" = x""yes; then :
8495 cat >>confdefs.h <<_ACEOF
8496#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8497_ACEOF
8498 have_sound_header=yes
8499fi
8500
8501done
8502
8503 # Emulation library used on NetBSD.
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8505$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8506if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
8507 $as_echo_n "(cached) " >&6
8508else
5476a9a4
GM
8509 ac_check_lib_save_LIBS=$LIBS
8510LIBS="-lossaudio $LIBS"
8511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8512/* end confdefs.h. */
5476a9a4
GM
8513
8514/* Override any GCC internal prototype to avoid an error.
8515 Use char because int might match the return type of a GCC
8516 builtin and then its argument prototype would still apply. */
8517#ifdef __cplusplus
8518extern "C"
8519#endif
8520char _oss_ioctl ();
067d23c9
KY
8521int
8522main ()
8523{
5476a9a4 8524return _oss_ioctl ();
067d23c9
KY
8525 ;
8526 return 0;
8527}
8528_ACEOF
8529if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 8530 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 8531else
5476a9a4 8532 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
8533fi
8534rm -f core conftest.err conftest.$ac_objext \
8535 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
8536LIBS=$ac_check_lib_save_LIBS
8537fi
8538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8539$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8540if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8541 LIBSOUND=-lossaudio
8542else
8543 LIBSOUND=
067d23c9
KY
8544fi
8545
8546
8547
5476a9a4
GM
8548 ALSA_REQUIRED=1.0.0
8549 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8550
8551 succeeded=no
8552
8553 if test "$PKG_CONFIG" = "no" ; then
8554 HAVE_ALSA=no
8555 else
8556 PKG_CONFIG_MIN_VERSION=0.9.0
8557 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8559$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8560
8561 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 &&
8562 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` &&
8563 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then
8564 edit_cflags="
8565 s,///*,/,g
8566 s/^/ /
8567 s/ -I/ $isystem/g
8568 s/^ //
8569 "
8570 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8571 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8573$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8574 succeeded=yes
8575 else
8576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
8578 ALSA_CFLAGS=""
8579 ALSA_LIBS=""
8580 ## If we have a custom action on failure, don't print errors, but
8581 ## do set a variable so people can do so.
8582 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
8583
8584 fi
8585
8586
8587
8588 else
8589 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8590 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8591 fi
8592 fi
8593
8594 if test $succeeded = yes; then
8595 HAVE_ALSA=yes
8596 else
8597 HAVE_ALSA=no
8598 fi
f199cab1 8599
5476a9a4
GM
8600 if test $HAVE_ALSA = yes; then
8601 SAVE_CFLAGS="$CFLAGS"
8602 SAVE_LIBS="$LIBS"
8603 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8604 LIBS="$ALSA_LIBS $LIBS"
8605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8606/* end confdefs.h. */
8607#include <asoundlib.h>
067d23c9
KY
8608int
8609main ()
8610{
5476a9a4 8611snd_lib_error_set_handler (0);
067d23c9
KY
8612 ;
8613 return 0;
8614}
8615_ACEOF
5476a9a4
GM
8616if ac_fn_c_try_compile "$LINENO"; then :
8617 emacs_alsa_normal=yes
067d23c9 8618else
5476a9a4 8619 emacs_alsa_normal=no
067d23c9 8620fi
5476a9a4
GM
8621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8622 if test "$emacs_alsa_normal" != yes; then
8623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8624/* end confdefs.h. */
8625#include <alsa/asoundlib.h>
8626int
8627main ()
8628{
8629snd_lib_error_set_handler (0);
8630 ;
8631 return 0;
8632}
8633_ACEOF
8634if ac_fn_c_try_compile "$LINENO"; then :
8635 emacs_alsa_subdir=yes
8636else
8637 emacs_alsa_subdir=no
f199cab1 8638fi
5476a9a4
GM
8639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8640 if test "$emacs_alsa_subdir" != yes; then
8641 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8642 fi
8643 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8644 fi
067d23c9 8645
5476a9a4
GM
8646 CFLAGS="$SAVE_CFLAGS"
8647 LIBS="$SAVE_LIBS"
8648 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8649 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 8650
5476a9a4 8651$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 8652
5476a9a4 8653 fi
067d23c9 8654
5476a9a4
GM
8655 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8656 case "$opsys" in
8657 gnu-linux|freebsd|netbsd)
067d23c9 8658
5476a9a4 8659$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 8660
5476a9a4
GM
8661 ;;
8662 esac
8663 fi
067d23c9
KY
8664
8665
5476a9a4 8666fi
067d23c9 8667
e700232f
GM
8668
8669
8670
5476a9a4
GM
8671 for ac_header in $ac_header_list
8672do :
8673 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8674ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8675"
8676eval as_val=\$$as_ac_Header
8677 if test "x$as_val" = x""yes; then :
8678 cat >>confdefs.h <<_ACEOF
8679#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
8680_ACEOF
8681
f199cab1 8682fi
e700232f 8683
5476a9a4
GM
8684done
8685
8686
e700232f
GM
8687
8688
8689
f199cab1 8690
067d23c9 8691
067d23c9 8692
067d23c9 8693
067d23c9 8694
f199cab1
GM
8695
8696
8697
067d23c9 8698
067d23c9 8699
f199cab1
GM
8700
8701
8702
f199cab1 8703
f199cab1 8704
067d23c9 8705
f199cab1 8706
067d23c9 8707
5476a9a4
GM
8708
8709
8710
8711
8712
8713
8714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8715$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8717/* end confdefs.h. */
8718#include <sys/personality.h>
067d23c9
KY
8719int
8720main ()
8721{
5476a9a4 8722personality (PER_LINUX32)
067d23c9
KY
8723 ;
8724 return 0;
8725}
8726_ACEOF
8727if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8728 emacs_cv_personality_linux32=yes
067d23c9 8729else
5476a9a4 8730 emacs_cv_personality_linux32=no
067d23c9 8731fi
f199cab1 8732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8734$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 8735
5476a9a4 8736if test $emacs_cv_personality_linux32 = yes; then
f199cab1 8737
5476a9a4
GM
8738$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8739
8740fi
8741
8742for ac_header in term.h
8743do :
8744 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8745if test "x$ac_cv_header_term_h" = x""yes; then :
8746 cat >>confdefs.h <<_ACEOF
8747#define HAVE_TERM_H 1
067d23c9 8748_ACEOF
5476a9a4
GM
8749
8750fi
8751
8752done
8753
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8755$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8756if test "${ac_cv_header_time+set}" = set; then :
8757 $as_echo_n "(cached) " >&6
8758else
8759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8760/* end confdefs.h. */
5476a9a4
GM
8761#include <sys/types.h>
8762#include <sys/time.h>
8763#include <time.h>
f199cab1 8764
067d23c9
KY
8765int
8766main ()
8767{
5476a9a4
GM
8768if ((struct tm *) 0)
8769return 0;
067d23c9
KY
8770 ;
8771 return 0;
8772}
8773_ACEOF
8774if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8775 ac_cv_header_time=yes
067d23c9 8776else
5476a9a4 8777 ac_cv_header_time=no
067d23c9
KY
8778fi
8779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8780fi
5476a9a4
GM
8781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8782$as_echo "$ac_cv_header_time" >&6; }
8783if test $ac_cv_header_time = yes; then
f199cab1 8784
5476a9a4
GM
8785$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8786
8787fi
8788
8789ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
8790if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8791 ac_have_decl=1
8792else
8793 ac_have_decl=0
8794fi
8795
8796cat >>confdefs.h <<_ACEOF
8797#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 8798_ACEOF
5476a9a4
GM
8799
8800if test $ac_cv_have_decl_sys_siglist != yes; then
8801 # For Tru64, at least:
8802 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
8803if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8804 ac_have_decl=1
8805else
8806 ac_have_decl=0
067d23c9 8807fi
5476a9a4
GM
8808
8809cat >>confdefs.h <<_ACEOF
8810#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8811_ACEOF
8812
8813 if test $ac_cv_have_decl___sys_siglist = yes; then
8814
8815$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8816
8817 fi
8818fi
8819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8820$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8821if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8822 $as_echo_n "(cached) " >&6
067d23c9
KY
8823else
8824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8825/* end confdefs.h. */
5476a9a4
GM
8826#include <sys/types.h>
8827#include <sys/wait.h>
8828#ifndef WEXITSTATUS
8829# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8830#endif
8831#ifndef WIFEXITED
8832# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8833#endif
8834
067d23c9
KY
8835int
8836main ()
8837{
5476a9a4
GM
8838 int s;
8839 wait (&s);
8840 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
8841 ;
8842 return 0;
8843}
8844_ACEOF
5476a9a4
GM
8845if ac_fn_c_try_compile "$LINENO"; then :
8846 ac_cv_header_sys_wait_h=yes
067d23c9 8847else
5476a9a4 8848 ac_cv_header_sys_wait_h=no
067d23c9 8849fi
5476a9a4 8850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 8851fi
5476a9a4
GM
8852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
8853$as_echo "$ac_cv_header_sys_wait_h" >&6; }
8854if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 8855
5476a9a4 8856$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 8857
5476a9a4 8858fi
7417b37c 8859
7417b37c 8860
5476a9a4
GM
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
8862$as_echo_n "checking for speed_t... " >&6; }
8863if test "${emacs_cv_speed_t+set}" = set; then :
f199cab1
GM
8864 $as_echo_n "(cached) " >&6
8865else
f199cab1
GM
8866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8867/* end confdefs.h. */
5476a9a4
GM
8868#include <termios.h>
8869int
8870main ()
8871{
8872speed_t x = 1;
8873 ;
8874 return 0;
8875}
7417b37c 8876_ACEOF
f199cab1 8877if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
8878 emacs_cv_speed_t=yes
8879else
8880 emacs_cv_speed_t=no
7417b37c 8881fi
f199cab1 8882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 8883fi
5476a9a4
GM
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
8885$as_echo "$emacs_cv_speed_t" >&6; }
8886if test $emacs_cv_speed_t = yes; then
7417b37c 8887
5476a9a4 8888$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
067d23c9 8889
5476a9a4 8890fi
067d23c9 8891
067d23c9
KY
8892
8893
e700232f 8894
5476a9a4
GM
8895for ac_header in net/if.h
8896do :
8897 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
8898#if HAVE_SYS_SOCKET_H
8899#include <sys/socket.h>
8900#endif
8901"
8902if test "x$ac_cv_header_net_if_h" = x""yes; then :
8903 cat >>confdefs.h <<_ACEOF
8904#define HAVE_NET_IF_H 1
067d23c9 8905_ACEOF
7cae64b4 8906
067d23c9 8907fi
067d23c9 8908
5476a9a4 8909done
4d4b75e8 8910
5476a9a4
GM
8911for ac_header in ifaddrs.h
8912do :
8913 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
8914#if HAVE_SYS_SOCKET_H
8915#include <sys/socket.h>
8916#endif
8917"
8918if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
8919 cat >>confdefs.h <<_ACEOF
8920#define HAVE_IFADDRS_H 1
8921_ACEOF
4d4b75e8 8922
5476a9a4 8923fi
4d4b75e8 8924
5476a9a4 8925done
7e723570 8926
5476a9a4 8927for ac_header in net/if_dl.h
7e723570 8928do :
5476a9a4
GM
8929 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
8930#if HAVE_SYS_SOCKET_H
8931#include <sys/socket.h>
8932#endif
7e723570 8933"
5476a9a4 8934if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 8935 cat >>confdefs.h <<_ACEOF
5476a9a4 8936#define HAVE_NET_IF_DL_H 1
7e723570
GM
8937_ACEOF
8938
8939fi
8940
8941done
8942
8943
5476a9a4
GM
8944ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
8945#if HAVE_SYS_SOCKET_H
8946#include <sys/socket.h>
8947#endif
8948#if HAVE_NET_IF_H
8949#include <net/if.h>
8950#endif
8951"
8952if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 8953
5476a9a4
GM
8954cat >>confdefs.h <<_ACEOF
8955#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8956_ACEOF
7e723570
GM
8957
8958
5476a9a4
GM
8959fi
8960ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
8961#if HAVE_SYS_SOCKET_H
8962#include <sys/socket.h>
f199cab1 8963#endif
5476a9a4
GM
8964#if HAVE_NET_IF_H
8965#include <net/if.h>
f199cab1 8966#endif
5476a9a4
GM
8967"
8968if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
8969
8970cat >>confdefs.h <<_ACEOF
8971#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8972_ACEOF
8973
8974
8975fi
8976ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
8977#if HAVE_SYS_SOCKET_H
8978#include <sys/socket.h>
f199cab1 8979#endif
5476a9a4
GM
8980#if HAVE_NET_IF_H
8981#include <net/if.h>
8982#endif
8983"
8984if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
8985
8986cat >>confdefs.h <<_ACEOF
8987#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 8988_ACEOF
5476a9a4
GM
8989
8990
8991fi
8992ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
8993#if HAVE_SYS_SOCKET_H
8994#include <sys/socket.h>
8995#endif
8996#if HAVE_NET_IF_H
8997#include <net/if.h>
8998#endif
8999"
9000if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
9001
9002cat >>confdefs.h <<_ACEOF
9003#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 9004_ACEOF
5476a9a4
GM
9005
9006
067d23c9 9007fi
5476a9a4
GM
9008ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
9009#if HAVE_SYS_SOCKET_H
9010#include <sys/socket.h>
9011#endif
9012#if HAVE_NET_IF_H
9013#include <net/if.h>
9014#endif
9015"
9016if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
9017
9018cat >>confdefs.h <<_ACEOF
9019#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
9020_ACEOF
9021
067d23c9 9022
f199cab1 9023fi
5476a9a4
GM
9024ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
9025#if HAVE_SYS_SOCKET_H
9026#include <sys/socket.h>
9027#endif
9028#if HAVE_NET_IF_H
9029#include <net/if.h>
9030#endif
9031"
9032if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
9033
9034cat >>confdefs.h <<_ACEOF
9035#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
9036_ACEOF
9037
067d23c9
KY
9038
9039fi
9040
9041
067d23c9 9042
f199cab1 9043
5476a9a4
GM
9044DEPFLAGS=
9045MKDEPDIR=":"
9046deps_frag=deps.mk
9047if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9049$as_echo_n "checking whether we are using GNU Make... " >&6; }
9050 HAVE_GNU_MAKE=no
9051 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
9052 if test "x$testval" != x; then
9053 HAVE_GNU_MAKE=yes
9054 else
9055 ac_enable_autodepend=no
9056 fi
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9058$as_echo "$HAVE_GNU_MAKE" >&6; }
9059 if test $HAVE_GNU_MAKE = yes; then
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9061$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9062 SAVE_CFLAGS="$CFLAGS"
9063 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
9064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9065/* end confdefs.h. */
f199cab1 9066
5476a9a4
GM
9067int
9068main ()
9069{
f199cab1 9070
5476a9a4
GM
9071 ;
9072 return 0;
9073}
9074_ACEOF
9075if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 9076
5476a9a4
GM
9077else
9078 ac_enable_autodepend=no
9079fi
9080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9081 CFLAGS="$SAVE_CFLAGS"
9082 test -f deps.d || ac_enable_autodepend=no
9083 rm -rf deps.d
9084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9085$as_echo "$ac_enable_autodepend" >&6; }
9086 fi
9087 if test $ac_enable_autodepend = yes; then
9088 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
9089 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
9090 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
9091 deps_frag=autodeps.mk
9092 fi
9093fi
9094deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
9095
9096
9097
9098
9099
5476a9a4 9100lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9101
9102
9103
5476a9a4
GM
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9105$as_echo_n "checking for long file names... " >&6; }
9106if test "${ac_cv_sys_long_file_names+set}" = set; then :
9107 $as_echo_n "(cached) " >&6
9108else
9109 ac_cv_sys_long_file_names=yes
9110# Test for long file names in all the places we know might matter:
9111# . the current directory, where building will happen
9112# $prefix/lib where we will be installing things
9113# $exec_prefix/lib likewise
9114# $TMPDIR if set, where it might want to write temporary files
9115# /tmp where it might want to write temporary files
9116# /var/tmp likewise
9117# /usr/tmp likewise
9118for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9119 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9120 # in the usual case where exec_prefix is '${prefix}'.
9121 case $ac_dir in #(
9122 . | /* | ?:[\\/]*) ;; #(
9123 *) continue;;
9124 esac
9125 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9126 ac_xdir=$ac_dir/cf$$
9127 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9128 ac_tf1=$ac_xdir/conftest9012345
9129 ac_tf2=$ac_xdir/conftest9012346
9130 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9131 ac_cv_sys_long_file_names=no
9132 rm -f -r "$ac_xdir" 2>/dev/null
9133 test $ac_cv_sys_long_file_names = no && break
9134done
9135fi
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9137$as_echo "$ac_cv_sys_long_file_names" >&6; }
9138if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9139
5476a9a4 9140$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9141
5476a9a4 9142fi
f199cab1 9143
f199cab1 9144
5476a9a4 9145#### Choose a window system.
f199cab1 9146
42dcba54
GM
9147## We leave window_system equal to none if
9148## we end up building without one. Any new window system should
9149## set window_system to an appropriate value and add objects to
9150## window-system-specific substs.
9151
9152window_system=none
5476a9a4
GM
9153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9154$as_echo_n "checking for X... " >&6; }
f199cab1 9155
f199cab1 9156
5476a9a4
GM
9157# Check whether --with-x was given.
9158if test "${with_x+set}" = set; then :
9159 withval=$with_x;
9160fi
f199cab1 9161
5476a9a4
GM
9162# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9163if test "x$with_x" = xno; then
9164 # The user explicitly disabled X.
9165 have_x=disabled
9166else
9167 case $x_includes,$x_libraries in #(
9168 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9169 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9170 $as_echo_n "(cached) " >&6
9171else
9172 # One or both of the vars are not set, and there is no cached value.
9173ac_x_includes=no ac_x_libraries=no
9174rm -f -r conftest.dir
9175if mkdir conftest.dir; then
9176 cd conftest.dir
9177 cat >Imakefile <<'_ACEOF'
9178incroot:
9179 @echo incroot='${INCROOT}'
9180usrlibdir:
9181 @echo usrlibdir='${USRLIBDIR}'
9182libdir:
9183 @echo libdir='${LIBDIR}'
9184_ACEOF
9185 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9186 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9187 for ac_var in incroot usrlibdir libdir; do
9188 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9189 done
9190 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9191 for ac_extension in a so sl dylib la dll; do
9192 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9193 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9194 ac_im_usrlibdir=$ac_im_libdir; break
9195 fi
9196 done
9197 # Screen out bogus values from the imake configuration. They are
9198 # bogus both because they are the default anyway, and because
9199 # using them would break gcc on systems where it needs fixed includes.
9200 case $ac_im_incroot in
9201 /usr/include) ac_x_includes= ;;
9202 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9203 esac
9204 case $ac_im_usrlibdir in
9205 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9206 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9207 esac
9208 fi
9209 cd ..
9210 rm -f -r conftest.dir
067d23c9
KY
9211fi
9212
5476a9a4
GM
9213# Standard set of common directories for X headers.
9214# Check X11 before X11Rn because it is often a symlink to the current release.
9215ac_x_header_dirs='
9216/usr/X11/include
9217/usr/X11R7/include
9218/usr/X11R6/include
9219/usr/X11R5/include
9220/usr/X11R4/include
067d23c9 9221
5476a9a4
GM
9222/usr/include/X11
9223/usr/include/X11R7
9224/usr/include/X11R6
9225/usr/include/X11R5
9226/usr/include/X11R4
067d23c9 9227
5476a9a4
GM
9228/usr/local/X11/include
9229/usr/local/X11R7/include
9230/usr/local/X11R6/include
9231/usr/local/X11R5/include
9232/usr/local/X11R4/include
067d23c9 9233
5476a9a4
GM
9234/usr/local/include/X11
9235/usr/local/include/X11R7
9236/usr/local/include/X11R6
9237/usr/local/include/X11R5
9238/usr/local/include/X11R4
067d23c9 9239
5476a9a4
GM
9240/usr/X386/include
9241/usr/x386/include
9242/usr/XFree86/include/X11
067d23c9 9243
5476a9a4
GM
9244/usr/include
9245/usr/local/include
9246/usr/unsupported/include
9247/usr/athena/include
9248/usr/local/x11r5/include
9249/usr/lpp/Xamples/include
067d23c9 9250
5476a9a4
GM
9251/usr/openwin/include
9252/usr/openwin/share/include'
067d23c9 9253
5476a9a4
GM
9254if test "$ac_x_includes" = no; then
9255 # Guess where to find include files, by looking for Xlib.h.
9256 # First, try using that file with no special directory specified.
9257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9258/* end confdefs.h. */
9259#include <X11/Xlib.h>
067d23c9 9260_ACEOF
5476a9a4
GM
9261if ac_fn_c_try_cpp "$LINENO"; then :
9262 # We can compile using X headers with no special include directory.
9263ac_x_includes=
067d23c9 9264else
5476a9a4
GM
9265 for ac_dir in $ac_x_header_dirs; do
9266 if test -r "$ac_dir/X11/Xlib.h"; then
9267 ac_x_includes=$ac_dir
9268 break
f199cab1 9269 fi
f199cab1 9270done
5476a9a4
GM
9271fi
9272rm -f conftest.err conftest.$ac_ext
9273fi # $ac_x_includes = no
067d23c9 9274
5476a9a4
GM
9275if test "$ac_x_libraries" = no; then
9276 # Check for the libraries.
9277 # See if we find them without any special options.
9278 # Don't add to $LIBS permanently.
9279 ac_save_LIBS=$LIBS
9280 LIBS="-lX11 $LIBS"
7ee3791f 9281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9282/* end confdefs.h. */
5476a9a4 9283#include <X11/Xlib.h>
067d23c9
KY
9284int
9285main ()
9286{
5476a9a4
GM
9287XrmInitialize ()
9288 ;
067d23c9
KY
9289 return 0;
9290}
9291_ACEOF
5476a9a4
GM
9292if ac_fn_c_try_link "$LINENO"; then :
9293 LIBS=$ac_save_LIBS
9294# We can link X programs with no special library path.
9295ac_x_libraries=
7ee3791f 9296else
5476a9a4
GM
9297 LIBS=$ac_save_LIBS
9298for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9299do
9300 # Don't even attempt the hair of trying to link an X program!
9301 for ac_extension in a so sl dylib la dll; do
9302 if test -r "$ac_dir/libX11.$ac_extension"; then
9303 ac_x_libraries=$ac_dir
9304 break 2
9305 fi
9306 done
9307done
7ee3791f 9308fi
5476a9a4
GM
9309rm -f core conftest.err conftest.$ac_objext \
9310 conftest$ac_exeext conftest.$ac_ext
9311fi # $ac_x_libraries = no
7ee3791f 9312
5476a9a4
GM
9313case $ac_x_includes,$ac_x_libraries in #(
9314 no,* | *,no | *\'*)
9315 # Didn't find X, or a directory has "'" in its name.
9316 ac_cv_have_x="have_x=no";; #(
9317 *)
9318 # Record where we found X for the cache.
9319 ac_cv_have_x="have_x=yes\
9320 ac_x_includes='$ac_x_includes'\
9321 ac_x_libraries='$ac_x_libraries'"
9322esac
9323fi
9324;; #(
9325 *) have_x=yes;;
9326 esac
9327 eval "$ac_cv_have_x"
9328fi # $with_x != no
9329
9330if test "$have_x" != yes; then
9331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9332$as_echo "$have_x" >&6; }
9333 no_x=yes
9334else
9335 # If each of the values was on the command line, it overrides each guess.
9336 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9337 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9338 # Update the cache value to reflect the command line values.
9339 ac_cv_have_x="have_x=yes\
9340 ac_x_includes='$x_includes'\
9341 ac_x_libraries='$x_libraries'"
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9343$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9344fi
9345
42dcba54 9346if test "$no_x" != yes; then
5476a9a4
GM
9347 window_system=x11
9348fi
9349
9350LD_SWITCH_X_SITE_RPATH=
9351if test "${x_libraries}" != NONE; then
9352 if test -n "${x_libraries}"; then
9353 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9354 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9355 fi
9356 x_default_search_path=""
9357 x_search_path=${x_libraries}
9358 if test -z "${x_search_path}"; then
9359 x_search_path=/usr/lib
9360 fi
9361 for x_library in `echo ${x_search_path}: | \
9362 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9363 x_search_path="\
9364${x_library}/X11/%L/%T/%N%C%S:\
9365${x_library}/X11/%l/%T/%N%C%S:\
9366${x_library}/X11/%T/%N%C%S:\
9367${x_library}/X11/%L/%T/%N%S:\
9368${x_library}/X11/%l/%T/%N%S:\
9369${x_library}/X11/%T/%N%S"
9370 if test x"${x_default_search_path}" = x; then
9371 x_default_search_path=${x_search_path}
9372 else
9373 x_default_search_path="${x_search_path}:${x_default_search_path}"
9374 fi
9375 done
9376fi
9377
9378
9379if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9380 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9381fi
9382
9383if test x"${x_includes}" = x; then
9384 bitmapdir=/usr/include/X11/bitmaps
9385else
9386 # accumulate include directories that have X11 bitmap subdirectories
9387 bmd_acc="dummyval"
9388 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9389 if test -d "${bmd}/X11/bitmaps"; then
9390 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9391 fi
9392 if test -d "${bmd}/bitmaps"; then
9393 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9394 fi
9395 done
9396 if test ${bmd_acc} != "dummyval"; then
9397 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9398 fi
9399fi
7ee3791f 9400
5476a9a4
GM
9401HAVE_NS=no
9402NS_IMPL_COCOA=no
9403NS_IMPL_GNUSTEP=no
9404tmp_CPPFLAGS="$CPPFLAGS"
9405tmp_CFLAGS="$CFLAGS"
9406CPPFLAGS="$CPPFLAGS -x objective-c"
9407CFLAGS="$CFLAGS -x objective-c"
9408TEMACS_LDFLAGS2="\${LDFLAGS}"
9409GNU_OBJC_CFLAGS=
9410if test "${with_ns}" != no; then
9411 if test "${opsys}" = darwin; then
9412 NS_IMPL_COCOA=yes
9413 ns_appdir=`pwd`/nextstep/Emacs.app
9414 ns_appbindir=${ns_appdir}/Contents/MacOS
9415 ns_appresdir=${ns_appdir}/Contents/Resources
9416 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
9417 elif test -f $GNUSTEP_CONFIG_FILE; then
9418 NS_IMPL_GNUSTEP=yes
9419 ns_appdir=`pwd`/nextstep/Emacs.app
9420 ns_appbindir=${ns_appdir}
9421 ns_appresdir=${ns_appdir}/Resources
9422 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
9423 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9424 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9425 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9426 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9427 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9428 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9429 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9430 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9431 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9432 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9433 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9434 LIB_STANDARD=
9435 START_FILES=
9436 TEMACS_LDFLAGS2=
9437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9438$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9439if test "${emacs_cv_objc_exceptions+set}" = set; then :
9440 $as_echo_n "(cached) " >&6
9441else
9442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9443/* end confdefs.h. */
9444#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
9445int
9446main ()
9447{
5476a9a4
GM
9448#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
94491;
9450#else
9451fail;
9452#endif
9453 ;
39b3d70b
GM
9454 return 0;
9455}
9456_ACEOF
5476a9a4
GM
9457if ac_fn_c_try_compile "$LINENO"; then :
9458 emacs_cv_objc_exceptions=yes
39b3d70b 9459else
5476a9a4 9460 emacs_cv_objc_exceptions=no
39b3d70b 9461fi
5476a9a4 9462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 9463fi
5476a9a4
GM
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9465$as_echo "$emacs_cv_objc_exceptions" >&6; }
9466 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 9467
5476a9a4
GM
9468$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9469
9470 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9471 fi
9472 fi
9473
9474 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9475
9476 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9477if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9478 HAVE_NS=yes
067d23c9 9479else
5476a9a4
GM
9480 as_fn_error "\`--with-ns' was specified, but the include
9481 files are missing or cannot be compiled." "$LINENO" 5
9482fi
f199cab1 9483
f199cab1 9484
5476a9a4
GM
9485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9486/* end confdefs.h. */
9487#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
9488int
9489main ()
9490{
5476a9a4
GM
9491NSInteger i;
9492 ;
067d23c9
KY
9493 return 0;
9494}
9495_ACEOF
5476a9a4
GM
9496if ac_fn_c_try_compile "$LINENO"; then :
9497 ns_have_nsinteger=yes
067d23c9 9498else
5476a9a4 9499 ns_have_nsinteger=no
067d23c9 9500fi
5476a9a4
GM
9501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9502 if test $ns_have_nsinteger = yes; then
067d23c9 9503
5476a9a4 9504$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 9505
067d23c9 9506 fi
5476a9a4 9507fi
067d23c9 9508
5476a9a4
GM
9509
9510INSTALL_ARCH_INDEP_EXTRA=install-etc
9511ns_self_contained=no
9512ns_frag=/dev/null
9513NS_OBJ=
9514NS_OBJC_OBJ=
9515if test "${HAVE_NS}" = yes; then
9516 if test "$with_toolkit_scroll_bars" = "no"; then
9517 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9518 fi
9519
9520 window_system=nextstep
5476a9a4
GM
9521 # set up packaging dirs
9522 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9523 ns_self_contained=yes
9524 prefix=${ns_appresdir}
9525 exec_prefix=${ns_appbindir}
9526 libexecdir="\${ns_appbindir}/libexec"
9527 archlibdir="\${ns_appbindir}/libexec"
9528 docdir="\${ns_appresdir}/etc"
9529 etcdir="\${ns_appresdir}/etc"
9530 infodir="\${ns_appresdir}/info"
9531 mandir="\${ns_appresdir}/man"
9532 lispdir="\${ns_appresdir}/lisp"
9533 leimdir="\${ns_appresdir}/leim"
9534 INSTALL_ARCH_INDEP_EXTRA=
9535 fi
9536 ns_frag=$srcdir/src/ns.mk
5476a9a4
GM
9537 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9538fi
9539CFLAGS="$tmp_CFLAGS"
9540CPPFLAGS="$tmp_CPPFLAGS"
9541
9542
9543
9544
9545
9546
9547
42dcba54
GM
9548## $window_system is now set to the window system we will
9549## ultimately use.
9550
9551term_header=
9552HAVE_X_WINDOWS=no
9553HAVE_X11=no
9554USE_X_TOOLKIT=none
9555
5476a9a4
GM
9556case "${window_system}" in
9557 x11 )
9558 HAVE_X_WINDOWS=yes
9559 HAVE_X11=yes
42dcba54 9560 term_header=xterm.h
5476a9a4
GM
9561 case "${with_x_toolkit}" in
9562 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9563 motif ) USE_X_TOOLKIT=MOTIF ;;
9564 gtk ) with_gtk=yes
42dcba54 9565 term_header=gtkutil.h
5476a9a4 9566 USE_X_TOOLKIT=none ;;
4fa92495
GM
9567 gtk2 ) with_gtk2=yes
9568 term_header=gtkutil.h
9569 USE_X_TOOLKIT=none ;;
5476a9a4 9570 gtk3 ) with_gtk3=yes
42dcba54 9571 term_header=gtkutil.h
5476a9a4
GM
9572 USE_X_TOOLKIT=none ;;
9573 no ) USE_X_TOOLKIT=none ;;
9574 * ) USE_X_TOOLKIT=maybe ;;
9575 esac
9576 ;;
42dcba54
GM
9577 nextstep )
9578 term_header=nsterm.h
5476a9a4
GM
9579 ;;
9580esac
9581
42dcba54
GM
9582if test -n "${term_header}"; then
9583
9584cat >>confdefs.h <<_ACEOF
9585#define TERM_HEADER "${term_header}"
9586_ACEOF
9587
9588fi
9589
5476a9a4
GM
9590if test "$window_system" = none && test "X$with_x" != "Xno"; then
9591 # Extract the first word of "X", so it can be a program name with args.
9592set dummy X; ac_word=$2
9593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9594$as_echo_n "checking for $ac_word... " >&6; }
9595if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9596 $as_echo_n "(cached) " >&6
9597else
9598 if test -n "$HAVE_XSERVER"; then
9599 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9600else
9601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9602for as_dir in $PATH
9603do
9604 IFS=$as_save_IFS
9605 test -z "$as_dir" && as_dir=.
9606 for ac_exec_ext in '' $ac_executable_extensions; do
9607 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9608 ac_cv_prog_HAVE_XSERVER="true"
9609 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9610 break 2
9611 fi
9612done
9613 done
9614IFS=$as_save_IFS
9615
9616 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9617fi
9618fi
9619HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9620if test -n "$HAVE_XSERVER"; then
9621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9622$as_echo "$HAVE_XSERVER" >&6; }
9623else
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9625$as_echo "no" >&6; }
9626fi
9627
9628
9629 if test "$HAVE_XSERVER" = true ||
9630 test -n "$DISPLAY" ||
9631 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9632 as_fn_error "You seem to be running X, but no X development libraries
9633were found. You should install the relevant development files for X
9634and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9635sure you have development files for image handling, i.e.
9636tiff, gif, jpeg, png and xpm.
9637If you are sure you want Emacs compiled without X window support, pass
9638 --without-x
9639to configure." "$LINENO" 5
9640 fi
9641fi
9642
9643### If we're using X11, we should use the X menu package.
9644HAVE_MENUS=no
9645case ${HAVE_X11} in
9646 yes ) HAVE_MENUS=yes ;;
9647esac
9648
9649# Does the opsystem file prohibit the use of the GNU malloc?
9650# Assume not, until told otherwise.
9651GNU_MALLOC=yes
9652
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9654$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9655if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
9656 $as_echo_n "(cached) " >&6
9657else
5476a9a4
GM
9658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9659/* end confdefs.h. */
9660#include <malloc.h>
9661 static void hook (void) {}
9662int
9663main ()
9664{
9665malloc_set_state (malloc_get_state ());
9666 __after_morecore_hook = hook;
9667 __malloc_initialize_hook = hook;
9668 ;
9669 return 0;
9670}
9671_ACEOF
9672if ac_fn_c_try_link "$LINENO"; then :
9673 emacs_cv_var_doug_lea_malloc=yes
9674else
9675 emacs_cv_var_doug_lea_malloc=no
9676fi
9677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext conftest.$ac_ext
9679fi
9680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9681$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9682doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
9683
9684
9685system_malloc=no
9686case "$opsys" in
9687 ## darwin ld insists on the use of malloc routines in the System framework.
9688 darwin|sol2-10) system_malloc=yes ;;
9689esac
9690
9691if test "${system_malloc}" = "yes"; then
9692
9693$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
9694
9695 GNU_MALLOC=no
9696 GNU_MALLOC_reason="
9697 (The GNU allocators don't work with this system configuration.)"
9698 GMALLOC_OBJ=
9699 VMLIMIT_OBJ=
9700else
9701 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
9702 VMLIMIT_OBJ=vm-limit.o
9703fi
9704
9705
9706
9707if test "$doug_lea_malloc" = "yes" ; then
9708 if test "$GNU_MALLOC" = yes ; then
9709 GNU_MALLOC_reason="
9710 (Using Doug Lea's new malloc from the GNU C Library.)"
9711 fi
9712
9713$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
9714
9715
9716 ## Use mmap directly for allocating larger buffers.
9717 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
9718 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
9719 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
9720 case "$opsys" in
9721 gnu*) REL_ALLOC=no ;;
9722 esac
9723fi
9724
9725if test x"${REL_ALLOC}" = x; then
9726 REL_ALLOC=${GNU_MALLOC}
9727fi
9728
9729use_mmap_for_buffers=no
9730case "$opsys" in
9731 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
9732esac
9733
9734
9735
9736
9737
9738
9739
9740
9741for ac_func in getpagesize
9742do :
9743 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9744if test "x$ac_cv_func_getpagesize" = x""yes; then :
9745 cat >>confdefs.h <<_ACEOF
9746#define HAVE_GETPAGESIZE 1
9747_ACEOF
9748
9749fi
9750done
9751
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9753$as_echo_n "checking for working mmap... " >&6; }
9754if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9755 $as_echo_n "(cached) " >&6
9756else
9757 if test "$cross_compiling" = yes; then :
9758 ac_cv_func_mmap_fixed_mapped=no
9759else
9760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9761/* end confdefs.h. */
9762$ac_includes_default
9763/* malloc might have been renamed as rpl_malloc. */
9764#undef malloc
9765
9766/* Thanks to Mike Haertel and Jim Avera for this test.
9767 Here is a matrix of mmap possibilities:
9768 mmap private not fixed
9769 mmap private fixed at somewhere currently unmapped
9770 mmap private fixed at somewhere already mapped
9771 mmap shared not fixed
9772 mmap shared fixed at somewhere currently unmapped
9773 mmap shared fixed at somewhere already mapped
9774 For private mappings, we should verify that changes cannot be read()
9775 back from the file, nor mmap's back from the file at a different
9776 address. (There have been systems where private was not correctly
9777 implemented like the infamous i386 svr4.0, and systems where the
9778 VM page cache was not coherent with the file system buffer cache
9779 like early versions of FreeBSD and possibly contemporary NetBSD.)
9780 For shared mappings, we should conversely verify that changes get
9781 propagated back to all the places they're supposed to be.
9782
9783 Grep wants private fixed already mapped.
9784 The main things grep needs to know about mmap are:
9785 * does it exist and is it safe to write into the mmap'd area
9786 * how to use it (BSD variants) */
9787
9788#include <fcntl.h>
9789#include <sys/mman.h>
9790
9791#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9792char *malloc ();
9793#endif
9794
9795/* This mess was copied from the GNU getpagesize.h. */
9796#ifndef HAVE_GETPAGESIZE
9797# ifdef _SC_PAGESIZE
9798# define getpagesize() sysconf(_SC_PAGESIZE)
9799# else /* no _SC_PAGESIZE */
9800# ifdef HAVE_SYS_PARAM_H
9801# include <sys/param.h>
9802# ifdef EXEC_PAGESIZE
9803# define getpagesize() EXEC_PAGESIZE
9804# else /* no EXEC_PAGESIZE */
9805# ifdef NBPG
9806# define getpagesize() NBPG * CLSIZE
9807# ifndef CLSIZE
9808# define CLSIZE 1
9809# endif /* no CLSIZE */
9810# else /* no NBPG */
9811# ifdef NBPC
9812# define getpagesize() NBPC
9813# else /* no NBPC */
9814# ifdef PAGESIZE
9815# define getpagesize() PAGESIZE
9816# endif /* PAGESIZE */
9817# endif /* no NBPC */
9818# endif /* no NBPG */
9819# endif /* no EXEC_PAGESIZE */
9820# else /* no HAVE_SYS_PARAM_H */
9821# define getpagesize() 8192 /* punt totally */
9822# endif /* no HAVE_SYS_PARAM_H */
9823# endif /* no _SC_PAGESIZE */
9824
9825#endif /* no HAVE_GETPAGESIZE */
9826
9827int
9828main ()
9829{
9830 char *data, *data2, *data3;
9831 const char *cdata2;
9832 int i, pagesize;
9833 int fd, fd2;
9834
9835 pagesize = getpagesize ();
9836
9837 /* First, make a file with some known garbage in it. */
9838 data = (char *) malloc (pagesize);
9839 if (!data)
9840 return 1;
9841 for (i = 0; i < pagesize; ++i)
9842 *(data + i) = rand ();
9843 umask (0);
9844 fd = creat ("conftest.mmap", 0600);
9845 if (fd < 0)
9846 return 2;
9847 if (write (fd, data, pagesize) != pagesize)
9848 return 3;
9849 close (fd);
9850
9851 /* Next, check that the tail of a page is zero-filled. File must have
9852 non-zero length, otherwise we risk SIGBUS for entire page. */
9853 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
9854 if (fd2 < 0)
9855 return 4;
9856 cdata2 = "";
9857 if (write (fd2, cdata2, 1) != 1)
9858 return 5;
9859 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
9860 if (data2 == MAP_FAILED)
9861 return 6;
9862 for (i = 0; i < pagesize; ++i)
9863 if (*(data2 + i))
9864 return 7;
9865 close (fd2);
9866 if (munmap (data2, pagesize))
9867 return 8;
9868
9869 /* Next, try to mmap the file at a fixed address which already has
9870 something else allocated at it. If we can, also make sure that
9871 we see the same garbage. */
9872 fd = open ("conftest.mmap", O_RDWR);
9873 if (fd < 0)
9874 return 9;
9875 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9876 MAP_PRIVATE | MAP_FIXED, fd, 0L))
9877 return 10;
9878 for (i = 0; i < pagesize; ++i)
9879 if (*(data + i) != *(data2 + i))
9880 return 11;
9881
9882 /* Finally, make sure that changes to the mapped area do not
9883 percolate back to the file as seen by read(). (This is a bug on
9884 some variants of i386 svr4.0.) */
9885 for (i = 0; i < pagesize; ++i)
9886 *(data2 + i) = *(data2 + i) + 1;
9887 data3 = (char *) malloc (pagesize);
9888 if (!data3)
9889 return 12;
9890 if (read (fd, data3, pagesize) != pagesize)
9891 return 13;
9892 for (i = 0; i < pagesize; ++i)
9893 if (*(data + i) != *(data3 + i))
9894 return 14;
9895 close (fd);
9896 return 0;
9897}
9898_ACEOF
9899if ac_fn_c_try_run "$LINENO"; then :
9900 ac_cv_func_mmap_fixed_mapped=yes
9901else
9902 ac_cv_func_mmap_fixed_mapped=no
9903fi
9904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9905 conftest.$ac_objext conftest.beam conftest.$ac_ext
9906fi
9907
9908fi
9909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9910$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9911if test $ac_cv_func_mmap_fixed_mapped = yes; then
9912
9913$as_echo "#define HAVE_MMAP 1" >>confdefs.h
9914
9915fi
9916rm -f conftest.mmap conftest.txt
9917
9918if test $use_mmap_for_buffers = yes; then
f199cab1 9919
5476a9a4
GM
9920$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
9921
9922 REL_ALLOC=no
9923fi
9924
9925LIBS="$LIBS_SYSTEM $LIBS"
9926
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9928$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
9929if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
9930 $as_echo_n "(cached) " >&6
067d23c9 9931else
5476a9a4
GM
9932 ac_check_lib_save_LIBS=$LIBS
9933LIBS="-ldnet $LIBS"
9934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9935/* end confdefs.h. */
067d23c9 9936
5476a9a4
GM
9937/* Override any GCC internal prototype to avoid an error.
9938 Use char because int might match the return type of a GCC
9939 builtin and then its argument prototype would still apply. */
9940#ifdef __cplusplus
9941extern "C"
9942#endif
9943char dnet_ntoa ();
9944int
9945main ()
f199cab1 9946{
5476a9a4
GM
9947return dnet_ntoa ();
9948 ;
9949 return 0;
f199cab1 9950}
5476a9a4
GM
9951_ACEOF
9952if ac_fn_c_try_link "$LINENO"; then :
9953 ac_cv_lib_dnet_dnet_ntoa=yes
9954else
9955 ac_cv_lib_dnet_dnet_ntoa=no
9956fi
9957rm -f core conftest.err conftest.$ac_objext \
9958 conftest$ac_exeext conftest.$ac_ext
9959LIBS=$ac_check_lib_save_LIBS
9960fi
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9962$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9963if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
9964 cat >>confdefs.h <<_ACEOF
9965#define HAVE_LIBDNET 1
9966_ACEOF
9967
9968 LIBS="-ldnet $LIBS"
9969
9970fi
9971
9972
9973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
9974$as_echo_n "checking for main in -lXbsd... " >&6; }
9975if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
9976 $as_echo_n "(cached) " >&6
9977else
9978 ac_check_lib_save_LIBS=$LIBS
9979LIBS="-lXbsd $LIBS"
9980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9981/* end confdefs.h. */
9982
9983
9984int
9985main ()
f199cab1 9986{
5476a9a4
GM
9987return main ();
9988 ;
9989 return 0;
f199cab1 9990}
5476a9a4
GM
9991_ACEOF
9992if ac_fn_c_try_link "$LINENO"; then :
9993 ac_cv_lib_Xbsd_main=yes
9994else
9995 ac_cv_lib_Xbsd_main=no
9996fi
9997rm -f core conftest.err conftest.$ac_objext \
9998 conftest$ac_exeext conftest.$ac_ext
9999LIBS=$ac_check_lib_save_LIBS
10000fi
10001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10002$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
10003if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
10004 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10005fi
10006
10007
10008LIB_PTHREAD=
10009
10010
10011
10012if test "$ac_cv_header_pthread_h"; then
10013 if test "$GMALLOC_OBJ" = gmalloc.o; then
10014 emacs_pthread_function=pthread_atfork
10015 else
10016 emacs_pthread_function=pthread_self
10017 fi
10018 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
10020$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
10021if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
10022 $as_echo_n "(cached) " >&6
10023else
10024 ac_check_lib_save_LIBS=$LIBS
10025LIBS="-lpthread $LIBS"
10026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10027/* end confdefs.h. */
10028
10029/* Override any GCC internal prototype to avoid an error.
10030 Use char because int might match the return type of a GCC
10031 builtin and then its argument prototype would still apply. */
10032#ifdef __cplusplus
10033extern "C"
10034#endif
10035char $emacs_pthread_function ();
10036int
10037main ()
f199cab1 10038{
5476a9a4
GM
10039return $emacs_pthread_function ();
10040 ;
10041 return 0;
f199cab1 10042}
5476a9a4
GM
10043_ACEOF
10044if ac_fn_c_try_link "$LINENO"; then :
10045 eval "$as_ac_Lib=yes"
10046else
10047 eval "$as_ac_Lib=no"
10048fi
10049rm -f core conftest.err conftest.$ac_objext \
10050 conftest$ac_exeext conftest.$ac_ext
10051LIBS=$ac_check_lib_save_LIBS
10052fi
10053eval ac_res=\$$as_ac_Lib
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10055$as_echo "$ac_res" >&6; }
10056eval as_val=\$$as_ac_Lib
10057 if test "x$as_val" = x""yes; then :
10058 HAVE_PTHREAD=yes
10059fi
10060
10061fi
10062if test "$HAVE_PTHREAD" = yes; then
10063 case "${canonical}" in
10064 *-hpux*) ;;
10065 *) LIB_PTHREAD="-lpthread"
10066 LIBS="$LIB_PTHREAD $LIBS" ;;
10067 esac
10068
10069$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10070
10071fi
10072
10073
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10075$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
10076if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
10077 $as_echo_n "(cached) " >&6
10078else
10079 ac_check_lib_save_LIBS=$LIBS
10080LIBS="-lpthreads $LIBS"
10081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10082/* end confdefs.h. */
10083
10084/* Override any GCC internal prototype to avoid an error.
10085 Use char because int might match the return type of a GCC
10086 builtin and then its argument prototype would still apply. */
10087#ifdef __cplusplus
10088extern "C"
f199cab1 10089#endif
5476a9a4
GM
10090char cma_open ();
10091int
10092main ()
10093{
10094return cma_open ();
10095 ;
10096 return 0;
f199cab1 10097}
5476a9a4
GM
10098_ACEOF
10099if ac_fn_c_try_link "$LINENO"; then :
10100 ac_cv_lib_pthreads_cma_open=yes
10101else
10102 ac_cv_lib_pthreads_cma_open=no
10103fi
10104rm -f core conftest.err conftest.$ac_objext \
10105 conftest$ac_exeext conftest.$ac_ext
10106LIBS=$ac_check_lib_save_LIBS
10107fi
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10109$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
10110if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
10111 cat >>confdefs.h <<_ACEOF
10112#define HAVE_LIBPTHREADS 1
10113_ACEOF
10114
10115 LIBS="-lpthreads $LIBS"
10116
10117fi
10118
10119
10120## Note: when using cpp in s/aix4.2.h, this definition depended on
10121## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10122## the system file was sourced. Hence the value of LIBS_SYSTEM
10123## added to LIBS in configure would never contain the pthreads part,
10124## but the value used in Makefiles might. FIXME?
10125##
10126## -lpthreads seems to be necessary for Xlib in X11R6, and should
10127## be harmless on older versions of X where it happens to exist.
10128test "$opsys" = "aix4-2" && \
10129 test $ac_cv_lib_pthreads_cma_open = yes && \
10130 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10131
10132
10133case ${host_os} in
10134aix*)
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10136$as_echo_n "checking for -bbigtoc option... " >&6; }
10137if test "${gdb_cv_bigtoc+set}" = set; then :
10138 $as_echo_n "(cached) " >&6
10139else
10140
10141 case $GCC in
10142 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10143 *) gdb_cv_bigtoc=-bbigtoc ;;
10144 esac
067d23c9 10145
5476a9a4
GM
10146 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10148/* end confdefs.h. */
067d23c9
KY
10149
10150int
10151main ()
10152{
5476a9a4
GM
10153int i;
10154 ;
10155 return 0;
10156}
10157_ACEOF
10158if ac_fn_c_try_link "$LINENO"; then :
067d23c9 10159
5476a9a4
GM
10160else
10161 gdb_cv_bigtoc=
10162fi
10163rm -f core conftest.err conftest.$ac_objext \
10164 conftest$ac_exeext conftest.$ac_ext
067d23c9 10165
5476a9a4
GM
10166fi
10167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10168$as_echo "$gdb_cv_bigtoc" >&6; }
10169 ;;
10170esac
067d23c9 10171
5476a9a4
GM
10172# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10173# used for the tests that follow. We set them back to REAL_CFLAGS and
10174# REAL_CPPFLAGS later on.
067d23c9 10175
5476a9a4
GM
10176REAL_CFLAGS="$CFLAGS"
10177REAL_CPPFLAGS="$CPPFLAGS"
10178
10179if test "${HAVE_X11}" = "yes"; then
10180 DEFS="$C_SWITCH_X_SITE $DEFS"
10181 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10182 LIBS="-lX11 $LIBS"
10183 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10184 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10185
10186 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10187 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10188 # but it's more convenient here to set LD_RUN_PATH since this
10189 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10190 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10191 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10192 export LD_RUN_PATH
10193 fi
10194
10195 if test "${opsys}" = "gnu-linux"; then
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10197$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10199/* end confdefs.h. */
067d23c9 10200
5476a9a4
GM
10201int
10202main ()
10203{
10204XOpenDisplay ("foo");
f199cab1 10205 ;
067d23c9
KY
10206 return 0;
10207}
10208_ACEOF
5476a9a4
GM
10209if ac_fn_c_try_link "$LINENO"; then :
10210 xgnu_linux_first_failure=no
067d23c9 10211else
5476a9a4 10212 xgnu_linux_first_failure=yes
067d23c9 10213fi
5476a9a4
GM
10214rm -f core conftest.err conftest.$ac_objext \
10215 conftest$ac_exeext conftest.$ac_ext
10216 if test "${xgnu_linux_first_failure}" = "yes"; then
10217 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10218 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10219 OLD_CPPFLAGS="$CPPFLAGS"
10220 OLD_LIBS="$LIBS"
10221 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10222 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10223 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10224 LIBS="$LIBS -b i486-linuxaout"
10225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10226/* end confdefs.h. */
067d23c9 10227
5476a9a4
GM
10228int
10229main ()
10230{
10231XOpenDisplay ("foo");
10232 ;
10233 return 0;
10234}
10235_ACEOF
10236if ac_fn_c_try_link "$LINENO"; then :
10237 xgnu_linux_second_failure=no
10238else
10239 xgnu_linux_second_failure=yes
067d23c9 10240fi
5476a9a4
GM
10241rm -f core conftest.err conftest.$ac_objext \
10242 conftest$ac_exeext conftest.$ac_ext
10243 if test "${xgnu_linux_second_failure}" = "yes"; then
10244 # If we get the same failure with -b, there is no use adding -b.
10245 # So take it out. This plays safe.
10246 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10247 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10248 CPPFLAGS="$OLD_CPPFLAGS"
10249 LIBS="$OLD_LIBS"
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10251$as_echo "no" >&6; }
10252 else
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10254$as_echo "yes" >&6; }
10255 fi
0eb4e0df 10256 else
5476a9a4
GM
10257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10258$as_echo "no" >&6; }
10259 fi
10260 fi
0eb4e0df 10261
5476a9a4
GM
10262 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10263 # header files included from there.
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10265$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
10266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10267/* end confdefs.h. */
5476a9a4
GM
10268#include <X11/Xlib.h>
10269#include <X11/XKBlib.h>
0eb4e0df
GM
10270int
10271main ()
10272{
5476a9a4 10273XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
10274 ;
10275 return 0;
10276}
10277_ACEOF
5476a9a4
GM
10278if ac_fn_c_try_link "$LINENO"; then :
10279 emacs_xkb=yes
0eb4e0df 10280else
5476a9a4 10281 emacs_xkb=no
0eb4e0df 10282fi
5476a9a4
GM
10283rm -f core conftest.err conftest.$ac_objext \
10284 conftest$ac_exeext conftest.$ac_ext
10285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10286$as_echo "$emacs_xkb" >&6; }
10287 if test $emacs_xkb = yes; then
1abfdc54 10288
5476a9a4 10289$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
1abfdc54 10290
e1fefc61 10291 fi
1abfdc54 10292
5476a9a4
GM
10293 for ac_func in XrmSetDatabase XScreenResourceString \
10294XScreenNumberOfScreen
10295do :
10296 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10297ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10298eval as_val=\$$as_ac_var
10299 if test "x$as_val" = x""yes; then :
10300 cat >>confdefs.h <<_ACEOF
10301#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 10302_ACEOF
1abfdc54 10303
5476a9a4
GM
10304fi
10305done
1abfdc54 10306
5476a9a4 10307fi
1abfdc54 10308
5476a9a4
GM
10309if test "${window_system}" = "x11"; then
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10311$as_echo_n "checking X11 version 6... " >&6; }
10312 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
10313 $as_echo_n "(cached) " >&6
10314else
5476a9a4 10315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10316/* end confdefs.h. */
5476a9a4 10317#include <X11/Xlib.h>
067d23c9
KY
10318int
10319main ()
10320{
5476a9a4
GM
10321#if XlibSpecificationRelease < 6
10322fail;
10323#endif
10324
067d23c9
KY
10325 ;
10326 return 0;
10327}
10328_ACEOF
5476a9a4
GM
10329if ac_fn_c_try_link "$LINENO"; then :
10330 emacs_cv_x11_version_6=yes
10331else
10332 emacs_cv_x11_version_6=no
10333fi
10334rm -f core conftest.err conftest.$ac_objext \
10335 conftest$ac_exeext conftest.$ac_ext
067d23c9 10336fi
f199cab1 10337
5476a9a4
GM
10338 if test $emacs_cv_x11_version_6 = yes; then
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10340$as_echo "6 or newer" >&6; }
f199cab1 10341
5476a9a4 10342$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
10343
10344
5476a9a4 10345$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 10346
5476a9a4
GM
10347 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10348 ## XIM support.
10349 case "$opsys" in
10350 sol2-*) : ;;
10351 *)
10352$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 10353
5476a9a4
GM
10354 ;;
10355 esac
10356 else
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10358$as_echo "before 6" >&6; }
10359 fi
10360fi
f199cab1 10361
067d23c9 10362
5476a9a4
GM
10363### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10364HAVE_RSVG=no
10365if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10366 if test "${with_rsvg}" != "no"; then
10367 RSVG_REQUIRED=2.11.0
10368 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 10369
f199cab1 10370
5476a9a4 10371 succeeded=no
067d23c9 10372
5476a9a4
GM
10373 if test "$PKG_CONFIG" = "no" ; then
10374 :
10375 else
10376 PKG_CONFIG_MIN_VERSION=0.9.0
10377 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10379$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 10380
5476a9a4
GM
10381 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 &&
10382 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` &&
10383 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then
10384 edit_cflags="
10385 s,///*,/,g
10386 s/^/ /
10387 s/ -I/ $isystem/g
10388 s/^ //
10389 "
10390 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10391 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10393$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10394 succeeded=yes
10395 else
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
10398 RSVG_CFLAGS=""
10399 RSVG_LIBS=""
10400 ## If we have a custom action on failure, don't print errors, but
10401 ## do set a variable so people can do so.
10402 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
f199cab1 10403
5476a9a4 10404 fi
067d23c9 10405
067d23c9 10406
067d23c9 10407
f199cab1 10408 else
5476a9a4
GM
10409 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10410 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10411 fi
5476a9a4
GM
10412 fi
10413
10414 if test $succeeded = yes; then
10415 HAVE_RSVG=yes
10416 else
10417 :
10418 fi
067d23c9 10419
067d23c9 10420
067d23c9 10421
f199cab1 10422
5476a9a4 10423 if test $HAVE_RSVG = yes; then
f199cab1 10424
5476a9a4
GM
10425$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10426
10427 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10428 LIBS="$RSVG_LIBS $LIBS"
10429 fi
f199cab1 10430 fi
5476a9a4 10431fi
f199cab1 10432
5476a9a4
GM
10433HAVE_IMAGEMAGICK=no
10434if test "${HAVE_X11}" = "yes"; then
10435 if test "${with_imagemagick}" != "no"; then
10436 ## 6.2.8 is the earliest version known to work, but earlier versions
10437 ## might work - let us know if you find one.
10438 ## 6.0.7 does not work. See bug#7955.
10439 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
f199cab1 10440
5476a9a4 10441 succeeded=no
f199cab1 10442
5476a9a4
GM
10443 if test "$PKG_CONFIG" = "no" ; then
10444 :
10445 else
10446 PKG_CONFIG_MIN_VERSION=0.9.0
10447 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10449$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 10450
5476a9a4
GM
10451 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10452 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10453 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
10454 edit_cflags="
10455 s,///*,/,g
10456 s/^/ /
10457 s/ -I/ $isystem/g
10458 s/^ //
10459 "
10460 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10461 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10463$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10464 succeeded=yes
10465 else
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468 IMAGEMAGICK_CFLAGS=""
10469 IMAGEMAGICK_LIBS=""
10470 ## If we have a custom action on failure, don't print errors, but
10471 ## do set a variable so people can do so.
10472 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
f199cab1 10473
5476a9a4 10474 fi
f199cab1 10475
f199cab1 10476
f199cab1 10477
5476a9a4
GM
10478 else
10479 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10480 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10481 fi
f199cab1 10482 fi
5476a9a4
GM
10483
10484 if test $succeeded = yes; then
10485 HAVE_IMAGEMAGICK=yes
f199cab1 10486 else
5476a9a4 10487 :
067d23c9
KY
10488 fi
10489
f199cab1 10490
067d23c9 10491
f199cab1 10492
5476a9a4 10493 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 10494
5476a9a4 10495$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 10496
5476a9a4
GM
10497 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10498 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10499 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10500do :
10501 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10502ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10503eval as_val=\$$as_ac_var
10504 if test "x$as_val" = x""yes; then :
10505 cat >>confdefs.h <<_ACEOF
10506#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 10507_ACEOF
f199cab1
GM
10508
10509fi
5476a9a4
GM
10510done
10511
067d23c9
KY
10512 fi
10513 fi
5476a9a4 10514fi
067d23c9 10515
f199cab1 10516
5476a9a4
GM
10517HAVE_GTK=no
10518GTK_OBJ=
4fa92495
GM
10519check_gtk2=no
10520gtk3_pkg_errors=
10521if test "${with_gtk3}" = "yes" || test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
5476a9a4
GM
10522 GLIB_REQUIRED=2.28
10523 GTK_REQUIRED=3.0
10524 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
10525
10526
5476a9a4 10527 succeeded=no
f199cab1 10528
5476a9a4
GM
10529 if test "$PKG_CONFIG" = "no" ; then
10530 pkg_check_gtk=no
10531 else
10532 PKG_CONFIG_MIN_VERSION=0.9.0
10533 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10535$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 10536
5476a9a4
GM
10537 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10538 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10539 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10540 edit_cflags="
10541 s,///*,/,g
10542 s/^/ /
10543 s/ -I/ $isystem/g
10544 s/^ //
10545 "
10546 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10547 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10549$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10550 succeeded=yes
10551 else
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10553$as_echo "no" >&6; }
10554 GTK_CFLAGS=""
10555 GTK_LIBS=""
10556 ## If we have a custom action on failure, don't print errors, but
10557 ## do set a variable so people can do so.
10558 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
f199cab1 10559
5476a9a4 10560 fi
f199cab1 10561
f199cab1 10562
f199cab1 10563
5476a9a4
GM
10564 else
10565 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10566 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10567 fi
5476a9a4 10568 fi
067d23c9 10569
5476a9a4
GM
10570 if test $succeeded = yes; then
10571 pkg_check_gtk=yes
10572 else
10573 pkg_check_gtk=no
10574 fi
067d23c9 10575
4fa92495 10576 if test "$pkg_check_gtk" = "no" && test "$with_gtk3" = "yes"; then
5476a9a4 10577 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9 10578 fi
4fa92495 10579 if test "$pkg_check_gtk" = "yes"; then
067d23c9 10580
5476a9a4 10581$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 10582
4fa92495
GM
10583 GTK_OBJ=emacsgtkfixed.o
10584 term_header=gtkutil.h
10585 else
10586 check_gtk2=yes
10587 gtk3_pkg_errors="$GTK_PKG_ERRORS "
10588 fi
5476a9a4 10589fi
067d23c9 10590
4fa92495 10591if test "${with_gtk2}" = "yes" || test "$check_gtk2" = "yes"; then
5476a9a4
GM
10592 GLIB_REQUIRED=2.10
10593 GTK_REQUIRED=2.10
10594 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 10595
5476a9a4
GM
10596
10597 succeeded=no
10598
10599 if test "$PKG_CONFIG" = "no" ; then
10600 pkg_check_gtk=no
10601 else
10602 PKG_CONFIG_MIN_VERSION=0.9.0
10603 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10605$as_echo_n "checking for $GTK_MODULES... " >&6; }
10606
10607 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10608 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10609 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10610 edit_cflags="
10611 s,///*,/,g
10612 s/^/ /
10613 s/ -I/ $isystem/g
10614 s/^ //
10615 "
10616 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10617 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10619$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10620 succeeded=yes
10621 else
10622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10623$as_echo "no" >&6; }
10624 GTK_CFLAGS=""
10625 GTK_LIBS=""
10626 ## If we have a custom action on failure, don't print errors, but
10627 ## do set a variable so people can do so.
10628 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10629
10630 fi
10631
10632
10633
10634 else
10635 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10636 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10637 fi
10638 fi
10639
10640 if test $succeeded = yes; then
10641 pkg_check_gtk=yes
10642 else
10643 pkg_check_gtk=no
10644 fi
10645
4fa92495
GM
10646 if test "$pkg_check_gtk" = "no"; then
10647 if test "$USE_X_TOOLKIT" = "maybe" || test "$with_gtk" = "yes" || test "$with_gtk2" = "yes"; then
10648 as_fn_error "$gtk3_pkg_errors$GTK_PKG_ERRORS" "$LINENO" 5
10649 fi
5476a9a4 10650 fi
067d23c9 10651fi
067d23c9 10652
5476a9a4
GM
10653if test x"$pkg_check_gtk" = xyes; then
10654
10655
10656
10657 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
10658 CFLAGS="$CFLAGS $GTK_CFLAGS"
10659 LIBS="$GTK_LIBS $LIBS"
10660 GTK_COMPILES=no
10661 for ac_func in gtk_main
10662do :
10663 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
10664if test "x$ac_cv_func_gtk_main" = x""yes; then :
10665 cat >>confdefs.h <<_ACEOF
10666#define HAVE_GTK_MAIN 1
10667_ACEOF
10668 GTK_COMPILES=yes
f199cab1 10669fi
5476a9a4 10670done
067d23c9 10671
5476a9a4
GM
10672 if test "${GTK_COMPILES}" != "yes"; then
10673 if test "$USE_X_TOOLKIT" != "maybe"; then
10674 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
10675 fi
10676 else
10677 HAVE_GTK=yes
10678
10679$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 10680
5476a9a4
GM
10681 GTK_OBJ="gtkutil.o $GTK_OBJ"
10682 USE_X_TOOLKIT=none
10683 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
10684 :
10685 else
10686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
10687 closing open displays. This is no problem if you just use
10688 one display, but if you use more than one and close one of them
10689 Emacs may crash." >&5
10690$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
10691 closing open displays. This is no problem if you just use
10692 one display, but if you use more than one and close one of them
10693 Emacs may crash." >&2;}
10694 sleep 3
10695 fi
067d23c9
KY
10696 fi
10697
5476a9a4 10698fi
067d23c9
KY
10699
10700
10701
5476a9a4 10702if test "${HAVE_GTK}" = "yes"; then
067d23c9 10703
5476a9a4
GM
10704 if test "$with_toolkit_scroll_bars" != no; then
10705 with_toolkit_scroll_bars=yes
10706 fi
067d23c9 10707
5476a9a4
GM
10708 HAVE_GTK_FILE_SELECTION=no
10709 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
10710#include <gtk/gtk.h>
10711"
10712if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
10713 HAVE_GTK_FILE_SELECTION=yes
10714else
10715 HAVE_GTK_FILE_SELECTION=no
10716fi
067d23c9 10717
5476a9a4
GM
10718 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
10719 for ac_func in gtk_file_selection_new
10720do :
10721 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
10722if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
10723 cat >>confdefs.h <<_ACEOF
10724#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 10725_ACEOF
067d23c9 10726
f199cab1 10727fi
5476a9a4
GM
10728done
10729
f199cab1 10730 fi
067d23c9 10731
067d23c9 10732
5476a9a4
GM
10733 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
10734 gtk_dialog_get_action_area gtk_widget_get_sensitive \
10735 gtk_widget_get_mapped gtk_adjustment_get_page_size \
10736 gtk_orientable_set_orientation \
10737 gtk_window_set_has_resize_grip
10738do :
10739 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10740ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10741eval as_val=\$$as_ac_var
10742 if test "x$as_val" = x""yes; then :
10743 cat >>confdefs.h <<_ACEOF
10744#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10745_ACEOF
067d23c9 10746
5476a9a4
GM
10747fi
10748done
067d23c9 10749
42dcba54
GM
10750
10751 term_header=gtkutil.h
5476a9a4 10752fi
067d23c9 10753
5476a9a4
GM
10754HAVE_DBUS=no
10755DBUS_OBJ=
10756if test "${with_dbus}" = "yes"; then
067d23c9 10757
5476a9a4 10758 succeeded=no
067d23c9 10759
5476a9a4
GM
10760 if test "$PKG_CONFIG" = "no" ; then
10761 HAVE_DBUS=no
f199cab1 10762 else
5476a9a4
GM
10763 PKG_CONFIG_MIN_VERSION=0.9.0
10764 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
10766$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 10767
5476a9a4
GM
10768 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 &&
10769 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` &&
10770 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then
10771 edit_cflags="
10772 s,///*,/,g
10773 s/^/ /
10774 s/ -I/ $isystem/g
10775 s/^ //
10776 "
10777 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
10778 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
10779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
10780$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
10781 succeeded=yes
10782 else
10783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10784$as_echo "no" >&6; }
10785 DBUS_CFLAGS=""
10786 DBUS_LIBS=""
10787 ## If we have a custom action on failure, don't print errors, but
10788 ## do set a variable so people can do so.
10789 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
067d23c9 10790
5476a9a4 10791 fi
067d23c9 10792
15f79fcd 10793
067d23c9 10794
5476a9a4
GM
10795 else
10796 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10797 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10798 fi
067d23c9 10799 fi
067d23c9 10800
5476a9a4
GM
10801 if test $succeeded = yes; then
10802 HAVE_DBUS=yes
f199cab1 10803 else
5476a9a4 10804 HAVE_DBUS=no
f199cab1 10805 fi
067d23c9 10806
5476a9a4
GM
10807 if test "$HAVE_DBUS" = yes; then
10808 LIBS="$LIBS $DBUS_LIBS"
067d23c9 10809
5476a9a4 10810$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 10811
5476a9a4
GM
10812 for ac_func in dbus_watch_get_unix_fd \
10813 dbus_type_is_valid \
10814 dbus_validate_bus_name \
10815 dbus_validate_path \
10816 dbus_validate_interface \
10817 dbus_validate_member
10818do :
10819 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10820ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10821eval as_val=\$$as_ac_var
10822 if test "x$as_val" = x""yes; then :
10823 cat >>confdefs.h <<_ACEOF
10824#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10825_ACEOF
067d23c9 10826
5476a9a4
GM
10827fi
10828done
067d23c9 10829
5476a9a4
GM
10830 DBUS_OBJ=dbusbind.o
10831 fi
10832fi
067d23c9
KY
10833
10834
5476a9a4
GM
10835HAVE_GSETTINGS=no
10836if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 10837
5476a9a4 10838 succeeded=no
067d23c9 10839
5476a9a4
GM
10840 if test "$PKG_CONFIG" = "no" ; then
10841 HAVE_GSETTINGS=no
10842 else
10843 PKG_CONFIG_MIN_VERSION=0.9.0
10844 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
10846$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 10847
5476a9a4
GM
10848 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 &&
10849 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` &&
10850 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then
10851 edit_cflags="
10852 s,///*,/,g
10853 s/^/ /
10854 s/ -I/ $isystem/g
10855 s/^ //
10856 "
10857 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
10858 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
10859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
10860$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
10861 succeeded=yes
10862 else
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10864$as_echo "no" >&6; }
10865 GSETTINGS_CFLAGS=""
10866 GSETTINGS_LIBS=""
10867 ## If we have a custom action on failure, don't print errors, but
10868 ## do set a variable so people can do so.
10869 GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"`
0afb4571 10870
5476a9a4 10871 fi
067d23c9
KY
10872
10873
10874
10875 else
5476a9a4
GM
10876 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10877 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 10878 fi
5476a9a4 10879 fi
067d23c9 10880
5476a9a4
GM
10881 if test $succeeded = yes; then
10882 HAVE_GSETTINGS=yes
10883 else
10884 HAVE_GSETTINGS=no
10885 fi
f199cab1 10886
5476a9a4 10887 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 10888
5476a9a4 10889$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 10890
5476a9a4
GM
10891 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
10892 SETTINGS_LIBS="$GSETTINGS_LIBS"
10893 fi
10894fi
067d23c9 10895
5476a9a4
GM
10896HAVE_GCONF=no
10897if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 10898
5476a9a4 10899 succeeded=no
067d23c9 10900
5476a9a4
GM
10901 if test "$PKG_CONFIG" = "no" ; then
10902 HAVE_GCONF=no
10903 else
10904 PKG_CONFIG_MIN_VERSION=0.9.0
10905 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
10907$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 10908
5476a9a4
GM
10909 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 &&
10910 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` &&
10911 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then
10912 edit_cflags="
10913 s,///*,/,g
10914 s/^/ /
10915 s/ -I/ $isystem/g
10916 s/^ //
10917 "
10918 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
10919 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
10920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
10921$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
10922 succeeded=yes
10923 else
10924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10925$as_echo "no" >&6; }
10926 GCONF_CFLAGS=""
10927 GCONF_LIBS=""
10928 ## If we have a custom action on failure, don't print errors, but
10929 ## do set a variable so people can do so.
10930 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
067d23c9 10931
5476a9a4 10932 fi
f199cab1 10933
f199cab1
GM
10934
10935
5476a9a4
GM
10936 else
10937 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10938 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10939 fi
10940 fi
f199cab1 10941
5476a9a4
GM
10942 if test $succeeded = yes; then
10943 HAVE_GCONF=yes
10944 else
10945 HAVE_GCONF=no
10946 fi
f199cab1 10947
5476a9a4 10948 if test "$HAVE_GCONF" = yes; then
f199cab1 10949
5476a9a4 10950$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 10951
5476a9a4
GM
10952 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
10953 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
10954 fi
10955fi
f199cab1 10956
5476a9a4 10957if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
dcde497f
GM
10958
10959 succeeded=no
10960
10961 if test "$PKG_CONFIG" = "no" ; then
10962 HAVE_GOBJECT=no
10963 else
10964 PKG_CONFIG_MIN_VERSION=0.9.0
10965 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-2.0 >= 2.0" >&5
10967$as_echo_n "checking for gobject-2.0 >= 2.0... " >&6; }
10968
10969 if $PKG_CONFIG --exists "gobject-2.0 >= 2.0" 2>&5 &&
10970 GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= 2.0" 2>&5` &&
10971 GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= 2.0" 2>&5`; then
10972 edit_cflags="
10973 s,///*,/,g
10974 s/^/ /
10975 s/ -I/ $isystem/g
10976 s/^ //
10977 "
10978 GOBJECT_CFLAGS=`$as_echo "$GOBJECT_CFLAGS" | sed -e "$edit_cflags"`
10979 GOBJECT_LIBS=`$as_echo "$GOBJECT_LIBS" | sed -e 's,///*,/,g'`
10980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&5
10981$as_echo "yes CFLAGS='$GOBJECT_CFLAGS' LIBS='$GOBJECT_LIBS'" >&6; }
10982 succeeded=yes
10983 else
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985$as_echo "no" >&6; }
10986 GOBJECT_CFLAGS=""
10987 GOBJECT_LIBS=""
10988 ## If we have a custom action on failure, don't print errors, but
10989 ## do set a variable so people can do so.
10990 GOBJECT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gobject-2.0 >= 2.0"`
10991
10992 fi
10993
10994
10995
10996 else
10997 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10998 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10999 fi
11000 fi
11001
11002 if test $succeeded = yes; then
11003 HAVE_GOBJECT=yes
11004 else
11005 HAVE_GOBJECT=no
11006 fi
11007
11008 if test "$HAVE_GOBJECT" = "yes"; then
11009 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GOBJECT_CFLAGS"
11010 SETTINGS_LIBS="$SETTINGS_LIBS $GOBJECT_LIBS"
11011 fi
5476a9a4
GM
11012 SAVE_CFLAGS="$CFLAGS"
11013 SAVE_LIBS="$LIBS"
11014 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11015 LIBS="$SETTINGS_LIBS $LIBS"
11016 for ac_func in g_type_init
11017do :
11018 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
11019if test "x$ac_cv_func_g_type_init" = x""yes; then :
11020 cat >>confdefs.h <<_ACEOF
11021#define HAVE_G_TYPE_INIT 1
067d23c9 11022_ACEOF
067d23c9 11023
5476a9a4
GM
11024fi
11025done
067d23c9 11026
5476a9a4
GM
11027 CFLAGS="$SAVE_CFLAGS"
11028 LIBS="$SAVE_LIBS"
11029fi
067d23c9 11030
067d23c9 11031
f199cab1 11032
067d23c9 11033
5476a9a4
GM
11034HAVE_LIBSELINUX=no
11035LIBSELINUX_LIBS=
11036if test "${with_selinux}" = "yes"; then
11037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11038$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
11039if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
11040 $as_echo_n "(cached) " >&6
11041else
11042 ac_check_lib_save_LIBS=$LIBS
11043LIBS="-lselinux $LIBS"
11044cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11045/* end confdefs.h. */
067d23c9 11046
5476a9a4
GM
11047/* Override any GCC internal prototype to avoid an error.
11048 Use char because int might match the return type of a GCC
11049 builtin and then its argument prototype would still apply. */
11050#ifdef __cplusplus
11051extern "C"
f199cab1 11052#endif
5476a9a4 11053char lgetfilecon ();
f199cab1
GM
11054int
11055main ()
11056{
5476a9a4 11057return lgetfilecon ();
f199cab1
GM
11058 ;
11059 return 0;
11060}
11061_ACEOF
5476a9a4
GM
11062if ac_fn_c_try_link "$LINENO"; then :
11063 ac_cv_lib_selinux_lgetfilecon=yes
11064else
11065 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 11066fi
5476a9a4
GM
11067rm -f core conftest.err conftest.$ac_objext \
11068 conftest$ac_exeext conftest.$ac_ext
11069LIBS=$ac_check_lib_save_LIBS
11070fi
11071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11072$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
11073if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
11074 HAVE_LIBSELINUX=yes
11075else
11076 HAVE_LIBSELINUX=no
067d23c9
KY
11077fi
11078
5476a9a4 11079 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 11080
5476a9a4 11081$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 11082
5476a9a4
GM
11083 LIBSELINUX_LIBS=-lselinux
11084 fi
f199cab1 11085fi
067d23c9 11086
067d23c9 11087
5476a9a4
GM
11088HAVE_GNUTLS=no
11089HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
11090if test "${with_gnutls}" = "yes" ; then
067d23c9 11091
5476a9a4 11092 succeeded=no
067d23c9 11093
5476a9a4
GM
11094 if test "$PKG_CONFIG" = "no" ; then
11095 HAVE_GNUTLS=no
11096 else
11097 PKG_CONFIG_MIN_VERSION=0.9.0
11098 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
11100$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 11101
5476a9a4
GM
11102 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 &&
11103 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` &&
11104 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then
11105 edit_cflags="
11106 s,///*,/,g
11107 s/^/ /
11108 s/ -I/ $isystem/g
11109 s/^ //
11110 "
11111 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
11112 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
11113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
11114$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
11115 succeeded=yes
11116 else
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11118$as_echo "no" >&6; }
11119 LIBGNUTLS_CFLAGS=""
11120 LIBGNUTLS_LIBS=""
11121 ## If we have a custom action on failure, don't print errors, but
11122 ## do set a variable so people can do so.
11123 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"`
067d23c9 11124
5476a9a4 11125 fi
067d23c9 11126
067d23c9 11127
067d23c9 11128
5476a9a4
GM
11129 else
11130 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11131 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11132 fi
11133 fi
067d23c9 11134
5476a9a4
GM
11135 if test $succeeded = yes; then
11136 HAVE_GNUTLS=yes
11137 else
11138 HAVE_GNUTLS=no
11139 fi
067d23c9 11140
5476a9a4 11141 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 11142
5476a9a4 11143$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 11144
5476a9a4 11145 fi
f199cab1 11146
5476a9a4
GM
11147 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11148 LIBS="$LIBGNUTLS_LIBS $LIBS"
11149 for ac_func in gnutls_certificate_set_verify_function
11150do :
11151 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11152if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11153 cat >>confdefs.h <<_ACEOF
11154#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
f199cab1 11155_ACEOF
5476a9a4
GM
11156 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11157fi
11158done
067d23c9
KY
11159
11160
5476a9a4
GM
11161 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11162
11163$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
f527bd02 11164
f199cab1 11165 fi
5476a9a4 11166fi
f527bd02 11167
f527bd02 11168
5476a9a4
GM
11169
11170
11171HAVE_XAW3D=no
11172LUCID_LIBW=
11173if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11174 if test "$with_xaw3d" != no; then
5476a9a4 11175 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
11176 $as_echo_n "(cached) " >&6
11177else
5476a9a4
GM
11178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11179/* end confdefs.h. */
f527bd02 11180
5476a9a4
GM
11181#include <X11/Intrinsic.h>
11182#include <X11/Xaw3d/Simple.h>
11183int
11184main ()
11185{
11186
11187 ;
11188 return 0;
11189}
11190_ACEOF
11191if ac_fn_c_try_link "$LINENO"; then :
11192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11193$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11194if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11195 $as_echo_n "(cached) " >&6
11196else
11197 ac_check_lib_save_LIBS=$LIBS
11198LIBS="-lXaw3d $LIBS"
11199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11200/* end confdefs.h. */
f527bd02 11201
5476a9a4
GM
11202/* Override any GCC internal prototype to avoid an error.
11203 Use char because int might match the return type of a GCC
11204 builtin and then its argument prototype would still apply. */
11205#ifdef __cplusplus
11206extern "C"
11207#endif
11208char XawScrollbarSetThumb ();
11209int
11210main ()
11211{
11212return XawScrollbarSetThumb ();
11213 ;
11214 return 0;
11215}
11216_ACEOF
11217if ac_fn_c_try_link "$LINENO"; then :
11218 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 11219else
5476a9a4 11220 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 11221fi
5476a9a4
GM
11222rm -f core conftest.err conftest.$ac_objext \
11223 conftest$ac_exeext conftest.$ac_ext
11224LIBS=$ac_check_lib_save_LIBS
11225fi
11226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11227$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11228if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11229 emacs_cv_xaw3d=yes
11230else
11231 emacs_cv_xaw3d=no
f199cab1 11232fi
f527bd02 11233
5476a9a4
GM
11234else
11235 emacs_cv_xaw3d=no
11236fi
11237rm -f core conftest.err conftest.$ac_objext \
11238 conftest$ac_exeext conftest.$ac_ext
11239fi
f527bd02 11240
5476a9a4
GM
11241 else
11242 emacs_cv_xaw3d=no
11243 fi
11244 if test $emacs_cv_xaw3d = yes; then
4fa92495
GM
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11246$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11248$as_echo "yes; using Lucid toolkit" >&6; }
11249 USE_X_TOOLKIT=LUCID
11250 HAVE_XAW3D=yes
11251 LUCID_LIBW=-lXaw3d
f527bd02 11252
5476a9a4 11253$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 11254
5476a9a4 11255 else
4fa92495
GM
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11257$as_echo_n "checking for xaw3d... " >&6; }
5476a9a4
GM
11258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11259$as_echo "no" >&6; }
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11261$as_echo_n "checking for libXaw... " >&6; }
11262 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
11263 $as_echo_n "(cached) " >&6
11264else
11265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11266/* end confdefs.h. */
067d23c9 11267
5476a9a4
GM
11268#include <X11/Intrinsic.h>
11269#include <X11/Xaw/Simple.h>
f199cab1
GM
11270int
11271main ()
11272{
067d23c9 11273
f199cab1
GM
11274 ;
11275 return 0;
11276}
11277_ACEOF
5476a9a4
GM
11278if ac_fn_c_try_link "$LINENO"; then :
11279 emacs_cv_xaw=yes
f199cab1 11280else
5476a9a4 11281 emacs_cv_xaw=no
f199cab1 11282fi
5476a9a4
GM
11283rm -f core conftest.err conftest.$ac_objext \
11284 conftest$ac_exeext conftest.$ac_ext
f199cab1 11285fi
067d23c9 11286
5476a9a4
GM
11287 if test $emacs_cv_xaw = yes; then
11288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11289$as_echo "yes; using Lucid toolkit" >&6; }
11290 USE_X_TOOLKIT=LUCID
11291 LUCID_LIBW=-lXaw
11292 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11293 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 11294 else
5476a9a4
GM
11295 as_fn_error "No X toolkit could be found.
11296If you are sure you want Emacs compiled without an X toolkit, pass
11297 --with-x-toolkit=no
11298to configure. Otherwise, install the development libraries for the toolkit
11299that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 11300 fi
5476a9a4
GM
11301 fi
11302fi
067d23c9 11303
5476a9a4 11304X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 11305
5476a9a4
GM
11306LIBXTR6=
11307if test "${USE_X_TOOLKIT}" != "none"; then
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11309$as_echo_n "checking X11 toolkit version... " >&6; }
11310 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
11311 $as_echo_n "(cached) " >&6
11312else
5476a9a4 11313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11314/* end confdefs.h. */
5476a9a4 11315#include <X11/Intrinsic.h>
f199cab1
GM
11316int
11317main ()
11318{
5476a9a4
GM
11319#if XtSpecificationRelease < 6
11320fail;
11321#endif
f527bd02 11322
f199cab1
GM
11323 ;
11324 return 0;
11325}
067d23c9 11326_ACEOF
5476a9a4
GM
11327if ac_fn_c_try_link "$LINENO"; then :
11328 emacs_cv_x11_toolkit_version_6=yes
11329else
11330 emacs_cv_x11_toolkit_version_6=no
067d23c9 11331fi
5476a9a4
GM
11332rm -f core conftest.err conftest.$ac_objext \
11333 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
11334fi
11335
5476a9a4
GM
11336 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11337 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11339$as_echo "6 or newer" >&6; }
f527bd02 11340
5476a9a4 11341$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 11342
5476a9a4
GM
11343 LIBXTR6="-lSM -lICE"
11344 case "$opsys" in
11345 ## Use libw.a along with X11R6 Xt.
11346 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11347 esac
11348 else
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11350$as_echo "before 6" >&6; }
f199cab1 11351 fi
f527bd02 11352
5476a9a4
GM
11353 OLDLIBS="$LIBS"
11354 if test x$HAVE_X11XTR6 = xyes; then
11355 LIBS="-lXt -lSM -lICE $LIBS"
11356 else
11357 LIBS="-lXt $LIBS"
11358 fi
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11360$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11361if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11362 $as_echo_n "(cached) " >&6
11363else
11364 ac_check_lib_save_LIBS=$LIBS
11365LIBS="-lXmu $LIBS"
11366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11367/* end confdefs.h. */
f199cab1 11368
5476a9a4
GM
11369/* Override any GCC internal prototype to avoid an error.
11370 Use char because int might match the return type of a GCC
11371 builtin and then its argument prototype would still apply. */
11372#ifdef __cplusplus
11373extern "C"
11374#endif
11375char XmuConvertStandardSelection ();
067d23c9
KY
11376int
11377main ()
11378{
5476a9a4 11379return XmuConvertStandardSelection ();
067d23c9
KY
11380 ;
11381 return 0;
11382}
11383_ACEOF
5476a9a4
GM
11384if ac_fn_c_try_link "$LINENO"; then :
11385 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11386else
11387 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 11388fi
5476a9a4
GM
11389rm -f core conftest.err conftest.$ac_objext \
11390 conftest$ac_exeext conftest.$ac_ext
11391LIBS=$ac_check_lib_save_LIBS
067d23c9 11392fi
5476a9a4
GM
11393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11394$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11395if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11396 cat >>confdefs.h <<_ACEOF
11397#define HAVE_LIBXMU 1
f199cab1
GM
11398_ACEOF
11399
5476a9a4 11400 LIBS="-lXmu $LIBS"
f199cab1 11401
067d23c9
KY
11402fi
11403
5476a9a4
GM
11404 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11405 fi
067d23c9 11406
067d23c9 11407
5476a9a4
GM
11408LIBXMU=-lXmu
11409case $opsys in
11410 ## These systems don't supply Xmu.
11411 hpux* | aix4-2 )
11412 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11413 ;;
11414esac
067d23c9
KY
11415
11416
5476a9a4
GM
11417# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11418if test "${HAVE_X11}" = "yes"; then
11419 if test "${USE_X_TOOLKIT}" != "none"; then
11420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11421$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11422if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
11423 $as_echo_n "(cached) " >&6
11424else
5476a9a4
GM
11425 ac_check_lib_save_LIBS=$LIBS
11426LIBS="-lXext $LIBS"
11427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11428/* end confdefs.h. */
f199cab1 11429
5476a9a4
GM
11430/* Override any GCC internal prototype to avoid an error.
11431 Use char because int might match the return type of a GCC
11432 builtin and then its argument prototype would still apply. */
11433#ifdef __cplusplus
11434extern "C"
11435#endif
11436char XShapeQueryExtension ();
11437int
11438main ()
11439{
11440return XShapeQueryExtension ();
11441 ;
11442 return 0;
11443}
e7d4e61f 11444_ACEOF
5476a9a4
GM
11445if ac_fn_c_try_link "$LINENO"; then :
11446 ac_cv_lib_Xext_XShapeQueryExtension=yes
11447else
11448 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 11449fi
5476a9a4
GM
11450rm -f core conftest.err conftest.$ac_objext \
11451 conftest$ac_exeext conftest.$ac_ext
11452LIBS=$ac_check_lib_save_LIBS
11453fi
11454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11455$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11456if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11457 cat >>confdefs.h <<_ACEOF
11458#define HAVE_LIBXEXT 1
11459_ACEOF
f199cab1 11460
5476a9a4 11461 LIBS="-lXext $LIBS"
f199cab1 11462
5476a9a4 11463fi
f199cab1 11464
5476a9a4
GM
11465 fi
11466fi
f199cab1 11467
5476a9a4
GM
11468LIBXP=
11469if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8ad96b1d
GM
11470 # OpenMotif may be installed in such a way on some GNU/Linux systems.
11471 if test -d /usr/include/openmotif; then
11472 CPPFLAGS="-I/usr/include/openmotif $CPPFLAGS"
11473 emacs_cv_openmotif=yes
11474 case "$canonical" in
11475 x86_64-*-linux-gnu* | powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*)
11476 test -d /usr/lib64/openmotif && LDFLAGS="-L/usr/lib64/openmotif $LDFLAGS"
11477 ;;
11478 *)
11479 test -d /usr/lib/openmotif && LDFLAGS="-L/usr/lib/openmotif $LDFLAGS"
11480 esac
11481 else
11482 emacs_cv_openmotif=no
11483 fi
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (Open)Motif version 2.1" >&5
11485$as_echo_n "checking for (Open)Motif version 2.1... " >&6; }
5476a9a4 11486if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
11487 $as_echo_n "(cached) " >&6
11488else
f199cab1
GM
11489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11490/* end confdefs.h. */
5476a9a4
GM
11491#include <Xm/Xm.h>
11492int
11493main ()
11494{
11495#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11496int x = 5;
11497#else
11498Motif version prior to 2.1.
11499#endif
11500 ;
11501 return 0;
11502}
11503_ACEOF
11504if ac_fn_c_try_compile "$LINENO"; then :
11505 emacs_cv_motif_version_2_1=yes
11506else
11507 emacs_cv_motif_version_2_1=no
11508fi
11509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11510fi
11511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
11512$as_echo "$emacs_cv_motif_version_2_1" >&6; }
11513 if test $emacs_cv_motif_version_2_1 = yes; then
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
11515$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
11516if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
11517 $as_echo_n "(cached) " >&6
11518else
11519 ac_check_lib_save_LIBS=$LIBS
11520LIBS="-lXp $LIBS"
11521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11522/* end confdefs.h. */
f199cab1 11523
5476a9a4
GM
11524/* Override any GCC internal prototype to avoid an error.
11525 Use char because int might match the return type of a GCC
11526 builtin and then its argument prototype would still apply. */
11527#ifdef __cplusplus
11528extern "C"
11529#endif
11530char XpCreateContext ();
ae1362a3
AS
11531int
11532main ()
11533{
5476a9a4 11534return XpCreateContext ();
ae1362a3
AS
11535 ;
11536 return 0;
11537}
11538_ACEOF
5476a9a4
GM
11539if ac_fn_c_try_link "$LINENO"; then :
11540 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 11541else
5476a9a4 11542 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 11543fi
5476a9a4
GM
11544rm -f core conftest.err conftest.$ac_objext \
11545 conftest$ac_exeext conftest.$ac_ext
11546LIBS=$ac_check_lib_save_LIBS
11547fi
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
11549$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
11550if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
11551 LIBXP=-lXp
067d23c9 11552fi
f199cab1 11553
8ad96b1d
GM
11554 if test x$emacs_cv_openmotif = xyes; then
11555 REAL_CPPFLAGS="-I/usr/include/openmotif $REAL_CPPFLAGS"
11556 fi
5476a9a4
GM
11557 else
11558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
11559$as_echo_n "checking for LessTif where some systems put it... " >&6; }
11560if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 11561 $as_echo_n "(cached) " >&6
f199cab1 11562else
5476a9a4
GM
11563 # We put this in CFLAGS temporarily to precede other -I options
11564 # that might be in CFLAGS temporarily.
11565 # We put this in CPPFLAGS where it precedes the other -I options.
11566 OLD_CPPFLAGS=$CPPFLAGS
11567 OLD_CFLAGS=$CFLAGS
11568 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11569 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11571/* end confdefs.h. */
5476a9a4 11572#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
11573int
11574main ()
11575{
5476a9a4 11576int x = 5;
067d23c9
KY
11577 ;
11578 return 0;
11579}
11580_ACEOF
5476a9a4
GM
11581if ac_fn_c_try_compile "$LINENO"; then :
11582 emacs_cv_lesstif=yes
067d23c9 11583else
5476a9a4 11584 emacs_cv_lesstif=no
067d23c9 11585fi
5476a9a4 11586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 11587fi
5476a9a4
GM
11588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
11589$as_echo "$emacs_cv_lesstif" >&6; }
11590 if test $emacs_cv_lesstif = yes; then
11591 # Make sure this -I option remains in CPPFLAGS after it is set
11592 # back to REAL_CPPFLAGS.
11593 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11594 # have those other -I options anyway. Ultimately, having this
11595 # directory ultimately in CPPFLAGS will be enough.
11596 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11597 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11598 else
11599 CFLAGS=$OLD_CFLAGS
11600 CPPFLAGS=$OLD_CPPFLAGS
11601 fi
11602 fi
11603 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
11604if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 11605
5476a9a4
GM
11606else
11607 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 11608fi
f199cab1
GM
11609
11610
5476a9a4 11611fi
f199cab1
GM
11612
11613
5476a9a4
GM
11614USE_TOOLKIT_SCROLL_BARS=no
11615if test "${with_toolkit_scroll_bars}" != "no"; then
11616 if test "${USE_X_TOOLKIT}" != "none"; then
11617 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11618 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11619
5476a9a4
GM
11620 HAVE_XAW3D=no
11621 USE_TOOLKIT_SCROLL_BARS=yes
11622 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
11623 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11624
5476a9a4
GM
11625 USE_TOOLKIT_SCROLL_BARS=yes
11626 fi
11627 elif test "${HAVE_GTK}" = "yes"; then
11628 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11629
5476a9a4
GM
11630 USE_TOOLKIT_SCROLL_BARS=yes
11631 elif test "${HAVE_NS}" = "yes"; then
11632 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11633
5476a9a4
GM
11634 USE_TOOLKIT_SCROLL_BARS=yes
11635 fi
11636fi
f199cab1 11637
5476a9a4 11638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11639/* end confdefs.h. */
5476a9a4
GM
11640
11641 #include <X11/Xlib.h>
11642 #include <X11/Xresource.h>
067d23c9
KY
11643int
11644main ()
11645{
5476a9a4 11646XIMProc callback;
067d23c9
KY
11647 ;
11648 return 0;
11649}
11650_ACEOF
f199cab1 11651if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
11652 HAVE_XIM=yes
11653
11654$as_echo "#define HAVE_XIM 1" >>confdefs.h
11655
067d23c9 11656else
5476a9a4 11657 HAVE_XIM=no
067d23c9 11658fi
f199cab1 11659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 11660
f199cab1 11661
5476a9a4
GM
11662if test "${with_xim}" != "no"; then
11663
11664$as_echo "#define USE_XIM 1" >>confdefs.h
11665
11666fi
11667
11668
11669if test "${HAVE_XIM}" != "no"; then
11670 late_CFLAGS=$CFLAGS
11671 if test "$GCC" = yes; then
11672 CFLAGS="$CFLAGS --pedantic-errors"
11673 fi
11674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11675/* end confdefs.h. */
f199cab1 11676
5476a9a4
GM
11677#include <X11/Xlib.h>
11678#include <X11/Xresource.h>
11679int
11680main ()
11681{
11682Display *display;
11683XrmDatabase db;
11684char *res_name;
11685char *res_class;
11686XIMProc callback;
11687XPointer *client_data;
11688#ifndef __GNUC__
11689/* If we're not using GCC, it's probably not XFree86, and this is
11690 probably right, but we can't use something like --pedantic-errors. */
11691extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11692 char*, XIMProc, XPointer*);
11693#endif
11694(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11695 client_data);
067d23c9
KY
11696 ;
11697 return 0;
11698}
11699_ACEOF
5476a9a4
GM
11700if ac_fn_c_try_compile "$LINENO"; then :
11701 emacs_cv_arg6_star=yes
067d23c9 11702fi
f199cab1 11703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
11704 if test "$emacs_cv_arg6_star" = yes; then
11705 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
11706
11707 else
11708 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 11709
5476a9a4
GM
11710 fi
11711 CFLAGS=$late_CFLAGS
067d23c9
KY
11712fi
11713
5476a9a4
GM
11714### Start of font-backend (under any platform) section.
11715# (nothing here yet -- this is a placeholder)
11716### End of font-backend (under any platform) section.
067d23c9 11717
5476a9a4
GM
11718### Start of font-backend (under X11) section.
11719if test "${HAVE_X11}" = "yes"; then
067d23c9 11720
5476a9a4 11721 succeeded=no
067d23c9 11722
5476a9a4
GM
11723 if test "$PKG_CONFIG" = "no" ; then
11724 HAVE_FC=no
11725 else
11726 PKG_CONFIG_MIN_VERSION=0.9.0
11727 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
11729$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 11730
5476a9a4
GM
11731 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 &&
11732 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` &&
11733 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then
11734 edit_cflags="
11735 s,///*,/,g
11736 s/^/ /
11737 s/ -I/ $isystem/g
11738 s/^ //
11739 "
11740 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
11741 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
11742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
11743$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
11744 succeeded=yes
11745 else
11746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11747$as_echo "no" >&6; }
11748 FONTCONFIG_CFLAGS=""
11749 FONTCONFIG_LIBS=""
11750 ## If we have a custom action on failure, don't print errors, but
11751 ## do set a variable so people can do so.
11752 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
f199cab1 11753
5476a9a4 11754 fi
f199cab1
GM
11755
11756
11757
f199cab1 11758 else
5476a9a4
GM
11759 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11760 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11761 fi
11762 fi
f199cab1 11763
5476a9a4
GM
11764 if test $succeeded = yes; then
11765 HAVE_FC=yes
11766 else
11767 HAVE_FC=no
11768 fi
f199cab1 11769
067d23c9 11770
5476a9a4
GM
11771 ## Use -lXft if available, unless `--with-xft=no'.
11772 HAVE_XFT=maybe
11773 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
11774 with_xft="no";
11775 fi
11776 if test "x${with_xft}" != "xno"; then
f199cab1 11777
f199cab1 11778
5476a9a4 11779 succeeded=no
f199cab1 11780
5476a9a4
GM
11781 if test "$PKG_CONFIG" = "no" ; then
11782 HAVE_XFT=no
11783 else
11784 PKG_CONFIG_MIN_VERSION=0.9.0
11785 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
11787$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 11788
5476a9a4
GM
11789 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 &&
11790 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` &&
11791 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then
11792 edit_cflags="
11793 s,///*,/,g
11794 s/^/ /
11795 s/ -I/ $isystem/g
11796 s/^ //
11797 "
11798 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
11799 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
11800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
11801$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
11802 succeeded=yes
11803 else
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805$as_echo "no" >&6; }
11806 XFT_CFLAGS=""
11807 XFT_LIBS=""
11808 ## If we have a custom action on failure, don't print errors, but
11809 ## do set a variable so people can do so.
11810 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
f199cab1 11811
5476a9a4 11812 fi
f199cab1
GM
11813
11814
11815
5476a9a4
GM
11816 else
11817 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11818 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11819 fi
11820 fi
f199cab1 11821
5476a9a4
GM
11822 if test $succeeded = yes; then
11823 :
f199cab1 11824 else
5476a9a4 11825 HAVE_XFT=no
f199cab1
GM
11826 fi
11827
5476a9a4
GM
11828 ## Because xftfont.c uses XRenderQueryExtension, we also
11829 ## need to link to -lXrender.
11830 HAVE_XRENDER=no
11831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
11832$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
11833if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
11834 $as_echo_n "(cached) " >&6
11835else
11836 ac_check_lib_save_LIBS=$LIBS
11837LIBS="-lXrender $LIBS"
11838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11839/* end confdefs.h. */
f199cab1 11840
5476a9a4
GM
11841/* Override any GCC internal prototype to avoid an error.
11842 Use char because int might match the return type of a GCC
11843 builtin and then its argument prototype would still apply. */
11844#ifdef __cplusplus
11845extern "C"
11846#endif
11847char XRenderQueryExtension ();
11848int
11849main ()
11850{
11851return XRenderQueryExtension ();
11852 ;
11853 return 0;
11854}
11855_ACEOF
11856if ac_fn_c_try_link "$LINENO"; then :
11857 ac_cv_lib_Xrender_XRenderQueryExtension=yes
11858else
11859 ac_cv_lib_Xrender_XRenderQueryExtension=no
11860fi
11861rm -f core conftest.err conftest.$ac_objext \
11862 conftest$ac_exeext conftest.$ac_ext
11863LIBS=$ac_check_lib_save_LIBS
11864fi
11865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
11866$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
11867if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
11868 HAVE_XRENDER=yes
11869fi
f199cab1 11870
5476a9a4
GM
11871 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
11872 OLD_CPPFLAGS="$CPPFLAGS"
11873 OLD_CFLAGS="$CFLAGS"
11874 OLD_LIBS="$LIBS"
11875 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11876 CFLAGS="$CFLAGS $XFT_CFLAGS"
11877 XFT_LIBS="-lXrender $XFT_LIBS"
11878 LIBS="$XFT_LIBS $LIBS"
11879 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
11880if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
11881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
11882$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
11883if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
11884 $as_echo_n "(cached) " >&6
11885else
11886 ac_check_lib_save_LIBS=$LIBS
11887LIBS="-lXft $XFT_LIBS $LIBS"
11888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11889/* end confdefs.h. */
f199cab1 11890
5476a9a4
GM
11891/* Override any GCC internal prototype to avoid an error.
11892 Use char because int might match the return type of a GCC
11893 builtin and then its argument prototype would still apply. */
11894#ifdef __cplusplus
11895extern "C"
11896#endif
11897char XftFontOpen ();
11898int
11899main ()
11900{
11901return XftFontOpen ();
11902 ;
11903 return 0;
11904}
067d23c9 11905_ACEOF
5476a9a4
GM
11906if ac_fn_c_try_link "$LINENO"; then :
11907 ac_cv_lib_Xft_XftFontOpen=yes
11908else
11909 ac_cv_lib_Xft_XftFontOpen=no
11910fi
11911rm -f core conftest.err conftest.$ac_objext \
11912 conftest$ac_exeext conftest.$ac_ext
11913LIBS=$ac_check_lib_save_LIBS
11914fi
11915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
11916$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
11917if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
11918 HAVE_XFT=yes
f199cab1
GM
11919fi
11920
5476a9a4 11921fi
f199cab1
GM
11922
11923
f199cab1 11924
5476a9a4 11925 if test "${HAVE_XFT}" = "yes"; then
f199cab1 11926
5476a9a4 11927$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 11928
067d23c9 11929
5476a9a4
GM
11930 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
11931 else
11932 CPPFLAGS="$OLD_CPPFLAGS"
11933 CFLAGS="$OLD_CFLAGS"
11934 LIBS="$OLD_LIBS"
11935 fi # "${HAVE_XFT}" = "yes"
11936 fi # "$HAVE_XFT" != no
11937 fi # "x${with_xft}" != "xno"
f199cab1 11938
5476a9a4
GM
11939 ## We used to allow building with FreeType and without Xft.
11940 ## However, the ftx font backend driver is not in good shape.
11941 if test "$HAVE_XFT" != "yes"; then
11942 HAVE_XFT=no
11943 HAVE_FREETYPE=no
11944 else
f199cab1 11945
5476a9a4 11946 succeeded=no
f199cab1 11947
5476a9a4
GM
11948 if test "$PKG_CONFIG" = "no" ; then
11949 HAVE_FREETYPE=no
11950 else
11951 PKG_CONFIG_MIN_VERSION=0.9.0
11952 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
11954$as_echo_n "checking for freetype2... " >&6; }
f199cab1 11955
5476a9a4
GM
11956 if $PKG_CONFIG --exists "freetype2" 2>&5 &&
11957 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` &&
11958 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then
11959 edit_cflags="
11960 s,///*,/,g
11961 s/^/ /
11962 s/ -I/ $isystem/g
11963 s/^ //
11964 "
11965 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
11966 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
11967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
11968$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
11969 succeeded=yes
11970 else
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
11973 FREETYPE_CFLAGS=""
11974 FREETYPE_LIBS=""
11975 ## If we have a custom action on failure, don't print errors, but
11976 ## do set a variable so people can do so.
11977 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
f199cab1 11978
5476a9a4 11979 fi
f199cab1 11980
f199cab1 11981
067d23c9 11982
5476a9a4
GM
11983 else
11984 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11985 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11986 fi
067d23c9 11987 fi
f199cab1 11988
5476a9a4
GM
11989 if test $succeeded = yes; then
11990 HAVE_FREETYPE=yes
11991 else
11992 HAVE_FREETYPE=no
11993 fi
f199cab1 11994
f199cab1 11995
5476a9a4
GM
11996 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
11997 fi
f199cab1 11998
5476a9a4
GM
11999 HAVE_LIBOTF=no
12000 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 12001
5476a9a4 12002$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 12003
5476a9a4 12004 if test "${with_libotf}" != "no"; then
f199cab1 12005
5476a9a4 12006 succeeded=no
f199cab1 12007
5476a9a4
GM
12008 if test "$PKG_CONFIG" = "no" ; then
12009 HAVE_LIBOTF=no
12010 else
12011 PKG_CONFIG_MIN_VERSION=0.9.0
12012 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12014$as_echo_n "checking for libotf... " >&6; }
f199cab1 12015
5476a9a4
GM
12016 if $PKG_CONFIG --exists "libotf" 2>&5 &&
12017 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` &&
12018 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then
12019 edit_cflags="
12020 s,///*,/,g
12021 s/^/ /
12022 s/ -I/ $isystem/g
12023 s/^ //
12024 "
12025 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
12026 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
12028$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
12029 succeeded=yes
12030 else
12031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032$as_echo "no" >&6; }
12033 LIBOTF_CFLAGS=""
12034 LIBOTF_LIBS=""
12035 ## If we have a custom action on failure, don't print errors, but
12036 ## do set a variable so people can do so.
12037 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
067d23c9 12038
5476a9a4 12039 fi
f199cab1
GM
12040
12041
067d23c9 12042
5476a9a4
GM
12043 else
12044 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12045 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12046 fi
12047 fi
f199cab1 12048
5476a9a4
GM
12049 if test $succeeded = yes; then
12050 HAVE_LIBOTF=yes
12051 else
12052 HAVE_LIBOTF=no
12053 fi
f199cab1 12054
5476a9a4 12055 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 12056
5476a9a4 12057$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 12058
5476a9a4
GM
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12060$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
12061if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
12062 $as_echo_n "(cached) " >&6
12063else
5476a9a4
GM
12064 ac_check_lib_save_LIBS=$LIBS
12065LIBS="-lotf $LIBS"
12066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12067/* end confdefs.h. */
5476a9a4
GM
12068
12069/* Override any GCC internal prototype to avoid an error.
12070 Use char because int might match the return type of a GCC
12071 builtin and then its argument prototype would still apply. */
12072#ifdef __cplusplus
12073extern "C"
12074#endif
12075char OTF_get_variation_glyphs ();
067d23c9
KY
12076int
12077main ()
12078{
5476a9a4 12079return OTF_get_variation_glyphs ();
067d23c9
KY
12080 ;
12081 return 0;
12082}
12083_ACEOF
5476a9a4
GM
12084if ac_fn_c_try_link "$LINENO"; then :
12085 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 12086else
5476a9a4 12087 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 12088fi
5476a9a4
GM
12089rm -f core conftest.err conftest.$ac_objext \
12090 conftest$ac_exeext conftest.$ac_ext
12091LIBS=$ac_check_lib_save_LIBS
12092fi
12093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12094$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
12095if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
12096 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12097else
12098 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 12099fi
067d23c9 12100
5476a9a4
GM
12101 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12102
12103$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12104
12105 fi
12106 fi
12107 fi
12108 fi
12109
12110 HAVE_M17N_FLT=no
12111 if test "${HAVE_LIBOTF}" = yes; then
12112 if test "${with_m17n_flt}" != "no"; then
12113
12114 succeeded=no
12115
12116 if test "$PKG_CONFIG" = "no" ; then
12117 HAVE_M17N_FLT=no
12118 else
12119 PKG_CONFIG_MIN_VERSION=0.9.0
12120 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12122$as_echo_n "checking for m17n-flt... " >&6; }
12123
12124 if $PKG_CONFIG --exists "m17n-flt" 2>&5 &&
12125 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` &&
12126 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then
12127 edit_cflags="
12128 s,///*,/,g
12129 s/^/ /
12130 s/ -I/ $isystem/g
12131 s/^ //
12132 "
12133 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
12134 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
12135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
12136$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
12137 succeeded=yes
12138 else
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12140$as_echo "no" >&6; }
12141 M17N_FLT_CFLAGS=""
12142 M17N_FLT_LIBS=""
12143 ## If we have a custom action on failure, don't print errors, but
12144 ## do set a variable so people can do so.
12145 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
12146
12147 fi
12148
12149
067d23c9 12150
5476a9a4
GM
12151 else
12152 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12153 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12154 fi
f199cab1 12155 fi
067d23c9 12156
5476a9a4
GM
12157 if test $succeeded = yes; then
12158 HAVE_M17N_FLT=yes
12159 else
12160 HAVE_M17N_FLT=no
12161 fi
12162
12163 if test "$HAVE_M17N_FLT" = "yes"; then
12164
12165$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12166
12167 fi
12168 fi
12169 fi
12170else
12171 HAVE_XFT=no
12172 HAVE_FREETYPE=no
12173 HAVE_LIBOTF=no
12174 HAVE_M17N_FLT=no
12175fi
12176
12177### End of font-backend (under X11) section.
12178
12179
067d23c9 12180
067d23c9 12181
5476a9a4
GM
12182
12183
12184
12185
12186
12187
12188### Use -lXpm if available, unless `--with-xpm=no'.
12189HAVE_XPM=no
12190LIBXPM=
12191if test "${HAVE_X11}" = "yes"; then
12192 if test "${with_xpm}" != "no"; then
12193 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
12194if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
12195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12196$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
12197if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
12198 $as_echo_n "(cached) " >&6
12199else
5476a9a4
GM
12200 ac_check_lib_save_LIBS=$LIBS
12201LIBS="-lXpm -lX11 $LIBS"
12202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12203/* end confdefs.h. */
12204
5476a9a4
GM
12205/* Override any GCC internal prototype to avoid an error.
12206 Use char because int might match the return type of a GCC
12207 builtin and then its argument prototype would still apply. */
12208#ifdef __cplusplus
12209extern "C"
12210#endif
12211char XpmReadFileToPixmap ();
067d23c9
KY
12212int
12213main ()
12214{
5476a9a4 12215return XpmReadFileToPixmap ();
067d23c9
KY
12216 ;
12217 return 0;
12218}
12219_ACEOF
5476a9a4
GM
12220if ac_fn_c_try_link "$LINENO"; then :
12221 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 12222else
5476a9a4 12223 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 12224fi
5476a9a4
GM
12225rm -f core conftest.err conftest.$ac_objext \
12226 conftest$ac_exeext conftest.$ac_ext
12227LIBS=$ac_check_lib_save_LIBS
12228fi
12229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12230$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12231if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12232 HAVE_XPM=yes
f199cab1 12233fi
067d23c9
KY
12234
12235fi
12236
12237
5476a9a4
GM
12238 if test "${HAVE_XPM}" = "yes"; then
12239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12240$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12242/* end confdefs.h. */
12243#include "X11/xpm.h"
12244#ifndef XpmReturnAllocPixels
12245no_return_alloc_pixels
12246#endif
067d23c9 12247
067d23c9 12248_ACEOF
5476a9a4
GM
12249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12250 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12251 HAVE_XPM=no
12252else
12253 HAVE_XPM=yes
12254fi
12255rm -f conftest*
067d23c9 12256
067d23c9 12257
5476a9a4
GM
12258 if test "${HAVE_XPM}" = "yes"; then
12259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12260$as_echo "yes" >&6; }
12261 else
12262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12263$as_echo "no" >&6; }
12264 fi
12265 fi
12266 fi
067d23c9 12267
5476a9a4 12268 if test "${HAVE_XPM}" = "yes"; then
067d23c9 12269
5476a9a4 12270$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 12271
5476a9a4
GM
12272 LIBXPM=-lXpm
12273 fi
067d23c9
KY
12274fi
12275
f199cab1 12276
5476a9a4
GM
12277### Use -ljpeg if available, unless `--with-jpeg=no'.
12278HAVE_JPEG=no
12279LIBJPEG=
12280if test "${HAVE_X11}" = "yes"; then
12281 if test "${with_jpeg}" != "no"; then
12282 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12283if test "x$ac_cv_header_jerror_h" = x""yes; then :
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12285$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12286if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
12287 $as_echo_n "(cached) " >&6
12288else
5476a9a4
GM
12289 ac_check_lib_save_LIBS=$LIBS
12290LIBS="-ljpeg $LIBS"
12291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12292/* end confdefs.h. */
f199cab1 12293
5476a9a4
GM
12294/* Override any GCC internal prototype to avoid an error.
12295 Use char because int might match the return type of a GCC
12296 builtin and then its argument prototype would still apply. */
12297#ifdef __cplusplus
12298extern "C"
12299#endif
12300char jpeg_destroy_compress ();
067d23c9
KY
12301int
12302main ()
12303{
5476a9a4 12304return jpeg_destroy_compress ();
067d23c9
KY
12305 ;
12306 return 0;
12307}
12308_ACEOF
12309if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 12310 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 12311else
5476a9a4 12312 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
12313fi
12314rm -f core conftest.err conftest.$ac_objext \
12315 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
12316LIBS=$ac_check_lib_save_LIBS
12317fi
12318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12319$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12320if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12321 HAVE_JPEG=yes
12322fi
12323
067d23c9 12324fi
f199cab1 12325
f199cab1
GM
12326
12327 fi
067d23c9 12328
5476a9a4
GM
12329 if test "${HAVE_JPEG}" = "yes"; then
12330 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12331
5476a9a4
GM
12332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12333/* end confdefs.h. */
12334#include <jpeglib.h>
12335 version=JPEG_LIB_VERSION
f199cab1 12336
5476a9a4
GM
12337_ACEOF
12338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12339 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12340 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12341
5476a9a4
GM
12342else
12343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12344$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12345 HAVE_JPEG=no
067d23c9 12346fi
5476a9a4 12347rm -f conftest*
067d23c9 12348
5476a9a4
GM
12349 fi
12350 if test "${HAVE_JPEG}" = "yes"; then
12351 LIBJPEG=-ljpeg
12352 fi
12353fi
067d23c9
KY
12354
12355
5476a9a4
GM
12356### Use -lpng if available, unless `--with-png=no'.
12357HAVE_PNG=no
12358LIBPNG=
12359if test "${HAVE_X11}" = "yes"; then
12360 if test "${with_png}" != "no"; then
12361 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12362 # in /usr/include/libpng.
12363 for ac_header in png.h libpng/png.h
12364do :
12365 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12366ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12367eval as_val=\$$as_ac_Header
12368 if test "x$as_val" = x""yes; then :
12369 cat >>confdefs.h <<_ACEOF
12370#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12371_ACEOF
12372 break
12373fi
067d23c9 12374
5476a9a4 12375done
067d23c9 12376
5476a9a4
GM
12377 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12379$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12380if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12381 $as_echo_n "(cached) " >&6
12382else
12383 ac_check_lib_save_LIBS=$LIBS
12384LIBS="-lpng -lz -lm $LIBS"
12385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12386/* end confdefs.h. */
067d23c9 12387
5476a9a4
GM
12388/* Override any GCC internal prototype to avoid an error.
12389 Use char because int might match the return type of a GCC
12390 builtin and then its argument prototype would still apply. */
12391#ifdef __cplusplus
12392extern "C"
12393#endif
12394char png_get_channels ();
12395int
12396main ()
12397{
12398return png_get_channels ();
12399 ;
12400 return 0;
12401}
12402_ACEOF
12403if ac_fn_c_try_link "$LINENO"; then :
12404 ac_cv_lib_png_png_get_channels=yes
f199cab1 12405else
5476a9a4
GM
12406 ac_cv_lib_png_png_get_channels=no
12407fi
12408rm -f core conftest.err conftest.$ac_objext \
12409 conftest$ac_exeext conftest.$ac_ext
12410LIBS=$ac_check_lib_save_LIBS
12411fi
12412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
12413$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
12414if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
12415 HAVE_PNG=yes
f199cab1 12416fi
067d23c9 12417
5476a9a4
GM
12418 fi
12419 fi
7834125e 12420
5476a9a4
GM
12421 if test "${HAVE_PNG}" = "yes"; then
12422
12423$as_echo "#define HAVE_PNG 1" >>confdefs.h
12424
12425 LIBPNG="-lpng -lz -lm"
12426
12427 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
12428 # include <libpng/png.h>
12429 #else
12430 # include <png.h>
12431 #endif
12432
12433"
12434if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
12435
12436else
7834125e 12437
5476a9a4 12438$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 12439
f199cab1 12440fi
7834125e 12441
5476a9a4
GM
12442 fi
12443fi
7834125e
GM
12444
12445
5476a9a4
GM
12446### Use -ltiff if available, unless `--with-tiff=no'.
12447HAVE_TIFF=no
12448LIBTIFF=
12449if test "${HAVE_X11}" = "yes"; then
12450 if test "${with_tiff}" != "no"; then
12451 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
12452if test "x$ac_cv_header_tiffio_h" = x""yes; then :
12453 tifflibs="-lz -lm"
12454 # At least one tiff package requires the jpeg library.
12455 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
12456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
12457$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
12458if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
12459 $as_echo_n "(cached) " >&6
12460else
5476a9a4
GM
12461 ac_check_lib_save_LIBS=$LIBS
12462LIBS="-ltiff $tifflibs $LIBS"
12463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12464/* end confdefs.h. */
067d23c9 12465
5476a9a4
GM
12466/* Override any GCC internal prototype to avoid an error.
12467 Use char because int might match the return type of a GCC
12468 builtin and then its argument prototype would still apply. */
12469#ifdef __cplusplus
12470extern "C"
f199cab1 12471#endif
5476a9a4
GM
12472char TIFFGetVersion ();
12473int
12474main ()
12475{
12476return TIFFGetVersion ();
12477 ;
12478 return 0;
12479}
f199cab1 12480_ACEOF
5476a9a4
GM
12481if ac_fn_c_try_link "$LINENO"; then :
12482 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 12483else
5476a9a4 12484 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 12485fi
5476a9a4
GM
12486rm -f core conftest.err conftest.$ac_objext \
12487 conftest$ac_exeext conftest.$ac_ext
12488LIBS=$ac_check_lib_save_LIBS
f199cab1 12489fi
5476a9a4
GM
12490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
12491$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
12492if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
12493 HAVE_TIFF=yes
f199cab1 12494fi
067d23c9 12495
5476a9a4 12496fi
067d23c9 12497
067d23c9 12498
5476a9a4 12499 fi
f199cab1 12500
5476a9a4 12501 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 12502
5476a9a4 12503$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 12504
5476a9a4
GM
12505 LIBTIFF=-ltiff
12506 fi
f199cab1 12507fi
067d23c9 12508
067d23c9 12509
5476a9a4
GM
12510### Use -lgif or -lungif if available, unless `--with-gif=no'.
12511HAVE_GIF=no
12512LIBGIF=
12513if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
12514 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
12515if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
12516 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12517# Earlier versions can crash Emacs.
12518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
12519$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
12520if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
12521 $as_echo_n "(cached) " >&6
12522else
5476a9a4
GM
12523 ac_check_lib_save_LIBS=$LIBS
12524LIBS="-lgif $LIBS"
12525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12526/* end confdefs.h. */
067d23c9 12527
5476a9a4
GM
12528/* Override any GCC internal prototype to avoid an error.
12529 Use char because int might match the return type of a GCC
12530 builtin and then its argument prototype would still apply. */
12531#ifdef __cplusplus
12532extern "C"
12533#endif
12534char EGifPutExtensionLast ();
f199cab1
GM
12535int
12536main ()
12537{
5476a9a4 12538return EGifPutExtensionLast ();
f199cab1
GM
12539 ;
12540 return 0;
12541}
12542_ACEOF
5476a9a4
GM
12543if ac_fn_c_try_link "$LINENO"; then :
12544 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 12545else
5476a9a4 12546 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 12547fi
5476a9a4
GM
12548rm -f core conftest.err conftest.$ac_objext \
12549 conftest$ac_exeext conftest.$ac_ext
12550LIBS=$ac_check_lib_save_LIBS
12551fi
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
12553$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
12554if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
12555 HAVE_GIF=yes
12556else
12557 HAVE_GIF=maybe
f199cab1 12558fi
067d23c9 12559
5476a9a4
GM
12560fi
12561
12562
12563
12564 if test "$HAVE_GIF" = yes; then
12565 LIBGIF=-lgif
12566 elif test "$HAVE_GIF" = maybe; then
12567# If gif_lib.h but no libgif, try libungif.
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
12569$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
12570if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
12571 $as_echo_n "(cached) " >&6
12572else
5476a9a4
GM
12573 ac_check_lib_save_LIBS=$LIBS
12574LIBS="-lungif $LIBS"
12575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12576/* end confdefs.h. */
f199cab1 12577
5476a9a4
GM
12578/* Override any GCC internal prototype to avoid an error.
12579 Use char because int might match the return type of a GCC
12580 builtin and then its argument prototype would still apply. */
12581#ifdef __cplusplus
12582extern "C"
12583#endif
12584char EGifPutExtensionLast ();
f199cab1
GM
12585int
12586main ()
12587{
5476a9a4 12588return EGifPutExtensionLast ();
f199cab1
GM
12589 ;
12590 return 0;
12591}
12592_ACEOF
5476a9a4
GM
12593if ac_fn_c_try_link "$LINENO"; then :
12594 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 12595else
5476a9a4 12596 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 12597fi
5476a9a4
GM
12598rm -f core conftest.err conftest.$ac_objext \
12599 conftest$ac_exeext conftest.$ac_ext
12600LIBS=$ac_check_lib_save_LIBS
f199cab1 12601fi
5476a9a4
GM
12602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
12603$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
12604if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
12605 HAVE_GIF=yes
12606else
12607 HAVE_GIF=no
12608fi
12609
12610 test "$HAVE_GIF" = yes && LIBGIF=-lungif
12611 fi
12612
12613 if test "${HAVE_GIF}" = "yes"; then
12614
12615$as_echo "#define HAVE_GIF 1" >>confdefs.h
12616
12617 fi
12618fi
12619
12620
12621if test "${HAVE_X11}" = "yes"; then
12622 MISSING=""
12623 WITH_NO=""
12624 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
12625 MISSING="libXpm" && WITH_NO="--with-xpm=no"
12626 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
12627 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
12628 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
12629 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
12630 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
12631 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
12632 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
12633 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
12634
12635 if test "X${MISSING}" != X; then
12636 as_fn_error "The following required libraries were not found:
12637 $MISSING
12638Maybe some development libraries/packages are missing?
12639If you don't want to link with them give
12640 $WITH_NO
12641as options to configure" "$LINENO" 5
12642 fi
12643fi
12644
12645### Use -lgpm if available, unless `--with-gpm=no'.
12646HAVE_GPM=no
12647LIBGPM=
12648if test "${with_gpm}" != "no"; then
12649 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
12650if test "x$ac_cv_header_gpm_h" = x""yes; then :
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
12652$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
12653if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
12654 $as_echo_n "(cached) " >&6
12655else
5476a9a4
GM
12656 ac_check_lib_save_LIBS=$LIBS
12657LIBS="-lgpm $LIBS"
12658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12659/* end confdefs.h. */
12660
5476a9a4
GM
12661/* Override any GCC internal prototype to avoid an error.
12662 Use char because int might match the return type of a GCC
12663 builtin and then its argument prototype would still apply. */
12664#ifdef __cplusplus
12665extern "C"
12666#endif
12667char Gpm_Open ();
067d23c9
KY
12668int
12669main ()
12670{
5476a9a4 12671return Gpm_Open ();
067d23c9
KY
12672 ;
12673 return 0;
12674}
12675_ACEOF
5476a9a4
GM
12676if ac_fn_c_try_link "$LINENO"; then :
12677 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 12678else
5476a9a4 12679 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 12680fi
5476a9a4
GM
12681rm -f core conftest.err conftest.$ac_objext \
12682 conftest$ac_exeext conftest.$ac_ext
12683LIBS=$ac_check_lib_save_LIBS
12684fi
12685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12686$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
12687if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
12688 HAVE_GPM=yes
067d23c9 12689fi
f199cab1 12690
5476a9a4 12691fi
f199cab1 12692
f199cab1 12693
f199cab1 12694
5476a9a4 12695 if test "${HAVE_GPM}" = "yes"; then
f199cab1 12696
5476a9a4 12697$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 12698
5476a9a4
GM
12699 LIBGPM=-lgpm
12700 fi
067d23c9 12701fi
067d23c9
KY
12702
12703
12704
12705
12706
12707
5476a9a4
GM
12708GNUSTEP_CFLAGS=
12709### Use NeXTstep API to implement GUI.
12710if test "${HAVE_NS}" = "yes"; then
067d23c9 12711
5476a9a4 12712$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 12713
5476a9a4 12714 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 12715
5476a9a4 12716$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 12717
5476a9a4
GM
12718 fi
12719 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 12720
5476a9a4 12721$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 12722
5476a9a4
GM
12723 # See also .m.o rule in Makefile.in */
12724 # FIXME: are all these flags really needed? Document here why. */
12725 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
12726 ## Extra CFLAGS applied to src/*.m files.
12727 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"
12728 fi
12729 # We also have mouse menus.
12730 HAVE_MENUS=yes
12731 OTHER_FILES=ns-app
12732fi
f199cab1
GM
12733
12734
5476a9a4
GM
12735### Use session management (-lSM -lICE) if available
12736HAVE_X_SM=no
12737LIBXSM=
12738if test "${HAVE_X11}" = "yes"; then
12739 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
12740if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
12741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
12742$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
12743if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
12744 $as_echo_n "(cached) " >&6
12745else
5476a9a4
GM
12746 ac_check_lib_save_LIBS=$LIBS
12747LIBS="-lSM -lICE $LIBS"
12748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12749/* end confdefs.h. */
12750
5476a9a4
GM
12751/* Override any GCC internal prototype to avoid an error.
12752 Use char because int might match the return type of a GCC
12753 builtin and then its argument prototype would still apply. */
12754#ifdef __cplusplus
12755extern "C"
12756#endif
12757char SmcOpenConnection ();
f199cab1
GM
12758int
12759main ()
12760{
5476a9a4
GM
12761return SmcOpenConnection ();
12762 ;
12763 return 0;
f199cab1 12764}
067d23c9 12765_ACEOF
5476a9a4
GM
12766if ac_fn_c_try_link "$LINENO"; then :
12767 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 12768else
5476a9a4 12769 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 12770fi
5476a9a4
GM
12771rm -f core conftest.err conftest.$ac_objext \
12772 conftest$ac_exeext conftest.$ac_ext
12773LIBS=$ac_check_lib_save_LIBS
12774fi
12775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
12776$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
12777if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
12778 HAVE_X_SM=yes
067d23c9 12779fi
067d23c9 12780
f199cab1 12781fi
f199cab1 12782
f199cab1 12783
067d23c9 12784
5476a9a4
GM
12785 if test "${HAVE_X_SM}" = "yes"; then
12786
12787$as_echo "#define HAVE_X_SM 1" >>confdefs.h
12788
12789 LIBXSM="-lSM -lICE"
12790 case "$LIBS" in
12791 *-lSM*) ;;
12792 *) LIBS="$LIBXSM $LIBS" ;;
12793 esac
067d23c9 12794 fi
5476a9a4 12795fi
067d23c9 12796
067d23c9 12797
5476a9a4
GM
12798### Use libxml (-lxml2) if available
12799HAVE_LIBXML2=no
12800if test "${with_xml2}" != "no"; then
12801 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 12802
5476a9a4 12803 succeeded=no
067d23c9 12804
5476a9a4
GM
12805 if test "$PKG_CONFIG" = "no" ; then
12806 HAVE_LIBXML2=no
12807 else
12808 PKG_CONFIG_MIN_VERSION=0.9.0
12809 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
12811$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 12812
5476a9a4
GM
12813 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 &&
12814 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
12815 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then
12816 edit_cflags="
12817 s,///*,/,g
12818 s/^/ /
12819 s/ -I/ $isystem/g
12820 s/^ //
12821 "
12822 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
12823 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
12824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
12825$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
12826 succeeded=yes
12827 else
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12829$as_echo "no" >&6; }
12830 LIBXML2_CFLAGS=""
12831 LIBXML2_LIBS=""
12832 ## If we have a custom action on failure, don't print errors, but
12833 ## do set a variable so people can do so.
12834 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"`
12835
12836 fi
12837
12838
12839
12840 else
12841 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12842 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12843 fi
12844 fi
12845
12846 if test $succeeded = yes; then
12847 HAVE_LIBXML2=yes
12848 else
12849 HAVE_LIBXML2=no
12850 fi
12851
12852 if test "${HAVE_LIBXML2}" = "yes"; then
12853 LIBS="$LIBXML2_LIBS $LIBS"
12854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
12855$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
12856if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
12857 $as_echo_n "(cached) " >&6
12858else
5476a9a4
GM
12859 ac_check_lib_save_LIBS=$LIBS
12860LIBS="-lxml2 $LIBS"
12861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12862/* end confdefs.h. */
12863
5476a9a4
GM
12864/* Override any GCC internal prototype to avoid an error.
12865 Use char because int might match the return type of a GCC
12866 builtin and then its argument prototype would still apply. */
12867#ifdef __cplusplus
12868extern "C"
12869#endif
12870char htmlReadMemory ();
067d23c9
KY
12871int
12872main ()
12873{
5476a9a4 12874return htmlReadMemory ();
067d23c9
KY
12875 ;
12876 return 0;
12877}
12878_ACEOF
5476a9a4
GM
12879if ac_fn_c_try_link "$LINENO"; then :
12880 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 12881else
5476a9a4 12882 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 12883fi
5476a9a4
GM
12884rm -f core conftest.err conftest.$ac_objext \
12885 conftest$ac_exeext conftest.$ac_ext
12886LIBS=$ac_check_lib_save_LIBS
12887fi
12888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
12889$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
12890if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
12891 HAVE_LIBXML2=yes
12892else
12893 HAVE_LIBXML2=no
067d23c9
KY
12894fi
12895
5476a9a4 12896 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 12897
5476a9a4 12898$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 12899
5476a9a4
GM
12900 else
12901 LIBXML2_LIBS=""
12902 LIBXML2_CFLAGS=""
12903 fi
067d23c9 12904 fi
5476a9a4 12905fi
067d23c9 12906
067d23c9 12907
067d23c9 12908
5476a9a4
GM
12909# If netdb.h doesn't declare h_errno, we must declare it by hand.
12910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
12911$as_echo_n "checking whether netdb declares h_errno... " >&6; }
12912if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
12913 $as_echo_n "(cached) " >&6
067d23c9 12914else
5476a9a4
GM
12915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12916/* end confdefs.h. */
12917#include <netdb.h>
12918int
12919main ()
12920{
12921return h_errno;
12922 ;
12923 return 0;
12924}
12925_ACEOF
12926if ac_fn_c_try_link "$LINENO"; then :
12927 emacs_cv_netdb_declares_h_errno=yes
12928else
12929 emacs_cv_netdb_declares_h_errno=no
067d23c9 12930fi
5476a9a4
GM
12931rm -f core conftest.err conftest.$ac_objext \
12932 conftest$ac_exeext conftest.$ac_ext
12933fi
12934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
12935$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
12936if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 12937
5476a9a4 12938$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 12939
5476a9a4 12940fi
f199cab1 12941
2c98a625
GM
12942# sqrt and other floating-point functions such as fmod and frexp
12943# are found in -lm on most systems.
5476a9a4
GM
12944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
12945$as_echo_n "checking for sqrt in -lm... " >&6; }
12946if test "${ac_cv_lib_m_sqrt+set}" = set; then :
12947 $as_echo_n "(cached) " >&6
12948else
12949 ac_check_lib_save_LIBS=$LIBS
12950LIBS="-lm $LIBS"
12951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12952/* end confdefs.h. */
f199cab1 12953
5476a9a4
GM
12954/* Override any GCC internal prototype to avoid an error.
12955 Use char because int might match the return type of a GCC
12956 builtin and then its argument prototype would still apply. */
12957#ifdef __cplusplus
12958extern "C"
12959#endif
12960char sqrt ();
12961int
12962main ()
12963{
12964return sqrt ();
12965 ;
12966 return 0;
12967}
12968_ACEOF
12969if ac_fn_c_try_link "$LINENO"; then :
12970 ac_cv_lib_m_sqrt=yes
12971else
12972 ac_cv_lib_m_sqrt=no
12973fi
12974rm -f core conftest.err conftest.$ac_objext \
12975 conftest$ac_exeext conftest.$ac_ext
12976LIBS=$ac_check_lib_save_LIBS
12977fi
12978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
12979$as_echo "$ac_cv_lib_m_sqrt" >&6; }
12980if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
12981 cat >>confdefs.h <<_ACEOF
12982#define HAVE_LIBM 1
12983_ACEOF
f199cab1 12984
5476a9a4 12985 LIBS="-lm $LIBS"
f199cab1 12986
5476a9a4 12987fi
f199cab1 12988
f199cab1 12989
5476a9a4
GM
12990# Check for mail-locking functions in a "mail" library. Probably this should
12991# have the same check as for liblockfile below.
12992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
12993$as_echo_n "checking for maillock in -lmail... " >&6; }
12994if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
12995 $as_echo_n "(cached) " >&6
12996else
5476a9a4
GM
12997 ac_check_lib_save_LIBS=$LIBS
12998LIBS="-lmail $LIBS"
12999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13000/* end confdefs.h. */
13001
5476a9a4
GM
13002/* Override any GCC internal prototype to avoid an error.
13003 Use char because int might match the return type of a GCC
13004 builtin and then its argument prototype would still apply. */
13005#ifdef __cplusplus
13006extern "C"
067d23c9 13007#endif
5476a9a4
GM
13008char maillock ();
13009int
13010main ()
13011{
13012return maillock ();
13013 ;
13014 return 0;
13015}
067d23c9 13016_ACEOF
5476a9a4
GM
13017if ac_fn_c_try_link "$LINENO"; then :
13018 ac_cv_lib_mail_maillock=yes
067d23c9 13019else
5476a9a4 13020 ac_cv_lib_mail_maillock=no
067d23c9 13021fi
5476a9a4
GM
13022rm -f core conftest.err conftest.$ac_objext \
13023 conftest$ac_exeext conftest.$ac_ext
13024LIBS=$ac_check_lib_save_LIBS
067d23c9 13025fi
5476a9a4
GM
13026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13027$as_echo "$ac_cv_lib_mail_maillock" >&6; }
13028if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
13029 have_mail=yes
f199cab1 13030else
5476a9a4 13031 have_mail=no
067d23c9
KY
13032fi
13033
5476a9a4
GM
13034if test $have_mail = yes; then
13035 LIBS_MAIL=-lmail
13036 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13037
5476a9a4 13038$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 13039
5476a9a4
GM
13040else
13041 LIBS_MAIL=
13042fi
13043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13044$as_echo_n "checking for maillock in -llockfile... " >&6; }
13045if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
13046 $as_echo_n "(cached) " >&6
13047else
5476a9a4
GM
13048 ac_check_lib_save_LIBS=$LIBS
13049LIBS="-llockfile $LIBS"
067d23c9
KY
13050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051/* end confdefs.h. */
13052
13053/* Override any GCC internal prototype to avoid an error.
13054 Use char because int might match the return type of a GCC
13055 builtin and then its argument prototype would still apply. */
13056#ifdef __cplusplus
13057extern "C"
13058#endif
5476a9a4 13059char maillock ();
067d23c9
KY
13060int
13061main ()
13062{
5476a9a4 13063return maillock ();
067d23c9
KY
13064 ;
13065 return 0;
13066}
13067_ACEOF
5476a9a4
GM
13068if ac_fn_c_try_link "$LINENO"; then :
13069 ac_cv_lib_lockfile_maillock=yes
13070else
13071 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
13072fi
13073rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
13074 conftest$ac_exeext conftest.$ac_ext
13075LIBS=$ac_check_lib_save_LIBS
067d23c9 13076fi
5476a9a4
GM
13077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13078$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
13079if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
13080 have_lockfile=yes
067d23c9 13081else
5476a9a4 13082 have_lockfile=no
f199cab1
GM
13083fi
13084
5476a9a4
GM
13085if test $have_lockfile = yes; then
13086 LIBS_MAIL=-llockfile
13087 LIBS="$LIBS_MAIL $LIBS"
067d23c9 13088
5476a9a4 13089$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 13090
5476a9a4
GM
13091else
13092# If we have the shared liblockfile, assume we must use it for mail
13093# locking (e.g. Debian). If we couldn't link against liblockfile
13094# (no liblockfile.a installed), ensure that we don't need to.
13095 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13096set dummy liblockfile.so; ac_word=$2
13097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13098$as_echo_n "checking for $ac_word... " >&6; }
13099if test "${ac_cv_prog_liblockfile+set}" = set; then :
13100 $as_echo_n "(cached) " >&6
13101else
13102 if test -n "$liblockfile"; then
13103 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13104else
13105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13106as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13107for as_dir in $as_dummy
13108do
13109 IFS=$as_save_IFS
13110 test -z "$as_dir" && as_dir=.
13111 for ac_exec_ext in '' $ac_executable_extensions; do
13112 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13113 ac_cv_prog_liblockfile="yes"
13114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13115 break 2
13116 fi
13117done
13118 done
13119IFS=$as_save_IFS
067d23c9 13120
5476a9a4
GM
13121 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13122fi
13123fi
13124liblockfile=$ac_cv_prog_liblockfile
13125if test -n "$liblockfile"; then
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13127$as_echo "$liblockfile" >&6; }
13128else
13129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13130$as_echo "no" >&6; }
13131fi
067d23c9 13132
067d23c9 13133
5476a9a4
GM
13134 if test $ac_cv_prog_liblockfile = yes; then
13135 as_fn_error "Shared liblockfile found but can't link against it.
13136This probably means that movemail could lose mail.
13137There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13138 fi
13139fi
067d23c9 13140
067d23c9 13141
067d23c9 13142
067d23c9
KY
13143
13144
5476a9a4
GM
13145## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
13146## interlock access to the mail spool. The alternative is a lock file named
13147## /usr/spool/mail/$USER.lock.
13148mail_lock=no
13149case "$opsys" in
13150 aix4-2) mail_lock="lockf" ;;
067d23c9 13151
5476a9a4 13152 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 13153
5476a9a4
GM
13154 ## On GNU/Linux systems, both methods are used by various mail programs.
13155 ## I assume most people are using newer mailers that have heard of flock.
13156 ## Change this if you need to.
13157 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
13158 ## configure gets the right answers, and that means *NOT* using flock.
13159 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
13160 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
13161 ## Debian maintainer hasn't provided a clean fix for Emacs.
13162 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
13163 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
13164 ## correct logic. -- fx
13165 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13166 ## liblockfile is a Free Software replacement for libmail, used on
13167 ## Debian systems and elsewhere. -rfr.
13168 gnu-*)
13169 mail_lock="flock"
13170 if test $have_mail = yes || test $have_lockfile = yes; then
13171 test $ac_cv_header_maillock_h = yes && mail_lock=no
13172 fi
13173 ;;
13174esac
f199cab1 13175
5476a9a4
GM
13176BLESSMAIL_TARGET=
13177case "$mail_lock" in
13178 flock)
13179$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13180 ;;
f199cab1 13181
5476a9a4
GM
13182 lockf)
13183$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13184 ;;
f199cab1 13185
5476a9a4
GM
13186 *) BLESSMAIL_TARGET="need-blessmail" ;;
13187esac
f199cab1
GM
13188
13189
13190
5476a9a4
GM
13191for ac_func in gethostname \
13192closedir getrusage get_current_dir_name \
2c98a625 13193lrand48 setsid \
5476a9a4
GM
13194fpathconf select euidaccess getpagesize setlocale \
13195utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
13196__fpending strsignal setitimer \
13197sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
13198gai_strerror mkstemp getline getdelim fsync sync \
13199difftime posix_memalign \
13200getpwent endpwent getgrent endgrent \
13201touchlock \
13202cfmakeraw cfsetspeed copysign __executable_start
13203do :
13204 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13205ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13206eval as_val=\$$as_ac_var
13207 if test "x$as_val" = x""yes; then :
13208 cat >>confdefs.h <<_ACEOF
13209#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13210_ACEOF
f199cab1 13211
5476a9a4
GM
13212fi
13213done
f199cab1
GM
13214
13215
c0528ebe
GM
13216if test $opsys = unixware; then
13217
13218$as_echo "#define BROKEN_GETWD 1" >>confdefs.h
13219
13220else
5476a9a4
GM
13221 for ac_func in getwd
13222do :
13223 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13224if test "x$ac_cv_func_getwd" = x""yes; then :
13225 cat >>confdefs.h <<_ACEOF
13226#define HAVE_GETWD 1
13227_ACEOF
f199cab1 13228
5476a9a4
GM
13229fi
13230done
f199cab1 13231
5476a9a4 13232fi
f199cab1 13233
5476a9a4
GM
13234## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13235## has a broken `rint' in some library versions including math library
13236## version number A.09.05.
13237## You can fix the math library by installing patch number PHSS_4630.
13238## But we can fix it more reliably for Emacs by just not using rint.
8ad96b1d 13239## We also skip HAVE_RANDOM - see comments in src/conf_post.h.
5476a9a4
GM
13240case $opsys in
13241 hpux*) : ;;
13242 *) for ac_func in random rint
13243do :
13244 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13245ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13246eval as_val=\$$as_ac_var
13247 if test "x$as_val" = x""yes; then :
13248 cat >>confdefs.h <<_ACEOF
13249#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13250_ACEOF
f199cab1 13251
5476a9a4
GM
13252fi
13253done
13254 ;;
13255esac
f199cab1 13256
5476a9a4
GM
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13258$as_echo_n "checking for __builtin_unwind_init... " >&6; }
13259if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 13260 $as_echo_n "(cached) " >&6
f199cab1
GM
13261else
13262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13263/* end confdefs.h. */
13264
067d23c9
KY
13265int
13266main ()
13267{
5476a9a4 13268__builtin_unwind_init ();
067d23c9
KY
13269 ;
13270 return 0;
13271}
13272_ACEOF
5476a9a4
GM
13273if ac_fn_c_try_link "$LINENO"; then :
13274 emacs_cv_func___builtin_unwind_init=yes
067d23c9 13275else
5476a9a4 13276 emacs_cv_func___builtin_unwind_init=no
067d23c9 13277fi
5476a9a4
GM
13278rm -f core conftest.err conftest.$ac_objext \
13279 conftest$ac_exeext conftest.$ac_ext
067d23c9 13280fi
5476a9a4
GM
13281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13282$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13283if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 13284
5476a9a4 13285$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 13286
067d23c9 13287fi
067d23c9 13288
f199cab1
GM
13289
13290
13291
13292
5476a9a4
GM
13293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13294$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13295if test "${ac_cv_sys_largefile_source+set}" = set; then :
13296 $as_echo_n "(cached) " >&6
13297else
13298 while :; do
13299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13300/* end confdefs.h. */
13301#include <sys/types.h> /* for off_t */
13302 #include <stdio.h>
13303int
13304main ()
13305{
13306int (*fp) (FILE *, off_t, int) = fseeko;
13307 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13308 ;
13309 return 0;
13310}
13311_ACEOF
13312if ac_fn_c_try_link "$LINENO"; then :
13313 ac_cv_sys_largefile_source=no; break
067d23c9 13314fi
5476a9a4
GM
13315rm -f core conftest.err conftest.$ac_objext \
13316 conftest$ac_exeext conftest.$ac_ext
13317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318/* end confdefs.h. */
13319#define _LARGEFILE_SOURCE 1
13320#include <sys/types.h> /* for off_t */
13321 #include <stdio.h>
13322int
13323main ()
13324{
13325int (*fp) (FILE *, off_t, int) = fseeko;
13326 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13327 ;
13328 return 0;
13329}
13330_ACEOF
13331if ac_fn_c_try_link "$LINENO"; then :
13332 ac_cv_sys_largefile_source=1; break
13333fi
13334rm -f core conftest.err conftest.$ac_objext \
13335 conftest$ac_exeext conftest.$ac_ext
13336 ac_cv_sys_largefile_source=unknown
13337 break
13338done
13339fi
13340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13341$as_echo "$ac_cv_sys_largefile_source" >&6; }
13342case $ac_cv_sys_largefile_source in #(
13343 no | unknown) ;;
13344 *)
13345cat >>confdefs.h <<_ACEOF
13346#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13347_ACEOF
13348;;
13349esac
13350rm -rf conftest*
067d23c9 13351
5476a9a4
GM
13352# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13353# in glibc 2.1.3, but that breaks too many other things.
13354# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13355if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 13356
5476a9a4 13357$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 13358
5476a9a4 13359fi
067d23c9
KY
13360
13361
5476a9a4
GM
13362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
13363$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
13364if test "${ac_cv_func_getpgrp_void+set}" = set; then :
13365 $as_echo_n "(cached) " >&6
13366else
13367 # Use it with a single arg.
13368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13369/* end confdefs.h. */
13370$ac_includes_default
13371int
13372main ()
13373{
13374getpgrp (0);
13375 ;
13376 return 0;
13377}
13378_ACEOF
13379if ac_fn_c_try_compile "$LINENO"; then :
13380 ac_cv_func_getpgrp_void=no
13381else
13382 ac_cv_func_getpgrp_void=yes
13383fi
13384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 13385
5476a9a4
GM
13386fi
13387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
13388$as_echo "$ac_cv_func_getpgrp_void" >&6; }
13389if test $ac_cv_func_getpgrp_void = yes; then
067d23c9 13390
5476a9a4 13391$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
067d23c9 13392
5476a9a4 13393fi
067d23c9
KY
13394
13395
5476a9a4
GM
13396# UNIX98 PTYs.
13397for ac_func in grantpt
13398do :
13399 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13400if test "x$ac_cv_func_grantpt" = x""yes; then :
13401 cat >>confdefs.h <<_ACEOF
13402#define HAVE_GRANTPT 1
13403_ACEOF
f199cab1 13404
5476a9a4
GM
13405fi
13406done
f199cab1 13407
f199cab1 13408
5476a9a4 13409# PTY-related GNU extensions.
1146da8d 13410for ac_func in getpt posix_openpt
5476a9a4 13411do :
1146da8d
GM
13412 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13413ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13414eval as_val=\$$as_ac_var
13415 if test "x$as_val" = x""yes; then :
5476a9a4 13416 cat >>confdefs.h <<_ACEOF
1146da8d 13417#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5476a9a4 13418_ACEOF
f199cab1 13419
5476a9a4
GM
13420fi
13421done
f199cab1 13422
f199cab1 13423
5476a9a4
GM
13424# Check this now, so that we will NOT find the above functions in ncurses.
13425# That is because we have not set up to link ncurses in lib-src.
13426# It's better to believe a function is not available
13427# than to expect to find it in ncurses.
13428# Also we need tputs and friends to be able to build at all.
13429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13430$as_echo_n "checking for library containing tputs... " >&6; }
13431# Run a test program that contains a call to tputs, a call that is
13432# never executed. This tests whether a pre-'main' dynamic linker
13433# works with the library. It's too much trouble to actually call
13434# tputs in the test program, due to portability hassles. When
13435# cross-compiling, assume the test program will run if it links.
f199cab1 13436
5476a9a4
GM
13437# Maybe curses should be tried earlier?
13438# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
13439for tputs_library in '' tinfo ncurses terminfo termcap curses; do
13440 OLIBS=$LIBS
13441 if test -z "$tputs_library"; then
13442 LIBS_TERMCAP=
13443 msg='none required'
13444 else
13445 LIBS_TERMCAP=-l$tputs_library
13446 msg=$LIBS_TERMCAP
13447 LIBS="$LIBS_TERMCAP $LIBS"
13448 fi
13449 if test "$cross_compiling" = yes; then :
13450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13451/* end confdefs.h. */
13452
5476a9a4
GM
13453 extern void tputs (const char *, int, int (*)(int));
13454 int main (int argc, char **argv)
13455 {
13456 if (argc == 10000)
13457 tputs (argv[0], 0, 0);
13458 return 0;
13459 }
13460
067d23c9
KY
13461_ACEOF
13462if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13463
067d23c9 13464else
5476a9a4 13465 msg=no
067d23c9
KY
13466fi
13467rm -f core conftest.err conftest.$ac_objext \
13468 conftest$ac_exeext conftest.$ac_ext
067d23c9 13469else
5476a9a4 13470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13471/* end confdefs.h. */
13472
5476a9a4
GM
13473 extern void tputs (const char *, int, int (*)(int));
13474 int main (int argc, char **argv)
13475 {
13476 if (argc == 10000)
13477 tputs (argv[0], 0, 0);
13478 return 0;
13479 }
13480
067d23c9 13481_ACEOF
5476a9a4
GM
13482if ac_fn_c_try_run "$LINENO"; then :
13483
067d23c9 13484else
5476a9a4 13485 msg=no
067d23c9 13486fi
5476a9a4
GM
13487rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13488 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 13489fi
5476a9a4
GM
13490
13491 LIBS=$OLIBS
13492 if test "X$msg" != Xno; then
13493 break
13494 fi
13495done
13496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
13497$as_echo "$msg" >&6; }
13498if test "X$msg" = Xno; then
13499 as_fn_error "The required function \`tputs' was not found in any library.
13500The following libraries were tried (in order):
13501 libtinfo, libncurses, libterminfo, libtermcap, libcurses
13502Please try installing whichever of these libraries is most appropriate
13503for your system, together with its header files.
13504For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
13505fi
13506
5476a9a4
GM
13507## Use termcap instead of terminfo?
13508## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
13509TERMINFO=yes
13510## FIXME? In the cases below where we unconditionally set
13511## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
13512## if that was found above to have tputs.
13513## Should we use the gnu* logic everywhere?
13514case "$opsys" in
13515 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
13516 ## The ncurses library has been moved out of the System framework in
13517 ## Mac OS X 10.2. So if configure detects it, set the command-line
13518 ## option to use it.
13519 darwin) LIBS_TERMCAP="-lncurses" ;;
13520
13521 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
13522
13523 freebsd)
13524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
13525$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
13526 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
13527 $as_echo_n "(cached) " >&6
13528else
5476a9a4 13529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13530/* end confdefs.h. */
5476a9a4 13531#include <osreldate.h>
067d23c9
KY
13532int
13533main ()
13534{
5476a9a4
GM
13535#if __FreeBSD_version < 400000
13536fail;
13537#endif
13538
067d23c9
KY
13539 ;
13540 return 0;
13541}
13542_ACEOF
13543if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13544 emacs_cv_freebsd_terminfo=yes
067d23c9 13545else
5476a9a4 13546 emacs_cv_freebsd_terminfo=no
067d23c9
KY
13547fi
13548rm -f core conftest.err conftest.$ac_objext \
13549 conftest$ac_exeext conftest.$ac_ext
13550fi
5476a9a4
GM
13551
13552
13553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
13554$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
13555
13556 if test $emacs_cv_freebsd_terminfo = yes; then
13557 LIBS_TERMCAP="-lncurses"
13558 else
13559 TERMINFO=no
13560 LIBS_TERMCAP="-ltermcap"
13561 fi
13562 ;;
13563
13564 netbsd)
13565 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
13566 TERMINFO=no
13567 LIBS_TERMCAP="-ltermcap"
13568 fi
13569 ;;
13570
13571 openbsd) LIBS_TERMCAP="-lncurses" ;;
13572
13573 ## hpux: Make sure we get select from libc rather than from libcurses
13574 ## because libcurses on HPUX 10.10 has a broken version of select.
13575 ## We used to use -lc -lcurses, but this may be cleaner.
13576 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
13577 # set that way, now it uses the default). Isn't this a contradiction?
13578 hpux*) LIBS_TERMCAP="-ltermcap" ;;
13579
13580esac
13581
13582TERMCAP_OBJ=tparam.o
13583if test $TERMINFO = yes; then
13584
13585$as_echo "#define TERMINFO 1" >>confdefs.h
13586
13587 TERMCAP_OBJ=terminfo.o
067d23c9
KY
13588fi
13589
f199cab1 13590
067d23c9 13591
5476a9a4
GM
13592
13593# Do we have res_init, for detecting changes in /etc/resolv.conf?
13594# On Darwin, res_init appears not to be useful: see bug#562 and
13595# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
13596resolv=no
13597
13598if test $opsys != darwin; then
13599
13600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13601/* end confdefs.h. */
13602#include <netinet/in.h>
13603#include <arpa/nameser.h>
13604#include <resolv.h>
067d23c9
KY
13605int
13606main ()
13607{
5476a9a4 13608return res_init();
067d23c9
KY
13609 ;
13610 return 0;
13611}
13612_ACEOF
13613if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13614 have_res_init=yes
067d23c9 13615else
5476a9a4 13616 have_res_init=no
067d23c9
KY
13617fi
13618rm -f core conftest.err conftest.$ac_objext \
13619 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13620 if test "$have_res_init" = no; then
13621 OLIBS="$LIBS"
13622 LIBS="$LIBS -lresolv"
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
13624$as_echo_n "checking for res_init with -lresolv... " >&6; }
13625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13626/* end confdefs.h. */
5476a9a4
GM
13627#include <netinet/in.h>
13628#include <arpa/nameser.h>
13629#include <resolv.h>
067d23c9
KY
13630int
13631main ()
13632{
5476a9a4 13633return res_init();
067d23c9
KY
13634 ;
13635 return 0;
13636}
13637_ACEOF
13638if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13639 have_res_init=yes
067d23c9 13640else
5476a9a4 13641 have_res_init=no
067d23c9
KY
13642fi
13643rm -f core conftest.err conftest.$ac_objext \
13644 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
13646$as_echo "$have_res_init" >&6; }
13647 if test "$have_res_init" = yes ; then
13648 resolv=yes
13649 fi
13650 LIBS="$OLIBS"
13651 fi
067d23c9 13652
5476a9a4
GM
13653 if test "$have_res_init" = yes; then
13654
13655$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 13656
5476a9a4 13657 fi
067d23c9 13658fi
5476a9a4
GM
13659# Do we need the Hesiod library to provide the support routines?
13660LIBHESIOD=
13661if test "$with_hesiod" != no ; then
13662 # Don't set $LIBS here -- see comments above. FIXME which comments?
13663 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
13664if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 13665
5476a9a4
GM
13666else
13667 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
13668if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 13669
5476a9a4
GM
13670else
13671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
13672$as_echo_n "checking for res_send in -lresolv... " >&6; }
13673if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
13674 $as_echo_n "(cached) " >&6
13675else
13676 ac_check_lib_save_LIBS=$LIBS
5476a9a4 13677LIBS="-lresolv $LIBS"
067d23c9
KY
13678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13679/* end confdefs.h. */
13680
13681/* Override any GCC internal prototype to avoid an error.
13682 Use char because int might match the return type of a GCC
13683 builtin and then its argument prototype would still apply. */
13684#ifdef __cplusplus
13685extern "C"
13686#endif
5476a9a4 13687char res_send ();
067d23c9
KY
13688int
13689main ()
13690{
5476a9a4 13691return res_send ();
067d23c9
KY
13692 ;
13693 return 0;
13694}
13695_ACEOF
13696if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13697 ac_cv_lib_resolv_res_send=yes
067d23c9 13698else
5476a9a4 13699 ac_cv_lib_resolv_res_send=no
067d23c9
KY
13700fi
13701rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
13702 conftest$ac_exeext conftest.$ac_ext
13703LIBS=$ac_check_lib_save_LIBS
13704fi
5476a9a4
GM
13705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
13706$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
13707if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
13708 resolv=yes
13709else
13710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
13711$as_echo_n "checking for __res_send in -lresolv... " >&6; }
13712if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
13713 $as_echo_n "(cached) " >&6
13714else
13715 ac_check_lib_save_LIBS=$LIBS
5476a9a4 13716LIBS="-lresolv $LIBS"
f199cab1
GM
13717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13718/* end confdefs.h. */
4717915f 13719
f199cab1
GM
13720/* Override any GCC internal prototype to avoid an error.
13721 Use char because int might match the return type of a GCC
13722 builtin and then its argument prototype would still apply. */
13723#ifdef __cplusplus
13724extern "C"
13725#endif
5476a9a4 13726char __res_send ();
f199cab1
GM
13727int
13728main ()
13729{
5476a9a4 13730return __res_send ();
f199cab1
GM
13731 ;
13732 return 0;
13733}
13734_ACEOF
13735if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13736 ac_cv_lib_resolv___res_send=yes
f199cab1 13737else
5476a9a4 13738 ac_cv_lib_resolv___res_send=no
f199cab1
GM
13739fi
13740rm -f core conftest.err conftest.$ac_objext \
13741 conftest$ac_exeext conftest.$ac_ext
13742LIBS=$ac_check_lib_save_LIBS
13743fi
5476a9a4
GM
13744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
13745$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
13746if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
13747 resolv=yes
067d23c9 13748fi
f199cab1 13749
5476a9a4 13750fi
1f5d53eb 13751
5476a9a4 13752fi
067d23c9 13753
067d23c9
KY
13754fi
13755
5476a9a4
GM
13756 if test "$resolv" = yes ; then
13757 RESOLVLIB=-lresolv
13758 else
13759 RESOLVLIB=
13760 fi
13761 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
13762if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
13763
13764else
13765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
13766$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
13767if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
13768 $as_echo_n "(cached) " >&6
13769else
13770 ac_check_lib_save_LIBS=$LIBS
13771LIBS="-lhesiod $RESOLVLIB $LIBS"
13772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13773/* end confdefs.h. */
5476a9a4
GM
13774
13775/* Override any GCC internal prototype to avoid an error.
13776 Use char because int might match the return type of a GCC
13777 builtin and then its argument prototype would still apply. */
13778#ifdef __cplusplus
13779extern "C"
13780#endif
13781char hes_getmailhost ();
067d23c9
KY
13782int
13783main ()
13784{
5476a9a4 13785return hes_getmailhost ();
067d23c9
KY
13786 ;
13787 return 0;
13788}
13789_ACEOF
f199cab1 13790if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
13791 ac_cv_lib_hesiod_hes_getmailhost=yes
13792else
13793 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 13794fi
f199cab1
GM
13795rm -f core conftest.err conftest.$ac_objext \
13796 conftest$ac_exeext conftest.$ac_ext
5476a9a4 13797LIBS=$ac_check_lib_save_LIBS
067d23c9 13798fi
5476a9a4
GM
13799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
13800$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
13801if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
13802 hesiod=yes
13803else
13804 :
067d23c9
KY
13805fi
13806
c5a68906 13807fi
f199cab1
GM
13808
13809
5476a9a4 13810 if test x"$hesiod" = xyes; then
f199cab1 13811
5476a9a4 13812$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
f199cab1 13813
5476a9a4 13814 LIBHESIOD=-lhesiod
c5a68906 13815 fi
5476a9a4 13816fi
4fc2b746 13817
4fc2b746 13818
5476a9a4
GM
13819# Do we need libresolv (due to res_init or Hesiod)?
13820if test "$resolv" = yes && test $opsys != darwin; then
4fc2b746 13821
5476a9a4 13822$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
4fc2b746 13823
5476a9a4
GM
13824 LIBRESOLV=-lresolv
13825else
13826 LIBRESOLV=
13827fi
4fc2b746 13828
4fc2b746 13829
5476a9a4
GM
13830# These tell us which Kerberos-related libraries to use.
13831COM_ERRLIB=
13832CRYPTOLIB=
13833KRB5LIB=
13834DESLIB=
13835KRB4LIB=
4fc2b746 13836
5476a9a4
GM
13837if test "${with_kerberos}" != no; then
13838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
13839$as_echo_n "checking for com_err in -lcom_err... " >&6; }
13840if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
13841 $as_echo_n "(cached) " >&6
13842else
13843 ac_check_lib_save_LIBS=$LIBS
13844LIBS="-lcom_err $LIBS"
13845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846/* end confdefs.h. */
4fc2b746 13847
5476a9a4
GM
13848/* Override any GCC internal prototype to avoid an error.
13849 Use char because int might match the return type of a GCC
13850 builtin and then its argument prototype would still apply. */
13851#ifdef __cplusplus
13852extern "C"
13853#endif
13854char com_err ();
13855int
13856main ()
13857{
13858return com_err ();
13859 ;
13860 return 0;
13861}
13862_ACEOF
13863if ac_fn_c_try_link "$LINENO"; then :
13864 ac_cv_lib_com_err_com_err=yes
13865else
13866 ac_cv_lib_com_err_com_err=no
13867fi
13868rm -f core conftest.err conftest.$ac_objext \
13869 conftest$ac_exeext conftest.$ac_ext
13870LIBS=$ac_check_lib_save_LIBS
13871fi
13872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
13873$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
13874if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
13875 have_com_err=yes
13876else
13877 have_com_err=no
13878fi
f199cab1 13879
5476a9a4
GM
13880 if test $have_com_err = yes; then
13881 COM_ERRLIB=-lcom_err
13882 LIBS="$COM_ERRLIB $LIBS"
f199cab1 13883
5476a9a4 13884$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
f199cab1 13885
5476a9a4
GM
13886 fi
13887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
13888$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
13889if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
13890 $as_echo_n "(cached) " >&6
13891else
13892 ac_check_lib_save_LIBS=$LIBS
13893LIBS="-lcrypto $LIBS"
13894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13895/* end confdefs.h. */
f199cab1 13896
5476a9a4
GM
13897/* Override any GCC internal prototype to avoid an error.
13898 Use char because int might match the return type of a GCC
13899 builtin and then its argument prototype would still apply. */
13900#ifdef __cplusplus
13901extern "C"
13902#endif
13903char mit_des_cbc_encrypt ();
13904int
13905main ()
13906{
13907return mit_des_cbc_encrypt ();
13908 ;
13909 return 0;
13910}
13911_ACEOF
13912if ac_fn_c_try_link "$LINENO"; then :
13913 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
13914else
13915 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
13916fi
13917rm -f core conftest.err conftest.$ac_objext \
13918 conftest$ac_exeext conftest.$ac_ext
13919LIBS=$ac_check_lib_save_LIBS
13920fi
13921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
13922$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
13923if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
13924 have_crypto=yes
13925else
13926 have_crypto=no
13927fi
f199cab1 13928
5476a9a4
GM
13929 if test $have_crypto = yes; then
13930 CRYPTOLIB=-lcrypto
13931 LIBS="$CRYPTOLIB $LIBS"
f199cab1 13932
5476a9a4 13933$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
f199cab1 13934
5476a9a4
GM
13935 fi
13936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
13937$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
13938if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
13939 $as_echo_n "(cached) " >&6
13940else
13941 ac_check_lib_save_LIBS=$LIBS
13942LIBS="-lk5crypto $LIBS"
13943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13944/* end confdefs.h. */
f199cab1 13945
5476a9a4
GM
13946/* Override any GCC internal prototype to avoid an error.
13947 Use char because int might match the return type of a GCC
13948 builtin and then its argument prototype would still apply. */
13949#ifdef __cplusplus
13950extern "C"
13951#endif
13952char mit_des_cbc_encrypt ();
13953int
13954main ()
13955{
13956return mit_des_cbc_encrypt ();
13957 ;
13958 return 0;
13959}
13960_ACEOF
13961if ac_fn_c_try_link "$LINENO"; then :
13962 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
13963else
13964 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
13965fi
13966rm -f core conftest.err conftest.$ac_objext \
13967 conftest$ac_exeext conftest.$ac_ext
13968LIBS=$ac_check_lib_save_LIBS
13969fi
13970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
13971$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
13972if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
13973 have_k5crypto=yes
13974else
13975 have_k5crypto=no
4fc2b746 13976fi
4fc2b746 13977
5476a9a4
GM
13978 if test $have_k5crypto = yes; then
13979 CRYPTOLIB=-lk5crypto
13980 LIBS="$CRYPTOLIB $LIBS"
4fc2b746 13981
5476a9a4 13982$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
4fc2b746 13983
5476a9a4
GM
13984 fi
13985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
13986$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
13987if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
13988 $as_echo_n "(cached) " >&6
13989else
13990 ac_check_lib_save_LIBS=$LIBS
13991LIBS="-lkrb5 $LIBS"
13992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13993/* end confdefs.h. */
4fc2b746 13994
5476a9a4
GM
13995/* Override any GCC internal prototype to avoid an error.
13996 Use char because int might match the return type of a GCC
13997 builtin and then its argument prototype would still apply. */
13998#ifdef __cplusplus
13999extern "C"
14000#endif
14001char krb5_init_context ();
14002int
14003main ()
14004{
14005return krb5_init_context ();
14006 ;
14007 return 0;
14008}
14009_ACEOF
14010if ac_fn_c_try_link "$LINENO"; then :
14011 ac_cv_lib_krb5_krb5_init_context=yes
14012else
14013 ac_cv_lib_krb5_krb5_init_context=no
14014fi
14015rm -f core conftest.err conftest.$ac_objext \
14016 conftest$ac_exeext conftest.$ac_ext
14017LIBS=$ac_check_lib_save_LIBS
14018fi
14019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14020$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14021if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14022 have_krb5=yes
14023else
14024 have_krb5=no
14025fi
f199cab1 14026
5476a9a4
GM
14027 if test $have_krb5=yes; then
14028 KRB5LIB=-lkrb5
14029 LIBS="$KRB5LIB $LIBS"
f199cab1 14030
5476a9a4 14031$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
f199cab1 14032
5476a9a4
GM
14033 fi
14034 if test "${with_kerberos5}" = no; then
14035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14036$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14037if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
14038 $as_echo_n "(cached) " >&6
14039else
5476a9a4
GM
14040 ac_check_lib_save_LIBS=$LIBS
14041LIBS="-ldes425 $LIBS"
14042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 14043/* end confdefs.h. */
f199cab1 14044
5476a9a4
GM
14045/* Override any GCC internal prototype to avoid an error.
14046 Use char because int might match the return type of a GCC
14047 builtin and then its argument prototype would still apply. */
14048#ifdef __cplusplus
14049extern "C"
14050#endif
14051char des_cbc_encrypt ();
3e0be4ab
GM
14052int
14053main ()
14054{
5476a9a4 14055return des_cbc_encrypt ();
3e0be4ab
GM
14056 ;
14057 return 0;
14058}
14059_ACEOF
5476a9a4
GM
14060if ac_fn_c_try_link "$LINENO"; then :
14061 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 14062else
5476a9a4 14063 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 14064fi
5476a9a4
GM
14065rm -f core conftest.err conftest.$ac_objext \
14066 conftest$ac_exeext conftest.$ac_ext
14067LIBS=$ac_check_lib_save_LIBS
4fc2b746 14068fi
5476a9a4
GM
14069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14070$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14071if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14072 have_des425=yes
14073else
14074 have_des425=no
f199cab1 14075fi
6c051bab 14076
5476a9a4
GM
14077 if test $have_des425 = yes; then
14078 DESLIB=-ldes425
14079 LIBS="$DESLIB $LIBS"
6c051bab 14080
5476a9a4 14081$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
f199cab1 14082
5476a9a4
GM
14083 else
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14085$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14086if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14087 $as_echo_n "(cached) " >&6
14088else
14089 ac_check_lib_save_LIBS=$LIBS
14090LIBS="-ldes $LIBS"
14091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14092/* end confdefs.h. */
f199cab1 14093
5476a9a4
GM
14094/* Override any GCC internal prototype to avoid an error.
14095 Use char because int might match the return type of a GCC
14096 builtin and then its argument prototype would still apply. */
14097#ifdef __cplusplus
14098extern "C"
14099#endif
14100char des_cbc_encrypt ();
14101int
14102main ()
14103{
14104return des_cbc_encrypt ();
14105 ;
14106 return 0;
14107}
14108_ACEOF
14109if ac_fn_c_try_link "$LINENO"; then :
14110 ac_cv_lib_des_des_cbc_encrypt=yes
14111else
14112 ac_cv_lib_des_des_cbc_encrypt=no
14113fi
14114rm -f core conftest.err conftest.$ac_objext \
14115 conftest$ac_exeext conftest.$ac_ext
14116LIBS=$ac_check_lib_save_LIBS
14117fi
14118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14119$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14120if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14121 have_des=yes
14122else
14123 have_des=no
14124fi
f199cab1 14125
5476a9a4
GM
14126 if test $have_des = yes; then
14127 DESLIB=-ldes
14128 LIBS="$DESLIB $LIBS"
f199cab1 14129
5476a9a4 14130$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
f199cab1 14131
5476a9a4
GM
14132 fi
14133 fi
14134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14135$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14136if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
14137 $as_echo_n "(cached) " >&6
14138else
5476a9a4
GM
14139 ac_check_lib_save_LIBS=$LIBS
14140LIBS="-lkrb4 $LIBS"
14141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14142/* end confdefs.h. */
942f733f 14143
5476a9a4
GM
14144/* Override any GCC internal prototype to avoid an error.
14145 Use char because int might match the return type of a GCC
14146 builtin and then its argument prototype would still apply. */
14147#ifdef __cplusplus
14148extern "C"
14149#endif
14150char krb_get_cred ();
942f733f
PE
14151int
14152main ()
14153{
5476a9a4 14154return krb_get_cred ();
942f733f
PE
14155 ;
14156 return 0;
14157}
14158_ACEOF
5476a9a4
GM
14159if ac_fn_c_try_link "$LINENO"; then :
14160 ac_cv_lib_krb4_krb_get_cred=yes
14161else
14162 ac_cv_lib_krb4_krb_get_cred=no
14163fi
14164rm -f core conftest.err conftest.$ac_objext \
14165 conftest$ac_exeext conftest.$ac_ext
14166LIBS=$ac_check_lib_save_LIBS
14167fi
14168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14169$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14170if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14171 have_krb4=yes
14172else
14173 have_krb4=no
14174fi
14175
14176 if test $have_krb4 = yes; then
14177 KRB4LIB=-lkrb4
14178 LIBS="$KRB4LIB $LIBS"
14179
14180$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
14181
14182 else
14183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14184$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14185if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
14186 $as_echo_n "(cached) " >&6
3e0be4ab 14187else
5476a9a4
GM
14188 ac_check_lib_save_LIBS=$LIBS
14189LIBS="-lkrb $LIBS"
14190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14191/* end confdefs.h. */
942f733f 14192
5476a9a4
GM
14193/* Override any GCC internal prototype to avoid an error.
14194 Use char because int might match the return type of a GCC
14195 builtin and then its argument prototype would still apply. */
14196#ifdef __cplusplus
14197extern "C"
14198#endif
14199char krb_get_cred ();
942f733f
PE
14200int
14201main ()
14202{
5476a9a4 14203return krb_get_cred ();
942f733f
PE
14204 ;
14205 return 0;
14206}
14207_ACEOF
5476a9a4
GM
14208if ac_fn_c_try_link "$LINENO"; then :
14209 ac_cv_lib_krb_krb_get_cred=yes
942f733f 14210else
5476a9a4 14211 ac_cv_lib_krb_krb_get_cred=no
942f733f 14212fi
5476a9a4
GM
14213rm -f core conftest.err conftest.$ac_objext \
14214 conftest$ac_exeext conftest.$ac_ext
14215LIBS=$ac_check_lib_save_LIBS
3e0be4ab 14216fi
5476a9a4
GM
14217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14218$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14219if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14220 have_krb=yes
14221else
14222 have_krb=no
942f733f 14223fi
f199cab1 14224
5476a9a4
GM
14225 if test $have_krb = yes; then
14226 KRB4LIB=-lkrb
14227 LIBS="$KRB4LIB $LIBS"
14228
14229$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14230
14231 fi
14232 fi
f199cab1
GM
14233 fi
14234
5476a9a4
GM
14235 if test "${with_kerberos5}" != no; then
14236 for ac_header in krb5.h
14237do :
14238 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14239if test "x$ac_cv_header_krb5_h" = x""yes; then :
14240 cat >>confdefs.h <<_ACEOF
14241#define HAVE_KRB5_H 1
14242_ACEOF
14243 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14244"
14245if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14246
f199cab1 14247cat >>confdefs.h <<_ACEOF
5476a9a4 14248#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
14249_ACEOF
14250
14251
5476a9a4
GM
14252fi
14253ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14254"
14255if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 14256
5476a9a4
GM
14257cat >>confdefs.h <<_ACEOF
14258#define HAVE_KRB5_ERROR_E_TEXT 1
14259_ACEOF
f199cab1
GM
14260
14261
5476a9a4 14262fi
f199cab1 14263
5476a9a4 14264fi
f199cab1 14265
5476a9a4 14266done
f199cab1 14267
5476a9a4
GM
14268 else
14269 for ac_header in des.h
14270do :
14271 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14272if test "x$ac_cv_header_des_h" = x""yes; then :
14273 cat >>confdefs.h <<_ACEOF
14274#define HAVE_DES_H 1
14275_ACEOF
f199cab1 14276
5476a9a4
GM
14277else
14278 for ac_header in kerberosIV/des.h
14279do :
14280 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14281if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14282 cat >>confdefs.h <<_ACEOF
14283#define HAVE_KERBEROSIV_DES_H 1
14284_ACEOF
f199cab1 14285
5476a9a4
GM
14286else
14287 for ac_header in kerberos/des.h
14288do :
14289 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14290if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14291 cat >>confdefs.h <<_ACEOF
14292#define HAVE_KERBEROS_DES_H 1
14293_ACEOF
f199cab1 14294
5476a9a4 14295fi
f199cab1 14296
5476a9a4
GM
14297done
14298
14299fi
14300
14301done
14302
14303fi
14304
14305done
14306
14307 for ac_header in krb.h
f199cab1 14308do :
5476a9a4
GM
14309 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14310if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 14311 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
14312#define HAVE_KRB_H 1
14313_ACEOF
14314
14315else
14316 for ac_header in kerberosIV/krb.h
14317do :
14318 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14319if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14320 cat >>confdefs.h <<_ACEOF
14321#define HAVE_KERBEROSIV_KRB_H 1
14322_ACEOF
14323
14324else
14325 for ac_header in kerberos/krb.h
14326do :
14327 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14328if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14329 cat >>confdefs.h <<_ACEOF
14330#define HAVE_KERBEROS_KRB_H 1
f199cab1 14331_ACEOF
942f733f 14332
3e0be4ab 14333fi
942f733f 14334
f199cab1
GM
14335done
14336
5476a9a4
GM
14337fi
14338
14339done
14340
14341fi
14342
14343done
14344
14345 fi
14346 for ac_header in com_err.h
f199cab1 14347do :
5476a9a4
GM
14348 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14349if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 14350 cat >>confdefs.h <<_ACEOF
5476a9a4 14351#define HAVE_COM_ERR_H 1
f199cab1
GM
14352_ACEOF
14353
3e0be4ab 14354fi
f199cab1 14355
5476a9a4 14356done
3e0be4ab
GM
14357
14358fi
14359
f199cab1
GM
14360
14361
14362
14363
f199cab1
GM
14364
14365
14366
14367
14368
5476a9a4
GM
14369 for ac_func in $ac_func_list
14370do :
14371 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14372ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14373eval as_val=\$$as_ac_var
14374 if test "x$as_val" = x""yes; then :
14375 cat >>confdefs.h <<_ACEOF
14376#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14377_ACEOF
14378
14379fi
14380done
14381
f199cab1
GM
14382
14383
14384
5476a9a4
GM
14385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14386$as_echo_n "checking whether localtime caches TZ... " >&6; }
14387if test "${emacs_cv_localtime_cache+set}" = set; then :
14388 $as_echo_n "(cached) " >&6
14389else
14390 if test x$ac_cv_func_tzset = xyes; then
14391if test "$cross_compiling" = yes; then :
14392 # If we have tzset, assume the worst when cross-compiling.
14393emacs_cv_localtime_cache=yes
14394else
14395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14396/* end confdefs.h. */
14397#include <time.h>
14398char TZ_GMT0[] = "TZ=GMT0";
14399char TZ_PST8[] = "TZ=PST8";
14400main()
14401{
14402 time_t now = time ((time_t *) 0);
14403 int hour_GMT0, hour_unset;
14404 if (putenv (TZ_GMT0) != 0)
14405 exit (1);
14406 hour_GMT0 = localtime (&now)->tm_hour;
14407 unsetenv("TZ");
14408 hour_unset = localtime (&now)->tm_hour;
14409 if (putenv (TZ_PST8) != 0)
14410 exit (1);
14411 if (localtime (&now)->tm_hour == hour_GMT0)
14412 exit (1);
14413 unsetenv("TZ");
14414 if (localtime (&now)->tm_hour != hour_unset)
14415 exit (1);
14416 exit (0);
14417}
14418_ACEOF
14419if ac_fn_c_try_run "$LINENO"; then :
14420 emacs_cv_localtime_cache=no
14421else
14422 emacs_cv_localtime_cache=yes
14423fi
14424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14425 conftest.$ac_objext conftest.beam conftest.$ac_ext
14426fi
f199cab1 14427
5476a9a4
GM
14428else
14429 # If we lack tzset, report that localtime does not cache TZ,
14430 # since we can't invalidate the cache if we don't have tzset.
14431 emacs_cv_localtime_cache=no
14432fi
14433fi
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14435$as_echo "$emacs_cv_localtime_cache" >&6; }
14436if test $emacs_cv_localtime_cache = yes; then
f199cab1 14437
5476a9a4 14438$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 14439
5476a9a4 14440fi
f199cab1 14441
5476a9a4
GM
14442ok_so_far=yes
14443ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
14444if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 14445
5476a9a4
GM
14446else
14447 ok_so_far=no
14448fi
f199cab1 14449
5476a9a4
GM
14450if test $ok_so_far = yes; then
14451 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14452if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 14453
5476a9a4
GM
14454else
14455 ok_so_far=no
14456fi
f199cab1
GM
14457
14458
5476a9a4
GM
14459fi
14460if test $ok_so_far = yes; then
14461 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14462if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 14463
5476a9a4
GM
14464else
14465 ok_so_far=no
14466fi
f199cab1
GM
14467
14468
5476a9a4
GM
14469fi
14470if test $ok_so_far = yes; then
f199cab1 14471
5476a9a4 14472$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 14473
5476a9a4 14474fi
f199cab1 14475
5476a9a4 14476if test -f /usr/lpp/X11/bin/smt.exp; then
942f733f 14477
5476a9a4 14478$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
942f733f 14479
942f733f 14480fi
3e0be4ab 14481
5476a9a4
GM
14482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
14483$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
14484if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
14485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14486$as_echo "yes" >&6; }
14487
14488$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
3e0be4ab 14489
5476a9a4
GM
14490else
14491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14492$as_echo "no" >&6; }
14493fi
3e0be4ab 14494
5476a9a4
GM
14495ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14496if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 14497
5476a9a4 14498else
3e0be4ab 14499
5476a9a4
GM
14500cat >>confdefs.h <<_ACEOF
14501#define pid_t int
14502_ACEOF
f199cab1 14503
5476a9a4 14504fi
f199cab1 14505
5476a9a4
GM
14506for ac_header in vfork.h
14507do :
14508 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14509if test "x$ac_cv_header_vfork_h" = x""yes; then :
14510 cat >>confdefs.h <<_ACEOF
14511#define HAVE_VFORK_H 1
14512_ACEOF
f199cab1 14513
5476a9a4 14514fi
f199cab1 14515
5476a9a4 14516done
f199cab1 14517
5476a9a4
GM
14518for ac_func in fork vfork
14519do :
14520 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14521ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14522eval as_val=\$$as_ac_var
14523 if test "x$as_val" = x""yes; then :
14524 cat >>confdefs.h <<_ACEOF
14525#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14526_ACEOF
f199cab1 14527
5476a9a4
GM
14528fi
14529done
f199cab1 14530
5476a9a4
GM
14531if test "x$ac_cv_func_fork" = xyes; then
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14533$as_echo_n "checking for working fork... " >&6; }
14534if test "${ac_cv_func_fork_works+set}" = set; then :
14535 $as_echo_n "(cached) " >&6
14536else
14537 if test "$cross_compiling" = yes; then :
14538 ac_cv_func_fork_works=cross
14539else
14540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14541/* end confdefs.h. */
14542$ac_includes_default
14543int
14544main ()
14545{
f199cab1 14546
5476a9a4
GM
14547 /* By Ruediger Kuhlmann. */
14548 return fork () < 0;
f199cab1 14549
5476a9a4
GM
14550 ;
14551 return 0;
14552}
14553_ACEOF
14554if ac_fn_c_try_run "$LINENO"; then :
14555 ac_cv_func_fork_works=yes
14556else
14557 ac_cv_func_fork_works=no
14558fi
14559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14560 conftest.$ac_objext conftest.beam conftest.$ac_ext
14561fi
f199cab1 14562
5476a9a4
GM
14563fi
14564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14565$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 14566
5476a9a4
GM
14567else
14568 ac_cv_func_fork_works=$ac_cv_func_fork
14569fi
14570if test "x$ac_cv_func_fork_works" = xcross; then
14571 case $host in
14572 *-*-amigaos* | *-*-msdosdjgpp*)
14573 # Override, as these systems have only a dummy fork() stub
14574 ac_cv_func_fork_works=no
14575 ;;
14576 *)
14577 ac_cv_func_fork_works=yes
14578 ;;
14579 esac
14580 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14581$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14582fi
14583ac_cv_func_vfork_works=$ac_cv_func_vfork
14584if test "x$ac_cv_func_vfork" = xyes; then
14585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14586$as_echo_n "checking for working vfork... " >&6; }
14587if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
14588 $as_echo_n "(cached) " >&6
14589else
14590 if test "$cross_compiling" = yes; then :
5476a9a4 14591 ac_cv_func_vfork_works=cross
f199cab1
GM
14592else
14593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14594/* end confdefs.h. */
5476a9a4
GM
14595/* Thanks to Paul Eggert for this test. */
14596$ac_includes_default
14597#include <sys/wait.h>
14598#ifdef HAVE_VFORK_H
14599# include <vfork.h>
f199cab1 14600#endif
5476a9a4
GM
14601/* On some sparc systems, changes by the child to local and incoming
14602 argument registers are propagated back to the parent. The compiler
14603 is told about this with #include <vfork.h>, but some compilers
14604 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
14605 static variable whose address is put into a register that is
14606 clobbered by the vfork. */
14607static void
14608#ifdef __cplusplus
14609sparc_address_test (int arg)
14610# else
14611sparc_address_test (arg) int arg;
f199cab1 14612#endif
5476a9a4
GM
14613{
14614 static pid_t child;
14615 if (!child) {
14616 child = vfork ();
14617 if (child < 0) {
14618 perror ("vfork");
14619 _exit(2);
14620 }
14621 if (!child) {
14622 arg = getpid();
14623 write(-1, "", 0);
14624 _exit (arg);
14625 }
14626 }
14627}
f199cab1 14628
5476a9a4
GM
14629int
14630main ()
14631{
14632 pid_t parent = getpid ();
14633 pid_t child;
f199cab1 14634
5476a9a4 14635 sparc_address_test (0);
f199cab1 14636
5476a9a4 14637 child = vfork ();
3e0be4ab 14638
5476a9a4
GM
14639 if (child == 0) {
14640 /* Here is another test for sparc vfork register problems. This
14641 test uses lots of local variables, at least as many local
14642 variables as main has allocated so far including compiler
14643 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
14644 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
14645 reuse the register of parent for one of the local variables,
14646 since it will think that parent can't possibly be used any more
14647 in this routine. Assigning to the local variable will thus
14648 munge parent in the parent process. */
14649 pid_t
14650 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14651 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14652 /* Convince the compiler that p..p7 are live; otherwise, it might
14653 use the same hardware register for all 8 local variables. */
14654 if (p != p1 || p != p2 || p != p3 || p != p4
14655 || p != p5 || p != p6 || p != p7)
14656 _exit(1);
3e0be4ab 14657
5476a9a4
GM
14658 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14659 from child file descriptors. If the child closes a descriptor
14660 before it execs or exits, this munges the parent's descriptor
14661 as well. Test for this by closing stdout in the child. */
14662 _exit(close(fileno(stdout)) != 0);
14663 } else {
14664 int status;
14665 struct stat st;
3e0be4ab 14666
5476a9a4
GM
14667 while (wait(&status) != child)
14668 ;
14669 return (
14670 /* Was there some problem with vforking? */
14671 child < 0
3e0be4ab 14672
5476a9a4
GM
14673 /* Did the child fail? (This shouldn't happen.) */
14674 || status
14675
14676 /* Did the vfork/compiler bug occur? */
14677 || parent != getpid()
14678
14679 /* Did the file descriptor bug occur? */
14680 || fstat(fileno(stdout), &st) != 0
14681 );
14682 }
f199cab1 14683}
5476a9a4
GM
14684_ACEOF
14685if ac_fn_c_try_run "$LINENO"; then :
14686 ac_cv_func_vfork_works=yes
14687else
14688 ac_cv_func_vfork_works=no
14689fi
14690rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14691 conftest.$ac_objext conftest.beam conftest.$ac_ext
14692fi
14693
14694fi
14695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14696$as_echo "$ac_cv_func_vfork_works" >&6; }
14697
14698fi;
14699if test "x$ac_cv_func_fork_works" = xcross; then
14700 ac_cv_func_vfork_works=$ac_cv_func_vfork
14701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14702$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14703fi
14704
14705if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 14706
5476a9a4 14707$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 14708
5476a9a4 14709else
3e0be4ab 14710
5476a9a4 14711$as_echo "#define vfork fork" >>confdefs.h
942f733f 14712
5476a9a4
GM
14713fi
14714if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 14715
5476a9a4 14716$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 14717
5476a9a4 14718fi
f199cab1 14719
f199cab1 14720
5476a9a4
GM
14721for ac_func in snprintf
14722do :
14723 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
14724if test "x$ac_cv_func_snprintf" = x""yes; then :
14725 cat >>confdefs.h <<_ACEOF
14726#define HAVE_SNPRINTF 1
14727_ACEOF
14728
14729fi
14730done
14731
942f733f 14732
5476a9a4
GM
14733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
14734$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
14735if test "${emacs_cv_langinfo_codeset+set}" = set; then :
14736 $as_echo_n "(cached) " >&6
14737else
14738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14739/* end confdefs.h. */
14740#include <langinfo.h>
3e0be4ab
GM
14741int
14742main ()
14743{
5476a9a4
GM
14744char* cs = nl_langinfo(CODESET);
14745 ;
14746 return 0;
14747}
14748_ACEOF
14749if ac_fn_c_try_link "$LINENO"; then :
14750 emacs_cv_langinfo_codeset=yes
14751else
14752 emacs_cv_langinfo_codeset=no
14753fi
14754rm -f core conftest.err conftest.$ac_objext \
14755 conftest$ac_exeext conftest.$ac_ext
f199cab1 14756
5476a9a4
GM
14757fi
14758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
14759$as_echo "$emacs_cv_langinfo_codeset" >&6; }
14760if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 14761
5476a9a4 14762$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 14763
5476a9a4 14764fi
f199cab1 14765
5476a9a4
GM
14766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14767$as_echo_n "checking for mbstate_t... " >&6; }
14768if test "${ac_cv_type_mbstate_t+set}" = set; then :
14769 $as_echo_n "(cached) " >&6
14770else
14771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14772/* end confdefs.h. */
14773$ac_includes_default
14774# include <wchar.h>
14775int
14776main ()
14777{
14778mbstate_t x; return sizeof x;
14779 ;
14780 return 0;
3e0be4ab 14781}
942f733f 14782_ACEOF
5476a9a4
GM
14783if ac_fn_c_try_compile "$LINENO"; then :
14784 ac_cv_type_mbstate_t=yes
3e0be4ab 14785else
5476a9a4 14786 ac_cv_type_mbstate_t=no
942f733f 14787fi
5476a9a4 14788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 14789fi
5476a9a4
GM
14790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14791$as_echo "$ac_cv_type_mbstate_t" >&6; }
14792 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 14793
5476a9a4 14794$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 14795
5476a9a4 14796 else
f199cab1 14797
5476a9a4 14798$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 14799
5476a9a4
GM
14800 fi
14801
14802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
14803$as_echo_n "checking for C restricted array declarations... " >&6; }
14804if test "${emacs_cv_c_restrict_arr+set}" = set; then :
14805 $as_echo_n "(cached) " >&6
14806else
14807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14808/* end confdefs.h. */
14809void fred (int x[__restrict]);
14810int
14811main ()
14812{
14813
14814 ;
14815 return 0;
14816}
14817_ACEOF
14818if ac_fn_c_try_compile "$LINENO"; then :
14819 emacs_cv_c_restrict_arr=yes
14820else
14821 emacs_cv_c_restrict_arr=no
14822fi
14823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14824fi
14825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
14826$as_echo "$emacs_cv_c_restrict_arr" >&6; }
14827if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 14828
5476a9a4 14829$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 14830
5476a9a4 14831fi
f199cab1
GM
14832
14833
14834
8ad96b1d
GM
14835$as_echo "#define AMPERSAND_FULL_NAME 1" >>confdefs.h
14836
14837
14838
5476a9a4 14839$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
14840
14841
5476a9a4 14842## Note: PTYs are broken on darwin <6. Use at your own risk.
f199cab1 14843
5476a9a4 14844$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1
GM
14845
14846
14847
5476a9a4 14848$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 14849
942f733f 14850
942f733f 14851
6b10626d
GM
14852
14853
8ad96b1d
GM
14854$as_echo "#define NULL_DEVICE \"/dev/null\"" >>confdefs.h
14855
14856
14857
14858$as_echo "#define SEPCHAR ':'" >>confdefs.h
14859
14860
14861
14862$as_echo "#define subprocesses 1" >>confdefs.h
14863
14864
14865
14866$as_echo "#define USER_FULL_NAME pw->pw_gecos" >>confdefs.h
14867
14868
14869
942f733f 14870
9ff736dc
GM
14871$as_echo "#define DIRECTORY_SEP '/'" >>confdefs.h
14872
14873
14874
f199cab1 14875
6b10626d
GM
14876
14877$as_echo "#define IS_DEVICE_SEP(_c_) 0" >>confdefs.h
14878
14879
14880
14881$as_echo "#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)" >>confdefs.h
14882
14883
14884
14885$as_echo "#define IS_ANY_SEP(_c_) (IS_DIRECTORY_SEP (_c_))" >>confdefs.h
14886
14887
14888
14889
14890
5476a9a4
GM
14891case $opsys in
14892 aix4-2)
14893 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
14894 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 14895
5476a9a4
GM
14896 fi
14897 ;;
f199cab1 14898
5476a9a4
GM
14899 hpux*)
14900 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 14901
5476a9a4
GM
14902 ;;
14903esac
f199cab1
GM
14904
14905
5476a9a4 14906case $opsys in
5476a9a4 14907 irix6-5 | sol2* | unixware )
f199cab1 14908
5476a9a4 14909$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 14910
5476a9a4
GM
14911 ;;
14912esac
f199cab1 14913
4fa92495 14914emacs_broken_SIGIO=no
f199cab1 14915
5476a9a4
GM
14916case $opsys in
14917 hpux* | irix6-5 | openbsd | sol2* | unixware )
4fa92495 14918 emacs_broken_SIGIO=yes
5476a9a4 14919 ;;
f199cab1 14920
5476a9a4 14921 aix4-2)
f199cab1 14922
5476a9a4 14923$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 14924
5476a9a4 14925 ;;
067d23c9 14926
5476a9a4 14927 freebsd)
f199cab1 14928
5476a9a4 14929$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 14930
5476a9a4 14931 ;;
5476a9a4 14932esac
f199cab1 14933
5476a9a4
GM
14934case $opsys in
14935 gnu-* | sol2-10 )
f199cab1 14936
5476a9a4 14937$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 14938
5476a9a4
GM
14939 ;;
14940esac
f199cab1 14941
5476a9a4
GM
14942case $opsys in
14943 darwin | freebsd | netbsd | openbsd )
f199cab1 14944
5476a9a4 14945$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 14946
5476a9a4
GM
14947 ;;
14948esac
f199cab1 14949
5476a9a4
GM
14950case $opsys in
14951 netbsd | openbsd) sound_device="/dev/audio" ;;
14952 *) sound_device="/dev/dsp" ;;
14953esac
f199cab1 14954
f199cab1 14955
5476a9a4
GM
14956cat >>confdefs.h <<_ACEOF
14957#define DEFAULT_SOUND_DEVICE "$sound_device"
14958_ACEOF
f199cab1
GM
14959
14960
14961
5476a9a4
GM
14962case $opsys in
14963 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 14964
5476a9a4 14965$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 14966
5476a9a4
GM
14967 ;;
14968esac
f199cab1 14969
f199cab1 14970
5476a9a4
GM
14971case $opsys in
14972 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 14973
5476a9a4 14974$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 14975
5476a9a4
GM
14976 ;;
14977esac
f199cab1
GM
14978
14979
067d23c9 14980
1f5d53eb
PE
14981
14982
f199cab1 14983
f199cab1 14984
7d2a1c5e 14985
5476a9a4
GM
14986case $opsys in
14987 aix4-2 )
a09508f2 14988 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++)" >>confdefs.h
f199cab1 14989
a09508f2 14990 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\");" >>confdefs.h
f199cab1 14991
a09508f2 14992 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd));" >>confdefs.h
7d2a1c5e 14993
5476a9a4 14994 ;;
7d2a1c5e 14995
5476a9a4 14996 cygwin )
a09508f2 14997 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 14998
843f2634 14999 $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 15000
a09508f2 15001 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
7d2a1c5e 15002
a09508f2 15003 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15004
5476a9a4 15005 ;;
f199cab1 15006
1146da8d 15007 darwin )
a09508f2 15008 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
7d2a1c5e 15009
5476a9a4 15010 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 15011
a09508f2 15012 $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 15013
a09508f2 15014 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15015
a09508f2 15016 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15017
5476a9a4 15018 ;;
f199cab1 15019
1146da8d 15020 gnu | openbsd )
5476a9a4 15021 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15022
5476a9a4 15023 ;;
f199cab1 15024
1146da8d 15025 gnu-linux | gnu-kfreebsd | freebsd | netbsd )
5476a9a4 15026 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 15027
5476a9a4 15028$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 15029
a09508f2 15030 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++)" >>confdefs.h
f199cab1 15031
843f2634 15032 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
f199cab1 15033
1146da8d
GM
15034 if test "x$ac_cv_func_posix_openpt" = xyes; then
15035 $as_echo "#define PTY_OPEN fd = posix_openpt (O_RDWR | O_NOCTTY)" >>confdefs.h
15036
15037 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
15038
15039 elif test "x$ac_cv_func_getpt" = xyes; then
5476a9a4 15040 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 15041
a09508f2 15042 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15043
5476a9a4 15044 else
a09508f2 15045 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
f199cab1 15046
5476a9a4
GM
15047 fi
15048 else
15049 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15050
5476a9a4
GM
15051 fi
15052 ;;
f199cab1 15053
5476a9a4
GM
15054 hpux*)
15055 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 15056
a09508f2 15057 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i);" >>confdefs.h
f199cab1 15058
a09508f2 15059 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i);" >>confdefs.h
f199cab1 15060
5476a9a4 15061 ;;
f199cab1 15062
5476a9a4
GM
15063 irix6-5 )
15064 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 15065
5476a9a4 15066 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 15067
a09508f2 15068 $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(SIGCLD, &cstat, &ocstat); name = _getpty (&fd, O_RDWR | O_NDELAY, 0600, 0); sigaction(SIGCLD, &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 15069
a09508f2 15070 $as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15071
a09508f2 15072 $as_echo "#define PTY_TTY_NAME_SPRINTF /**/" >>confdefs.h
f199cab1 15073
5476a9a4 15074 ;;
f199cab1 15075
5476a9a4 15076 sol2* )
843f2634 15077 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
f199cab1 15078
5476a9a4 15079 ;;
f199cab1 15080
5476a9a4 15081 unixware )
843f2634 15082 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; int grantpt_result; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); grantpt_result = grantpt (fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (grantpt_result == -1) fatal(\"could not grant slave pty\"); if (unlockpt(fd) == -1) fatal(\"could not unlock slave pty\"); if (!(ptyname = ptsname(fd))) fatal (\"could not enable slave pty\"); snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); }" >>confdefs.h
5476a9a4
GM
15083
15084 ;;
15085esac
15086
15087
15088case $opsys in
15089 sol2* | unixware )
15090 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
15091
a09508f2 15092 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\");" >>confdefs.h
5476a9a4
GM
15093
15094
15095$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
15096
15097 ;;
15098esac
15099
15100
15101
15102
15103case $opsys in
15104 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd )
15105 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15106
15107 ;;
15108
15109 gnu-linux | gnu-kfreebsd )
15110
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
15112$as_echo_n "checking for signals via characters... " >&6; }
15113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15114/* end confdefs.h. */
5476a9a4
GM
15115
15116#include <linux/version.h>
15117#if LINUX_VERSION_CODE < 0x20400
15118# error "Linux version too old"
15119#endif
15120
3e0be4ab
GM
15121int
15122main ()
15123{
f199cab1 15124
3e0be4ab
GM
15125 ;
15126 return 0;
15127}
067d23c9 15128_ACEOF
5476a9a4
GM
15129if ac_fn_c_try_cpp "$LINENO"; then :
15130 emacs_signals_via_chars=yes
1f5d53eb 15131else
5476a9a4 15132 emacs_signals_via_chars=no
067d23c9 15133fi
5476a9a4 15134rm -f conftest.err conftest.$ac_ext
067d23c9 15135
5476a9a4
GM
15136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
15137$as_echo "$emacs_signals_via_chars" >&6; }
15138 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
15139
15140 ;;
15141esac
15142
15143
15144
15145
c0528ebe
GM
15146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C library" >&5
15147$as_echo_n "checking whether we are using the GNU C library... " >&6; }
15148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15149/* end confdefs.h. */
5476a9a4 15150
c0528ebe
GM
15151#include <features.h>
15152#ifndef __GNU_LIBRARY__
15153# error "this is not the GNU C library"
15154#endif
5476a9a4 15155
c0528ebe
GM
15156int
15157main ()
15158{
5476a9a4 15159
c0528ebe
GM
15160 ;
15161 return 0;
15162}
15163_ACEOF
15164if ac_fn_c_try_cpp "$LINENO"; then :
15165 emacs_glibc=yes
15166else
15167 emacs_glibc=no
15168fi
15169rm -f conftest.err conftest.$ac_ext
15170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_glibc" >&5
15171$as_echo "$emacs_glibc" >&6; }
5476a9a4 15172
c0528ebe 15173if test $emacs_glibc = yes; then
5476a9a4 15174
c0528ebe 15175 emacs_pending_output=unknown
5476a9a4 15176
c0528ebe
GM
15177 case $opsys in
15178 gnu | gnu-linux | gnu-kfreebsd )
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5
5476a9a4 15180$as_echo_n "checking for style of pending output formalism... " >&6; }
c0528ebe 15181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15182/* end confdefs.h. */
5476a9a4
GM
15183
15184#include <stdio.h>
15185#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
15186# error "stdio definitions not found"
15187#endif
067d23c9 15188
3e0be4ab
GM
15189int
15190main ()
15191{
5476a9a4 15192
3e0be4ab
GM
15193 ;
15194 return 0;
15195}
067d23c9 15196_ACEOF
5476a9a4
GM
15197if ac_fn_c_try_cpp "$LINENO"; then :
15198 emacs_pending_output=new
067d23c9 15199fi
5476a9a4 15200rm -f conftest.err conftest.$ac_ext
067d23c9 15201
5476a9a4
GM
15202 if test $emacs_pending_output = unknown; then
15203 case $opsys in
15204 gnu-linux | gnu-kfreebsd)
15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15206/* end confdefs.h. */
067d23c9 15207
5476a9a4
GM
15208#include <stdio.h>
15209#ifndef __UCLIBC__
15210# error "not using uclibc"
15211#endif
067d23c9 15212
5476a9a4
GM
15213int
15214main ()
15215{
067d23c9 15216
5476a9a4
GM
15217 ;
15218 return 0;
15219}
15220_ACEOF
15221if ac_fn_c_try_cpp "$LINENO"; then :
15222 emacs_pending_output=uclibc
15223else
15224 emacs_pending_output=old
15225fi
15226rm -f conftest.err conftest.$ac_ext
15227 ;;
15228 esac
15229 fi
067d23c9 15230
5476a9a4
GM
15231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5
15232$as_echo "$emacs_pending_output" >&6; }
067d23c9 15233
5476a9a4
GM
15234 case $emacs_pending_output in
15235 new)
c0528ebe 15236 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h
067d23c9 15237
5476a9a4
GM
15238 ;;
15239 uclibc)
c0528ebe 15240 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h
067d23c9 15241
5476a9a4
GM
15242 ;;
15243 old)
c0528ebe 15244 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h
067d23c9 15245
5476a9a4
GM
15246 ;;
15247 esac
15248 ;;
c0528ebe
GM
15249 esac
15250 if test $emacs_pending_output = unknown; then
15251 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufp - (FILE)->__buffer)" >>confdefs.h
15252
15253 fi
15254
15255else
15256 case $opsys in
15257 cygwin | darwin | freebsd | netbsd | openbsd )
15258 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h
15259
15260 ;;
15261
15262 unixware)
15263 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h
067d23c9 15264
c0528ebe
GM
15265 ;;
15266
15267 *)
15268 if test x$ac_cv_header_stdio_ext_h = xyes && \
15269 test x$ac_cv_func___fpending = xyes; then
15270 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) __fpending (FILE)" >>confdefs.h
15271
15272
15273$as_echo "#define DISPNEW_NEEDS_STDIO_EXT 1" >>confdefs.h
15274
15275 else
15276 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_ptr - (FILE)->_base)" >>confdefs.h
15277
15278 fi
15279 ;;
15280 esac
15281fi
067d23c9 15282
067d23c9 15283
067d23c9 15284
f199cab1 15285
5476a9a4
GM
15286case $opsys in
15287 gnu)
15288 $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
f199cab1 15289
5476a9a4 15290 ;;
067d23c9 15291
5476a9a4
GM
15292 hpux*)
15293 $as_echo "#define DATA_START 0x40000000" >>confdefs.h
067d23c9 15294
5476a9a4 15295 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 15296
5476a9a4
GM
15297 ;;
15298 irix6-5)
15299 $as_echo "#define DATA_START 0x10000000" >>confdefs.h
067d23c9 15300
5476a9a4 15301 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 15302
5476a9a4
GM
15303 ;;
15304esac
067d23c9 15305
1f5d53eb 15306
1f5d53eb 15307
067d23c9 15308
f199cab1 15309
5476a9a4
GM
15310case $opsys in
15311 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15312 ;;
f199cab1 15313
5476a9a4 15314 gnu | freebsd | netbsd | openbsd )
f199cab1 15315
5476a9a4 15316$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 15317
5476a9a4 15318 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 15319
5476a9a4 15320 ;;
f199cab1 15321
5476a9a4
GM
15322 gnu-linux | gnu-kfreebsd )
15323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 15324/* end confdefs.h. */
3e0be4ab 15325
5476a9a4
GM
15326#ifndef __i386__
15327# error "not i386"
15328#endif
f199cab1 15329
5476a9a4
GM
15330int
15331main ()
15332{
067d23c9 15333
5476a9a4
GM
15334 ;
15335 return 0;
15336}
15337_ACEOF
15338if ac_fn_c_try_cpp "$LINENO"; then :
15339 $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h
1f5d53eb 15340
3e0be4ab 15341fi
5476a9a4 15342rm -f conftest.err conftest.$ac_ext
3e0be4ab 15343
5476a9a4
GM
15344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15345/* end confdefs.h. */
3e0be4ab 15346
5476a9a4
GM
15347#ifndef __ia64__
15348# error "not ia64"
15349#endif
067d23c9 15350
5476a9a4
GM
15351int
15352main ()
15353{
3e0be4ab 15354
5476a9a4
GM
15355 ;
15356 return 0;
15357}
15358_ACEOF
15359if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 15360
5476a9a4 15361$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 15362
3e0be4ab 15363fi
5476a9a4
GM
15364rm -f conftest.err conftest.$ac_ext
15365 ;;
067d23c9 15366
5476a9a4 15367 hpux*)
3e0be4ab 15368
5476a9a4 15369$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 15370
5476a9a4 15371 ;;
3e0be4ab 15372
5476a9a4
GM
15373 irix6-5)
15374 $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h
3e0be4ab 15375
5476a9a4
GM
15376 ;;
15377esac
3e0be4ab
GM
15378
15379
f199cab1 15380
e700232f
GM
15381
15382
15383
f199cab1 15384
5476a9a4
GM
15385case $opsys in
15386 aix4-2 | hpux* | unixware)
15387 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
f199cab1 15388
5476a9a4 15389 ;;
f199cab1 15390
5476a9a4
GM
15391 gnu-linux | gnu-kfreebsd )
15392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 15393/* end confdefs.h. */
f199cab1 15394
5476a9a4
GM
15395#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15396 || defined __alpha__ || defined __mips__ || defined __s390__ \
15397 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15398 || defined __ia64__ || defined __sh__
15399/* ok */
15400#else
15401# error "setjmp not known to work on this arch"
15402#endif
15403
f199cab1
GM
15404int
15405main ()
1fd182f0 15406{
5476a9a4 15407
f199cab1
GM
15408 ;
15409 return 0;
1fd182f0
PE
15410}
15411_ACEOF
5476a9a4
GM
15412if ac_fn_c_try_cpp "$LINENO"; then :
15413 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 15414
5476a9a4
GM
15415else
15416 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
1fd182f0 15417
1f5d53eb 15418fi
5476a9a4
GM
15419rm -f conftest.err conftest.$ac_ext
15420 ;;
15421esac
1fd182f0 15422
f199cab1 15423
5476a9a4
GM
15424if test x$GCC = xyes; then
15425 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15426
1fd182f0 15427else
5476a9a4
GM
15428 case $opsys in
15429 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15430 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 15431
5476a9a4
GM
15432 ;;
15433 esac
15434fi
6ec9a5a7
GM
15435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _setjmp" >&5
15436$as_echo_n "checking for _setjmp... " >&6; }
15437if test "${emacs_cv_func__setjmp+set}" = set; then :
15438 $as_echo_n "(cached) " >&6
15439else
15440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441/* end confdefs.h. */
15442#include <setjmp.h>
1fd182f0 15443
6ec9a5a7
GM
15444int
15445main ()
15446{
15447jmp_buf j;
15448 if (! _setjmp (j))
15449 _longjmp (j, 1);
15450 ;
15451 return 0;
15452}
15453_ACEOF
15454if ac_fn_c_try_link "$LINENO"; then :
15455 emacs_cv_func__setjmp=yes
15456else
15457 emacs_cv_func__setjmp=no
15458fi
15459rm -f core conftest.err conftest.$ac_objext \
15460 conftest$ac_exeext conftest.$ac_ext
15461fi
15462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func__setjmp" >&5
15463$as_echo "$emacs_cv_func__setjmp" >&6; }
15464if test $emacs_cv_func__setjmp = no; then
906debc3
GM
15465
15466$as_echo "#define _setjmp setjmp" >>confdefs.h
15467
15468
15469$as_echo "#define _longjmp longjmp" >>confdefs.h
15470
6ec9a5a7
GM
15471fi
15472
15473case $opsys in
15474 sol2* | unixware )
906debc3
GM
15475
15476$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
15477
15478 ;;
15479esac
15480
906debc3 15481
5476a9a4
GM
15482case $opsys in
15483 hpux* | sol2* )
1f5d53eb 15484
5476a9a4 15485$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 15486
5476a9a4
GM
15487 ;;
15488esac
1f5d53eb 15489
1f5d53eb 15490
4fda9c95 15491
3e0be4ab 15492
4fda9c95 15493
4fda9c95 15494
f199cab1 15495
906debc3 15496
7cd2ed2c
GM
15497
15498
5476a9a4
GM
15499case $opsys in
15500 aix4-2)
15501 $as_echo "#define USG /**/" >>confdefs.h
15502
15503 $as_echo "#define USG5 /**/" >>confdefs.h
15504
15505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15506/* end confdefs.h. */
15507
15508#ifndef _AIX
15509# error "_AIX not defined"
15510#endif
f199cab1 15511
4fda9c95
GM
15512int
15513main ()
15514{
3e0be4ab 15515
4fda9c95
GM
15516 ;
15517 return 0;
15518}
15519_ACEOF
5476a9a4 15520if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15521
3e0be4ab 15522else
4fda9c95 15523
5476a9a4 15524$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 15525
5476a9a4
GM
15526fi
15527rm -f conftest.err conftest.$ac_ext
15528 ;;
4fda9c95 15529
5476a9a4 15530 cygwin)
3e0be4ab 15531
5476a9a4 15532$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 15533
5476a9a4 15534 ;;
f199cab1 15535
5476a9a4
GM
15536 darwin)
15537 $as_echo "#define BSD4_2 /**/" >>confdefs.h
f199cab1 15538
5476a9a4 15539 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
f199cab1
GM
15540
15541
5476a9a4 15542$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 15543
5476a9a4 15544 ;;
4fda9c95 15545
5476a9a4
GM
15546 freebsd)
15547 $as_echo "#define BSD4_2 /**/" >>confdefs.h
4fda9c95 15548
4fda9c95 15549
5476a9a4 15550$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
4fda9c95 15551
5476a9a4 15552 ;;
f199cab1 15553
5476a9a4
GM
15554 gnu | netbsd | openbsd )
15555 $as_echo "#define BSD4_2 /**/" >>confdefs.h
f199cab1 15556
5476a9a4
GM
15557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15558/* end confdefs.h. */
f199cab1 15559
5476a9a4
GM
15560#ifndef BSD_SYSTEM
15561# error "BSD_SYSTEM not defined"
15562#endif
f199cab1 15563
5476a9a4
GM
15564int
15565main ()
15566{
f199cab1 15567
5476a9a4
GM
15568 ;
15569 return 0;
15570}
f199cab1 15571_ACEOF
5476a9a4 15572if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15573
3e0be4ab 15574else
5476a9a4 15575 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
4fda9c95 15576
5476a9a4
GM
15577fi
15578rm -f conftest.err conftest.$ac_ext
15579 ;;
4fda9c95 15580
5476a9a4
GM
15581 gnu-linux | gnu-kfreebsd )
15582 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15583
f199cab1 15584
5476a9a4 15585$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 15586
5476a9a4 15587 ;;
4fda9c95 15588
5476a9a4
GM
15589 hpux*)
15590 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15591
5476a9a4 15592 $as_echo "#define USG5 /**/" >>confdefs.h
697210c4 15593
4717915f 15594
5476a9a4 15595$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 15596
5476a9a4 15597 ;;
697210c4 15598
5476a9a4
GM
15599 irix6-5)
15600 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15601
5476a9a4 15602 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 15603
906debc3
GM
15604 $as_echo "#define USG5_4 /**/" >>confdefs.h
15605
f199cab1 15606
5476a9a4 15607$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 15608
5476a9a4 15609 ;;
f199cab1 15610
5476a9a4
GM
15611 sol2*)
15612 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15613
5476a9a4 15614 $as_echo "#define USG5 /**/" >>confdefs.h
4fda9c95 15615
906debc3
GM
15616 $as_echo "#define USG5_4 /**/" >>confdefs.h
15617
4fda9c95 15618
5476a9a4 15619$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 15620
5476a9a4 15621 ;;
f199cab1 15622
5476a9a4
GM
15623 unixware)
15624 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15625
5476a9a4 15626 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 15627
906debc3
GM
15628 $as_echo "#define USG5_4 /**/" >>confdefs.h
15629
5476a9a4
GM
15630 ;;
15631esac
f199cab1 15632
4fa92495
GM
15633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable FIONREAD" >&5
15634$as_echo_n "checking for usable FIONREAD... " >&6; }
15635if test "${emacs_cv_usable_FIONREAD+set}" = set; then :
15636 $as_echo_n "(cached) " >&6
15637else
15638 case $opsys in
15639 aix4-2)
15640 emacs_cv_usable_FIONREAD=no
15641 ;;
15642
15643 *)
15644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15645/* end confdefs.h. */
15646#include <sys/types.h>
15647 #include <sys/ioctl.h>
15648 #ifdef USG5_4
15649 # include <sys/filio.h>
15650 #endif
15651
15652int
15653main ()
15654{
15655int foo = ioctl (0, FIONREAD, &foo);
15656 ;
15657 return 0;
15658}
15659_ACEOF
15660if ac_fn_c_try_compile "$LINENO"; then :
15661 emacs_cv_usable_FIONREAD=yes
15662else
15663 emacs_cv_usable_FIONREAD=no
15664fi
15665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15666 ;;
15667 esac
15668fi
15669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_FIONREAD" >&5
15670$as_echo "$emacs_cv_usable_FIONREAD" >&6; }
15671if test $emacs_cv_usable_FIONREAD = yes; then
15672
15673$as_echo "#define USABLE_FIONREAD 1" >>confdefs.h
15674
15675
15676 if test $emacs_broken_SIGIO = no; then
15677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable SIGIO" >&5
15678$as_echo_n "checking for usable SIGIO... " >&6; }
15679if test "${emacs_cv_usable_SIGIO+set}" = set; then :
15680 $as_echo_n "(cached) " >&6
15681else
15682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15683/* end confdefs.h. */
15684#include <fcntl.h>
15685 #include <signal.h>
15686
15687int
15688main ()
15689{
15690int foo = SIGIO | F_SETFL | FASYNC;
15691 ;
15692 return 0;
15693}
15694_ACEOF
15695if ac_fn_c_try_compile "$LINENO"; then :
15696 emacs_cv_usable_SIGIO=yes
15697else
15698 emacs_cv_usable_SIGIO=no
15699fi
15700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15701fi
15702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_usable_SIGIO" >&5
15703$as_echo "$emacs_cv_usable_SIGIO" >&6; }
15704 if test $emacs_cv_usable_SIGIO = yes; then
15705
15706$as_echo "#define USABLE_SIGIO 1" >>confdefs.h
15707
15708 fi
15709 fi
15710fi
15711
4fda9c95 15712
5476a9a4
GM
15713case $opsys in
15714 cygwin)
4fda9c95 15715
5476a9a4 15716$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 15717
5476a9a4 15718 ;;
4fda9c95 15719
5476a9a4 15720 hpux11)
f199cab1 15721
5476a9a4 15722$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h
f199cab1
GM
15723
15724
5476a9a4 15725$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 15726
5476a9a4 15727 ;;
f199cab1 15728
5476a9a4 15729 irix6-5)
f199cab1 15730
5476a9a4 15731$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 15732
f199cab1 15733
5476a9a4 15734$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h
f199cab1 15735
5476a9a4 15736 ;;
f199cab1 15737
5476a9a4 15738 sol2-10)
f199cab1 15739
5476a9a4 15740$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 15741
5476a9a4
GM
15742 ;;
15743esac
f199cab1 15744
5476a9a4
GM
15745# Set up the CFLAGS for real compilation, so we can substitute it.
15746CFLAGS="$REAL_CFLAGS"
15747CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 15748
5476a9a4
GM
15749## Hack to detect a buggy GCC version.
15750if test "x$GCC" = xyes \
15751 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
15752 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
15753 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
15754 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
15755fi
f199cab1 15756
5476a9a4 15757version=$PACKAGE_VERSION
f199cab1 15758
5476a9a4
GM
15759### Specify what sort of things we'll be editing into Makefile and config.h.
15760### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 15761
f199cab1 15762
5476a9a4 15763## Unused?
4fda9c95
GM
15764
15765
15766
15767
4717915f 15768
4717915f 15769
4717915f 15770
4717915f 15771
4717915f 15772
4717915f 15773
4717915f 15774
4717915f 15775
4717915f 15776
4717915f 15777
4717915f 15778
4717915f
GM
15779
15780
4717915f
GM
15781
15782
4717915f 15783
4717915f 15784
4717915f 15785
5476a9a4
GM
15786## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
15787## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
15788## end of LIBX_BASE, but nothing ever set it.
4717915f 15789
4717915f 15790
4fda9c95 15791
4fda9c95 15792
5476a9a4
GM
15793## Used in lwlib/Makefile.in.
15794
4fda9c95 15795
4fda9c95 15796
4fda9c95
GM
15797
15798
15799
15800
4fda9c95 15801
42dcba54
GM
15802if test -n "${term_header}"; then
15803
15804cat >>confdefs.h <<_ACEOF
15805#define TERM_HEADER "${term_header}"
15806_ACEOF
15807
15808fi
15809
4fda9c95 15810
5476a9a4
GM
15811cat >>confdefs.h <<_ACEOF
15812#define EMACS_CONFIGURATION "${canonical}"
15813_ACEOF
4fda9c95
GM
15814
15815
5476a9a4
GM
15816cat >>confdefs.h <<_ACEOF
15817#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
15818_ACEOF
15819
5476a9a4 15820
4fda9c95 15821
5476a9a4
GM
15822XMENU_OBJ=
15823XOBJ=
15824FONT_OBJ=
15825if test "${HAVE_X_WINDOWS}" = "yes" ; then
15826
15827$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 15828
5476a9a4 15829 XMENU_OBJ=xmenu.o
42dcba54 15830 XOBJ="xterm.o xfns.o xselect.o xrdb.o xsmfns.o xsettings.o xgselect.o"
5476a9a4
GM
15831 FONT_OBJ=xfont.o
15832 if test "$HAVE_XFT" = "yes"; then
15833 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
15834 elif test "$HAVE_FREETYPE" = "yes"; then
15835 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
15836 fi
4fda9c95 15837
f199cab1 15838fi
4fda9c95 15839
4fda9c95 15840
4fda9c95 15841
4fda9c95 15842
5476a9a4
GM
15843WIDGET_OBJ=
15844MOTIF_LIBW=
15845if test "${USE_X_TOOLKIT}" != "none" ; then
15846 WIDGET_OBJ=widget.o
15847
15848$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
15849
15850 if test "${USE_X_TOOLKIT}" = "LUCID"; then
15851
15852$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 15853
5476a9a4 15854 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 15855
5476a9a4 15856$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 15857
5476a9a4
GM
15858 MOTIF_LIBW=-lXm
15859 case "$opsys" in
15860 gnu-linux)
15861 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
15862 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
15863 ;;
3e0be4ab 15864
5476a9a4
GM
15865 unixware)
15866 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
15867 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
15868 MOTIF_LIBW="MOTIF_LIBW -lXimp"
15869 ;;
3e0be4ab 15870
5476a9a4
GM
15871 aix4-2)
15872 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
15873 MOTIF_LIBW="$MOTIF_LIBW -li18n"
15874 ;;
15875 esac
15876 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
15877 fi
15878fi
4fda9c95 15879
3e0be4ab 15880
5476a9a4
GM
15881TOOLKIT_LIBW=
15882case "$USE_X_TOOLKIT" in
15883 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
15884 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
15885 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
15886esac
4fda9c95
GM
15887
15888
5476a9a4
GM
15889if test "$USE_X_TOOLKIT" = "none"; then
15890 LIBXT_OTHER="\$(LIBXSM)"
15891 OLDXMENU_TARGET="really-oldXMenu"
15892else
15893 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
15894 OLDXMENU_TARGET="really-lwlib"
15895fi
4fda9c95
GM
15896
15897
5476a9a4
GM
15898## The X Menu stuff is present in the X10 distribution, but missing
15899## from X11. If we have X10, just use the installed library;
15900## otherwise, use our own copy.
15901if test "${HAVE_X11}" = "yes" ; then
4fda9c95 15902
5476a9a4 15903$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 15904
4fda9c95 15905
5476a9a4
GM
15906 if test "$USE_X_TOOLKIT" = "none"; then
15907 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
15908 else
15909 OLDXMENU="\${lwlibdir}/liblw.a"
15910 fi
15911 LIBXMENU="\$(OLDXMENU)"
15912 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
15913 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 15914else
5476a9a4
GM
15915 ## For a syntactically valid Makefile; not actually used for anything.
15916 ## See comments in src/Makefile.in.
15917 OLDXMENU=nothing
15918 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
15919 if test "${HAVE_X_WINDOWS}" = "yes"; then
15920 LIBXMENU="-lXMenu"
15921 else
15922 LIBXMENU=
15923 fi
15924 LIBX_OTHER=
15925 OLDXMENU_DEPS=
15926fi
4fda9c95 15927
5476a9a4
GM
15928if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
15929 OLDXMENU_TARGET=
15930 OLDXMENU=nothing
15931 LIBXMENU=
15932 OLDXMENU_DEPS=
15933fi
4fda9c95 15934
4fda9c95
GM
15935
15936
3e0be4ab 15937
4fda9c95 15938
3e0be4ab 15939
3e0be4ab 15940
5476a9a4 15941if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 15942
5476a9a4 15943$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 15944
5476a9a4 15945fi
4fda9c95 15946
5476a9a4 15947if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 15948
5476a9a4 15949$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 15950
5476a9a4 15951fi
3e0be4ab 15952
5476a9a4
GM
15953RALLOC_OBJ=
15954if test "${REL_ALLOC}" = "yes" ; then
15955
15956$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
15957
15958
5476a9a4
GM
15959 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
15960fi
4fda9c95 15961
4fda9c95 15962
5476a9a4
GM
15963if test "$opsys" = "cygwin"; then
15964 CYGWIN_OBJ="sheap.o"
15965 ## Cygwin differs because of its unexec().
15966 PRE_ALLOC_OBJ=
15967 POST_ALLOC_OBJ=lastfile.o
15968else
15969 CYGWIN_OBJ=
15970 PRE_ALLOC_OBJ=lastfile.o
15971 POST_ALLOC_OBJ=
15972fi
4fda9c95 15973
3e0be4ab 15974
3e0be4ab 15975
3e0be4ab 15976
5476a9a4
GM
15977# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
15978# it temporarily reverts them to their pre-pkg-config values,
15979# because gnulib needs to work with both src (which uses the
15980# pkg-config stuff) and lib-src (which does not). For example, gnulib
15981# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
15982# and it therefore needs to run in an environment where LIBS does not
15983# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
15984# for some package unrelated to lib-src.
15985SAVE_CFLAGS=$CFLAGS
15986SAVE_LIBS=$LIBS
15987CFLAGS=$pre_PKG_CONFIG_CFLAGS
15988LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 15989
3e0be4ab
GM
15990
15991
4fda9c95 15992
4fda9c95 15993
3e0be4ab 15994
3e0be4ab
GM
15995
15996
4fda9c95 15997
3e0be4ab
GM
15998
15999
5476a9a4
GM
16000 LIBC_FATAL_STDERR_=1
16001 export LIBC_FATAL_STDERR_
3e0be4ab 16002
5476a9a4
GM
16003# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
16004# for constant arguments. Useless!
16005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
16006$as_echo_n "checking for working alloca.h... " >&6; }
16007if test "${ac_cv_working_alloca_h+set}" = set; then :
16008 $as_echo_n "(cached) " >&6
16009else
16010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16011/* end confdefs.h. */
16012#include <alloca.h>
16013int
16014main ()
16015{
16016char *p = (char *) alloca (2 * sizeof (int));
16017 if (p) return 0;
16018 ;
16019 return 0;
16020}
16021_ACEOF
16022if ac_fn_c_try_link "$LINENO"; then :
16023 ac_cv_working_alloca_h=yes
16024else
16025 ac_cv_working_alloca_h=no
16026fi
16027rm -f core conftest.err conftest.$ac_objext \
16028 conftest$ac_exeext conftest.$ac_ext
16029fi
16030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
16031$as_echo "$ac_cv_working_alloca_h" >&6; }
16032if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 16033
5476a9a4 16034$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 16035
5476a9a4 16036fi
3e0be4ab 16037
5476a9a4
GM
16038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
16039$as_echo_n "checking for alloca... " >&6; }
16040if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
16041 $as_echo_n "(cached) " >&6
16042else
5476a9a4 16043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16044/* end confdefs.h. */
5476a9a4
GM
16045#ifdef __GNUC__
16046# define alloca __builtin_alloca
16047#else
16048# ifdef _MSC_VER
16049# include <malloc.h>
16050# define alloca _alloca
16051# else
16052# ifdef HAVE_ALLOCA_H
16053# include <alloca.h>
16054# else
16055# ifdef _AIX
16056 #pragma alloca
16057# else
16058# ifndef alloca /* predefined by HP cc +Olibcalls */
16059char *alloca ();
16060# endif
16061# endif
16062# endif
16063# endif
16064#endif
16065
16066int
16067main ()
16068{
16069char *p = (char *) alloca (1);
16070 if (p) return 0;
16071 ;
16072 return 0;
16073}
16074_ACEOF
16075if ac_fn_c_try_link "$LINENO"; then :
16076 ac_cv_func_alloca_works=yes
16077else
16078 ac_cv_func_alloca_works=no
16079fi
16080rm -f core conftest.err conftest.$ac_objext \
16081 conftest$ac_exeext conftest.$ac_ext
16082fi
16083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
16084$as_echo "$ac_cv_func_alloca_works" >&6; }
16085
16086if test $ac_cv_func_alloca_works = yes; then
16087
16088$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16089
16090else
16091 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
16092# that cause trouble. Some versions do not even contain alloca or
16093# contain a buggy version. If you still want to use their alloca,
16094# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 16095
4fda9c95 16096
4fda9c95 16097
4fda9c95
GM
16098
16099
5476a9a4 16100ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 16101
5476a9a4 16102$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 16103
4fda9c95 16104
5476a9a4
GM
16105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
16106$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
16107if test "${ac_cv_os_cray+set}" = set; then :
16108 $as_echo_n "(cached) " >&6
16109else
16110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16111/* end confdefs.h. */
16112#if defined CRAY && ! defined CRAY2
16113webecray
16114#else
16115wenotbecray
16116#endif
4fda9c95 16117
5476a9a4
GM
16118_ACEOF
16119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16120 $EGREP "webecray" >/dev/null 2>&1; then :
16121 ac_cv_os_cray=yes
16122else
16123 ac_cv_os_cray=no
16124fi
16125rm -f conftest*
4fda9c95 16126
5476a9a4
GM
16127fi
16128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
16129$as_echo "$ac_cv_os_cray" >&6; }
16130if test $ac_cv_os_cray = yes; then
16131 for ac_func in _getb67 GETB67 getb67; do
16132 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16133ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16134eval as_val=\$$as_ac_var
16135 if test "x$as_val" = x""yes; then :
4fda9c95 16136
5476a9a4
GM
16137cat >>confdefs.h <<_ACEOF
16138#define CRAY_STACKSEG_END $ac_func
16139_ACEOF
4fda9c95 16140
5476a9a4
GM
16141 break
16142fi
4fda9c95 16143
5476a9a4
GM
16144 done
16145fi
4fda9c95 16146
5476a9a4
GM
16147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
16148$as_echo_n "checking stack direction for C alloca... " >&6; }
16149if test "${ac_cv_c_stack_direction+set}" = set; then :
16150 $as_echo_n "(cached) " >&6
16151else
16152 if test "$cross_compiling" = yes; then :
16153 ac_cv_c_stack_direction=0
16154else
16155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156/* end confdefs.h. */
16157$ac_includes_default
16158int
16159find_stack_direction (int *addr, int depth)
16160{
16161 int dir, dummy = 0;
16162 if (! addr)
16163 addr = &dummy;
16164 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
16165 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
16166 return dir + dummy;
16167}
4fda9c95 16168
5476a9a4
GM
16169int
16170main (int argc, char **argv)
16171{
16172 return find_stack_direction (0, argc + !argv + 20) < 0;
16173}
16174_ACEOF
16175if ac_fn_c_try_run "$LINENO"; then :
16176 ac_cv_c_stack_direction=1
16177else
16178 ac_cv_c_stack_direction=-1
16179fi
16180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16181 conftest.$ac_objext conftest.beam conftest.$ac_ext
16182fi
4fda9c95 16183
5476a9a4
GM
16184fi
16185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
16186$as_echo "$ac_cv_c_stack_direction" >&6; }
16187cat >>confdefs.h <<_ACEOF
16188#define STACK_DIRECTION $ac_cv_c_stack_direction
16189_ACEOF
3e0be4ab
GM
16190
16191
5476a9a4 16192fi
3e0be4ab
GM
16193
16194
16195
16196
5476a9a4
GM
16197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
16198$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
16199if test "${ac_cv_c_bigendian+set}" = set; then :
16200 $as_echo_n "(cached) " >&6
16201else
16202 ac_cv_c_bigendian=unknown
16203 # See if we're dealing with a universal compiler.
16204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16205/* end confdefs.h. */
16206#ifndef __APPLE_CC__
16207 not a universal capable compiler
16208 #endif
16209 typedef int dummy;
16210
16211_ACEOF
16212if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 16213
5476a9a4
GM
16214 # Check for potential -arch flags. It is not universal unless
16215 # there are at least two -arch flags with different values.
16216 ac_arch=
16217 ac_prev=
16218 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16219 if test -n "$ac_prev"; then
16220 case $ac_word in
16221 i?86 | x86_64 | ppc | ppc64)
16222 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16223 ac_arch=$ac_word
16224 else
16225 ac_cv_c_bigendian=universal
16226 break
16227 fi
16228 ;;
16229 esac
16230 ac_prev=
16231 elif test "x$ac_word" = "x-arch"; then
16232 ac_prev=arch
16233 fi
16234 done
16235fi
16236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16237 if test $ac_cv_c_bigendian = unknown; then
16238 # See if sys/param.h defines the BYTE_ORDER macro.
16239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16240/* end confdefs.h. */
16241#include <sys/types.h>
16242 #include <sys/param.h>
3e0be4ab 16243
5476a9a4
GM
16244int
16245main ()
16246{
16247#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16248 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16249 && LITTLE_ENDIAN)
16250 bogus endian macros
16251 #endif
3e0be4ab 16252
5476a9a4
GM
16253 ;
16254 return 0;
16255}
16256_ACEOF
16257if ac_fn_c_try_compile "$LINENO"; then :
16258 # It does; now see whether it defined to BIG_ENDIAN or not.
16259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16260/* end confdefs.h. */
16261#include <sys/types.h>
16262 #include <sys/param.h>
369e19fc 16263
5476a9a4
GM
16264int
16265main ()
16266{
16267#if BYTE_ORDER != BIG_ENDIAN
16268 not big endian
16269 #endif
3e0be4ab 16270
5476a9a4
GM
16271 ;
16272 return 0;
16273}
16274_ACEOF
16275if ac_fn_c_try_compile "$LINENO"; then :
16276 ac_cv_c_bigendian=yes
16277else
16278 ac_cv_c_bigendian=no
16279fi
16280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16281fi
16282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16283 fi
16284 if test $ac_cv_c_bigendian = unknown; then
16285 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16287/* end confdefs.h. */
16288#include <limits.h>
4fda9c95 16289
5476a9a4
GM
16290int
16291main ()
16292{
16293#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16294 bogus endian macros
16295 #endif
4fda9c95 16296
5476a9a4
GM
16297 ;
16298 return 0;
16299}
16300_ACEOF
16301if ac_fn_c_try_compile "$LINENO"; then :
16302 # It does; now see whether it defined to _BIG_ENDIAN or not.
16303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304/* end confdefs.h. */
16305#include <limits.h>
4fda9c95 16306
5476a9a4
GM
16307int
16308main ()
16309{
16310#ifndef _BIG_ENDIAN
16311 not big endian
16312 #endif
f199cab1 16313
5476a9a4
GM
16314 ;
16315 return 0;
16316}
16317_ACEOF
16318if ac_fn_c_try_compile "$LINENO"; then :
16319 ac_cv_c_bigendian=yes
f199cab1 16320else
5476a9a4
GM
16321 ac_cv_c_bigendian=no
16322fi
16323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16324fi
16325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16326 fi
16327 if test $ac_cv_c_bigendian = unknown; then
16328 # Compile a test program.
16329 if test "$cross_compiling" = yes; then :
16330 # Try to guess by grepping values from an object file.
16331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16332/* end confdefs.h. */
16333short int ascii_mm[] =
16334 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16335 short int ascii_ii[] =
16336 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16337 int use_ascii (int i) {
16338 return ascii_mm[i] + ascii_ii[i];
16339 }
16340 short int ebcdic_ii[] =
16341 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16342 short int ebcdic_mm[] =
16343 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16344 int use_ebcdic (int i) {
16345 return ebcdic_mm[i] + ebcdic_ii[i];
16346 }
16347 extern int foo;
f199cab1 16348
5476a9a4
GM
16349int
16350main ()
16351{
16352return use_ascii (foo) == use_ebcdic (foo);
16353 ;
16354 return 0;
16355}
16356_ACEOF
16357if ac_fn_c_try_compile "$LINENO"; then :
16358 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16359 ac_cv_c_bigendian=yes
16360 fi
16361 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16362 if test "$ac_cv_c_bigendian" = unknown; then
16363 ac_cv_c_bigendian=no
16364 else
16365 # finding both strings is unlikely to happen, but who knows?
16366 ac_cv_c_bigendian=unknown
16367 fi
16368 fi
16369fi
16370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 16371else
3e0be4ab 16372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 16373/* end confdefs.h. */
5476a9a4
GM
16374$ac_includes_default
16375int
16376main ()
4fda9c95 16377{
5476a9a4
GM
16378
16379 /* Are we little or big endian? From Harbison&Steele. */
16380 union
16381 {
16382 long int l;
16383 char c[sizeof (long int)];
16384 } u;
16385 u.l = 1;
16386 return u.c[sizeof (long int) - 1] == 1;
16387
16388 ;
4fda9c95
GM
16389 return 0;
16390}
16391_ACEOF
f199cab1 16392if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 16393 ac_cv_c_bigendian=no
3e0be4ab 16394else
5476a9a4 16395 ac_cv_c_bigendian=yes
4fda9c95 16396fi
f199cab1
GM
16397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16398 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 16399fi
4fda9c95 16400
5476a9a4 16401 fi
f199cab1 16402fi
5476a9a4
GM
16403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16404$as_echo "$ac_cv_c_bigendian" >&6; }
16405 case $ac_cv_c_bigendian in #(
16406 yes)
16407 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16408;; #(
16409 no)
16410 ;; #(
16411 universal)
3e0be4ab 16412
5476a9a4 16413$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 16414
5476a9a4
GM
16415 ;; #(
16416 *)
16417 as_fn_error "unknown endianness
16418 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16419 esac
4fda9c95 16420
4fda9c95 16421
5476a9a4
GM
16422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16423$as_echo_n "checking for inline... " >&6; }
16424if test "${ac_cv_c_inline+set}" = set; then :
16425 $as_echo_n "(cached) " >&6
f199cab1 16426else
5476a9a4
GM
16427 ac_cv_c_inline=no
16428for ac_kw in inline __inline__ __inline; do
16429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16430/* end confdefs.h. */
16431#ifndef __cplusplus
16432typedef int foo_t;
16433static $ac_kw foo_t static_foo () {return 0; }
16434$ac_kw foo_t foo () {return 0; }
16435#endif
3e0be4ab 16436
3e0be4ab 16437_ACEOF
5476a9a4
GM
16438if ac_fn_c_try_compile "$LINENO"; then :
16439 ac_cv_c_inline=$ac_kw
3e0be4ab 16440fi
5476a9a4
GM
16441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16442 test "$ac_cv_c_inline" != no && break
16443done
3e0be4ab 16444
4fda9c95 16445fi
5476a9a4
GM
16446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16447$as_echo "$ac_cv_c_inline" >&6; }
3e0be4ab 16448
5476a9a4
GM
16449case $ac_cv_c_inline in
16450 inline | yes) ;;
16451 *)
16452 case $ac_cv_c_inline in
16453 no) ac_val=;;
16454 *) ac_val=$ac_cv_c_inline;;
16455 esac
16456 cat >>confdefs.h <<_ACEOF
16457#ifndef __cplusplus
16458#define inline $ac_val
16459#endif
4fda9c95 16460_ACEOF
5476a9a4
GM
16461 ;;
16462esac
4fda9c95 16463
da6c8463 16464
5476a9a4
GM
16465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
16466$as_echo_n "checking whether strtold conforms to C99... " >&6; }
16467if test "${gl_cv_func_c99_strtold+set}" = set; then :
16468 $as_echo_n "(cached) " >&6
16469else
16470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16471/* end confdefs.h. */
16472/* On HP-UX before 11.23, strtold returns a struct instead of
16473 long double. Reject implementations like that, by requiring
16474 compatibility with the C99 prototype. */
16475 #include <stdlib.h>
16476 static long double (*p) (char const *, char **) = strtold;
16477 static long double
16478 test (char const *nptr, char **endptr)
16479 {
16480 long double r;
16481 r = strtold (nptr, endptr);
16482 return r;
16483 }
16484int
16485main ()
16486{
16487return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
16488 ;
16489 return 0;
16490}
16491_ACEOF
16492if ac_fn_c_try_link "$LINENO"; then :
16493 gl_cv_func_c99_strtold=yes
16494else
16495 gl_cv_func_c99_strtold=no
3e0be4ab 16496fi
5476a9a4
GM
16497rm -f core conftest.err conftest.$ac_objext \
16498 conftest$ac_exeext conftest.$ac_ext
16499fi
16500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
16501$as_echo "$gl_cv_func_c99_strtold" >&6; }
16502 if test $gl_cv_func_c99_strtold = yes; then
da6c8463 16503
5476a9a4 16504$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
da6c8463 16505
5476a9a4 16506 fi
da6c8463
GM
16507
16508
5476a9a4
GM
16509 GNULIB_CHDIR=0;
16510 GNULIB_CHOWN=0;
16511 GNULIB_CLOSE=0;
16512 GNULIB_DUP=0;
16513 GNULIB_DUP2=0;
16514 GNULIB_DUP3=0;
16515 GNULIB_ENVIRON=0;
16516 GNULIB_EUIDACCESS=0;
16517 GNULIB_FACCESSAT=0;
16518 GNULIB_FCHDIR=0;
16519 GNULIB_FCHOWNAT=0;
16520 GNULIB_FDATASYNC=0;
16521 GNULIB_FSYNC=0;
16522 GNULIB_FTRUNCATE=0;
16523 GNULIB_GETCWD=0;
16524 GNULIB_GETDOMAINNAME=0;
16525 GNULIB_GETDTABLESIZE=0;
16526 GNULIB_GETGROUPS=0;
16527 GNULIB_GETHOSTNAME=0;
16528 GNULIB_GETLOGIN=0;
16529 GNULIB_GETLOGIN_R=0;
16530 GNULIB_GETPAGESIZE=0;
16531 GNULIB_GETUSERSHELL=0;
16532 GNULIB_GROUP_MEMBER=0;
16533 GNULIB_ISATTY=0;
16534 GNULIB_LCHOWN=0;
16535 GNULIB_LINK=0;
16536 GNULIB_LINKAT=0;
16537 GNULIB_LSEEK=0;
16538 GNULIB_PIPE=0;
16539 GNULIB_PIPE2=0;
16540 GNULIB_PREAD=0;
16541 GNULIB_PWRITE=0;
16542 GNULIB_READ=0;
16543 GNULIB_READLINK=0;
16544 GNULIB_READLINKAT=0;
16545 GNULIB_RMDIR=0;
16546 GNULIB_SETHOSTNAME=0;
16547 GNULIB_SLEEP=0;
16548 GNULIB_SYMLINK=0;
16549 GNULIB_SYMLINKAT=0;
16550 GNULIB_TTYNAME_R=0;
16551 GNULIB_UNISTD_H_NONBLOCKING=0;
16552 GNULIB_UNISTD_H_SIGPIPE=0;
16553 GNULIB_UNLINK=0;
16554 GNULIB_UNLINKAT=0;
16555 GNULIB_USLEEP=0;
16556 GNULIB_WRITE=0;
16557 HAVE_CHOWN=1;
16558 HAVE_DUP2=1;
16559 HAVE_DUP3=1;
16560 HAVE_EUIDACCESS=1;
16561 HAVE_FACCESSAT=1;
16562 HAVE_FCHDIR=1;
16563 HAVE_FCHOWNAT=1;
16564 HAVE_FDATASYNC=1;
16565 HAVE_FSYNC=1;
16566 HAVE_FTRUNCATE=1;
16567 HAVE_GETDTABLESIZE=1;
16568 HAVE_GETGROUPS=1;
16569 HAVE_GETHOSTNAME=1;
16570 HAVE_GETLOGIN=1;
16571 HAVE_GETPAGESIZE=1;
16572 HAVE_GROUP_MEMBER=1;
16573 HAVE_LCHOWN=1;
16574 HAVE_LINK=1;
16575 HAVE_LINKAT=1;
16576 HAVE_PIPE=1;
16577 HAVE_PIPE2=1;
16578 HAVE_PREAD=1;
16579 HAVE_PWRITE=1;
16580 HAVE_READLINK=1;
16581 HAVE_READLINKAT=1;
16582 HAVE_SETHOSTNAME=1;
16583 HAVE_SLEEP=1;
16584 HAVE_SYMLINK=1;
16585 HAVE_SYMLINKAT=1;
16586 HAVE_UNLINKAT=1;
16587 HAVE_USLEEP=1;
16588 HAVE_DECL_ENVIRON=1;
16589 HAVE_DECL_FCHDIR=1;
16590 HAVE_DECL_FDATASYNC=1;
16591 HAVE_DECL_GETDOMAINNAME=1;
16592 HAVE_DECL_GETLOGIN_R=1;
16593 HAVE_DECL_GETPAGESIZE=1;
16594 HAVE_DECL_GETUSERSHELL=1;
16595 HAVE_DECL_SETHOSTNAME=1;
16596 HAVE_DECL_TTYNAME_R=1;
16597 HAVE_OS_H=0;
16598 HAVE_SYS_PARAM_H=0;
16599 REPLACE_CHOWN=0;
16600 REPLACE_CLOSE=0;
16601 REPLACE_DUP=0;
16602 REPLACE_DUP2=0;
16603 REPLACE_FCHOWNAT=0;
16604 REPLACE_FTRUNCATE=0;
16605 REPLACE_GETCWD=0;
16606 REPLACE_GETDOMAINNAME=0;
16607 REPLACE_GETLOGIN_R=0;
16608 REPLACE_GETGROUPS=0;
16609 REPLACE_GETPAGESIZE=0;
16610 REPLACE_ISATTY=0;
16611 REPLACE_LCHOWN=0;
16612 REPLACE_LINK=0;
16613 REPLACE_LINKAT=0;
16614 REPLACE_LSEEK=0;
16615 REPLACE_PREAD=0;
16616 REPLACE_PWRITE=0;
16617 REPLACE_READ=0;
16618 REPLACE_READLINK=0;
16619 REPLACE_RMDIR=0;
16620 REPLACE_SLEEP=0;
16621 REPLACE_SYMLINK=0;
16622 REPLACE_TTYNAME_R=0;
16623 REPLACE_UNLINK=0;
16624 REPLACE_UNLINKAT=0;
16625 REPLACE_USLEEP=0;
16626 REPLACE_WRITE=0;
16627 UNISTD_H_HAVE_WINSOCK2_H=0;
16628 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
16629
16630
93131e11
GM
16631
16632
16633
16634
16635
16636
16637
16638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
16639$as_echo_n "checking if environ is properly declared... " >&6; }
16640 if test "${gt_cv_var_environ_declaration+set}" = set; then :
16641 $as_echo_n "(cached) " >&6
16642else
16643
16644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16645/* end confdefs.h. */
16646#if HAVE_UNISTD_H
16647 #include <unistd.h>
16648 #endif
16649 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
16650 #include <stdlib.h>
16651
16652 extern struct { int foo; } environ;
16653int
16654main ()
16655{
16656environ.foo = 1;
16657 ;
16658 return 0;
16659}
16660_ACEOF
16661if ac_fn_c_try_compile "$LINENO"; then :
16662 gt_cv_var_environ_declaration=no
16663else
16664 gt_cv_var_environ_declaration=yes
16665fi
16666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16667fi
16668
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
16670$as_echo "$gt_cv_var_environ_declaration" >&6; }
16671 if test $gt_cv_var_environ_declaration = yes; then
16672
16673$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
16674
16675 fi
16676
16677
16678 if test $gt_cv_var_environ_declaration != yes; then
16679 HAVE_DECL_ENVIRON=0
16680 fi
16681
7cd2ed2c
GM
16682
16683
16684
16685
8966cbff
GM
16686
16687
5476a9a4
GM
16688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
16689$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
16690if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
f199cab1 16691 $as_echo_n "(cached) " >&6
ae0d7250 16692else
f199cab1 16693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 16694/* end confdefs.h. */
ae0d7250 16695
5476a9a4
GM
16696#include <sys/types.h>
16697#include <sys/stat.h>
3e0be4ab
GM
16698int
16699main ()
16700{
5476a9a4 16701struct stat s; s.st_dm_mode;
3e0be4ab
GM
16702 ;
16703 return 0;
16704}
6ad6792b 16705_ACEOF
5476a9a4
GM
16706if ac_fn_c_try_compile "$LINENO"; then :
16707 ac_cv_struct_st_dm_mode=yes
f199cab1 16708else
5476a9a4 16709 ac_cv_struct_st_dm_mode=no
f199cab1 16710fi
5476a9a4 16711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 16712fi
5476a9a4
GM
16713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
16714$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
f199cab1 16715
5476a9a4 16716 if test $ac_cv_struct_st_dm_mode = yes; then
f199cab1 16717
5476a9a4 16718$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
f199cab1 16719
5476a9a4 16720 fi
f199cab1 16721
f199cab1 16722
5476a9a4
GM
16723ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
16724if test "x$ac_cv_have_decl_strmode" = x""yes; then :
16725 ac_have_decl=1
16726else
16727 ac_have_decl=0
f199cab1
GM
16728fi
16729
5476a9a4
GM
16730cat >>confdefs.h <<_ACEOF
16731#define HAVE_DECL_STRMODE $ac_have_decl
16732_ACEOF
f199cab1 16733
4fda9c95 16734
5476a9a4
GM
16735 GNULIB__EXIT=0;
16736 GNULIB_ATOLL=0;
16737 GNULIB_CALLOC_POSIX=0;
16738 GNULIB_CANONICALIZE_FILE_NAME=0;
16739 GNULIB_GETLOADAVG=0;
16740 GNULIB_GETSUBOPT=0;
16741 GNULIB_GRANTPT=0;
16742 GNULIB_MALLOC_POSIX=0;
16743 GNULIB_MBTOWC=0;
16744 GNULIB_MKDTEMP=0;
16745 GNULIB_MKOSTEMP=0;
16746 GNULIB_MKOSTEMPS=0;
16747 GNULIB_MKSTEMP=0;
16748 GNULIB_MKSTEMPS=0;
16749 GNULIB_POSIX_OPENPT=0;
16750 GNULIB_PTSNAME=0;
16751 GNULIB_PTSNAME_R=0;
16752 GNULIB_PUTENV=0;
16753 GNULIB_RANDOM=0;
16754 GNULIB_RANDOM_R=0;
16755 GNULIB_REALLOC_POSIX=0;
16756 GNULIB_REALPATH=0;
16757 GNULIB_RPMATCH=0;
16758 GNULIB_SETENV=0;
16759 GNULIB_STRTOD=0;
16760 GNULIB_STRTOLL=0;
16761 GNULIB_STRTOULL=0;
16762 GNULIB_SYSTEM_POSIX=0;
16763 GNULIB_UNLOCKPT=0;
16764 GNULIB_UNSETENV=0;
16765 GNULIB_WCTOMB=0;
16766 HAVE__EXIT=1;
16767 HAVE_ATOLL=1;
16768 HAVE_CANONICALIZE_FILE_NAME=1;
16769 HAVE_DECL_GETLOADAVG=1;
16770 HAVE_GETSUBOPT=1;
16771 HAVE_GRANTPT=1;
16772 HAVE_MKDTEMP=1;
16773 HAVE_MKOSTEMP=1;
16774 HAVE_MKOSTEMPS=1;
16775 HAVE_MKSTEMP=1;
16776 HAVE_MKSTEMPS=1;
16777 HAVE_POSIX_OPENPT=1;
16778 HAVE_PTSNAME=1;
16779 HAVE_PTSNAME_R=1;
16780 HAVE_RANDOM=1;
16781 HAVE_RANDOM_H=1;
16782 HAVE_RANDOM_R=1;
16783 HAVE_REALPATH=1;
16784 HAVE_RPMATCH=1;
16785 HAVE_SETENV=1;
16786 HAVE_DECL_SETENV=1;
16787 HAVE_STRTOD=1;
16788 HAVE_STRTOLL=1;
16789 HAVE_STRTOULL=1;
16790 HAVE_STRUCT_RANDOM_DATA=1;
16791 HAVE_SYS_LOADAVG_H=0;
16792 HAVE_UNLOCKPT=1;
16793 HAVE_DECL_UNSETENV=1;
16794 REPLACE_CALLOC=0;
16795 REPLACE_CANONICALIZE_FILE_NAME=0;
16796 REPLACE_MALLOC=0;
16797 REPLACE_MBTOWC=0;
16798 REPLACE_MKSTEMP=0;
16799 REPLACE_PTSNAME_R=0;
16800 REPLACE_PUTENV=0;
16801 REPLACE_RANDOM_R=0;
16802 REPLACE_REALLOC=0;
16803 REPLACE_REALPATH=0;
16804 REPLACE_SETENV=0;
16805 REPLACE_STRTOD=0;
16806 REPLACE_UNSETENV=0;
16807 REPLACE_WCTOMB=0;
f199cab1
GM
16808
16809
16810
5476a9a4
GM
16811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
16812$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
16813if test "${gl_cv_have_include_next+set}" = set; then :
f199cab1
GM
16814 $as_echo_n "(cached) " >&6
16815else
5476a9a4
GM
16816 rm -rf conftestd1a conftestd1b conftestd2
16817 mkdir conftestd1a conftestd1b conftestd2
16818 cat <<EOF > conftestd1a/conftest.h
16819#define DEFINED_IN_CONFTESTD1
16820#include_next <conftest.h>
16821#ifdef DEFINED_IN_CONFTESTD2
16822int foo;
16823#else
16824#error "include_next doesn't work"
16825#endif
16826EOF
16827 cat <<EOF > conftestd1b/conftest.h
16828#define DEFINED_IN_CONFTESTD1
16829#include <stdio.h>
16830#include_next <conftest.h>
16831#ifdef DEFINED_IN_CONFTESTD2
16832int foo;
16833#else
16834#error "include_next doesn't work"
16835#endif
16836EOF
16837 cat <<EOF > conftestd2/conftest.h
16838#ifndef DEFINED_IN_CONFTESTD1
16839#error "include_next test doesn't work"
16840#endif
16841#define DEFINED_IN_CONFTESTD2
16842EOF
16843 gl_save_CPPFLAGS="$CPPFLAGS"
16844 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
16845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16846/* end confdefs.h. */
5476a9a4 16847#include <conftest.h>
5f90be1b 16848_ACEOF
4fda9c95 16849if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 16850 gl_cv_have_include_next=yes
5f90be1b 16851else
5476a9a4 16852 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
f199cab1 16853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 16854/* end confdefs.h. */
5476a9a4 16855#include <conftest.h>
4fda9c95 16856_ACEOF
3e0be4ab 16857if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 16858 gl_cv_have_include_next=buggy
3e0be4ab 16859else
5476a9a4 16860 gl_cv_have_include_next=no
3e0be4ab 16861fi
5476a9a4 16862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 16863
4fda9c95 16864fi
f199cab1 16865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
16866 CPPFLAGS="$gl_save_CPPFLAGS"
16867 rm -rf conftestd1a conftestd1b conftestd2
5f90be1b 16868
3e0be4ab 16869fi
5476a9a4
GM
16870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
16871$as_echo "$gl_cv_have_include_next" >&6; }
16872 PRAGMA_SYSTEM_HEADER=
16873 if test $gl_cv_have_include_next = yes; then
16874 INCLUDE_NEXT=include_next
16875 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16876 if test -n "$GCC"; then
16877 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
16878 fi
16879 else
16880 if test $gl_cv_have_include_next = buggy; then
16881 INCLUDE_NEXT=include
16882 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16883 else
16884 INCLUDE_NEXT=include
16885 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
16886 fi
16887 fi
f199cab1
GM
16888
16889
16890
5476a9a4
GM
16891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
16892$as_echo_n "checking whether system header files limit the line length... " >&6; }
16893if test "${gl_cv_pragma_columns+set}" = set; then :
f199cab1
GM
16894 $as_echo_n "(cached) " >&6
16895else
5476a9a4 16896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16897/* end confdefs.h. */
f199cab1 16898
5476a9a4
GM
16899#ifdef __TANDEM
16900choke me
16901#endif
f199cab1 16902
f199cab1 16903_ACEOF
5476a9a4
GM
16904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16905 $EGREP "choke me" >/dev/null 2>&1; then :
16906 gl_cv_pragma_columns=yes
16907else
16908 gl_cv_pragma_columns=no
f199cab1 16909fi
5476a9a4 16910rm -f conftest*
f199cab1 16911
f199cab1 16912
5476a9a4
GM
16913fi
16914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
16915$as_echo "$gl_cv_pragma_columns" >&6; }
16916 if test $gl_cv_pragma_columns = yes; then
16917 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
f199cab1 16918 else
5476a9a4 16919 PRAGMA_COLUMNS=
f199cab1
GM
16920 fi
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
5f90be1b 16935
f199cab1
GM
16936
16937
16938 if test $gl_cv_have_include_next = yes; then
5476a9a4 16939 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 16940 else
5476a9a4
GM
16941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
16942$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
16943if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 16944 $as_echo_n "(cached) " >&6
5f90be1b 16945else
f199cab1 16946
5476a9a4 16947 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
16948
16949
16950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 16951/* end confdefs.h. */
5476a9a4 16952#include <getopt.h>
4fda9c95 16953
5f90be1b 16954_ACEOF
f199cab1
GM
16955 case "$host_os" in
16956 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16957 *) gl_absname_cpp="$ac_cpp" ;;
16958 esac
5f90be1b 16959
f199cab1
GM
16960 case "$host_os" in
16961 mingw*)
16962 gl_dirsep_regex='[/\\]'
16963 ;;
16964 *)
16965 gl_dirsep_regex='\/'
16966 ;;
16967 esac
16968 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 16969
5476a9a4 16970 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
16971 | sed -e "$gl_make_literal_regex_sed"`
16972 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16973 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16974 s|^/[^/]|//&|
16975 p
16976 q
16977 }'
5476a9a4 16978 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
16979 sed -n "$gl_absolute_header_sed"`'"'
16980 else
5476a9a4 16981 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 16982 fi
5f90be1b
PE
16983
16984
3e0be4ab 16985fi
5476a9a4
GM
16986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
16987$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 16988 fi
5476a9a4 16989 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 16990
f199cab1
GM
16991 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16992 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 16993 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
16994 else
16995 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 16996 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 16997 fi
5476a9a4 16998 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
16999
17000
f199cab1 17001
f199cab1 17002
5476a9a4
GM
17003 if test $ac_cv_header_getopt_h = yes; then
17004 HAVE_GETOPT_H=1
17005 else
17006 HAVE_GETOPT_H=0
f199cab1
GM
17007 fi
17008
f199cab1 17009
5476a9a4 17010 gl_replace_getopt=
f199cab1 17011
5476a9a4
GM
17012 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17013 for ac_header in getopt.h
17014do :
17015 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
17016if test "x$ac_cv_header_getopt_h" = x""yes; then :
17017 cat >>confdefs.h <<_ACEOF
17018#define HAVE_GETOPT_H 1
17019_ACEOF
f199cab1 17020
5476a9a4
GM
17021else
17022 gl_replace_getopt=yes
3e0be4ab 17023fi
3e0be4ab 17024
5476a9a4 17025done
3e0be4ab 17026
5476a9a4 17027 fi
3e0be4ab 17028
5476a9a4
GM
17029 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17030 for ac_func in getopt_long_only
17031do :
17032 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
17033if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
17034 cat >>confdefs.h <<_ACEOF
17035#define HAVE_GETOPT_LONG_ONLY 1
17036_ACEOF
3e0be4ab 17037
3e0be4ab 17038else
5476a9a4 17039 gl_replace_getopt=yes
3e0be4ab 17040fi
5476a9a4 17041done
3e0be4ab 17042
f199cab1 17043 fi
3e0be4ab 17044
5476a9a4
GM
17045 if test -z "$gl_replace_getopt"; then
17046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
17047$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
17048if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 17049 $as_echo_n "(cached) " >&6
5476a9a4
GM
17050else
17051
17052 if test $cross_compiling = no; then
17053 if test "$cross_compiling" = yes; then :
17054 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17056as_fn_error "cannot run test program while cross compiling
17057See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 17058else
f199cab1 17059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 17060/* end confdefs.h. */
5476a9a4
GM
17061
17062#include <unistd.h>
17063#include <stdlib.h>
17064#include <string.h>
17065
f199cab1
GM
17066int
17067main ()
17068{
5476a9a4
GM
17069 static char program[] = "program";
17070 static char a[] = "-a";
17071 static char foo[] = "foo";
17072 static char bar[] = "bar";
17073 char *argv[] = { program, a, foo, bar, NULL };
17074 int c;
17075
17076 c = getopt (4, argv, "ab");
17077 if (!(c == 'a'))
17078 return 1;
17079 c = getopt (4, argv, "ab");
17080 if (!(c == -1))
17081 return 2;
17082 if (!(optind == 2))
17083 return 3;
f199cab1
GM
17084 return 0;
17085}
17086
3e0be4ab 17087_ACEOF
5476a9a4
GM
17088if ac_fn_c_try_run "$LINENO"; then :
17089 gl_cv_func_getopt_posix=maybe
3e0be4ab 17090else
5476a9a4 17091 gl_cv_func_getopt_posix=no
3e0be4ab 17092fi
5476a9a4
GM
17093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17094 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
17095fi
17096
5476a9a4
GM
17097 if test $gl_cv_func_getopt_posix = maybe; then
17098 if test "$cross_compiling" = yes; then :
17099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17101as_fn_error "cannot run test program while cross compiling
17102See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 17103else
5476a9a4
GM
17104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17105/* end confdefs.h. */
3e0be4ab 17106
5476a9a4
GM
17107#include <unistd.h>
17108#include <stdlib.h>
17109#include <string.h>
3e0be4ab 17110
5476a9a4
GM
17111int
17112main ()
17113{
17114 static char program[] = "program";
17115 static char donald[] = "donald";
17116 static char p[] = "-p";
17117 static char billy[] = "billy";
17118 static char duck[] = "duck";
17119 static char a[] = "-a";
17120 static char bar[] = "bar";
17121 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
17122 int c;
3e0be4ab 17123
5476a9a4
GM
17124 c = getopt (7, argv, "+abp:q:");
17125 if (!(c == -1))
17126 return 4;
17127 if (!(strcmp (argv[0], "program") == 0))
17128 return 5;
17129 if (!(strcmp (argv[1], "donald") == 0))
17130 return 6;
17131 if (!(strcmp (argv[2], "-p") == 0))
17132 return 7;
17133 if (!(strcmp (argv[3], "billy") == 0))
17134 return 8;
17135 if (!(strcmp (argv[4], "duck") == 0))
17136 return 9;
17137 if (!(strcmp (argv[5], "-a") == 0))
17138 return 10;
17139 if (!(strcmp (argv[6], "bar") == 0))
17140 return 11;
17141 if (!(optind == 1))
17142 return 12;
17143 return 0;
17144}
3e0be4ab
GM
17145
17146_ACEOF
5476a9a4
GM
17147if ac_fn_c_try_run "$LINENO"; then :
17148 gl_cv_func_getopt_posix=maybe
17149else
17150 gl_cv_func_getopt_posix=no
17151fi
17152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17153 conftest.$ac_objext conftest.beam conftest.$ac_ext
17154fi
b0415a03 17155
5476a9a4
GM
17156 fi
17157 if test $gl_cv_func_getopt_posix = maybe; then
17158 if test "$cross_compiling" = yes; then :
17159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17161as_fn_error "cannot run test program while cross compiling
17162See \`config.log' for more details." "$LINENO" 5; }
17163else
17164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17165/* end confdefs.h. */
b0415a03 17166
5476a9a4
GM
17167#include <unistd.h>
17168#include <stdlib.h>
17169#include <string.h>
3e0be4ab 17170
5476a9a4
GM
17171int
17172main ()
17173{
17174 static char program[] = "program";
17175 static char ab[] = "-ab";
17176 char *argv[3] = { program, ab, NULL };
17177 if (getopt (2, argv, "ab:") != 'a')
17178 return 13;
17179 if (getopt (2, argv, "ab:") != '?')
17180 return 14;
17181 if (optopt != 'b')
17182 return 15;
17183 if (optind != 2)
17184 return 16;
17185 return 0;
17186}
3e0be4ab 17187
5476a9a4
GM
17188_ACEOF
17189if ac_fn_c_try_run "$LINENO"; then :
17190 gl_cv_func_getopt_posix=yes
17191else
17192 gl_cv_func_getopt_posix=no
17193fi
17194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17195 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 17196fi
3e0be4ab 17197
5476a9a4
GM
17198 fi
17199 else
17200 case "$host_os" in
17201 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
17202 *) gl_cv_func_getopt_posix="guessing yes";;
17203 esac
17204 fi
3e0be4ab 17205
5476a9a4
GM
17206fi
17207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
17208$as_echo "$gl_cv_func_getopt_posix" >&6; }
17209 case "$gl_cv_func_getopt_posix" in
17210 *no) gl_replace_getopt=yes ;;
17211 esac
3e0be4ab
GM
17212 fi
17213
5476a9a4
GM
17214 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
17215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
17216$as_echo_n "checking for working GNU getopt function... " >&6; }
17217if test "${gl_cv_func_getopt_gnu+set}" = set; then :
17218 $as_echo_n "(cached) " >&6
17219else
17220 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
17221 # optstring is necessary for programs like m4 that have POSIX-mandated
17222 # semantics for supporting options interspersed with files.
17223 # Also, since getopt_long is a GNU extension, we require optind=0.
17224 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
17225 # so take care to revert to the correct (non-)export state.
17226 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
17227 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
17228 xx) gl_had_POSIXLY_CORRECT=exported ;;
17229 x) gl_had_POSIXLY_CORRECT=yes ;;
17230 *) gl_had_POSIXLY_CORRECT= ;;
17231 esac
17232 POSIXLY_CORRECT=1
17233 export POSIXLY_CORRECT
17234 if test "$cross_compiling" = yes; then :
17235 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 17236
5476a9a4
GM
17237else
17238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17239/* end confdefs.h. */
17240#include <getopt.h>
17241 #include <stddef.h>
17242 #include <string.h>
3e0be4ab 17243
5476a9a4
GM
17244#include <stdlib.h>
17245#if defined __MACH__ && defined __APPLE__
17246/* Avoid a crash on Mac OS X. */
17247#include <mach/mach.h>
17248#include <mach/mach_error.h>
17249#include <mach/thread_status.h>
17250#include <mach/exception.h>
17251#include <mach/task.h>
17252#include <pthread.h>
17253/* The exception port on which our thread listens. */
17254static mach_port_t our_exception_port;
17255/* The main function of the thread listening for exceptions of type
17256 EXC_BAD_ACCESS. */
17257static void *
17258mach_exception_thread (void *arg)
17259{
17260 /* Buffer for a message to be received. */
17261 struct {
17262 mach_msg_header_t head;
17263 mach_msg_body_t msgh_body;
17264 char data[1024];
17265 } msg;
17266 mach_msg_return_t retval;
17267 /* Wait for a message on the exception port. */
17268 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
17269 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
17270 if (retval != MACH_MSG_SUCCESS)
17271 abort ();
17272 exit (1);
17273}
17274static void
17275nocrash_init (void)
17276{
17277 mach_port_t self = mach_task_self ();
17278 /* Allocate a port on which the thread shall listen for exceptions. */
17279 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
17280 == KERN_SUCCESS) {
17281 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
17282 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
17283 MACH_MSG_TYPE_MAKE_SEND)
17284 == KERN_SUCCESS) {
17285 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
17286 for us. */
17287 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
17288 /* Create the thread listening on the exception port. */
17289 pthread_attr_t attr;
17290 pthread_t thread;
17291 if (pthread_attr_init (&attr) == 0
17292 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
17293 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
17294 pthread_attr_destroy (&attr);
17295 /* Replace the exception port info for these exceptions with our own.
17296 Note that we replace the exception port for the entire task, not only
17297 for a particular thread. This has the effect that when our exception
17298 port gets the message, the thread specific exception port has already
17299 been asked, and we don't need to bother about it.
17300 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
17301 task_set_exception_ports (self, mask, our_exception_port,
17302 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
17303 }
17304 }
17305 }
17306}
17307#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17308/* Avoid a crash on native Windows. */
17309#define WIN32_LEAN_AND_MEAN
17310#include <windows.h>
17311#include <winerror.h>
17312static LONG WINAPI
17313exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
17314{
17315 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
17316 {
17317 case EXCEPTION_ACCESS_VIOLATION:
17318 case EXCEPTION_IN_PAGE_ERROR:
17319 case EXCEPTION_STACK_OVERFLOW:
17320 case EXCEPTION_GUARD_PAGE:
17321 case EXCEPTION_PRIV_INSTRUCTION:
17322 case EXCEPTION_ILLEGAL_INSTRUCTION:
17323 case EXCEPTION_DATATYPE_MISALIGNMENT:
17324 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
17325 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
17326 exit (1);
17327 }
17328 return EXCEPTION_CONTINUE_SEARCH;
17329}
17330static void
17331nocrash_init (void)
17332{
17333 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
17334}
17335#else
17336/* Avoid a crash on POSIX systems. */
17337#include <signal.h>
17338/* A POSIX signal handler. */
17339static void
17340exception_handler (int sig)
17341{
17342 exit (1);
17343}
17344static void
17345nocrash_init (void)
17346{
17347#ifdef SIGSEGV
17348 signal (SIGSEGV, exception_handler);
17349#endif
17350#ifdef SIGBUS
17351 signal (SIGBUS, exception_handler);
17352#endif
17353}
17354#endif
3e0be4ab 17355
3e0be4ab 17356
5476a9a4
GM
17357int
17358main ()
17359{
3e0be4ab 17360
5476a9a4 17361 int result = 0;
3e0be4ab 17362
5476a9a4 17363 nocrash_init();
3e0be4ab 17364
5476a9a4
GM
17365 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
17366 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
17367 OSF/1 5.1, Solaris 10. */
17368 {
17369 static char conftest[] = "conftest";
17370 static char plus[] = "-+";
17371 char *argv[3] = { conftest, plus, NULL };
17372 opterr = 0;
17373 if (getopt (2, argv, "+a") != '?')
17374 result |= 1;
17375 }
17376 /* This code succeeds on glibc 2.8, mingw,
17377 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17378 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17379 {
17380 static char program[] = "program";
17381 static char p[] = "-p";
17382 static char foo[] = "foo";
17383 static char bar[] = "bar";
17384 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 17385
5476a9a4
GM
17386 optind = 1;
17387 if (getopt (4, argv, "p::") != 'p')
17388 result |= 2;
17389 else if (optarg != NULL)
17390 result |= 4;
17391 else if (getopt (4, argv, "p::") != -1)
17392 result |= 6;
17393 else if (optind != 2)
17394 result |= 8;
17395 }
17396 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17397 {
17398 static char program[] = "program";
17399 static char foo[] = "foo";
17400 static char p[] = "-p";
17401 char *argv[] = { program, foo, p, NULL };
17402 optind = 0;
17403 if (getopt (3, argv, "-p") != 1)
17404 result |= 16;
17405 else if (getopt (3, argv, "-p") != 'p')
17406 result |= 16;
17407 }
17408 /* This code fails on glibc 2.11. */
17409 {
17410 static char program[] = "program";
17411 static char b[] = "-b";
17412 static char a[] = "-a";
17413 char *argv[] = { program, b, a, NULL };
17414 optind = opterr = 0;
17415 if (getopt (3, argv, "+:a:b") != 'b')
17416 result |= 32;
17417 else if (getopt (3, argv, "+:a:b") != ':')
17418 result |= 32;
17419 }
17420 /* This code dumps core on glibc 2.14. */
17421 {
17422 static char program[] = "program";
17423 static char w[] = "-W";
17424 static char dummy[] = "dummy";
17425 char *argv[] = { program, w, dummy, NULL };
17426 optind = opterr = 1;
17427 if (getopt (3, argv, "W;") != 'W')
17428 result |= 64;
17429 }
17430 return result;
3e0be4ab 17431
5476a9a4
GM
17432 ;
17433 return 0;
17434}
17435_ACEOF
17436if ac_fn_c_try_run "$LINENO"; then :
17437 gl_cv_func_getopt_gnu=yes
17438else
17439 gl_cv_func_getopt_gnu=no
17440fi
17441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17442 conftest.$ac_objext conftest.beam conftest.$ac_ext
17443fi
3e0be4ab 17444
5476a9a4
GM
17445 case $gl_had_POSIXLY_CORRECT in
17446 exported) ;;
17447 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17448 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17449 esac
3e0be4ab 17450
5476a9a4
GM
17451fi
17452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17453$as_echo "$gl_cv_func_getopt_gnu" >&6; }
17454 if test "$gl_cv_func_getopt_gnu" != yes; then
17455 gl_replace_getopt=yes
17456 else
17457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
17458$as_echo_n "checking for working GNU getopt_long function... " >&6; }
17459if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
17460 $as_echo_n "(cached) " >&6
17461else
5476a9a4
GM
17462 if test "$cross_compiling" = yes; then :
17463 case "$host_os" in
17464 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
17465 *) gl_cv_func_getopt_long_gnu="guessing yes";;
17466 esac
3e0be4ab
GM
17467
17468else
17469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17470/* end confdefs.h. */
5476a9a4
GM
17471#include <getopt.h>
17472 #include <stddef.h>
17473 #include <string.h>
f199cab1
GM
17474
17475int
17476main ()
369e19fc 17477{
5476a9a4
GM
17478static const struct option long_options[] =
17479 {
17480 { "xtremely-",no_argument, NULL, 1003 },
17481 { "xtra", no_argument, NULL, 1001 },
17482 { "xtreme", no_argument, NULL, 1002 },
17483 { "xtremely", no_argument, NULL, 1003 },
17484 { NULL, 0, NULL, 0 }
17485 };
17486 /* This code fails on OpenBSD 5.0. */
17487 {
17488 static char program[] = "program";
17489 static char xtremel[] = "--xtremel";
17490 char *argv[] = { program, xtremel, NULL };
17491 int option_index;
17492 optind = 1; opterr = 0;
17493 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
17494 return 1;
17495 }
17496 return 0;
f199cab1
GM
17497
17498 ;
17499 return 0;
369e19fc 17500}
f199cab1
GM
17501_ACEOF
17502if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 17503 gl_cv_func_getopt_long_gnu=yes
f199cab1 17504else
5476a9a4 17505 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
17506fi
17507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17508 conftest.$ac_objext conftest.beam conftest.$ac_ext
17509fi
17510
5476a9a4 17511
f199cab1 17512fi
5476a9a4
GM
17513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
17514$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
17515 case "$gl_cv_func_getopt_long_gnu" in
17516 *yes) ;;
17517 *) gl_replace_getopt=yes ;;
17518 esac
17519 fi
17520 fi
f199cab1 17521
f199cab1 17522
f199cab1 17523
369e19fc
PE
17524
17525
5476a9a4
GM
17526
17527 REPLACE_GETOPT=0
17528 if test -n "$gl_replace_getopt"; then
17529 REPLACE_GETOPT=1
f199cab1 17530 fi
3e0be4ab 17531
5476a9a4 17532 if test $REPLACE_GETOPT = 1; then
369e19fc 17533
5476a9a4 17534 GETOPT_H=getopt.h
369e19fc 17535
5476a9a4 17536$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
17537
17538
f199cab1 17539
5476a9a4 17540 fi
f199cab1 17541
5476a9a4
GM
17542ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
17543if test "x$ac_cv_have_decl_getenv" = x""yes; then :
17544 ac_have_decl=1
3e0be4ab 17545else
5476a9a4 17546 ac_have_decl=0
3e0be4ab 17547fi
e275c824 17548
5476a9a4
GM
17549cat >>confdefs.h <<_ACEOF
17550#define HAVE_DECL_GETENV $ac_have_decl
17551_ACEOF
17552
a6342fc8 17553:
f199cab1 17554
5476a9a4
GM
17555
17556
17557
17558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
17559$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
17560if test "${ac_cv_c_restrict+set}" = set; then :
17561 $as_echo_n "(cached) " >&6
f199cab1 17562else
5476a9a4
GM
17563 ac_cv_c_restrict=no
17564 # The order here caters to the fact that C++ does not require restrict.
17565 for ac_kw in __restrict __restrict__ _Restrict restrict; do
17566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 17567/* end confdefs.h. */
5476a9a4
GM
17568typedef int * int_ptr;
17569 int foo (int_ptr $ac_kw ip) {
17570 return ip[0];
17571 }
f199cab1
GM
17572int
17573main ()
17574{
5476a9a4
GM
17575int s[1];
17576 int * $ac_kw t = s;
17577 t[0] = 0;
17578 return foo(t)
f199cab1
GM
17579 ;
17580 return 0;
17581}
17582_ACEOF
5476a9a4
GM
17583if ac_fn_c_try_compile "$LINENO"; then :
17584 ac_cv_c_restrict=$ac_kw
f199cab1 17585fi
5476a9a4
GM
17586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17587 test "$ac_cv_c_restrict" != no && break
17588 done
f199cab1 17589
f199cab1 17590fi
5476a9a4
GM
17591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
17592$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 17593
5476a9a4
GM
17594 case $ac_cv_c_restrict in
17595 restrict) ;;
17596 no) $as_echo "#define restrict /**/" >>confdefs.h
17597 ;;
17598 *) cat >>confdefs.h <<_ACEOF
17599#define restrict $ac_cv_c_restrict
17600_ACEOF
17601 ;;
17602 esac
f199cab1 17603
f199cab1 17604
5476a9a4
GM
17605 GNULIB_GETTIMEOFDAY=0;
17606 HAVE_GETTIMEOFDAY=1;
17607 HAVE_STRUCT_TIMEVAL=1;
17608 HAVE_SYS_TIME_H=1;
17609 REPLACE_GETTIMEOFDAY=0;
17610 REPLACE_STRUCT_TIMEVAL=0;
e275c824 17611
e275c824 17612
e275c824 17613
e275c824 17614
4fda9c95 17615
5fa4ac76 17616
5fa4ac76 17617
5fa4ac76 17618
f199cab1
GM
17619
17620
17621
5fa4ac76 17622
5fa4ac76 17623
5fa4ac76 17624
5fa4ac76 17625
5fa4ac76 17626
5476a9a4
GM
17627 if test $gl_cv_have_include_next = yes; then
17628 gl_cv_next_sys_time_h='<'sys/time.h'>'
17629 else
17630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
17631$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
17632if test "${gl_cv_next_sys_time_h+set}" = set; then :
17633 $as_echo_n "(cached) " >&6
17634else
5fa4ac76 17635
5476a9a4 17636 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
17637
17638
5476a9a4
GM
17639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17640/* end confdefs.h. */
17641#include <sys/time.h>
5fa4ac76 17642
5476a9a4
GM
17643_ACEOF
17644 case "$host_os" in
17645 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17646 *) gl_absname_cpp="$ac_cpp" ;;
17647 esac
1f5d53eb 17648
5476a9a4
GM
17649 case "$host_os" in
17650 mingw*)
17651 gl_dirsep_regex='[/\\]'
17652 ;;
17653 *)
17654 gl_dirsep_regex='\/'
17655 ;;
17656 esac
17657 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 17658
5476a9a4
GM
17659 gl_header_literal_regex=`echo 'sys/time.h' \
17660 | sed -e "$gl_make_literal_regex_sed"`
17661 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17662 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17663 s|^/[^/]|//&|
17664 p
17665 q
17666 }'
17667 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17668 sed -n "$gl_absolute_header_sed"`'"'
17669 else
17670 gl_cv_next_sys_time_h='<'sys/time.h'>'
17671 fi
1f5d53eb 17672
1f5d53eb 17673
5476a9a4
GM
17674fi
17675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
17676$as_echo "$gl_cv_next_sys_time_h" >&6; }
17677 fi
17678 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 17679
5476a9a4
GM
17680 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17681 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17682 gl_next_as_first_directive='<'sys/time.h'>'
17683 else
17684 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17685 gl_next_as_first_directive=$gl_cv_next_sys_time_h
17686 fi
17687 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 17688
e275c824 17689
3e0be4ab 17690
f199cab1
GM
17691
17692
5476a9a4
GM
17693 if test $ac_cv_header_sys_time_h != yes; then
17694 HAVE_SYS_TIME_H=0
17695 fi
f199cab1
GM
17696
17697
17698
17699
17700
5476a9a4
GM
17701 if test $ac_cv_header_sys_socket_h != yes; then
17702 for ac_header in winsock2.h
17703do :
17704 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17705if test "x$ac_cv_header_winsock2_h" = x""yes; then :
17706 cat >>confdefs.h <<_ACEOF
17707#define HAVE_WINSOCK2_H 1
17708_ACEOF
f199cab1 17709
5476a9a4 17710fi
3e0be4ab 17711
5476a9a4 17712done
3e0be4ab 17713
5476a9a4
GM
17714 fi
17715 if test "$ac_cv_header_winsock2_h" = yes; then
17716 HAVE_WINSOCK2_H=1
17717 UNISTD_H_HAVE_WINSOCK2_H=1
17718 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17719 else
17720 HAVE_WINSOCK2_H=0
17721 fi
17722
17723
17724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
17725$as_echo_n "checking for struct timeval... " >&6; }
17726if test "${gl_cv_sys_struct_timeval+set}" = set; then :
17727 $as_echo_n "(cached) " >&6
17728else
17729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17730/* end confdefs.h. */
17731#if HAVE_SYS_TIME_H
17732 #include <sys/time.h>
17733 #endif
17734 #include <time.h>
17735 #if HAVE_WINSOCK2_H
17736 # include <winsock2.h>
17737 #endif
f199cab1 17738
5476a9a4
GM
17739int
17740main ()
17741{
17742static struct timeval x; x.tv_sec = x.tv_usec;
17743 ;
17744 return 0;
17745}
17746_ACEOF
17747if ac_fn_c_try_compile "$LINENO"; then :
17748 gl_cv_sys_struct_timeval=yes
17749else
17750 gl_cv_sys_struct_timeval=no
f199cab1 17751fi
5476a9a4 17752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 17753
5476a9a4
GM
17754fi
17755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
17756$as_echo "$gl_cv_sys_struct_timeval" >&6; }
17757 if test $gl_cv_sys_struct_timeval != yes; then
17758 HAVE_STRUCT_TIMEVAL=0
17759 else
17760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
17761$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
17762if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
17763 $as_echo_n "(cached) " >&6
17764else
17765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17766/* end confdefs.h. */
17767#if HAVE_SYS_TIME_H
17768 #include <sys/time.h>
17769 #endif
17770 #include <time.h>
17771 #if HAVE_WINSOCK2_H
17772 # include <winsock2.h>
17773 #endif
f199cab1 17774
5476a9a4
GM
17775int
17776main ()
17777{
17778static struct timeval x;
17779 typedef int verify_tv_sec_type[
17780 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
17781 ];
f199cab1 17782
5476a9a4
GM
17783 ;
17784 return 0;
17785}
17786_ACEOF
17787if ac_fn_c_try_compile "$LINENO"; then :
17788 gl_cv_sys_struct_timeval_tv_sec=yes
17789else
17790 gl_cv_sys_struct_timeval_tv_sec=no
17791fi
17792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 17793
5476a9a4
GM
17794fi
17795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
17796$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
17797 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
17798 REPLACE_STRUCT_TIMEVAL=1
17799 fi
17800 fi
f199cab1 17801
f199cab1
GM
17802
17803
17804
17805
17806
f199cab1 17807
5476a9a4
GM
17808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17809$as_echo_n "checking for unsigned long long int... " >&6; }
17810if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
17811 $as_echo_n "(cached) " >&6
17812else
17813 ac_cv_type_unsigned_long_long_int=yes
17814 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17816/* end confdefs.h. */
f199cab1 17817
5476a9a4
GM
17818 /* For now, do not test the preprocessor; as of 2007 there are too many
17819 implementations with broken preprocessors. Perhaps this can
17820 be revisited in 2012. In the meantime, code should not expect
17821 #if to work with literals wider than 32 bits. */
17822 /* Test literals. */
17823 long long int ll = 9223372036854775807ll;
17824 long long int nll = -9223372036854775807LL;
17825 unsigned long long int ull = 18446744073709551615ULL;
17826 /* Test constant expressions. */
17827 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17828 ? 1 : -1)];
17829 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17830 ? 1 : -1)];
17831 int i = 63;
17832int
17833main ()
17834{
17835/* Test availability of runtime routines for shift and division. */
17836 long long int llmax = 9223372036854775807ll;
17837 unsigned long long int ullmax = 18446744073709551615ull;
17838 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17839 | (llmax / ll) | (llmax % ll)
17840 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17841 | (ullmax / ull) | (ullmax % ull));
17842 ;
17843 return 0;
17844}
f199cab1 17845
e275c824 17846_ACEOF
5476a9a4 17847if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 17848
5476a9a4
GM
17849else
17850 ac_cv_type_unsigned_long_long_int=no
e275c824 17851fi
5476a9a4
GM
17852rm -f core conftest.err conftest.$ac_objext \
17853 conftest$ac_exeext conftest.$ac_ext
17854 fi
17855fi
17856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17857$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17858 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 17859
5476a9a4 17860$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 17861
5476a9a4 17862 fi
e275c824
PE
17863
17864
f199cab1 17865
5476a9a4
GM
17866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
17867$as_echo_n "checking for long long int... " >&6; }
17868if test "${ac_cv_type_long_long_int+set}" = set; then :
17869 $as_echo_n "(cached) " >&6
17870else
17871 ac_cv_type_long_long_int=yes
17872 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17873 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
17874 if test $ac_cv_type_long_long_int = yes; then
17875 if test "$cross_compiling" = yes; then :
f199cab1 17876 :
5476a9a4
GM
17877else
17878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17879/* end confdefs.h. */
17880#include <limits.h>
17881 #ifndef LLONG_MAX
17882 # define HALF \
17883 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17884 # define LLONG_MAX (HALF - 1 + HALF)
17885 #endif
17886int
17887main ()
17888{
17889long long int n = 1;
17890 int i;
17891 for (i = 0; ; i++)
17892 {
17893 long long int m = n << i;
17894 if (m >> i != n)
17895 return 1;
17896 if (LLONG_MAX / 2 < m)
17897 break;
17898 }
17899 return 0;
17900 ;
17901 return 0;
17902}
17903_ACEOF
17904if ac_fn_c_try_run "$LINENO"; then :
17905
17906else
17907 ac_cv_type_long_long_int=no
17908fi
17909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17910 conftest.$ac_objext conftest.beam conftest.$ac_ext
17911fi
e275c824 17912
5476a9a4
GM
17913 fi
17914 fi
1f5d53eb 17915fi
5476a9a4
GM
17916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17917$as_echo "$ac_cv_type_long_long_int" >&6; }
17918 if test $ac_cv_type_long_long_int = yes; then
e275c824 17919
5476a9a4 17920$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 17921
5476a9a4 17922 fi
e275c824
PE
17923
17924
e275c824
PE
17925
17926
17927
17928
5476a9a4
GM
17929 gl_cv_c_multiarch=no
17930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17931/* end confdefs.h. */
17932#ifndef __APPLE_CC__
17933 not a universal capable compiler
17934 #endif
17935 typedef int dummy;
e275c824 17936
5476a9a4
GM
17937_ACEOF
17938if ac_fn_c_try_compile "$LINENO"; then :
e275c824 17939
5476a9a4
GM
17940 arch=
17941 prev=
17942 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
17943 if test -n "$prev"; then
17944 case $word in
17945 i?86 | x86_64 | ppc | ppc64)
17946 if test -z "$arch" || test "$arch" = "$word"; then
17947 arch="$word"
17948 else
17949 gl_cv_c_multiarch=yes
17950 fi
17951 ;;
17952 esac
17953 prev=
17954 else
17955 if test "x$word" = "x-arch"; then
17956 prev=arch
17957 fi
17958 fi
17959 done
f199cab1 17960
f199cab1 17961fi
5476a9a4
GM
17962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17963 if test $gl_cv_c_multiarch = yes; then
17964 APPLE_UNIVERSAL_BUILD=1
17965 else
17966 APPLE_UNIVERSAL_BUILD=0
17967 fi
e275c824
PE
17968
17969
67342916 17970
67342916 17971
67342916 17972
5476a9a4
GM
17973 if test $ac_cv_type_long_long_int = yes; then
17974 HAVE_LONG_LONG_INT=1
17975 else
17976 HAVE_LONG_LONG_INT=0
17977 fi
e275c824 17978
e275c824 17979
5476a9a4
GM
17980 if test $ac_cv_type_unsigned_long_long_int = yes; then
17981 HAVE_UNSIGNED_LONG_LONG_INT=1
17982 else
17983 HAVE_UNSIGNED_LONG_LONG_INT=0
17984 fi
e275c824
PE
17985
17986
17987
5476a9a4
GM
17988 if test $ac_cv_header_wchar_h = yes; then
17989 HAVE_WCHAR_H=1
17990 else
17991 HAVE_WCHAR_H=0
17992 fi
e275c824 17993
e275c824 17994
5476a9a4
GM
17995 if test $ac_cv_header_inttypes_h = yes; then
17996 HAVE_INTTYPES_H=1
17997 else
17998 HAVE_INTTYPES_H=0
17999 fi
6c051bab 18000
942f733f 18001
5476a9a4
GM
18002 if test $ac_cv_header_sys_types_h = yes; then
18003 HAVE_SYS_TYPES_H=1
18004 else
18005 HAVE_SYS_TYPES_H=0
18006 fi
4fc2b746 18007
4fc2b746 18008
f199cab1
GM
18009
18010
18011
18012
18013
18014
18015
18016
18017
5476a9a4
GM
18018 if test $gl_cv_have_include_next = yes; then
18019 gl_cv_next_stdint_h='<'stdint.h'>'
18020 else
18021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
18022$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
18023if test "${gl_cv_next_stdint_h+set}" = set; then :
18024 $as_echo_n "(cached) " >&6
18025else
f199cab1 18026
5476a9a4 18027 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
18028
18029
5476a9a4
GM
18030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18031/* end confdefs.h. */
18032#include <stdint.h>
f199cab1 18033
5476a9a4
GM
18034_ACEOF
18035 case "$host_os" in
18036 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18037 *) gl_absname_cpp="$ac_cpp" ;;
18038 esac
f199cab1 18039
5476a9a4
GM
18040 case "$host_os" in
18041 mingw*)
18042 gl_dirsep_regex='[/\\]'
18043 ;;
18044 *)
18045 gl_dirsep_regex='\/'
18046 ;;
18047 esac
18048 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 18049
5476a9a4
GM
18050 gl_header_literal_regex=`echo 'stdint.h' \
18051 | sed -e "$gl_make_literal_regex_sed"`
18052 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18053 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18054 s|^/[^/]|//&|
18055 p
18056 q
18057 }'
18058 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18059 sed -n "$gl_absolute_header_sed"`'"'
18060 else
18061 gl_cv_next_stdint_h='<'stdint.h'>'
18062 fi
4fc2b746 18063
4fc2b746 18064
5476a9a4
GM
18065fi
18066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
18067$as_echo "$gl_cv_next_stdint_h" >&6; }
18068 fi
18069 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 18070
5476a9a4
GM
18071 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18072 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18073 gl_next_as_first_directive='<'stdint.h'>'
18074 else
18075 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18076 gl_next_as_first_directive=$gl_cv_next_stdint_h
18077 fi
18078 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 18079
4fc2b746 18080
f199cab1 18081
f199cab1 18082
5476a9a4
GM
18083 if test $ac_cv_header_stdint_h = yes; then
18084 HAVE_STDINT_H=1
18085 else
18086 HAVE_STDINT_H=0
18087 fi
f199cab1
GM
18088
18089
5476a9a4
GM
18090 if test $ac_cv_header_stdint_h = yes; then
18091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
18092$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
18093if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
18094 $as_echo_n "(cached) " >&6
18095else
5476a9a4
GM
18096 gl_cv_header_working_stdint_h=no
18097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18098/* end confdefs.h. */
4fc2b746
GM
18099
18100
5476a9a4
GM
18101#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18102#include <stdint.h>
18103/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
18104#if !(defined WCHAR_MIN && defined WCHAR_MAX)
18105#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
18106#endif
4fc2b746 18107
942f733f 18108
5476a9a4
GM
18109 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18110 included before <wchar.h>. */
18111 #include <stddef.h>
18112 #include <signal.h>
18113 #if HAVE_WCHAR_H
18114 # include <stdio.h>
18115 # include <time.h>
18116 # include <wchar.h>
18117 #endif
e275c824 18118
f199cab1 18119
5476a9a4
GM
18120#ifdef INT8_MAX
18121int8_t a1 = INT8_MAX;
18122int8_t a1min = INT8_MIN;
18123#endif
18124#ifdef INT16_MAX
18125int16_t a2 = INT16_MAX;
18126int16_t a2min = INT16_MIN;
18127#endif
18128#ifdef INT32_MAX
18129int32_t a3 = INT32_MAX;
18130int32_t a3min = INT32_MIN;
18131#endif
18132#ifdef INT64_MAX
18133int64_t a4 = INT64_MAX;
18134int64_t a4min = INT64_MIN;
18135#endif
18136#ifdef UINT8_MAX
18137uint8_t b1 = UINT8_MAX;
18138#else
18139typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
18140#endif
18141#ifdef UINT16_MAX
18142uint16_t b2 = UINT16_MAX;
18143#endif
18144#ifdef UINT32_MAX
18145uint32_t b3 = UINT32_MAX;
18146#endif
18147#ifdef UINT64_MAX
18148uint64_t b4 = UINT64_MAX;
18149#endif
18150int_least8_t c1 = INT8_C (0x7f);
18151int_least8_t c1max = INT_LEAST8_MAX;
18152int_least8_t c1min = INT_LEAST8_MIN;
18153int_least16_t c2 = INT16_C (0x7fff);
18154int_least16_t c2max = INT_LEAST16_MAX;
18155int_least16_t c2min = INT_LEAST16_MIN;
18156int_least32_t c3 = INT32_C (0x7fffffff);
18157int_least32_t c3max = INT_LEAST32_MAX;
18158int_least32_t c3min = INT_LEAST32_MIN;
18159int_least64_t c4 = INT64_C (0x7fffffffffffffff);
18160int_least64_t c4max = INT_LEAST64_MAX;
18161int_least64_t c4min = INT_LEAST64_MIN;
18162uint_least8_t d1 = UINT8_C (0xff);
18163uint_least8_t d1max = UINT_LEAST8_MAX;
18164uint_least16_t d2 = UINT16_C (0xffff);
18165uint_least16_t d2max = UINT_LEAST16_MAX;
18166uint_least32_t d3 = UINT32_C (0xffffffff);
18167uint_least32_t d3max = UINT_LEAST32_MAX;
18168uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
18169uint_least64_t d4max = UINT_LEAST64_MAX;
18170int_fast8_t e1 = INT_FAST8_MAX;
18171int_fast8_t e1min = INT_FAST8_MIN;
18172int_fast16_t e2 = INT_FAST16_MAX;
18173int_fast16_t e2min = INT_FAST16_MIN;
18174int_fast32_t e3 = INT_FAST32_MAX;
18175int_fast32_t e3min = INT_FAST32_MIN;
18176int_fast64_t e4 = INT_FAST64_MAX;
18177int_fast64_t e4min = INT_FAST64_MIN;
18178uint_fast8_t f1 = UINT_FAST8_MAX;
18179uint_fast16_t f2 = UINT_FAST16_MAX;
18180uint_fast32_t f3 = UINT_FAST32_MAX;
18181uint_fast64_t f4 = UINT_FAST64_MAX;
18182#ifdef INTPTR_MAX
18183intptr_t g = INTPTR_MAX;
18184intptr_t gmin = INTPTR_MIN;
18185#endif
18186#ifdef UINTPTR_MAX
18187uintptr_t h = UINTPTR_MAX;
18188#endif
18189intmax_t i = INTMAX_MAX;
18190uintmax_t j = UINTMAX_MAX;
5fa4ac76 18191
5476a9a4
GM
18192#include <limits.h> /* for CHAR_BIT */
18193#define TYPE_MINIMUM(t) \
18194 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
18195#define TYPE_MAXIMUM(t) \
18196 ((t) ((t) 0 < (t) -1 \
18197 ? (t) -1 \
18198 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
18199struct s {
18200 int check_PTRDIFF:
18201 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
18202 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
18203 ? 1 : -1;
18204 /* Detect bug in FreeBSD 6.0 / ia64. */
18205 int check_SIG_ATOMIC:
18206 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
18207 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
18208 ? 1 : -1;
18209 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
18210 int check_WCHAR:
18211 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
18212 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
18213 ? 1 : -1;
18214 /* Detect bug in mingw. */
18215 int check_WINT:
18216 WINT_MIN == TYPE_MINIMUM (wint_t)
18217 && WINT_MAX == TYPE_MAXIMUM (wint_t)
18218 ? 1 : -1;
5fa4ac76 18219
5476a9a4
GM
18220 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
18221 int check_UINT8_C:
18222 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
18223 int check_UINT16_C:
18224 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
18225
18226 /* Detect bugs in OpenBSD 3.9 stdint.h. */
18227#ifdef UINT8_MAX
18228 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 18229#endif
5476a9a4
GM
18230#ifdef UINT16_MAX
18231 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
18232#endif
18233#ifdef UINT32_MAX
18234 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
18235#endif
18236#ifdef UINT64_MAX
18237 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
18238#endif
18239 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
18240 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
18241 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
18242 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
18243 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
18244 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
18245 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
18246 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
18247 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
18248 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
18249 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
18250};
18251
f199cab1
GM
18252int
18253main ()
18254{
5476a9a4 18255
f199cab1
GM
18256 ;
18257 return 0;
18258}
18259_ACEOF
5476a9a4
GM
18260if ac_fn_c_try_compile "$LINENO"; then :
18261 if test "$cross_compiling" = yes; then :
18262 gl_cv_header_working_stdint_h=yes
40e27e7f 18263
5476a9a4
GM
18264else
18265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18266/* end confdefs.h. */
40e27e7f 18267
f199cab1 18268
5476a9a4
GM
18269#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
18270#include <stdint.h>
f199cab1
GM
18271
18272
5476a9a4
GM
18273 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18274 included before <wchar.h>. */
18275 #include <stddef.h>
18276 #include <signal.h>
18277 #if HAVE_WCHAR_H
18278 # include <stdio.h>
18279 # include <time.h>
18280 # include <wchar.h>
18281 #endif
f199cab1 18282
d87ffdb7 18283
5476a9a4
GM
18284#include <stdio.h>
18285#include <string.h>
18286#define MVAL(macro) MVAL1(macro)
18287#define MVAL1(expression) #expression
18288static const char *macro_values[] =
18289 {
18290#ifdef INT8_MAX
18291 MVAL (INT8_MAX),
18292#endif
18293#ifdef INT16_MAX
18294 MVAL (INT16_MAX),
18295#endif
18296#ifdef INT32_MAX
18297 MVAL (INT32_MAX),
18298#endif
18299#ifdef INT64_MAX
18300 MVAL (INT64_MAX),
18301#endif
18302#ifdef UINT8_MAX
18303 MVAL (UINT8_MAX),
18304#endif
18305#ifdef UINT16_MAX
18306 MVAL (UINT16_MAX),
18307#endif
18308#ifdef UINT32_MAX
18309 MVAL (UINT32_MAX),
18310#endif
18311#ifdef UINT64_MAX
18312 MVAL (UINT64_MAX),
18313#endif
18314 NULL
18315 };
f199cab1 18316
3e0be4ab
GM
18317int
18318main ()
18319{
5476a9a4
GM
18320
18321 const char **mv;
18322 for (mv = macro_values; *mv != NULL; mv++)
18323 {
18324 const char *value = *mv;
18325 /* Test whether it looks like a cast expression. */
18326 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
18327 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
18328 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
18329 || strncmp (value, "((int)"/*)*/, 6) == 0
18330 || strncmp (value, "((signed short)"/*)*/, 15) == 0
18331 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
18332 return mv - macro_values + 1;
18333 }
3e0be4ab 18334 return 0;
5476a9a4 18335
f199cab1
GM
18336 ;
18337 return 0;
18338}
18339_ACEOF
5476a9a4
GM
18340if ac_fn_c_try_run "$LINENO"; then :
18341 gl_cv_header_working_stdint_h=yes
f199cab1 18342fi
5476a9a4
GM
18343rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18344 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
18345fi
18346
d87ffdb7 18347
5476a9a4
GM
18348fi
18349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 18350
5476a9a4
GM
18351fi
18352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
18353$as_echo "$gl_cv_header_working_stdint_h" >&6; }
18354 fi
18355 if test "$gl_cv_header_working_stdint_h" = yes; then
18356 STDINT_H=
18357 else
18358 for ac_header in sys/inttypes.h sys/bitypes.h
18359do :
18360 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18361ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18362eval as_val=\$$as_ac_Header
18363 if test "x$as_val" = x""yes; then :
18364 cat >>confdefs.h <<_ACEOF
18365#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18366_ACEOF
d87ffdb7 18367
5476a9a4 18368fi
d87ffdb7 18369
5476a9a4 18370done
7d2a1c5e 18371
5476a9a4
GM
18372 if test $ac_cv_header_sys_inttypes_h = yes; then
18373 HAVE_SYS_INTTYPES_H=1
18374 else
18375 HAVE_SYS_INTTYPES_H=0
18376 fi
7d2a1c5e 18377
5476a9a4
GM
18378 if test $ac_cv_header_sys_bitypes_h = yes; then
18379 HAVE_SYS_BITYPES_H=1
18380 else
18381 HAVE_SYS_BITYPES_H=0
18382 fi
7d2a1c5e 18383
f199cab1
GM
18384
18385
18386
5476a9a4 18387 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
18388
18389
5476a9a4
GM
18390 for gltype in ptrdiff_t size_t ; do
18391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18392$as_echo_n "checking for bit size of $gltype... " >&6; }
18393if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18394 $as_echo_n "(cached) " >&6
18395else
18396 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18397 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18398 included before <wchar.h>. */
18399 #include <stddef.h>
18400 #include <signal.h>
18401 #if HAVE_WCHAR_H
18402 # include <stdio.h>
18403 # include <time.h>
18404 # include <wchar.h>
18405 #endif
f199cab1 18406
5476a9a4 18407#include <limits.h>"; then :
f199cab1 18408
5476a9a4
GM
18409else
18410 result=unknown
18411fi
f199cab1 18412
5476a9a4 18413 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 18414
5476a9a4
GM
18415fi
18416eval ac_res=\$gl_cv_bitsizeof_${gltype}
18417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18418$as_echo "$ac_res" >&6; }
18419 eval result=\$gl_cv_bitsizeof_${gltype}
18420 if test $result = unknown; then
18421 result=0
18422 fi
18423 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18424 cat >>confdefs.h <<_ACEOF
18425#define BITSIZEOF_${GLTYPE} $result
18426_ACEOF
f199cab1 18427
5476a9a4
GM
18428 eval BITSIZEOF_${GLTYPE}=\$result
18429 done
f199cab1
GM
18430
18431
5476a9a4 18432 fi
f199cab1
GM
18433
18434
5476a9a4
GM
18435 for gltype in sig_atomic_t wchar_t wint_t ; do
18436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18437$as_echo_n "checking for bit size of $gltype... " >&6; }
18438if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18439 $as_echo_n "(cached) " >&6
18440else
18441 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18442 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18443 included before <wchar.h>. */
18444 #include <stddef.h>
18445 #include <signal.h>
18446 #if HAVE_WCHAR_H
18447 # include <stdio.h>
18448 # include <time.h>
18449 # include <wchar.h>
18450 #endif
f199cab1 18451
5476a9a4 18452#include <limits.h>"; then :
f199cab1 18453
f199cab1 18454else
5476a9a4 18455 result=unknown
7d2a1c5e 18456fi
7d2a1c5e 18457
5476a9a4 18458 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 18459
3e0be4ab 18460fi
5476a9a4
GM
18461eval ac_res=\$gl_cv_bitsizeof_${gltype}
18462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18463$as_echo "$ac_res" >&6; }
18464 eval result=\$gl_cv_bitsizeof_${gltype}
18465 if test $result = unknown; then
18466 result=0
18467 fi
18468 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18469 cat >>confdefs.h <<_ACEOF
18470#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 18471_ACEOF
7d2a1c5e 18472
5476a9a4
GM
18473 eval BITSIZEOF_${GLTYPE}=\$result
18474 done
7d2a1c5e
GM
18475
18476
5476a9a4
GM
18477
18478
18479 for gltype in sig_atomic_t wchar_t wint_t ; do
18480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18481$as_echo_n "checking whether $gltype is signed... " >&6; }
18482if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
18483 $as_echo_n "(cached) " >&6
18484else
f199cab1
GM
18485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18486/* end confdefs.h. */
f199cab1 18487
5476a9a4
GM
18488 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18489 included before <wchar.h>. */
18490 #include <stddef.h>
18491 #include <signal.h>
18492 #if HAVE_WCHAR_H
18493 # include <stdio.h>
18494 # include <time.h>
18495 # include <wchar.h>
18496 #endif
18497
18498 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
18499int
18500main ()
18501{
5476a9a4 18502
f199cab1
GM
18503 ;
18504 return 0;
18505}
18506_ACEOF
18507if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18508 result=yes
f199cab1 18509else
5476a9a4 18510 result=no
f199cab1
GM
18511fi
18512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 18513 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 18514
3e0be4ab 18515fi
5476a9a4
GM
18516eval ac_res=\$gl_cv_type_${gltype}_signed
18517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18518$as_echo "$ac_res" >&6; }
18519 eval result=\$gl_cv_type_${gltype}_signed
18520 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18521 if test "$result" = yes; then
18522 cat >>confdefs.h <<_ACEOF
18523#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 18524_ACEOF
d87ffdb7 18525
5476a9a4
GM
18526 eval HAVE_SIGNED_${GLTYPE}=1
18527 else
18528 eval HAVE_SIGNED_${GLTYPE}=0
18529 fi
18530 done
f199cab1 18531
e275c824 18532
5476a9a4
GM
18533 gl_cv_type_ptrdiff_t_signed=yes
18534 gl_cv_type_size_t_signed=no
18535 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 18536
e275c824 18537
5476a9a4
GM
18538 for gltype in ptrdiff_t size_t ; do
18539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18540$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18541if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
18542 $as_echo_n "(cached) " >&6
18543else
5476a9a4
GM
18544 eval gl_cv_type_${gltype}_suffix=no
18545 eval result=\$gl_cv_type_${gltype}_signed
18546 if test "$result" = yes; then
18547 glsufu=
18548 else
18549 glsufu=u
18550 fi
18551 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18552 case $glsuf in
18553 '') gltype1='int';;
18554 l) gltype1='long int';;
18555 ll) gltype1='long long int';;
18556 i64) gltype1='__int64';;
18557 u) gltype1='unsigned int';;
18558 ul) gltype1='unsigned long int';;
18559 ull) gltype1='unsigned long long int';;
18560 ui64)gltype1='unsigned __int64';;
18561 esac
18562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18563/* end confdefs.h. */
16c3e636 18564
5476a9a4
GM
18565 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18566 included before <wchar.h>. */
18567 #include <stddef.h>
18568 #include <signal.h>
18569 #if HAVE_WCHAR_H
18570 # include <stdio.h>
18571 # include <time.h>
18572 # include <wchar.h>
18573 #endif
1f5d53eb 18574
5476a9a4
GM
18575 extern $gltype foo;
18576 extern $gltype1 foo;
f199cab1
GM
18577int
18578main ()
18579{
5476a9a4 18580
f199cab1
GM
18581 ;
18582 return 0;
18583}
18584_ACEOF
18585if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18586 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
18587fi
18588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18589 eval result=\$gl_cv_type_${gltype}_suffix
18590 test "$result" != no && break
18591 done
f199cab1 18592fi
5476a9a4
GM
18593eval ac_res=\$gl_cv_type_${gltype}_suffix
18594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18595$as_echo "$ac_res" >&6; }
18596 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18597 eval result=\$gl_cv_type_${gltype}_suffix
18598 test "$result" = no && result=
18599 eval ${GLTYPE}_SUFFIX=\$result
18600 cat >>confdefs.h <<_ACEOF
18601#define ${GLTYPE}_SUFFIX $result
18602_ACEOF
16c3e636 18603
5476a9a4 18604 done
16c3e636 18605
3e0be4ab 18606
5476a9a4
GM
18607 fi
18608
18609
18610 for gltype in sig_atomic_t wchar_t wint_t ; do
18611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18612$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18613if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
18614 $as_echo_n "(cached) " >&6
18615else
5476a9a4
GM
18616 eval gl_cv_type_${gltype}_suffix=no
18617 eval result=\$gl_cv_type_${gltype}_signed
18618 if test "$result" = yes; then
18619 glsufu=
18620 else
18621 glsufu=u
18622 fi
18623 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18624 case $glsuf in
18625 '') gltype1='int';;
18626 l) gltype1='long int';;
18627 ll) gltype1='long long int';;
18628 i64) gltype1='__int64';;
18629 u) gltype1='unsigned int';;
18630 ul) gltype1='unsigned long int';;
18631 ull) gltype1='unsigned long long int';;
18632 ui64)gltype1='unsigned __int64';;
18633 esac
18634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 18635/* end confdefs.h. */
5476a9a4
GM
18636
18637 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18638 included before <wchar.h>. */
18639 #include <stddef.h>
18640 #include <signal.h>
18641 #if HAVE_WCHAR_H
18642 # include <stdio.h>
18643 # include <time.h>
18644 # include <wchar.h>
18645 #endif
18646
18647 extern $gltype foo;
18648 extern $gltype1 foo;
1fd182f0
PE
18649int
18650main ()
18651{
5476a9a4 18652
1fd182f0
PE
18653 ;
18654 return 0;
18655}
18656_ACEOF
3e0be4ab 18657if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18658 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 18659fi
3e0be4ab 18660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18661 eval result=\$gl_cv_type_${gltype}_suffix
18662 test "$result" != no && break
18663 done
f199cab1 18664fi
5476a9a4
GM
18665eval ac_res=\$gl_cv_type_${gltype}_suffix
18666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18667$as_echo "$ac_res" >&6; }
18668 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18669 eval result=\$gl_cv_type_${gltype}_suffix
18670 test "$result" = no && result=
18671 eval ${GLTYPE}_SUFFIX=\$result
18672 cat >>confdefs.h <<_ACEOF
18673#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
18674_ACEOF
18675
5476a9a4 18676 done
f199cab1 18677
f199cab1 18678
f199cab1 18679
5476a9a4
GM
18680 if test $BITSIZEOF_WINT_T -lt 32; then
18681 BITSIZEOF_WINT_T=32
18682 fi
f199cab1 18683
5476a9a4
GM
18684 STDINT_H=stdint.h
18685 fi
f199cab1 18686
5476a9a4
GM
18687 if test -n "$STDINT_H"; then
18688 GL_GENERATE_STDINT_H_TRUE=
18689 GL_GENERATE_STDINT_H_FALSE='#'
18690else
18691 GL_GENERATE_STDINT_H_TRUE='#'
18692 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
18693fi
18694
f199cab1 18695
f199cab1 18696
3e0be4ab 18697
f199cab1 18698
5476a9a4
GM
18699 GNULIB_IMAXABS=0;
18700 GNULIB_IMAXDIV=0;
18701 GNULIB_STRTOIMAX=0;
18702 GNULIB_STRTOUMAX=0;
18703 HAVE_DECL_IMAXABS=1;
18704 HAVE_DECL_IMAXDIV=1;
18705 HAVE_DECL_STRTOIMAX=1;
18706 HAVE_DECL_STRTOUMAX=1;
18707 REPLACE_STRTOIMAX=0;
18708 INT32_MAX_LT_INTMAX_MAX=1;
18709 INT64_MAX_EQ_LONG_MAX='defined _LP64';
18710 PRI_MACROS_BROKEN=0;
18711 PRIPTR_PREFIX=__PRIPTR_PREFIX;
18712 UINT32_MAX_LT_UINTMAX_MAX=1;
18713 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 18714
1fd182f0 18715
1f5d53eb 18716
3e0be4ab
GM
18717
18718
1fd182f0 18719
3e0be4ab 18720
3e0be4ab 18721
f199cab1 18722
1fd182f0 18723
1f5d53eb 18724
1f5d53eb 18725
1f5d53eb 18726
3e0be4ab 18727
3e0be4ab 18728
5476a9a4
GM
18729 if test $gl_cv_have_include_next = yes; then
18730 gl_cv_next_inttypes_h='<'inttypes.h'>'
18731 else
18732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
18733$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
18734if test "${gl_cv_next_inttypes_h+set}" = set; then :
18735 $as_echo_n "(cached) " >&6
f199cab1 18736else
2b1928b8 18737
5476a9a4 18738 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
18739
18740
5476a9a4 18741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18742/* end confdefs.h. */
5476a9a4 18743#include <inttypes.h>
3e0be4ab 18744
f199cab1 18745_ACEOF
5476a9a4
GM
18746 case "$host_os" in
18747 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18748 *) gl_absname_cpp="$ac_cpp" ;;
18749 esac
1fd182f0 18750
5476a9a4
GM
18751 case "$host_os" in
18752 mingw*)
18753 gl_dirsep_regex='[/\\]'
18754 ;;
18755 *)
18756 gl_dirsep_regex='\/'
18757 ;;
18758 esac
18759 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 18760
5476a9a4
GM
18761 gl_header_literal_regex=`echo 'inttypes.h' \
18762 | sed -e "$gl_make_literal_regex_sed"`
18763 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18764 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18765 s|^/[^/]|//&|
18766 p
18767 q
18768 }'
18769 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18770 sed -n "$gl_absolute_header_sed"`'"'
18771 else
18772 gl_cv_next_inttypes_h='<'inttypes.h'>'
18773 fi
1fd182f0
PE
18774
18775
5476a9a4
GM
18776fi
18777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
18778$as_echo "$gl_cv_next_inttypes_h" >&6; }
18779 fi
18780 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 18781
5476a9a4
GM
18782 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18783 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18784 gl_next_as_first_directive='<'inttypes.h'>'
18785 else
18786 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18787 gl_next_as_first_directive=$gl_cv_next_inttypes_h
18788 fi
18789 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
18790
18791
3e0be4ab 18792
34119902 18793
3e0be4ab 18794
34119902 18795
b0415a03 18796
b0415a03 18797
3e0be4ab 18798
34119902 18799
34119902 18800
5476a9a4
GM
18801 case "$host_os" in
18802 mingw*)
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
18804$as_echo_n "checking for 64-bit off_t... " >&6; }
18805if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
18806 $as_echo_n "(cached) " >&6
18807else
5476a9a4
GM
18808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18809/* end confdefs.h. */
18810#include <sys/types.h>
18811 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
18812
18813int
18814main ()
18815{
18816
18817 ;
18818 return 0;
18819}
f199cab1 18820_ACEOF
5476a9a4
GM
18821if ac_fn_c_try_compile "$LINENO"; then :
18822 gl_cv_type_off_t_64=yes
18823else
18824 gl_cv_type_off_t_64=no
f199cab1 18825fi
5476a9a4 18826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 18827
5476a9a4
GM
18828fi
18829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
18830$as_echo "$gl_cv_type_off_t_64" >&6; }
18831 if test $gl_cv_type_off_t_64 = no; then
18832 WINDOWS_64_BIT_OFF_T=1
18833 else
18834 WINDOWS_64_BIT_OFF_T=0
18835 fi
18836 WINDOWS_64_BIT_ST_SIZE=1
18837 ;;
18838 *)
18839 WINDOWS_64_BIT_OFF_T=0
18840 WINDOWS_64_BIT_ST_SIZE=0
18841 ;;
18842 esac
34119902
GM
18843
18844
5476a9a4
GM
18845 GNULIB_FCHMODAT=0;
18846 GNULIB_FSTAT=0;
18847 GNULIB_FSTATAT=0;
18848 GNULIB_FUTIMENS=0;
18849 GNULIB_LCHMOD=0;
18850 GNULIB_LSTAT=0;
18851 GNULIB_MKDIRAT=0;
18852 GNULIB_MKFIFO=0;
18853 GNULIB_MKFIFOAT=0;
18854 GNULIB_MKNOD=0;
18855 GNULIB_MKNODAT=0;
18856 GNULIB_STAT=0;
18857 GNULIB_UTIMENSAT=0;
18858 HAVE_FCHMODAT=1;
18859 HAVE_FSTATAT=1;
18860 HAVE_FUTIMENS=1;
18861 HAVE_LCHMOD=1;
18862 HAVE_LSTAT=1;
18863 HAVE_MKDIRAT=1;
18864 HAVE_MKFIFO=1;
18865 HAVE_MKFIFOAT=1;
18866 HAVE_MKNOD=1;
18867 HAVE_MKNODAT=1;
18868 HAVE_UTIMENSAT=1;
18869 REPLACE_FSTAT=0;
18870 REPLACE_FSTATAT=0;
18871 REPLACE_FUTIMENS=0;
18872 REPLACE_LSTAT=0;
18873 REPLACE_MKDIR=0;
18874 REPLACE_MKFIFO=0;
18875 REPLACE_MKNOD=0;
18876 REPLACE_STAT=0;
18877 REPLACE_UTIMENSAT=0;
34119902
GM
18878
18879
18880
18881
5476a9a4
GM
18882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18883$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18884if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18885 $as_echo_n "(cached) " >&6
f199cab1 18886else
5476a9a4
GM
18887 rm -f conftest.sym conftest.file
18888 echo >conftest.file
18889 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18890 if test "$cross_compiling" = yes; then :
18891 case "$host_os" in
18892 # Guess yes on glibc systems.
18893 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18894 # If we don't know, assume the worst.
18895 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18896 esac
34119902 18897
5476a9a4 18898else
f199cab1
GM
18899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18900/* end confdefs.h. */
5476a9a4 18901$ac_includes_default
0eb775a3
GM
18902int
18903main ()
18904{
5476a9a4
GM
18905struct stat sbuf;
18906 /* Linux will dereference the symlink and fail, as required by
18907 POSIX. That is better in the sense that it means we will not
18908 have to compile and use the lstat wrapper. */
18909 return lstat ("conftest.sym/", &sbuf) == 0;
18910
0eb775a3
GM
18911 ;
18912 return 0;
18913}
18914_ACEOF
5476a9a4
GM
18915if ac_fn_c_try_run "$LINENO"; then :
18916 gl_cv_func_lstat_dereferences_slashed_symlink=yes
0eb775a3 18917else
5476a9a4
GM
18918 gl_cv_func_lstat_dereferences_slashed_symlink=no
18919fi
18920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18921 conftest.$ac_objext conftest.beam conftest.$ac_ext
0eb775a3 18922fi
0eb775a3 18923
5476a9a4
GM
18924 else
18925 # If the 'ln -s' command failed, then we probably don't even
18926 # have an lstat function.
18927 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18928 fi
18929 rm -f conftest.sym conftest.file
18930
0eb775a3 18931fi
5476a9a4
GM
18932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18933$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18934 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18935 *yes)
18936
18937cat >>confdefs.h <<_ACEOF
18938#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18939_ACEOF
18940
18941 ;;
0eb775a3 18942 esac
34119902
GM
18943
18944
5476a9a4
GM
18945 GNULIB_MKTIME=0;
18946 GNULIB_NANOSLEEP=0;
18947 GNULIB_STRPTIME=0;
18948 GNULIB_TIMEGM=0;
18949 GNULIB_TIME_R=0;
18950 HAVE_DECL_LOCALTIME_R=1;
18951 HAVE_NANOSLEEP=1;
18952 HAVE_STRPTIME=1;
18953 HAVE_TIMEGM=1;
18954 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
18955 REPLACE_MKTIME=GNULIB_PORTCHECK;
18956 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
18957 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 18958
3e0be4ab
GM
18959
18960
18961
5476a9a4
GM
18962 GNULIB_PSELECT=0;
18963 GNULIB_SELECT=0;
18964 HAVE_PSELECT=1;
18965 REPLACE_PSELECT=0;
18966 REPLACE_SELECT=0;
18967
18968
3e0be4ab 18969
5476a9a4
GM
18970
18971
18972
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
18974$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
18975if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 18976 $as_echo_n "(cached) " >&6
3e0be4ab 18977else
5476a9a4
GM
18978
18979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18980/* end confdefs.h. */
5476a9a4 18981#include <sys/select.h>
3e0be4ab
GM
18982int
18983main ()
18984{
5476a9a4 18985struct timeval b;
3e0be4ab
GM
18986 ;
18987 return 0;
18988}
34119902 18989_ACEOF
f199cab1 18990if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18991 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 18992else
5476a9a4 18993 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 18994fi
f199cab1 18995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18996 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
18997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18998/* end confdefs.h. */
18999#include <sys/select.h>
19000int
19001main ()
19002{
19003int memset; int bzero;
19004 ;
19005 return 0;
19006}
3e0be4ab 19007
5476a9a4
GM
19008_ACEOF
19009if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
19010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19011/* end confdefs.h. */
5476a9a4 19012#include <sys/select.h>
f199cab1
GM
19013int
19014main ()
19015{
5476a9a4
GM
19016
19017 #undef memset
19018 #define memset nonexistent_memset
19019 extern
19020 #ifdef __cplusplus
19021 "C"
19022 #endif
19023 void *memset (void *, int, unsigned long);
19024 #undef bzero
19025 #define bzero nonexistent_bzero
19026 extern
19027 #ifdef __cplusplus
19028 "C"
19029 #endif
19030 void bzero (void *, unsigned long);
19031 fd_set fds;
19032 FD_ZERO (&fds);
19033
f199cab1
GM
19034 ;
19035 return 0;
19036}
5476a9a4 19037
f199cab1 19038_ACEOF
5476a9a4
GM
19039if ac_fn_c_try_link "$LINENO"; then :
19040
f199cab1 19041else
5476a9a4 19042 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 19043fi
5476a9a4
GM
19044rm -f core conftest.err conftest.$ac_objext \
19045 conftest$ac_exeext conftest.$ac_ext
1fd182f0 19046
f199cab1 19047fi
5476a9a4
GM
19048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19049 fi
1fd182f0 19050
f199cab1 19051fi
5476a9a4
GM
19052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19053$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
19054
19055
b06b1098 19056
0eb775a3
GM
19057
19058
b06b1098 19059
1fd182f0 19060
1fd182f0 19061
5476a9a4
GM
19062
19063 if test $gl_cv_have_include_next = yes; then
19064 gl_cv_next_sys_select_h='<'sys/select.h'>'
19065 else
19066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19067$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19068if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 19069 $as_echo_n "(cached) " >&6
3e0be4ab 19070else
1fd182f0 19071
5476a9a4
GM
19072 if test $ac_cv_header_sys_select_h = yes; then
19073
19074
19075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19076/* end confdefs.h. */
19077#include <sys/select.h>
19078
19079_ACEOF
19080 case "$host_os" in
19081 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19082 *) gl_absname_cpp="$ac_cpp" ;;
19083 esac
19084
19085 case "$host_os" in
19086 mingw*)
19087 gl_dirsep_regex='[/\\]'
19088 ;;
19089 *)
19090 gl_dirsep_regex='\/'
19091 ;;
19092 esac
19093 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19094
19095 gl_header_literal_regex=`echo 'sys/select.h' \
19096 | sed -e "$gl_make_literal_regex_sed"`
19097 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19098 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19099 s|^/[^/]|//&|
19100 p
19101 q
19102 }'
19103 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19104 sed -n "$gl_absolute_header_sed"`'"'
19105 else
19106 gl_cv_next_sys_select_h='<'sys/select.h'>'
19107 fi
1fd182f0 19108
3e0be4ab 19109
1f5d53eb 19110fi
5476a9a4
GM
19111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19112$as_echo "$gl_cv_next_sys_select_h" >&6; }
19113 fi
19114 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 19115
5476a9a4
GM
19116 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19117 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19118 gl_next_as_first_directive='<'sys/select.h'>'
19119 else
19120 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19121 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19122 fi
19123 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
19124
19125
5476a9a4
GM
19126
19127
19128 if test $ac_cv_header_sys_select_h = yes; then
19129 HAVE_SYS_SELECT_H=1
19130 else
19131 HAVE_SYS_SELECT_H=0
19132 fi
19133
19134
19135
19136
19137
19138 if test $ac_cv_header_sys_socket_h != yes; then
19139 for ac_header in winsock2.h
19140do :
19141 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19142if test "x$ac_cv_header_winsock2_h" = x""yes; then :
19143 cat >>confdefs.h <<_ACEOF
19144#define HAVE_WINSOCK2_H 1
f199cab1 19145_ACEOF
5476a9a4 19146
f199cab1 19147fi
3e0be4ab 19148
5476a9a4 19149done
3e0be4ab 19150
5476a9a4
GM
19151 fi
19152 if test "$ac_cv_header_winsock2_h" = yes; then
19153 HAVE_WINSOCK2_H=1
19154 UNISTD_H_HAVE_WINSOCK2_H=1
19155 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19156 else
19157 HAVE_WINSOCK2_H=0
19158 fi
f199cab1 19159
f199cab1 19160
f199cab1 19161
f199cab1 19162
3e0be4ab 19163
3e0be4ab 19164
3e0be4ab 19165
3e0be4ab 19166
5476a9a4
GM
19167 GNULIB_PTHREAD_SIGMASK=0;
19168 GNULIB_RAISE=0;
19169 GNULIB_SIGNAL_H_SIGPIPE=0;
19170 GNULIB_SIGPROCMASK=0;
19171 GNULIB_SIGACTION=0;
19172 HAVE_POSIX_SIGNALBLOCKING=1;
19173 HAVE_PTHREAD_SIGMASK=1;
19174 HAVE_RAISE=1;
19175 HAVE_SIGSET_T=1;
19176 HAVE_SIGINFO_T=1;
19177 HAVE_SIGACTION=1;
19178 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
19179
19180 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 19181
5476a9a4
GM
19182 HAVE_SIGHANDLER_T=1;
19183 REPLACE_PTHREAD_SIGMASK=0;
19184 REPLACE_RAISE=0;
1f5d53eb 19185
1fd182f0 19186
b06b1098 19187
1fd182f0 19188
3e0be4ab
GM
19189
19190
5476a9a4
GM
19191 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
19192 #include <signal.h>
19193 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
19194 #include <sys/types.h>
19195
19196"
19197if test "x$ac_cv_type_sigset_t" = x""yes; then :
19198
19199cat >>confdefs.h <<_ACEOF
19200#define HAVE_SIGSET_T 1
f199cab1 19201_ACEOF
3e0be4ab 19202
5476a9a4
GM
19203gl_cv_type_sigset_t=yes
19204else
19205 gl_cv_type_sigset_t=no
f199cab1 19206fi
3e0be4ab 19207
5476a9a4
GM
19208 if test $gl_cv_type_sigset_t != yes; then
19209 HAVE_SIGSET_T=0
19210 fi
3e0be4ab 19211
1f5d53eb 19212
3e0be4ab 19213
5476a9a4
GM
19214 if test $ac_cv_header_sys_socket_h = no; then
19215 for ac_header in ws2tcpip.h
19216do :
19217 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
19218if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
19219 cat >>confdefs.h <<_ACEOF
19220#define HAVE_WS2TCPIP_H 1
19221_ACEOF
3e0be4ab 19222
5476a9a4 19223fi
3e0be4ab 19224
5476a9a4
GM
19225done
19226
19227 fi
19228
19229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
19230$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
19231if test "${ac_cv_header_stdbool_h+set}" = set; then :
19232 $as_echo_n "(cached) " >&6
19233else
19234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19235/* end confdefs.h. */
1f5d53eb 19236
5476a9a4
GM
19237 #include <stdbool.h>
19238 #ifndef bool
19239 "error: bool is not defined"
19240 #endif
19241 #ifndef false
19242 "error: false is not defined"
19243 #endif
19244 #if false
19245 "error: false is not 0"
19246 #endif
19247 #ifndef true
19248 "error: true is not defined"
19249 #endif
19250 #if true != 1
19251 "error: true is not 1"
19252 #endif
19253 #ifndef __bool_true_false_are_defined
19254 "error: __bool_true_false_are_defined is not defined"
19255 #endif
19256
19257 struct s { _Bool s: 1; _Bool t; } s;
19258
19259 char a[true == 1 ? 1 : -1];
19260 char b[false == 0 ? 1 : -1];
19261 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
19262 char d[(bool) 0.5 == true ? 1 : -1];
19263 /* See body of main program for 'e'. */
19264 char f[(_Bool) 0.0 == false ? 1 : -1];
19265 char g[true];
19266 char h[sizeof (_Bool)];
19267 char i[sizeof s.t];
19268 enum { j = false, k = true, l = false * true, m = true * 256 };
19269 /* The following fails for
19270 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
19271 _Bool n[m];
19272 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
19273 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
19274 /* Catch a bug in an HP-UX C compiler. See
19275 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
19276 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
19277 */
19278 _Bool q = true;
19279 _Bool *pq = &q;
1ebc9c87
GM
19280
19281int
19282main ()
19283{
f199cab1 19284
5476a9a4
GM
19285 bool e = &s;
19286 *pq |= q;
19287 *pq |= ! q;
19288 /* Refer to every declared value, to avoid compiler optimizations. */
19289 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
19290 + !m + !n + !o + !p + !q + !pq);
f199cab1 19291
5476a9a4 19292 ;
1ebc9c87
GM
19293 return 0;
19294}
19295_ACEOF
5476a9a4
GM
19296if ac_fn_c_try_compile "$LINENO"; then :
19297 ac_cv_header_stdbool_h=yes
1ebc9c87 19298else
5476a9a4 19299 ac_cv_header_stdbool_h=no
1ebc9c87 19300fi
5476a9a4 19301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19302fi
5476a9a4
GM
19303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
19304$as_echo "$ac_cv_header_stdbool_h" >&6; }
19305 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
19306if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 19307
5476a9a4
GM
19308cat >>confdefs.h <<_ACEOF
19309#define HAVE__BOOL 1
19310_ACEOF
1ebc9c87 19311
1ebc9c87
GM
19312
19313fi
19314
1ebc9c87 19315
1ebc9c87 19316
5476a9a4
GM
19317 REPLACE_NULL=0;
19318 HAVE_WCHAR_T=1;
19319
19320
19321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
19322$as_echo_n "checking for wchar_t... " >&6; }
19323if test "${gt_cv_c_wchar_t+set}" = set; then :
19324 $as_echo_n "(cached) " >&6
19325else
19326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19327/* end confdefs.h. */
19328#include <stddef.h>
19329 wchar_t foo = (wchar_t)'\0';
19330int
19331main ()
19332{
19333
19334 ;
19335 return 0;
19336}
19337_ACEOF
19338if ac_fn_c_try_compile "$LINENO"; then :
19339 gt_cv_c_wchar_t=yes
19340else
19341 gt_cv_c_wchar_t=no
19342fi
19343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19344fi
5476a9a4
GM
19345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
19346$as_echo "$gt_cv_c_wchar_t" >&6; }
19347 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 19348
5476a9a4
GM
19349$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
19350
19351 fi
19352
19353
19354 GNULIB_DPRINTF=0;
19355 GNULIB_FCLOSE=0;
19356 GNULIB_FDOPEN=0;
19357 GNULIB_FFLUSH=0;
19358 GNULIB_FGETC=0;
19359 GNULIB_FGETS=0;
19360 GNULIB_FOPEN=0;
19361 GNULIB_FPRINTF=0;
19362 GNULIB_FPRINTF_POSIX=0;
19363 GNULIB_FPURGE=0;
19364 GNULIB_FPUTC=0;
19365 GNULIB_FPUTS=0;
19366 GNULIB_FREAD=0;
19367 GNULIB_FREOPEN=0;
19368 GNULIB_FSCANF=0;
19369 GNULIB_FSEEK=0;
19370 GNULIB_FSEEKO=0;
19371 GNULIB_FTELL=0;
19372 GNULIB_FTELLO=0;
19373 GNULIB_FWRITE=0;
19374 GNULIB_GETC=0;
19375 GNULIB_GETCHAR=0;
19376 GNULIB_GETDELIM=0;
19377 GNULIB_GETLINE=0;
19378 GNULIB_OBSTACK_PRINTF=0;
19379 GNULIB_OBSTACK_PRINTF_POSIX=0;
19380 GNULIB_PCLOSE=0;
19381 GNULIB_PERROR=0;
19382 GNULIB_POPEN=0;
19383 GNULIB_PRINTF=0;
19384 GNULIB_PRINTF_POSIX=0;
19385 GNULIB_PUTC=0;
19386 GNULIB_PUTCHAR=0;
19387 GNULIB_PUTS=0;
19388 GNULIB_REMOVE=0;
19389 GNULIB_RENAME=0;
19390 GNULIB_RENAMEAT=0;
19391 GNULIB_SCANF=0;
19392 GNULIB_SNPRINTF=0;
19393 GNULIB_SPRINTF_POSIX=0;
19394 GNULIB_STDIO_H_NONBLOCKING=0;
19395 GNULIB_STDIO_H_SIGPIPE=0;
19396 GNULIB_TMPFILE=0;
19397 GNULIB_VASPRINTF=0;
19398 GNULIB_VFSCANF=0;
19399 GNULIB_VSCANF=0;
19400 GNULIB_VDPRINTF=0;
19401 GNULIB_VFPRINTF=0;
19402 GNULIB_VFPRINTF_POSIX=0;
19403 GNULIB_VPRINTF=0;
19404 GNULIB_VPRINTF_POSIX=0;
19405 GNULIB_VSNPRINTF=0;
19406 GNULIB_VSPRINTF_POSIX=0;
19407 HAVE_DECL_FPURGE=1;
19408 HAVE_DECL_FSEEKO=1;
19409 HAVE_DECL_FTELLO=1;
19410 HAVE_DECL_GETDELIM=1;
19411 HAVE_DECL_GETLINE=1;
19412 HAVE_DECL_OBSTACK_PRINTF=1;
19413 HAVE_DECL_SNPRINTF=1;
19414 HAVE_DECL_VSNPRINTF=1;
19415 HAVE_DPRINTF=1;
19416 HAVE_FSEEKO=1;
19417 HAVE_FTELLO=1;
19418 HAVE_PCLOSE=1;
19419 HAVE_POPEN=1;
19420 HAVE_RENAMEAT=1;
19421 HAVE_VASPRINTF=1;
19422 HAVE_VDPRINTF=1;
19423 REPLACE_DPRINTF=0;
19424 REPLACE_FCLOSE=0;
19425 REPLACE_FDOPEN=0;
19426 REPLACE_FFLUSH=0;
19427 REPLACE_FOPEN=0;
19428 REPLACE_FPRINTF=0;
19429 REPLACE_FPURGE=0;
19430 REPLACE_FREOPEN=0;
19431 REPLACE_FSEEK=0;
19432 REPLACE_FSEEKO=0;
19433 REPLACE_FTELL=0;
19434 REPLACE_FTELLO=0;
19435 REPLACE_GETDELIM=0;
19436 REPLACE_GETLINE=0;
19437 REPLACE_OBSTACK_PRINTF=0;
19438 REPLACE_PERROR=0;
19439 REPLACE_POPEN=0;
19440 REPLACE_PRINTF=0;
19441 REPLACE_REMOVE=0;
19442 REPLACE_RENAME=0;
19443 REPLACE_RENAMEAT=0;
19444 REPLACE_SNPRINTF=0;
19445 REPLACE_SPRINTF=0;
19446 REPLACE_STDIO_READ_FUNCS=0;
19447 REPLACE_STDIO_WRITE_FUNCS=0;
19448 REPLACE_TMPFILE=0;
19449 REPLACE_VASPRINTF=0;
19450 REPLACE_VDPRINTF=0;
19451 REPLACE_VFPRINTF=0;
19452 REPLACE_VPRINTF=0;
19453 REPLACE_VSNPRINTF=0;
19454 REPLACE_VSPRINTF=0;
1ebc9c87 19455
5476a9a4
GM
19456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19457$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19458if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
19459 $as_echo_n "(cached) " >&6
19460else
5476a9a4 19461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 19462/* end confdefs.h. */
5476a9a4
GM
19463#include <sys/types.h>
19464#include <time.h>
1ebc9c87
GM
19465
19466int
19467main ()
19468{
5476a9a4
GM
19469struct tm tm;
19470 int *p = &tm.tm_sec;
19471 return !p;
1ebc9c87
GM
19472 ;
19473 return 0;
19474}
19475_ACEOF
5476a9a4
GM
19476if ac_fn_c_try_compile "$LINENO"; then :
19477 ac_cv_struct_tm=time.h
1ebc9c87 19478else
5476a9a4 19479 ac_cv_struct_tm=sys/time.h
1ebc9c87 19480fi
5476a9a4 19481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19482fi
5476a9a4
GM
19483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
19484$as_echo "$ac_cv_struct_tm" >&6; }
19485if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 19486
5476a9a4 19487$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 19488
1ebc9c87
GM
19489fi
19490
5476a9a4
GM
19491ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
19492#include <$ac_cv_struct_tm>
1fd182f0 19493
5476a9a4
GM
19494"
19495if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 19496
5476a9a4
GM
19497cat >>confdefs.h <<_ACEOF
19498#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 19499_ACEOF
5476a9a4
GM
19500
19501
1f5d53eb 19502fi
1fd182f0 19503
5476a9a4 19504if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 19505
5476a9a4 19506$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 19507
5476a9a4
GM
19508else
19509 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
19510"
19511if test "x$ac_cv_have_decl_tzname" = x""yes; then :
19512 ac_have_decl=1
19513else
19514 ac_have_decl=0
19515fi
1fd182f0 19516
5476a9a4
GM
19517cat >>confdefs.h <<_ACEOF
19518#define HAVE_DECL_TZNAME $ac_have_decl
19519_ACEOF
f199cab1 19520
5476a9a4
GM
19521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
19522$as_echo_n "checking for tzname... " >&6; }
19523if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 19524 $as_echo_n "(cached) " >&6
3e0be4ab 19525else
5476a9a4 19526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19527/* end confdefs.h. */
5476a9a4
GM
19528#include <time.h>
19529#if !HAVE_DECL_TZNAME
19530extern char *tzname[];
f199cab1 19531#endif
5476a9a4 19532
f199cab1
GM
19533int
19534main ()
19535{
5476a9a4 19536return tzname[0][0];
f199cab1
GM
19537 ;
19538 return 0;
19539}
3e0be4ab 19540_ACEOF
f199cab1 19541if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 19542 ac_cv_var_tzname=yes
3e0be4ab 19543else
5476a9a4 19544 ac_cv_var_tzname=no
f199cab1
GM
19545fi
19546rm -f core conftest.err conftest.$ac_objext \
19547 conftest$ac_exeext conftest.$ac_ext
f199cab1 19548fi
5476a9a4
GM
19549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
19550$as_echo "$ac_cv_var_tzname" >&6; }
19551 if test $ac_cv_var_tzname = yes; then
19552
19553$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 19554
5476a9a4 19555 fi
3e0be4ab 19556fi
cc322c06 19557
5476a9a4
GM
19558
19559 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
19560"
19561if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
19562
19563$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 19564
f199cab1 19565fi
cc322c06 19566
1f5d53eb 19567
e275c824 19568
5476a9a4
GM
19569
19570ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
19571if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
19572 ac_have_decl=1
3e0be4ab 19573else
5476a9a4 19574 ac_have_decl=0
3e0be4ab 19575fi
5476a9a4
GM
19576
19577cat >>confdefs.h <<_ACEOF
19578#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 19579_ACEOF
e275c824
PE
19580
19581
5476a9a4
GM
19582
19583ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
19584if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
19585 ac_have_decl=1
19586else
19587 ac_have_decl=0
3e0be4ab 19588fi
e275c824 19589
5476a9a4
GM
19590cat >>confdefs.h <<_ACEOF
19591#define HAVE_DECL_STRTOUMAX $ac_have_decl
19592_ACEOF
e275c824
PE
19593
19594
2b1928b8 19595
5476a9a4
GM
19596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
19597$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
19598if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 19599 $as_echo_n "(cached) " >&6
2b1928b8 19600else
5476a9a4
GM
19601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19602/* end confdefs.h. */
19603#include <sys/types.h>
19604#include <sys/stat.h>
2b1928b8 19605
5476a9a4
GM
19606#if defined S_ISBLK && defined S_IFDIR
19607extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
19608#endif
2b1928b8 19609
5476a9a4
GM
19610#if defined S_ISBLK && defined S_IFCHR
19611extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
19612#endif
0eb775a3 19613
5476a9a4
GM
19614#if defined S_ISLNK && defined S_IFREG
19615extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
19616#endif
19617
19618#if defined S_ISSOCK && defined S_IFREG
19619extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
19620#endif
0eb775a3 19621
5476a9a4
GM
19622_ACEOF
19623if ac_fn_c_try_compile "$LINENO"; then :
19624 ac_cv_header_stat_broken=no
f199cab1 19625else
5476a9a4 19626 ac_cv_header_stat_broken=yes
f199cab1 19627fi
5476a9a4 19628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19629fi
5476a9a4
GM
19630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
19631$as_echo "$ac_cv_header_stat_broken" >&6; }
19632if test $ac_cv_header_stat_broken = yes; then
0eb775a3 19633
5476a9a4 19634$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 19635
5476a9a4 19636fi
0eb775a3
GM
19637
19638
19639
5476a9a4
GM
19640ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
19641if test "x$ac_cv_type_mode_t" = x""yes; then :
f199cab1 19642
3e0be4ab 19643else
5476a9a4
GM
19644
19645cat >>confdefs.h <<_ACEOF
19646#define mode_t int
19647_ACEOF
19648
f199cab1 19649fi
5476a9a4
GM
19650
19651
19652
19653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19654$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
19655if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
19656 $as_echo_n "(cached) " >&6
19657else
19658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19659/* end confdefs.h. */
5476a9a4 19660#include <time.h>
52724a05 19661
3e0be4ab
GM
19662int
19663main ()
19664{
5476a9a4 19665static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19666 ;
19667 return 0;
19668}
19669_ACEOF
5476a9a4
GM
19670if ac_fn_c_try_compile "$LINENO"; then :
19671 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 19672else
5476a9a4 19673 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 19674fi
5476a9a4
GM
19675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19676fi
19677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
19678$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 19679
5476a9a4
GM
19680 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19681 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19682 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19683 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
19684 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19685 else
19686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19687$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
19688if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
19689 $as_echo_n "(cached) " >&6
19690else
3e0be4ab
GM
19691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19692/* end confdefs.h. */
5476a9a4
GM
19693#include <sys/time.h>
19694
3e0be4ab
GM
19695int
19696main ()
19697{
5476a9a4 19698static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19699 ;
19700 return 0;
19701}
19702_ACEOF
5476a9a4
GM
19703if ac_fn_c_try_compile "$LINENO"; then :
19704 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 19705else
5476a9a4 19706 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 19707fi
5476a9a4 19708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19709fi
5476a9a4
GM
19710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
19711$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
19712 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
19713 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
19714 else
19715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19716$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
19717if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
19718 $as_echo_n "(cached) " >&6
19719else
19720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19721/* end confdefs.h. */
5476a9a4
GM
19722#include <pthread.h>
19723
3e0be4ab
GM
19724int
19725main ()
19726{
5476a9a4 19727static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19728 ;
19729 return 0;
19730}
19731_ACEOF
5476a9a4
GM
19732if ac_fn_c_try_compile "$LINENO"; then :
19733 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 19734else
5476a9a4 19735 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 19736fi
5476a9a4 19737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 19738fi
5476a9a4
GM
19739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
19740$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
19741 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
19742 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
19743 fi
19744 fi
f199cab1 19745 fi
e275c824
PE
19746
19747
b0415a03 19748
b0415a03 19749
e275c824 19750
e275c824
PE
19751
19752
f199cab1 19753
e275c824
PE
19754
19755
19756
19757
19758
19759
19760
5476a9a4
GM
19761 if test $gl_cv_have_include_next = yes; then
19762 gl_cv_next_time_h='<'time.h'>'
19763 else
19764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
19765$as_echo_n "checking absolute name of <time.h>... " >&6; }
19766if test "${gl_cv_next_time_h+set}" = set; then :
19767 $as_echo_n "(cached) " >&6
19768else
e275c824 19769
5476a9a4
GM
19770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19771/* end confdefs.h. */
19772#include <time.h>
e275c824 19773
5476a9a4
GM
19774_ACEOF
19775 case "$host_os" in
19776 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19777 *) gl_absname_cpp="$ac_cpp" ;;
19778 esac
e275c824 19779
5476a9a4
GM
19780 case "$host_os" in
19781 mingw*)
19782 gl_dirsep_regex='[/\\]'
19783 ;;
19784 *)
19785 gl_dirsep_regex='\/'
19786 ;;
19787 esac
19788 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 19789
5476a9a4
GM
19790 gl_header_literal_regex=`echo 'time.h' \
19791 | sed -e "$gl_make_literal_regex_sed"`
19792 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19793 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19794 s|^/[^/]|//&|
19795 p
19796 q
19797 }'
19798 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19799 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
19800
19801
5476a9a4
GM
19802fi
19803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
19804$as_echo "$gl_cv_next_time_h" >&6; }
19805 fi
19806 NEXT_TIME_H=$gl_cv_next_time_h
67342916 19807
5476a9a4
GM
19808 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19809 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19810 gl_next_as_first_directive='<'time.h'>'
f199cab1 19811 else
5476a9a4
GM
19812 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19813 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 19814 fi
5476a9a4 19815 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
19816
19817
52724a05
GM
19818
19819
19820
19821
19822
19823
19824
ae0d7250
PE
19825
19826
19827
cc322c06 19828
f199cab1 19829
cc322c06 19830
5476a9a4
GM
19831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
19832$as_echo_n "checking whether the utimes function works... " >&6; }
19833if test "${gl_cv_func_working_utimes+set}" = set; then :
19834 $as_echo_n "(cached) " >&6
19835else
1fd182f0 19836
5476a9a4
GM
19837 if test "$cross_compiling" = yes; then :
19838 gl_cv_func_working_utimes=no
19839else
19840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19841/* end confdefs.h. */
19842
19843#include <sys/types.h>
19844#include <sys/stat.h>
19845#include <fcntl.h>
19846#include <sys/time.h>
19847#include <time.h>
19848#include <unistd.h>
19849#include <stdlib.h>
19850#include <stdio.h>
19851#include <utime.h>
1fd182f0 19852
5476a9a4
GM
19853static int
19854inorder (time_t a, time_t b, time_t c)
19855{
19856 return a <= b && b <= c;
19857}
1fd182f0 19858
5476a9a4
GM
19859int
19860main ()
19861{
19862 int result = 0;
19863 char const *file = "conftest.utimes";
19864 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 19865
5476a9a4
GM
19866 /* Test whether utimes() essentially works. */
19867 {
19868 struct stat sbuf;
19869 FILE *f = fopen (file, "w");
19870 if (f == NULL)
19871 result |= 1;
19872 else if (fclose (f) != 0)
19873 result |= 1;
19874 else if (utimes (file, timeval) != 0)
19875 result |= 2;
19876 else if (lstat (file, &sbuf) != 0)
19877 result |= 1;
19878 else if (!(sbuf.st_atime == timeval[0].tv_sec
19879 && sbuf.st_mtime == timeval[1].tv_sec))
19880 result |= 4;
19881 if (unlink (file) != 0)
19882 result |= 1;
19883 }
1fd182f0 19884
5476a9a4
GM
19885 /* Test whether utimes() with a NULL argument sets the file's timestamp
19886 to the current time. Use 'fstat' as well as 'time' to
19887 determine the "current" time, to accommodate NFS file systems
19888 if there is a time skew between the host and the NFS server. */
19889 {
19890 int fd = open (file, O_WRONLY|O_CREAT, 0644);
19891 if (fd < 0)
19892 result |= 1;
19893 else
19894 {
19895 time_t t0, t2;
19896 struct stat st0, st1, st2;
19897 if (time (&t0) == (time_t) -1)
19898 result |= 1;
19899 else if (fstat (fd, &st0) != 0)
19900 result |= 1;
19901 else if (utimes (file, timeval) != 0)
19902 result |= 2;
19903 else if (utimes (file, NULL) != 0)
19904 result |= 8;
19905 else if (fstat (fd, &st1) != 0)
19906 result |= 1;
19907 else if (write (fd, "\n", 1) != 1)
19908 result |= 1;
19909 else if (fstat (fd, &st2) != 0)
19910 result |= 1;
19911 else if (time (&t2) == (time_t) -1)
19912 result |= 1;
19913 else
19914 {
19915 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
19916 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
19917 if (! (st1.st_atime == st1.st_mtime))
19918 result |= 16;
19919 if (! (m_ok_POSIX || m_ok_NFS))
19920 result |= 32;
19921 }
19922 if (close (fd) != 0)
19923 result |= 1;
19924 }
19925 if (unlink (file) != 0)
19926 result |= 1;
19927 }
52724a05 19928
5476a9a4
GM
19929 /* Test whether utimes() with a NULL argument works on read-only files. */
19930 {
19931 int fd = open (file, O_WRONLY|O_CREAT, 0444);
19932 if (fd < 0)
19933 result |= 1;
19934 else if (close (fd) != 0)
19935 result |= 1;
19936 else if (utimes (file, NULL) != 0)
19937 result |= 64;
19938 if (unlink (file) != 0)
19939 result |= 1;
19940 }
1fd182f0 19941
5476a9a4
GM
19942 return result;
19943}
1fd182f0 19944
5476a9a4
GM
19945_ACEOF
19946if ac_fn_c_try_run "$LINENO"; then :
19947 gl_cv_func_working_utimes=yes
19948else
19949 gl_cv_func_working_utimes=no
19950fi
19951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19952 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 19953fi
1fd182f0 19954
5476a9a4
GM
19955fi
19956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
19957$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 19958
5476a9a4 19959 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 19960
5476a9a4 19961$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 19962
5476a9a4 19963 fi
1fd182f0 19964
1fd182f0 19965
1fd182f0 19966
1fd182f0 19967
1fd182f0 19968
5476a9a4
GM
19969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
19970$as_echo_n "checking for struct utimbuf... " >&6; }
19971if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
19972 $as_echo_n "(cached) " >&6
19973else
19974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19975/* end confdefs.h. */
19976#if HAVE_SYS_TIME_H
19977 #include <sys/time.h>
19978 #endif
19979 #include <time.h>
19980 #ifdef HAVE_UTIME_H
19981 #include <utime.h>
19982 #endif
1fd182f0 19983
5476a9a4
GM
19984int
19985main ()
19986{
19987static struct utimbuf x; x.actime = x.modtime;
19988 ;
19989 return 0;
19990}
19991_ACEOF
19992if ac_fn_c_try_compile "$LINENO"; then :
19993 gl_cv_sys_struct_utimbuf=yes
19994else
19995 gl_cv_sys_struct_utimbuf=no
f199cab1 19996fi
5476a9a4 19997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19998fi
5476a9a4
GM
19999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
20000$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 20001
5476a9a4 20002 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 20003
5476a9a4 20004$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 20005
5476a9a4 20006 fi
1fd182f0 20007
1fd182f0 20008
1fd182f0 20009
1fd182f0 20010
1fd182f0 20011
1fd182f0 20012
1fd182f0 20013
3e0be4ab 20014
f199cab1 20015
f199cab1 20016
067d23c9 20017
067d23c9 20018
5476a9a4
GM
20019 if false; then
20020 GL_COND_LIBTOOL_TRUE=
20021 GL_COND_LIBTOOL_FALSE='#'
20022else
20023 GL_COND_LIBTOOL_TRUE='#'
20024 GL_COND_LIBTOOL_FALSE=
1fd182f0 20025fi
067d23c9 20026
5476a9a4
GM
20027 gl_cond_libtool=false
20028 gl_libdeps=
20029 gl_ltlibdeps=
20030 gl_m4_base='m4'
067d23c9 20031
f199cab1 20032
f199cab1 20033
f199cab1 20034
067d23c9 20035
f199cab1 20036
f199cab1 20037
f199cab1 20038
067d23c9 20039
5476a9a4 20040 gl_source_base='lib'
cc322c06
GM
20041
20042
5476a9a4
GM
20043 if test $ac_cv_func_alloca_works = no; then
20044 :
f199cab1 20045 fi
cc322c06 20046
5476a9a4
GM
20047 # Define an additional variable used in the Makefile substitution.
20048 if test $ac_cv_working_alloca_h = yes; then
20049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20050$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20051if test "${gl_cv_rpl_alloca+set}" = set; then :
20052 $as_echo_n "(cached) " >&6
20053else
cc322c06 20054
5476a9a4
GM
20055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20056/* end confdefs.h. */
067d23c9 20057
5476a9a4
GM
20058#if defined __GNUC__ || defined _AIX || defined _MSC_VER
20059 Need own alloca
20060#endif
067d23c9 20061
f199cab1 20062_ACEOF
5476a9a4
GM
20063if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20064 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20065 gl_cv_rpl_alloca=yes
20066else
20067 gl_cv_rpl_alloca=no
369e19fc 20068fi
5476a9a4 20069rm -f conftest*
067d23c9 20070
ae0d7250 20071
5476a9a4
GM
20072fi
20073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20074$as_echo "$gl_cv_rpl_alloca" >&6; }
20075 if test $gl_cv_rpl_alloca = yes; then
52724a05 20076
5476a9a4 20077$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 20078
5476a9a4
GM
20079 ALLOCA_H=alloca.h
20080 else
20081 ALLOCA_H=
20082 fi
f199cab1 20083 else
5476a9a4
GM
20084 ALLOCA_H=alloca.h
20085 fi
ae0d7250 20086
5476a9a4
GM
20087 if test -n "$ALLOCA_H"; then
20088 GL_GENERATE_ALLOCA_H_TRUE=
20089 GL_GENERATE_ALLOCA_H_FALSE='#'
20090else
20091 GL_GENERATE_ALLOCA_H_TRUE='#'
20092 GL_GENERATE_ALLOCA_H_FALSE=
20093fi
f199cab1 20094
ae0d7250
PE
20095
20096
20097
20098
20099
5476a9a4
GM
20100 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20101 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 20102
5476a9a4
GM
20103 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
20104 # programs in the package would end up linked with that potentially-shared
20105 # library, inducing unnecessary run-time overhead.
20106 LIB_CLOCK_GETTIME=
ae0d7250 20107
5476a9a4
GM
20108 gl_saved_libs=$LIBS
20109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20110$as_echo_n "checking for library containing clock_gettime... " >&6; }
20111if test "${ac_cv_search_clock_gettime+set}" = set; then :
20112 $as_echo_n "(cached) " >&6
20113else
20114 ac_func_search_save_LIBS=$LIBS
20115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20116/* end confdefs.h. */
20117
20118/* Override any GCC internal prototype to avoid an error.
20119 Use char because int might match the return type of a GCC
20120 builtin and then its argument prototype would still apply. */
20121#ifdef __cplusplus
20122extern "C"
20123#endif
20124char clock_gettime ();
20125int
20126main ()
20127{
20128return clock_gettime ();
20129 ;
20130 return 0;
20131}
20132_ACEOF
20133for ac_lib in '' rt posix4; do
20134 if test -z "$ac_lib"; then
20135 ac_res="none required"
20136 else
20137 ac_res=-l$ac_lib
20138 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20139 fi
20140 if ac_fn_c_try_link "$LINENO"; then :
20141 ac_cv_search_clock_gettime=$ac_res
f199cab1 20142fi
5476a9a4
GM
20143rm -f core conftest.err conftest.$ac_objext \
20144 conftest$ac_exeext
20145 if test "${ac_cv_search_clock_gettime+set}" = set; then :
20146 break
20147fi
20148done
20149if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 20150
5476a9a4
GM
20151else
20152 ac_cv_search_clock_gettime=no
20153fi
20154rm conftest.$ac_ext
20155LIBS=$ac_func_search_save_LIBS
20156fi
20157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
20158$as_echo "$ac_cv_search_clock_gettime" >&6; }
20159ac_res=$ac_cv_search_clock_gettime
20160if test "$ac_res" != no; then :
20161 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20162 test "$ac_cv_search_clock_gettime" = "none required" ||
20163 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
20164fi
ae0d7250 20165
5476a9a4
GM
20166 for ac_func in clock_gettime clock_settime
20167do :
20168 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20169ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20170eval as_val=\$$as_ac_var
20171 if test "x$as_val" = x""yes; then :
20172 cat >>confdefs.h <<_ACEOF
20173#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20174_ACEOF
ae0d7250 20175
5476a9a4
GM
20176fi
20177done
ae0d7250 20178
5476a9a4 20179 LIBS=$gl_saved_libs
3e0be4ab
GM
20180
20181
3e0be4ab 20182
3e0be4ab 20183
5476a9a4 20184 :
3e0be4ab 20185
f199cab1 20186
f199cab1 20187
f199cab1 20188
5476a9a4 20189 :
3e0be4ab 20190
f199cab1 20191
f199cab1 20192
3e0be4ab 20193
f199cab1
GM
20194
20195
20196
5476a9a4
GM
20197
20198
20199
20200
20201
20202
20203
20204
20205$as_echo "#define HAVE_DUP2 1" >>confdefs.h
20206
20207
20208 if test $HAVE_DUP2 = 1; then
20209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20210$as_echo_n "checking whether dup2 works... " >&6; }
20211if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
20212 $as_echo_n "(cached) " >&6
20213else
5476a9a4
GM
20214 if test "$cross_compiling" = yes; then :
20215 case "$host_os" in
20216 mingw*) # on this platform, dup2 always returns 0 for success
20217 gl_cv_func_dup2_works="guessing no" ;;
20218 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20219 gl_cv_func_dup2_works="guessing no" ;;
20220 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
20221 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
20222 gl_cv_func_dup2_works="guessing no" ;;
20223 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
20224 gl_cv_func_dup2_works="guessing no" ;;
20225 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20226 gl_cv_func_dup2_works="guessing no" ;;
20227 *) gl_cv_func_dup2_works="guessing yes" ;;
20228 esac
20229else
20230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 20231/* end confdefs.h. */
ae0d7250 20232
5476a9a4
GM
20233 #include <unistd.h>
20234#include <fcntl.h>
20235#include <errno.h>
3e0be4ab
GM
20236int
20237main ()
20238{
5476a9a4
GM
20239int result = 0;
20240#ifdef FD_CLOEXEC
20241 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20242 result |= 1;
20243#endif
20244 if (dup2 (1, 1) == 0)
20245 result |= 2;
20246#ifdef FD_CLOEXEC
20247 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20248 result |= 4;
20249#endif
20250 close (0);
20251 if (dup2 (0, 0) != -1)
20252 result |= 8;
20253 /* Many gnulib modules require POSIX conformance of EBADF. */
20254 if (dup2 (2, 1000000) == -1 && errno != EBADF)
20255 result |= 16;
20256 return result;
20257
ae0d7250
PE
20258 ;
20259 return 0;
20260}
5476a9a4 20261
ae0d7250 20262_ACEOF
5476a9a4
GM
20263if ac_fn_c_try_run "$LINENO"; then :
20264 gl_cv_func_dup2_works=yes
ae0d7250 20265else
5476a9a4 20266 gl_cv_func_dup2_works=no
ae0d7250 20267fi
5476a9a4
GM
20268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20269 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 20270fi
5476a9a4
GM
20271
20272
3e0be4ab 20273fi
5476a9a4
GM
20274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20275$as_echo "$gl_cv_func_dup2_works" >&6; }
20276 case "$gl_cv_func_dup2_works" in
20277 *yes) ;;
20278 *)
20279 REPLACE_DUP2=1
20280 ;;
20281 esac
20282 fi
3e0be4ab 20283
3e0be4ab 20284
a6342fc8 20285 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 20286
f199cab1
GM
20287
20288
f199cab1 20289
f199cab1 20290
f199cab1 20291
f199cab1 20292
f199cab1 20293
5476a9a4 20294 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
20295
20296
a6342fc8 20297 fi
f199cab1 20298
f199cab1 20299
f199cab1 20300
f199cab1 20301
f199cab1 20302
5476a9a4 20303 GNULIB_DUP2=1
f199cab1
GM
20304
20305
f199cab1 20306
f199cab1 20307
3e0be4ab 20308
3e0be4ab 20309
f199cab1
GM
20310
20311
ae0d7250 20312
ae0d7250 20313
5476a9a4 20314
93131e11
GM
20315 GNULIB_ENVIRON=1
20316
20317
20318
20319
20320
20321
20322
20323
8966cbff
GM
20324 LIB_EXECINFO=''
20325 EXECINFO_H='execinfo.h'
20326
20327 if test $ac_cv_header_execinfo_h = yes; then
20328 gl_saved_libs=$LIBS
20329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols_fd" >&5
20330$as_echo_n "checking for library containing backtrace_symbols_fd... " >&6; }
20331if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20332 $as_echo_n "(cached) " >&6
20333else
20334 ac_func_search_save_LIBS=$LIBS
20335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20336/* end confdefs.h. */
20337
20338/* Override any GCC internal prototype to avoid an error.
20339 Use char because int might match the return type of a GCC
20340 builtin and then its argument prototype would still apply. */
20341#ifdef __cplusplus
20342extern "C"
20343#endif
20344char backtrace_symbols_fd ();
20345int
20346main ()
20347{
20348return backtrace_symbols_fd ();
20349 ;
20350 return 0;
20351}
20352_ACEOF
20353for ac_lib in '' execinfo; do
20354 if test -z "$ac_lib"; then
20355 ac_res="none required"
20356 else
20357 ac_res=-l$ac_lib
20358 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20359 fi
20360 if ac_fn_c_try_link "$LINENO"; then :
20361 ac_cv_search_backtrace_symbols_fd=$ac_res
20362fi
20363rm -f core conftest.err conftest.$ac_objext \
20364 conftest$ac_exeext
20365 if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20366 break
20367fi
20368done
20369if test "${ac_cv_search_backtrace_symbols_fd+set}" = set; then :
20370
20371else
20372 ac_cv_search_backtrace_symbols_fd=no
20373fi
20374rm conftest.$ac_ext
20375LIBS=$ac_func_search_save_LIBS
20376fi
20377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols_fd" >&5
20378$as_echo "$ac_cv_search_backtrace_symbols_fd" >&6; }
20379ac_res=$ac_cv_search_backtrace_symbols_fd
20380if test "$ac_res" != no; then :
20381 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20382 test "$ac_cv_search_backtrace_symbols_fd" = "none required" ||
20383 LIB_EXECINFO=$ac_cv_search_backtrace_symbols_fd
20384fi
20385
20386 LIBS=$gl_saved_libs
20387 test "$ac_cv_search_backtrace_symbols_fd" = no || EXECINFO_H=''
20388 fi
20389
20390 if test -n "$EXECINFO_H"; then
20391
20392
20393
20394
20395
20396
20397
20398
20399 gl_LIBOBJS="$gl_LIBOBJS execinfo.$ac_objext"
20400
20401 fi
20402
20403
20404
20405 if test -n "$EXECINFO_H"; then
20406 GL_GENERATE_EXECINFO_H_TRUE=
20407 GL_GENERATE_EXECINFO_H_FALSE='#'
20408else
20409 GL_GENERATE_EXECINFO_H_TRUE='#'
20410 GL_GENERATE_EXECINFO_H_FALSE=
20411fi
20412
20413
20414
20415
20416
93131e11
GM
20417
20418
20419
7cd2ed2c 20420
5476a9a4
GM
20421# Persuade glibc <stdlib.h> to declare getloadavg().
20422
20423
20424gl_save_LIBS=$LIBS
20425
20426# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
20427# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
20428HAVE_GETLOADAVG=1
20429ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
20430if test "x$ac_cv_func_getloadavg" = x""yes; then :
20431
20432else
20433 gl_func_getloadavg_done=no
20434
20435 # Some systems with -lutil have (and need) -lkvm as well, some do not.
20436 # On Solaris, -lkvm requires nlist from -lelf, so check that first
20437 # to get the right answer into the cache.
20438 # For kstat on solaris, we need to test for libelf and libkvm to force the
20439 # definition of SVR4 below.
20440 if test $gl_func_getloadavg_done = no; then
20441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
20442$as_echo_n "checking for elf_begin in -lelf... " >&6; }
20443if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
20444 $as_echo_n "(cached) " >&6
20445else
3e0be4ab 20446 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20447LIBS="-lelf $LIBS"
3e0be4ab 20448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 20449/* end confdefs.h. */
6ad6792b 20450
3e0be4ab
GM
20451/* Override any GCC internal prototype to avoid an error.
20452 Use char because int might match the return type of a GCC
20453 builtin and then its argument prototype would still apply. */
20454#ifdef __cplusplus
20455extern "C"
20456#endif
5476a9a4 20457char elf_begin ();
6ad6792b
GM
20458int
20459main ()
20460{
5476a9a4 20461return elf_begin ();
6ad6792b
GM
20462 ;
20463 return 0;
20464}
20465_ACEOF
3e0be4ab 20466if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20467 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 20468else
5476a9a4 20469 ac_cv_lib_elf_elf_begin=no
6ad6792b 20470fi
3e0be4ab
GM
20471rm -f core conftest.err conftest.$ac_objext \
20472 conftest$ac_exeext conftest.$ac_ext
20473LIBS=$ac_check_lib_save_LIBS
6ad6792b 20474fi
5476a9a4
GM
20475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
20476$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
20477if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
20478 LIBS="-lelf $LIBS"
6ad6792b
GM
20479fi
20480
5476a9a4
GM
20481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
20482$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
20483if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
20484 $as_echo_n "(cached) " >&6
20485else
5476a9a4
GM
20486 ac_check_lib_save_LIBS=$LIBS
20487LIBS="-lkvm $LIBS"
20488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 20489/* end confdefs.h. */
3e0be4ab 20490
5476a9a4
GM
20491/* Override any GCC internal prototype to avoid an error.
20492 Use char because int might match the return type of a GCC
20493 builtin and then its argument prototype would still apply. */
20494#ifdef __cplusplus
20495extern "C"
20496#endif
20497char kvm_open ();
6c051bab
GM
20498int
20499main ()
20500{
5476a9a4 20501return kvm_open ();
6c051bab
GM
20502 ;
20503 return 0;
20504}
20505_ACEOF
3e0be4ab 20506if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20507 ac_cv_lib_kvm_kvm_open=yes
6c051bab 20508else
5476a9a4 20509 ac_cv_lib_kvm_kvm_open=no
6c051bab 20510fi
3e0be4ab
GM
20511rm -f core conftest.err conftest.$ac_objext \
20512 conftest$ac_exeext conftest.$ac_ext
5476a9a4 20513LIBS=$ac_check_lib_save_LIBS
6c051bab 20514fi
5476a9a4
GM
20515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
20516$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
20517if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
20518 LIBS="-lkvm $LIBS"
3e0be4ab 20519fi
6c051bab 20520
5476a9a4
GM
20521 # Check for the 4.4BSD definition of getloadavg.
20522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
20523$as_echo_n "checking for getloadavg in -lutil... " >&6; }
20524if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
20525 $as_echo_n "(cached) " >&6
20526else
5476a9a4
GM
20527 ac_check_lib_save_LIBS=$LIBS
20528LIBS="-lutil $LIBS"
20529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 20530/* end confdefs.h. */
5476a9a4
GM
20531
20532/* Override any GCC internal prototype to avoid an error.
20533 Use char because int might match the return type of a GCC
20534 builtin and then its argument prototype would still apply. */
20535#ifdef __cplusplus
20536extern "C"
20537#endif
20538char getloadavg ();
ae0d7250
PE
20539int
20540main ()
20541{
5476a9a4 20542return getloadavg ();
ae0d7250
PE
20543 ;
20544 return 0;
20545}
20546_ACEOF
3e0be4ab 20547if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20548 ac_cv_lib_util_getloadavg=yes
ae0d7250 20549else
5476a9a4 20550 ac_cv_lib_util_getloadavg=no
ae0d7250 20551fi
3e0be4ab
GM
20552rm -f core conftest.err conftest.$ac_objext \
20553 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
20554LIBS=$ac_check_lib_save_LIBS
20555fi
20556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
20557$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
20558if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
20559 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 20560fi
6d153f56 20561
5476a9a4 20562 fi
6d153f56 20563
5476a9a4
GM
20564 if test $gl_func_getloadavg_done = no; then
20565 # There is a commonly available library for RS/6000 AIX.
20566 # Since it is not a standard part of AIX, it might be installed locally.
20567 gl_getloadavg_LIBS=$LIBS
20568 LIBS="-L/usr/local/lib $LIBS"
20569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
20570$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
20571if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 20572 $as_echo_n "(cached) " >&6
3e0be4ab 20573else
f199cab1 20574 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20575LIBS="-lgetloadavg $LIBS"
f199cab1
GM
20576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20577/* end confdefs.h. */
3e0be4ab 20578
f199cab1
GM
20579/* Override any GCC internal prototype to avoid an error.
20580 Use char because int might match the return type of a GCC
20581 builtin and then its argument prototype would still apply. */
20582#ifdef __cplusplus
20583extern "C"
20584#endif
5476a9a4 20585char getloadavg ();
f199cab1
GM
20586int
20587main ()
20588{
5476a9a4 20589return getloadavg ();
f199cab1
GM
20590 ;
20591 return 0;
20592}
ae0d7250 20593_ACEOF
f199cab1 20594if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20595 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 20596else
5476a9a4 20597 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 20598fi
f199cab1
GM
20599rm -f core conftest.err conftest.$ac_objext \
20600 conftest$ac_exeext conftest.$ac_ext
20601LIBS=$ac_check_lib_save_LIBS
3e0be4ab 20602fi
5476a9a4
GM
20603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
20604$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
20605if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
20606 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
20607else
20608 LIBS=$gl_getloadavg_LIBS
6d153f56 20609fi
ae0d7250 20610
5476a9a4 20611 fi
16c3e636 20612
5476a9a4
GM
20613 # Set up the replacement function if necessary.
20614 if test $gl_func_getloadavg_done = no; then
20615 HAVE_GETLOADAVG=0
16c3e636 20616
5476a9a4
GM
20617 # Solaris has libkstat which does not require root.
20618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
20619$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
20620if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
20621 $as_echo_n "(cached) " >&6
20622else
20623 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20624LIBS="-lkstat $LIBS"
f199cab1
GM
20625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20626/* end confdefs.h. */
5f90be1b 20627
f199cab1
GM
20628/* Override any GCC internal prototype to avoid an error.
20629 Use char because int might match the return type of a GCC
20630 builtin and then its argument prototype would still apply. */
20631#ifdef __cplusplus
20632extern "C"
20633#endif
5476a9a4 20634char kstat_open ();
f199cab1
GM
20635int
20636main ()
20637{
5476a9a4 20638return kstat_open ();
f199cab1
GM
20639 ;
20640 return 0;
20641}
3e0be4ab 20642_ACEOF
f199cab1 20643if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20644 ac_cv_lib_kstat_kstat_open=yes
f199cab1 20645else
5476a9a4 20646 ac_cv_lib_kstat_kstat_open=no
5f90be1b 20647fi
f199cab1
GM
20648rm -f core conftest.err conftest.$ac_objext \
20649 conftest$ac_exeext conftest.$ac_ext
20650LIBS=$ac_check_lib_save_LIBS
3e0be4ab 20651fi
5476a9a4
GM
20652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
20653$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
20654if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 20655 cat >>confdefs.h <<_ACEOF
5476a9a4 20656#define HAVE_LIBKSTAT 1
3e0be4ab 20657_ACEOF
5f90be1b 20658
5476a9a4 20659 LIBS="-lkstat $LIBS"
5f90be1b 20660
f199cab1 20661fi
5f90be1b 20662
5476a9a4 20663 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 20664
5476a9a4
GM
20665 # AIX has libperfstat which does not require root
20666 if test $gl_func_getloadavg_done = no; then
20667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
20668$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
20669if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
20670 $as_echo_n "(cached) " >&6
20671else
5476a9a4
GM
20672 ac_check_lib_save_LIBS=$LIBS
20673LIBS="-lperfstat $LIBS"
20674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 20675/* end confdefs.h. */
5476a9a4
GM
20676
20677/* Override any GCC internal prototype to avoid an error.
20678 Use char because int might match the return type of a GCC
20679 builtin and then its argument prototype would still apply. */
20680#ifdef __cplusplus
20681extern "C"
20682#endif
20683char perfstat_cpu_total ();
5f90be1b
PE
20684int
20685main ()
20686{
5476a9a4 20687return perfstat_cpu_total ();
5f90be1b
PE
20688 ;
20689 return 0;
20690}
20691_ACEOF
5476a9a4
GM
20692if ac_fn_c_try_link "$LINENO"; then :
20693 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 20694else
5476a9a4 20695 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 20696fi
5476a9a4
GM
20697rm -f core conftest.err conftest.$ac_objext \
20698 conftest$ac_exeext conftest.$ac_ext
20699LIBS=$ac_check_lib_save_LIBS
f199cab1 20700fi
5476a9a4
GM
20701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
20702$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
20703if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
20704 cat >>confdefs.h <<_ACEOF
20705#define HAVE_LIBPERFSTAT 1
20706_ACEOF
20707
20708 LIBS="-lperfstat $LIBS"
20709
20710fi
20711
20712 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
20713 fi
20714
20715 if test $gl_func_getloadavg_done = no; then
20716 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
20717if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
20718 gl_func_getloadavg_done=yes
20719
20720$as_echo "#define DGUX 1" >>confdefs.h
20721
20722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
20723$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
20724if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
20725 $as_echo_n "(cached) " >&6
20726else
20727 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20728LIBS="-ldgc $LIBS"
f199cab1
GM
20729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20730/* end confdefs.h. */
3e0be4ab 20731
f199cab1
GM
20732/* Override any GCC internal prototype to avoid an error.
20733 Use char because int might match the return type of a GCC
20734 builtin and then its argument prototype would still apply. */
20735#ifdef __cplusplus
20736extern "C"
20737#endif
5476a9a4 20738char dg_sys_info ();
f199cab1
GM
20739int
20740main ()
20741{
5476a9a4 20742return dg_sys_info ();
f199cab1
GM
20743 ;
20744 return 0;
20745}
20746_ACEOF
20747if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20748 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 20749else
5476a9a4 20750 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 20751fi
3e0be4ab
GM
20752rm -f core conftest.err conftest.$ac_objext \
20753 conftest$ac_exeext conftest.$ac_ext
f199cab1 20754LIBS=$ac_check_lib_save_LIBS
5f90be1b 20755fi
5476a9a4
GM
20756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
20757$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
20758if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
20759 cat >>confdefs.h <<_ACEOF
20760#define HAVE_LIBDGC 1
20761_ACEOF
20762
20763 LIBS="-ldgc $LIBS"
20764
da6c8463
GM
20765fi
20766
5476a9a4
GM
20767fi
20768
20769
20770 fi
20771 fi
20772fi
20773
20774
20775if test "x$gl_save_LIBS" = x; then
20776 GETLOADAVG_LIBS=$LIBS
f199cab1 20777else
5476a9a4
GM
20778 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
20779fi
20780LIBS=$gl_save_LIBS
20781
20782
20783# Test whether the system declares getloadavg. Solaris has the function
20784# but declares it in <sys/loadavg.h>, not <stdlib.h>.
20785for ac_header in sys/loadavg.h
20786do :
20787 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
20788if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
20789 cat >>confdefs.h <<_ACEOF
20790#define HAVE_SYS_LOADAVG_H 1
f199cab1 20791_ACEOF
5476a9a4 20792
f199cab1 20793fi
5476a9a4
GM
20794
20795done
20796
20797if test $ac_cv_header_sys_loadavg_h = yes; then
20798 HAVE_SYS_LOADAVG_H=1
20799else
20800 HAVE_SYS_LOADAVG_H=0
f199cab1 20801fi
5476a9a4
GM
20802ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
20803 # include <sys/loadavg.h>
20804 #endif
20805 #include <stdlib.h>
20806"
20807if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 20808
f199cab1 20809else
5476a9a4 20810 HAVE_DECL_GETLOADAVG=0
f199cab1 20811fi
5f90be1b 20812
5f90be1b 20813
a6342fc8 20814 if test $HAVE_GETLOADAVG = 0; then
5476a9a4
GM
20815
20816
20817
20818
20819
20820
20821
20822
20823 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
20824
20825
20826# Figure out what our getloadavg.c needs.
20827
20828
20829
20830# On HPUX9, an unprivileged user can get load averages this way.
20831if test $gl_func_getloadavg_done = no; then
20832 for ac_func in pstat_getdynamic
20833do :
20834 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
20835if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
20836 cat >>confdefs.h <<_ACEOF
20837#define HAVE_PSTAT_GETDYNAMIC 1
20838_ACEOF
20839 gl_func_getloadavg_done=yes
3e0be4ab 20840fi
5476a9a4 20841done
6ad6792b 20842
5476a9a4 20843fi
6ad6792b 20844
5476a9a4
GM
20845# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
20846# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
20847# Irix 4.0.5F has the header but not the library.
20848if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
20849 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
20850 gl_func_getloadavg_done=yes
6ad6792b 20851
5476a9a4 20852$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 20853
5476a9a4
GM
20854fi
20855
20856if test $gl_func_getloadavg_done = no; then
20857 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
20858if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
20859 gl_func_getloadavg_done=yes
20860
20861$as_echo "#define UMAX 1" >>confdefs.h
20862
20863
20864$as_echo "#define UMAX4_3 1" >>confdefs.h
20865
20866fi
20867
20868
20869fi
20870
20871if test $gl_func_getloadavg_done = no; then
20872 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
20873if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
20874 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
20875
20876fi
20877
20878
20879fi
20880
20881if test $gl_func_getloadavg_done = no; then
20882 for ac_header in mach/mach.h
20883do :
20884 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
20885if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
20886 cat >>confdefs.h <<_ACEOF
20887#define HAVE_MACH_MACH_H 1
20888_ACEOF
20889
20890fi
20891
20892done
20893
20894fi
20895
20896for ac_header in nlist.h
20897do :
20898 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
20899if test "x$ac_cv_header_nlist_h" = x""yes; then :
20900 cat >>confdefs.h <<_ACEOF
20901#define HAVE_NLIST_H 1
20902_ACEOF
20903 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
20904"
20905if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
20906
20907cat >>confdefs.h <<_ACEOF
20908#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
20909_ACEOF
6ad6792b 20910
0eb775a3 20911
f199cab1 20912fi
3e0be4ab 20913
5476a9a4 20914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20915/* end confdefs.h. */
5476a9a4 20916#include <nlist.h>
f199cab1
GM
20917int
20918main ()
20919{
5476a9a4
GM
20920struct nlist x;
20921 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
20922 x.n_un.n_name = "";
20923 #else
20924 x.n_name = "";
20925 #endif
f199cab1
GM
20926 ;
20927 return 0;
20928}
20929_ACEOF
5476a9a4 20930if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 20931
5476a9a4 20932$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
20933
20934fi
5476a9a4
GM
20935rm -f core conftest.err conftest.$ac_objext \
20936 conftest$ac_exeext conftest.$ac_ext
6ad6792b 20937
5476a9a4 20938fi
6ad6792b 20939
5476a9a4 20940done
6ad6792b 20941
a6342fc8 20942 fi
ca36e0ff 20943
ca36e0ff
GM
20944
20945
1f5d53eb
PE
20946
20947
5476a9a4 20948 GNULIB_GETLOADAVG=1
1f5d53eb
PE
20949
20950
20951
20952
20953
20954
20955
1f5d53eb 20956
1f5d53eb 20957
3e0be4ab 20958
a6342fc8 20959 if test $REPLACE_GETOPT = 1; then
3e0be4ab 20960
1f5d53eb
PE
20961
20962
1f5d53eb 20963
1f5d53eb
PE
20964
20965
20966
20967
5476a9a4 20968 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
20969
20970
1f5d53eb
PE
20971
20972
16c3e636 20973
5476a9a4
GM
20974
20975
20976
20977
20978 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20979
20980
20981
20982
a6342fc8
GM
20983 GNULIB_GL_UNISTD_H_GETOPT=1
20984 fi
16c3e636
PE
20985
20986
20987
4fda9c95
GM
20988
20989
20990
20991
5476a9a4
GM
20992 REPLACE_GETOPT=0
20993 if test -n "$gl_replace_getopt"; then
20994 REPLACE_GETOPT=1
20995 fi
20996
20997 if test $REPLACE_GETOPT = 1; then
20998
20999 GETOPT_H=getopt.h
21000
21001$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21002
21003
21004
21005 fi
21006
a6342fc8 21007 if test $REPLACE_GETOPT = 1; then
5476a9a4
GM
21008
21009
21010
21011
21012
21013
21014
21015
21016 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
21027
21028
21029
21030
a6342fc8
GM
21031 GNULIB_GL_UNISTD_H_GETOPT=1
21032 fi
4fda9c95
GM
21033
21034
21035
21036
4fda9c95 21037
4fda9c95 21038
4fda9c95 21039
5476a9a4
GM
21040
21041
21042
21043
21044
21045 gl_gettimeofday_timezone=void
21046 if test $ac_cv_func_gettimeofday != yes; then
21047 HAVE_GETTIMEOFDAY=0
f199cab1 21048 else
4fda9c95
GM
21049
21050
3e0be4ab 21051
5476a9a4
GM
21052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21053$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21054if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
21055 $as_echo_n "(cached) " >&6
21056else
21057 if test "$cross_compiling" = yes; then :
21058 # When cross-compiling:
21059 case "$host_os" in
21060 # Guess all is fine on glibc systems.
21061 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21062 # If we don't know, assume the worst.
21063 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21064 esac
4fda9c95 21065
5476a9a4
GM
21066else
21067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21068/* end confdefs.h. */
21069#include <string.h>
21070 #include <sys/time.h>
21071 #include <time.h>
21072 #include <stdlib.h>
4fda9c95 21073
5476a9a4
GM
21074int
21075main ()
21076{
4fda9c95 21077
5476a9a4
GM
21078 time_t t = 0;
21079 struct tm *lt;
21080 struct tm saved_lt;
21081 struct timeval tv;
21082 lt = localtime (&t);
21083 saved_lt = *lt;
21084 gettimeofday (&tv, NULL);
21085 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 21086
5476a9a4
GM
21087 ;
21088 return 0;
21089}
21090_ACEOF
21091if ac_fn_c_try_run "$LINENO"; then :
21092 gl_cv_func_gettimeofday_clobber=no
21093else
21094 gl_cv_func_gettimeofday_clobber=yes
21095fi
21096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21097 conftest.$ac_objext conftest.beam conftest.$ac_ext
21098fi
cc322c06 21099
5476a9a4
GM
21100fi
21101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21102$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 21103
5476a9a4
GM
21104 case "$gl_cv_func_gettimeofday_clobber" in
21105 *yes)
21106 REPLACE_GETTIMEOFDAY=1
cc322c06 21107
4fda9c95 21108
5476a9a4 21109$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 21110
ae0d7250 21111
5476a9a4 21112$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
21113
21114
ae0d7250 21115
5476a9a4
GM
21116$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21117
21118 ;;
21119 esac
21120
21121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21122$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21123if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
21124 $as_echo_n "(cached) " >&6
21125else
5476a9a4
GM
21126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21127/* end confdefs.h. */
21128#include <sys/time.h>
21129 struct timeval c;
21130 int gettimeofday (struct timeval *restrict, void *restrict);
21131
21132int
21133main ()
21134{
21135/* glibc uses struct timezone * rather than the POSIX void *
21136 if _GNU_SOURCE is defined. However, since the only portable
21137 use of gettimeofday uses NULL as the second parameter, and
21138 since the glibc definition is actually more typesafe, it is
21139 not worth wrapping this to get a compliant signature. */
21140 int (*f) (struct timeval *restrict, void *restrict)
21141 = gettimeofday;
21142 int x = f (&c, 0);
21143 return !(x | c.tv_sec | c.tv_usec);
21144
21145 ;
21146 return 0;
21147}
21148_ACEOF
21149if ac_fn_c_try_compile "$LINENO"; then :
21150 gl_cv_func_gettimeofday_posix_signature=yes
21151else
21152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21153/* end confdefs.h. */
5476a9a4
GM
21154#include <sys/time.h>
21155int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 21156
f199cab1
GM
21157int
21158main ()
21159{
5476a9a4 21160
f199cab1
GM
21161 ;
21162 return 0;
ae0d7250
PE
21163}
21164_ACEOF
5476a9a4
GM
21165if ac_fn_c_try_compile "$LINENO"; then :
21166 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 21167else
5476a9a4 21168 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 21169fi
5476a9a4 21170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 21171fi
5476a9a4 21172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 21173fi
5476a9a4
GM
21174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21175$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21176 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21177 gl_gettimeofday_timezone='struct timezone'
21178 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21179 REPLACE_GETTIMEOFDAY=1
21180 fi
21181 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21182 REPLACE_GETTIMEOFDAY=1
21183 fi
3e0be4ab 21184
5476a9a4 21185 fi
ae0d7250 21186
5476a9a4
GM
21187cat >>confdefs.h <<_ACEOF
21188#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21189_ACEOF
f199cab1 21190
ae0d7250 21191
a6342fc8 21192 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 21193
cc322c06
GM
21194
21195
cc322c06
GM
21196
21197
ae0d7250
PE
21198
21199
21200
5476a9a4 21201 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
21202
21203
5476a9a4
GM
21204 for ac_header in sys/timeb.h
21205do :
21206 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21207if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
21208 cat >>confdefs.h <<_ACEOF
21209#define HAVE_SYS_TIMEB_H 1
21210_ACEOF
5fa4ac76 21211
3e0be4ab 21212fi
5fa4ac76 21213
5476a9a4 21214done
f199cab1 21215
5476a9a4
GM
21216 for ac_func in _ftime
21217do :
21218 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21219if test "x$ac_cv_func__ftime" = x""yes; then :
21220 cat >>confdefs.h <<_ACEOF
21221#define HAVE__FTIME 1
21222_ACEOF
5fa4ac76 21223
5476a9a4
GM
21224fi
21225done
5fa4ac76
PE
21226
21227
a6342fc8 21228 fi
5fa4ac76
PE
21229
21230
21231
21232
21233
5476a9a4 21234 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
21235
21236
21237
21238
0eb775a3
GM
21239
21240
369e19fc
PE
21241
21242
369e19fc
PE
21243
21244
5476a9a4
GM
21245 if test $ac_cv_func_lstat = yes; then
21246
21247 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
21248 *no)
21249 REPLACE_LSTAT=1
21250 ;;
21251 esac
21252 else
21253 HAVE_LSTAT=0
f199cab1 21254 fi
369e19fc 21255
a6342fc8 21256 if test $REPLACE_LSTAT = 1; then
369e19fc 21257
5fa4ac76 21258
369e19fc 21259
369e19fc 21260
369e19fc 21261
369e19fc 21262
369e19fc 21263
369e19fc 21264
5476a9a4 21265 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 21266
f199cab1 21267
5fa4ac76 21268
5476a9a4 21269 :
369e19fc 21270
a6342fc8 21271 fi
369e19fc 21272
369e19fc 21273
369e19fc 21274
5fa4ac76
PE
21275
21276
5476a9a4 21277 GNULIB_LSTAT=1
5fa4ac76 21278
5fa4ac76 21279
27505cf5 21280
27505cf5 21281
27505cf5 21282
27505cf5 21283
27505cf5 21284
27505cf5 21285
5fa4ac76
PE
21286
21287
5476a9a4
GM
21288
21289 if test $APPLE_UNIVERSAL_BUILD = 1; then
21290 # A universal build on Apple Mac OS X platforms.
21291 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
21292 # But we need a configuration result that is valid in both modes.
21293 gl_cv_func_working_mktime=no
21294 fi
21295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
21296$as_echo_n "checking for working mktime... " >&6; }
21297if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
21298 $as_echo_n "(cached) " >&6
21299else
5476a9a4
GM
21300 if test "$cross_compiling" = yes; then :
21301 gl_cv_func_working_mktime=no
21302else
21303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21304/* end confdefs.h. */
5476a9a4
GM
21305/* Test program from Paul Eggert and Tony Leneis. */
21306#include <limits.h>
21307#include <stdlib.h>
21308#include <time.h>
5fa4ac76 21309
5476a9a4
GM
21310#ifdef HAVE_UNISTD_H
21311# include <unistd.h>
f199cab1 21312#endif
5476a9a4
GM
21313
21314#ifndef HAVE_ALARM
21315# define alarm(X) /* empty */
21316#endif
21317
21318/* Work around redefinition to rpl_putenv by other config tests. */
21319#undef putenv
21320
21321static time_t time_t_max;
21322static time_t time_t_min;
21323
21324/* Values we'll use to set the TZ environment variable. */
21325static char *tz_strings[] = {
21326 (char *) 0, "TZ=GMT0", "TZ=JST-9",
21327 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
21328};
21329#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
21330
21331/* Return 0 if mktime fails to convert a date in the spring-forward gap.
21332 Based on a problem report from Andreas Jaeger. */
21333static int
21334spring_forward_gap ()
f199cab1 21335{
5476a9a4
GM
21336 /* glibc (up to about 1998-10-07) failed this test. */
21337 struct tm tm;
21338
21339 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21340 instead of "TZ=America/Vancouver" in order to detect the bug even
21341 on systems that don't support the Olson extension, or don't have the
21342 full zoneinfo tables installed. */
21343 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
21344
21345 tm.tm_year = 98;
21346 tm.tm_mon = 3;
21347 tm.tm_mday = 5;
21348 tm.tm_hour = 2;
21349 tm.tm_min = 0;
21350 tm.tm_sec = 0;
21351 tm.tm_isdst = -1;
21352 return mktime (&tm) != (time_t) -1;
f199cab1 21353}
5fa4ac76 21354
5476a9a4
GM
21355static int
21356mktime_test1 (time_t now)
21357{
21358 struct tm *lt;
21359 return ! (lt = localtime (&now)) || mktime (lt) == now;
21360}
5fa4ac76 21361
5476a9a4
GM
21362static int
21363mktime_test (time_t now)
21364{
21365 return (mktime_test1 (now)
21366 && mktime_test1 ((time_t) (time_t_max - now))
21367 && mktime_test1 ((time_t) (time_t_min + now)));
21368}
067d23c9 21369
5476a9a4
GM
21370static int
21371irix_6_4_bug ()
21372{
21373 /* Based on code from Ariel Faigon. */
21374 struct tm tm;
21375 tm.tm_year = 96;
21376 tm.tm_mon = 3;
21377 tm.tm_mday = 0;
21378 tm.tm_hour = 0;
21379 tm.tm_min = 0;
21380 tm.tm_sec = 0;
21381 tm.tm_isdst = -1;
21382 mktime (&tm);
21383 return tm.tm_mon == 2 && tm.tm_mday == 31;
21384}
21385
21386static int
21387bigtime_test (int j)
21388{
21389 struct tm tm;
21390 time_t now;
21391 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
21392 now = mktime (&tm);
21393 if (now != (time_t) -1)
21394 {
21395 struct tm *lt = localtime (&now);
21396 if (! (lt
21397 && lt->tm_year == tm.tm_year
21398 && lt->tm_mon == tm.tm_mon
21399 && lt->tm_mday == tm.tm_mday
21400 && lt->tm_hour == tm.tm_hour
21401 && lt->tm_min == tm.tm_min
21402 && lt->tm_sec == tm.tm_sec
21403 && lt->tm_yday == tm.tm_yday
21404 && lt->tm_wday == tm.tm_wday
21405 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
21406 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
21407 return 0;
21408 }
21409 return 1;
21410}
369e19fc 21411
5476a9a4
GM
21412static int
21413year_2050_test ()
21414{
21415 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
21416 ignoring leap seconds. */
21417 unsigned long int answer = 2527315200UL;
369e19fc 21418
5476a9a4
GM
21419 struct tm tm;
21420 time_t t;
21421 tm.tm_year = 2050 - 1900;
21422 tm.tm_mon = 2 - 1;
21423 tm.tm_mday = 1;
21424 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
21425 tm.tm_isdst = -1;
369e19fc 21426
5476a9a4
GM
21427 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
21428 instead of "TZ=America/Vancouver" in order to detect the bug even
21429 on systems that don't support the Olson extension, or don't have the
21430 full zoneinfo tables installed. */
21431 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 21432
5476a9a4 21433 t = mktime (&tm);
067d23c9 21434
5476a9a4
GM
21435 /* Check that the result is either a failure, or close enough
21436 to the correct answer that we can assume the discrepancy is
21437 due to leap seconds. */
21438 return (t == (time_t) -1
21439 || (0 < t && answer - 120 <= t && t <= answer + 120));
21440}
067d23c9 21441
f199cab1
GM
21442int
21443main ()
21444{
5476a9a4
GM
21445 int result = 0;
21446 time_t t, delta;
21447 int i, j;
21448 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
21449 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 21450
5476a9a4
GM
21451 /* This test makes some buggy mktime implementations loop.
21452 Give up after 60 seconds; a mktime slower than that
21453 isn't worth using anyway. */
21454 alarm (60);
067d23c9 21455
5476a9a4
GM
21456 time_t_max = (! time_t_signed
21457 ? (time_t) -1
21458 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
21459 * 2 + 1));
21460 time_t_min = (! time_t_signed
21461 ? (time_t) 0
21462 : time_t_signed_magnitude
21463 ? ~ (time_t) 0
21464 : ~ time_t_max);
3e0be4ab 21465
5476a9a4
GM
21466 delta = time_t_max / 997; /* a suitable prime number */
21467 for (i = 0; i < N_STRINGS; i++)
21468 {
21469 if (tz_strings[i])
21470 putenv (tz_strings[i]);
3e0be4ab 21471
5476a9a4
GM
21472 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
21473 if (! mktime_test (t))
21474 result |= 1;
21475 if ((result & 2) == 0
21476 && ! (mktime_test ((time_t) 1)
21477 && mktime_test ((time_t) (60 * 60))
21478 && mktime_test ((time_t) (60 * 60 * 24))))
21479 result |= 2;
f199cab1 21480
5476a9a4
GM
21481 for (j = 1; (result & 4) == 0; j <<= 1)
21482 {
21483 if (! bigtime_test (j))
21484 result |= 4;
21485 if (INT_MAX / 2 < j)
21486 break;
21487 }
21488 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
21489 result |= 8;
21490 }
21491 if (! irix_6_4_bug ())
21492 result |= 16;
21493 if (! spring_forward_gap ())
21494 result |= 32;
21495 if (! year_2050_test ())
21496 result |= 64;
21497 return result;
067d23c9
KY
21498}
21499_ACEOF
5476a9a4
GM
21500if ac_fn_c_try_run "$LINENO"; then :
21501 gl_cv_func_working_mktime=yes
067d23c9 21502else
5476a9a4 21503 gl_cv_func_working_mktime=no
3e0be4ab 21504fi
5476a9a4
GM
21505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21506 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
21507fi
21508
f199cab1 21509
5476a9a4
GM
21510fi
21511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
21512$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 21513
5476a9a4
GM
21514 if test $gl_cv_func_working_mktime = no; then
21515 REPLACE_MKTIME=1
21516 else
21517 REPLACE_MKTIME=0
f199cab1 21518 fi
f199cab1 21519
a6342fc8 21520 if test $REPLACE_MKTIME = 1; then
f199cab1 21521
f199cab1 21522
0eb775a3 21523
067d23c9 21524
a451f14b 21525
a451f14b 21526
743c80a7
PE
21527
21528
5476a9a4
GM
21529 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
21530
a6342fc8
GM
21531 :
21532 fi
a451f14b
PE
21533
21534
21535
e275c824
PE
21536
21537
5476a9a4 21538 GNULIB_MKTIME=1
e275c824
PE
21539
21540
21541
21542
21543
21544
21545
21546
d87ffdb7 21547
5476a9a4
GM
21548
21549
21550 if test $ac_cv_func_pselect = yes; then
21551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
21552$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
21553if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
21554 $as_echo_n "(cached) " >&6
21555else
5476a9a4 21556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 21557/* end confdefs.h. */
5476a9a4 21558#include <sys/select.h>
e275c824 21559
f199cab1
GM
21560int
21561main ()
21562{
5476a9a4
GM
21563int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
21564 struct timespec const *restrict,
21565 sigset_t const *restrict) = pselect;
21566 return !p;
f199cab1
GM
21567 ;
21568 return 0;
21569}
e275c824 21570_ACEOF
f199cab1 21571if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21572 gl_cv_sig_pselect=yes
3e0be4ab 21573else
5476a9a4 21574 gl_cv_sig_pselect=no
f199cab1
GM
21575fi
21576rm -f core conftest.err conftest.$ac_objext \
21577 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 21578fi
5476a9a4
GM
21579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
21580$as_echo "$gl_cv_sig_pselect" >&6; }
21581 fi
3e0be4ab 21582
5476a9a4
GM
21583 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
21584 REPLACE_PSELECT=1
21585 fi
3e0be4ab 21586
a6342fc8 21587 if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
21588
21589
3e0be4ab 21590
3e0be4ab 21591
3e0be4ab 21592
3e0be4ab 21593
3e0be4ab 21594
3e0be4ab 21595
5476a9a4 21596 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 21597
a6342fc8 21598 fi
3e0be4ab
GM
21599
21600
f199cab1 21601
f199cab1 21602
f199cab1 21603
5476a9a4 21604 GNULIB_PSELECT=1
f199cab1 21605
6d153f56 21606
f199cab1 21607
3e0be4ab 21608
3e0be4ab
GM
21609
21610
f199cab1 21611
0eb775a3
GM
21612
21613
5476a9a4 21614 LIB_PTHREAD_SIGMASK=
0eb775a3 21615
f199cab1 21616
5476a9a4
GM
21617 if test $ac_cv_func_pthread_sigmask = yes; then
21618 :
21619 else
21620 HAVE_PTHREAD_SIGMASK=0
21621 REPLACE_PTHREAD_SIGMASK=1
21622 fi
6d153f56 21623
52724a05 21624
6d153f56
GM
21625
21626
5476a9a4
GM
21627 if test $HAVE_PTHREAD_SIGMASK = 1; then
21628
21629
21630 if test -z "$LIB_PTHREAD_SIGMASK"; then
21631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
21632$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
21633if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
21634 $as_echo_n "(cached) " >&6
21635else
5476a9a4
GM
21636
21637 if test "$cross_compiling" = yes; then :
21638
21639 case "$host_os" in
21640 freebsd* | hpux* | solaris | solaris2.[2-9]*)
21641 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
21642 *)
21643 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
21644 esac
21645
21646else
21647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21648/* end confdefs.h. */
6d153f56 21649
5476a9a4
GM
21650#include <pthread.h>
21651#include <signal.h>
21652#include <stddef.h>
21653int main ()
f199cab1 21654{
5476a9a4
GM
21655 sigset_t set;
21656 sigemptyset (&set);
21657 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
21658}
21659_ACEOF
5476a9a4
GM
21660if ac_fn_c_try_run "$LINENO"; then :
21661 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 21662else
5476a9a4 21663 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 21664fi
5476a9a4
GM
21665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21666 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21667fi
5476a9a4
GM
21668
21669
f199cab1 21670fi
5476a9a4
GM
21671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
21672$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
21673 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
21674 *no)
21675 REPLACE_PTHREAD_SIGMASK=1
cc322c06 21676
5476a9a4 21677$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 21678
5476a9a4
GM
21679 ;;
21680 esac
21681 fi
3e0be4ab 21682
5476a9a4
GM
21683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
21684$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
21685if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
21686 $as_echo_n "(cached) " >&6
21687else
5476a9a4
GM
21688
21689 gl_save_LIBS="$LIBS"
21690 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
21691 if test "$cross_compiling" = yes; then :
21692 case "$host_os" in
21693 cygwin*)
21694 gl_cv_func_pthread_sigmask_return_works="guessing no";;
21695 *)
21696 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
21697 esac
21698
21699else
21700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21701/* end confdefs.h. */
f199cab1 21702
5476a9a4
GM
21703#include <pthread.h>
21704#include <signal.h>
21705#include <stddef.h>
21706int main ()
3e0be4ab 21707{
5476a9a4
GM
21708 sigset_t set;
21709 sigemptyset (&set);
21710 if (pthread_sigmask (1729, &set, NULL) == -1)
21711 return 1;
3e0be4ab
GM
21712 return 0;
21713}
6d153f56 21714_ACEOF
5476a9a4
GM
21715if ac_fn_c_try_run "$LINENO"; then :
21716 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 21717else
5476a9a4 21718 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 21719fi
5476a9a4
GM
21720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21721 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21722fi
5476a9a4
GM
21723
21724 LIBS="$gl_save_LIBS"
21725
52724a05 21726fi
5476a9a4
GM
21727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
21728$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
21729 case "$gl_cv_func_pthread_sigmask_return_works" in
21730 *no)
21731 REPLACE_PTHREAD_SIGMASK=1
6d153f56 21732
5476a9a4 21733$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 21734
5476a9a4
GM
21735 ;;
21736 esac
cc322c06 21737
5476a9a4
GM
21738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
21739$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
21740if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
21741 $as_echo_n "(cached) " >&6
21742else
5476a9a4
GM
21743
21744 case "$host_os" in
21745 irix*)
21746 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
21747 *)
21748 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
21749 esac
21750 gl_save_LIBS="$LIBS"
21751 LIBS="$LIBS $LIBMULTITHREAD"
21752 if test "$cross_compiling" = yes; then :
21753 :
f199cab1 21754else
5476a9a4
GM
21755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21756/* end confdefs.h. */
6d153f56 21757
5476a9a4
GM
21758#include <pthread.h>
21759#include <signal.h>
21760#include <stdio.h>
21761#include <stdlib.h>
21762#include <unistd.h>
21763static volatile int sigint_occurred;
21764static void
21765sigint_handler (int sig)
21766{
21767 sigint_occurred++;
21768}
21769int main ()
21770{
21771 sigset_t set;
21772 int pid = getpid ();
21773 char command[80];
21774 signal (SIGINT, sigint_handler);
21775 sigemptyset (&set);
21776 sigaddset (&set, SIGINT);
21777 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
21778 return 1;
21779 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
21780 if (!(system (command) == 0))
21781 return 2;
21782 sleep (2);
21783 if (!(sigint_occurred == 0))
21784 return 3;
21785 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
21786 return 4;
21787 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
21788 return 5;
21789 return 0;
21790}
21791_ACEOF
21792if ac_fn_c_try_run "$LINENO"; then :
21793 :
21794else
21795 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 21796fi
5476a9a4
GM
21797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21798 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21799fi
5476a9a4
GM
21800
21801 LIBS="$gl_save_LIBS"
21802
f199cab1 21803fi
5476a9a4
GM
21804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
21805$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
21806 case "$gl_cv_func_pthread_sigmask_unblock_works" in
21807 *no)
21808 REPLACE_PTHREAD_SIGMASK=1
6d153f56 21809
5476a9a4 21810$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 21811
5476a9a4
GM
21812 ;;
21813 esac
6d153f56 21814 fi
6d153f56 21815
a6342fc8 21816 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 21817
a451f14b 21818
743c80a7
PE
21819
21820
21821
21822
21823
f199cab1 21824
5476a9a4 21825 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
21826
21827
5476a9a4 21828 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 21829
5476a9a4 21830$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 21831
5476a9a4 21832 fi
743c80a7 21833
a6342fc8 21834 fi
938a4ef9 21835
938a4ef9 21836
938a4ef9 21837
938a4ef9 21838
938a4ef9 21839
5476a9a4 21840 GNULIB_PTHREAD_SIGMASK=1
a451f14b 21841
a451f14b 21842
743c80a7
PE
21843
21844
21845
21846
21847
21848
5476a9a4
GM
21849 if test $ac_cv_func_readlink = no; then
21850 HAVE_READLINK=0
21851 else
21852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
21853$as_echo_n "checking whether readlink signature is correct... " >&6; }
21854if test "${gl_cv_decl_readlink_works+set}" = set; then :
3e0be4ab
GM
21855 $as_echo_n "(cached) " >&6
21856else
f199cab1 21857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21858/* end confdefs.h. */
5476a9a4
GM
21859#include <unistd.h>
21860 /* Cause compilation failure if original declaration has wrong type. */
21861 ssize_t readlink (const char *, char *, size_t);
f199cab1
GM
21862int
21863main ()
21864{
5476a9a4 21865
f199cab1
GM
21866 ;
21867 return 0;
21868}
3e0be4ab 21869_ACEOF
5476a9a4
GM
21870if ac_fn_c_try_compile "$LINENO"; then :
21871 gl_cv_decl_readlink_works=yes
21872else
21873 gl_cv_decl_readlink_works=no
3e0be4ab 21874fi
5476a9a4
GM
21875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21876fi
21877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
21878$as_echo "$gl_cv_decl_readlink_works" >&6; }
21879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
21880$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
21881if test "${gl_cv_func_readlink_works+set}" = set; then :
21882 $as_echo_n "(cached) " >&6
21883else
21884 # We have readlink, so assume ln -s works.
21885 ln -s conftest.no-such conftest.link
21886 ln -s conftest.link conftest.lnk2
21887 if test "$cross_compiling" = yes; then :
21888 case "$host_os" in
21889 # Guess yes on glibc systems.
21890 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
21891 # If we don't know, assume the worst.
21892 *) gl_cv_func_readlink_works="guessing no" ;;
21893 esac
21894
21895else
f199cab1 21896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 21897/* end confdefs.h. */
5476a9a4
GM
21898#include <unistd.h>
21899
f199cab1
GM
21900int
21901main ()
21902{
5476a9a4
GM
21903char buf[20];
21904 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
21905 ;
21906 return 0;
21907}
067d23c9 21908_ACEOF
5476a9a4
GM
21909if ac_fn_c_try_run "$LINENO"; then :
21910 gl_cv_func_readlink_works=yes
21911else
21912 gl_cv_func_readlink_works=no
067d23c9 21913fi
5476a9a4
GM
21914rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21915 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21916fi
067d23c9 21917
5476a9a4 21918 rm -f conftest.link conftest.lnk2
f199cab1 21919fi
5476a9a4
GM
21920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
21921$as_echo "$gl_cv_func_readlink_works" >&6; }
21922 case "$gl_cv_func_readlink_works" in
21923 *yes)
21924 if test "$gl_cv_decl_readlink_works" != yes; then
21925 REPLACE_READLINK=1
21926 fi
21927 ;;
21928 *)
067d23c9 21929
5476a9a4 21930$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 21931
5476a9a4
GM
21932 REPLACE_READLINK=1
21933 ;;
21934 esac
21935 fi
3e0be4ab 21936
a6342fc8 21937 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
21938
21939
21940
21941
3e0be4ab
GM
21942
21943
5476a9a4
GM
21944
21945
21946 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
21947
21948
21949 :
3e0be4ab 21950
a6342fc8 21951 fi
3e0be4ab 21952
067d23c9 21953
067d23c9 21954
067d23c9 21955
067d23c9 21956
5476a9a4 21957 GNULIB_READLINK=1
067d23c9 21958
067d23c9 21959
067d23c9 21960
067d23c9
KY
21961
21962
067d23c9 21963
369e19fc 21964
067d23c9 21965
5476a9a4
GM
21966
21967
21968
21969
21970
21971
21972
21973
21974 if test $gl_cv_have_include_next = yes; then
21975 gl_cv_next_signal_h='<'signal.h'>'
21976 else
21977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
21978$as_echo_n "checking absolute name of <signal.h>... " >&6; }
21979if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 21980 $as_echo_n "(cached) " >&6
0eb775a3 21981else
5476a9a4
GM
21982
21983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 21984/* end confdefs.h. */
5476a9a4 21985#include <signal.h>
f199cab1 21986
0eb775a3 21987_ACEOF
5476a9a4
GM
21988 case "$host_os" in
21989 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21990 *) gl_absname_cpp="$ac_cpp" ;;
21991 esac
0eb775a3 21992
5476a9a4
GM
21993 case "$host_os" in
21994 mingw*)
21995 gl_dirsep_regex='[/\\]'
21996 ;;
21997 *)
21998 gl_dirsep_regex='\/'
21999 ;;
22000 esac
22001 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 22002
5476a9a4
GM
22003 gl_header_literal_regex=`echo 'signal.h' \
22004 | sed -e "$gl_make_literal_regex_sed"`
22005 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22006 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22007 s|^/[^/]|//&|
22008 p
22009 q
22010 }'
22011 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22012 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 22013
f199cab1 22014
5476a9a4
GM
22015fi
22016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
22017$as_echo "$gl_cv_next_signal_h" >&6; }
22018 fi
22019 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 22020
5476a9a4
GM
22021 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22022 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22023 gl_next_as_first_directive='<'signal.h'>'
22024 else
22025 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22026 gl_next_as_first_directive=$gl_cv_next_signal_h
22027 fi
22028 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 22029
067d23c9
KY
22030
22031
067d23c9 22032
067d23c9 22033
5476a9a4
GM
22034# AIX declares sig_atomic_t to already include volatile, and C89 compilers
22035# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
22036 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
22037#include <signal.h>
22038
22039"
22040if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
22041
22042else
22043 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 22044fi
067d23c9 22045
067d23c9 22046
067d23c9 22047
067d23c9 22048
938a4ef9 22049
938a4ef9 22050
5476a9a4
GM
22051
22052 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
22053#include <signal.h>
22054
22055"
22056if test "x$ac_cv_type_sighandler_t" = x""yes; then :
22057
22058else
22059 HAVE_SIGHANDLER_T=0
22060fi
22061
22062
22063
22064
a6342fc8 22065 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
5476a9a4
GM
22066/* <sys/types.h> is not needed according to POSIX, but the
22067 <sys/socket.h> in i386-unknown-freebsd4.10 and
22068 powerpc-apple-darwin5.5 required it. */
22069#include <sys/types.h>
22070#if HAVE_SYS_SOCKET_H
22071# include <sys/socket.h>
22072#elif HAVE_WS2TCPIP_H
22073# include <ws2tcpip.h>
22074#endif
22075
22076"
22077if test "x$ac_cv_type_socklen_t" = x""yes; then :
22078
067d23c9 22079else
5476a9a4
GM
22080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
22081$as_echo_n "checking for socklen_t equivalent... " >&6; }
22082 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
22083 $as_echo_n "(cached) " >&6
22084else
22085 # Systems have either "struct sockaddr *" or
22086 # "void *" as the second argument to getpeername
22087 gl_cv_socklen_t_equiv=
22088 for arg2 in "struct sockaddr" void; do
22089 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
22090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22091/* end confdefs.h. */
5476a9a4
GM
22092#include <sys/types.h>
22093 #include <sys/socket.h>
22094
22095 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
22096int
22097main ()
22098{
5476a9a4
GM
22099$t len;
22100 getpeername (0, 0, &len);
f199cab1
GM
22101 ;
22102 return 0;
22103}
3e0be4ab 22104_ACEOF
5476a9a4
GM
22105if ac_fn_c_try_compile "$LINENO"; then :
22106 gl_cv_socklen_t_equiv="$t"
067d23c9 22107fi
5476a9a4
GM
22108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22109 test "$gl_cv_socklen_t_equiv" != "" && break
22110 done
22111 test "$gl_cv_socklen_t_equiv" != "" && break
22112 done
067d23c9 22113
5476a9a4 22114fi
067d23c9 22115
5476a9a4
GM
22116 if test "$gl_cv_socklen_t_equiv" = ""; then
22117 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
22118 fi
22119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
22120$as_echo "$gl_cv_socklen_t_equiv" >&6; }
22121
22122cat >>confdefs.h <<_ACEOF
22123#define socklen_t $gl_cv_socklen_t_equiv
22124_ACEOF
067d23c9 22125
f199cab1 22126fi
3e0be4ab 22127
3e0be4ab 22128
5476a9a4
GM
22129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
22130$as_echo_n "checking for ssize_t... " >&6; }
22131if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
22132 $as_echo_n "(cached) " >&6
22133else
5476a9a4 22134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22135/* end confdefs.h. */
5476a9a4 22136#include <sys/types.h>
f199cab1
GM
22137int
22138main ()
22139{
5476a9a4
GM
22140int x = sizeof (ssize_t *) + sizeof (ssize_t);
22141 return !x;
f199cab1
GM
22142 ;
22143 return 0;
22144}
22145_ACEOF
5476a9a4
GM
22146if ac_fn_c_try_compile "$LINENO"; then :
22147 gt_cv_ssize_t=yes
067d23c9 22148else
5476a9a4 22149 gt_cv_ssize_t=no
f199cab1 22150fi
5476a9a4 22151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 22152fi
5476a9a4
GM
22153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
22154$as_echo "$gt_cv_ssize_t" >&6; }
22155 if test $gt_cv_ssize_t = no; then
22156
22157$as_echo "#define ssize_t int" >>confdefs.h
22158
22159 fi
22160
22161
22162
22163
22164
5476a9a4
GM
22165 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>
22166 #include <sys/stat.h>
22167"
22168if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
22169
22170cat >>confdefs.h <<_ACEOF
22171#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
22172_ACEOF
22173
22174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
22175$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
22176if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
22177 $as_echo_n "(cached) " >&6
22178else
5476a9a4 22179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22180/* end confdefs.h. */
3e0be4ab 22181
5476a9a4
GM
22182 #include <sys/types.h>
22183 #include <sys/stat.h>
22184 #if HAVE_SYS_TIME_H
22185 # include <sys/time.h>
22186 #endif
22187 #include <time.h>
22188 struct timespec ts;
22189 struct stat st;
22190
f199cab1
GM
22191int
22192main ()
22193{
5476a9a4
GM
22194
22195 st.st_atim = ts;
22196
f199cab1
GM
22197 ;
22198 return 0;
22199}
3e0be4ab 22200_ACEOF
5476a9a4
GM
22201if ac_fn_c_try_compile "$LINENO"; then :
22202 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 22203else
5476a9a4 22204 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 22205fi
5476a9a4 22206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 22207fi
5476a9a4
GM
22208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
22209$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
22210 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 22211
5476a9a4 22212$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 22213
5476a9a4
GM
22214 fi
22215else
22216 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>
22217 #include <sys/stat.h>
22218"
22219if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 22220
5476a9a4
GM
22221cat >>confdefs.h <<_ACEOF
22222#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
22223_ACEOF
3e0be4ab 22224
0eb775a3 22225
3e0be4ab 22226else
5476a9a4
GM
22227 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
22228 #include <sys/stat.h>
22229"
22230if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
22231
22232cat >>confdefs.h <<_ACEOF
22233#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 22234_ACEOF
5476a9a4
GM
22235
22236
067d23c9 22237else
5476a9a4
GM
22238 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>
22239 #include <sys/stat.h>
22240"
22241if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
22242
22243cat >>confdefs.h <<_ACEOF
22244#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
22245_ACEOF
22246
22247
3e0be4ab 22248fi
5476a9a4 22249
067d23c9 22250fi
5476a9a4 22251
067d23c9 22252fi
067d23c9
KY
22253
22254fi
22255
067d23c9 22256
067d23c9 22257
067d23c9 22258
067d23c9 22259
5476a9a4
GM
22260 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>
22261 #include <sys/stat.h>
22262"
22263if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
22264
22265cat >>confdefs.h <<_ACEOF
22266#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
22267_ACEOF
067d23c9
KY
22268
22269
f199cab1 22270else
5476a9a4
GM
22271 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
22272 #include <sys/stat.h>
22273"
22274if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 22275
5476a9a4
GM
22276cat >>confdefs.h <<_ACEOF
22277#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
22278_ACEOF
067d23c9 22279
3e0be4ab 22280
067d23c9 22281else
5476a9a4
GM
22282 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>
22283 #include <sys/stat.h>
22284"
22285if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 22286
5476a9a4
GM
22287cat >>confdefs.h <<_ACEOF
22288#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 22289_ACEOF
5476a9a4
GM
22290
22291
f199cab1 22292fi
5476a9a4 22293
f199cab1 22294fi
5476a9a4 22295
067d23c9 22296fi
0eb775a3 22297
0eb775a3 22298
0eb775a3 22299
5476a9a4
GM
22300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
22301$as_echo_n "checking for working stdalign.h... " >&6; }
22302if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 22303 $as_echo_n "(cached) " >&6
067d23c9 22304else
5476a9a4 22305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22306/* end confdefs.h. */
5476a9a4
GM
22307#include <stdalign.h>
22308 #include <stddef.h>
22309
22310 /* Test that alignof yields a result consistent with offsetof.
22311 This catches GCC bug 52023
22312 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
22313 #ifdef __cplusplus
22314 template <class t> struct alignof_helper { char a; t b; };
22315 # define ao(type) offsetof (alignof_helper<type>, b)
22316 #else
22317 # define ao(type) offsetof (struct { char a; type b; }, b)
22318 #endif
22319 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
22320 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
22321 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
22322
22323 /* Test _Alignas only on platforms where gnulib can help. */
22324 #if \
22325 (__GNUC__ || __IBMC__ || __IBMCPP__ \
22326 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
22327 int alignas (8) alignas_int = 1;
22328 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
22329 #endif
067d23c9 22330
f199cab1
GM
22331int
22332main ()
22333{
5476a9a4 22334
f199cab1
GM
22335 ;
22336 return 0;
22337}
22338_ACEOF
5476a9a4
GM
22339if ac_fn_c_try_compile "$LINENO"; then :
22340 gl_cv_header_working_stdalign_h=yes
f199cab1 22341else
5476a9a4 22342 gl_cv_header_working_stdalign_h=no
f199cab1 22343fi
5476a9a4 22344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 22345fi
5476a9a4
GM
22346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
22347$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 22348
5476a9a4
GM
22349 if test $gl_cv_header_working_stdalign_h = yes; then
22350 STDALIGN_H=''
22351 else
22352 STDALIGN_H='stdalign.h'
f199cab1 22353 fi
0eb775a3 22354
5476a9a4
GM
22355
22356 if test -n "$STDALIGN_H"; then
22357 GL_GENERATE_STDALIGN_H_TRUE=
22358 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 22359else
5476a9a4
GM
22360 GL_GENERATE_STDALIGN_H_TRUE='#'
22361 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 22362fi
0eb775a3
GM
22363
22364
22365
5476a9a4
GM
22366 STDARG_H=''
22367 NEXT_STDARG_H='<stdarg.h>'
22368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
22369$as_echo_n "checking for va_copy... " >&6; }
22370 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 22371 $as_echo_n "(cached) " >&6
5476a9a4
GM
22372else
22373
22374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22375/* end confdefs.h. */
22376#include <stdarg.h>
f199cab1
GM
22377int
22378main ()
22379{
5476a9a4
GM
22380
22381#ifndef va_copy
22382void (*func) (va_list, va_list) = va_copy;
22383#endif
22384
f199cab1
GM
22385 ;
22386 return 0;
22387}
22388_ACEOF
5476a9a4
GM
22389if ac_fn_c_try_compile "$LINENO"; then :
22390 gl_cv_func_va_copy=yes
f199cab1 22391else
5476a9a4 22392 gl_cv_func_va_copy=no
f199cab1 22393fi
5476a9a4 22394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22395fi
5476a9a4
GM
22396
22397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
22398$as_echo "$gl_cv_func_va_copy" >&6; }
22399 if test $gl_cv_func_va_copy = no; then
22400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22401/* end confdefs.h. */
22402#if defined _AIX && !defined __GNUC__
22403 AIX vaccine
22404 #endif
22405
22406_ACEOF
22407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22408 $EGREP "vaccine" >/dev/null 2>&1; then :
22409 gl_aixcc=yes
f199cab1 22410else
5476a9a4 22411 gl_aixcc=no
f199cab1 22412fi
5476a9a4 22413rm -f conftest*
0eb775a3 22414
5476a9a4
GM
22415 if test $gl_aixcc = yes; then
22416 STDARG_H=stdarg.h
0eb775a3
GM
22417
22418
5476a9a4
GM
22419
22420
22421
22422
22423
22424
22425 if test $gl_cv_have_include_next = yes; then
22426 gl_cv_next_stdarg_h='<'stdarg.h'>'
22427 else
22428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
22429$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
22430if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
22431 $as_echo_n "(cached) " >&6
22432else
5476a9a4
GM
22433
22434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22435/* end confdefs.h. */
5476a9a4 22436#include <stdarg.h>
0eb775a3 22437
f199cab1 22438_ACEOF
5476a9a4
GM
22439 case "$host_os" in
22440 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22441 *) gl_absname_cpp="$ac_cpp" ;;
22442 esac
22443
22444 case "$host_os" in
22445 mingw*)
22446 gl_dirsep_regex='[/\\]'
22447 ;;
22448 *)
22449 gl_dirsep_regex='\/'
22450 ;;
22451 esac
22452 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22453
22454 gl_header_literal_regex=`echo 'stdarg.h' \
22455 | sed -e "$gl_make_literal_regex_sed"`
22456 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22457 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22458 s|^/[^/]|//&|
22459 p
22460 q
22461 }'
22462 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22463 sed -n "$gl_absolute_header_sed"`'"'
22464
22465
f199cab1 22466fi
5476a9a4
GM
22467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
22468$as_echo "$gl_cv_next_stdarg_h" >&6; }
22469 fi
22470 NEXT_STDARG_H=$gl_cv_next_stdarg_h
22471
22472 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22473 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22474 gl_next_as_first_directive='<'stdarg.h'>'
22475 else
22476 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22477 gl_next_as_first_directive=$gl_cv_next_stdarg_h
22478 fi
22479 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
22480
22481
22482
5476a9a4
GM
22483
22484 if test "$gl_cv_next_stdarg_h" = '""'; then
22485 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
22486 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
22487 fi
f199cab1 22488 else
5476a9a4
GM
22489
22490 saved_as_echo_n="$as_echo_n"
22491 as_echo_n=':'
22492 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
22493 $as_echo_n "(cached) " >&6
22494else
0eb775a3 22495
5476a9a4
GM
22496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22497/* end confdefs.h. */
22498#include <stdarg.h>
f199cab1
GM
22499int
22500main ()
22501{
5476a9a4
GM
22502
22503#ifndef __va_copy
22504error, bail out
22505#endif
22506
f199cab1
GM
22507 ;
22508 return 0;
22509}
22510_ACEOF
5476a9a4
GM
22511if ac_fn_c_try_compile "$LINENO"; then :
22512 gl_cv_func___va_copy=yes
f199cab1 22513else
5476a9a4 22514 gl_cv_func___va_copy=no
f199cab1 22515fi
5476a9a4 22516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22517fi
0eb775a3 22518
5476a9a4
GM
22519 as_echo_n="$saved_as_echo_n"
22520
22521 if test $gl_cv_func___va_copy = yes; then
22522
22523$as_echo "#define va_copy __va_copy" >>confdefs.h
22524
22525 else
0eb775a3 22526
5476a9a4
GM
22527
22528$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 22529
f199cab1
GM
22530 fi
22531 fi
5476a9a4
GM
22532 fi
22533
22534 if test -n "$STDARG_H"; then
22535 GL_GENERATE_STDARG_H_TRUE=
22536 GL_GENERATE_STDARG_H_FALSE='#'
22537else
22538 GL_GENERATE_STDARG_H_TRUE='#'
22539 GL_GENERATE_STDARG_H_FALSE=
22540fi
22541
22542
22543
22544
22545
22546
22547 # Define two additional variables used in the Makefile substitution.
22548
22549 if test "$ac_cv_header_stdbool_h" = yes; then
22550 STDBOOL_H=''
22551 else
22552 STDBOOL_H='stdbool.h'
22553 fi
22554
22555 if test -n "$STDBOOL_H"; then
22556 GL_GENERATE_STDBOOL_H_TRUE=
22557 GL_GENERATE_STDBOOL_H_FALSE='#'
22558else
22559 GL_GENERATE_STDBOOL_H_TRUE='#'
22560 GL_GENERATE_STDBOOL_H_FALSE=
22561fi
22562
22563
22564 if test "$ac_cv_type__Bool" = yes; then
22565 HAVE__BOOL=1
22566 else
22567 HAVE__BOOL=0
22568 fi
22569
22570
22571
22572
22573
22574 STDDEF_H=
22575 if test $gt_cv_c_wchar_t = no; then
22576 HAVE_WCHAR_T=0
22577 STDDEF_H=stddef.h
22578 fi
22579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
22580$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
22581if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
22582 $as_echo_n "(cached) " >&6
22583else
5476a9a4 22584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22585/* end confdefs.h. */
5476a9a4
GM
22586#include <stddef.h>
22587 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 22588
f199cab1
GM
22589int
22590main ()
22591{
5476a9a4 22592
f199cab1
GM
22593 ;
22594 return 0;
22595}
22596_ACEOF
5476a9a4
GM
22597if ac_fn_c_try_compile "$LINENO"; then :
22598 gl_cv_decl_null_works=yes
f199cab1 22599else
5476a9a4 22600 gl_cv_decl_null_works=no
f199cab1 22601fi
5476a9a4 22602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22603fi
5476a9a4
GM
22604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
22605$as_echo "$gl_cv_decl_null_works" >&6; }
22606 if test $gl_cv_decl_null_works = no; then
22607 REPLACE_NULL=1
22608 STDDEF_H=stddef.h
22609 fi
22610
22611 if test -n "$STDDEF_H"; then
22612 GL_GENERATE_STDDEF_H_TRUE=
22613 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 22614else
5476a9a4
GM
22615 GL_GENERATE_STDDEF_H_TRUE='#'
22616 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 22617fi
3e0be4ab 22618
5476a9a4 22619 if test -n "$STDDEF_H"; then
3e0be4ab
GM
22620
22621
5476a9a4
GM
22622
22623
22624
22625
22626
22627
22628 if test $gl_cv_have_include_next = yes; then
22629 gl_cv_next_stddef_h='<'stddef.h'>'
22630 else
22631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
22632$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
22633if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
22634 $as_echo_n "(cached) " >&6
22635else
5476a9a4
GM
22636
22637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 22638/* end confdefs.h. */
5476a9a4 22639#include <stddef.h>
f199cab1 22640
067d23c9 22641_ACEOF
5476a9a4
GM
22642 case "$host_os" in
22643 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22644 *) gl_absname_cpp="$ac_cpp" ;;
22645 esac
22646
22647 case "$host_os" in
22648 mingw*)
22649 gl_dirsep_regex='[/\\]'
22650 ;;
22651 *)
22652 gl_dirsep_regex='\/'
22653 ;;
22654 esac
22655 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22656
22657 gl_header_literal_regex=`echo 'stddef.h' \
22658 | sed -e "$gl_make_literal_regex_sed"`
22659 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22660 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22661 s|^/[^/]|//&|
22662 p
22663 q
22664 }'
22665 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22666 sed -n "$gl_absolute_header_sed"`'"'
22667
22668
f199cab1 22669fi
5476a9a4
GM
22670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
22671$as_echo "$gl_cv_next_stddef_h" >&6; }
22672 fi
22673 NEXT_STDDEF_H=$gl_cv_next_stddef_h
22674
22675 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22676 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22677 gl_next_as_first_directive='<'stddef.h'>'
22678 else
22679 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22680 gl_next_as_first_directive=$gl_cv_next_stddef_h
22681 fi
22682 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
22683
f199cab1 22684
f199cab1 22685
f199cab1 22686
067d23c9 22687 fi
067d23c9 22688
f199cab1 22689
067d23c9 22690
067d23c9 22691
067d23c9 22692
067d23c9
KY
22693
22694
067d23c9 22695
067d23c9
KY
22696
22697
067d23c9 22698
3e0be4ab 22699
5476a9a4
GM
22700
22701 if test $gl_cv_have_include_next = yes; then
22702 gl_cv_next_stdio_h='<'stdio.h'>'
22703 else
22704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
22705$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
22706if test "${gl_cv_next_stdio_h+set}" = set; then :
22707 $as_echo_n "(cached) " >&6
f199cab1 22708else
5476a9a4
GM
22709
22710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22711/* end confdefs.h. */
22712#include <stdio.h>
22713
f199cab1 22714_ACEOF
5476a9a4
GM
22715 case "$host_os" in
22716 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22717 *) gl_absname_cpp="$ac_cpp" ;;
22718 esac
067d23c9 22719
5476a9a4
GM
22720 case "$host_os" in
22721 mingw*)
22722 gl_dirsep_regex='[/\\]'
22723 ;;
22724 *)
22725 gl_dirsep_regex='\/'
22726 ;;
22727 esac
22728 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22729
22730 gl_header_literal_regex=`echo 'stdio.h' \
22731 | sed -e "$gl_make_literal_regex_sed"`
22732 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22733 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22734 s|^/[^/]|//&|
22735 p
22736 q
22737 }'
22738 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22739 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 22740
067d23c9 22741
f199cab1 22742fi
5476a9a4
GM
22743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
22744$as_echo "$gl_cv_next_stdio_h" >&6; }
22745 fi
22746 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 22747
5476a9a4
GM
22748 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22749 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22750 gl_next_as_first_directive='<'stdio.h'>'
22751 else
22752 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22753 gl_next_as_first_directive=$gl_cv_next_stdio_h
22754 fi
22755 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
22756
22757
22758
22759
22760
22761 GNULIB_FSCANF=1
22762
22763
22764cat >>confdefs.h <<_ACEOF
22765#define GNULIB_FSCANF 1
22766_ACEOF
067d23c9 22767
067d23c9 22768
5476a9a4 22769 GNULIB_SCANF=1
f199cab1 22770
f199cab1 22771
5476a9a4
GM
22772cat >>confdefs.h <<_ACEOF
22773#define GNULIB_SCANF 1
f199cab1
GM
22774_ACEOF
22775
067d23c9 22776
5476a9a4
GM
22777 GNULIB_FGETC=1
22778 GNULIB_GETC=1
22779 GNULIB_GETCHAR=1
22780 GNULIB_FGETS=1
22781 GNULIB_FREAD=1
067d23c9 22782
067d23c9 22783
5476a9a4
GM
22784 GNULIB_FPRINTF=1
22785 GNULIB_PRINTF=1
22786 GNULIB_VFPRINTF=1
22787 GNULIB_VPRINTF=1
22788 GNULIB_FPUTC=1
22789 GNULIB_PUTC=1
22790 GNULIB_PUTCHAR=1
22791 GNULIB_FPUTS=1
22792 GNULIB_PUTS=1
22793 GNULIB_FWRITE=1
067d23c9 22794
067d23c9 22795
067d23c9 22796
067d23c9 22797
067d23c9 22798
067d23c9 22799
067d23c9 22800
067d23c9 22801
3e0be4ab
GM
22802
22803
22804
22805
22806
22807
3e0be4ab 22808
5476a9a4
GM
22809 if test $gl_cv_have_include_next = yes; then
22810 gl_cv_next_stdlib_h='<'stdlib.h'>'
22811 else
22812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
22813$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
22814if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
22815 $as_echo_n "(cached) " >&6
22816else
5476a9a4
GM
22817
22818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22819/* end confdefs.h. */
5476a9a4
GM
22820#include <stdlib.h>
22821
f199cab1 22822_ACEOF
5476a9a4
GM
22823 case "$host_os" in
22824 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22825 *) gl_absname_cpp="$ac_cpp" ;;
22826 esac
067d23c9 22827
5476a9a4
GM
22828 case "$host_os" in
22829 mingw*)
22830 gl_dirsep_regex='[/\\]'
22831 ;;
22832 *)
22833 gl_dirsep_regex='\/'
22834 ;;
22835 esac
22836 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22837
22838 gl_header_literal_regex=`echo 'stdlib.h' \
22839 | sed -e "$gl_make_literal_regex_sed"`
22840 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22841 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22842 s|^/[^/]|//&|
22843 p
22844 q
22845 }'
22846 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22847 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 22848
067d23c9 22849
f199cab1 22850fi
5476a9a4
GM
22851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
22852$as_echo "$gl_cv_next_stdlib_h" >&6; }
22853 fi
22854 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 22855
5476a9a4
GM
22856 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22857 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22858 gl_next_as_first_directive='<'stdlib.h'>'
22859 else
22860 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22861 gl_next_as_first_directive=$gl_cv_next_stdlib_h
22862 fi
22863 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 22864
067d23c9 22865
067d23c9 22866
067d23c9 22867
067d23c9 22868
067d23c9 22869
067d23c9 22870
067d23c9 22871
067d23c9 22872
5476a9a4 22873 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 22874
067d23c9 22875
067d23c9 22876
b0415a03
GM
22877
22878
ac1ca7e9 22879
0eb775a3 22880
5476a9a4 22881$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 22882
067d23c9 22883
a0a61e58
GM
22884
22885
22886
3e0be4ab 22887
5476a9a4
GM
22888
22889
22890 if test "$ac_cv_have_decl_strtoimax" != yes; then
22891 HAVE_DECL_STRTOIMAX=0
22892 fi
22893
22894 if test $ac_cv_func_strtoimax = yes; then
22895 HAVE_STRTOIMAX=1
22896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
22897$as_echo_n "checking whether strtoimax works... " >&6; }
22898if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
22899 $as_echo_n "(cached) " >&6
22900else
22901 if test "$cross_compiling" = yes; then :
5476a9a4
GM
22902 case "$host_os" in
22903 # Guess no on AIX 5.
22904 aix5*) gl_cv_func_strtoimax="guessing no" ;;
22905 # Guess yes otherwise.
22906 *) gl_cv_func_strtoimax="guessing yes" ;;
22907 esac
22908
f199cab1
GM
22909else
22910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22911/* end confdefs.h. */
3e0be4ab 22912
5476a9a4
GM
22913#include <errno.h>
22914#include <string.h>
22915#include <inttypes.h>
22916int main ()
22917{
22918 if (sizeof (intmax_t) > sizeof (int))
22919 {
22920 const char *s = "4294967295";
22921 char *p;
22922 intmax_t res;
22923 errno = 0;
22924 res = strtoimax (s, &p, 10);
22925 if (p != s + strlen (s))
22926 return 1;
22927 if (errno != 0)
22928 return 2;
22929 if (res != (intmax_t) 65535 * (intmax_t) 65537)
22930 return 3;
22931 }
22932 else
22933 {
22934 const char *s = "2147483647";
22935 char *p;
22936 intmax_t res;
22937 errno = 0;
22938 res = strtoimax (s, &p, 10);
22939 if (p != s + strlen (s))
22940 return 1;
22941 if (errno != 0)
22942 return 2;
22943 if (res != 2147483647)
22944 return 3;
22945 }
f199cab1
GM
22946 return 0;
22947}
5476a9a4 22948
f199cab1
GM
22949_ACEOF
22950if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 22951 gl_cv_func_strtoimax=yes
f199cab1 22952else
5476a9a4 22953 gl_cv_func_strtoimax=no
f199cab1
GM
22954fi
22955rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22956 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
22957fi
22958
3e0be4ab 22959
f199cab1 22960fi
5476a9a4
GM
22961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
22962$as_echo "$gl_cv_func_strtoimax" >&6; }
22963 case "$gl_cv_func_strtoimax" in
22964 *no) REPLACE_STRTOIMAX=1 ;;
22965 esac
22966 else
22967 HAVE_STRTOIMAX=0
22968 fi
067d23c9 22969
a6342fc8 22970 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 22971
067d23c9 22972
067d23c9 22973
067d23c9 22974
067d23c9 22975
3e0be4ab 22976
2b1928b8
GM
22977
22978
5476a9a4
GM
22979 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
22980
22981
22982 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
22983if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
22984 ac_have_decl=1
f199cab1 22985else
5476a9a4 22986 ac_have_decl=0
f199cab1 22987fi
2b1928b8 22988
5476a9a4
GM
22989cat >>confdefs.h <<_ACEOF
22990#define HAVE_DECL_STRTOLL $ac_have_decl
22991_ACEOF
22992
22993
067d23c9 22994
a6342fc8 22995 fi
067d23c9 22996
3e0be4ab
GM
22997
22998
22999
3e0be4ab 23000
5476a9a4 23001 GNULIB_STRTOIMAX=1
3e0be4ab
GM
23002
23003
23004
23005
3e0be4ab
GM
23006
23007
23008
f199cab1 23009
f199cab1 23010
5476a9a4
GM
23011 if test "$ac_cv_have_decl_strtoumax" != yes; then
23012 HAVE_DECL_STRTOUMAX=0
23013 fi
067d23c9 23014
a6342fc8 23015 if test $ac_cv_func_strtoumax = no; then
0eb775a3 23016
5476a9a4
GM
23017
23018
23019
23020
23021
23022
23023
23024 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
23025
23026
23027 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
23028if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
23029 ac_have_decl=1
067d23c9 23030else
5476a9a4 23031 ac_have_decl=0
067d23c9 23032fi
5476a9a4
GM
23033
23034cat >>confdefs.h <<_ACEOF
23035#define HAVE_DECL_STRTOULL $ac_have_decl
23036_ACEOF
23037
23038
23039
a6342fc8 23040 fi
067d23c9 23041
067d23c9 23042
067d23c9 23043
067d23c9 23044
067d23c9 23045
5476a9a4
GM
23046 GNULIB_STRTOUMAX=1
23047
23048
23049
23050
23051
23052
23053
23054 if test $ac_cv_func_symlink = no; then
23055 HAVE_SYMLINK=0
23056 else
23057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
23058$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
23059if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 23060 $as_echo_n "(cached) " >&6
5476a9a4
GM
23061else
23062 if test "$cross_compiling" = yes; then :
23063 case "$host_os" in
23064 # Guess yes on glibc systems.
23065 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
23066 # If we don't know, assume the worst.
23067 *) gl_cv_func_symlink_works="guessing no" ;;
23068 esac
23069
f199cab1
GM
23070else
23071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23072/* end confdefs.h. */
5476a9a4
GM
23073#include <unistd.h>
23074
f199cab1
GM
23075int
23076main ()
23077{
5476a9a4
GM
23078int result = 0;
23079 if (!symlink ("a", "conftest.link/"))
23080 result |= 1;
23081 if (symlink ("conftest.f", "conftest.lnk2"))
23082 result |= 2;
23083 else if (!symlink ("a", "conftest.lnk2/"))
23084 result |= 4;
23085 return result;
067d23c9 23086
f199cab1
GM
23087 ;
23088 return 0;
23089}
23090_ACEOF
5476a9a4
GM
23091if ac_fn_c_try_run "$LINENO"; then :
23092 gl_cv_func_symlink_works=yes
f199cab1 23093else
5476a9a4 23094 gl_cv_func_symlink_works=no
f199cab1 23095fi
5476a9a4
GM
23096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23097 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 23098fi
067d23c9 23099
5476a9a4 23100 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 23101fi
5476a9a4
GM
23102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
23103$as_echo "$gl_cv_func_symlink_works" >&6; }
23104 case "$gl_cv_func_symlink_works" in
23105 *yes) ;;
23106 *)
23107 REPLACE_SYMLINK=1
23108 ;;
23109 esac
23110 fi
067d23c9 23111
a6342fc8 23112 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 23113
7e723570 23114
7e723570
GM
23115
23116
dd0d840e 23117
dd0d840e
GM
23118
23119
23120
5476a9a4 23121 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 23122
a6342fc8 23123 fi
dd0d840e
GM
23124
23125
d3127c14
GM
23126
23127
d3127c14 23128
5476a9a4 23129 GNULIB_SYMLINK=1
d3127c14 23130
d3127c14 23131
d3127c14
GM
23132
23133
067d23c9 23134
067d23c9 23135
d3127c14 23136
d3127c14 23137
5476a9a4
GM
23138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
23139$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
23140if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
23141 $as_echo_n "(cached) " >&6
23142else
d3127c14 23143
5476a9a4
GM
23144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23145/* end confdefs.h. */
23146#include <sys/select.h>
23147int
23148main ()
23149{
23150struct timeval b;
23151 ;
23152 return 0;
23153}
23154_ACEOF
23155if ac_fn_c_try_compile "$LINENO"; then :
23156 gl_cv_header_sys_select_h_selfcontained=yes
23157else
23158 gl_cv_header_sys_select_h_selfcontained=no
23159fi
23160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23161 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
23162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23163/* end confdefs.h. */
23164#include <sys/select.h>
23165int
23166main ()
23167{
23168int memset; int bzero;
23169 ;
23170 return 0;
23171}
3e0be4ab 23172
5476a9a4
GM
23173_ACEOF
23174if ac_fn_c_try_compile "$LINENO"; then :
23175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23176/* end confdefs.h. */
23177#include <sys/select.h>
23178int
23179main ()
23180{
dd0d840e 23181
5476a9a4
GM
23182 #undef memset
23183 #define memset nonexistent_memset
23184 extern
23185 #ifdef __cplusplus
23186 "C"
23187 #endif
23188 void *memset (void *, int, unsigned long);
23189 #undef bzero
23190 #define bzero nonexistent_bzero
23191 extern
23192 #ifdef __cplusplus
23193 "C"
23194 #endif
23195 void bzero (void *, unsigned long);
23196 fd_set fds;
23197 FD_ZERO (&fds);
3e0be4ab 23198
5476a9a4
GM
23199 ;
23200 return 0;
23201}
067d23c9 23202
5476a9a4
GM
23203_ACEOF
23204if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 23205
5476a9a4
GM
23206else
23207 gl_cv_header_sys_select_h_selfcontained=no
23208fi
23209rm -f core conftest.err conftest.$ac_objext \
23210 conftest$ac_exeext conftest.$ac_ext
dd0d840e 23211
5476a9a4
GM
23212fi
23213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23214 fi
dd0d840e 23215
5476a9a4
GM
23216fi
23217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
23218$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 23219
dd0d840e
GM
23220
23221
dd0d840e
GM
23222
23223
dd0d840e
GM
23224
23225
23226
dd0d840e 23227
5476a9a4
GM
23228 if test $gl_cv_have_include_next = yes; then
23229 gl_cv_next_sys_select_h='<'sys/select.h'>'
23230 else
23231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
23232$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
23233if test "${gl_cv_next_sys_select_h+set}" = set; then :
23234 $as_echo_n "(cached) " >&6
23235else
dd0d840e 23236
5476a9a4 23237 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 23238
dd0d840e 23239
5476a9a4
GM
23240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23241/* end confdefs.h. */
23242#include <sys/select.h>
dd0d840e 23243
5476a9a4
GM
23244_ACEOF
23245 case "$host_os" in
23246 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23247 *) gl_absname_cpp="$ac_cpp" ;;
23248 esac
dd0d840e 23249
5476a9a4
GM
23250 case "$host_os" in
23251 mingw*)
23252 gl_dirsep_regex='[/\\]'
23253 ;;
23254 *)
23255 gl_dirsep_regex='\/'
23256 ;;
23257 esac
23258 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 23259
5476a9a4
GM
23260 gl_header_literal_regex=`echo 'sys/select.h' \
23261 | sed -e "$gl_make_literal_regex_sed"`
23262 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23263 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23264 s|^/[^/]|//&|
23265 p
23266 q
23267 }'
23268 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23269 sed -n "$gl_absolute_header_sed"`'"'
23270 else
23271 gl_cv_next_sys_select_h='<'sys/select.h'>'
23272 fi
067d23c9 23273
067d23c9 23274
5476a9a4
GM
23275fi
23276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
23277$as_echo "$gl_cv_next_sys_select_h" >&6; }
23278 fi
23279 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
23280
23281 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23282 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23283 gl_next_as_first_directive='<'sys/select.h'>'
23284 else
23285 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23286 gl_next_as_first_directive=$gl_cv_next_sys_select_h
23287 fi
23288 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
23289
23290
23291
23292
23293 if test $ac_cv_header_sys_select_h = yes; then
23294 HAVE_SYS_SELECT_H=1
23295 else
23296 HAVE_SYS_SELECT_H=0
23297 fi
067d23c9
KY
23298
23299
7e723570 23300
7e723570 23301
7e723570 23302
5476a9a4
GM
23303 if test $ac_cv_header_sys_socket_h != yes; then
23304 for ac_header in winsock2.h
23305do :
23306 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
23307if test "x$ac_cv_header_winsock2_h" = x""yes; then :
23308 cat >>confdefs.h <<_ACEOF
23309#define HAVE_WINSOCK2_H 1
23310_ACEOF
7e723570 23311
5476a9a4 23312fi
7e723570 23313
5476a9a4 23314done
7e723570 23315
5476a9a4
GM
23316 fi
23317 if test "$ac_cv_header_winsock2_h" = yes; then
23318 HAVE_WINSOCK2_H=1
23319 UNISTD_H_HAVE_WINSOCK2_H=1
23320 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
23321 else
23322 HAVE_WINSOCK2_H=0
23323 fi
7e723570
GM
23324
23325
dd0d840e 23326
dd0d840e 23327
dd0d840e
GM
23328
23329
dd0d840e 23330
dd0d840e 23331
dd0d840e
GM
23332
23333
23334
23335
23336
23337
23338
23339
dd0d840e 23340
dd0d840e 23341
dd0d840e 23342
dd0d840e 23343
dd0d840e 23344
dd0d840e 23345
5476a9a4
GM
23346 if test $gl_cv_have_include_next = yes; then
23347 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23348 else
23349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
23350$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
23351if test "${gl_cv_next_sys_stat_h+set}" = set; then :
23352 $as_echo_n "(cached) " >&6
23353else
dd0d840e 23354
5476a9a4 23355 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 23356
dd0d840e 23357
5476a9a4
GM
23358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23359/* end confdefs.h. */
23360#include <sys/stat.h>
dd0d840e 23361
5476a9a4
GM
23362_ACEOF
23363 case "$host_os" in
23364 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23365 *) gl_absname_cpp="$ac_cpp" ;;
23366 esac
dd0d840e 23367
5476a9a4
GM
23368 case "$host_os" in
23369 mingw*)
23370 gl_dirsep_regex='[/\\]'
23371 ;;
23372 *)
23373 gl_dirsep_regex='\/'
23374 ;;
23375 esac
23376 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 23377
5476a9a4
GM
23378 gl_header_literal_regex=`echo 'sys/stat.h' \
23379 | sed -e "$gl_make_literal_regex_sed"`
23380 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23381 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23382 s|^/[^/]|//&|
23383 p
23384 q
23385 }'
23386 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23387 sed -n "$gl_absolute_header_sed"`'"'
23388 else
23389 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
23390 fi
dd0d840e 23391
dd0d840e 23392
5476a9a4
GM
23393fi
23394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
23395$as_echo "$gl_cv_next_sys_stat_h" >&6; }
23396 fi
23397 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 23398
5476a9a4
GM
23399 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23400 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23401 gl_next_as_first_directive='<'sys/stat.h'>'
23402 else
23403 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23404 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
23405 fi
23406 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 23407
dd0d840e 23408
d3127c14 23409
d3127c14 23410
dd0d840e 23411
dd0d840e 23412
dd0d840e 23413
dd0d840e 23414
dd0d840e 23415
dd0d840e 23416
dd0d840e 23417
5476a9a4 23418 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 23419
5476a9a4 23420$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 23421
5476a9a4 23422 fi
dd0d840e 23423
5476a9a4
GM
23424 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
23425 #include <sys/stat.h>
23426"
23427if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 23428
5476a9a4 23429else
dd0d840e 23430
5476a9a4 23431$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 23432
5476a9a4 23433fi
dd0d840e 23434
dd0d840e 23435
dd0d840e 23436
dd0d840e 23437
dd0d840e 23438
dd0d840e 23439
dd0d840e 23440
c9ca3f76 23441
dd0d840e 23442
dd0d840e 23443
dd0d840e 23444
c9ca3f76 23445
dd0d840e 23446
dd0d840e
GM
23447
23448
7e723570
GM
23449
23450
7e723570 23451
5476a9a4
GM
23452 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
23453"
23454if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
23455 ac_have_decl=1
23456else
23457 ac_have_decl=0
23458fi
7e723570 23459
5476a9a4
GM
23460cat >>confdefs.h <<_ACEOF
23461#define HAVE_DECL_LOCALTIME_R $ac_have_decl
23462_ACEOF
7e723570 23463
5476a9a4
GM
23464 if test $ac_cv_have_decl_localtime_r = no; then
23465 HAVE_DECL_LOCALTIME_R=0
23466 fi
7e723570 23467
7e723570 23468
5476a9a4
GM
23469 if test $ac_cv_func_localtime_r = yes; then
23470 HAVE_LOCALTIME_R=1
23471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
23472$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
23473if test "${gl_cv_time_r_posix+set}" = set; then :
23474 $as_echo_n "(cached) " >&6
23475else
23476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23477/* end confdefs.h. */
23478#include <time.h>
7e723570
GM
23479int
23480main ()
23481{
5476a9a4
GM
23482/* We don't need to append 'restrict's to the argument types,
23483 even though the POSIX signature has the 'restrict's,
23484 since C99 says they can't affect type compatibility. */
23485 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
23486 if (ptr) return 0;
23487 /* Check the return type is a pointer.
23488 On HP-UX 10 it is 'int'. */
23489 *localtime_r (0, 0);
7e723570
GM
23490 ;
23491 return 0;
23492}
5476a9a4 23493
7e723570 23494_ACEOF
5476a9a4
GM
23495if ac_fn_c_try_compile "$LINENO"; then :
23496 gl_cv_time_r_posix=yes
7e723570 23497else
5476a9a4 23498 gl_cv_time_r_posix=no
7e723570 23499fi
5476a9a4 23500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 23501
5476a9a4
GM
23502fi
23503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
23504$as_echo "$gl_cv_time_r_posix" >&6; }
23505 if test $gl_cv_time_r_posix = yes; then
23506 REPLACE_LOCALTIME_R=0
23507 else
23508 REPLACE_LOCALTIME_R=1
23509 fi
23510 else
23511 HAVE_LOCALTIME_R=0
23512 fi
02bd7257 23513
a6342fc8 23514 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
23515
23516
02bd7257 23517
02bd7257 23518
02bd7257 23519
02bd7257 23520
7e723570 23521
7e723570 23522
5476a9a4
GM
23523 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
23524
23525
23526 :
7e723570 23527
a6342fc8 23528 fi
7e723570 23529
7e723570 23530
7e723570 23531
7e723570 23532
7e723570 23533
5476a9a4 23534 GNULIB_TIME_R=1
7e723570 23535
7e723570 23536
7e723570 23537
7e723570 23538
7e723570 23539
a6342fc8 23540 :
7e723570 23541
02bd7257 23542
02bd7257 23543
02bd7257 23544
02bd7257 23545
02bd7257 23546
02bd7257 23547
02bd7257 23548
dd0d840e
GM
23549
23550
23551
dd0d840e 23552
dd0d840e 23553
5476a9a4
GM
23554 if test $gl_cv_have_include_next = yes; then
23555 gl_cv_next_unistd_h='<'unistd.h'>'
23556 else
23557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
23558$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
23559if test "${gl_cv_next_unistd_h+set}" = set; then :
23560 $as_echo_n "(cached) " >&6
23561else
dd0d840e 23562
5476a9a4 23563 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 23564
dd0d840e 23565
5476a9a4 23566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23567/* end confdefs.h. */
5476a9a4 23568#include <unistd.h>
d3127c14 23569
5476a9a4
GM
23570_ACEOF
23571 case "$host_os" in
23572 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23573 *) gl_absname_cpp="$ac_cpp" ;;
23574 esac
d3127c14 23575
5476a9a4
GM
23576 case "$host_os" in
23577 mingw*)
23578 gl_dirsep_regex='[/\\]'
23579 ;;
23580 *)
23581 gl_dirsep_regex='\/'
23582 ;;
23583 esac
23584 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23585
23586 gl_header_literal_regex=`echo 'unistd.h' \
23587 | sed -e "$gl_make_literal_regex_sed"`
23588 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23589 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23590 s|^/[^/]|//&|
23591 p
23592 q
23593 }'
23594 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23595 sed -n "$gl_absolute_header_sed"`'"'
23596 else
23597 gl_cv_next_unistd_h='<'unistd.h'>'
23598 fi
d3127c14 23599
d3127c14 23600
c9ca3f76 23601fi
5476a9a4
GM
23602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
23603$as_echo "$gl_cv_next_unistd_h" >&6; }
23604 fi
23605 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 23606
5476a9a4
GM
23607 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23608 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23609 gl_next_as_first_directive='<'unistd.h'>'
23610 else
23611 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23612 gl_next_as_first_directive=$gl_cv_next_unistd_h
23613 fi
23614 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 23615
c9ca3f76 23616
c9ca3f76 23617
c9ca3f76 23618
5476a9a4
GM
23619 if test $ac_cv_header_unistd_h = yes; then
23620 HAVE_UNISTD_H=1
23621 else
23622 HAVE_UNISTD_H=0
23623 fi
c9ca3f76 23624
d3127c14 23625
dd0d840e 23626
dd0d840e 23627
d3127c14 23628
d3127c14 23629
dd0d840e
GM
23630
23631
c9ca3f76
GM
23632
23633
23634
23635
23636
c9ca3f76 23637
5476a9a4
GM
23638 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
23639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
23640$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
23641if test "${gl_cv_func_futimesat_works+set}" = set; then :
23642 $as_echo_n "(cached) " >&6
23643else
23644 touch conftest.file
23645 if test "$cross_compiling" = yes; then :
23646 case "$host_os" in
23647 # Guess yes on glibc systems.
23648 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
23649 # If we don't know, assume the worst.
23650 *) gl_cv_func_futimesat_works="guessing no" ;;
23651 esac
c9ca3f76 23652
5476a9a4
GM
23653else
23654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
23655/* end confdefs.h. */
23656
5476a9a4
GM
23657#include <stddef.h>
23658#include <sys/times.h>
23659#include <fcntl.h>
c9ca3f76
GM
23660
23661int
23662main ()
23663{
5476a9a4
GM
23664 int fd = open ("conftest.file", O_RDWR);
23665 if (fd < 0) return 1;
23666 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
23667
23668 ;
23669 return 0;
23670}
23671_ACEOF
5476a9a4
GM
23672if ac_fn_c_try_run "$LINENO"; then :
23673 gl_cv_func_futimesat_works=yes
c9ca3f76 23674else
5476a9a4 23675 gl_cv_func_futimesat_works=no
c9ca3f76 23676fi
5476a9a4
GM
23677rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23678 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
23679fi
23680
5476a9a4
GM
23681 rm -f conftest.file
23682fi
23683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
23684$as_echo "$gl_cv_func_futimesat_works" >&6; }
23685 case "$gl_cv_func_futimesat_works" in
23686 *yes) ;;
23687 *)
7e723570 23688
5476a9a4 23689$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 23690
5476a9a4
GM
23691 ;;
23692 esac
23693 fi
dd0d840e 23694
5476a9a4
GM
23695 gl_gnulib_enabled_dosname=false
23696 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
23697 gl_gnulib_enabled_pathmax=false
23698 gl_gnulib_enabled_stat=false
23699 gl_gnulib_enabled_strtoll=false
23700 gl_gnulib_enabled_strtoull=false
23701 gl_gnulib_enabled_verify=false
23702 func_gl_gnulib_m4code_dosname ()
23703 {
23704 if ! $gl_gnulib_enabled_dosname; then
23705 gl_gnulib_enabled_dosname=true
23706 fi
23707 }
23708 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
23709 {
23710 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
dd0d840e 23711
d3127c14 23712
5476a9a4
GM
23713 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
23714 fi
23715 }
23716 func_gl_gnulib_m4code_pathmax ()
23717 {
23718 if ! $gl_gnulib_enabled_pathmax; then
d3127c14
GM
23719
23720
23721
5476a9a4
GM
23722 gl_gnulib_enabled_pathmax=true
23723 fi
23724 }
23725 func_gl_gnulib_m4code_stat ()
23726 {
23727 if ! $gl_gnulib_enabled_stat; then
d3127c14 23728
d3127c14 23729
d3127c14 23730
5476a9a4
GM
23731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
23732$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
23733if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
23734 $as_echo_n "(cached) " >&6
23735else
23736 if test "$cross_compiling" = yes; then :
23737 case $host_os in
23738 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
23739 *) gl_cv_func_stat_dir_slash="guessing yes";;
23740 esac
23741else
23742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23743/* end confdefs.h. */
5476a9a4 23744#include <sys/stat.h>
d3127c14
GM
23745
23746int
23747main ()
23748{
5476a9a4 23749struct stat st; return stat (".", &st) != stat ("./", &st);
d3127c14
GM
23750 ;
23751 return 0;
23752}
23753_ACEOF
5476a9a4
GM
23754if ac_fn_c_try_run "$LINENO"; then :
23755 gl_cv_func_stat_dir_slash=yes
d3127c14 23756else
5476a9a4
GM
23757 gl_cv_func_stat_dir_slash=no
23758fi
23759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23760 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 23761fi
d3127c14 23762
5476a9a4
GM
23763fi
23764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
23765$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
23766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
23767$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
23768if test "${gl_cv_func_stat_file_slash+set}" = set; then :
23769 $as_echo_n "(cached) " >&6
23770else
23771 touch conftest.tmp
23772 # Assume that if we have lstat, we can also check symlinks.
23773 if test $ac_cv_func_lstat = yes; then
23774 ln -s conftest.tmp conftest.lnk
23775 fi
23776 if test "$cross_compiling" = yes; then :
23777 case "$host_os" in
23778 # Guess yes on glibc systems.
23779 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
23780 # If we don't know, assume the worst.
23781 *) gl_cv_func_stat_file_slash="guessing no" ;;
23782 esac
d3127c14 23783
5476a9a4
GM
23784else
23785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23786/* end confdefs.h. */
5476a9a4 23787#include <sys/stat.h>
d3127c14
GM
23788
23789int
23790main ()
23791{
5476a9a4
GM
23792int result = 0;
23793 struct stat st;
23794 if (!stat ("conftest.tmp/", &st))
23795 result |= 1;
23796#if HAVE_LSTAT
23797 if (!stat ("conftest.lnk/", &st))
23798 result |= 2;
23799#endif
23800 return result;
d3127c14
GM
23801
23802 ;
23803 return 0;
23804}
23805_ACEOF
5476a9a4
GM
23806if ac_fn_c_try_run "$LINENO"; then :
23807 gl_cv_func_stat_file_slash=yes
d3127c14 23808else
5476a9a4
GM
23809 gl_cv_func_stat_file_slash=no
23810fi
23811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23812 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 23813fi
d3127c14 23814
5476a9a4
GM
23815 rm -f conftest.tmp conftest.lnk
23816fi
23817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
23818$as_echo "$gl_cv_func_stat_file_slash" >&6; }
23819 case $gl_cv_func_stat_dir_slash in
23820 *no) REPLACE_STAT=1
d3127c14 23821
5476a9a4
GM
23822$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
23823;;
23824 esac
23825 case $gl_cv_func_stat_file_slash in
23826 *no) REPLACE_STAT=1
d3127c14 23827
5476a9a4
GM
23828$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
23829;;
23830 esac
d3127c14 23831
a6342fc8 23832 if test $REPLACE_STAT = 1; then
d3127c14 23833
dd0d840e 23834
dd0d840e 23835
dd0d840e 23836
dd0d840e 23837
dd0d840e 23838
067d23c9
KY
23839
23840
5476a9a4 23841 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9
KY
23842
23843
23844
5476a9a4 23845 :
067d23c9 23846
a6342fc8 23847 fi
067d23c9 23848
dd0d840e
GM
23849
23850
dd0d840e 23851
dd0d840e 23852
5476a9a4 23853 GNULIB_STAT=1
dd0d840e 23854
067d23c9
KY
23855
23856
23857
23858
5476a9a4
GM
23859 gl_gnulib_enabled_stat=true
23860 if test $REPLACE_STAT = 1; then
23861 func_gl_gnulib_m4code_dosname
23862 fi
23863 if test $REPLACE_STAT = 1; then
23864 func_gl_gnulib_m4code_pathmax
23865 fi
23866 if test $REPLACE_STAT = 1; then
23867 func_gl_gnulib_m4code_verify
23868 fi
23869 fi
23870 }
23871 func_gl_gnulib_m4code_strtoll ()
23872 {
23873 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
23874
23875
23876
5476a9a4
GM
23877 if test "$ac_cv_type_long_long_int" = yes; then
23878 for ac_func in strtoll
23879do :
23880 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
23881if test "x$ac_cv_func_strtoll" = x""yes; then :
23882 cat >>confdefs.h <<_ACEOF
23883#define HAVE_STRTOLL 1
23884_ACEOF
067d23c9 23885
5476a9a4
GM
23886fi
23887done
067d23c9 23888
5476a9a4
GM
23889 if test $ac_cv_func_strtoll = no; then
23890 HAVE_STRTOLL=0
23891 fi
23892 fi
067d23c9 23893
a6342fc8 23894 if test $HAVE_STRTOLL = 0; then
067d23c9
KY
23895
23896
23897
067d23c9
KY
23898
23899
23900
23901
23902
5476a9a4 23903 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
23904
23905
5476a9a4 23906 :
067d23c9 23907
a6342fc8 23908 fi
067d23c9
KY
23909
23910
23911
067d23c9 23912
067d23c9 23913
5476a9a4 23914 GNULIB_STRTOLL=1
067d23c9 23915
397f7161 23916
067d23c9
KY
23917
23918
067d23c9 23919
5476a9a4
GM
23920 gl_gnulib_enabled_strtoll=true
23921 fi
23922 }
23923 func_gl_gnulib_m4code_strtoull ()
23924 {
23925 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 23926
067d23c9 23927
067d23c9 23928
5476a9a4
GM
23929 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
23930 for ac_func in strtoull
23931do :
23932 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
23933if test "x$ac_cv_func_strtoull" = x""yes; then :
23934 cat >>confdefs.h <<_ACEOF
23935#define HAVE_STRTOULL 1
23936_ACEOF
067d23c9 23937
f199cab1 23938fi
5476a9a4 23939done
067d23c9 23940
5476a9a4
GM
23941 if test $ac_cv_func_strtoull = no; then
23942 HAVE_STRTOULL=0
23943 fi
23944 fi
067d23c9 23945
a6342fc8 23946 if test $HAVE_STRTOULL = 0; then
067d23c9
KY
23947
23948
067d23c9 23949
067d23c9 23950
067d23c9 23951
067d23c9 23952
067d23c9 23953
067d23c9 23954
5476a9a4 23955 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 23956
067d23c9 23957
5476a9a4 23958 :
067d23c9 23959
a6342fc8 23960 fi
067d23c9
KY
23961
23962
3e0be4ab 23963
3e0be4ab 23964
067d23c9 23965
5476a9a4 23966 GNULIB_STRTOULL=1
067d23c9 23967
a0a61e58 23968
067d23c9 23969
067d23c9
KY
23970
23971
5476a9a4
GM
23972 gl_gnulib_enabled_strtoull=true
23973 fi
23974 }
23975 func_gl_gnulib_m4code_verify ()
23976 {
23977 if ! $gl_gnulib_enabled_verify; then
23978 gl_gnulib_enabled_verify=true
23979 fi
23980 }
23981 if test $REPLACE_GETOPT = 1; then
23982 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
23983 fi
23984 if test $REPLACE_LSTAT = 1; then
23985 func_gl_gnulib_m4code_dosname
23986 fi
23987 if test $REPLACE_LSTAT = 1; then
23988 func_gl_gnulib_m4code_stat
23989 fi
23990 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
23991 func_gl_gnulib_m4code_stat
23992 fi
23993 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
23994 func_gl_gnulib_m4code_strtoll
23995 fi
23996 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
23997 func_gl_gnulib_m4code_verify
23998 fi
23999 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
24000 func_gl_gnulib_m4code_strtoull
24001 fi
24002 if test $ac_cv_func_strtoumax = no; then
24003 func_gl_gnulib_m4code_verify
24004 fi
067d23c9 24005
5476a9a4
GM
24006 if $gl_gnulib_enabled_dosname; then
24007 gl_GNULIB_ENABLED_dosname_TRUE=
24008 gl_GNULIB_ENABLED_dosname_FALSE='#'
24009else
24010 gl_GNULIB_ENABLED_dosname_TRUE='#'
24011 gl_GNULIB_ENABLED_dosname_FALSE=
24012fi
067d23c9 24013
5476a9a4
GM
24014 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
24015 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
24016 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
24017else
24018 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
24019 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
24020fi
067d23c9 24021
5476a9a4
GM
24022 if $gl_gnulib_enabled_pathmax; then
24023 gl_GNULIB_ENABLED_pathmax_TRUE=
24024 gl_GNULIB_ENABLED_pathmax_FALSE='#'
24025else
24026 gl_GNULIB_ENABLED_pathmax_TRUE='#'
24027 gl_GNULIB_ENABLED_pathmax_FALSE=
24028fi
067d23c9 24029
5476a9a4
GM
24030 if $gl_gnulib_enabled_stat; then
24031 gl_GNULIB_ENABLED_stat_TRUE=
24032 gl_GNULIB_ENABLED_stat_FALSE='#'
24033else
24034 gl_GNULIB_ENABLED_stat_TRUE='#'
24035 gl_GNULIB_ENABLED_stat_FALSE=
24036fi
067d23c9 24037
5476a9a4
GM
24038 if $gl_gnulib_enabled_strtoll; then
24039 gl_GNULIB_ENABLED_strtoll_TRUE=
24040 gl_GNULIB_ENABLED_strtoll_FALSE='#'
24041else
24042 gl_GNULIB_ENABLED_strtoll_TRUE='#'
24043 gl_GNULIB_ENABLED_strtoll_FALSE=
24044fi
067d23c9 24045
5476a9a4
GM
24046 if $gl_gnulib_enabled_strtoull; then
24047 gl_GNULIB_ENABLED_strtoull_TRUE=
24048 gl_GNULIB_ENABLED_strtoull_FALSE='#'
24049else
24050 gl_GNULIB_ENABLED_strtoull_TRUE='#'
24051 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 24052fi
067d23c9 24053
5476a9a4
GM
24054 if $gl_gnulib_enabled_verify; then
24055 gl_GNULIB_ENABLED_verify_TRUE=
24056 gl_GNULIB_ENABLED_verify_FALSE='#'
24057else
24058 gl_GNULIB_ENABLED_verify_TRUE='#'
24059 gl_GNULIB_ENABLED_verify_FALSE=
24060fi
067d23c9 24061
5476a9a4 24062 # End of code from modules
067d23c9 24063
067d23c9 24064
067d23c9 24065
067d23c9 24066
f199cab1 24067
f199cab1
GM
24068
24069
067d23c9 24070
5476a9a4
GM
24071
24072 gltests_libdeps=
24073 gltests_ltlibdeps=
067d23c9 24074
067d23c9 24075
067d23c9
KY
24076
24077
067d23c9
KY
24078
24079
3e0be4ab 24080
3e0be4ab 24081
3e0be4ab 24082
5476a9a4
GM
24083 gl_source_base='tests'
24084 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 24085
5476a9a4 24086 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
24087
24088
24089
24090
24091
067d23c9
KY
24092
24093
24094
3e0be4ab 24095
3e0be4ab 24096
5476a9a4
GM
24097 LIBGNU_LIBDEPS="$gl_libdeps"
24098
24099 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
24100
067d23c9 24101
5476a9a4
GM
24102CFLAGS=$SAVE_CFLAGS
24103LIBS=$SAVE_LIBS
067d23c9
KY
24104
24105case "$opsys" in
24106 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
24107
24108 darwin)
24109 ## The -headerpad option tells ld (see man page) to leave room at the
24110 ## end of the header for adding load commands. Needed for dumping.
24111 ## 0x690 is the total size of 30 segment load commands (at 56
24112 ## each); under Cocoa 31 commands are required.
24113 if test "$HAVE_NS" = "yes"; then
24114 libs_nsgui="-framework AppKit"
24115 headerpad_extra=6C8
24116 else
24117 libs_nsgui=
24118 headerpad_extra=690
24119 fi
85cf5029 24120 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
24121
24122 ## This is here because src/Makefile.in did some extra fiddling around
24123 ## with LD_SWITCH_SYSTEM. The cpp logic was:
24124 ## #ifndef LD_SWITCH_SYSTEM
24125 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
24126 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
42bbbe8b 24127 ## not using gcc, darwin.
067d23c9
KY
24128 ## Because this was done in src/Makefile.in, the resulting part of
24129 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
24130 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
24131 ## rather than LD_SWITCH_SYSTEM.
24132 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
24133 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
24134 ;;
24135
ae629dae
GM
24136 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
24137 ## find X at run-time.
24138 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
24139 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
24140 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
24141 ## had different values in configure (in ac_link) and src/Makefile.in.
24142 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 24143 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9
KY
24144
24145 *) LD_SWITCH_SYSTEM_TEMACS= ;;
24146esac
24147
24148if test "$NS_IMPL_GNUSTEP" = "yes"; then
24149 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
24150fi
24151
24152
24153
24154
24155LD_FIRSTFLAG=
24156ORDINARY_LINK=
24157case "$opsys" in
24158 ## gnu: GNU needs its own crt0.
24159 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
24160
24161 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
24162 ## library search parth, i.e. it won't search /usr/lib for libc and
24163 ## friends. Using -nostartfiles instead avoids this problem, and
24164 ## will also work on earlier NetBSD releases.
24165 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
24166
42bbbe8b 24167 ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
067d23c9 24168 ## MkLinux/LinuxPPC needs this.
42bbbe8b 24169 ## s390x-* only supports opsys = gnu-linux so it can be added here.
067d23c9 24170 gnu-*)
42bbbe8b
GM
24171 case "$canonical" in
24172 powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
067d23c9
KY
24173 esac
24174 ;;
24175esac
24176
24177
24178if test "x$ORDINARY_LINK" = "xyes"; then
24179
24180 LD_FIRSTFLAG=""
24181
24182$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
24183
24184
24185## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
42bbbe8b 24186## freebsd, gnu-* not on powerpc*|s390x*.
067d23c9
KY
24187elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
24188
24189 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
24190 ## places that are difficult to figure out at make time. Fortunately,
24191 ## these same versions allow you to pass arbitrary flags on to the
24192 ## linker, so there is no reason not to use it as a linker.
24193 ##
24194 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
24195 ## searching for libraries in its internal directories, so we have to
24196 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
24197 LD_FIRSTFLAG="-nostdlib"
24198fi
24199
24200## FIXME? What setting of EDIT_LDFLAGS should this have?
24201test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
24202
24203
24204
24205
24206## FIXME? The logic here is not precisely the same as that above.
24207## There is no check here for a pre-defined LD_FIRSTFLAG.
24208## Should we only be setting LIB_GCC if LD ~ -nostdlib?
24209LIB_GCC=
24210if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
24211
24212 case "$opsys" in
24213 freebsd|netbsd|openbsd) LIB_GCC= ;;
24214
24215 gnu-*)
24216 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
24217 ## build on ARM EABI under GNU/Linux. (Bug#5518)
d6a003a8
AS
24218 case $host_cpu in
24219 arm*)
067d23c9 24220 LIB_GCC="-lgcc_s"
d6a003a8
AS
24221 ;;
24222 *)
067d23c9
KY
24223 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
24224 ## immediately undefine it again and redefine it to empty.
24225 ## Was the C_SWITCH_X_SITE part really necessary?
24226## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
24227 LIB_GCC=
d6a003a8
AS
24228 ;;
24229 esac
067d23c9
KY
24230 ;;
24231
24232 ## Ask GCC where to find libgcc.a.
24233 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
24234 esac
24235fi
24236
42dcba54
GM
24237## Common for all window systems
24238if test "$window_system" != "none"; then
067d23c9
KY
24239
24240$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
24241
24242
24243$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
24244
42dcba54 24245 WINDOW_SYSTEM_OBJ="fontset.o fringe.o image.o"
067d23c9
KY
24246fi
24247
24248
24249
24250
42dcba54 24251
067d23c9
KY
24252#### Report on what we decided to do.
24253#### Report GTK as a toolkit, even if it doesn't use Xt.
24254#### It makes printing result more understandable as using GTK sets
24255#### toolkit_scroll_bars to yes by default.
24256if test "${HAVE_GTK}" = "yes"; then
5476a9a4
GM
24257 if test "${with_gtk3}" = "yes"; then
24258 USE_X_TOOLKIT=GTK3
24259 else
24260 USE_X_TOOLKIT=GTK
24261 fi
067d23c9
KY
24262fi
24263
24264echo "
24265Configured for \`${canonical}'.
24266
24267 Where should the build process find the source code? ${srcdir}
067d23c9
KY
24268 What compiler should emacs be built with? ${CC} ${CFLAGS}
24269 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
24270 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
24271 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
24272 What window system should Emacs use? ${window_system}
24273 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
24274
24275if test -n "${x_includes}"; then
24276echo " Where do we find X Windows header files? ${x_includes}"
24277else
24278echo " Where do we find X Windows header files? Standard dirs"
24279fi
24280if test -n "${x_libraries}"; then
24281echo " Where do we find X Windows libraries? ${x_libraries}"
24282else
24283echo " Where do we find X Windows libraries? Standard dirs"
24284fi
24285
24286echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24287echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24288echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24289echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
24290echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
24291echo " Does Emacs use -lpng? ${HAVE_PNG}"
24292echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
24293echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
24294
24295echo " Does Emacs use -lgpm? ${HAVE_GPM}"
24296echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
24297echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 24298echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
067d23c9 24299echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 24300echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
24301echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
24302
24303echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24304echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24305echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24306echo " Does Emacs use -lxft? ${HAVE_XFT}"
24307
24308echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24309echo
24310
eb39a72d
GM
24311if test -n "${EMACSDATA}"; then
24312 echo " Environment variable EMACSDATA set to: $EMACSDATA"
24313fi
24314if test -n "${EMACSDOC}"; then
24315 echo " Environment variable EMACSDOC set to: $EMACSDOC"
24316fi
24317
067d23c9
KY
24318echo
24319
24320if test "$HAVE_NS" = "yes"; then
24321 echo
3d0788a9 24322 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
24323The installed application will go to nextstep/Emacs.app and can be
24324run or moved from there."
24325 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24326 echo "The application will be fully self-contained."
24327 else
24328 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 24329You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
24330to run if these resources are not installed."
24331 fi
24332 echo
24333fi
24334
031fabfc
GM
24335if test "${opsys}" = "cygwin"; then
24336 case `uname -r` in
24337 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
24338$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
24339 echo
24340 ;;
24341 esac
24342fi
067d23c9
KY
24343
24344# Remove any trailing slashes in these variables.
24345test "${prefix}" != NONE &&
24346 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24347test "${exec_prefix}" != NONE &&
24348 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24349
56ade35c
GM
24350SUBDIR_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"
24351
24352ac_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"
24353
a877df06 24354
73b78882 24355opt_makefile=test/automated/Makefile
a877df06 24356
56ade35c 24357if test -f $srcdir/${opt_makefile}.in; then
73b78882 24358 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 24359 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 24360
56ade35c 24361fi
73b78882 24362
40b65096
GM
24363
24364opt_makefile=admin/unidata/Makefile
24365
24366if test -f $srcdir/${opt_makefile}.in; then
24367 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
24368 ac_config_files="$ac_config_files admin/unidata/Makefile"
24369
24370fi
24371
24372
56ade35c 24373SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 24374
067d23c9 24375
9411886d
PE
24376
24377ac_config_commands="$ac_config_commands mkdirs"
24378
24379
24380ac_config_commands="$ac_config_commands epaths"
24381
24382
24383ac_config_commands="$ac_config_commands gdbinit"
24384
067d23c9
KY
24385
24386cat >confcache <<\_ACEOF
24387# This file is a shell script that caches the results of configure
24388# tests run on this system so they can be shared between configure
24389# scripts and configure runs, see configure's option --config-cache.
24390# It is not useful on other systems. If it contains results you don't
24391# want to keep, you may remove or edit it.
24392#
24393# config.status only pays attention to the cache file if you give it
24394# the --recheck option to rerun configure.
24395#
24396# `ac_cv_env_foo' variables (set or unset) will be overridden when
24397# loading this file, other *unset* `ac_cv_foo' will be assigned the
24398# following values.
24399
24400_ACEOF
24401
24402# The following way of writing the cache mishandles newlines in values,
24403# but we know of no workaround that is simple, portable, and efficient.
24404# So, we kill variables containing newlines.
24405# Ultrix sh set writes to stderr and can't be redirected directly,
24406# and sets the high bit in the cache file unless we assign to the vars.
24407(
24408 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24409 eval ac_val=\$$ac_var
24410 case $ac_val in #(
24411 *${as_nl}*)
24412 case $ac_var in #(
24413 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
24414$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
24415 esac
24416 case $ac_var in #(
24417 _ | IFS | as_nl) ;; #(
24418 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
24419 *) { eval $ac_var=; unset $ac_var;} ;;
24420 esac ;;
24421 esac
24422 done
24423
24424 (set) 2>&1 |
24425 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24426 *${as_nl}ac_space=\ *)
24427 # `set' does not quote correctly, so add quotes: double-quote
24428 # substitution turns \\\\ into \\, and sed turns \\ into \.
24429 sed -n \
24430 "s/'/'\\\\''/g;
24431 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24432 ;; #(
24433 *)
24434 # `set' quotes correctly as required by POSIX, so do not add quotes.
24435 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
24436 ;;
24437 esac |
24438 sort
24439) |
24440 sed '
24441 /^ac_cv_env_/b end
24442 t clear
24443 :clear
24444 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24445 t end
24446 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24447 :end' >>confcache
24448if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24449 if test -w "$cache_file"; then
a9bec17c 24450 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
24451 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
24452$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 24453 cat confcache >$cache_file
067d23c9
KY
24454 else
24455 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
24456$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
24457 fi
24458fi
24459rm -f confcache
24460
24461test "x$prefix" = xNONE && prefix=$ac_default_prefix
24462# Let make expand exec_prefix.
24463test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24464
24465DEFS=-DHAVE_CONFIG_H
24466
24467ac_libobjs=
24468ac_ltlibobjs=
24469for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24470 # 1. Remove the extension, and $U if already installed.
24471 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24472 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24473 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24474 # will be set to the directory where LIBOBJS objects are built.
24475 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24476 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24477done
24478LIBOBJS=$ac_libobjs
24479
24480LTLIBOBJS=$ac_ltlibobjs
24481
24482
743c80a7
PE
24483 if test -n "$EXEEXT"; then
24484 am__EXEEXT_TRUE=
24485 am__EXEEXT_FALSE='#'
24486else
24487 am__EXEEXT_TRUE='#'
24488 am__EXEEXT_FALSE=
24489fi
24490
24491if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 24492 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
24493Usually this means the macro was only invoked conditionally." "$LINENO" 5
24494fi
24495if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 24496 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
24497Usually this means the macro was only invoked conditionally." "$LINENO" 5
24498fi
743c80a7 24499if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 24500 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
24501Usually this means the macro was only invoked conditionally." "$LINENO" 5
24502fi
4fc2b746 24503if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 24504 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
24505Usually this means the macro was only invoked conditionally." "$LINENO" 5
24506fi
743c80a7 24507
8966cbff
GM
24508if test -z "${GL_GENERATE_EXECINFO_H_TRUE}" && test -z "${GL_GENERATE_EXECINFO_H_FALSE}"; then
24509 as_fn_error "conditional \"GL_GENERATE_EXECINFO_H\" was never defined.
24510Usually this means the macro was only invoked conditionally." "$LINENO" 5
24511fi
4fda9c95 24512if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 24513 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
24514Usually this means the macro was only invoked conditionally." "$LINENO" 5
24515fi
0eb775a3
GM
24516if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
24517 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
24518Usually this means the macro was only invoked conditionally." "$LINENO" 5
24519fi
6d153f56 24520if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 24521 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
24522Usually this means the macro was only invoked conditionally." "$LINENO" 5
24523fi
6c051bab 24524if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 24525 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
24526Usually this means the macro was only invoked conditionally." "$LINENO" 5
24527fi
24528if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 24529 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
24530Usually this means the macro was only invoked conditionally." "$LINENO" 5
24531fi
6d153f56 24532if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 24533 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
24534Usually this means the macro was only invoked conditionally." "$LINENO" 5
24535fi
24536if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 24537 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
24538Usually this means the macro was only invoked conditionally." "$LINENO" 5
24539fi
a0a61e58
GM
24540if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
24541 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
24542Usually this means the macro was only invoked conditionally." "$LINENO" 5
24543fi
6d153f56 24544if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 24545 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
24546Usually this means the macro was only invoked conditionally." "$LINENO" 5
24547fi
3e0be4ab 24548if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 24549 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
24550Usually this means the macro was only invoked conditionally." "$LINENO" 5
24551fi
6d153f56 24552if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 24553 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
24554Usually this means the macro was only invoked conditionally." "$LINENO" 5
24555fi
24556if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
a9bec17c 24557 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
6d153f56 24558Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 24559fi
942f733f 24560
743c80a7
PE
24561 gl_libobjs=
24562 gl_ltlibobjs=
24563 if test -n "$gl_LIBOBJS"; then
24564 # Remove the extension.
24565 sed_drop_objext='s/\.o$//;s/\.obj$//'
24566 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24567 gl_libobjs="$gl_libobjs $i.$ac_objext"
24568 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24569 done
24570 fi
24571 gl_LIBOBJS=$gl_libobjs
24572
24573 gl_LTLIBOBJS=$gl_ltlibobjs
24574
24575
24576
24577 gltests_libobjs=
24578 gltests_ltlibobjs=
24579 if test -n "$gltests_LIBOBJS"; then
24580 # Remove the extension.
24581 sed_drop_objext='s/\.o$//;s/\.obj$//'
24582 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24583 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24584 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24585 done
24586 fi
24587 gltests_LIBOBJS=$gltests_libobjs
24588
24589 gltests_LTLIBOBJS=$gltests_ltlibobjs
24590
067d23c9
KY
24591
24592
a9bec17c 24593: ${CONFIG_STATUS=./config.status}
067d23c9
KY
24594ac_write_fail=0
24595ac_clean_files_save=$ac_clean_files
24596ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24597{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24598$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24599as_write_fail=0
24600cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24601#! $SHELL
24602# Generated by $as_me.
24603# Run this file to recreate the current configuration.
24604# Compiler output produced by configure, useful for debugging
24605# configure, is in config.log if it exists.
24606
24607debug=false
24608ac_cs_recheck=false
24609ac_cs_silent=false
24610
24611SHELL=\${CONFIG_SHELL-$SHELL}
24612export SHELL
24613_ASEOF
24614cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24615## -------------------- ##
24616## M4sh Initialization. ##
24617## -------------------- ##
24618
24619# Be more Bourne compatible
24620DUALCASE=1; export DUALCASE # for MKS sh
24621if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24622 emulate sh
24623 NULLCMD=:
24624 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24625 # is contrary to our usage. Disable this feature.
24626 alias -g '${1+"$@"}'='"$@"'
24627 setopt NO_GLOB_SUBST
24628else
24629 case `(set -o) 2>/dev/null` in #(
24630 *posix*) :
24631 set -o posix ;; #(
24632 *) :
24633 ;;
24634esac
24635fi
24636
24637
24638as_nl='
24639'
24640export as_nl
24641# Printing a long string crashes Solaris 7 /usr/bin/printf.
24642as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24643as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24644as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24645# Prefer a ksh shell builtin over an external printf program on Solaris,
24646# but without wasting forks for bash or zsh.
24647if test -z "$BASH_VERSION$ZSH_VERSION" \
24648 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24649 as_echo='print -r --'
24650 as_echo_n='print -rn --'
24651elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24652 as_echo='printf %s\n'
24653 as_echo_n='printf %s'
24654else
24655 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24656 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24657 as_echo_n='/usr/ucb/echo -n'
24658 else
24659 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24660 as_echo_n_body='eval
24661 arg=$1;
24662 case $arg in #(
24663 *"$as_nl"*)
24664 expr "X$arg" : "X\\(.*\\)$as_nl";
24665 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24666 esac;
24667 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24668 '
24669 export as_echo_n_body
24670 as_echo_n='sh -c $as_echo_n_body as_echo'
24671 fi
24672 export as_echo_body
24673 as_echo='sh -c $as_echo_body as_echo'
24674fi
24675
24676# The user is always right.
24677if test "${PATH_SEPARATOR+set}" != set; then
24678 PATH_SEPARATOR=:
24679 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24680 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24681 PATH_SEPARATOR=';'
24682 }
24683fi
24684
24685
24686# IFS
24687# We need space, tab and new line, in precisely that order. Quoting is
24688# there to prevent editors from complaining about space-tab.
24689# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24690# splitting by setting IFS to empty value.)
24691IFS=" "" $as_nl"
24692
24693# Find who we are. Look in the path if we contain no directory separator.
24694case $0 in #((
24695 *[\\/]* ) as_myself=$0 ;;
24696 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24697for as_dir in $PATH
24698do
24699 IFS=$as_save_IFS
24700 test -z "$as_dir" && as_dir=.
24701 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24702 done
24703IFS=$as_save_IFS
24704
24705 ;;
24706esac
24707# We did not find ourselves, most probably we were run as `sh COMMAND'
24708# in which case we are not to be found in the path.
24709if test "x$as_myself" = x; then
24710 as_myself=$0
24711fi
24712if test ! -f "$as_myself"; then
24713 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24714 exit 1
24715fi
24716
24717# Unset variables that we do not need and which cause bugs (e.g. in
24718# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
24719# suppresses any "Segmentation fault" message there. '((' could
24720# trigger a bug in pdksh 5.2.14.
24721for as_var in BASH_ENV ENV MAIL MAILPATH
24722do eval test x\${$as_var+set} = xset \
24723 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24724done
24725PS1='$ '
24726PS2='> '
24727PS4='+ '
24728
24729# NLS nuisances.
24730LC_ALL=C
24731export LC_ALL
24732LANGUAGE=C
24733export LANGUAGE
24734
24735# CDPATH.
24736(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24737
24738
a9bec17c
GM
24739# as_fn_error ERROR [LINENO LOG_FD]
24740# ---------------------------------
067d23c9
KY
24741# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24742# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 24743# script with status $?, using 1 if that was 0.
067d23c9
KY
24744as_fn_error ()
24745{
a9bec17c
GM
24746 as_status=$?; test $as_status -eq 0 && as_status=1
24747 if test "$3"; then
24748 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24749 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 24750 fi
a9bec17c 24751 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
24752 as_fn_exit $as_status
24753} # as_fn_error
24754
24755
24756# as_fn_set_status STATUS
24757# -----------------------
24758# Set $? to STATUS, without forking.
24759as_fn_set_status ()
24760{
24761 return $1
24762} # as_fn_set_status
24763
24764# as_fn_exit STATUS
24765# -----------------
24766# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24767as_fn_exit ()
24768{
24769 set +e
24770 as_fn_set_status $1
24771 exit $1
24772} # as_fn_exit
24773
24774# as_fn_unset VAR
24775# ---------------
24776# Portably unset VAR.
24777as_fn_unset ()
24778{
24779 { eval $1=; unset $1;}
24780}
24781as_unset=as_fn_unset
24782# as_fn_append VAR VALUE
24783# ----------------------
24784# Append the text in VALUE to the end of the definition contained in VAR. Take
24785# advantage of any shell optimizations that allow amortized linear growth over
24786# repeated appends, instead of the typical quadratic growth present in naive
24787# implementations.
24788if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24789 eval 'as_fn_append ()
24790 {
24791 eval $1+=\$2
24792 }'
24793else
24794 as_fn_append ()
24795 {
24796 eval $1=\$$1\$2
24797 }
24798fi # as_fn_append
24799
24800# as_fn_arith ARG...
24801# ------------------
24802# Perform arithmetic evaluation on the ARGs, and store the result in the
24803# global $as_val. Take advantage of shells that can avoid forks. The arguments
24804# must be portable across $(()) and expr.
24805if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24806 eval 'as_fn_arith ()
24807 {
24808 as_val=$(( $* ))
24809 }'
24810else
24811 as_fn_arith ()
24812 {
24813 as_val=`expr "$@" || test $? -eq 1`
24814 }
24815fi # as_fn_arith
24816
24817
24818if expr a : '\(a\)' >/dev/null 2>&1 &&
24819 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24820 as_expr=expr
24821else
24822 as_expr=false
24823fi
24824
24825if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24826 as_basename=basename
24827else
24828 as_basename=false
24829fi
24830
24831if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24832 as_dirname=dirname
24833else
24834 as_dirname=false
24835fi
24836
24837as_me=`$as_basename -- "$0" ||
24838$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24839 X"$0" : 'X\(//\)$' \| \
24840 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24841$as_echo X/"$0" |
24842 sed '/^.*\/\([^/][^/]*\)\/*$/{
24843 s//\1/
24844 q
24845 }
24846 /^X\/\(\/\/\)$/{
24847 s//\1/
24848 q
24849 }
24850 /^X\/\(\/\).*/{
24851 s//\1/
24852 q
24853 }
24854 s/.*/./; q'`
24855
24856# Avoid depending upon Character Ranges.
24857as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24858as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24859as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24860as_cr_digits='0123456789'
24861as_cr_alnum=$as_cr_Letters$as_cr_digits
24862
24863ECHO_C= ECHO_N= ECHO_T=
24864case `echo -n x` in #(((((
24865-n*)
24866 case `echo 'xy\c'` in
24867 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24868 xy) ECHO_C='\c';;
24869 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
24870 ECHO_T=' ';;
24871 esac;;
24872*)
24873 ECHO_N='-n';;
24874esac
24875
24876rm -f conf$$ conf$$.exe conf$$.file
24877if test -d conf$$.dir; then
24878 rm -f conf$$.dir/conf$$.file
24879else
24880 rm -f conf$$.dir
24881 mkdir conf$$.dir 2>/dev/null
24882fi
24883if (echo >conf$$.file) 2>/dev/null; then
24884 if ln -s conf$$.file conf$$ 2>/dev/null; then
24885 as_ln_s='ln -s'
24886 # ... but there are two gotchas:
24887 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24888 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24889 # In both cases, we have to default to `cp -p'.
24890 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24891 as_ln_s='cp -p'
24892 elif ln conf$$.file conf$$ 2>/dev/null; then
24893 as_ln_s=ln
24894 else
24895 as_ln_s='cp -p'
24896 fi
24897else
24898 as_ln_s='cp -p'
24899fi
24900rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24901rmdir conf$$.dir 2>/dev/null
24902
24903
24904# as_fn_mkdir_p
24905# -------------
24906# Create "$as_dir" as a directory, including parents if necessary.
24907as_fn_mkdir_p ()
24908{
24909
24910 case $as_dir in #(
24911 -*) as_dir=./$as_dir;;
24912 esac
24913 test -d "$as_dir" || eval $as_mkdir_p || {
24914 as_dirs=
24915 while :; do
24916 case $as_dir in #(
24917 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24918 *) as_qdir=$as_dir;;
24919 esac
24920 as_dirs="'$as_qdir' $as_dirs"
24921 as_dir=`$as_dirname -- "$as_dir" ||
24922$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24923 X"$as_dir" : 'X\(//\)[^/]' \| \
24924 X"$as_dir" : 'X\(//\)$' \| \
24925 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24926$as_echo X"$as_dir" |
24927 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24928 s//\1/
24929 q
24930 }
24931 /^X\(\/\/\)[^/].*/{
24932 s//\1/
24933 q
24934 }
24935 /^X\(\/\/\)$/{
24936 s//\1/
24937 q
24938 }
24939 /^X\(\/\).*/{
24940 s//\1/
24941 q
24942 }
24943 s/.*/./; q'`
24944 test -d "$as_dir" && break
24945 done
24946 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 24947 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
24948
24949
24950} # as_fn_mkdir_p
24951if mkdir -p . 2>/dev/null; then
24952 as_mkdir_p='mkdir -p "$as_dir"'
24953else
24954 test -d ./-p && rmdir ./-p
24955 as_mkdir_p=false
24956fi
24957
24958if test -x / >/dev/null 2>&1; then
24959 as_test_x='test -x'
24960else
24961 if ls -dL / >/dev/null 2>&1; then
24962 as_ls_L_option=L
24963 else
24964 as_ls_L_option=
24965 fi
24966 as_test_x='
24967 eval sh -c '\''
24968 if test -d "$1"; then
24969 test -d "$1/.";
24970 else
24971 case $1 in #(
24972 -*)set "./$1";;
24973 esac;
24974 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24975 ???[sx]*):;;*)false;;esac;fi
24976 '\'' sh
24977 '
24978fi
24979as_executable_p=$as_test_x
24980
24981# Sed expression to map a string onto a valid CPP name.
24982as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24983
24984# Sed expression to map a string onto a valid variable name.
24985as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24986
24987
24988exec 6>&1
24989## ----------------------------------- ##
24990## Main body of $CONFIG_STATUS script. ##
24991## ----------------------------------- ##
24992_ASEOF
24993test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24994
24995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24996# Save the log message, to keep $0 and so on meaningful, and to
24997# report actual input values of CONFIG_FILES etc. instead of their
24998# values after options handling.
24999ac_log="
250c8ab9 25000This file was extended by emacs $as_me 24.2.50, which was
a9bec17c 25001generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
25002
25003 CONFIG_FILES = $CONFIG_FILES
25004 CONFIG_HEADERS = $CONFIG_HEADERS
25005 CONFIG_LINKS = $CONFIG_LINKS
25006 CONFIG_COMMANDS = $CONFIG_COMMANDS
25007 $ $0 $@
25008
25009on `(hostname || uname -n) 2>/dev/null | sed 1q`
25010"
25011
25012_ACEOF
25013
25014case $ac_config_files in *"
25015"*) set x $ac_config_files; shift; ac_config_files=$*;;
25016esac
25017
25018case $ac_config_headers in *"
25019"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25020esac
25021
25022
25023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25024# Files that config.status was made for.
25025config_files="$ac_config_files"
25026config_headers="$ac_config_headers"
25027config_commands="$ac_config_commands"
25028
25029_ACEOF
25030
25031cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25032ac_cs_usage="\
25033\`$as_me' instantiates files and other configuration actions
25034from templates according to the current configuration. Unless the files
25035and actions are specified as TAGs, all are instantiated by default.
25036
25037Usage: $0 [OPTION]... [TAG]...
25038
25039 -h, --help print this help, then exit
25040 -V, --version print version number and configuration settings, then exit
25041 --config print configuration, then exit
25042 -q, --quiet, --silent
25043 do not print progress messages
25044 -d, --debug don't remove temporary files
25045 --recheck update $as_me by reconfiguring in the same conditions
25046 --file=FILE[:TEMPLATE]
25047 instantiate the configuration file FILE
25048 --header=FILE[:TEMPLATE]
25049 instantiate the configuration header FILE
25050
25051Configuration files:
25052$config_files
25053
25054Configuration headers:
25055$config_headers
25056
25057Configuration commands:
25058$config_commands
25059
25060Report bugs to the package provider."
25061
25062_ACEOF
25063cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25064ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25065ac_cs_version="\\
250c8ab9 25066emacs config.status 24.2.50
a9bec17c 25067configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
25068 with options \\"\$ac_cs_config\\"
25069
a9bec17c 25070Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
25071This config.status script is free software; the Free Software Foundation
25072gives unlimited permission to copy, distribute and modify it."
25073
25074ac_pwd='$ac_pwd'
25075srcdir='$srcdir'
25076INSTALL='$INSTALL'
743c80a7
PE
25077MKDIR_P='$MKDIR_P'
25078AWK='$AWK'
067d23c9
KY
25079test -n "\$AWK" || AWK=awk
25080_ACEOF
25081
25082cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25083# The default lists apply if the user does not specify any file.
25084ac_need_defaults=:
25085while test $# != 0
25086do
25087 case $1 in
a9bec17c 25088 --*=*)
067d23c9
KY
25089 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25090 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25091 ac_shift=:
25092 ;;
25093 *)
25094 ac_option=$1
25095 ac_optarg=$2
25096 ac_shift=shift
25097 ;;
25098 esac
25099
25100 case $ac_option in
25101 # Handling of the options.
25102 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25103 ac_cs_recheck=: ;;
25104 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25105 $as_echo "$ac_cs_version"; exit ;;
25106 --config | --confi | --conf | --con | --co | --c )
25107 $as_echo "$ac_cs_config"; exit ;;
25108 --debug | --debu | --deb | --de | --d | -d )
25109 debug=: ;;
25110 --file | --fil | --fi | --f )
25111 $ac_shift
25112 case $ac_optarg in
25113 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25114 esac
25115 as_fn_append CONFIG_FILES " '$ac_optarg'"
25116 ac_need_defaults=false;;
25117 --header | --heade | --head | --hea )
25118 $ac_shift
25119 case $ac_optarg in
25120 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25121 esac
25122 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25123 ac_need_defaults=false;;
25124 --he | --h)
25125 # Conflict between --help and --header
a9bec17c 25126 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
25127Try \`$0 --help' for more information.";;
25128 --help | --hel | -h )
25129 $as_echo "$ac_cs_usage"; exit ;;
25130 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25131 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25132 ac_cs_silent=: ;;
25133
25134 # This is an error.
a9bec17c 25135 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
25136Try \`$0 --help' for more information." ;;
25137
25138 *) as_fn_append ac_config_targets " $1"
25139 ac_need_defaults=false ;;
25140
25141 esac
25142 shift
25143done
25144
25145ac_configure_extra_args=
25146
25147if $ac_cs_silent; then
25148 exec 6>/dev/null
25149 ac_configure_extra_args="$ac_configure_extra_args --silent"
25150fi
25151
25152_ACEOF
25153cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25154if \$ac_cs_recheck; then
25155 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25156 shift
25157 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25158 CONFIG_SHELL='$SHELL'
25159 export CONFIG_SHELL
25160 exec "\$@"
25161fi
25162
25163_ACEOF
25164cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25165exec 5>>config.log
25166{
25167 echo
25168 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25169## Running $as_me. ##
25170_ASBOX
25171 $as_echo "$ac_log"
25172} >&5
25173
25174_ACEOF
25175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25176#
25177# INIT-COMMANDS
25178#
743c80a7 25179AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
5ec54608 25180GCC="$GCC" CPPFLAGS="$CPPFLAGS"
067d23c9
KY
25181
25182_ACEOF
25183
25184cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25185
25186# Handling of arguments.
25187for ac_config_target in $ac_config_targets
25188do
25189 case $ac_config_target in
25190 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 25191 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
067d23c9 25192 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 25193 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
25194 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
25195 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
25196 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
25197 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
25198 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
25199 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
25200 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
25201 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
25202 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
25203 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
25204 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 25205 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
9411886d
PE
25206 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
25207 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
25208 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 25209
a9bec17c 25210 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
25211 esac
25212done
25213
25214
25215# If the user did not use the arguments to specify the items to instantiate,
25216# then the envvar interface is used. Set only those that are not.
25217# We use the long form for the default assignment because of an extremely
25218# bizarre bug on SunOS 4.1.3.
25219if $ac_need_defaults; then
25220 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25221 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25222 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25223fi
25224
25225# Have a temporary directory for convenience. Make it in the build tree
25226# simply because there is no reason against having it here, and in addition,
25227# creating and moving files from /tmp can sometimes cause problems.
25228# Hook for its removal unless debugging.
25229# Note that there is a small window in which the directory will not be cleaned:
25230# after its creation but before its name has been assigned to `$tmp'.
25231$debug ||
25232{
a9bec17c 25233 tmp=
067d23c9 25234 trap 'exit_status=$?
a9bec17c 25235 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
25236' 0
25237 trap 'as_fn_exit 1' 1 2 13 15
25238}
25239# Create a (secure) tmp directory for tmp files.
25240
25241{
25242 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 25243 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
25244} ||
25245{
25246 tmp=./conf$$-$RANDOM
25247 (umask 077 && mkdir "$tmp")
a9bec17c 25248} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
25249
25250# Set up the scripts for CONFIG_FILES section.
25251# No need to generate them if there are no CONFIG_FILES.
25252# This happens for instance with `./config.status config.h'.
25253if test -n "$CONFIG_FILES"; then
25254
25255if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
25256 ac_cs_awk_getline=:
25257 ac_cs_awk_pipe_init=
25258 ac_cs_awk_read_file='
25259 while ((getline aline < (F[key])) > 0)
25260 print(aline)
25261 close(F[key])'
25262 ac_cs_awk_pipe_fini=
25263else
25264 ac_cs_awk_getline=false
25265 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
25266 ac_cs_awk_read_file='
25267 print "|#_!!_#|"
25268 print "cat " F[key] " &&"
25269 '$ac_cs_awk_pipe_init
25270 # The final `:' finishes the AND list.
25271 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
25272fi
25273ac_cr=`echo X | tr X '\015'`
25274# On cygwin, bash can eat \r inside `` if the user requested igncr.
25275# But we know of no other shell where ac_cr would be empty at this
25276# point, so we can use a bashism as a fallback.
25277if test "x$ac_cr" = x; then
25278 eval ac_cr=\$\'\\r\'
25279fi
25280ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25281if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 25282 ac_cs_awk_cr='\r'
067d23c9
KY
25283else
25284 ac_cs_awk_cr=$ac_cr
25285fi
25286
a9bec17c 25287echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
25288_ACEOF
25289
25290# Create commands to substitute file output variables.
25291{
25292 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 25293 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
25294 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
25295 echo "_ACAWK" &&
25296 echo "_ACEOF"
25297} >conf$$files.sh &&
25298. ./conf$$files.sh ||
a9bec17c 25299 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25300rm -f conf$$files.sh
25301
25302{
25303 echo "cat >conf$$subs.awk <<_ACEOF" &&
25304 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25305 echo "_ACEOF"
25306} >conf$$subs.sh ||
a9bec17c
GM
25307 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25308ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
25309ac_delim='%!_!# '
25310for ac_last_try in false false false false false :; do
25311 . ./conf$$subs.sh ||
a9bec17c 25312 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25313
25314 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25315 if test $ac_delim_n = $ac_delim_num; then
25316 break
25317 elif $ac_last_try; then
a9bec17c 25318 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25319 else
25320 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25321 fi
25322done
25323rm -f conf$$subs.sh
25324
25325cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 25326cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
25327_ACEOF
25328sed -n '
25329h
25330s/^/S["/; s/!.*/"]=/
25331p
25332g
25333s/^[^!]*!//
25334:repl
25335t repl
25336s/'"$ac_delim"'$//
25337t delim
25338:nl
25339h
25340s/\(.\{148\}\)..*/\1/
25341t more1
25342s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25343p
25344n
25345b repl
25346:more1
25347s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25348p
25349g
25350s/.\{148\}//
25351t nl
25352:delim
25353h
25354s/\(.\{148\}\)..*/\1/
25355t more2
25356s/["\\]/\\&/g; s/^/"/; s/$/"/
25357p
25358b
25359:more2
25360s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25361p
25362g
25363s/.\{148\}//
25364t delim
25365' <conf$$subs.awk | sed '
25366/^[^""]/{
25367 N
25368 s/\n//
25369}
25370' >>$CONFIG_STATUS || ac_write_fail=1
25371rm -f conf$$subs.awk
25372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25373_ACAWK
a9bec17c 25374cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
25375 for (key in S) S_is_set[key] = 1
25376 FS = "\a"
25377 \$ac_cs_awk_pipe_init
25378}
25379{
25380 line = $ 0
25381 nfields = split(line, field, "@")
25382 substed = 0
25383 len = length(field[1])
25384 for (i = 2; i < nfields; i++) {
25385 key = field[i]
25386 keylen = length(key)
25387 if (S_is_set[key]) {
25388 value = S[key]
25389 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25390 len += length(value) + length(field[++i])
25391 substed = 1
25392 } else
25393 len += 1 + keylen
25394 }
25395 if (nfields == 3 && !substed) {
25396 key = field[2]
25397 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
25398 \$ac_cs_awk_read_file
25399 next
25400 }
25401 }
25402 print line
25403}
25404\$ac_cs_awk_pipe_fini
25405_ACAWK
25406_ACEOF
25407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25408if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25409 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25410else
25411 cat
a9bec17c
GM
25412fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25413 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
25414_ACEOF
25415
a9bec17c
GM
25416# VPATH may cause trouble with some makes, so we remove $(srcdir),
25417# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
25418# trailing colons and then remove the whole line if VPATH becomes empty
25419# (actually we leave an empty line to preserve line numbers).
25420if test "x$srcdir" = x.; then
a9bec17c
GM
25421 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25422s/:*\$(srcdir):*/:/
25423s/:*\${srcdir}:*/:/
25424s/:*@srcdir@:*/:/
25425s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
25426s/:*$//
25427s/^[^=]*=[ ]*$//
25428}'
25429fi
25430
25431cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25432fi # test -n "$CONFIG_FILES"
25433
25434# Set up the scripts for CONFIG_HEADERS section.
25435# No need to generate them if there are no CONFIG_HEADERS.
25436# This happens for instance with `./config.status Makefile'.
25437if test -n "$CONFIG_HEADERS"; then
a9bec17c 25438cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
25439BEGIN {
25440_ACEOF
25441
25442# Transform confdefs.h into an awk script `defines.awk', embedded as
25443# here-document in config.status, that substitutes the proper values into
25444# config.h.in to produce config.h.
25445
25446# Create a delimiter string that does not exist in confdefs.h, to ease
25447# handling of long lines.
25448ac_delim='%!_!# '
25449for ac_last_try in false false :; do
a9bec17c
GM
25450 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25451 if test -z "$ac_t"; then
067d23c9
KY
25452 break
25453 elif $ac_last_try; then
a9bec17c 25454 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
25455 else
25456 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25457 fi
25458done
25459
25460# For the awk script, D is an array of macro values keyed by name,
25461# likewise P contains macro parameters if any. Preserve backslash
25462# newline sequences.
25463
25464ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25465sed -n '
25466s/.\{148\}/&'"$ac_delim"'/g
25467t rset
25468:rset
25469s/^[ ]*#[ ]*define[ ][ ]*/ /
25470t def
25471d
25472:def
25473s/\\$//
25474t bsnl
25475s/["\\]/\\&/g
25476s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25477D["\1"]=" \3"/p
25478s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25479d
25480:bsnl
25481s/["\\]/\\&/g
25482s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25483D["\1"]=" \3\\\\\\n"\\/p
25484t cont
25485s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25486t cont
25487d
25488:cont
25489n
25490s/.\{148\}/&'"$ac_delim"'/g
25491t clear
25492:clear
25493s/\\$//
25494t bsnlc
25495s/["\\]/\\&/g; s/^/"/; s/$/"/p
25496d
25497:bsnlc
25498s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25499b cont
25500' <confdefs.h | sed '
25501s/'"$ac_delim"'/"\\\
25502"/g' >>$CONFIG_STATUS || ac_write_fail=1
25503
25504cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25505 for (key in D) D_is_set[key] = 1
25506 FS = "\a"
25507}
25508/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25509 line = \$ 0
25510 split(line, arg, " ")
25511 if (arg[1] == "#") {
25512 defundef = arg[2]
25513 mac1 = arg[3]
25514 } else {
25515 defundef = substr(arg[1], 2)
25516 mac1 = arg[2]
25517 }
25518 split(mac1, mac2, "(") #)
25519 macro = mac2[1]
25520 prefix = substr(line, 1, index(line, defundef) - 1)
25521 if (D_is_set[macro]) {
25522 # Preserve the white space surrounding the "#".
25523 print prefix "define", macro P[macro] D[macro]
25524 next
25525 } else {
25526 # Replace #undef with comments. This is necessary, for example,
25527 # in the case of _POSIX_SOURCE, which is predefined and required
25528 # on some systems where configure will not decide to define it.
25529 if (defundef == "undef") {
25530 print "/*", prefix defundef, macro, "*/"
25531 next
25532 }
25533 }
25534}
25535{ print }
25536_ACAWK
25537_ACEOF
25538cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 25539 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
25540fi # test -n "$CONFIG_HEADERS"
25541
25542
25543eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
25544shift
25545for ac_tag
25546do
25547 case $ac_tag in
25548 :[FHLC]) ac_mode=$ac_tag; continue;;
25549 esac
25550 case $ac_mode$ac_tag in
25551 :[FHL]*:*);;
a9bec17c 25552 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
25553 :[FH]-) ac_tag=-:-;;
25554 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25555 esac
25556 ac_save_IFS=$IFS
25557 IFS=:
25558 set x $ac_tag
25559 IFS=$ac_save_IFS
25560 shift
25561 ac_file=$1
25562 shift
25563
25564 case $ac_mode in
25565 :L) ac_source=$1;;
25566 :[FH])
25567 ac_file_inputs=
25568 for ac_f
25569 do
25570 case $ac_f in
a9bec17c 25571 -) ac_f="$tmp/stdin";;
067d23c9
KY
25572 *) # Look for the file first in the build tree, then in the source tree
25573 # (if the path is not absolute). The absolute path cannot be DOS-style,
25574 # because $ac_f cannot contain `:'.
25575 test -f "$ac_f" ||
25576 case $ac_f in
25577 [\\/$]*) false;;
25578 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25579 esac ||
a9bec17c 25580 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
25581 esac
25582 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25583 as_fn_append ac_file_inputs " '$ac_f'"
25584 done
25585
25586 # Let's still pretend it is `configure' which instantiates (i.e., don't
25587 # use $as_me), people would be surprised to read:
25588 # /* config.h. Generated by config.status. */
25589 configure_input='Generated from '`
25590 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25591 `' by configure.'
25592 if test x"$ac_file" != x-; then
25593 configure_input="$ac_file. $configure_input"
25594 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25595$as_echo "$as_me: creating $ac_file" >&6;}
25596 fi
25597 # Neutralize special characters interpreted by sed in replacement strings.
25598 case $configure_input in #(
25599 *\&* | *\|* | *\\* )
25600 ac_sed_conf_input=`$as_echo "$configure_input" |
25601 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25602 *) ac_sed_conf_input=$configure_input;;
25603 esac
25604
25605 case $ac_tag in
a9bec17c
GM
25606 *:-:* | *:-) cat >"$tmp/stdin" \
25607 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
25608 esac
25609 ;;
25610 esac
25611
25612 ac_dir=`$as_dirname -- "$ac_file" ||
25613$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25614 X"$ac_file" : 'X\(//\)[^/]' \| \
25615 X"$ac_file" : 'X\(//\)$' \| \
25616 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25617$as_echo X"$ac_file" |
25618 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25619 s//\1/
25620 q
25621 }
25622 /^X\(\/\/\)[^/].*/{
25623 s//\1/
25624 q
25625 }
25626 /^X\(\/\/\)$/{
25627 s//\1/
25628 q
25629 }
25630 /^X\(\/\).*/{
25631 s//\1/
25632 q
25633 }
25634 s/.*/./; q'`
25635 as_dir="$ac_dir"; as_fn_mkdir_p
25636 ac_builddir=.
25637
25638case "$ac_dir" in
25639.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25640*)
25641 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25642 # A ".." for each directory in $ac_dir_suffix.
25643 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25644 case $ac_top_builddir_sub in
25645 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25646 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25647 esac ;;
25648esac
25649ac_abs_top_builddir=$ac_pwd
25650ac_abs_builddir=$ac_pwd$ac_dir_suffix
25651# for backward compatibility:
25652ac_top_builddir=$ac_top_build_prefix
25653
25654case $srcdir in
25655 .) # We are building in place.
25656 ac_srcdir=.
25657 ac_top_srcdir=$ac_top_builddir_sub
25658 ac_abs_top_srcdir=$ac_pwd ;;
25659 [\\/]* | ?:[\\/]* ) # Absolute name.
25660 ac_srcdir=$srcdir$ac_dir_suffix;
25661 ac_top_srcdir=$srcdir
25662 ac_abs_top_srcdir=$srcdir ;;
25663 *) # Relative name.
25664 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25665 ac_top_srcdir=$ac_top_build_prefix$srcdir
25666 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25667esac
25668ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25669
25670
25671 case $ac_mode in
25672 :F)
25673 #
25674 # CONFIG_FILE
25675 #
25676
25677 case $INSTALL in
25678 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25679 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25680 esac
743c80a7
PE
25681 ac_MKDIR_P=$MKDIR_P
25682 case $MKDIR_P in
25683 [\\/$]* | ?:[\\/]* ) ;;
25684 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
25685 esac
067d23c9
KY
25686_ACEOF
25687
25688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25689# If the template does not know about datarootdir, expand it.
25690# FIXME: This hack should be removed a few years after 2.60.
25691ac_datarootdir_hack=; ac_datarootdir_seen=
25692ac_sed_dataroot='
25693/datarootdir/ {
25694 p
25695 q
25696}
25697/@datadir@/p
25698/@docdir@/p
25699/@infodir@/p
25700/@localedir@/p
25701/@mandir@/p'
25702case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25703*datarootdir*) ac_datarootdir_seen=yes;;
25704*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25706$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25707_ACEOF
25708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25709 ac_datarootdir_hack='
25710 s&@datadir@&$datadir&g
25711 s&@docdir@&$docdir&g
25712 s&@infodir@&$infodir&g
25713 s&@localedir@&$localedir&g
25714 s&@mandir@&$mandir&g
25715 s&\\\${datarootdir}&$datarootdir&g' ;;
25716esac
25717_ACEOF
25718
25719# Neutralize VPATH when `$srcdir' = `.'.
25720# Shell code in configure.ac might set extrasub.
25721# FIXME: do we really want to maintain this feature?
25722cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25723ac_sed_extra="$ac_vpsub
25724$extrasub
25725_ACEOF
25726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25727:t
25728/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25729s|@configure_input@|$ac_sed_conf_input|;t t
25730s&@top_builddir@&$ac_top_builddir_sub&;t t
25731s&@top_build_prefix@&$ac_top_build_prefix&;t t
25732s&@srcdir@&$ac_srcdir&;t t
25733s&@abs_srcdir@&$ac_abs_srcdir&;t t
25734s&@top_srcdir@&$ac_top_srcdir&;t t
25735s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25736s&@builddir@&$ac_builddir&;t t
25737s&@abs_builddir@&$ac_abs_builddir&;t t
25738s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25739s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 25740s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
25741$ac_datarootdir_hack
25742"
25743eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
25744if $ac_cs_awk_getline; then
a9bec17c 25745 $AWK -f "$tmp/subs.awk"
067d23c9 25746else
a9bec17c
GM
25747 $AWK -f "$tmp/subs.awk" | $SHELL
25748fi >$tmp/out \
25749 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25750
25751test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
25752 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25753 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 25754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 25755which seems to be undefined. Please make sure it is defined." >&5
067d23c9 25756$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 25757which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 25758
a9bec17c 25759 rm -f "$tmp/stdin"
067d23c9 25760 case $ac_file in
a9bec17c
GM
25761 -) cat "$tmp/out" && rm -f "$tmp/out";;
25762 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 25763 esac \
a9bec17c 25764 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25765 ;;
25766 :H)
25767 #
25768 # CONFIG_HEADER
25769 #
25770 if test x"$ac_file" != x-; then
25771 {
25772 $as_echo "/* $configure_input */" \
a9bec17c
GM
25773 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25774 } >"$tmp/config.h" \
25775 || as_fn_error "could not create $ac_file" "$LINENO" 5
25776 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
25777 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25778$as_echo "$as_me: $ac_file is unchanged" >&6;}
25779 else
25780 rm -f "$ac_file"
a9bec17c
GM
25781 mv "$tmp/config.h" "$ac_file" \
25782 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25783 fi
25784 else
25785 $as_echo "/* $configure_input */" \
a9bec17c
GM
25786 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25787 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 25788 fi
743c80a7
PE
25789# Compute "$ac_file"'s index in $config_headers.
25790_am_arg="$ac_file"
25791_am_stamp_count=1
25792for _am_header in $config_headers :; do
25793 case $_am_header in
25794 $_am_arg | $_am_arg:* )
25795 break ;;
25796 * )
25797 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
25798 esac
25799done
25800echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
25801$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25802 X"$_am_arg" : 'X\(//\)[^/]' \| \
25803 X"$_am_arg" : 'X\(//\)$' \| \
25804 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
25805$as_echo X"$_am_arg" |
25806 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25807 s//\1/
25808 q
25809 }
25810 /^X\(\/\/\)[^/].*/{
25811 s//\1/
25812 q
25813 }
25814 /^X\(\/\/\)$/{
25815 s//\1/
25816 q
25817 }
25818 /^X\(\/\).*/{
25819 s//\1/
25820 q
25821 }
25822 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
25823 ;;
25824
25825 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25826$as_echo "$as_me: executing $ac_file commands" >&6;}
25827 ;;
25828 esac
25829
25830
25831 case $ac_file$ac_mode in
743c80a7
PE
25832 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
25833 # Autoconf 2.62 quotes --file arguments for eval, but not when files
25834 # are listed without --file. Let's play safe and only enable the eval
25835 # if we detect the quoting.
25836 case $CONFIG_FILES in
25837 *\'*) eval set x "$CONFIG_FILES" ;;
25838 *) set x $CONFIG_FILES ;;
25839 esac
25840 shift
25841 for mf
25842 do
25843 # Strip MF so we end up with the name of the file.
25844 mf=`echo "$mf" | sed -e 's/:.*$//'`
25845 # Check whether this is an Automake generated Makefile or not.
25846 # We used to match only the files named `Makefile.in', but
25847 # some people rename them; so instead we look at the file content.
25848 # Grep'ing the first line is not enough: some people post-process
25849 # each Makefile.in and add a new line on top of each file to say so.
25850 # Grep'ing the whole file is not good either: AIX grep has a line
25851 # limit of 2048, but all sed's we know have understand at least 4000.
25852 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
25853 dirpart=`$as_dirname -- "$mf" ||
25854$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25855 X"$mf" : 'X\(//\)[^/]' \| \
25856 X"$mf" : 'X\(//\)$' \| \
25857 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
25858$as_echo X"$mf" |
25859 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25860 s//\1/
25861 q
25862 }
25863 /^X\(\/\/\)[^/].*/{
25864 s//\1/
25865 q
25866 }
25867 /^X\(\/\/\)$/{
25868 s//\1/
25869 q
25870 }
25871 /^X\(\/\).*/{
25872 s//\1/
25873 q
25874 }
25875 s/.*/./; q'`
25876 else
25877 continue
25878 fi
25879 # Extract the definition of DEPDIR, am__include, and am__quote
25880 # from the Makefile without running `make'.
25881 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
25882 test -z "$DEPDIR" && continue
25883 am__include=`sed -n 's/^am__include = //p' < "$mf"`
25884 test -z "am__include" && continue
25885 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
25886 # When using ansi2knr, U may be empty or an underscore; expand it
25887 U=`sed -n 's/^U = //p' < "$mf"`
25888 # Find all dependency output files, they are included files with
25889 # $(DEPDIR) in their names. We invoke sed twice because it is the
25890 # simplest approach to changing $(DEPDIR) to its actual value in the
25891 # expansion.
25892 for file in `sed -n "
25893 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
25894 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
25895 # Make sure the directory exists.
25896 test -f "$dirpart/$file" && continue
25897 fdir=`$as_dirname -- "$file" ||
25898$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25899 X"$file" : 'X\(//\)[^/]' \| \
25900 X"$file" : 'X\(//\)$' \| \
25901 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
25902$as_echo X"$file" |
25903 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25904 s//\1/
25905 q
25906 }
25907 /^X\(\/\/\)[^/].*/{
25908 s//\1/
25909 q
25910 }
25911 /^X\(\/\/\)$/{
25912 s//\1/
25913 q
25914 }
25915 /^X\(\/\).*/{
25916 s//\1/
25917 q
25918 }
25919 s/.*/./; q'`
25920 as_dir=$dirpart/$fdir; as_fn_mkdir_p
25921 # echo "creating $dirpart/$file"
25922 echo '# dummy' > "$dirpart/$file"
25923 done
25924 done
25925}
25926 ;;
9411886d 25927 "mkdirs":C)
067d23c9
KY
25928for dir in etc lisp ; do
25929 test -d ${dir} || mkdir ${dir}
25930done
9411886d
PE
25931 ;;
25932 "epaths":C)
067d23c9 25933echo creating src/epaths.h
906debc3 25934${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
9411886d
PE
25935 ;;
25936 "gdbinit":C)
067d23c9
KY
25937if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
25938 echo creating src/.gdbinit
25939 echo source $srcdir/src/.gdbinit > src/.gdbinit
25940fi
067d23c9
KY
25941 ;;
25942
25943 esac
25944done # for ac_tag
25945
25946
25947as_fn_exit 0
25948_ACEOF
25949ac_clean_files=$ac_clean_files_save
25950
25951test $ac_write_fail = 0 ||
a9bec17c 25952 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25953
25954
25955# configure is writing to config.log, and then calls config.status.
25956# config.status does its own redirection, appending to config.log.
25957# Unfortunately, on DOS this fails, as config.log is still kept open
25958# by configure, so config.status won't be able to write to it; its
25959# output is simply discarded. So we exec the FD to /dev/null,
25960# effectively closing config.log, so it can be properly (re)opened and
25961# appended to by config.status. When coming back to configure, we
25962# need to make the FD available again.
25963if test "$no_create" != yes; then
25964 ac_cs_success=:
25965 ac_config_status_args=
25966 test "$silent" = yes &&
25967 ac_config_status_args="$ac_config_status_args --quiet"
25968 exec 5>/dev/null
25969 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25970 exec 5>>config.log
25971 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25972 # would make configure fail if this is the last instruction.
a9bec17c 25973 $ac_cs_success || as_fn_exit $?
067d23c9
KY
25974fi
25975if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25977$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25978fi
25979