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.
67d34197 3# Generated by GNU Autoconf 2.65 for emacs 24.1.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'
67d34197
GM
552PACKAGE_VERSION='24.1.50'
553PACKAGE_STRING='emacs 24.1.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
067d23c9
KY
607LIB_GCC
608LD_FIRSTFLAG
609LD_SWITCH_SYSTEM_TEMACS
743c80a7
PE
610LIBGNU_LTLIBDEPS
611LIBGNU_LIBDEPS
612gltests_WITNESS
6d153f56
GM
613gl_GNULIB_ENABLED_verify_FALSE
614gl_GNULIB_ENABLED_verify_TRUE
615gl_GNULIB_ENABLED_strtoull_FALSE
616gl_GNULIB_ENABLED_strtoull_TRUE
3e0be4ab
GM
617gl_GNULIB_ENABLED_strtoll_FALSE
618gl_GNULIB_ENABLED_strtoll_TRUE
6d153f56
GM
619gl_GNULIB_ENABLED_stat_FALSE
620gl_GNULIB_ENABLED_stat_TRUE
a0a61e58
GM
621gl_GNULIB_ENABLED_pathmax_FALSE
622gl_GNULIB_ENABLED_pathmax_TRUE
6d153f56
GM
623gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE
624gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE
625gl_GNULIB_ENABLED_dosname_FALSE
626gl_GNULIB_ENABLED_dosname_TRUE
627LTLIBINTL
628LIBINTL
f199cab1 629WINDOWS_64_BIT_OFF_T
e275c824
PE
630HAVE_UNISTD_H
631NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
632NEXT_UNISTD_H
1fd182f0
PE
633PTHREAD_H_DEFINES_STRUCT_TIMESPEC
634SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
635TIME_H_DEFINES_STRUCT_TIMESPEC
636NEXT_AS_FIRST_DIRECTIVE_TIME_H
637NEXT_TIME_H
0eb775a3 638WINDOWS_64_BIT_ST_SIZE
5fa4ac76
PE
639NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
640NEXT_SYS_STAT_H
1f5d53eb
PE
641NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
642NEXT_STDLIB_H
6ad6792b
GM
643NEXT_AS_FIRST_DIRECTIVE_STDIO_H
644NEXT_STDIO_H
645REPLACE_VSPRINTF
646REPLACE_VSNPRINTF
647REPLACE_VPRINTF
648REPLACE_VFPRINTF
649REPLACE_VDPRINTF
650REPLACE_VASPRINTF
651REPLACE_TMPFILE
652REPLACE_STDIO_WRITE_FUNCS
ca36e0ff 653REPLACE_STDIO_READ_FUNCS
6ad6792b
GM
654REPLACE_SPRINTF
655REPLACE_SNPRINTF
656REPLACE_RENAMEAT
657REPLACE_RENAME
658REPLACE_REMOVE
659REPLACE_PRINTF
660REPLACE_POPEN
661REPLACE_PERROR
662REPLACE_OBSTACK_PRINTF
663REPLACE_GETLINE
664REPLACE_GETDELIM
665REPLACE_FTELLO
666REPLACE_FTELL
667REPLACE_FSEEKO
668REPLACE_FSEEK
669REPLACE_FREOPEN
670REPLACE_FPURGE
671REPLACE_FPRINTF
672REPLACE_FOPEN
673REPLACE_FFLUSH
2b1928b8 674REPLACE_FDOPEN
6ad6792b
GM
675REPLACE_FCLOSE
676REPLACE_DPRINTF
677HAVE_VDPRINTF
678HAVE_VASPRINTF
679HAVE_RENAMEAT
2b1928b8
GM
680HAVE_POPEN
681HAVE_PCLOSE
6ad6792b
GM
682HAVE_FTELLO
683HAVE_FSEEKO
684HAVE_DPRINTF
685HAVE_DECL_VSNPRINTF
686HAVE_DECL_SNPRINTF
687HAVE_DECL_OBSTACK_PRINTF
688HAVE_DECL_GETLINE
689HAVE_DECL_GETDELIM
690HAVE_DECL_FTELLO
691HAVE_DECL_FSEEKO
692HAVE_DECL_FPURGE
693GNULIB_VSPRINTF_POSIX
694GNULIB_VSNPRINTF
695GNULIB_VPRINTF_POSIX
696GNULIB_VPRINTF
697GNULIB_VFPRINTF_POSIX
698GNULIB_VFPRINTF
699GNULIB_VDPRINTF
ca36e0ff
GM
700GNULIB_VSCANF
701GNULIB_VFSCANF
6ad6792b
GM
702GNULIB_VASPRINTF
703GNULIB_TMPFILE
704GNULIB_STDIO_H_SIGPIPE
ca36e0ff 705GNULIB_STDIO_H_NONBLOCKING
6ad6792b
GM
706GNULIB_SPRINTF_POSIX
707GNULIB_SNPRINTF
ca36e0ff 708GNULIB_SCANF
6ad6792b
GM
709GNULIB_RENAMEAT
710GNULIB_RENAME
711GNULIB_REMOVE
712GNULIB_PUTS
713GNULIB_PUTCHAR
714GNULIB_PUTC
715GNULIB_PRINTF_POSIX
716GNULIB_PRINTF
717GNULIB_POPEN
718GNULIB_PERROR
2b1928b8 719GNULIB_PCLOSE
6ad6792b
GM
720GNULIB_OBSTACK_PRINTF_POSIX
721GNULIB_OBSTACK_PRINTF
722GNULIB_GETLINE
723GNULIB_GETDELIM
ca36e0ff
GM
724GNULIB_GETCHAR
725GNULIB_GETC
6ad6792b
GM
726GNULIB_FWRITE
727GNULIB_FTELLO
728GNULIB_FTELL
729GNULIB_FSEEKO
730GNULIB_FSEEK
ca36e0ff 731GNULIB_FSCANF
6ad6792b 732GNULIB_FREOPEN
ca36e0ff 733GNULIB_FREAD
6ad6792b
GM
734GNULIB_FPUTS
735GNULIB_FPUTC
736GNULIB_FPURGE
737GNULIB_FPRINTF_POSIX
738GNULIB_FPRINTF
739GNULIB_FOPEN
ca36e0ff
GM
740GNULIB_FGETS
741GNULIB_FGETC
6ad6792b 742GNULIB_FFLUSH
2b1928b8 743GNULIB_FDOPEN
6ad6792b
GM
744GNULIB_FCLOSE
745GNULIB_DPRINTF
1fd182f0
PE
746NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
747NEXT_STDDEF_H
6c051bab
GM
748GL_GENERATE_STDDEF_H_FALSE
749GL_GENERATE_STDDEF_H_TRUE
1fd182f0
PE
750STDDEF_H
751HAVE_WCHAR_T
752REPLACE_NULL
16c3e636 753HAVE__BOOL
6c051bab
GM
754GL_GENERATE_STDBOOL_H_FALSE
755GL_GENERATE_STDBOOL_H_TRUE
16c3e636 756STDBOOL_H
6d153f56
GM
757GL_GENERATE_STDARG_H_FALSE
758GL_GENERATE_STDARG_H_TRUE
759STDARG_H
760NEXT_AS_FIRST_DIRECTIVE_STDARG_H
761NEXT_STDARG_H
0eb775a3
GM
762GL_GENERATE_STDALIGN_H_FALSE
763GL_GENERATE_STDALIGN_H_TRUE
764STDALIGN_H
3e0be4ab
GM
765NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
766NEXT_SIGNAL_H
0eb775a3 767LIB_PTHREAD_SIGMASK
2b1928b8 768REPLACE_RAISE
3e0be4ab
GM
769REPLACE_PTHREAD_SIGMASK
770HAVE_SIGHANDLER_T
771HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
772HAVE_STRUCT_SIGACTION_SA_SIGACTION
773HAVE_SIGACTION
774HAVE_SIGINFO_T
775HAVE_SIGSET_T
2b1928b8 776HAVE_RAISE
3e0be4ab
GM
777HAVE_PTHREAD_SIGMASK
778HAVE_POSIX_SIGNALBLOCKING
779GNULIB_SIGACTION
780GNULIB_SIGPROCMASK
781GNULIB_SIGNAL_H_SIGPIPE
2b1928b8 782GNULIB_RAISE
3e0be4ab 783GNULIB_PTHREAD_SIGMASK
f199cab1
GM
784HAVE_SYS_SELECT_H
785NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
786NEXT_SYS_SELECT_H
787REPLACE_SELECT
788REPLACE_PSELECT
789HAVE_PSELECT
790GNULIB_SELECT
791GNULIB_PSELECT
1fd182f0
PE
792REPLACE_TIMEGM
793REPLACE_NANOSLEEP
794REPLACE_MKTIME
795REPLACE_LOCALTIME_R
796HAVE_TIMEGM
797HAVE_STRPTIME
798HAVE_NANOSLEEP
799HAVE_DECL_LOCALTIME_R
800GNULIB_TIME_R
801GNULIB_TIMEGM
802GNULIB_STRPTIME
803GNULIB_NANOSLEEP
804GNULIB_MKTIME
ae0d7250
PE
805REPLACE_UTIMENSAT
806REPLACE_STAT
807REPLACE_MKNOD
808REPLACE_MKFIFO
809REPLACE_MKDIR
810REPLACE_LSTAT
811REPLACE_FUTIMENS
812REPLACE_FSTATAT
813REPLACE_FSTAT
814HAVE_UTIMENSAT
815HAVE_MKNODAT
816HAVE_MKNOD
817HAVE_MKFIFOAT
818HAVE_MKFIFO
819HAVE_MKDIRAT
820HAVE_LSTAT
821HAVE_LCHMOD
822HAVE_FUTIMENS
823HAVE_FSTATAT
824HAVE_FCHMODAT
825GNULIB_UTIMENSAT
826GNULIB_STAT
827GNULIB_MKNODAT
828GNULIB_MKNOD
829GNULIB_MKFIFOAT
830GNULIB_MKFIFO
831GNULIB_MKDIRAT
832GNULIB_LSTAT
833GNULIB_LCHMOD
834GNULIB_FUTIMENS
835GNULIB_FSTATAT
2b1928b8 836GNULIB_FSTAT
ae0d7250 837GNULIB_FCHMODAT
4fda9c95
GM
838NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
839NEXT_INTTYPES_H
840UINT64_MAX_EQ_ULONG_MAX
841UINT32_MAX_LT_UINTMAX_MAX
842PRIPTR_PREFIX
843PRI_MACROS_BROKEN
844INT64_MAX_EQ_LONG_MAX
845INT32_MAX_LT_INTMAX_MAX
0eb775a3 846REPLACE_STRTOIMAX
4fda9c95
GM
847HAVE_DECL_STRTOUMAX
848HAVE_DECL_STRTOIMAX
849HAVE_DECL_IMAXDIV
850HAVE_DECL_IMAXABS
851GNULIB_STRTOUMAX
852GNULIB_STRTOIMAX
853GNULIB_IMAXDIV
854GNULIB_IMAXABS
855GL_GENERATE_STDINT_H_FALSE
856GL_GENERATE_STDINT_H_TRUE
857STDINT_H
858WINT_T_SUFFIX
859WCHAR_T_SUFFIX
860SIG_ATOMIC_T_SUFFIX
861SIZE_T_SUFFIX
862PTRDIFF_T_SUFFIX
863HAVE_SIGNED_WINT_T
864HAVE_SIGNED_WCHAR_T
865HAVE_SIGNED_SIG_ATOMIC_T
866BITSIZEOF_WINT_T
867BITSIZEOF_WCHAR_T
868BITSIZEOF_SIG_ATOMIC_T
869BITSIZEOF_SIZE_T
870BITSIZEOF_PTRDIFF_T
871APPLE_UNIVERSAL_BUILD
872HAVE_SYS_BITYPES_H
873HAVE_SYS_INTTYPES_H
874HAVE_STDINT_H
875NEXT_AS_FIRST_DIRECTIVE_STDINT_H
876NEXT_STDINT_H
877HAVE_SYS_TYPES_H
878HAVE_INTTYPES_H
879HAVE_WCHAR_H
880HAVE_UNSIGNED_LONG_LONG_INT
881HAVE_LONG_LONG_INT
f199cab1
GM
882HAVE_WINSOCK2_H
883NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
884NEXT_SYS_TIME_H
885REPLACE_STRUCT_TIMEVAL
886REPLACE_GETTIMEOFDAY
887HAVE_SYS_TIME_H
888HAVE_STRUCT_TIMEVAL
889HAVE_GETTIMEOFDAY
890GNULIB_GETTIMEOFDAY
0eb775a3 891GNULIB_GL_UNISTD_H_GETOPT
e275c824
PE
892GETOPT_H
893HAVE_GETOPT_H
894NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
895NEXT_GETOPT_H
896PRAGMA_COLUMNS
897PRAGMA_SYSTEM_HEADER
898INCLUDE_NEXT_AS_FIRST_DIRECTIVE
899INCLUDE_NEXT
7d2a1c5e
GM
900GETLOADAVG_LIBS
901REPLACE_WCTOMB
902REPLACE_UNSETENV
903REPLACE_STRTOD
904REPLACE_SETENV
905REPLACE_REALPATH
906REPLACE_REALLOC
0eb775a3 907REPLACE_RANDOM_R
7d2a1c5e 908REPLACE_PUTENV
0eb775a3 909REPLACE_PTSNAME_R
7d2a1c5e
GM
910REPLACE_MKSTEMP
911REPLACE_MBTOWC
912REPLACE_MALLOC
913REPLACE_CANONICALIZE_FILE_NAME
914REPLACE_CALLOC
915HAVE_DECL_UNSETENV
916HAVE_UNLOCKPT
917HAVE_SYS_LOADAVG_H
918HAVE_STRUCT_RANDOM_DATA
919HAVE_STRTOULL
920HAVE_STRTOLL
921HAVE_STRTOD
922HAVE_DECL_SETENV
923HAVE_SETENV
924HAVE_RPMATCH
925HAVE_REALPATH
926HAVE_RANDOM_R
927HAVE_RANDOM_H
0eb775a3
GM
928HAVE_RANDOM
929HAVE_PTSNAME_R
7d2a1c5e 930HAVE_PTSNAME
0eb775a3 931HAVE_POSIX_OPENPT
7d2a1c5e
GM
932HAVE_MKSTEMPS
933HAVE_MKSTEMP
934HAVE_MKOSTEMPS
935HAVE_MKOSTEMP
936HAVE_MKDTEMP
937HAVE_GRANTPT
938HAVE_GETSUBOPT
939HAVE_DECL_GETLOADAVG
940HAVE_CANONICALIZE_FILE_NAME
941HAVE_ATOLL
942HAVE__EXIT
943GNULIB_WCTOMB
944GNULIB_UNSETENV
945GNULIB_UNLOCKPT
946GNULIB_SYSTEM_POSIX
947GNULIB_STRTOULL
948GNULIB_STRTOLL
949GNULIB_STRTOD
950GNULIB_SETENV
951GNULIB_RPMATCH
952GNULIB_REALPATH
953GNULIB_REALLOC_POSIX
954GNULIB_RANDOM_R
0eb775a3 955GNULIB_RANDOM
7d2a1c5e 956GNULIB_PUTENV
0eb775a3 957GNULIB_PTSNAME_R
7d2a1c5e 958GNULIB_PTSNAME
0eb775a3 959GNULIB_POSIX_OPENPT
7d2a1c5e
GM
960GNULIB_MKSTEMPS
961GNULIB_MKSTEMP
962GNULIB_MKOSTEMPS
963GNULIB_MKOSTEMP
964GNULIB_MKDTEMP
965GNULIB_MBTOWC
966GNULIB_MALLOC_POSIX
967GNULIB_GRANTPT
968GNULIB_GETSUBOPT
969GNULIB_GETLOADAVG
970GNULIB_CANONICALIZE_FILE_NAME
971GNULIB_CALLOC_POSIX
972GNULIB_ATOLL
973GNULIB__EXIT
e275c824
PE
974UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
975UNISTD_H_HAVE_WINSOCK2_H
976REPLACE_WRITE
977REPLACE_USLEEP
978REPLACE_UNLINKAT
979REPLACE_UNLINK
980REPLACE_TTYNAME_R
981REPLACE_SYMLINK
982REPLACE_SLEEP
983REPLACE_RMDIR
984REPLACE_READLINK
ca36e0ff 985REPLACE_READ
e275c824
PE
986REPLACE_PWRITE
987REPLACE_PREAD
988REPLACE_LSEEK
989REPLACE_LINKAT
990REPLACE_LINK
991REPLACE_LCHOWN
0eb775a3 992REPLACE_ISATTY
e275c824
PE
993REPLACE_GETPAGESIZE
994REPLACE_GETGROUPS
995REPLACE_GETLOGIN_R
996REPLACE_GETDOMAINNAME
997REPLACE_GETCWD
0eb775a3 998REPLACE_FTRUNCATE
e275c824
PE
999REPLACE_FCHOWNAT
1000REPLACE_DUP2
1001REPLACE_DUP
1002REPLACE_CLOSE
1003REPLACE_CHOWN
1004HAVE_SYS_PARAM_H
1005HAVE_OS_H
1006HAVE_DECL_TTYNAME_R
0eb775a3 1007HAVE_DECL_SETHOSTNAME
e275c824
PE
1008HAVE_DECL_GETUSERSHELL
1009HAVE_DECL_GETPAGESIZE
1010HAVE_DECL_GETLOGIN_R
1011HAVE_DECL_GETDOMAINNAME
2b1928b8 1012HAVE_DECL_FDATASYNC
e275c824
PE
1013HAVE_DECL_FCHDIR
1014HAVE_DECL_ENVIRON
1015HAVE_USLEEP
1016HAVE_UNLINKAT
1017HAVE_SYMLINKAT
1018HAVE_SYMLINK
1019HAVE_SLEEP
0eb775a3 1020HAVE_SETHOSTNAME
e275c824
PE
1021HAVE_READLINKAT
1022HAVE_READLINK
1023HAVE_PWRITE
1024HAVE_PREAD
1025HAVE_PIPE2
1026HAVE_PIPE
1027HAVE_LINKAT
1028HAVE_LINK
1029HAVE_LCHOWN
da6c8463 1030HAVE_GROUP_MEMBER
e275c824
PE
1031HAVE_GETPAGESIZE
1032HAVE_GETLOGIN
1033HAVE_GETHOSTNAME
1034HAVE_GETGROUPS
1035HAVE_GETDTABLESIZE
1036HAVE_FTRUNCATE
1037HAVE_FSYNC
2b1928b8 1038HAVE_FDATASYNC
e275c824
PE
1039HAVE_FCHOWNAT
1040HAVE_FCHDIR
1041HAVE_FACCESSAT
1042HAVE_EUIDACCESS
1043HAVE_DUP3
1044HAVE_DUP2
1045HAVE_CHOWN
1046GNULIB_WRITE
1047GNULIB_USLEEP
1048GNULIB_UNLINKAT
1049GNULIB_UNLINK
1050GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1051GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1052GNULIB_TTYNAME_R
1053GNULIB_SYMLINKAT
1054GNULIB_SYMLINK
1055GNULIB_SLEEP
0eb775a3 1056GNULIB_SETHOSTNAME
e275c824
PE
1057GNULIB_RMDIR
1058GNULIB_READLINKAT
1059GNULIB_READLINK
ca36e0ff 1060GNULIB_READ
e275c824
PE
1061GNULIB_PWRITE
1062GNULIB_PREAD
1063GNULIB_PIPE2
1064GNULIB_PIPE
1065GNULIB_LSEEK
1066GNULIB_LINKAT
1067GNULIB_LINK
1068GNULIB_LCHOWN
0eb775a3 1069GNULIB_ISATTY
da6c8463 1070GNULIB_GROUP_MEMBER
e275c824
PE
1071GNULIB_GETUSERSHELL
1072GNULIB_GETPAGESIZE
1073GNULIB_GETLOGIN_R
1074GNULIB_GETLOGIN
1075GNULIB_GETHOSTNAME
1076GNULIB_GETGROUPS
1077GNULIB_GETDTABLESIZE
1078GNULIB_GETDOMAINNAME
1079GNULIB_GETCWD
1080GNULIB_FTRUNCATE
1081GNULIB_FSYNC
2b1928b8 1082GNULIB_FDATASYNC
e275c824
PE
1083GNULIB_FCHOWNAT
1084GNULIB_FCHDIR
1085GNULIB_FACCESSAT
1086GNULIB_EUIDACCESS
1087GNULIB_ENVIRON
1088GNULIB_DUP3
1089GNULIB_DUP2
2b1928b8 1090GNULIB_DUP
e275c824
PE
1091GNULIB_CLOSE
1092GNULIB_CHOWN
2b1928b8 1093GNULIB_CHDIR
f199cab1 1094LIB_CLOCK_GETTIME
4fc2b746
GM
1095GL_GENERATE_ALLOCA_H_FALSE
1096GL_GENERATE_ALLOCA_H_TRUE
1097ALLOCA_H
1098ALLOCA
743c80a7
PE
1099GL_COND_LIBTOOL_FALSE
1100GL_COND_LIBTOOL_TRUE
5476a9a4
GM
1101POST_ALLOC_OBJ
1102PRE_ALLOC_OBJ
1103CYGWIN_OBJ
1104RALLOC_OBJ
1105OLDXMENU_DEPS
1106LIBX_OTHER
1107LIBXMENU
1108OLDXMENU
1109OLDXMENU_TARGET
1110LIBXT_OTHER
1111TOOLKIT_LIBW
1112WIDGET_OBJ
1113XOBJ
1114XMENU_OBJ
1115FONT_OBJ
1116OTHER_FILES
1117GNU_OBJC_CFLAGS
1118ns_appsrc
1119ns_appresdir
1120ns_appbindir
1121ns_appdir
1122S_FILE
1123X_TOOLKIT_TYPE
1124GNUSTEP_CFLAGS
1125C_SWITCH_X_SITE
1126LD_SWITCH_X_SITE
1127gameuser
1128gamedir
1129bitmapdir
1130archlibdir
1131etcdir
1132x_default_search_path
1133lisppath
1134locallisppath
1135standardlisppath
1136leimdir
1137lispdir
1138srcdir
1139canonical
1140configuration
1141version
1142KRB4LIB
1143DESLIB
1144KRB5LIB
1145CRYPTOLIB
1146COM_ERRLIB
1147LIBRESOLV
1148LIBHESIOD
1149TERMCAP_OBJ
1150LIBS_TERMCAP
1151BLESSMAIL_TARGET
1152LIBS_MAIL
1153liblockfile
1154LIBXML2_LIBS
1155LIBXML2_CFLAGS
1156LIBXSM
1157LIBGPM
1158LIBGIF
1159LIBTIFF
1160LIBPNG
1161LIBJPEG
1162LIBXPM
1163M17N_FLT_LIBS
1164M17N_FLT_CFLAGS
1165LIBOTF_LIBS
1166LIBOTF_CFLAGS
1167FREETYPE_LIBS
1168FREETYPE_CFLAGS
1169XFT_LIBS
1170XFT_CFLAGS
1171FONTCONFIG_LIBS
1172FONTCONFIG_CFLAGS
1173LIBXMU
1174LIBXTR6
1175LIBGNUTLS_LIBS
1176LIBGNUTLS_CFLAGS
1177LIBSELINUX_LIBS
1178SETTINGS_LIBS
1179SETTINGS_CFLAGS
1180GCONF_LIBS
1181GCONF_CFLAGS
1182GSETTINGS_LIBS
1183GSETTINGS_CFLAGS
1184DBUS_OBJ
1185DBUS_LIBS
1186DBUS_CFLAGS
1187GTK_OBJ
1188GTK_LIBS
1189GTK_CFLAGS
1190IMAGEMAGICK_LIBS
1191IMAGEMAGICK_CFLAGS
1192RSVG_LIBS
1193RSVG_CFLAGS
1194LIB_PTHREAD
1195VMLIMIT_OBJ
1196GMALLOC_OBJ
1197HAVE_XSERVER
1198LIB_STANDARD
1199NS_OBJC_OBJ
1200NS_OBJ
1201ns_self_contained
1202INSTALL_ARCH_INDEP_EXTRA
1203TEMACS_LDFLAGS2
1204LD_SWITCH_X_SITE_RPATH
1205XMKMF
1206DEPFLAGS
1207MKDEPDIR
1208CFLAGS_SOUND
1209ALSA_LIBS
1210ALSA_CFLAGS
1211LIBSOUND
1212PKG_CONFIG
130f1dac 1213CRT_DIR
067d23c9
KY
1214START_FILES
1215LIB_MATH
067d23c9
KY
1216LIBS_SYSTEM
1217C_SWITCH_SYSTEM
1218UNEXEC_OBJ
1219C_SWITCH_MACHINE
1220LD_SWITCH_SYSTEM
1221CANNOT_DUMP
141d074d
GM
1222INFO_OPTS
1223INFO_EXT
96f129d5 1224HAVE_MAKEINFO
9c29597b 1225PAXCTL
067d23c9
KY
1226GZIP_PROG
1227INSTALL_INFO
a6b92a4a 1228GNULIB_WARN_CFLAGS
0eb775a3 1229WARN_CFLAGS
a6b92a4a 1230WERROR_CFLAGS
369e19fc
PE
1231RANLIB
1232ARFLAGS
1233AR
067d23c9
KY
1234EGREP
1235GREP
1236CPP
743c80a7
PE
1237am__fastdepCC_FALSE
1238am__fastdepCC_TRUE
1239CCDEPMODE
1240AMDEPBACKSLASH
1241AMDEP_FALSE
1242AMDEP_TRUE
1243am__quote
1244am__include
1245DEPDIR
067d23c9
KY
1246OBJEXT
1247EXEEXT
1248ac_ct_CC
1249CPPFLAGS
1250LDFLAGS
1251CFLAGS
1252CC
1253host_os
1254host_vendor
1255host_cpu
1256host
1257build_os
1258build_vendor
1259build_cpu
1260build
1261PROFILING_CFLAGS
067d23c9 1262GZIP_INFO
c3a461a5 1263cache_file
743c80a7
PE
1264am__untar
1265am__tar
1266AMTAR
1267am__leading_dot
1268SET_MAKE
1269AWK
1270mkdir_p
1271MKDIR_P
1272INSTALL_STRIP_PROGRAM
1273STRIP
1274install_sh
1275MAKEINFO
1276AUTOHEADER
1277AUTOMAKE
1278AUTOCONF
1279ACLOCAL
1280VERSION
1281PACKAGE
1282CYGPATH_W
1283am__isrc
1284INSTALL_DATA
1285INSTALL_SCRIPT
1286INSTALL_PROGRAM
067d23c9
KY
1287target_alias
1288host_alias
1289build_alias
1290LIBS
1291ECHO_T
1292ECHO_N
1293ECHO_C
1294DEFS
1295mandir
1296localedir
1297libdir
1298psdir
1299pdfdir
1300dvidir
1301htmldir
1302infodir
1303docdir
1304oldincludedir
1305includedir
1306localstatedir
1307sharedstatedir
1308sysconfdir
1309datadir
1310datarootdir
1311libexecdir
1312sbindir
1313bindir
1314program_transform_name
1315prefix
1316exec_prefix
1317PACKAGE_URL
1318PACKAGE_BUGREPORT
1319PACKAGE_STRING
1320PACKAGE_VERSION
1321PACKAGE_TARNAME
1322PACKAGE_NAME
1323PATH_SEPARATOR
1324SHELL'
1325ac_subst_files='deps_frag
4d4b75e8 1326lisp_frag
067d23c9
KY
1327ns_frag'
1328ac_user_opts='
1329enable_option_checking
1330with_pop
1331with_kerberos
1332with_kerberos5
1333with_hesiod
1334with_mmdf
1335with_mail_unlink
1336with_mailhost
1337with_sound
1338with_sync_input
1339with_x_toolkit
0442dc7f 1340with_wide_int
067d23c9
KY
1341with_xpm
1342with_jpeg
1343with_tiff
1344with_gif
1345with_png
1346with_rsvg
1347with_xml2
1348with_imagemagick
1349with_xft
1350with_libotf
1351with_m17n_flt
1352with_toolkit_scroll_bars
1353with_xaw3d
1354with_xim
1355with_ns
1356with_gpm
1357with_dbus
1358with_gconf
f527bd02 1359with_gsettings
067d23c9
KY
1360with_selinux
1361with_gnutls
1362with_makeinfo
1363with_compress_info
1364with_pkg_config_prog
1365with_crt_dir
4fc5868a 1366with_gameuser
067d23c9
KY
1367with_gnustep_conf
1368enable_ns_self_contained
067d23c9
KY
1369enable_locallisppath
1370enable_checking
afd07e01 1371enable_check_lisp_object_type
067d23c9
KY
1372enable_profiling
1373enable_autodepend
743c80a7 1374enable_dependency_tracking
067d23c9 1375enable_largefile
a6b92a4a 1376enable_gcc_warnings
e4d35030 1377enable_link_time_optimization
067d23c9
KY
1378with_x
1379'
1380 ac_precious_vars='build_alias
1381host_alias
1382target_alias
1383CC
1384CFLAGS
1385LDFLAGS
1386LIBS
1387CPPFLAGS
1388CPP
1389XMKMF'
1390
1391
1392# Initialize some variables set by options.
1393ac_init_help=
1394ac_init_version=false
1395ac_unrecognized_opts=
1396ac_unrecognized_sep=
1397# The variables have the same names as the options, with
1398# dashes changed to underlines.
1399cache_file=/dev/null
1400exec_prefix=NONE
1401no_create=
1402no_recursion=
1403prefix=NONE
1404program_prefix=NONE
1405program_suffix=NONE
1406program_transform_name=s,x,x,
1407silent=
1408site=
1409srcdir=
1410verbose=
1411x_includes=NONE
1412x_libraries=NONE
1413
1414# Installation directory options.
1415# These are left unexpanded so users can "make install exec_prefix=/foo"
1416# and all the variables that are supposed to be based on exec_prefix
1417# by default will actually change.
1418# Use braces instead of parens because sh, perl, etc. also accept them.
1419# (The list follows the same order as the GNU Coding Standards.)
1420bindir='${exec_prefix}/bin'
1421sbindir='${exec_prefix}/sbin'
1422libexecdir='${exec_prefix}/libexec'
1423datarootdir='${prefix}/share'
1424datadir='${datarootdir}'
1425sysconfdir='${prefix}/etc'
1426sharedstatedir='${prefix}/com'
1427localstatedir='${prefix}/var'
1428includedir='${prefix}/include'
1429oldincludedir='/usr/include'
1430docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1431infodir='${datarootdir}/info'
1432htmldir='${docdir}'
1433dvidir='${docdir}'
1434pdfdir='${docdir}'
1435psdir='${docdir}'
1436libdir='${exec_prefix}/lib'
1437localedir='${datarootdir}/locale'
1438mandir='${datarootdir}/man'
1439
1440ac_prev=
1441ac_dashdash=
1442for ac_option
1443do
1444 # If the previous option needs an argument, assign it.
1445 if test -n "$ac_prev"; then
1446 eval $ac_prev=\$ac_option
1447 ac_prev=
1448 continue
1449 fi
1450
1451 case $ac_option in
a9bec17c
GM
1452 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1453 *) ac_optarg=yes ;;
067d23c9
KY
1454 esac
1455
1456 # Accept the important Cygnus configure options, so we can diagnose typos.
1457
1458 case $ac_dashdash$ac_option in
1459 --)
1460 ac_dashdash=yes ;;
1461
1462 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1463 ac_prev=bindir ;;
1464 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1465 bindir=$ac_optarg ;;
1466
1467 -build | --build | --buil | --bui | --bu)
1468 ac_prev=build_alias ;;
1469 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1470 build_alias=$ac_optarg ;;
1471
1472 -cache-file | --cache-file | --cache-fil | --cache-fi \
1473 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1474 ac_prev=cache_file ;;
1475 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1476 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1477 cache_file=$ac_optarg ;;
1478
1479 --config-cache | -C)
1480 cache_file=config.cache ;;
1481
1482 -datadir | --datadir | --datadi | --datad)
1483 ac_prev=datadir ;;
1484 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1485 datadir=$ac_optarg ;;
1486
1487 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1488 | --dataroo | --dataro | --datar)
1489 ac_prev=datarootdir ;;
1490 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1491 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1492 datarootdir=$ac_optarg ;;
1493
1494 -disable-* | --disable-*)
1495 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1496 # Reject names that are not valid shell variable names.
1497 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1498 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1499 ac_useropt_orig=$ac_useropt
1500 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1501 case $ac_user_opts in
1502 *"
1503"enable_$ac_useropt"
1504"*) ;;
1505 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1506 ac_unrecognized_sep=', ';;
1507 esac
1508 eval enable_$ac_useropt=no ;;
1509
1510 -docdir | --docdir | --docdi | --doc | --do)
1511 ac_prev=docdir ;;
1512 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1513 docdir=$ac_optarg ;;
1514
1515 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1516 ac_prev=dvidir ;;
1517 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1518 dvidir=$ac_optarg ;;
1519
1520 -enable-* | --enable-*)
1521 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1522 # Reject names that are not valid shell variable names.
1523 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1524 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1525 ac_useropt_orig=$ac_useropt
1526 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1527 case $ac_user_opts in
1528 *"
1529"enable_$ac_useropt"
1530"*) ;;
1531 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1532 ac_unrecognized_sep=', ';;
1533 esac
1534 eval enable_$ac_useropt=\$ac_optarg ;;
1535
1536 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1537 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1538 | --exec | --exe | --ex)
1539 ac_prev=exec_prefix ;;
1540 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1541 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1542 | --exec=* | --exe=* | --ex=*)
1543 exec_prefix=$ac_optarg ;;
1544
1545 -gas | --gas | --ga | --g)
1546 # Obsolete; use --with-gas.
1547 with_gas=yes ;;
1548
1549 -help | --help | --hel | --he | -h)
1550 ac_init_help=long ;;
1551 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1552 ac_init_help=recursive ;;
1553 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1554 ac_init_help=short ;;
1555
1556 -host | --host | --hos | --ho)
1557 ac_prev=host_alias ;;
1558 -host=* | --host=* | --hos=* | --ho=*)
1559 host_alias=$ac_optarg ;;
1560
1561 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1562 ac_prev=htmldir ;;
1563 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1564 | --ht=*)
1565 htmldir=$ac_optarg ;;
1566
1567 -includedir | --includedir | --includedi | --included | --include \
1568 | --includ | --inclu | --incl | --inc)
1569 ac_prev=includedir ;;
1570 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1571 | --includ=* | --inclu=* | --incl=* | --inc=*)
1572 includedir=$ac_optarg ;;
1573
1574 -infodir | --infodir | --infodi | --infod | --info | --inf)
1575 ac_prev=infodir ;;
1576 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1577 infodir=$ac_optarg ;;
1578
1579 -libdir | --libdir | --libdi | --libd)
1580 ac_prev=libdir ;;
1581 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1582 libdir=$ac_optarg ;;
1583
1584 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1585 | --libexe | --libex | --libe)
1586 ac_prev=libexecdir ;;
1587 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1588 | --libexe=* | --libex=* | --libe=*)
1589 libexecdir=$ac_optarg ;;
1590
1591 -localedir | --localedir | --localedi | --localed | --locale)
1592 ac_prev=localedir ;;
1593 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1594 localedir=$ac_optarg ;;
1595
1596 -localstatedir | --localstatedir | --localstatedi | --localstated \
1597 | --localstate | --localstat | --localsta | --localst | --locals)
1598 ac_prev=localstatedir ;;
1599 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1600 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1601 localstatedir=$ac_optarg ;;
1602
1603 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1604 ac_prev=mandir ;;
1605 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1606 mandir=$ac_optarg ;;
1607
1608 -nfp | --nfp | --nf)
1609 # Obsolete; use --without-fp.
1610 with_fp=no ;;
1611
1612 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1613 | --no-cr | --no-c | -n)
1614 no_create=yes ;;
1615
1616 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1617 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1618 no_recursion=yes ;;
1619
1620 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1621 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1622 | --oldin | --oldi | --old | --ol | --o)
1623 ac_prev=oldincludedir ;;
1624 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1625 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1626 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1627 oldincludedir=$ac_optarg ;;
1628
1629 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1630 ac_prev=prefix ;;
1631 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1632 prefix=$ac_optarg ;;
1633
1634 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1635 | --program-pre | --program-pr | --program-p)
1636 ac_prev=program_prefix ;;
1637 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1638 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1639 program_prefix=$ac_optarg ;;
1640
1641 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1642 | --program-suf | --program-su | --program-s)
1643 ac_prev=program_suffix ;;
1644 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1645 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1646 program_suffix=$ac_optarg ;;
1647
1648 -program-transform-name | --program-transform-name \
1649 | --program-transform-nam | --program-transform-na \
1650 | --program-transform-n | --program-transform- \
1651 | --program-transform | --program-transfor \
1652 | --program-transfo | --program-transf \
1653 | --program-trans | --program-tran \
1654 | --progr-tra | --program-tr | --program-t)
1655 ac_prev=program_transform_name ;;
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 program_transform_name=$ac_optarg ;;
1664
1665 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1666 ac_prev=pdfdir ;;
1667 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1668 pdfdir=$ac_optarg ;;
1669
1670 -psdir | --psdir | --psdi | --psd | --ps)
1671 ac_prev=psdir ;;
1672 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1673 psdir=$ac_optarg ;;
1674
1675 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1676 | -silent | --silent | --silen | --sile | --sil)
1677 silent=yes ;;
1678
1679 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1680 ac_prev=sbindir ;;
1681 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1682 | --sbi=* | --sb=*)
1683 sbindir=$ac_optarg ;;
1684
1685 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1686 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1687 | --sharedst | --shareds | --shared | --share | --shar \
1688 | --sha | --sh)
1689 ac_prev=sharedstatedir ;;
1690 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1691 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1692 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1693 | --sha=* | --sh=*)
1694 sharedstatedir=$ac_optarg ;;
1695
1696 -site | --site | --sit)
1697 ac_prev=site ;;
1698 -site=* | --site=* | --sit=*)
1699 site=$ac_optarg ;;
1700
1701 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1702 ac_prev=srcdir ;;
1703 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1704 srcdir=$ac_optarg ;;
1705
1706 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1707 | --syscon | --sysco | --sysc | --sys | --sy)
1708 ac_prev=sysconfdir ;;
1709 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1710 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1711 sysconfdir=$ac_optarg ;;
1712
1713 -target | --target | --targe | --targ | --tar | --ta | --t)
1714 ac_prev=target_alias ;;
1715 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1716 target_alias=$ac_optarg ;;
1717
1718 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1719 verbose=yes ;;
1720
1721 -version | --version | --versio | --versi | --vers | -V)
1722 ac_init_version=: ;;
1723
1724 -with-* | --with-*)
1725 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1726 # Reject names that are not valid shell variable names.
1727 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1728 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1729 ac_useropt_orig=$ac_useropt
1730 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1731 case $ac_user_opts in
1732 *"
1733"with_$ac_useropt"
1734"*) ;;
1735 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1736 ac_unrecognized_sep=', ';;
1737 esac
1738 eval with_$ac_useropt=\$ac_optarg ;;
1739
1740 -without-* | --without-*)
1741 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1742 # Reject names that are not valid shell variable names.
1743 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
a9bec17c 1744 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1745 ac_useropt_orig=$ac_useropt
1746 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1747 case $ac_user_opts in
1748 *"
1749"with_$ac_useropt"
1750"*) ;;
1751 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1752 ac_unrecognized_sep=', ';;
1753 esac
1754 eval with_$ac_useropt=no ;;
1755
1756 --x)
1757 # Obsolete; use --with-x.
1758 with_x=yes ;;
1759
1760 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1761 | --x-incl | --x-inc | --x-in | --x-i)
1762 ac_prev=x_includes ;;
1763 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1764 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1765 x_includes=$ac_optarg ;;
1766
1767 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1768 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1769 ac_prev=x_libraries ;;
1770 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1771 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1772 x_libraries=$ac_optarg ;;
1773
a9bec17c
GM
1774 -*) as_fn_error "unrecognized option: \`$ac_option'
1775Try \`$0 --help' for more information."
067d23c9
KY
1776 ;;
1777
1778 *=*)
1779 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1780 # Reject names that are not valid shell variable names.
1781 case $ac_envvar in #(
1782 '' | [0-9]* | *[!_$as_cr_alnum]* )
a9bec17c 1783 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1784 esac
1785 eval $ac_envvar=\$ac_optarg
1786 export $ac_envvar ;;
1787
1788 *)
1789 # FIXME: should be removed in autoconf 3.0.
1790 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1791 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1792 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
a9bec17c 1793 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1794 ;;
1795
1796 esac
1797done
1798
1799if test -n "$ac_prev"; then
1800 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
a9bec17c 1801 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1802fi
1803
1804if test -n "$ac_unrecognized_opts"; then
1805 case $enable_option_checking in
1806 no) ;;
a9bec17c 1807 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1808 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1809 esac
1810fi
1811
1812# Check all directory arguments for consistency.
1813for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1814 datadir sysconfdir sharedstatedir localstatedir includedir \
1815 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1816 libdir localedir mandir
1817do
1818 eval ac_val=\$$ac_var
1819 # Remove trailing slashes.
1820 case $ac_val in
1821 */ )
1822 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1823 eval $ac_var=\$ac_val;;
1824 esac
1825 # Be sure to have absolute directory names.
1826 case $ac_val in
1827 [\\/$]* | ?:[\\/]* ) continue;;
1828 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1829 esac
a9bec17c 1830 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
1831done
1832
1833# There might be people who depend on the old broken behavior: `$host'
1834# used to hold the argument of --host etc.
1835# FIXME: To remove some day.
1836build=$build_alias
1837host=$host_alias
1838target=$target_alias
1839
1840# FIXME: To remove some day.
1841if test "x$host_alias" != x; then
1842 if test "x$build_alias" = x; then
1843 cross_compiling=maybe
a9bec17c
GM
1844 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1845 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
1846 elif test "x$build_alias" != "x$host_alias"; then
1847 cross_compiling=yes
1848 fi
1849fi
1850
1851ac_tool_prefix=
1852test -n "$host_alias" && ac_tool_prefix=$host_alias-
1853
1854test "$silent" = yes && exec 6>/dev/null
1855
1856
1857ac_pwd=`pwd` && test -n "$ac_pwd" &&
1858ac_ls_di=`ls -di .` &&
1859ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
a9bec17c 1860 as_fn_error "working directory cannot be determined"
067d23c9 1861test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
a9bec17c 1862 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
1863
1864
1865# Find the source files, if location was not specified.
1866if test -z "$srcdir"; then
1867 ac_srcdir_defaulted=yes
1868 # Try the directory containing this script, then the parent directory.
1869 ac_confdir=`$as_dirname -- "$as_myself" ||
1870$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1871 X"$as_myself" : 'X\(//\)[^/]' \| \
1872 X"$as_myself" : 'X\(//\)$' \| \
1873 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1874$as_echo X"$as_myself" |
1875 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1876 s//\1/
1877 q
1878 }
1879 /^X\(\/\/\)[^/].*/{
1880 s//\1/
1881 q
1882 }
1883 /^X\(\/\/\)$/{
1884 s//\1/
1885 q
1886 }
1887 /^X\(\/\).*/{
1888 s//\1/
1889 q
1890 }
1891 s/.*/./; q'`
1892 srcdir=$ac_confdir
1893 if test ! -r "$srcdir/$ac_unique_file"; then
1894 srcdir=..
1895 fi
1896else
1897 ac_srcdir_defaulted=no
1898fi
1899if test ! -r "$srcdir/$ac_unique_file"; then
1900 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
a9bec17c 1901 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
1902fi
1903ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1904ac_abs_confdir=`(
a9bec17c 1905 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
1906 pwd)`
1907# When building in place, set srcdir=.
1908if test "$ac_abs_confdir" = "$ac_pwd"; then
1909 srcdir=.
1910fi
1911# Remove unnecessary trailing slashes from srcdir.
1912# Double slashes in file names in object file debugging info
1913# mess up M-x gdb in Emacs.
1914case $srcdir in
1915*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1916esac
1917for ac_var in $ac_precious_vars; do
1918 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1919 eval ac_env_${ac_var}_value=\$${ac_var}
1920 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1921 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1922done
1923
1924#
1925# Report the --help message.
1926#
1927if test "$ac_init_help" = "long"; then
1928 # Omit some internal or obsolete options to make the list less imposing.
1929 # This message is too long to be a string in the A/UX 3.1 sh.
1930 cat <<_ACEOF
67d34197 1931\`configure' configures emacs 24.1.50 to adapt to many kinds of systems.
067d23c9
KY
1932
1933Usage: $0 [OPTION]... [VAR=VALUE]...
1934
1935To assign environment variables (e.g., CC, CFLAGS...), specify them as
1936VAR=VALUE. See below for descriptions of some of the useful variables.
1937
1938Defaults for the options are specified in brackets.
1939
1940Configuration:
1941 -h, --help display this help and exit
1942 --help=short display options specific to this package
1943 --help=recursive display the short help of all the included packages
1944 -V, --version display version information and exit
a9bec17c 1945 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
1946 --cache-file=FILE cache test results in FILE [disabled]
1947 -C, --config-cache alias for \`--cache-file=config.cache'
1948 -n, --no-create do not create output files
1949 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1950
1951Installation directories:
1952 --prefix=PREFIX install architecture-independent files in PREFIX
1953 [$ac_default_prefix]
1954 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1955 [PREFIX]
1956
1957By default, \`make install' will install all the files in
1958\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1959an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1960for instance \`--prefix=\$HOME'.
1961
1962For better control, use the options below.
1963
1964Fine tuning of the installation directories:
1965 --bindir=DIR user executables [EPREFIX/bin]
1966 --sbindir=DIR system admin executables [EPREFIX/sbin]
1967 --libexecdir=DIR program executables [EPREFIX/libexec]
1968 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1969 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1970 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1971 --libdir=DIR object code libraries [EPREFIX/lib]
1972 --includedir=DIR C header files [PREFIX/include]
1973 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1974 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1975 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1976 --infodir=DIR info documentation [DATAROOTDIR/info]
1977 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1978 --mandir=DIR man documentation [DATAROOTDIR/man]
1979 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1980 --htmldir=DIR html documentation [DOCDIR]
1981 --dvidir=DIR dvi documentation [DOCDIR]
1982 --pdfdir=DIR pdf documentation [DOCDIR]
1983 --psdir=DIR ps documentation [DOCDIR]
1984_ACEOF
1985
1986 cat <<\_ACEOF
1987
1988Program names:
1989 --program-prefix=PREFIX prepend PREFIX to installed program names
1990 --program-suffix=SUFFIX append SUFFIX to installed program names
1991 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1992
1993X features:
1994 --x-includes=DIR X include files are in DIR
1995 --x-libraries=DIR X library files are in DIR
1996
1997System types:
1998 --build=BUILD configure for building on BUILD [guessed]
1999 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2000_ACEOF
2001fi
2002
2003if test -n "$ac_init_help"; then
2004 case $ac_init_help in
67d34197 2005 short | recursive ) echo "Configuration of emacs 24.1.50:";;
067d23c9
KY
2006 esac
2007 cat <<\_ACEOF
2008
2009Optional Features:
2010 --disable-option-checking ignore unrecognized --enable/--with options
2011 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2012 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2013 --disable-ns-self-contained
2014 disable self contained build under NeXTstep
067d23c9
KY
2015 --enable-locallisppath=PATH
2016 directories Emacs should search for lisp files
2017 specific to this site
2018 --enable-checking[=LIST]
2019 enable expensive run-time checks. With LIST, enable
2020 only specific categories of checks. Categories are:
2021 all,yes,no. Flags are: stringbytes, stringoverrun,
7ee3791f 2022 stringfreelist, xmallocoverrun, conslist, glyphs
afd07e01
GM
2023 --enable-check-lisp-object-type
2024 enable compile time checks for the Lisp_Object data
2025 type. This is useful for development for catching
2026 certain types of bugs.
067d23c9
KY
2027 --enable-profiling build emacs with profiling support. This might not
2028 work on all platforms
2029 --enable-autodepend automatically generate dependencies to .h-files.
2030 Requires GNU Make and Gcc. Enabled if GNU Make and
2031 Gcc is found
743c80a7
PE
2032 --disable-dependency-tracking speeds up one-time build
2033 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9 2034 --disable-largefile omit support for large files
938a4ef9
GM
2035 --enable-gcc-warnings turn on lots of GCC warnings. This is intended for
2036 developers, and may generate false alarms when used
2037 with older or non-GNU development tools.
e4d35030
GM
2038 --enable-link-time-optimization
2039 build emacs with link-time optimization. This is
2040 supported only for GCC since 4.5.0.
067d23c9
KY
2041
2042Optional Packages:
2043 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2044 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2045 --without-pop don't support POP mail retrieval with movemail
2046 --with-kerberos support Kerberos-authenticated POP
2047 --with-kerberos5 support Kerberos version 5 authenticated POP
2048 --with-hesiod support Hesiod to get the POP server host
2049 --with-mmdf support MMDF mailboxes
2050 --with-mail-unlink unlink, rather than empty, mail spool after reading
2051 --with-mailhost=HOSTNAME
2052 string giving default POP mail host
2053 --without-sound don't compile with sound support
2054 --without-sync-input process async input synchronously
2055 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
2056 lucid or athena, motif, no)
0442dc7f 2057 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
2058 --without-xpm don't compile with XPM image support
2059 --without-jpeg don't compile with JPEG image support
2060 --without-tiff don't compile with TIFF image support
2061 --without-gif don't compile with GIF image support
2062 --without-png don't compile with PNG image support
2063 --without-rsvg don't compile with SVG image support
2064 --without-xml2 don't compile with XML parsing support
2065 --without-imagemagick don't compile with ImageMagick image support
2066 --without-xft don't use XFT for anti aliased fonts
2067 --without-libotf don't use libotf for OpenType font support
2068 --without-m17n-flt don't use m17n-flt for text shaping
2069 --without-toolkit-scroll-bars
2070 don't use Motif or Xaw3d scroll bars
2071 --without-xaw3d don't use Xaw3d
2072 --without-xim don't use X11 XIM
7834125e 2073 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
067d23c9
KY
2074 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2075 console
2076 --without-dbus don't compile with D-Bus support
2077 --without-gconf don't compile with GConf support
f527bd02 2078 --without-gsettings don't compile with GSettings support
067d23c9
KY
2079 --without-selinux don't compile with SELinux support
2080 --without-gnutls don't use -lgnutls for SSL/TLS support
2081 --without-makeinfo don't require makeinfo for building manuals
2082 --without-compress-info don't compress the installed Info pages
2083 --with-pkg-config-prog=PATH
2084 path to pkg-config for finding GTK and librsvg
2085 --with-crt-dir=DIR directory containing crtn.o etc. The default is
2086 /usr/lib, or /usr/lib64 on some platforms.
4fc5868a 2087 --with-gameuser=USER user for shared game score files
067d23c9
KY
2088 --with-gnustep-conf=PATH
2089 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2090 or /etc/GNUstep/GNUstep.conf
2091 --with-x use the X Window System
2092
2093Some influential environment variables:
2094 CC C compiler command
2095 CFLAGS C compiler flags
2096 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2097 nonstandard directory <lib dir>
2098 LIBS libraries to pass to the linker, e.g. -l<library>
2099 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2100 you have headers in a nonstandard directory <include dir>
2101 CPP C preprocessor
2102 XMKMF Path to xmkmf, Makefile generator for X Window System
2103
2104Use these variables to override the choices made by `configure' or to help
2105it to find libraries and programs with nonstandard names/locations.
2106
2107Report bugs to the package provider.
2108_ACEOF
2109ac_status=$?
2110fi
2111
2112if test "$ac_init_help" = "recursive"; then
2113 # If there are subdirs, report their specific --help.
2114 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2115 test -d "$ac_dir" ||
2116 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2117 continue
2118 ac_builddir=.
2119
2120case "$ac_dir" in
2121.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2122*)
2123 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2124 # A ".." for each directory in $ac_dir_suffix.
2125 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2126 case $ac_top_builddir_sub in
2127 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2128 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2129 esac ;;
2130esac
2131ac_abs_top_builddir=$ac_pwd
2132ac_abs_builddir=$ac_pwd$ac_dir_suffix
2133# for backward compatibility:
2134ac_top_builddir=$ac_top_build_prefix
2135
2136case $srcdir in
2137 .) # We are building in place.
2138 ac_srcdir=.
2139 ac_top_srcdir=$ac_top_builddir_sub
2140 ac_abs_top_srcdir=$ac_pwd ;;
2141 [\\/]* | ?:[\\/]* ) # Absolute name.
2142 ac_srcdir=$srcdir$ac_dir_suffix;
2143 ac_top_srcdir=$srcdir
2144 ac_abs_top_srcdir=$srcdir ;;
2145 *) # Relative name.
2146 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2147 ac_top_srcdir=$ac_top_build_prefix$srcdir
2148 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2149esac
2150ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2151
2152 cd "$ac_dir" || { ac_status=$?; continue; }
2153 # Check for guested configure.
2154 if test -f "$ac_srcdir/configure.gnu"; then
2155 echo &&
2156 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2157 elif test -f "$ac_srcdir/configure"; then
2158 echo &&
2159 $SHELL "$ac_srcdir/configure" --help=recursive
2160 else
2161 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2162 fi || ac_status=$?
2163 cd "$ac_pwd" || { ac_status=$?; break; }
2164 done
2165fi
2166
2167test -n "$ac_init_help" && exit $ac_status
2168if $ac_init_version; then
2169 cat <<\_ACEOF
67d34197 2170emacs configure 24.1.50
a9bec17c 2171generated by GNU Autoconf 2.65
067d23c9 2172
a9bec17c 2173Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2174This configure script is free software; the Free Software Foundation
2175gives unlimited permission to copy, distribute and modify it.
2176_ACEOF
2177 exit
2178fi
2179
2180## ------------------------ ##
2181## Autoconf initialization. ##
2182## ------------------------ ##
2183
2184# ac_fn_c_try_compile LINENO
2185# --------------------------
2186# Try to compile conftest.$ac_ext, and return whether this succeeded.
2187ac_fn_c_try_compile ()
2188{
2189 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190 rm -f conftest.$ac_objext
2191 if { { ac_try="$ac_compile"
2192case "(($ac_try" in
2193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2194 *) ac_try_echo=$ac_try;;
2195esac
2196eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2197$as_echo "$ac_try_echo"; } >&5
2198 (eval "$ac_compile") 2>conftest.err
2199 ac_status=$?
2200 if test -s conftest.err; then
2201 grep -v '^ *+' conftest.err >conftest.er1
2202 cat conftest.er1 >&5
2203 mv -f conftest.er1 conftest.err
2204 fi
2205 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2206 test $ac_status = 0; } && {
2207 test -z "$ac_c_werror_flag" ||
2208 test ! -s conftest.err
2209 } && test -s conftest.$ac_objext; then :
2210 ac_retval=0
2211else
2212 $as_echo "$as_me: failed program was:" >&5
2213sed 's/^/| /' conftest.$ac_ext >&5
2214
2215 ac_retval=1
2216fi
a9bec17c 2217 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2218 as_fn_set_status $ac_retval
2219
2220} # ac_fn_c_try_compile
2221
067d23c9
KY
2222# ac_fn_c_try_cpp LINENO
2223# ----------------------
2224# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2225ac_fn_c_try_cpp ()
2226{
2227 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2228 if { { ac_try="$ac_cpp conftest.$ac_ext"
2229case "(($ac_try" in
2230 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2231 *) ac_try_echo=$ac_try;;
2232esac
2233eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2234$as_echo "$ac_try_echo"; } >&5
2235 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2236 ac_status=$?
2237 if test -s conftest.err; then
2238 grep -v '^ *+' conftest.err >conftest.er1
2239 cat conftest.er1 >&5
2240 mv -f conftest.er1 conftest.err
2241 fi
2242 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
a9bec17c 2243 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2244 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2245 test ! -s conftest.err
2246 }; then :
2247 ac_retval=0
2248else
2249 $as_echo "$as_me: failed program was:" >&5
2250sed 's/^/| /' conftest.$ac_ext >&5
2251
2252 ac_retval=1
2253fi
a9bec17c 2254 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2255 as_fn_set_status $ac_retval
2256
2257} # ac_fn_c_try_cpp
2258
2259# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2260# -------------------------------------------------------
2261# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2262# the include files in INCLUDES and setting the cache variable VAR
2263# accordingly.
2264ac_fn_c_check_header_mongrel ()
2265{
2266 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
a9bec17c 2267 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2269$as_echo_n "checking for $2... " >&6; }
a9bec17c 2270if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2271 $as_echo_n "(cached) " >&6
2272fi
2273eval ac_res=\$$3
2274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2275$as_echo "$ac_res" >&6; }
2276else
2277 # Is the header compilable?
2278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2279$as_echo_n "checking $2 usability... " >&6; }
2280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h. */
2282$4
2283#include <$2>
2284_ACEOF
2285if ac_fn_c_try_compile "$LINENO"; then :
2286 ac_header_compiler=yes
2287else
2288 ac_header_compiler=no
2289fi
2290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2292$as_echo "$ac_header_compiler" >&6; }
2293
2294# Is the header present?
2295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2296$as_echo_n "checking $2 presence... " >&6; }
2297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2298/* end confdefs.h. */
2299#include <$2>
2300_ACEOF
2301if ac_fn_c_try_cpp "$LINENO"; then :
2302 ac_header_preproc=yes
2303else
2304 ac_header_preproc=no
2305fi
a9bec17c 2306rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2308$as_echo "$ac_header_preproc" >&6; }
2309
2310# So? What about this header?
2311case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2312 yes:no: )
2313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2314$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2316$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2317 ;;
2318 no:yes:* )
2319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2320$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2322$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2324$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2326$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2328$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2329 ;;
2330esac
2331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2332$as_echo_n "checking for $2... " >&6; }
a9bec17c 2333if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2334 $as_echo_n "(cached) " >&6
2335else
2336 eval "$3=\$ac_header_compiler"
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
2341fi
a9bec17c 2342 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2343
2344} # ac_fn_c_check_header_mongrel
2345
2346# ac_fn_c_try_run LINENO
2347# ----------------------
2348# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2349# that executables *can* be run.
2350ac_fn_c_try_run ()
2351{
2352 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353 if { { ac_try="$ac_link"
2354case "(($ac_try" in
2355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2356 *) ac_try_echo=$ac_try;;
2357esac
2358eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2359$as_echo "$ac_try_echo"; } >&5
2360 (eval "$ac_link") 2>&5
2361 ac_status=$?
2362 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2363 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2364 { { case "(($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_try") 2>&5
2371 ac_status=$?
2372 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2373 test $ac_status = 0; }; }; then :
2374 ac_retval=0
2375else
2376 $as_echo "$as_me: program exited with status $ac_status" >&5
2377 $as_echo "$as_me: failed program was:" >&5
2378sed 's/^/| /' conftest.$ac_ext >&5
2379
2380 ac_retval=$ac_status
2381fi
2382 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2383 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2384 as_fn_set_status $ac_retval
2385
2386} # ac_fn_c_try_run
2387
2388# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2389# -------------------------------------------------------
2390# Tests whether HEADER exists and can be compiled using the include files in
2391# INCLUDES, setting the cache variable VAR accordingly.
2392ac_fn_c_check_header_compile ()
2393{
2394 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2396$as_echo_n "checking for $2... " >&6; }
a9bec17c 2397if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2398 $as_echo_n "(cached) " >&6
2399else
2400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2401/* end confdefs.h. */
2402$4
2403#include <$2>
2404_ACEOF
2405if ac_fn_c_try_compile "$LINENO"; then :
2406 eval "$3=yes"
2407else
2408 eval "$3=no"
2409fi
2410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2411fi
2412eval ac_res=\$$3
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414$as_echo "$ac_res" >&6; }
a9bec17c 2415 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2416
2417} # ac_fn_c_check_header_compile
2418
1fd182f0
PE
2419# ac_fn_c_try_link LINENO
2420# -----------------------
2421# Try to link conftest.$ac_ext, and return whether this succeeded.
2422ac_fn_c_try_link ()
2423{
2424 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2425 rm -f conftest.$ac_objext conftest$ac_exeext
2426 if { { ac_try="$ac_link"
2427case "(($ac_try" in
2428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2429 *) ac_try_echo=$ac_try;;
2430esac
2431eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2432$as_echo "$ac_try_echo"; } >&5
2433 (eval "$ac_link") 2>conftest.err
2434 ac_status=$?
2435 if test -s conftest.err; then
2436 grep -v '^ *+' conftest.err >conftest.er1
2437 cat conftest.er1 >&5
2438 mv -f conftest.er1 conftest.err
2439 fi
2440 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2441 test $ac_status = 0; } && {
2442 test -z "$ac_c_werror_flag" ||
2443 test ! -s conftest.err
2444 } && test -s conftest$ac_exeext && {
2445 test "$cross_compiling" = yes ||
2446 $as_test_x conftest$ac_exeext
2447 }; then :
2448 ac_retval=0
2449else
2450 $as_echo "$as_me: failed program was:" >&5
2451sed 's/^/| /' conftest.$ac_ext >&5
2452
2453 ac_retval=1
2454fi
2455 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2456 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2457 # interfere with the next link command; also delete a directory that is
2458 # left behind by Apple's compiler. We do this before executing the actions.
2459 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
a9bec17c 2460 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2461 as_fn_set_status $ac_retval
2462
2463} # ac_fn_c_try_link
2464
42bbbe8b
GM
2465# ac_fn_c_check_decl LINENO SYMBOL VAR
2466# ------------------------------------
2467# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2468ac_fn_c_check_decl ()
2469{
2470 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2472$as_echo_n "checking whether $2 is declared... " >&6; }
2473if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2474 $as_echo_n "(cached) " >&6
2475else
2476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2477/* end confdefs.h. */
2478$4
2479int
2480main ()
2481{
2482#ifndef $2
2483 (void) $2;
2484#endif
2485
2486 ;
2487 return 0;
2488}
2489_ACEOF
2490if ac_fn_c_try_compile "$LINENO"; then :
2491 eval "$3=yes"
2492else
2493 eval "$3=no"
2494fi
2495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2496fi
2497eval ac_res=\$$3
2498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2499$as_echo "$ac_res" >&6; }
2500 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2501
2502} # ac_fn_c_check_decl
2503
5476a9a4
GM
2504# ac_fn_c_check_header_preproc LINENO HEADER VAR
2505# ----------------------------------------------
2506# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2507ac_fn_c_check_header_preproc ()
067d23c9
KY
2508{
2509 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2511$as_echo_n "checking for $2... " >&6; }
a9bec17c 2512if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2513 $as_echo_n "(cached) " >&6
2514else
2515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2516/* end confdefs.h. */
5476a9a4
GM
2517#include <$2>
2518_ACEOF
2519if ac_fn_c_try_cpp "$LINENO"; then :
2520 eval "$3=yes"
2521else
2522 eval "$3=no"
2523fi
2524rm -f conftest.err conftest.$ac_ext
2525fi
2526eval ac_res=\$$3
2527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2528$as_echo "$ac_res" >&6; }
2529 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9 2530
5476a9a4 2531} # ac_fn_c_check_header_preproc
067d23c9 2532
5476a9a4
GM
2533# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2534# ----------------------------------------------------
2535# Tries to find if the field MEMBER exists in type AGGR, after including
2536# INCLUDES, setting cache variable VAR accordingly.
2537ac_fn_c_check_member ()
2538{
2539 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2541$as_echo_n "checking for $2.$3... " >&6; }
2542if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2543 $as_echo_n "(cached) " >&6
2544else
2545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2546/* end confdefs.h. */
2547$5
2548int
2549main ()
2550{
2551static $2 ac_aggr;
2552if (ac_aggr.$3)
2553return 0;
2554 ;
2555 return 0;
2556}
2557_ACEOF
2558if ac_fn_c_try_compile "$LINENO"; then :
2559 eval "$4=yes"
2560else
2561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2562/* end confdefs.h. */
2563$5
2564int
2565main ()
2566{
2567static $2 ac_aggr;
2568if (sizeof ac_aggr.$3)
2569return 0;
2570 ;
2571 return 0;
2572}
2573_ACEOF
2574if ac_fn_c_try_compile "$LINENO"; then :
2575 eval "$4=yes"
2576else
2577 eval "$4=no"
2578fi
2579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2580fi
2581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2582fi
2583eval ac_res=\$$4
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2585$as_echo "$ac_res" >&6; }
2586 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2587
2588} # ac_fn_c_check_member
2589
2590# ac_fn_c_check_func LINENO FUNC VAR
2591# ----------------------------------
2592# Tests whether FUNC exists, setting the cache variable VAR accordingly
2593ac_fn_c_check_func ()
2594{
2595 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
2598if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2599 $as_echo_n "(cached) " >&6
2600else
2601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h. */
2603/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2604 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2605#define $2 innocuous_$2
2606
2607/* System header to define __stub macros and hopefully few prototypes,
2608 which can conflict with char $2 (); below.
2609 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2610 <limits.h> exists even on freestanding compilers. */
2611
2612#ifdef __STDC__
067d23c9
KY
2613# include <limits.h>
2614#else
2615# include <assert.h>
2616#endif
2617
2618#undef $2
2619
2620/* Override any GCC internal prototype to avoid an error.
2621 Use char because int might match the return type of a GCC
2622 builtin and then its argument prototype would still apply. */
2623#ifdef __cplusplus
2624extern "C"
2625#endif
2626char $2 ();
2627/* The GNU C library defines this for functions which it implements
2628 to always fail with ENOSYS. Some functions are actually named
2629 something starting with __ and the normal name is an alias. */
2630#if defined __stub_$2 || defined __stub___$2
2631choke me
2632#endif
2633
2634int
2635main ()
2636{
2637return $2 ();
2638 ;
2639 return 0;
2640}
2641_ACEOF
2642if ac_fn_c_try_link "$LINENO"; then :
2643 eval "$3=yes"
2644else
2645 eval "$3=no"
2646fi
2647rm -f core conftest.err conftest.$ac_objext \
2648 conftest$ac_exeext conftest.$ac_ext
2649fi
2650eval ac_res=\$$3
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2652$as_echo "$ac_res" >&6; }
a9bec17c 2653 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2654
2655} # ac_fn_c_check_func
2656
5476a9a4
GM
2657# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2658# -------------------------------------------
2659# Tests whether TYPE exists after having included INCLUDES, setting cache
2660# variable VAR accordingly.
2661ac_fn_c_check_type ()
3e0be4ab
GM
2662{
2663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5476a9a4
GM
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2665$as_echo_n "checking for $2... " >&6; }
2666if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
2667 $as_echo_n "(cached) " >&6
2668else
5476a9a4 2669 eval "$3=no"
3e0be4ab
GM
2670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2671/* end confdefs.h. */
5476a9a4 2672$4
3e0be4ab
GM
2673int
2674main ()
2675{
5476a9a4
GM
2676if (sizeof ($2))
2677 return 0;
3e0be4ab
GM
2678 ;
2679 return 0;
2680}
2681_ACEOF
2682if ac_fn_c_try_compile "$LINENO"; then :
2683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2684/* end confdefs.h. */
5476a9a4 2685$4
3e0be4ab
GM
2686int
2687main ()
2688{
5476a9a4
GM
2689if (sizeof (($2)))
2690 return 0;
3e0be4ab
GM
2691 ;
2692 return 0;
2693}
2694_ACEOF
2695if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 2696
3e0be4ab 2697else
5476a9a4 2698 eval "$3=yes"
3e0be4ab
GM
2699fi
2700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2701fi
2702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2703fi
5476a9a4 2704eval ac_res=\$$3
3e0be4ab
GM
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2706$as_echo "$ac_res" >&6; }
a9bec17c 2707 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
3e0be4ab 2708
5476a9a4 2709} # ac_fn_c_check_type
3e0be4ab 2710
5f90be1b
PE
2711# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2712# --------------------------------------------
2713# Tries to find the compile-time value of EXPR in a program that includes
2714# INCLUDES, setting VAR accordingly. Returns whether the value could be
2715# computed
2716ac_fn_c_compute_int ()
2717{
2718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2719 if test "$cross_compiling" = yes; then
2720 # Depending upon the size, compute the lo and hi bounds.
2721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2722/* end confdefs.h. */
2723$4
2724int
2725main ()
2726{
2727static int test_array [1 - 2 * !(($2) >= 0)];
2728test_array [0] = 0
2729
2730 ;
2731 return 0;
2732}
2733_ACEOF
2734if ac_fn_c_try_compile "$LINENO"; then :
2735 ac_lo=0 ac_mid=0
2736 while :; do
2737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2738/* end confdefs.h. */
2739$4
2740int
2741main ()
2742{
2743static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2744test_array [0] = 0
2745
2746 ;
2747 return 0;
2748}
2749_ACEOF
2750if ac_fn_c_try_compile "$LINENO"; then :
2751 ac_hi=$ac_mid; break
2752else
2753 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2754 if test $ac_lo -le $ac_mid; then
2755 ac_lo= ac_hi=
2756 break
2757 fi
2758 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2759fi
2760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761 done
2762else
2763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2764/* end confdefs.h. */
2765$4
2766int
2767main ()
2768{
2769static int test_array [1 - 2 * !(($2) < 0)];
2770test_array [0] = 0
2771
2772 ;
2773 return 0;
2774}
2775_ACEOF
2776if ac_fn_c_try_compile "$LINENO"; then :
2777 ac_hi=-1 ac_mid=-1
2778 while :; do
2779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h. */
2781$4
2782int
2783main ()
2784{
2785static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2786test_array [0] = 0
2787
2788 ;
2789 return 0;
2790}
2791_ACEOF
2792if ac_fn_c_try_compile "$LINENO"; then :
2793 ac_lo=$ac_mid; break
2794else
2795 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2796 if test $ac_mid -le $ac_hi; then
2797 ac_lo= ac_hi=
2798 break
2799 fi
2800 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2801fi
2802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2803 done
2804else
2805 ac_lo= ac_hi=
2806fi
2807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2808fi
2809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2810# Binary search between lo and hi bounds.
2811while test "x$ac_lo" != "x$ac_hi"; do
2812 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814/* end confdefs.h. */
2815$4
2816int
2817main ()
2818{
2819static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2820test_array [0] = 0
2821
2822 ;
2823 return 0;
2824}
2825_ACEOF
2826if ac_fn_c_try_compile "$LINENO"; then :
2827 ac_hi=$ac_mid
2828else
2829 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2830fi
2831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2832done
2833case $ac_lo in #((
2834?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2835'') ac_retval=1 ;;
2836esac
2837 else
2838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2839/* end confdefs.h. */
2840$4
2841static long int longval () { return $2; }
2842static unsigned long int ulongval () { return $2; }
2843#include <stdio.h>
2844#include <stdlib.h>
2845int
2846main ()
2847{
2848
2849 FILE *f = fopen ("conftest.val", "w");
2850 if (! f)
2851 return 1;
2852 if (($2) < 0)
2853 {
2854 long int i = longval ();
2855 if (i != ($2))
2856 return 1;
2857 fprintf (f, "%ld", i);
2858 }
2859 else
2860 {
2861 unsigned long int i = ulongval ();
2862 if (i != ($2))
2863 return 1;
2864 fprintf (f, "%lu", i);
2865 }
2866 /* Do not output a trailing newline, as this causes \r\n confusion
2867 on some platforms. */
2868 return ferror (f) || fclose (f) != 0;
2869
2870 ;
2871 return 0;
2872}
2873_ACEOF
2874if ac_fn_c_try_run "$LINENO"; then :
2875 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2876else
2877 ac_retval=1
2878fi
2879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2880 conftest.$ac_objext conftest.beam conftest.$ac_ext
2881rm -f conftest.val
2882
2883 fi
a9bec17c 2884 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
2885 as_fn_set_status $ac_retval
2886
2887} # ac_fn_c_compute_int
067d23c9
KY
2888cat >config.log <<_ACEOF
2889This file contains any messages produced by compilers while
2890running configure, to aid debugging if configure makes a mistake.
2891
67d34197 2892It was created by emacs $as_me 24.1.50, which was
a9bec17c 2893generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
2894
2895 $ $0 $@
2896
2897_ACEOF
2898exec 5>>config.log
2899{
2900cat <<_ASUNAME
2901## --------- ##
2902## Platform. ##
2903## --------- ##
2904
2905hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2906uname -m = `(uname -m) 2>/dev/null || echo unknown`
2907uname -r = `(uname -r) 2>/dev/null || echo unknown`
2908uname -s = `(uname -s) 2>/dev/null || echo unknown`
2909uname -v = `(uname -v) 2>/dev/null || echo unknown`
2910
2911/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2912/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2913
2914/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2915/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2916/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2917/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2918/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2919/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2920/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2921
2922_ASUNAME
2923
2924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2925for as_dir in $PATH
2926do
2927 IFS=$as_save_IFS
2928 test -z "$as_dir" && as_dir=.
2929 $as_echo "PATH: $as_dir"
2930 done
2931IFS=$as_save_IFS
2932
2933} >&5
2934
2935cat >&5 <<_ACEOF
2936
2937
2938## ----------- ##
2939## Core tests. ##
2940## ----------- ##
2941
2942_ACEOF
2943
2944
2945# Keep a trace of the command line.
2946# Strip out --no-create and --no-recursion so they do not pile up.
2947# Strip out --silent because we don't want to record it for future runs.
2948# Also quote any args containing shell meta-characters.
2949# Make two passes to allow for proper duplicate-argument suppression.
2950ac_configure_args=
2951ac_configure_args0=
2952ac_configure_args1=
2953ac_must_keep_next=false
2954for ac_pass in 1 2
2955do
2956 for ac_arg
2957 do
2958 case $ac_arg in
2959 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2960 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2961 | -silent | --silent | --silen | --sile | --sil)
2962 continue ;;
2963 *\'*)
2964 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2965 esac
2966 case $ac_pass in
2967 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2968 2)
2969 as_fn_append ac_configure_args1 " '$ac_arg'"
2970 if test $ac_must_keep_next = true; then
2971 ac_must_keep_next=false # Got value, back to normal.
2972 else
2973 case $ac_arg in
2974 *=* | --config-cache | -C | -disable-* | --disable-* \
2975 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2976 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2977 | -with-* | --with-* | -without-* | --without-* | --x)
2978 case "$ac_configure_args0 " in
2979 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2980 esac
2981 ;;
2982 -* ) ac_must_keep_next=true ;;
2983 esac
2984 fi
2985 as_fn_append ac_configure_args " '$ac_arg'"
2986 ;;
2987 esac
2988 done
2989done
2990{ ac_configure_args0=; unset ac_configure_args0;}
2991{ ac_configure_args1=; unset ac_configure_args1;}
2992
2993# When interrupted or exit'd, cleanup temporary files, and complete
2994# config.log. We remove comments because anyway the quotes in there
2995# would cause problems or look ugly.
2996# WARNING: Use '\'' to represent an apostrophe within the trap.
2997# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2998trap 'exit_status=$?
2999 # Save into config.log some information that might help in debugging.
3000 {
3001 echo
3002
a9bec17c
GM
3003 cat <<\_ASBOX
3004## ---------------- ##
067d23c9 3005## Cache variables. ##
a9bec17c
GM
3006## ---------------- ##
3007_ASBOX
067d23c9
KY
3008 echo
3009 # The following way of writing the cache mishandles newlines in values,
3010(
3011 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3012 eval ac_val=\$$ac_var
3013 case $ac_val in #(
3014 *${as_nl}*)
3015 case $ac_var in #(
3016 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3017$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3018 esac
3019 case $ac_var in #(
3020 _ | IFS | as_nl) ;; #(
3021 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3022 *) { eval $ac_var=; unset $ac_var;} ;;
3023 esac ;;
3024 esac
3025 done
3026 (set) 2>&1 |
3027 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3028 *${as_nl}ac_space=\ *)
3029 sed -n \
3030 "s/'\''/'\''\\\\'\'''\''/g;
3031 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3032 ;; #(
3033 *)
3034 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3035 ;;
3036 esac |
3037 sort
3038)
3039 echo
3040
a9bec17c
GM
3041 cat <<\_ASBOX
3042## ----------------- ##
067d23c9 3043## Output variables. ##
a9bec17c
GM
3044## ----------------- ##
3045_ASBOX
067d23c9
KY
3046 echo
3047 for ac_var in $ac_subst_vars
3048 do
3049 eval ac_val=\$$ac_var
3050 case $ac_val in
3051 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3052 esac
3053 $as_echo "$ac_var='\''$ac_val'\''"
3054 done | sort
3055 echo
3056
3057 if test -n "$ac_subst_files"; then
a9bec17c
GM
3058 cat <<\_ASBOX
3059## ------------------- ##
067d23c9 3060## File substitutions. ##
a9bec17c
GM
3061## ------------------- ##
3062_ASBOX
067d23c9
KY
3063 echo
3064 for ac_var in $ac_subst_files
3065 do
3066 eval ac_val=\$$ac_var
3067 case $ac_val in
3068 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3069 esac
3070 $as_echo "$ac_var='\''$ac_val'\''"
3071 done | sort
3072 echo
3073 fi
3074
3075 if test -s confdefs.h; then
a9bec17c
GM
3076 cat <<\_ASBOX
3077## ----------- ##
067d23c9 3078## confdefs.h. ##
a9bec17c
GM
3079## ----------- ##
3080_ASBOX
067d23c9
KY
3081 echo
3082 cat confdefs.h
3083 echo
3084 fi
3085 test "$ac_signal" != 0 &&
3086 $as_echo "$as_me: caught signal $ac_signal"
3087 $as_echo "$as_me: exit $exit_status"
3088 } >&5
3089 rm -f core *.core core.conftest.* &&
3090 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3091 exit $exit_status
3092' 0
3093for ac_signal in 1 2 13 15; do
3094 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3095done
3096ac_signal=0
3097
3098# confdefs.h avoids OS command line length limits that DEFS can exceed.
3099rm -f -r conftest* confdefs.h
3100
3101$as_echo "/* confdefs.h */" > confdefs.h
3102
3103# Predefined preprocessor variables.
3104
3105cat >>confdefs.h <<_ACEOF
3106#define PACKAGE_NAME "$PACKAGE_NAME"
3107_ACEOF
3108
3109cat >>confdefs.h <<_ACEOF
3110#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3111_ACEOF
3112
3113cat >>confdefs.h <<_ACEOF
3114#define PACKAGE_VERSION "$PACKAGE_VERSION"
3115_ACEOF
3116
3117cat >>confdefs.h <<_ACEOF
3118#define PACKAGE_STRING "$PACKAGE_STRING"
3119_ACEOF
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3123_ACEOF
3124
3125cat >>confdefs.h <<_ACEOF
3126#define PACKAGE_URL "$PACKAGE_URL"
3127_ACEOF
3128
3129
3130# Let the site file select an alternate cache file if it wants to.
3131# Prefer an explicitly selected file to automatically selected ones.
3132ac_site_file1=NONE
3133ac_site_file2=NONE
3134if test -n "$CONFIG_SITE"; then
a9bec17c 3135 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3136elif test "x$prefix" != xNONE; then
3137 ac_site_file1=$prefix/share/config.site
3138 ac_site_file2=$prefix/etc/config.site
3139else
3140 ac_site_file1=$ac_default_prefix/share/config.site
3141 ac_site_file2=$ac_default_prefix/etc/config.site
3142fi
3143for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3144do
3145 test "x$ac_site_file" = xNONE && continue
3146 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3147 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3148$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3149 sed 's/^/| /' "$ac_site_file" >&5
a9bec17c 3150 . "$ac_site_file"
067d23c9
KY
3151 fi
3152done
3153
3154if test -r "$cache_file"; then
3155 # Some versions of bash will fail to source /dev/null (special files
3156 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3157 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3159$as_echo "$as_me: loading cache $cache_file" >&6;}
3160 case $cache_file in
3161 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3162 *) . "./$cache_file";;
3163 esac
3164 fi
3165else
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3167$as_echo "$as_me: creating cache $cache_file" >&6;}
3168 >$cache_file
3169fi
3170
5476a9a4
GM
3171as_fn_append ac_header_list " linux/version.h"
3172as_fn_append ac_header_list " sys/systeminfo.h"
3173as_fn_append ac_header_list " stdio_ext.h"
3174as_fn_append ac_header_list " fcntl.h"
3175as_fn_append ac_header_list " coff.h"
3176as_fn_append ac_header_list " pty.h"
3177as_fn_append ac_header_list " sys/vlimit.h"
3178as_fn_append ac_header_list " sys/resource.h"
3179as_fn_append ac_header_list " sys/utsname.h"
3180as_fn_append ac_header_list " pwd.h"
3181as_fn_append ac_header_list " utmp.h"
3182as_fn_append ac_header_list " dirent.h"
3183as_fn_append ac_header_list " util.h"
3184as_fn_append ac_header_list " sys/socket.h"
3185as_fn_append ac_header_list " stdlib.h"
3186as_fn_append ac_header_list " unistd.h"
7e723570 3187as_fn_append ac_header_list " sys/param.h"
5476a9a4
GM
3188as_fn_append ac_header_list " pthread.h"
3189as_fn_append ac_header_list " malloc/malloc.h"
3190as_fn_append ac_header_list " maillock.h"
3191as_fn_append ac_header_list " sys/un.h"
3192as_fn_append ac_func_list " tzset"
3193as_fn_append ac_func_list " readlinkat"
f199cab1
GM
3194gl_getopt_required=GNU
3195as_fn_append ac_header_list " getopt.h"
3196as_fn_append ac_func_list " gettimeofday"
3197as_fn_append ac_func_list " nanotime"
e700232f 3198as_fn_append ac_header_list " sys/time.h"
f199cab1
GM
3199as_fn_append ac_header_list " wchar.h"
3200as_fn_append ac_header_list " stdint.h"
3201as_fn_append ac_header_list " inttypes.h"
3202as_fn_append ac_func_list " lstat"
f199cab1
GM
3203as_fn_append ac_func_list " alarm"
3204as_fn_append ac_header_list " sys/select.h"
3205as_fn_append ac_func_list " pselect"
3206as_fn_append ac_func_list " pthread_sigmask"
3207as_fn_append ac_func_list " readlink"
f199cab1
GM
3208as_fn_append ac_func_list " strtoimax"
3209as_fn_append ac_func_list " strtoumax"
3210as_fn_append ac_func_list " symlink"
3211as_fn_append ac_header_list " sys/stat.h"
3212as_fn_append ac_func_list " localtime_r"
e700232f 3213as_fn_append ac_header_list " utime.h"
f199cab1
GM
3214as_fn_append ac_func_list " futimes"
3215as_fn_append ac_func_list " futimesat"
3216as_fn_append ac_func_list " futimens"
3217as_fn_append ac_func_list " utimensat"
3218as_fn_append ac_func_list " lutimes"
067d23c9
KY
3219# Check that the precious variables saved in the cache have kept the same
3220# value.
3221ac_cache_corrupted=false
3222for ac_var in $ac_precious_vars; do
3223 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3224 eval ac_new_set=\$ac_env_${ac_var}_set
3225 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3226 eval ac_new_val=\$ac_env_${ac_var}_value
3227 case $ac_old_set,$ac_new_set in
3228 set,)
3229 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3230$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3231 ac_cache_corrupted=: ;;
3232 ,set)
3233 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3234$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3235 ac_cache_corrupted=: ;;
3236 ,);;
3237 *)
3238 if test "x$ac_old_val" != "x$ac_new_val"; then
3239 # differences in whitespace do not lead to failure.
3240 ac_old_val_w=`echo x $ac_old_val`
3241 ac_new_val_w=`echo x $ac_new_val`
3242 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3243 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3244$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3245 ac_cache_corrupted=:
3246 else
3247 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3248$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3249 eval $ac_var=\$ac_old_val
3250 fi
3251 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3252$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3253 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3254$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3255 fi;;
3256 esac
3257 # Pass precious variables to config.status.
3258 if test "$ac_new_set" = set; then
3259 case $ac_new_val in
3260 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3261 *) ac_arg=$ac_var=$ac_new_val ;;
3262 esac
3263 case " $ac_configure_args " in
3264 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3265 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3266 esac
3267 fi
3268done
3269if $ac_cache_corrupted; then
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3271$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3272 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3273$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
a9bec17c 3274 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3275fi
3276## -------------------- ##
3277## Main body of script. ##
3278## -------------------- ##
3279
3280ac_ext=c
3281ac_cpp='$CPP $CPPFLAGS'
3282ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3283ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3284ac_compiler_gnu=$ac_cv_c_compiler_gnu
3285
3286
3287ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3288
3289
743c80a7 3290ac_aux_dir=
369e19fc 3291for ac_dir in build-aux "$srcdir"/build-aux; do
a9bec17c
GM
3292 for ac_t in install-sh install.sh shtool; do
3293 if test -f "$ac_dir/$ac_t"; then
3294 ac_aux_dir=$ac_dir
3295 ac_install_sh="$ac_aux_dir/$ac_t -c"
3296 break 2
3297 fi
3298 done
743c80a7
PE
3299done
3300if test -z "$ac_aux_dir"; then
a9bec17c 3301 as_fn_error "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
743c80a7 3302fi
067d23c9 3303
743c80a7
PE
3304# These three variables are undocumented and unsupported,
3305# and are intended to be withdrawn in a future Autoconf release.
3306# They can cause serious problems if a builder's source tree is in a directory
3307# whose full name contains unusual characters.
3308ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3309ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3310ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3311
067d23c9 3312
369e19fc
PE
3313am__api_version='1.11'
3314
743c80a7
PE
3315# Find a good install program. We prefer a C program (faster),
3316# so one script is as good as another. But avoid the broken or
3317# incompatible versions:
3318# SysV /etc/install, /usr/sbin/install
3319# SunOS /usr/etc/install
3320# IRIX /sbin/install
3321# AIX /bin/install
3322# AmigaOS /C/install, which installs bootblocks on floppy discs
3323# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3324# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3325# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3326# OS/2's system install, which has a completely different semantic
3327# ./install, which can be erroneously created by make from ./install.sh.
3328# Reject install programs that cannot install multiple files.
3329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3330$as_echo_n "checking for a BSD-compatible install... " >&6; }
3331if test -z "$INSTALL"; then
a9bec17c 3332if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3333 $as_echo_n "(cached) " >&6
3334else
3335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3336for as_dir in $PATH
3337do
3338 IFS=$as_save_IFS
3339 test -z "$as_dir" && as_dir=.
3340 # Account for people who put trailing slashes in PATH elements.
3341case $as_dir/ in #((
3342 ./ | .// | /[cC]/* | \
3343 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3344 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3345 /usr/ucb/* ) ;;
3346 *)
3347 # OSF1 and SCO ODT 3.0 have their own names for install.
3348 # Don't use installbsd from OSF since it installs stuff as root
3349 # by default.
3350 for ac_prog in ginstall scoinst install; do
3351 for ac_exec_ext in '' $ac_executable_extensions; do
3352 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3353 if test $ac_prog = install &&
3354 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3355 # AIX install. It has an incompatible calling convention.
3356 :
3357 elif test $ac_prog = install &&
3358 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3359 # program-specific install script used by HP pwplus--don't use.
3360 :
3361 else
3362 rm -rf conftest.one conftest.two conftest.dir
3363 echo one > conftest.one
3364 echo two > conftest.two
3365 mkdir conftest.dir
3366 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3367 test -s conftest.one && test -s conftest.two &&
3368 test -s conftest.dir/conftest.one &&
3369 test -s conftest.dir/conftest.two
3370 then
3371 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3372 break 3
3373 fi
3374 fi
3375 fi
3376 done
3377 done
3378 ;;
3379esac
067d23c9 3380
743c80a7
PE
3381 done
3382IFS=$as_save_IFS
067d23c9 3383
743c80a7 3384rm -rf conftest.one conftest.two conftest.dir
067d23c9 3385
067d23c9 3386fi
743c80a7
PE
3387 if test "${ac_cv_path_install+set}" = set; then
3388 INSTALL=$ac_cv_path_install
3389 else
3390 # As a last resort, use the slow shell script. Don't cache a
3391 # value for INSTALL within a source directory, because that will
3392 # break other packages using the cache if that directory is
3393 # removed, or if the value is a relative name.
3394 INSTALL=$ac_install_sh
3395 fi
067d23c9 3396fi
743c80a7
PE
3397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3398$as_echo "$INSTALL" >&6; }
067d23c9 3399
743c80a7
PE
3400# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3401# It thinks the first close brace ends the variable substitution.
3402test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3403
743c80a7 3404test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3405
743c80a7 3406test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3407
743c80a7
PE
3408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3409$as_echo_n "checking whether build environment is sane... " >&6; }
3410# Just in case
3411sleep 1
3412echo timestamp > conftest.file
3413# Reject unsafe characters in $srcdir or the absolute working directory
3414# name. Accept space and tab only in the latter.
3415am_lf='
3416'
3417case `pwd` in
3418 *[\\\"\#\$\&\'\`$am_lf]*)
a9bec17c 3419 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3420esac
3421case $srcdir in
3422 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
a9bec17c 3423 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3424esac
067d23c9 3425
743c80a7
PE
3426# Do `set' in a subshell so we don't clobber the current shell's
3427# arguments. Must try -L first in case configure is actually a
3428# symlink; some systems play weird games with the mod time of symlinks
3429# (eg FreeBSD returns the mod time of the symlink's containing
3430# directory).
3431if (
3432 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3433 if test "$*" = "X"; then
3434 # -L didn't work.
3435 set X `ls -t "$srcdir/configure" conftest.file`
3436 fi
3437 rm -f conftest.file
3438 if test "$*" != "X $srcdir/configure conftest.file" \
3439 && test "$*" != "X conftest.file $srcdir/configure"; then
3440
3441 # If neither matched, then we have a broken ls. This can happen
3442 # if, for instance, CONFIG_SHELL is bash and it inherits a
3443 # broken ls alias from the environment. This has actually
3444 # happened. Such a system could not be considered "sane".
a9bec17c 3445 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3446alias in your environment" "$LINENO" 5
3447 fi
067d23c9 3448
743c80a7
PE
3449 test "$2" = conftest.file
3450 )
3451then
3452 # Ok.
3453 :
067d23c9 3454else
a9bec17c 3455 as_fn_error "newly created file is older than distributed files!
743c80a7 3456Check your system clock" "$LINENO" 5
067d23c9 3457fi
743c80a7
PE
3458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3459$as_echo "yes" >&6; }
3460test "$program_prefix" != NONE &&
3461 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3462# Use a double $ so make ignores it.
3463test "$program_suffix" != NONE &&
3464 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3465# Double any \ or $.
3466# By default was `s,x,x', remove it if useless.
3467ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3468program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3469
743c80a7
PE
3470# expand $ac_aux_dir to an absolute path
3471am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3472
743c80a7
PE
3473if test x"${MISSING+set}" != xset; then
3474 case $am_aux_dir in
3475 *\ * | *\ *)
3476 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3477 *)
3478 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3479 esac
067d23c9 3480fi
743c80a7
PE
3481# Use eval to expand $SHELL
3482if eval "$MISSING --run true"; then
3483 am_missing_run="$MISSING --run "
067d23c9 3484else
743c80a7
PE
3485 am_missing_run=
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3487$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3488fi
3489
743c80a7
PE
3490if test x"${install_sh}" != xset; then
3491 case $am_aux_dir in
3492 *\ * | *\ *)
3493 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3494 *)
3495 install_sh="\${SHELL} $am_aux_dir/install-sh"
3496 esac
067d23c9
KY
3497fi
3498
743c80a7
PE
3499# Installed binaries are usually stripped using `strip' when the user
3500# run `make install-strip'. However `strip' might not be the right
3501# tool to use in cross-compilation environments, therefore Automake
3502# will honor the `STRIP' environment variable to overrule this program.
3503if test "$cross_compiling" != no; then
3504 if test -n "$ac_tool_prefix"; then
3505 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3506set dummy ${ac_tool_prefix}strip; ac_word=$2
3507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3508$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3509if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3510 $as_echo_n "(cached) " >&6
067d23c9 3511else
743c80a7
PE
3512 if test -n "$STRIP"; then
3513 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3514else
3515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3516for as_dir in $PATH
3517do
3518 IFS=$as_save_IFS
3519 test -z "$as_dir" && as_dir=.
3520 for ac_exec_ext in '' $ac_executable_extensions; do
3521 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3522 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3523 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3524 break 2
3525 fi
3526done
3527 done
3528IFS=$as_save_IFS
067d23c9
KY
3529
3530fi
067d23c9 3531fi
743c80a7
PE
3532STRIP=$ac_cv_prog_STRIP
3533if test -n "$STRIP"; then
3534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3535$as_echo "$STRIP" >&6; }
3536else
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3538$as_echo "no" >&6; }
067d23c9
KY
3539fi
3540
3541
067d23c9 3542fi
743c80a7
PE
3543if test -z "$ac_cv_prog_STRIP"; then
3544 ac_ct_STRIP=$STRIP
3545 # Extract the first word of "strip", so it can be a program name with args.
3546set dummy strip; ac_word=$2
3547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3548$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3549if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3550 $as_echo_n "(cached) " >&6
3551else
3552 if test -n "$ac_ct_STRIP"; then
3553 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3554else
3555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3556for as_dir in $PATH
3557do
3558 IFS=$as_save_IFS
3559 test -z "$as_dir" && as_dir=.
3560 for ac_exec_ext in '' $ac_executable_extensions; do
3561 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3562 ac_cv_prog_ac_ct_STRIP="strip"
3563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3564 break 2
3565 fi
3566done
3567 done
3568IFS=$as_save_IFS
3569
3570fi
3571fi
3572ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3573if test -n "$ac_ct_STRIP"; then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3575$as_echo "$ac_ct_STRIP" >&6; }
3576else
3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3578$as_echo "no" >&6; }
3579fi
3580
3581 if test "x$ac_ct_STRIP" = x; then
3582 STRIP=":"
3583 else
3584 case $cross_compiling:$ac_tool_warned in
3585yes:)
3586{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3587$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3588ac_tool_warned=yes ;;
3589esac
3590 STRIP=$ac_ct_STRIP
3591 fi
3592else
3593 STRIP="$ac_cv_prog_STRIP"
3594fi
3595
3596fi
3597INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3598
3599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3600$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3601if test -z "$MKDIR_P"; then
a9bec17c 3602 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3603 $as_echo_n "(cached) " >&6
3604else
3605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3606for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3607do
3608 IFS=$as_save_IFS
3609 test -z "$as_dir" && as_dir=.
3610 for ac_prog in mkdir gmkdir; do
3611 for ac_exec_ext in '' $ac_executable_extensions; do
3612 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3613 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3614 'mkdir (GNU coreutils) '* | \
3615 'mkdir (coreutils) '* | \
3616 'mkdir (fileutils) '4.1*)
3617 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3618 break 3;;
3619 esac
3620 done
3621 done
3622 done
3623IFS=$as_save_IFS
3624
3625fi
3626
3627 test -d ./--version && rmdir ./--version
3628 if test "${ac_cv_path_mkdir+set}" = set; then
3629 MKDIR_P="$ac_cv_path_mkdir -p"
3630 else
3631 # As a last resort, use the slow shell script. Don't cache a
3632 # value for MKDIR_P within a source directory, because that will
3633 # break other packages using the cache if that directory is
3634 # removed, or if the value is a relative name.
3635 MKDIR_P="$ac_install_sh -d"
3636 fi
3637fi
3638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3639$as_echo "$MKDIR_P" >&6; }
3640
a451f14b 3641
743c80a7
PE
3642mkdir_p="$MKDIR_P"
3643case $mkdir_p in
3644 [\\/$]* | ?:[\\/]*) ;;
3645 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3646esac
3647
3648for ac_prog in gawk mawk nawk awk
3649do
3650 # Extract the first word of "$ac_prog", so it can be a program name with args.
3651set dummy $ac_prog; ac_word=$2
3652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 3654if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3655 $as_echo_n "(cached) " >&6
3656else
3657 if test -n "$AWK"; then
3658 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3659else
3660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
3665 for ac_exec_ext in '' $ac_executable_extensions; do
3666 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3667 ac_cv_prog_AWK="$ac_prog"
3668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3669 break 2
3670 fi
3671done
3672 done
3673IFS=$as_save_IFS
3674
3675fi
3676fi
3677AWK=$ac_cv_prog_AWK
3678if test -n "$AWK"; then
3679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3680$as_echo "$AWK" >&6; }
3681else
3682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3683$as_echo "no" >&6; }
3684fi
3685
3686
3687 test -n "$AWK" && break
3688done
3689
3690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3691$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3692set x ${MAKE-make}
3693ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
a9bec17c 3694if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3695 $as_echo_n "(cached) " >&6
3696else
3697 cat >conftest.make <<\_ACEOF
3698SHELL = /bin/sh
3699all:
3700 @echo '@@@%%%=$(MAKE)=@@@%%%'
3701_ACEOF
a9bec17c 3702# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3703case `${MAKE-make} -f conftest.make 2>/dev/null` in
3704 *@@@%%%=?*=@@@%%%*)
3705 eval ac_cv_prog_make_${ac_make}_set=yes;;
3706 *)
3707 eval ac_cv_prog_make_${ac_make}_set=no;;
3708esac
3709rm -f conftest.make
3710fi
3711if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3713$as_echo "yes" >&6; }
3714 SET_MAKE=
3715else
3716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
3718 SET_MAKE="MAKE=${MAKE-make}"
3719fi
3720
3721rm -rf .tst 2>/dev/null
3722mkdir .tst 2>/dev/null
3723if test -d .tst; then
3724 am__leading_dot=.
3725else
3726 am__leading_dot=_
3727fi
3728rmdir .tst 2>/dev/null
3729
3730if test "`cd $srcdir && pwd`" != "`pwd`"; then
3731 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3732 # is not polluted with repeated "-I."
3733 am__isrc=' -I$(srcdir)'
3734 # test to see if srcdir already configured
3735 if test -f $srcdir/config.status; then
a9bec17c 3736 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3737 fi
3738fi
3739
3740# test whether we have cygpath
3741if test -z "$CYGPATH_W"; then
3742 if (cygpath --version) >/dev/null 2>/dev/null; then
3743 CYGPATH_W='cygpath -w'
3744 else
3745 CYGPATH_W=echo
3746 fi
3747fi
3748
3749
3750# Define the identity of the package.
3751 PACKAGE='emacs'
67d34197 3752 VERSION='24.1.50'
743c80a7
PE
3753
3754
3755cat >>confdefs.h <<_ACEOF
3756#define PACKAGE "$PACKAGE"
3757_ACEOF
3758
3759
3760cat >>confdefs.h <<_ACEOF
3761#define VERSION "$VERSION"
3762_ACEOF
3763
3764# Some tools Automake needs.
3765
3766ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3767
3768
3769AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3770
3771
3772AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3773
3774
3775AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3776
3777
3778MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3779
3780# We need awk for the "check" target. The system "awk" is bad on
3781# some platforms.
3782# Always define AMTAR for backward compatibility.
3783
3784AMTAR=${AMTAR-"${am_missing_run}tar"}
3785
3786am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3787
3788
3789
3790
3791
3792
3793
3794
3795lispdir='${datadir}/emacs/${version}/lisp'
e1939eb1 3796leimdir='${datadir}/emacs/${version}/leim'
397f7161 3797standardlisppath='${lispdir}:${leimdir}'
743c80a7
PE
3798locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3799'${datadir}/emacs/site-lisp'
397f7161 3800lisppath='${locallisppath}:${standardlisppath}'
743c80a7
PE
3801etcdir='${datadir}/emacs/${version}/etc'
3802archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3803docdir='${datadir}/emacs/${version}/etc'
3804gamedir='${localstatedir}/games/emacs'
3805
3806
3807
3808
3809# Check whether --with-pop was given.
3810if test "${with_pop+set}" = set; then :
3811 withval=$with_pop;
3812else
3813 with_pop=yes
3814fi
3815
3816if test "$with_pop" = yes; then
3817 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3818
3819fi
3820
3821
3822# Check whether --with-kerberos was given.
3823if test "${with_kerberos+set}" = set; then :
3824 withval=$with_kerberos;
3825else
3826 with_kerberos=no
3827fi
3828
3829if test "$with_kerberos" != no; then
3830 $as_echo "#define KERBEROS 1" >>confdefs.h
3831
3832fi
3833
3834
3835# Check whether --with-kerberos5 was given.
3836if test "${with_kerberos5+set}" = set; then :
3837 withval=$with_kerberos5;
3838else
3839 with_kerberos5=no
3840fi
3841
3842if test "${with_kerberos5}" != no; then
3843 if test "${with_kerberos}" = no; then
3844 with_kerberos=yes
3845 $as_echo "#define KERBEROS 1" >>confdefs.h
3846
3847 fi
3848
3849$as_echo "#define KERBEROS5 1" >>confdefs.h
3850
3851fi
3852
3853
3854# Check whether --with-hesiod was given.
3855if test "${with_hesiod+set}" = set; then :
3856 withval=$with_hesiod;
3857else
3858 with_hesiod=no
3859fi
3860
3861if test "$with_hesiod" != no; then
3862
3863$as_echo "#define HESIOD 1" >>confdefs.h
3864
3865fi
3866
3867
3868# Check whether --with-mmdf was given.
3869if test "${with_mmdf+set}" = set; then :
3870 withval=$with_mmdf;
3871else
3872 with_mmdf=no
3873fi
3874
3875if test "$with_mmdf" != no; then
3876
3877$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
3878
3879fi
3880
3881
3882# Check whether --with-mail-unlink was given.
3883if test "${with_mail_unlink+set}" = set; then :
3884 withval=$with_mail_unlink;
3885else
3886 with_mail_unlink=no
3887fi
3888
3889if test "$with_mail_unlink" != no; then
3890
3891$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
3892
3893fi
3894
3895
3896# Check whether --with-mailhost was given.
3897if test "${with_mailhost+set}" = set; then :
3898 withval=$with_mailhost;
3899cat >>confdefs.h <<_ACEOF
3900#define MAILHOST "$withval"
3901_ACEOF
3902
3903fi
3904
3905
3906
067d23c9
KY
3907# Check whether --with-sound was given.
3908if test "${with_sound+set}" = set; then :
3909 withval=$with_sound;
3910else
3911 with_sound=yes
3912fi
3913
3914
3915
3916# Check whether --with-sync-input was given.
3917if test "${with_sync_input+set}" = set; then :
3918 withval=$with_sync_input;
3919else
3920 with_sync_input=yes
3921fi
3922
3923if test "$with_sync_input" = yes; then
3924
3925$as_echo "#define SYNC_INPUT 1" >>confdefs.h
3926
3927fi
3928
3929
3930# Check whether --with-x-toolkit was given.
3931if test "${with_x_toolkit+set}" = set; then :
3932 withval=$with_x_toolkit; case "${withval}" in
3933 y | ye | yes ) val=gtk ;;
3934 n | no ) val=no ;;
3935 l | lu | luc | luci | lucid ) val=lucid ;;
3936 a | at | ath | athe | athen | athena ) val=athena ;;
3937 m | mo | mot | moti | motif ) val=motif ;;
3938 g | gt | gtk ) val=gtk ;;
3939 gtk3 ) val=gtk3 ;;
3940 * )
a9bec17c 3941as_fn_error "\`--with-x-toolkit=$withval' is invalid;
067d23c9
KY
3942this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
3943\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
3944 ;;
3945 esac
3946 with_x_toolkit=$val
3947
3948fi
3949
3950
3951
0442dc7f
GM
3952# Check whether --with-wide-int was given.
3953if test "${with_wide_int+set}" = set; then :
3954 withval=$with_wide_int;
3955else
3956 with_wide_int=no
3957fi
3958
3959if test "$with_wide_int" = yes; then
3960
3961$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
3962
3963fi
3964
3965
067d23c9
KY
3966# Check whether --with-xpm was given.
3967if test "${with_xpm+set}" = set; then :
3968 withval=$with_xpm;
3969else
3970 with_xpm=yes
3971fi
3972
3973
3974# Check whether --with-jpeg was given.
3975if test "${with_jpeg+set}" = set; then :
3976 withval=$with_jpeg;
3977else
3978 with_jpeg=yes
3979fi
3980
3981
3982# Check whether --with-tiff was given.
3983if test "${with_tiff+set}" = set; then :
3984 withval=$with_tiff;
3985else
3986 with_tiff=yes
3987fi
3988
3989
3990# Check whether --with-gif was given.
3991if test "${with_gif+set}" = set; then :
3992 withval=$with_gif;
3993else
3994 with_gif=yes
3995fi
3996
3997
3998# Check whether --with-png was given.
3999if test "${with_png+set}" = set; then :
4000 withval=$with_png;
4001else
4002 with_png=yes
4003fi
4004
4005
4006# Check whether --with-rsvg was given.
4007if test "${with_rsvg+set}" = set; then :
4008 withval=$with_rsvg;
4009else
4010 with_rsvg=yes
4011fi
4012
4013
4014# Check whether --with-xml2 was given.
4015if test "${with_xml2+set}" = set; then :
4016 withval=$with_xml2;
4017else
4018 with_xml2=yes
4019fi
4020
4021
4022# Check whether --with-imagemagick was given.
4023if test "${with_imagemagick+set}" = set; then :
4024 withval=$with_imagemagick;
4025else
4026 with_imagemagick=yes
4027fi
4028
4029
4030
4031# Check whether --with-xft was given.
4032if test "${with_xft+set}" = set; then :
4033 withval=$with_xft;
4034else
4035 with_xft=yes
4036fi
4037
4038
4039# Check whether --with-libotf was given.
4040if test "${with_libotf+set}" = set; then :
4041 withval=$with_libotf;
4042else
4043 with_libotf=yes
4044fi
4045
4046
4047# Check whether --with-m17n-flt was given.
4048if test "${with_m17n_flt+set}" = set; then :
4049 withval=$with_m17n_flt;
4050else
4051 with_m17n_flt=yes
4052fi
4053
4054
4055
4056# Check whether --with-toolkit-scroll-bars was given.
4057if test "${with_toolkit_scroll_bars+set}" = set; then :
4058 withval=$with_toolkit_scroll_bars;
4059else
4060 with_toolkit_scroll_bars=yes
4061fi
4062
4063
4064# Check whether --with-xaw3d was given.
4065if test "${with_xaw3d+set}" = set; then :
4066 withval=$with_xaw3d;
4067else
4068 with_xaw3d=yes
4069fi
4070
4071
4072# Check whether --with-xim was given.
4073if test "${with_xim+set}" = set; then :
4074 withval=$with_xim;
4075else
4076 with_xim=yes
4077fi
4078
4079
4080# Check whether --with-ns was given.
4081if test "${with_ns+set}" = set; then :
4082 withval=$with_ns;
4083else
4084 with_ns=no
4085fi
4086
4087
4088
4089# Check whether --with-gpm was given.
4090if test "${with_gpm+set}" = set; then :
4091 withval=$with_gpm;
4092else
4093 with_gpm=yes
4094fi
4095
4096
4097# Check whether --with-dbus was given.
4098if test "${with_dbus+set}" = set; then :
4099 withval=$with_dbus;
4100else
4101 with_dbus=yes
4102fi
4103
4104
4105# Check whether --with-gconf was given.
4106if test "${with_gconf+set}" = set; then :
4107 withval=$with_gconf;
4108else
4109 with_gconf=yes
4110fi
4111
4112
f527bd02
GM
4113# Check whether --with-gsettings was given.
4114if test "${with_gsettings+set}" = set; then :
4115 withval=$with_gsettings;
4116else
4117 with_gsettings=yes
4118fi
4119
4120
067d23c9
KY
4121# Check whether --with-selinux was given.
4122if test "${with_selinux+set}" = set; then :
4123 withval=$with_selinux;
4124else
4125 with_selinux=yes
4126fi
4127
4128
4129# Check whether --with-gnutls was given.
4130if test "${with_gnutls+set}" = set; then :
4131 withval=$with_gnutls;
4132else
4133 with_gnutls=yes
4134fi
4135
4136
4137## For the times when you want to build Emacs but don't have
4138## a suitable makeinfo, and can live without the manuals.
4139
4140# Check whether --with-makeinfo was given.
4141if test "${with_makeinfo+set}" = set; then :
4142 withval=$with_makeinfo;
4143else
4144 with_makeinfo=yes
4145fi
4146
4147
c3a461a5
GM
4148## Makefile.in needs the cache file name.
4149
4150
067d23c9
KY
4151## This is an option because I do not know if all info/man support
4152## compressed files, nor how to test if they do so.
4153
4154# Check whether --with-compress-info was given.
4155if test "${with_compress_info+set}" = set; then :
4156 withval=$with_compress_info;
4157else
4158 with_compress_info=yes
4159fi
4160
4161if test $with_compress_info = yes; then
4162 GZIP_INFO=yes
4163else
4164 GZIP_INFO=
4165fi
4166
4167
4168
4169# Check whether --with-pkg-config-prog was given.
4170if test "${with_pkg_config_prog+set}" = set; then :
4171 withval=$with_pkg_config_prog;
4172fi
4173
4174if test "X${with_pkg_config_prog}" != X; then
4175 if test "${with_pkg_config_prog}" != yes; then
4176 PKG_CONFIG="${with_pkg_config_prog}"
4177 fi
4178fi
4179
4180CRT_DIR=
4181
4182# Check whether --with-crt-dir was given.
4183if test "${with_crt_dir+set}" = set; then :
4184 withval=$with_crt_dir;
4185fi
4186
4187CRT_DIR="${with_crt_dir}"
4188
4189
4fc5868a
UM
4190# Check whether --with-gameuser was given.
4191if test "${with_gameuser+set}" = set; then :
4192 withval=$with_gameuser;
4193fi
4194
4195test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4196 && gameuser="${with_gameuser}"
4197test "X$gameuser" = X && gameuser=games
4198
4199
067d23c9
KY
4200# Check whether --with-gnustep-conf was given.
4201if test "${with_gnustep_conf+set}" = set; then :
4202 withval=$with_gnustep_conf;
4203fi
4204
4205test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4206 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4207test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4208 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4209
4210# Check whether --enable-ns-self-contained was given.
4211if test "${enable_ns_self_contained+set}" = set; then :
4212 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4213else
4214 EN_NS_SELF_CONTAINED=yes
4215fi
4216
4217
067d23c9
KY
4218# Check whether --enable-locallisppath was given.
4219if test "${enable_locallisppath+set}" = set; then :
4220 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4221 locallisppath=
4222elif test "${enableval}" != "yes"; then
4223 locallisppath=${enableval}
4224fi
4225fi
4226
4227
4228# Check whether --enable-checking was given.
4229if test "${enable_checking+set}" = set; then :
4230 enableval=$enable_checking; ac_checking_flags="${enableval}"
4231fi
4232
4233IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4234for check in $ac_checking_flags
4235do
4236 case $check in
4237 # these set all the flags to specific states
4238 yes) ac_enable_checking=1 ;;
4239 no) ac_enable_checking= ;
4240 ac_gc_check_stringbytes= ;
4241 ac_gc_check_string_overrun= ;
4242 ac_gc_check_string_free_list= ;
4243 ac_xmalloc_overrun= ;
7ee3791f 4244 ac_gc_check_cons_list= ;
e4d35030 4245 ac_glyphs_debug= ;;
067d23c9
KY
4246 all) ac_enable_checking=1 ;
4247 ac_gc_check_stringbytes=1 ;
4248 ac_gc_check_string_overrun=1 ;
4249 ac_gc_check_string_free_list=1 ;
4250 ac_xmalloc_overrun=1 ;
7ee3791f 4251 ac_gc_check_cons_list=1 ;
e4d35030 4252 ac_glyphs_debug=1 ;;
067d23c9
KY
4253 # these enable particular checks
4254 stringbytes) ac_gc_check_stringbytes=1 ;;
4255 stringoverrun) ac_gc_check_string_overrun=1 ;;
4256 stringfreelist) ac_gc_check_string_free_list=1 ;;
4257 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4258 conslist) ac_gc_check_cons_list=1 ;;
e4d35030 4259 glyphs) ac_glyphs_debug=1 ;;
a9bec17c 4260 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4261 esac
4262done
4263IFS="$ac_save_IFS"
4264
4265if test x$ac_enable_checking != x ; then
4266
4267$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4268
4269fi
4270if test x$ac_gc_check_stringbytes != x ; then
4271
4272$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4273
4274fi
4fda9c95 4275if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4276
4277$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4278
4279fi
4280if test x$ac_gc_check_string_free_list != x ; then
4281
4282$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4283
4284fi
4285if test x$ac_xmalloc_overrun != x ; then
4286
4287$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4288
4289fi
4290if test x$ac_gc_check_cons_list != x ; then
4291
4292$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4293
7ee3791f 4294fi
e4d35030 4295if test x$ac_glyphs_debug != x ; then
7ee3791f
GM
4296
4297$as_echo "#define GLYPH_DEBUG 1" >>confdefs.h
4298
067d23c9
KY
4299fi
4300
afd07e01
GM
4301# Check whether --enable-check-lisp-object-type was given.
4302if test "${enable_check_lisp_object_type+set}" = set; then :
4303 enableval=$enable_check_lisp_object_type; if test "${enableval}" != "no"; then
067d23c9 4304
afd07e01 4305$as_echo "#define CHECK_LISP_OBJECT_TYPE 1" >>confdefs.h
067d23c9
KY
4306
4307fi
4308fi
4309
4310
4311
4312# Check whether --enable-profiling was given.
4313if test "${enable_profiling+set}" = set; then :
4314 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4315fi
4316
4317if test x$ac_enable_profiling != x ; then
4318 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4319else
4320 PROFILING_CFLAGS=
4321fi
4322
4323
4324# Check whether --enable-autodepend was given.
4325if test "${enable_autodepend+set}" = set; then :
4326 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4327else
4328 ac_enable_autodepend=yes
4329fi
4330
4331
4332#### Make srcdir absolute, if it isn't already. It's important to
4333#### avoid running the path through pwd unnecessarily, since pwd can
4334#### give you automounter prefixes, which can go away. We do all this
4335#### so Emacs can find its files when run uninstalled.
4336## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4337unset CDPATH
4338case "${srcdir}" in
4339 /* ) ;;
4340 . )
4341 ## We may be able to use the $PWD environment variable to make this
4342 ## absolute. But sometimes PWD is inaccurate.
4343 ## Note: we used to use ${PWD} at the end instead of `pwd`,
4344 ## but that tested only for a well-formed and valid PWD,
4345 ## it did not object when PWD was well-formed and valid but just wrong.
4346 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
4347 then
4348 srcdir="$PWD"
4349 else
4350 srcdir="`(cd ${srcdir}; pwd)`"
4351 fi
4352 ;;
4353 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
4354esac
4355
067d23c9
KY
4356### Canonicalize the configuration name.
4357
067d23c9
KY
4358# Make sure we can run config.sub.
4359$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
a9bec17c 4360 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4361
4362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4363$as_echo_n "checking build system type... " >&6; }
a9bec17c 4364if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4365 $as_echo_n "(cached) " >&6
4366else
4367 ac_build_alias=$build_alias
4368test "x$ac_build_alias" = x &&
4369 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4370test "x$ac_build_alias" = x &&
a9bec17c 4371 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4372ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
a9bec17c 4373 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4374
4375fi
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4377$as_echo "$ac_cv_build" >&6; }
4378case $ac_cv_build in
4379*-*-*) ;;
a9bec17c 4380*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4381esac
4382build=$ac_cv_build
4383ac_save_IFS=$IFS; IFS='-'
4384set x $ac_cv_build
4385shift
4386build_cpu=$1
4387build_vendor=$2
4388shift; shift
4389# Remember, the first character of IFS is used to create $*,
4390# except with old shells:
4391build_os=$*
4392IFS=$ac_save_IFS
4393case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4394
4395
4396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4397$as_echo_n "checking host system type... " >&6; }
a9bec17c 4398if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4399 $as_echo_n "(cached) " >&6
4400else
4401 if test "x$host_alias" = x; then
4402 ac_cv_host=$ac_cv_build
4403else
4404 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
a9bec17c 4405 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4406fi
4407
4408fi
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4410$as_echo "$ac_cv_host" >&6; }
4411case $ac_cv_host in
4412*-*-*) ;;
a9bec17c 4413*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4414esac
4415host=$ac_cv_host
4416ac_save_IFS=$IFS; IFS='-'
4417set x $ac_cv_host
4418shift
4419host_cpu=$1
4420host_vendor=$2
4421shift; shift
4422# Remember, the first character of IFS is used to create $*,
4423# except with old shells:
4424host_os=$*
4425IFS=$ac_save_IFS
4426case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4427
4428
4429canonical=$host
4430configuration=${host_alias-${build_alias-$host}}
4431
4432
4433
4434### If you add support for a new configuration, add code to this
4435### switch statement to recognize your configuration name and select
42bbbe8b 4436### the appropriate operating system file.
067d23c9 4437
42bbbe8b 4438### You would hope that you could choose an s/*.h
067d23c9 4439### file based on the operating system portion. However, it turns out
42bbbe8b 4440### that each s/*.h file is pretty manufacturer-specific.
067d23c9
KY
4441### So we basically have to have a special case for each
4442### configuration name.
4443###
4444### As far as handling version numbers on operating systems is
4445### concerned, make sure things will fail in a fixable way. If
4446### /etc/MACHINES doesn't say anything about version numbers, be
4447### prepared to handle anything reasonably. If version numbers
4448### matter, be sure /etc/MACHINES says something about it.
4449
42bbbe8b 4450opsys='' unported=no
067d23c9
KY
4451case "${canonical}" in
4452
9b6e5515
GM
4453 ## GNU/Linux and similar ports
4454 *-*-linux* )
d6a003a8 4455 opsys=gnu-linux
d6a003a8
AS
4456 ;;
4457
067d23c9
KY
4458 ## FreeBSD ports
4459 *-*-freebsd* )
4460 opsys=freebsd
067d23c9
KY
4461 ;;
4462
4463 ## FreeBSD kernel + glibc based userland
4464 *-*-kfreebsd*gnu* )
4465 opsys=gnu-kfreebsd
067d23c9
KY
4466 ;;
4467
4468 ## NetBSD ports
4469 *-*-netbsd* )
4470 opsys=netbsd
067d23c9
KY
4471 ;;
4472
4473 ## OpenBSD ports
4474 *-*-openbsd* )
4475 opsys=openbsd
067d23c9
KY
4476 ;;
4477
067d23c9
KY
4478 ## Apple Darwin / Mac OS X
4479 *-apple-darwin* )
4480 case "${canonical}" in
42bbbe8b
GM
4481 i[3456]86-* ) ;;
4482 powerpc-* ) ;;
4483 x86_64-* ) ;;
067d23c9
KY
4484 * ) unported=yes ;;
4485 esac
4486 opsys=darwin
adf4198e
GM
4487 ## Use fink packages if available.
4488 ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
4489## if test -d /sw/include && test -d /sw/lib; then
4490## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4491## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4492## fi
067d23c9
KY
4493 ;;
4494
4495 ## HP 9000 series 700 and 800, running HP/UX
4496 hppa*-hp-hpux10.2* )
d6a003a8 4497 opsys=hpux10-20
067d23c9
KY
4498 ;;
4499 hppa*-hp-hpux1[1-9]* )
d6a003a8 4500 opsys=hpux11
067d23c9
KY
4501 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4502 ;;
4503
067d23c9 4504 ## IBM machines
067d23c9 4505 rs6000-ibm-aix4.[23]* )
42bbbe8b 4506 opsys=aix4-2
067d23c9
KY
4507 ;;
4508 powerpc-ibm-aix4.[23]* )
42bbbe8b 4509 opsys=aix4-2
067d23c9
KY
4510 ;;
4511 rs6000-ibm-aix[56]* )
42bbbe8b 4512 opsys=aix4-2
067d23c9
KY
4513 ;;
4514 powerpc-ibm-aix[56]* )
42bbbe8b 4515 opsys=aix4-2
067d23c9
KY
4516 ;;
4517
067d23c9
KY
4518 ## Silicon Graphics machines
4519 ## Iris 4D
4520 mips-sgi-irix6.5 )
fd44db7f 4521 opsys=irix6-5
067d23c9
KY
4522 # Without defining _LANGUAGE_C, things get masked out in the headers
4523 # so that, for instance, grepping for `free' in stdlib.h fails and
4524 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
067d23c9
KY
4525 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4526 ;;
4527
4528 ## Suns
067d23c9
KY
4529 *-sun-solaris* \
4530 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4531 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4532 case "${canonical}" in
42bbbe8b
GM
4533 i[3456]86-*-* ) ;;
4534 amd64-*-*|x86_64-*-*) ;;
4535 sparc* ) ;;
067d23c9
KY
4536 * ) unported=yes ;;
4537 esac
4538 case "${canonical}" in
4539 *-sunos5.6* | *-solaris2.6* )
4540 opsys=sol2-6
067d23c9
KY
4541 RANLIB="ar -ts"
4542 ;;
4543 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4544 opsys=sol2-6
4545 emacs_check_sunpro_c=yes
067d23c9
KY
4546 ;;
4547 *-sunos5* | *-solaris* )
4548 opsys=sol2-10
4549 emacs_check_sunpro_c=yes
067d23c9
KY
4550 ;;
4551 esac
4552 ## Watch out for a compiler that we know will not work.
4553 case "${canonical}" in
4554 *-solaris* | *-sunos5* )
4555 if [ "x$CC" = x/usr/ucb/cc ]; then
4556 ## /usr/ucb/cc doesn't work;
4557 ## we should find some other compiler that does work.
4558 unset CC
4559 fi
4560 ;;
4561 *) ;;
4562 esac
4563 ;;
4564
067d23c9
KY
4565 ## Intel 386 machines where we don't care about the manufacturer.
4566 i[3456]86-*-* )
067d23c9
KY
4567 case "${canonical}" in
4568 *-cygwin ) opsys=cygwin ;;
5ec54608
GM
4569 *-darwin* ) opsys=darwin ;;
4570 *-sysv4.2uw* ) opsys=unixware ;;
4571 *-sysv5uw* ) opsys=unixware ;;
4572 *-sysv5OpenUNIX* ) opsys=unixware ;;
067d23c9
KY
4573 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4574 esac
4575 ;;
4576
067d23c9
KY
4577 * )
4578 unported=yes
4579 ;;
4580esac
4581
4582### If the code above didn't choose an operating system, just choose
4583### an operating system based on the configuration name. You really
4584### only want to use this when you have no idea what the right
4585### operating system is; if you know what operating systems a machine
4586### runs, it's cleaner to make it explicit in the case statement
4587### above.
4588if test x"${opsys}" = x; then
4589 case "${canonical}" in
4590 *-gnu* ) opsys=gnu ;;
4591 * )
4592 unported=yes
4593 ;;
4594 esac
4595fi
4596
4597
4598
4599if test $unported = yes; then
a9bec17c 4600 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4601Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4602fi
4603
067d23c9
KY
4604
4605#### Choose a compiler.
067d23c9
KY
4606
4607ac_ext=c
4608ac_cpp='$CPP $CPPFLAGS'
4609ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4610ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4611ac_compiler_gnu=$ac_cv_c_compiler_gnu
4612if test -n "$ac_tool_prefix"; then
4613 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4614set dummy ${ac_tool_prefix}gcc; ac_word=$2
4615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4617if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4618 $as_echo_n "(cached) " >&6
4619else
4620 if test -n "$CC"; then
4621 ac_cv_prog_CC="$CC" # Let the user override the test.
4622else
4623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624for as_dir in $PATH
4625do
4626 IFS=$as_save_IFS
4627 test -z "$as_dir" && as_dir=.
4628 for ac_exec_ext in '' $ac_executable_extensions; do
4629 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4630 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4632 break 2
4633 fi
4634done
4635 done
4636IFS=$as_save_IFS
4637
4638fi
4639fi
4640CC=$ac_cv_prog_CC
4641if test -n "$CC"; then
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4643$as_echo "$CC" >&6; }
4644else
4645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4646$as_echo "no" >&6; }
4647fi
4648
4649
4650fi
4651if test -z "$ac_cv_prog_CC"; then
4652 ac_ct_CC=$CC
4653 # Extract the first word of "gcc", so it can be a program name with args.
4654set dummy gcc; ac_word=$2
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4657if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4658 $as_echo_n "(cached) " >&6
4659else
4660 if test -n "$ac_ct_CC"; then
4661 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4662else
4663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in $PATH
4665do
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
4669 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4670 ac_cv_prog_ac_ct_CC="gcc"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672 break 2
4673 fi
4674done
4675 done
4676IFS=$as_save_IFS
4677
4678fi
4679fi
4680ac_ct_CC=$ac_cv_prog_ac_ct_CC
4681if test -n "$ac_ct_CC"; then
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4683$as_echo "$ac_ct_CC" >&6; }
4684else
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686$as_echo "no" >&6; }
4687fi
4688
4689 if test "x$ac_ct_CC" = x; then
4690 CC=""
4691 else
4692 case $cross_compiling:$ac_tool_warned in
4693yes:)
4694{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4695$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4696ac_tool_warned=yes ;;
4697esac
4698 CC=$ac_ct_CC
4699 fi
4700else
4701 CC="$ac_cv_prog_CC"
4702fi
4703
4704if test -z "$CC"; then
4705 if test -n "$ac_tool_prefix"; then
4706 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4707set dummy ${ac_tool_prefix}cc; ac_word=$2
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4709$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4710if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4711 $as_echo_n "(cached) " >&6
4712else
4713 if test -n "$CC"; then
4714 ac_cv_prog_CC="$CC" # Let the user override the test.
4715else
4716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4717for as_dir in $PATH
4718do
4719 IFS=$as_save_IFS
4720 test -z "$as_dir" && as_dir=.
4721 for ac_exec_ext in '' $ac_executable_extensions; do
4722 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4723 ac_cv_prog_CC="${ac_tool_prefix}cc"
4724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4725 break 2
4726 fi
4727done
4728 done
4729IFS=$as_save_IFS
4730
4731fi
4732fi
4733CC=$ac_cv_prog_CC
4734if test -n "$CC"; then
4735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4736$as_echo "$CC" >&6; }
4737else
4738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4739$as_echo "no" >&6; }
4740fi
4741
4742
4743 fi
4744fi
4745if test -z "$CC"; then
4746 # Extract the first word of "cc", so it can be a program name with args.
4747set dummy cc; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4750if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4751 $as_echo_n "(cached) " >&6
4752else
4753 if test -n "$CC"; then
4754 ac_cv_prog_CC="$CC" # Let the user override the test.
4755else
4756 ac_prog_rejected=no
4757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4758for as_dir in $PATH
4759do
4760 IFS=$as_save_IFS
4761 test -z "$as_dir" && as_dir=.
4762 for ac_exec_ext in '' $ac_executable_extensions; do
4763 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4764 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4765 ac_prog_rejected=yes
4766 continue
4767 fi
4768 ac_cv_prog_CC="cc"
4769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4770 break 2
4771 fi
4772done
4773 done
4774IFS=$as_save_IFS
4775
4776if test $ac_prog_rejected = yes; then
4777 # We found a bogon in the path, so make sure we never use it.
4778 set dummy $ac_cv_prog_CC
4779 shift
4780 if test $# != 0; then
4781 # We chose a different compiler from the bogus one.
4782 # However, it has the same basename, so the bogon will be chosen
4783 # first if we set CC to just the basename; use the full file name.
4784 shift
4785 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4786 fi
4787fi
4788fi
4789fi
4790CC=$ac_cv_prog_CC
4791if test -n "$CC"; then
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4793$as_echo "$CC" >&6; }
4794else
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4796$as_echo "no" >&6; }
4797fi
4798
4799
4800fi
4801if test -z "$CC"; then
4802 if test -n "$ac_tool_prefix"; then
4803 for ac_prog in cl.exe
4804 do
4805 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4806set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4808$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4809if test "${ac_cv_prog_CC+set}" = set; then :
067d23c9
KY
4810 $as_echo_n "(cached) " >&6
4811else
4812 if test -n "$CC"; then
4813 ac_cv_prog_CC="$CC" # Let the user override the test.
4814else
4815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4816for as_dir in $PATH
4817do
4818 IFS=$as_save_IFS
4819 test -z "$as_dir" && as_dir=.
4820 for ac_exec_ext in '' $ac_executable_extensions; do
4821 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4822 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4823 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4824 break 2
4825 fi
4826done
4827 done
4828IFS=$as_save_IFS
4829
4830fi
4831fi
4832CC=$ac_cv_prog_CC
4833if test -n "$CC"; then
4834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4835$as_echo "$CC" >&6; }
4836else
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4838$as_echo "no" >&6; }
4839fi
4840
4841
4842 test -n "$CC" && break
4843 done
4844fi
4845if test -z "$CC"; then
4846 ac_ct_CC=$CC
4847 for ac_prog in cl.exe
4848do
4849 # Extract the first word of "$ac_prog", so it can be a program name with args.
4850set dummy $ac_prog; ac_word=$2
4851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4852$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 4853if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
067d23c9
KY
4854 $as_echo_n "(cached) " >&6
4855else
4856 if test -n "$ac_ct_CC"; then
4857 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4858else
4859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4860for as_dir in $PATH
4861do
4862 IFS=$as_save_IFS
4863 test -z "$as_dir" && as_dir=.
4864 for ac_exec_ext in '' $ac_executable_extensions; do
4865 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4866 ac_cv_prog_ac_ct_CC="$ac_prog"
4867 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4868 break 2
4869 fi
4870done
4871 done
4872IFS=$as_save_IFS
4873
4874fi
4875fi
4876ac_ct_CC=$ac_cv_prog_ac_ct_CC
4877if test -n "$ac_ct_CC"; then
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4879$as_echo "$ac_ct_CC" >&6; }
4880else
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882$as_echo "no" >&6; }
4883fi
4884
4885
4886 test -n "$ac_ct_CC" && break
4887done
4888
4889 if test "x$ac_ct_CC" = x; then
4890 CC=""
4891 else
4892 case $cross_compiling:$ac_tool_warned in
4893yes:)
4894{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4895$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4896ac_tool_warned=yes ;;
4897esac
4898 CC=$ac_ct_CC
4899 fi
4900fi
4901
4902fi
4903
4904
4905test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
4907as_fn_error "no acceptable C compiler found in \$PATH
4908See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
4909
4910# Provide some information about the compiler.
4911$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4912set X $ac_compile
4913ac_compiler=$2
4914for ac_option in --version -v -V -qversion; do
4915 { { ac_try="$ac_compiler $ac_option >&5"
4916case "(($ac_try" in
4917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4918 *) ac_try_echo=$ac_try;;
4919esac
4920eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4921$as_echo "$ac_try_echo"; } >&5
4922 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4923 ac_status=$?
4924 if test -s conftest.err; then
4925 sed '10a\
4926... rest of stderr output deleted ...
4927 10q' conftest.err >conftest.er1
4928 cat conftest.er1 >&5
4929 fi
4930 rm -f conftest.er1 conftest.err
4931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4932 test $ac_status = 0; }
4933done
4934
4935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4936/* end confdefs.h. */
4937
4938int
4939main ()
4940{
4941
4942 ;
4943 return 0;
4944}
4945_ACEOF
4946ac_clean_files_save=$ac_clean_files
4947ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4948# Try to create an executable without -o first, disregard a.out.
4949# It will help us diagnose broken compilers, and finding out an intuition
4950# of exeext.
4951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4952$as_echo_n "checking whether the C compiler works... " >&6; }
4953ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4954
4955# The possible output files:
4956ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4957
4958ac_rmfiles=
4959for ac_file in $ac_files
4960do
4961 case $ac_file in
4962 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4963 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4964 esac
4965done
4966rm -f $ac_rmfiles
4967
4968if { { ac_try="$ac_link_default"
4969case "(($ac_try" in
4970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4971 *) ac_try_echo=$ac_try;;
4972esac
4973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4974$as_echo "$ac_try_echo"; } >&5
4975 (eval "$ac_link_default") 2>&5
4976 ac_status=$?
4977 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4978 test $ac_status = 0; }; then :
4979 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4980# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4981# in a Makefile. We should not override ac_cv_exeext if it was cached,
4982# so that the user can short-circuit this test for compilers unknown to
4983# Autoconf.
4984for ac_file in $ac_files ''
4985do
4986 test -f "$ac_file" || continue
4987 case $ac_file in
4988 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4989 ;;
4990 [ab].out )
4991 # We found the default executable, but exeext='' is most
4992 # certainly right.
4993 break;;
4994 *.* )
4995 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4996 then :; else
4997 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4998 fi
4999 # We set ac_cv_exeext here because the later test for it is not
5000 # safe: cross compilers may not add the suffix if given an `-o'
5001 # argument, so we may need to know it at that point already.
5002 # Even if this section looks crufty: it has the advantage of
5003 # actually working.
5004 break;;
5005 * )
5006 break;;
5007 esac
5008done
5009test "$ac_cv_exeext" = no && ac_cv_exeext=
5010
5011else
5012 ac_file=''
5013fi
5014if test -z "$ac_file"; then :
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5016$as_echo "no" >&6; }
5017$as_echo "$as_me: failed program was:" >&5
5018sed 's/^/| /' conftest.$ac_ext >&5
5019
5020{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5022{ as_fn_set_status 77
5023as_fn_error "C compiler cannot create executables
5024See \`config.log' for more details." "$LINENO" 5; }; }
067d23c9
KY
5025else
5026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5027$as_echo "yes" >&6; }
5028fi
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5030$as_echo_n "checking for C compiler default output file name... " >&6; }
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5032$as_echo "$ac_file" >&6; }
5033ac_exeext=$ac_cv_exeext
5034
5035rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5036ac_clean_files=$ac_clean_files_save
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5038$as_echo_n "checking for suffix of executables... " >&6; }
5039if { { ac_try="$ac_link"
5040case "(($ac_try" in
5041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5042 *) ac_try_echo=$ac_try;;
5043esac
5044eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5045$as_echo "$ac_try_echo"; } >&5
5046 (eval "$ac_link") 2>&5
5047 ac_status=$?
5048 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5049 test $ac_status = 0; }; then :
5050 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5051# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5052# work properly (i.e., refer to `conftest.exe'), while it won't with
5053# `rm'.
5054for ac_file in conftest.exe conftest conftest.*; do
5055 test -f "$ac_file" || continue
5056 case $ac_file in
5057 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5058 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5059 break;;
5060 * ) break;;
5061 esac
5062done
5063else
5064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5065$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5066as_fn_error "cannot compute suffix of executables: cannot compile and link
5067See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5068fi
5069rm -f conftest conftest$ac_cv_exeext
5070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5071$as_echo "$ac_cv_exeext" >&6; }
5072
5073rm -f conftest.$ac_ext
5074EXEEXT=$ac_cv_exeext
5075ac_exeext=$EXEEXT
5076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5077/* end confdefs.h. */
5078#include <stdio.h>
5079int
5080main ()
5081{
5082FILE *f = fopen ("conftest.out", "w");
5083 return ferror (f) || fclose (f) != 0;
5084
5085 ;
5086 return 0;
5087}
5088_ACEOF
5089ac_clean_files="$ac_clean_files conftest.out"
5090# Check that the compiler produces executables we can run. If not, either
5091# the compiler is broken, or we cross compile.
5092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5093$as_echo_n "checking whether we are cross compiling... " >&6; }
5094if test "$cross_compiling" != yes; then
5095 { { ac_try="$ac_link"
5096case "(($ac_try" in
5097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5098 *) ac_try_echo=$ac_try;;
5099esac
5100eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5101$as_echo "$ac_try_echo"; } >&5
5102 (eval "$ac_link") 2>&5
5103 ac_status=$?
5104 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5105 test $ac_status = 0; }
5106 if { ac_try='./conftest$ac_cv_exeext'
5107 { { case "(($ac_try" in
5108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5109 *) ac_try_echo=$ac_try;;
5110esac
5111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5112$as_echo "$ac_try_echo"; } >&5
5113 (eval "$ac_try") 2>&5
5114 ac_status=$?
5115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5116 test $ac_status = 0; }; }; then
5117 cross_compiling=no
5118 else
5119 if test "$cross_compiling" = maybe; then
5120 cross_compiling=yes
5121 else
5122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c 5124as_fn_error "cannot run C compiled programs.
067d23c9 5125If you meant to cross compile, use \`--host'.
a9bec17c 5126See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5127 fi
5128 fi
5129fi
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5131$as_echo "$cross_compiling" >&6; }
5132
5133rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5134ac_clean_files=$ac_clean_files_save
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5136$as_echo_n "checking for suffix of object files... " >&6; }
a9bec17c 5137if test "${ac_cv_objext+set}" = set; then :
067d23c9
KY
5138 $as_echo_n "(cached) " >&6
5139else
5140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5141/* end confdefs.h. */
5142
5143int
5144main ()
5145{
5146
5147 ;
5148 return 0;
5149}
5150_ACEOF
5151rm -f conftest.o conftest.obj
5152if { { ac_try="$ac_compile"
5153case "(($ac_try" in
5154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5155 *) ac_try_echo=$ac_try;;
5156esac
5157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5158$as_echo "$ac_try_echo"; } >&5
5159 (eval "$ac_compile") 2>&5
5160 ac_status=$?
5161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5162 test $ac_status = 0; }; then :
5163 for ac_file in conftest.o conftest.obj conftest.*; do
5164 test -f "$ac_file" || continue;
5165 case $ac_file in
5166 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5167 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5168 break;;
5169 esac
5170done
5171else
5172 $as_echo "$as_me: failed program was:" >&5
5173sed 's/^/| /' conftest.$ac_ext >&5
5174
5175{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5177as_fn_error "cannot compute suffix of object files: cannot compile
5178See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5179fi
5180rm -f conftest.$ac_cv_objext conftest.$ac_ext
5181fi
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5183$as_echo "$ac_cv_objext" >&6; }
5184OBJEXT=$ac_cv_objext
5185ac_objext=$OBJEXT
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5187$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
a9bec17c 5188if test "${ac_cv_c_compiler_gnu+set}" = set; then :
067d23c9
KY
5189 $as_echo_n "(cached) " >&6
5190else
5191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5192/* end confdefs.h. */
5193
5194int
5195main ()
5196{
5197#ifndef __GNUC__
5198 choke me
5199#endif
5200
5201 ;
5202 return 0;
5203}
5204_ACEOF
5205if ac_fn_c_try_compile "$LINENO"; then :
5206 ac_compiler_gnu=yes
5207else
5208 ac_compiler_gnu=no
5209fi
5210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5211ac_cv_c_compiler_gnu=$ac_compiler_gnu
5212
5213fi
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5215$as_echo "$ac_cv_c_compiler_gnu" >&6; }
5216if test $ac_compiler_gnu = yes; then
5217 GCC=yes
5218else
5219 GCC=
5220fi
5221ac_test_CFLAGS=${CFLAGS+set}
5222ac_save_CFLAGS=$CFLAGS
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5224$as_echo_n "checking whether $CC accepts -g... " >&6; }
a9bec17c 5225if test "${ac_cv_prog_cc_g+set}" = set; then :
067d23c9
KY
5226 $as_echo_n "(cached) " >&6
5227else
5228 ac_save_c_werror_flag=$ac_c_werror_flag
5229 ac_c_werror_flag=yes
5230 ac_cv_prog_cc_g=no
5231 CFLAGS="-g"
5232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5233/* end confdefs.h. */
5234
5235int
5236main ()
5237{
5238
5239 ;
5240 return 0;
5241}
5242_ACEOF
5243if ac_fn_c_try_compile "$LINENO"; then :
5244 ac_cv_prog_cc_g=yes
5245else
5246 CFLAGS=""
5247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5248/* end confdefs.h. */
5249
5250int
5251main ()
5252{
5253
5254 ;
5255 return 0;
5256}
5257_ACEOF
5258if ac_fn_c_try_compile "$LINENO"; then :
5259
5260else
5261 ac_c_werror_flag=$ac_save_c_werror_flag
5262 CFLAGS="-g"
5263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5264/* end confdefs.h. */
5265
5266int
5267main ()
5268{
5269
5270 ;
5271 return 0;
5272}
5273_ACEOF
5274if ac_fn_c_try_compile "$LINENO"; then :
5275 ac_cv_prog_cc_g=yes
5276fi
5277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5278fi
5279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5280fi
5281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5282 ac_c_werror_flag=$ac_save_c_werror_flag
5283fi
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5285$as_echo "$ac_cv_prog_cc_g" >&6; }
5286if test "$ac_test_CFLAGS" = set; then
5287 CFLAGS=$ac_save_CFLAGS
5288elif test $ac_cv_prog_cc_g = yes; then
5289 if test "$GCC" = yes; then
5290 CFLAGS="-g -O2"
5291 else
5292 CFLAGS="-g"
5293 fi
5294else
5295 if test "$GCC" = yes; then
5296 CFLAGS="-O2"
5297 else
5298 CFLAGS=
5299 fi
5300fi
5301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5302$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 5303if test "${ac_cv_prog_cc_c89+set}" = set; then :
067d23c9
KY
5304 $as_echo_n "(cached) " >&6
5305else
5306 ac_cv_prog_cc_c89=no
5307ac_save_CC=$CC
5308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5309/* end confdefs.h. */
5310#include <stdarg.h>
5311#include <stdio.h>
5312#include <sys/types.h>
5313#include <sys/stat.h>
5314/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5315struct buf { int x; };
5316FILE * (*rcsopen) (struct buf *, struct stat *, int);
5317static char *e (p, i)
5318 char **p;
5319 int i;
5320{
5321 return p[i];
5322}
5323static char *f (char * (*g) (char **, int), char **p, ...)
5324{
5325 char *s;
5326 va_list v;
5327 va_start (v,p);
5328 s = g (p, va_arg (v,int));
5329 va_end (v);
5330 return s;
5331}
5332
5333/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5334 function prototypes and stuff, but not '\xHH' hex character constants.
5335 These don't provoke an error unfortunately, instead are silently treated
5336 as 'x'. The following induces an error, until -std is added to get
5337 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5338 array size at least. It's necessary to write '\x00'==0 to get something
5339 that's true only with -std. */
5340int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5341
5342/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5343 inside strings and character constants. */
5344#define FOO(x) 'x'
5345int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5346
5347int test (int i, double x);
5348struct s1 {int (*f) (int a);};
5349struct s2 {int (*f) (double a);};
5350int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5351int argc;
5352char **argv;
5353int
5354main ()
5355{
5356return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5357 ;
5358 return 0;
5359}
5360_ACEOF
5361for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5362 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5363do
5364 CC="$ac_save_CC $ac_arg"
5365 if ac_fn_c_try_compile "$LINENO"; then :
5366 ac_cv_prog_cc_c89=$ac_arg
5367fi
5368rm -f core conftest.err conftest.$ac_objext
5369 test "x$ac_cv_prog_cc_c89" != "xno" && break
5370done
743c80a7
PE
5371rm -f conftest.$ac_ext
5372CC=$ac_save_CC
5373
5374fi
5375# AC_CACHE_VAL
5376case "x$ac_cv_prog_cc_c89" in
5377 x)
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5379$as_echo "none needed" >&6; } ;;
5380 xno)
5381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5382$as_echo "unsupported" >&6; } ;;
5383 *)
5384 CC="$CC $ac_cv_prog_cc_c89"
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5386$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5387esac
5388if test "x$ac_cv_prog_cc_c89" != xno; then :
5389
5390fi
5391
5392ac_ext=c
5393ac_cpp='$CPP $CPPFLAGS'
5394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5396ac_compiler_gnu=$ac_cv_c_compiler_gnu
5397DEPDIR="${am__leading_dot}deps"
5398
5399ac_config_commands="$ac_config_commands depfiles"
5400
5401
5402am_make=${MAKE-make}
5403cat > confinc << 'END'
5404am__doit:
5405 @echo this is the am__doit target
5406.PHONY: am__doit
5407END
5408# If we don't find an include directive, just comment out the code.
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5410$as_echo_n "checking for style of include used by $am_make... " >&6; }
5411am__include="#"
5412am__quote=
5413_am_result=none
5414# First try GNU make style include.
5415echo "include confinc" > confmf
5416# Ignore all kinds of additional output from `make'.
5417case `$am_make -s -f confmf 2> /dev/null` in #(
5418*the\ am__doit\ target*)
5419 am__include=include
5420 am__quote=
5421 _am_result=GNU
5422 ;;
5423esac
5424# Now try BSD make style include.
5425if test "$am__include" = "#"; then
5426 echo '.include "confinc"' > confmf
5427 case `$am_make -s -f confmf 2> /dev/null` in #(
5428 *the\ am__doit\ target*)
5429 am__include=.include
5430 am__quote="\""
5431 _am_result=BSD
5432 ;;
5433 esac
5434fi
5435
5436
5437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5438$as_echo "$_am_result" >&6; }
5439rm -f confinc confmf
5440
5441# Check whether --enable-dependency-tracking was given.
5442if test "${enable_dependency_tracking+set}" = set; then :
5443 enableval=$enable_dependency_tracking;
5444fi
5445
5446if test "x$enable_dependency_tracking" != xno; then
5447 am_depcomp="$ac_aux_dir/depcomp"
5448 AMDEPBACKSLASH='\'
5449fi
5450 if test "x$enable_dependency_tracking" != xno; then
5451 AMDEP_TRUE=
5452 AMDEP_FALSE='#'
5453else
5454 AMDEP_TRUE='#'
5455 AMDEP_FALSE=
5456fi
5457
5458
5459
5460depcc="$CC" am_compiler_list=
5461
5462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5463$as_echo_n "checking dependency style of $depcc... " >&6; }
a9bec17c 5464if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
743c80a7
PE
5465 $as_echo_n "(cached) " >&6
5466else
5467 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5468 # We make a subdir and do the tests there. Otherwise we can end up
5469 # making bogus files that we don't know about and never remove. For
5470 # instance it was reported that on HP-UX the gcc test will end up
5471 # making a dummy file named `D' -- because `-MD' means `put the output
5472 # in D'.
5473 mkdir conftest.dir
5474 # Copy depcomp to subdir because otherwise we won't find it if we're
5475 # using a relative directory.
5476 cp "$am_depcomp" conftest.dir
5477 cd conftest.dir
5478 # We will build objects and dependencies in a subdirectory because
5479 # it helps to detect inapplicable dependency modes. For instance
5480 # both Tru64's cc and ICC support -MD to output dependencies as a
5481 # side effect of compilation, but ICC will put the dependencies in
5482 # the current directory while Tru64 will put them in the object
5483 # directory.
5484 mkdir sub
5485
5486 am_cv_CC_dependencies_compiler_type=none
5487 if test "$am_compiler_list" = ""; then
5488 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5489 fi
5490 am__universal=false
5491 case " $depcc " in #(
5492 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5493 esac
5494
5495 for depmode in $am_compiler_list; do
5496 # Setup a source with many dependencies, because some compilers
5497 # like to wrap large dependency lists on column 80 (with \), and
5498 # we should not choose a depcomp mode which is confused by this.
5499 #
5500 # We need to recreate these files for each test, as the compiler may
5501 # overwrite some of them when testing with obscure command lines.
5502 # This happens at least with the AIX C compiler.
5503 : > sub/conftest.c
5504 for i in 1 2 3 4 5 6; do
5505 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5506 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5507 # Solaris 8's {/usr,}/bin/sh.
5508 touch sub/conftst$i.h
5509 done
5510 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5511
5512 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5513 # mode. It turns out that the SunPro C++ compiler does not properly
5514 # handle `-M -o', and we need to detect this. Also, some Intel
5515 # versions had trouble with output in subdirs
5516 am__obj=sub/conftest.${OBJEXT-o}
5517 am__minus_obj="-o $am__obj"
5518 case $depmode in
5519 gcc)
5520 # This depmode causes a compiler race in universal mode.
5521 test "$am__universal" = false || continue
5522 ;;
5523 nosideeffect)
5524 # after this tag, mechanisms are not by side-effect, so they'll
5525 # only be used when explicitly requested
5526 if test "x$enable_dependency_tracking" = xyes; then
5527 continue
5528 else
5529 break
5530 fi
5531 ;;
5532 msvisualcpp | msvcmsys)
5533 # This compiler won't grok `-c -o', but also, the minuso test has
5534 # not run yet. These depmodes are late enough in the game, and
5535 # so weak that their functioning should not be impacted.
5536 am__obj=conftest.${OBJEXT-o}
5537 am__minus_obj=
5538 ;;
5539 none) break ;;
5540 esac
5541 if depmode=$depmode \
5542 source=sub/conftest.c object=$am__obj \
5543 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5544 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5545 >/dev/null 2>conftest.err &&
5546 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5547 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5548 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5549 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5550 # icc doesn't choke on unknown options, it will just issue warnings
5551 # or remarks (even with -Werror). So we grep stderr for any message
5552 # that says an option was ignored or not supported.
5553 # When given -MP, icc 7.0 and 7.1 complain thusly:
5554 # icc: Command line warning: ignoring option '-M'; no argument required
5555 # The diagnosis changed in icc 8.0:
5556 # icc: Command line remark: option '-MP' not supported
5557 if (grep 'ignoring option' conftest.err ||
5558 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5559 am_cv_CC_dependencies_compiler_type=$depmode
5560 break
5561 fi
5562 fi
5563 done
5564
5565 cd ..
5566 rm -rf conftest.dir
5567else
5568 am_cv_CC_dependencies_compiler_type=none
5569fi
5570
5571fi
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5573$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5574CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5575
5576 if
5577 test "x$enable_dependency_tracking" != xno \
5578 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5579 am__fastdepCC_TRUE=
5580 am__fastdepCC_FALSE='#'
5581else
5582 am__fastdepCC_TRUE='#'
5583 am__fastdepCC_FALSE=
5584fi
5585
5586
5587if test "x$CC" != xcc; then
5588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5589$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5590else
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5592$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5593fi
5594set dummy $CC; ac_cc=`$as_echo "$2" |
5595 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
a9bec17c 5596if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
5597 $as_echo_n "(cached) " >&6
5598else
5599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5600/* end confdefs.h. */
5601
5602int
5603main ()
5604{
5605
5606 ;
5607 return 0;
5608}
5609_ACEOF
5610# Make sure it works both with $CC and with simple cc.
5611# We do the test twice because some compilers refuse to overwrite an
5612# existing .o file with -o, though they will create one.
5613ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5614rm -f conftest2.*
5615if { { case "(($ac_try" in
5616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5617 *) ac_try_echo=$ac_try;;
5618esac
5619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5620$as_echo "$ac_try_echo"; } >&5
5621 (eval "$ac_try") 2>&5
5622 ac_status=$?
5623 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5624 test $ac_status = 0; } &&
5625 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5627 *) ac_try_echo=$ac_try;;
5628esac
5629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5630$as_echo "$ac_try_echo"; } >&5
5631 (eval "$ac_try") 2>&5
5632 ac_status=$?
5633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5634 test $ac_status = 0; };
5635then
5636 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5637 if test "x$CC" != xcc; then
5638 # Test first that cc exists at all.
5639 if { ac_try='cc -c conftest.$ac_ext >&5'
5640 { { case "(($ac_try" in
5641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5642 *) ac_try_echo=$ac_try;;
5643esac
5644eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5645$as_echo "$ac_try_echo"; } >&5
5646 (eval "$ac_try") 2>&5
5647 ac_status=$?
5648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5649 test $ac_status = 0; }; }; then
5650 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5651 rm -f conftest2.*
5652 if { { case "(($ac_try" in
5653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5654 *) ac_try_echo=$ac_try;;
5655esac
5656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5657$as_echo "$ac_try_echo"; } >&5
5658 (eval "$ac_try") 2>&5
5659 ac_status=$?
5660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5661 test $ac_status = 0; } &&
5662 test -f conftest2.$ac_objext && { { 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; };
5672 then
5673 # cc works too.
5674 :
5675 else
5676 # cc exists but doesn't like -o.
5677 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5678 fi
5679 fi
5680 fi
5681else
5682 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5683fi
5684rm -f core conftest*
5685
5686fi
5687if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5689$as_echo "yes" >&6; }
5690else
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693
5694$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5695
5696fi
5697
5698# FIXME: we rely on the cache variable name because
5699# there is no other way.
5700set dummy $CC
5701am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5702eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5703if test "$am_t" != yes; then
5704 # Losing compiler, so override with the script.
5705 # FIXME: It is wrong to rewrite CC.
5706 # But if we don't then we get into trouble of one sort or another.
5707 # A longer-term fix would be to have automake use am__CC in this case,
5708 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5709 CC="$am_aux_dir/compile $CC"
5710fi
5711
5712
5713
5ec54608
GM
5714if test x$GCC = xyes; then
5715 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
5716else
5717 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5718fi
5719
5720# Initialize gnulib right after choosing the compiler.
743c80a7 5721
067d23c9
KY
5722ac_ext=c
5723ac_cpp='$CPP $CPPFLAGS'
5724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5726ac_compiler_gnu=$ac_cv_c_compiler_gnu
5727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5728$as_echo_n "checking how to run the C preprocessor... " >&6; }
5729# On Suns, sometimes $CPP names a directory.
5730if test -n "$CPP" && test -d "$CPP"; then
5731 CPP=
5732fi
5733if test -z "$CPP"; then
a9bec17c 5734 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5735 $as_echo_n "(cached) " >&6
5736else
5737 # Double quotes because CPP needs to be expanded
5738 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5739 do
5740 ac_preproc_ok=false
5741for ac_c_preproc_warn_flag in '' yes
5742do
5743 # Use a header file that comes with gcc, so configuring glibc
5744 # with a fresh cross-compiler works.
5745 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5746 # <limits.h> exists even on freestanding compilers.
5747 # On the NeXT, cc -E runs the code through the compiler's parser,
5748 # not just through cpp. "Syntax error" is here to catch this case.
5749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5750/* end confdefs.h. */
5751#ifdef __STDC__
5752# include <limits.h>
5753#else
5754# include <assert.h>
5755#endif
5756 Syntax error
5757_ACEOF
5758if ac_fn_c_try_cpp "$LINENO"; then :
5759
5760else
5761 # Broken: fails on valid input.
5762continue
5763fi
a9bec17c 5764rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5765
5766 # OK, works on sane cases. Now check whether nonexistent headers
5767 # can be detected and how.
5768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5769/* end confdefs.h. */
5770#include <ac_nonexistent.h>
5771_ACEOF
5772if ac_fn_c_try_cpp "$LINENO"; then :
5773 # Broken: success on invalid input.
5774continue
5775else
5776 # Passes both tests.
5777ac_preproc_ok=:
5778break
5779fi
a9bec17c 5780rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5781
5782done
5783# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5784rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5785if $ac_preproc_ok; then :
5786 break
5787fi
5788
5789 done
5790 ac_cv_prog_CPP=$CPP
5791
5792fi
5793 CPP=$ac_cv_prog_CPP
5794else
5795 ac_cv_prog_CPP=$CPP
5796fi
5797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5798$as_echo "$CPP" >&6; }
5799ac_preproc_ok=false
5800for ac_c_preproc_warn_flag in '' yes
5801do
5802 # Use a header file that comes with gcc, so configuring glibc
5803 # with a fresh cross-compiler works.
5804 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5805 # <limits.h> exists even on freestanding compilers.
5806 # On the NeXT, cc -E runs the code through the compiler's parser,
5807 # not just through cpp. "Syntax error" is here to catch this case.
5808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5809/* end confdefs.h. */
5810#ifdef __STDC__
5811# include <limits.h>
5812#else
5813# include <assert.h>
5814#endif
5815 Syntax error
5816_ACEOF
5817if ac_fn_c_try_cpp "$LINENO"; then :
5818
5819else
5820 # Broken: fails on valid input.
5821continue
5822fi
a9bec17c 5823rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5824
5825 # OK, works on sane cases. Now check whether nonexistent headers
5826 # can be detected and how.
5827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5828/* end confdefs.h. */
5829#include <ac_nonexistent.h>
5830_ACEOF
5831if ac_fn_c_try_cpp "$LINENO"; then :
5832 # Broken: success on invalid input.
5833continue
5834else
5835 # Passes both tests.
5836ac_preproc_ok=:
5837break
5838fi
a9bec17c 5839rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5840
5841done
5842# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a9bec17c 5843rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5844if $ac_preproc_ok; then :
5845
5846else
5847 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
a9bec17c
GM
5849as_fn_error "C preprocessor \"$CPP\" fails sanity check
5850See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5851fi
5852
5853ac_ext=c
5854ac_cpp='$CPP $CPPFLAGS'
5855ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5856ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5857ac_compiler_gnu=$ac_cv_c_compiler_gnu
5858
5859
5860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5861$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
a9bec17c 5862if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
5863 $as_echo_n "(cached) " >&6
5864else
5865 if test -z "$GREP"; then
5866 ac_path_GREP_found=false
5867 # Loop through the user's path and test for each of PROGNAME-LIST
5868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5869for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5870do
5871 IFS=$as_save_IFS
5872 test -z "$as_dir" && as_dir=.
5873 for ac_prog in grep ggrep; do
5874 for ac_exec_ext in '' $ac_executable_extensions; do
5875 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5876 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5877# Check for GNU ac_path_GREP and select it if it is found.
5878 # Check for GNU $ac_path_GREP
5879case `"$ac_path_GREP" --version 2>&1` in
5880*GNU*)
5881 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5882*)
5883 ac_count=0
5884 $as_echo_n 0123456789 >"conftest.in"
5885 while :
5886 do
5887 cat "conftest.in" "conftest.in" >"conftest.tmp"
5888 mv "conftest.tmp" "conftest.in"
5889 cp "conftest.in" "conftest.nl"
5890 $as_echo 'GREP' >> "conftest.nl"
5891 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5892 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5893 as_fn_arith $ac_count + 1 && ac_count=$as_val
5894 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5895 # Best one so far, save it but keep looking for a better one
5896 ac_cv_path_GREP="$ac_path_GREP"
5897 ac_path_GREP_max=$ac_count
5898 fi
5899 # 10*(2^10) chars as input seems more than enough
5900 test $ac_count -gt 10 && break
5901 done
5902 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5903esac
5904
5905 $ac_path_GREP_found && break 3
5906 done
5907 done
5908 done
5909IFS=$as_save_IFS
5910 if test -z "$ac_cv_path_GREP"; then
a9bec17c 5911 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
5912 fi
5913else
5914 ac_cv_path_GREP=$GREP
5915fi
5916
5917fi
5918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5919$as_echo "$ac_cv_path_GREP" >&6; }
5920 GREP="$ac_cv_path_GREP"
5921
5922
5923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5924$as_echo_n "checking for egrep... " >&6; }
a9bec17c 5925if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
5926 $as_echo_n "(cached) " >&6
5927else
5928 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5929 then ac_cv_path_EGREP="$GREP -E"
5930 else
5931 if test -z "$EGREP"; then
5932 ac_path_EGREP_found=false
5933 # Loop through the user's path and test for each of PROGNAME-LIST
5934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5935for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5936do
5937 IFS=$as_save_IFS
5938 test -z "$as_dir" && as_dir=.
5939 for ac_prog in egrep; do
5940 for ac_exec_ext in '' $ac_executable_extensions; do
5941 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5942 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5943# Check for GNU ac_path_EGREP and select it if it is found.
5944 # Check for GNU $ac_path_EGREP
5945case `"$ac_path_EGREP" --version 2>&1` in
5946*GNU*)
5947 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5948*)
5949 ac_count=0
5950 $as_echo_n 0123456789 >"conftest.in"
5951 while :
5952 do
5953 cat "conftest.in" "conftest.in" >"conftest.tmp"
5954 mv "conftest.tmp" "conftest.in"
5955 cp "conftest.in" "conftest.nl"
5956 $as_echo 'EGREP' >> "conftest.nl"
5957 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5958 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5959 as_fn_arith $ac_count + 1 && ac_count=$as_val
5960 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5961 # Best one so far, save it but keep looking for a better one
5962 ac_cv_path_EGREP="$ac_path_EGREP"
5963 ac_path_EGREP_max=$ac_count
5964 fi
5965 # 10*(2^10) chars as input seems more than enough
5966 test $ac_count -gt 10 && break
5967 done
5968 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5969esac
5970
5971 $ac_path_EGREP_found && break 3
5972 done
5973 done
5974 done
5975IFS=$as_save_IFS
5976 if test -z "$ac_cv_path_EGREP"; then
a9bec17c 5977 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
5978 fi
5979else
5980 ac_cv_path_EGREP=$EGREP
5981fi
5982
5983 fi
5984fi
5985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5986$as_echo "$ac_cv_path_EGREP" >&6; }
5987 EGREP="$ac_cv_path_EGREP"
5988
5989
369e19fc
PE
5990
5991
5992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5993$as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
a9bec17c 5994if test "${gl_cv_c_amsterdam_compiler+set}" = set; then :
369e19fc
PE
5995 $as_echo_n "(cached) " >&6
5996else
5997
5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999/* end confdefs.h. */
6000
6001#ifdef __ACK__
6002Amsterdam
6003#endif
6004
6005_ACEOF
6006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6007 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6008 gl_cv_c_amsterdam_compiler=yes
6009else
6010 gl_cv_c_amsterdam_compiler=no
6011fi
6012rm -f conftest*
6013
6014
6015fi
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6017$as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6018 if test -z "$AR"; then
6019 if test $gl_cv_c_amsterdam_compiler = yes; then
6020 AR='cc -c.a'
6021 if test -z "$ARFLAGS"; then
6022 ARFLAGS='-o'
6023 fi
6024 else
6025 if test -n "$ac_tool_prefix"; then
6026 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6027set dummy ${ac_tool_prefix}ar; ac_word=$2
6028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6029$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6030if test "${ac_cv_prog_AR+set}" = set; then :
369e19fc
PE
6031 $as_echo_n "(cached) " >&6
6032else
6033 if test -n "$AR"; then
6034 ac_cv_prog_AR="$AR" # Let the user override the test.
6035else
6036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6037for as_dir in $PATH
6038do
6039 IFS=$as_save_IFS
6040 test -z "$as_dir" && as_dir=.
6041 for ac_exec_ext in '' $ac_executable_extensions; do
6042 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6043 ac_cv_prog_AR="${ac_tool_prefix}ar"
6044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6045 break 2
6046 fi
6047done
6048 done
6049IFS=$as_save_IFS
6050
6051fi
6052fi
6053AR=$ac_cv_prog_AR
6054if test -n "$AR"; then
6055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6056$as_echo "$AR" >&6; }
6057else
6058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059$as_echo "no" >&6; }
6060fi
6061
6062
6063fi
6064if test -z "$ac_cv_prog_AR"; then
6065 ac_ct_AR=$AR
6066 # Extract the first word of "ar", so it can be a program name with args.
6067set dummy ar; ac_word=$2
6068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6069$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6070if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
369e19fc
PE
6071 $as_echo_n "(cached) " >&6
6072else
6073 if test -n "$ac_ct_AR"; then
6074 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6075else
6076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6077for as_dir in $PATH
6078do
6079 IFS=$as_save_IFS
6080 test -z "$as_dir" && as_dir=.
6081 for ac_exec_ext in '' $ac_executable_extensions; do
6082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6083 ac_cv_prog_ac_ct_AR="ar"
6084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6085 break 2
6086 fi
6087done
6088 done
6089IFS=$as_save_IFS
6090
6091fi
6092fi
6093ac_ct_AR=$ac_cv_prog_ac_ct_AR
6094if test -n "$ac_ct_AR"; then
6095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6096$as_echo "$ac_ct_AR" >&6; }
6097else
6098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099$as_echo "no" >&6; }
6100fi
6101
6102 if test "x$ac_ct_AR" = x; then
6103 AR="ar"
6104 else
6105 case $cross_compiling:$ac_tool_warned in
6106yes:)
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6109ac_tool_warned=yes ;;
6110esac
6111 AR=$ac_ct_AR
6112 fi
6113else
6114 AR="$ac_cv_prog_AR"
6115fi
6116
6117 if test -z "$ARFLAGS"; then
6118 ARFLAGS='cru'
6119 fi
6120 fi
6121 else
6122 if test -z "$ARFLAGS"; then
6123 ARFLAGS='cru'
6124 fi
6125 fi
6126
6127
6128 if test -z "$RANLIB"; then
6129 if test $gl_cv_c_amsterdam_compiler = yes; then
6130 RANLIB=':'
6131 else
6132 if test -n "$ac_tool_prefix"; then
6133 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6134set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6136$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6137if test "${ac_cv_prog_RANLIB+set}" = set; then :
369e19fc
PE
6138 $as_echo_n "(cached) " >&6
6139else
6140 if test -n "$RANLIB"; then
6141 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6142else
6143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144for as_dir in $PATH
6145do
6146 IFS=$as_save_IFS
6147 test -z "$as_dir" && as_dir=.
6148 for ac_exec_ext in '' $ac_executable_extensions; do
6149 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6150 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6152 break 2
6153 fi
6154done
6155 done
6156IFS=$as_save_IFS
6157
6158fi
6159fi
6160RANLIB=$ac_cv_prog_RANLIB
6161if test -n "$RANLIB"; then
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6163$as_echo "$RANLIB" >&6; }
6164else
6165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6166$as_echo "no" >&6; }
6167fi
6168
6169
6170fi
6171if test -z "$ac_cv_prog_RANLIB"; then
6172 ac_ct_RANLIB=$RANLIB
6173 # Extract the first word of "ranlib", so it can be a program name with args.
6174set dummy ranlib; ac_word=$2
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6176$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 6177if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
369e19fc
PE
6178 $as_echo_n "(cached) " >&6
6179else
6180 if test -n "$ac_ct_RANLIB"; then
6181 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6182else
6183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6184for as_dir in $PATH
6185do
6186 IFS=$as_save_IFS
6187 test -z "$as_dir" && as_dir=.
6188 for ac_exec_ext in '' $ac_executable_extensions; do
6189 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6190 ac_cv_prog_ac_ct_RANLIB="ranlib"
6191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6192 break 2
6193 fi
6194done
6195 done
6196IFS=$as_save_IFS
6197
6198fi
6199fi
6200ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6201if test -n "$ac_ct_RANLIB"; then
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6203$as_echo "$ac_ct_RANLIB" >&6; }
6204else
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206$as_echo "no" >&6; }
6207fi
6208
6209 if test "x$ac_ct_RANLIB" = x; then
6210 RANLIB=":"
6211 else
6212 case $cross_compiling:$ac_tool_warned in
6213yes:)
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6215$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6216ac_tool_warned=yes ;;
6217esac
6218 RANLIB=$ac_ct_RANLIB
6219 fi
6220else
6221 RANLIB="$ac_cv_prog_RANLIB"
6222fi
6223
6224 fi
6225 fi
6226
6227
067d23c9
KY
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6229$as_echo_n "checking for ANSI C header files... " >&6; }
a9bec17c 6230if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6231 $as_echo_n "(cached) " >&6
6232else
6233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6234/* end confdefs.h. */
6235#include <stdlib.h>
6236#include <stdarg.h>
6237#include <string.h>
6238#include <float.h>
6239
6240int
6241main ()
6242{
6243
6244 ;
6245 return 0;
6246}
6247_ACEOF
6248if ac_fn_c_try_compile "$LINENO"; then :
6249 ac_cv_header_stdc=yes
6250else
6251 ac_cv_header_stdc=no
6252fi
6253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6254
6255if test $ac_cv_header_stdc = yes; then
6256 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6258/* end confdefs.h. */
6259#include <string.h>
6260
6261_ACEOF
6262if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6263 $EGREP "memchr" >/dev/null 2>&1; then :
6264
6265else
6266 ac_cv_header_stdc=no
6267fi
6268rm -f conftest*
6269
6270fi
6271
6272if test $ac_cv_header_stdc = yes; then
6273 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6275/* end confdefs.h. */
6276#include <stdlib.h>
6277
6278_ACEOF
6279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6280 $EGREP "free" >/dev/null 2>&1; then :
6281
6282else
6283 ac_cv_header_stdc=no
6284fi
6285rm -f conftest*
6286
6287fi
6288
6289if test $ac_cv_header_stdc = yes; then
6290 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6291 if test "$cross_compiling" = yes; then :
6292 :
6293else
6294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6295/* end confdefs.h. */
6296#include <ctype.h>
6297#include <stdlib.h>
6298#if ((' ' & 0x0FF) == 0x020)
6299# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6300# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6301#else
6302# define ISLOWER(c) \
6303 (('a' <= (c) && (c) <= 'i') \
6304 || ('j' <= (c) && (c) <= 'r') \
6305 || ('s' <= (c) && (c) <= 'z'))
6306# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6307#endif
6308
6309#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6310int
6311main ()
6312{
6313 int i;
6314 for (i = 0; i < 256; i++)
6315 if (XOR (islower (i), ISLOWER (i))
6316 || toupper (i) != TOUPPER (i))
6317 return 2;
6318 return 0;
6319}
6320_ACEOF
6321if ac_fn_c_try_run "$LINENO"; then :
6322
6323else
6324 ac_cv_header_stdc=no
6325fi
6326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6327 conftest.$ac_objext conftest.beam conftest.$ac_ext
6328fi
6329
6330fi
6331fi
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6333$as_echo "$ac_cv_header_stdc" >&6; }
6334if test $ac_cv_header_stdc = yes; then
6335
6336$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6337
6338fi
6339
6340# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6341for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6342 inttypes.h stdint.h unistd.h
6343do :
6344 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6345ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6346"
a9bec17c
GM
6347eval as_val=\$$as_ac_Header
6348 if test "x$as_val" = x""yes; then :
067d23c9
KY
6349 cat >>confdefs.h <<_ACEOF
6350#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6351_ACEOF
6352
6353fi
6354
6355done
6356
6357
6358
1fd182f0
PE
6359
6360
067d23c9 6361 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
a9bec17c 6362if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6363 MINIX=yes
6364else
6365 MINIX=
6366fi
6367
6368
6369 if test "$MINIX" = yes; then
6370
6371$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6372
6373
6374$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6375
6376
6377$as_echo "#define _MINIX 1" >>confdefs.h
6378
6379 fi
6380
1fd182f0
PE
6381 case "$host_os" in
6382 hpux*)
6383
6384$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6385
6386 ;;
6387 esac
6388
067d23c9
KY
6389
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6391$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
a9bec17c 6392if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6393 $as_echo_n "(cached) " >&6
6394else
6395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6396/* end confdefs.h. */
369e19fc
PE
6397
6398# define __EXTENSIONS__ 1
6399 $ac_includes_default
6400int
6401main ()
6402{
6403
6404 ;
6405 return 0;
6406}
6407_ACEOF
6408if ac_fn_c_try_compile "$LINENO"; then :
6409 ac_cv_safe_to_define___extensions__=yes
6410else
6411 ac_cv_safe_to_define___extensions__=no
6412fi
6413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6414fi
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6416$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6417 test $ac_cv_safe_to_define___extensions__ = yes &&
6418 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6419
6420 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6421
6422 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6423
6424 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6425
6426 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6427
6428 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6429
6430
6431
6432
6433
6434
6435
6436
6437# Check whether --enable-largefile was given.
6438if test "${enable_largefile+set}" = set; then :
6439 enableval=$enable_largefile;
6440fi
6441
6442if test "$enable_largefile" != no; then
6443
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6445$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
a9bec17c 6446if test "${ac_cv_sys_largefile_CC+set}" = set; then :
369e19fc
PE
6447 $as_echo_n "(cached) " >&6
6448else
6449 ac_cv_sys_largefile_CC=no
6450 if test "$GCC" != yes; then
6451 ac_save_CC=$CC
6452 while :; do
6453 # IRIX 6.2 and later do not support large files by default,
6454 # so use the C compiler's -n32 option if that helps.
6455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6456/* end confdefs.h. */
6457#include <sys/types.h>
6458 /* Check that off_t can represent 2**63 - 1 correctly.
6459 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6460 since some C++ compilers masquerading as C compilers
6461 incorrectly reject 9223372036854775807. */
6462#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6463 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6464 && LARGE_OFF_T % 2147483647 == 1)
6465 ? 1 : -1];
6466int
6467main ()
6468{
6469
6470 ;
6471 return 0;
6472}
6473_ACEOF
6474 if ac_fn_c_try_compile "$LINENO"; then :
6475 break
6476fi
6477rm -f core conftest.err conftest.$ac_objext
6478 CC="$CC -n32"
6479 if ac_fn_c_try_compile "$LINENO"; then :
6480 ac_cv_sys_largefile_CC=' -n32'; break
6481fi
6482rm -f core conftest.err conftest.$ac_objext
6483 break
6484 done
6485 CC=$ac_save_CC
6486 rm -f conftest.$ac_ext
6487 fi
6488fi
6489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6490$as_echo "$ac_cv_sys_largefile_CC" >&6; }
6491 if test "$ac_cv_sys_largefile_CC" != no; then
6492 CC=$CC$ac_cv_sys_largefile_CC
6493 fi
6494
6495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6496$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
a9bec17c 6497if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
369e19fc
PE
6498 $as_echo_n "(cached) " >&6
6499else
6500 while :; do
6501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6502/* end confdefs.h. */
6503#include <sys/types.h>
6504 /* Check that off_t can represent 2**63 - 1 correctly.
6505 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6506 since some C++ compilers masquerading as C compilers
6507 incorrectly reject 9223372036854775807. */
6508#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6509 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6510 && LARGE_OFF_T % 2147483647 == 1)
6511 ? 1 : -1];
6512int
6513main ()
6514{
6515
6516 ;
6517 return 0;
6518}
6519_ACEOF
6520if ac_fn_c_try_compile "$LINENO"; then :
6521 ac_cv_sys_file_offset_bits=no; break
6522fi
6523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6525/* end confdefs.h. */
6526#define _FILE_OFFSET_BITS 64
6527#include <sys/types.h>
6528 /* Check that off_t can represent 2**63 - 1 correctly.
6529 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6530 since some C++ compilers masquerading as C compilers
6531 incorrectly reject 9223372036854775807. */
6532#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6533 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6534 && LARGE_OFF_T % 2147483647 == 1)
6535 ? 1 : -1];
6536int
6537main ()
6538{
6539
6540 ;
6541 return 0;
6542}
6543_ACEOF
6544if ac_fn_c_try_compile "$LINENO"; then :
6545 ac_cv_sys_file_offset_bits=64; break
6546fi
6547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6548 ac_cv_sys_file_offset_bits=unknown
6549 break
6550done
6551fi
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6553$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6554case $ac_cv_sys_file_offset_bits in #(
6555 no | unknown) ;;
6556 *)
6557cat >>confdefs.h <<_ACEOF
6558#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6559_ACEOF
6560;;
6561esac
6562rm -rf conftest*
6563 if test $ac_cv_sys_file_offset_bits = unknown; then
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6565$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
a9bec17c 6566if test "${ac_cv_sys_large_files+set}" = set; then :
369e19fc
PE
6567 $as_echo_n "(cached) " >&6
6568else
6569 while :; do
6570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6571/* end confdefs.h. */
6572#include <sys/types.h>
6573 /* Check that off_t can represent 2**63 - 1 correctly.
6574 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6575 since some C++ compilers masquerading as C compilers
6576 incorrectly reject 9223372036854775807. */
6577#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6578 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6579 && LARGE_OFF_T % 2147483647 == 1)
6580 ? 1 : -1];
6581int
6582main ()
6583{
6584
6585 ;
6586 return 0;
6587}
6588_ACEOF
6589if ac_fn_c_try_compile "$LINENO"; then :
6590 ac_cv_sys_large_files=no; break
6591fi
6592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6594/* end confdefs.h. */
6595#define _LARGE_FILES 1
6596#include <sys/types.h>
6597 /* Check that off_t can represent 2**63 - 1 correctly.
6598 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6599 since some C++ compilers masquerading as C compilers
6600 incorrectly reject 9223372036854775807. */
6601#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6602 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6603 && LARGE_OFF_T % 2147483647 == 1)
6604 ? 1 : -1];
067d23c9
KY
6605int
6606main ()
6607{
6608
6609 ;
6610 return 0;
6611}
6612_ACEOF
6613if ac_fn_c_try_compile "$LINENO"; then :
369e19fc 6614 ac_cv_sys_large_files=1; break
067d23c9
KY
6615fi
6616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
369e19fc
PE
6617 ac_cv_sys_large_files=unknown
6618 break
6619done
067d23c9 6620fi
369e19fc
PE
6621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6622$as_echo "$ac_cv_sys_large_files" >&6; }
6623case $ac_cv_sys_large_files in #(
6624 no | unknown) ;;
6625 *)
6626cat >>confdefs.h <<_ACEOF
6627#define _LARGE_FILES $ac_cv_sys_large_files
6628_ACEOF
6629;;
6630esac
6631rm -rf conftest*
6632 fi
1fd182f0
PE
6633
6634
369e19fc 6635fi
1fd182f0 6636
6d153f56
GM
6637 case $ac_cv_prog_cc_stdc in #(
6638 no) :
6639 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6640 *) :
6641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6642$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
a9bec17c 6643if test "${ac_cv_prog_cc_c99+set}" = set; then :
6d153f56
GM
6644 $as_echo_n "(cached) " >&6
6645else
6646 ac_cv_prog_cc_c99=no
6647ac_save_CC=$CC
6648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6649/* end confdefs.h. */
6650#include <stdarg.h>
6651#include <stdbool.h>
6652#include <stdlib.h>
6653#include <wchar.h>
6654#include <stdio.h>
6655
6656// Check varargs macros. These examples are taken from C99 6.10.3.5.
6657#define debug(...) fprintf (stderr, __VA_ARGS__)
6658#define showlist(...) puts (#__VA_ARGS__)
6659#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6660static void
6661test_varargs_macros (void)
6662{
6663 int x = 1234;
6664 int y = 5678;
6665 debug ("Flag");
6666 debug ("X = %d\n", x);
6667 showlist (The first, second, and third items.);
6668 report (x>y, "x is %d but y is %d", x, y);
6669}
6670
6671// Check long long types.
6672#define BIG64 18446744073709551615ull
6673#define BIG32 4294967295ul
6674#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6675#if !BIG_OK
6676 your preprocessor is broken;
6677#endif
6678#if BIG_OK
6679#else
6680 your preprocessor is broken;
6681#endif
6682static long long int bignum = -9223372036854775807LL;
6683static unsigned long long int ubignum = BIG64;
6684
6685struct incomplete_array
6686{
6687 int datasize;
6688 double data[];
6689};
6690
6691struct named_init {
6692 int number;
6693 const wchar_t *name;
6694 double average;
6695};
6696
6697typedef const char *ccp;
6698
6699static inline int
6700test_restrict (ccp restrict text)
6701{
6702 // See if C++-style comments work.
6703 // Iterate through items via the restricted pointer.
6704 // Also check for declarations in for loops.
6705 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6706 continue;
6707 return 0;
6708}
6709
6710// Check varargs and va_copy.
6711static void
6712test_varargs (const char *format, ...)
6713{
6714 va_list args;
6715 va_start (args, format);
6716 va_list args_copy;
6717 va_copy (args_copy, args);
6718
6719 const char *str;
6720 int number;
6721 float fnumber;
6722
6723 while (*format)
6724 {
6725 switch (*format++)
6726 {
6727 case 's': // string
6728 str = va_arg (args_copy, const char *);
6729 break;
6730 case 'd': // int
6731 number = va_arg (args_copy, int);
6732 break;
6733 case 'f': // float
6734 fnumber = va_arg (args_copy, double);
6735 break;
6736 default:
6737 break;
6738 }
6739 }
6740 va_end (args_copy);
6741 va_end (args);
6742}
6743
6744int
6745main ()
6746{
6747
6748 // Check bool.
6749 _Bool success = false;
6750
6751 // Check restrict.
6752 if (test_restrict ("String literal") == 0)
6753 success = true;
6754 char *restrict newvar = "Another string";
6755
6756 // Check varargs.
6757 test_varargs ("s, d' f .", "string", 65, 34.234);
6758 test_varargs_macros ();
6759
6760 // Check flexible array members.
6761 struct incomplete_array *ia =
6762 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6763 ia->datasize = 10;
6764 for (int i = 0; i < ia->datasize; ++i)
6765 ia->data[i] = i * 1.234;
6766
6767 // Check named initializers.
6768 struct named_init ni = {
6769 .number = 34,
6770 .name = L"Test wide string",
6771 .average = 543.34343,
6772 };
6773
6774 ni.number = 58;
6775
6776 int dynamic_array[ni.number];
6777 dynamic_array[ni.number - 1] = 543;
6778
6779 // work around unused variable warnings
6780 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6781 || dynamic_array[ni.number - 1] != 543);
6782
6783 ;
6784 return 0;
6785}
6786_ACEOF
6787for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
6788do
6789 CC="$ac_save_CC $ac_arg"
6790 if ac_fn_c_try_compile "$LINENO"; then :
6791 ac_cv_prog_cc_c99=$ac_arg
6792fi
6793rm -f core conftest.err conftest.$ac_objext
6794 test "x$ac_cv_prog_cc_c99" != "xno" && break
6795done
6796rm -f conftest.$ac_ext
6797CC=$ac_save_CC
6798
6799fi
6800# AC_CACHE_VAL
6801case "x$ac_cv_prog_cc_c99" in
6802 x)
6803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6804$as_echo "none needed" >&6; } ;;
6805 xno)
6806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6807$as_echo "unsupported" >&6; } ;;
6808 *)
6809 CC="$CC $ac_cv_prog_cc_c99"
6810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6811$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6812esac
6813if test "x$ac_cv_prog_cc_c99" != xno; then :
6814 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6815else
6816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6817$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
a9bec17c 6818if test "${ac_cv_prog_cc_c89+set}" = set; then :
6d153f56
GM
6819 $as_echo_n "(cached) " >&6
6820else
6821 ac_cv_prog_cc_c89=no
6822ac_save_CC=$CC
6823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6824/* end confdefs.h. */
6825#include <stdarg.h>
6826#include <stdio.h>
6827#include <sys/types.h>
6828#include <sys/stat.h>
6829/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6830struct buf { int x; };
6831FILE * (*rcsopen) (struct buf *, struct stat *, int);
6832static char *e (p, i)
6833 char **p;
6834 int i;
6835{
6836 return p[i];
6837}
6838static char *f (char * (*g) (char **, int), char **p, ...)
6839{
6840 char *s;
6841 va_list v;
6842 va_start (v,p);
6843 s = g (p, va_arg (v,int));
6844 va_end (v);
6845 return s;
6846}
6847
6848/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6849 function prototypes and stuff, but not '\xHH' hex character constants.
6850 These don't provoke an error unfortunately, instead are silently treated
6851 as 'x'. The following induces an error, until -std is added to get
6852 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6853 array size at least. It's necessary to write '\x00'==0 to get something
6854 that's true only with -std. */
6855int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6856
6857/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6858 inside strings and character constants. */
6859#define FOO(x) 'x'
6860int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6861
6862int test (int i, double x);
6863struct s1 {int (*f) (int a);};
6864struct s2 {int (*f) (double a);};
6865int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6866int argc;
6867char **argv;
6868int
6869main ()
6870{
6871return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6872 ;
6873 return 0;
6874}
6875_ACEOF
6876for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6877 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6878do
6879 CC="$ac_save_CC $ac_arg"
6880 if ac_fn_c_try_compile "$LINENO"; then :
6881 ac_cv_prog_cc_c89=$ac_arg
6882fi
6883rm -f core conftest.err conftest.$ac_objext
6884 test "x$ac_cv_prog_cc_c89" != "xno" && break
6885done
6886rm -f conftest.$ac_ext
6887CC=$ac_save_CC
6888
6889fi
6890# AC_CACHE_VAL
6891case "x$ac_cv_prog_cc_c89" in
6892 x)
6893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6894$as_echo "none needed" >&6; } ;;
6895 xno)
6896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6897$as_echo "unsupported" >&6; } ;;
6898 *)
6899 CC="$CC $ac_cv_prog_cc_c89"
6900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6901$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6902esac
6903if test "x$ac_cv_prog_cc_c89" != xno; then :
6904 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6905else
6906 ac_cv_prog_cc_stdc=no
6907fi
6908
6909fi
6910 ;;
6911esac
6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6913$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
a9bec17c 6914 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6d153f56
GM
6915 $as_echo_n "(cached) " >&6
6916fi
6917
6918 case $ac_cv_prog_cc_stdc in #(
6919 no) :
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6921$as_echo "unsupported" >&6; } ;; #(
6922 '') :
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6924$as_echo "none needed" >&6; } ;; #(
6925 *) :
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6927$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6928esac
6929
1fd182f0
PE
6930
6931
4fc2b746 6932 # Code from module alloca-opt:
8d8af66d 6933 # Code from module allocator:
938a4ef9
GM
6934 # Code from module c-ctype:
6935 # Code from module c-strcase:
6c051bab 6936 # Code from module careadlinkat:
f199cab1 6937 # Code from module clock-time:
942f733f 6938 # Code from module crypto/md5:
40e27e7f 6939 # Code from module crypto/sha1:
d87ffdb7
GM
6940 # Code from module crypto/sha256:
6941 # Code from module crypto/sha512:
36f13e16 6942 # Code from module dosname:
f737437b 6943 # Code from module dtoastr:
f199cab1 6944 # Code from module dtotimespec:
7d2a1c5e 6945 # Code from module dup2:
93131e11 6946 # Code from module environ:
1fd182f0
PE
6947 # Code from module extensions:
6948
5fa4ac76 6949 # Code from module filemode:
1f5d53eb 6950 # Code from module getloadavg:
e275c824
PE
6951 # Code from module getopt-gnu:
6952 # Code from module getopt-posix:
6953 # Code from module gettext-h:
f199cab1
GM
6954 # Code from module gettime:
6955 # Code from module gettimeofday:
67342916 6956 # Code from module ignore-value:
1fd182f0
PE
6957 # Code from module include_next:
6958 # Code from module intprops:
4fda9c95 6959 # Code from module inttypes-incomplete:
369e19fc
PE
6960 # Code from module largefile:
6961
ae0d7250 6962 # Code from module lstat:
ac1ca7e9 6963 # Code from module manywarnings:
1fd182f0
PE
6964 # Code from module mktime:
6965 # Code from module multiarch:
369e19fc 6966 # Code from module nocrash:
a0a61e58 6967 # Code from module pathmax:
f199cab1 6968 # Code from module pselect:
3e0be4ab 6969 # Code from module pthread_sigmask:
ae0d7250 6970 # Code from module readlink:
2b1928b8 6971 # Code from module signal-h:
369e19fc
PE
6972 # Code from module snippet/_Noreturn:
6973 # Code from module snippet/arg-nonnull:
6974 # Code from module snippet/c++defs:
6975 # Code from module snippet/warn-on-use:
6ad6792b 6976 # Code from module socklen:
6c051bab 6977 # Code from module ssize_t:
ae0d7250 6978 # Code from module stat:
f199cab1 6979 # Code from module stat-time:
0eb775a3 6980 # Code from module stdalign:
6d153f56
GM
6981 # Code from module stdarg:
6982
8c069cc7
GM
6983
6984
16c3e636 6985 # Code from module stdbool:
1fd182f0 6986 # Code from module stddef:
5f90be1b 6987 # Code from module stdint:
6ad6792b 6988 # Code from module stdio:
1f5d53eb 6989 # Code from module stdlib:
16c3e636 6990 # Code from module strftime:
3e0be4ab
GM
6991 # Code from module strtoimax:
6992 # Code from module strtoll:
4fda9c95
GM
6993 # Code from module strtoull:
6994 # Code from module strtoumax:
ae0d7250 6995 # Code from module symlink:
f199cab1 6996 # Code from module sys_select:
5fa4ac76 6997 # Code from module sys_stat:
f199cab1 6998 # Code from module sys_time:
1fd182f0
PE
6999 # Code from module time:
7000 # Code from module time_r:
f199cab1
GM
7001 # Code from module timespec:
7002 # Code from module timespec-add:
7003 # Code from module timespec-sub:
d87ffdb7 7004 # Code from module u64:
e275c824 7005 # Code from module unistd:
f199cab1 7006 # Code from module utimens:
4fda9c95 7007 # Code from module verify:
ac1ca7e9 7008 # Code from module warnings:
1fd182f0
PE
7009
7010
a6b92a4a
GM
7011# Check whether --enable-gcc-warnings was given.
7012if test "${enable_gcc_warnings+set}" = set; then :
7013 enableval=$enable_gcc_warnings; case $enableval in
7014 yes|no) ;;
7015 *) as_fn_error "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
7016 esac
7017 gl_gcc_warnings=$enableval
7018else
7019 gl_gcc_warnings=no
7020
7021fi
7022
7023
e4d35030
GM
7024# Check whether --enable-link-time-optimization was given.
7025if test "${enable_link_time_optimization+set}" = set; then :
7026 enableval=$enable_link_time_optimization; if test "${enableval}" != "no"; then
7027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link-time optimization is supported" >&5
7028$as_echo_n "checking whether link-time optimization is supported... " >&6; }
7029 ac_lto_supported=no
7030 if test x$GCC = xyes; then
7031 CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
7032 if test x$CPUS != x; then
7033 LTO="-flto=$CPUS"
7034 else
7035 LTO="-flto"
7036 fi
7037 old_CFLAGS=$CFLAGS
7038 CFLAGS="$CFLAGS $LTO"
7039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7040/* end confdefs.h. */
7041
7042int
7043main ()
7044{
7045
7046 ;
7047 return 0;
7048}
7049_ACEOF
7050if ac_fn_c_try_compile "$LINENO"; then :
7051 ac_lto_supported=yes
7052else
7053 ac_lto_supported=no
7054fi
7055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7056 CFLAGS="$old_CFLAGS"
7057 fi
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_lto_supported" >&5
7059$as_echo "$ac_lto_supported" >&6; }
7060 if test "$ac_lto_supported" = "yes"; then
7061 CFLAGS="$CFLAGS $LTO"
7062 fi
7063fi
7064fi
7065
7066
a6b92a4a
GM
7067# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
7068# ------------------------------------------------
7069# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
7070# Otherwise, run RUN-IF-NOT-FOUND.
7071
7072
7073# When compiling with GCC, prefer -isystem to -I when including system
7074# include files, to avoid generating useless diagnostics for the files.
7075if test "$gl_gcc_warnings" != yes; then
7076 isystem='-I'
7077else
7078 isystem='-isystem '
7079
7080 # This, $nw, is the list of warnings we disable.
7081 nw=
7082
7083 case $with_x_toolkit in
7084 lucid | athena | motif)
7085 # Old toolkits mishandle 'const'.
7086 nw="$nw -Wwrite-strings"
7087 ;;
7088 *)
7089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
7090$as_echo_n "checking whether C compiler handles -Werror... " >&6; }
7091if test "${gl_cv_warn_c__Werror+set}" = set; then :
7092 $as_echo_n "(cached) " >&6
7093else
7094
7095 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7096 as_fn_append CFLAGS " -Werror"
a6b92a4a 7097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7098/* end confdefs.h. */
7099
7100int
7101main ()
7102{
7103
7104 ;
7105 return 0;
7106}
7107_ACEOF
7108if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7109 gl_cv_warn_c__Werror=yes
067d23c9 7110else
a6b92a4a 7111 gl_cv_warn_c__Werror=no
067d23c9
KY
7112fi
7113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7114 CFLAGS="$gl_save_compiler_FLAGS"
7115
7116fi
7117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
7118$as_echo "$gl_cv_warn_c__Werror" >&6; }
7119if test "x$gl_cv_warn_c__Werror" = x""yes; then :
7120 as_fn_append WERROR_CFLAGS " -Werror"
7121fi
7122
0eb775a3 7123
a6b92a4a
GM
7124 ;;
7125 esac
7126
7127
7128 nw="$nw -Waggregate-return" # anachronistic
ca0294bb 7129 nw="$nw -Wlong-long" # C90 is anachronistic
a6b92a4a
GM
7130 nw="$nw -Wc++-compat" # We don't care about C++ compilers
7131 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
7132 nw="$nw -Wtraditional" # Warns on #elif which we use often
7133 nw="$nw -Wcast-qual" # Too many warnings for now
7134 nw="$nw -Wconversion" # Too many warnings for now
7135 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
7136 nw="$nw -Wsign-conversion" # Too many warnings for now
7137 nw="$nw -Woverlength-strings" # Not a problem these days
7138 nw="$nw -Wtraditional-conversion" # Too many warnings for now
fd9d2a9d 7139 nw="$nw -Wunreachable-code" # so buggy that it's now silently ignored
a6b92a4a 7140 nw="$nw -Wpadded" # Our structs are not padded
fd9d2a9d 7141 nw="$nw -Wredundant-decls" # we regularly (re)declare functions
a6b92a4a 7142 nw="$nw -Wlogical-op" # any use of fwrite provokes this
fd9d2a9d 7143 nw="$nw -Wformat-nonliteral" # we do this a lot
a6b92a4a
GM
7144 nw="$nw -Wvla" # warnings in gettext.h
7145 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
7146 nw="$nw -Wswitch-enum" # Too many warnings for now
7147 nw="$nw -Wswitch-default" # Too many warnings for now
fd9d2a9d
GM
7148 nw="$nw -Wfloat-equal" # warns about high-quality code
7149 nw="$nw -Winline" # OK to ignore 'inline'
7150 nw="$nw -Wsync-nand" # irrelevant here, and provokes ObjC warning
7151 nw="$nw -Wunsafe-loop-optimizations" # OK to suppress unsafe optimizations
a6b92a4a
GM
7152
7153 # Emacs doesn't care about shadowing; see
7154 # <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7155 nw="$nw -Wshadow"
7156
7157 # The following lines should be removable at some point.
7158 nw="$nw -Wstack-protector"
7159 nw="$nw -Wstrict-overflow"
a6b92a4a
GM
7160 nw="$nw -Wsuggest-attribute=pure"
7161
7162
7163
7164 if test -n "$GCC"; then
7165
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
7167$as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
7168 if test "${gl_cv_cc_nomfi_supported+set}" = set; then :
7169 $as_echo_n "(cached) " >&6
7170else
7171
7172 gl_save_CFLAGS="$CFLAGS"
7173 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
7174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7175/* end confdefs.h. */
7176
7177int
7178main ()
7179{
7180
7181 ;
7182 return 0;
7183}
7184_ACEOF
7185if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7186 gl_cv_cc_nomfi_supported=yes
067d23c9 7187else
a6b92a4a 7188 gl_cv_cc_nomfi_supported=no
067d23c9
KY
7189fi
7190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7191 CFLAGS="$gl_save_CFLAGS"
7192fi
7193
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
7195$as_echo "$gl_cv_cc_nomfi_supported" >&6; }
7196
7197 if test "$gl_cv_cc_nomfi_supported" = yes; then
7198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
7199$as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
7200 if test "${gl_cv_cc_nomfi_needed+set}" = set; then :
7201 $as_echo_n "(cached) " >&6
7202else
7203
7204 gl_save_CFLAGS="$CFLAGS"
7205 CFLAGS="$CFLAGS -W -Werror"
7206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7207/* end confdefs.h. */
7208void f (void)
7209 {
7210 typedef struct { int a; int b; } s_t;
7211 s_t s1 = { 0, };
7212 }
7213
7214int
7215main ()
7216{
7217
7218 ;
7219 return 0;
7220}
7221_ACEOF
7222if ac_fn_c_try_compile "$LINENO"; then :
7223 gl_cv_cc_nomfi_needed=no
7224else
7225 gl_cv_cc_nomfi_needed=yes
7226fi
7227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7228 CFLAGS="$gl_save_CFLAGS"
7229
7230fi
7231
7232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
7233$as_echo "$gl_cv_cc_nomfi_needed" >&6; }
7234 fi
7235 fi
7236
7237 gl_manywarn_set=
7238 for gl_manywarn_item in \
7239 -Wall \
7240 -W \
7241 -Wformat-y2k \
7242 -Wformat-nonliteral \
7243 -Wformat-security \
7244 -Winit-self \
7245 -Wmissing-include-dirs \
7246 -Wswitch-default \
7247 -Wswitch-enum \
7248 -Wunused \
7249 -Wunknown-pragmas \
7250 -Wstrict-aliasing \
7251 -Wstrict-overflow \
7252 -Wsystem-headers \
7253 -Wfloat-equal \
7254 -Wtraditional \
7255 -Wtraditional-conversion \
7256 -Wdeclaration-after-statement \
7257 -Wundef \
7258 -Wshadow \
7259 -Wunsafe-loop-optimizations \
7260 -Wpointer-arith \
7261 -Wbad-function-cast \
7262 -Wc++-compat \
7263 -Wcast-qual \
7264 -Wcast-align \
7265 -Wwrite-strings \
7266 -Wconversion \
7267 -Wsign-conversion \
7268 -Wlogical-op \
7269 -Waggregate-return \
7270 -Wstrict-prototypes \
7271 -Wold-style-definition \
7272 -Wmissing-prototypes \
7273 -Wmissing-declarations \
7274 -Wmissing-noreturn \
7275 -Wmissing-format-attribute \
7276 -Wpacked \
7277 -Wpadded \
7278 -Wredundant-decls \
7279 -Wnested-externs \
7280 -Wunreachable-code \
7281 -Winline \
7282 -Winvalid-pch \
7283 -Wlong-long \
7284 -Wvla \
7285 -Wvolatile-register-var \
7286 -Wdisabled-optimization \
7287 -Wstack-protector \
7288 -Woverlength-strings \
7289 -Wbuiltin-macro-redefined \
7290 -Wmudflap \
7291 -Wpacked-bitfield-compat \
7292 -Wsync-nand \
7293 ; do
7294 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7295 done
7296 # The following are not documented in the manual but are included in
7297 # output from gcc --help=warnings.
7298 for gl_manywarn_item in \
7299 -Wattributes \
7300 -Wcoverage-mismatch \
a6b92a4a
GM
7301 -Wunused-macros \
7302 ; do
7303 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7304 done
7305 # More warnings from gcc 4.6.2 --help=warnings.
7306 for gl_manywarn_item in \
7307 -Wabi \
7308 -Wcpp \
7309 -Wdeprecated \
7310 -Wdeprecated-declarations \
7311 -Wdiv-by-zero \
7312 -Wdouble-promotion \
7313 -Wendif-labels \
7314 -Wextra \
7315 -Wformat-contains-nul \
7316 -Wformat-extra-args \
7317 -Wformat-zero-length \
7318 -Wformat=2 \
7319 -Wmultichar \
7320 -Wnormalized=nfc \
7321 -Woverflow \
7322 -Wpointer-to-int-cast \
7323 -Wpragmas \
7324 -Wsuggest-attribute=const \
7325 -Wsuggest-attribute=noreturn \
7326 -Wsuggest-attribute=pure \
7327 -Wtrampolines \
7328 ; do
7329 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
7330 done
7331
7332 # Disable the missing-field-initializers warning if needed
7333 if test "$gl_cv_cc_nomfi_needed" = yes; then
7334 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
7335 fi
7336
7337 ws=$gl_manywarn_set
7338
7339
7340 gl_warn_set=
7341 set x $ws; shift
7342 for gl_warn_item
7343 do
7344 case " $nw " in
7345 *" $gl_warn_item "*)
7346 ;;
7347 *)
7348 gl_warn_set="$gl_warn_set $gl_warn_item"
7349 ;;
7350 esac
7351 done
7352 ws=$gl_warn_set
7353
7354 for w in $ws; do
7355 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
7356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
7357$as_echo_n "checking whether C compiler handles $w... " >&6; }
7358if { as_var=$as_gl_Warn; eval "test \"\${$as_var+set}\" = set"; }; then :
7359 $as_echo_n "(cached) " >&6
7360else
7361
7362 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7363 as_fn_append CFLAGS " $w"
a6b92a4a
GM
7364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7365/* end confdefs.h. */
7366
7367int
7368main ()
7369{
7370
7371 ;
7372 return 0;
7373}
7374_ACEOF
7375if ac_fn_c_try_compile "$LINENO"; then :
7376 eval "$as_gl_Warn=yes"
7377else
7378 eval "$as_gl_Warn=no"
7379fi
7380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7381 CFLAGS="$gl_save_compiler_FLAGS"
7382
7383fi
7384eval ac_res=\$$as_gl_Warn
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7386$as_echo "$ac_res" >&6; }
7387eval as_val=\$$as_gl_Warn
7388 if test "x$as_val" = x""yes; then :
7389 as_fn_append WARN_CFLAGS " $w"
7390fi
7391
0eb775a3 7392
a6b92a4a
GM
7393 done
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
7395$as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
7396if test "${gl_cv_warn_c__Wno_missing_field_initializers+set}" = set; then :
7397 $as_echo_n "(cached) " >&6
7398else
7399
7400 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7401 as_fn_append CFLAGS " -Wno-missing-field-initializers"
a6b92a4a
GM
7402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7403/* end confdefs.h. */
7404
7405int
7406main ()
7407{
7408
7409 ;
7410 return 0;
7411}
7412_ACEOF
7413if ac_fn_c_try_compile "$LINENO"; then :
7414 gl_cv_warn_c__Wno_missing_field_initializers=yes
7415else
7416 gl_cv_warn_c__Wno_missing_field_initializers=no
7417fi
7418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7419 CFLAGS="$gl_save_compiler_FLAGS"
7420
7421fi
7422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
7423$as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
7424if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = x""yes; then :
7425 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
7426fi
0eb775a3 7427
a6b92a4a
GM
7428 # We need this one
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
7430$as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
7431if test "${gl_cv_warn_c__Wno_sign_compare+set}" = set; then :
7432 $as_echo_n "(cached) " >&6
7433else
7434
7435 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7436 as_fn_append CFLAGS " -Wno-sign-compare"
a6b92a4a
GM
7437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7438/* end confdefs.h. */
7439
7440int
7441main ()
7442{
7443
7444 ;
7445 return 0;
7446}
7447_ACEOF
7448if ac_fn_c_try_compile "$LINENO"; then :
7449 gl_cv_warn_c__Wno_sign_compare=yes
7450else
7451 gl_cv_warn_c__Wno_sign_compare=no
7452fi
7453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7454 CFLAGS="$gl_save_compiler_FLAGS"
7455
7456fi
7457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
7458$as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
7459if test "x$gl_cv_warn_c__Wno_sign_compare" = x""yes; then :
7460 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
7461fi
0eb775a3 7462
a6b92a4a
GM
7463 # Too many warnings for now
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
7465$as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
7466if test "${gl_cv_warn_c__Wno_type_limits+set}" = set; then :
7467 $as_echo_n "(cached) " >&6
7468else
7469
7470 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7471 as_fn_append CFLAGS " -Wno-type-limits"
a6b92a4a
GM
7472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7473/* end confdefs.h. */
7474
7475int
7476main ()
7477{
7478
7479 ;
7480 return 0;
7481}
7482_ACEOF
7483if ac_fn_c_try_compile "$LINENO"; then :
7484 gl_cv_warn_c__Wno_type_limits=yes
7485else
7486 gl_cv_warn_c__Wno_type_limits=no
7487fi
7488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7489 CFLAGS="$gl_save_compiler_FLAGS"
7490
7491fi
7492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
7493$as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
7494if test "x$gl_cv_warn_c__Wno_type_limits" = x""yes; then :
7495 as_fn_append WARN_CFLAGS " -Wno-type-limits"
7496fi
0eb775a3 7497
a6b92a4a
GM
7498 # Too many warnings for now
7499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-switch" >&5
7500$as_echo_n "checking whether C compiler handles -Wno-switch... " >&6; }
7501if test "${gl_cv_warn_c__Wno_switch+set}" = set; then :
7502 $as_echo_n "(cached) " >&6
7503else
7504
7505 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7506 as_fn_append CFLAGS " -Wno-switch"
a6b92a4a
GM
7507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7508/* end confdefs.h. */
7509
7510int
7511main ()
7512{
7513
7514 ;
7515 return 0;
7516}
7517_ACEOF
7518if ac_fn_c_try_compile "$LINENO"; then :
7519 gl_cv_warn_c__Wno_switch=yes
7520else
7521 gl_cv_warn_c__Wno_switch=no
7522fi
7523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7524 CFLAGS="$gl_save_compiler_FLAGS"
7525
7526fi
7527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_switch" >&5
7528$as_echo "$gl_cv_warn_c__Wno_switch" >&6; }
7529if test "x$gl_cv_warn_c__Wno_switch" = x""yes; then :
7530 as_fn_append WARN_CFLAGS " -Wno-switch"
7531fi
0eb775a3 7532
a6b92a4a
GM
7533 # Too many warnings for now
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
7535$as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
7536if test "${gl_cv_warn_c__Wno_unused_parameter+set}" = set; then :
7537 $as_echo_n "(cached) " >&6
7538else
7539
7540 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7541 as_fn_append CFLAGS " -Wno-unused-parameter"
a6b92a4a
GM
7542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7543/* end confdefs.h. */
7544
7545int
7546main ()
7547{
7548
7549 ;
7550 return 0;
7551}
7552_ACEOF
7553if ac_fn_c_try_compile "$LINENO"; then :
7554 gl_cv_warn_c__Wno_unused_parameter=yes
7555else
7556 gl_cv_warn_c__Wno_unused_parameter=no
7557fi
7558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7559 CFLAGS="$gl_save_compiler_FLAGS"
7560
7561fi
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
7563$as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
7564if test "x$gl_cv_warn_c__Wno_unused_parameter" = x""yes; then :
7565 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
7566fi
0eb775a3 7567
a6b92a4a
GM
7568 # Too many warnings for now
7569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
7570$as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
7571if test "${gl_cv_warn_c__Wno_format_nonliteral+set}" = set; then :
7572 $as_echo_n "(cached) " >&6
7573else
7574
7575 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7576 as_fn_append CFLAGS " -Wno-format-nonliteral"
a6b92a4a
GM
7577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7578/* end confdefs.h. */
7579
7580int
7581main ()
7582{
7583
7584 ;
7585 return 0;
7586}
7587_ACEOF
7588if ac_fn_c_try_compile "$LINENO"; then :
7589 gl_cv_warn_c__Wno_format_nonliteral=yes
7590else
7591 gl_cv_warn_c__Wno_format_nonliteral=no
7592fi
7593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7594 CFLAGS="$gl_save_compiler_FLAGS"
7595
7596fi
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
7598$as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
7599if test "x$gl_cv_warn_c__Wno_format_nonliteral" = x""yes; then :
7600 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
7601fi
7602
7603
0eb775a3 7604
a6b92a4a
GM
7605 # In spite of excluding -Wlogical-op above, it is enabled, as of
7606 # gcc 4.5.0 20090517.
7607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
7608$as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
7609if test "${gl_cv_warn_c__Wno_logical_op+set}" = set; then :
7610 $as_echo_n "(cached) " >&6
7611else
7612
7613 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7614 as_fn_append CFLAGS " -Wno-logical-op"
a6b92a4a
GM
7615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7616/* end confdefs.h. */
7617
7618int
7619main ()
7620{
7621
7622 ;
7623 return 0;
7624}
7625_ACEOF
7626if ac_fn_c_try_compile "$LINENO"; then :
7627 gl_cv_warn_c__Wno_logical_op=yes
7628else
7629 gl_cv_warn_c__Wno_logical_op=no
7630fi
7631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7632 CFLAGS="$gl_save_compiler_FLAGS"
7633
7634fi
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
7636$as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
7637if test "x$gl_cv_warn_c__Wno_logical_op" = x""yes; then :
7638 as_fn_append WARN_CFLAGS " -Wno-logical-op"
7639fi
7640
7641
0eb775a3 7642
a6b92a4a
GM
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
7644$as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
7645if test "${gl_cv_warn_c__fdiagnostics_show_option+set}" = set; then :
7646 $as_echo_n "(cached) " >&6
7647else
7648
7649 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7650 as_fn_append CFLAGS " -fdiagnostics-show-option"
a6b92a4a 7651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
7652/* end confdefs.h. */
7653
7654int
7655main ()
7656{
7657
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662if ac_fn_c_try_compile "$LINENO"; then :
a6b92a4a 7663 gl_cv_warn_c__fdiagnostics_show_option=yes
067d23c9 7664else
a6b92a4a 7665 gl_cv_warn_c__fdiagnostics_show_option=no
067d23c9
KY
7666fi
7667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a6b92a4a
GM
7668 CFLAGS="$gl_save_compiler_FLAGS"
7669
7670fi
7671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
7672$as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
7673if test "x$gl_cv_warn_c__fdiagnostics_show_option" = x""yes; then :
7674 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
067d23c9 7675fi
067d23c9 7676
0eb775a3 7677
a6b92a4a
GM
7678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
7679$as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
7680if test "${gl_cv_warn_c__funit_at_a_time+set}" = set; then :
7681 $as_echo_n "(cached) " >&6
7682else
7683
7684 gl_save_compiler_FLAGS="$CFLAGS"
0eb775a3 7685 as_fn_append CFLAGS " -funit-at-a-time"
a6b92a4a
GM
7686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7687/* end confdefs.h. */
7688
7689int
7690main ()
7691{
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697if ac_fn_c_try_compile "$LINENO"; then :
7698 gl_cv_warn_c__funit_at_a_time=yes
7699else
7700 gl_cv_warn_c__funit_at_a_time=no
7701fi
7702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7703 CFLAGS="$gl_save_compiler_FLAGS"
7704
7705fi
7706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
7707$as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
7708if test "x$gl_cv_warn_c__funit_at_a_time" = x""yes; then :
7709 as_fn_append WARN_CFLAGS " -funit-at-a-time"
7710fi
7711
7712
7713
0eb775a3 7714
a6b92a4a
GM
7715$as_echo "#define lint 1" >>confdefs.h
7716
7717
7718$as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
7719
7720
7721$as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
7722
7723
7724 # We use a slightly smaller set of warning options for lib/.
7725 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
7726 nw=
7727 nw="$nw -Wunused-macros"
7728
7729
7730 gl_warn_set=
7731 set x $WARN_CFLAGS; shift
7732 for gl_warn_item
7733 do
7734 case " $nw " in
7735 *" $gl_warn_item "*)
7736 ;;
7737 *)
7738 gl_warn_set="$gl_warn_set $gl_warn_item"
7739 ;;
7740 esac
7741 done
7742 GNULIB_WARN_CFLAGS=$gl_warn_set
7743
7744
7745fi
067d23c9
KY
7746
7747
7748
067d23c9 7749
067d23c9
KY
7750# Extract the first word of "install-info", so it can be a program name with args.
7751set dummy install-info; ac_word=$2
7752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7753$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 7754if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
7755 $as_echo_n "(cached) " >&6
7756else
7757 case $INSTALL_INFO in
7758 [\\/]* | ?:[\\/]*)
7759 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7760 ;;
7761 *)
7762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
e700232f 7763for as_dir in $PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin
067d23c9
KY
7764do
7765 IFS=$as_save_IFS
7766 test -z "$as_dir" && as_dir=.
7767 for ac_exec_ext in '' $ac_executable_extensions; do
7768 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7769 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7771 break 2
7772 fi
7773done
7774 done
7775IFS=$as_save_IFS
7776
7777 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
7778 ;;
7779esac
7780fi
7781INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7782if test -n "$INSTALL_INFO"; then
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7784$as_echo "$INSTALL_INFO" >&6; }
7785else
7786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7787$as_echo "no" >&6; }
7788fi
7789
7790
7791# Extract the first word of "gzip", so it can be a program name with args.
7792set dummy gzip; ac_word=$2
7793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7794$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 7795if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
7796 $as_echo_n "(cached) " >&6
7797else
7798 case $GZIP_PROG in
7799 [\\/]* | ?:[\\/]*)
7800 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
7801 ;;
7802 *)
7803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7804for as_dir in $PATH
7805do
7806 IFS=$as_save_IFS
7807 test -z "$as_dir" && as_dir=.
7808 for ac_exec_ext in '' $ac_executable_extensions; do
7809 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7810 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
7811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7812 break 2
7813 fi
7814done
7815 done
7816IFS=$as_save_IFS
7817
7818 ;;
7819esac
7820fi
7821GZIP_PROG=$ac_cv_path_GZIP_PROG
7822if test -n "$GZIP_PROG"; then
7823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
7824$as_echo "$GZIP_PROG" >&6; }
7825else
7826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7827$as_echo "no" >&6; }
7828fi
7829
7830
7ee3791f
GM
7831
7832if test $opsys = gnu-linux; then
7833 # Extract the first word of "paxctl", so it can be a program name with args.
9c29597b
GM
7834set dummy paxctl; ac_word=$2
7835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7836$as_echo_n "checking for $ac_word... " >&6; }
7837if test "${ac_cv_path_PAXCTL+set}" = set; then :
7838 $as_echo_n "(cached) " >&6
7839else
7840 case $PAXCTL in
7841 [\\/]* | ?:[\\/]*)
7842 ac_cv_path_PAXCTL="$PAXCTL" # Let the user override the test with a path.
7843 ;;
7844 *)
7845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7846for as_dir in $PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin
7847do
7848 IFS=$as_save_IFS
7849 test -z "$as_dir" && as_dir=.
7850 for ac_exec_ext in '' $ac_executable_extensions; do
7851 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7852 ac_cv_path_PAXCTL="$as_dir/$ac_word$ac_exec_ext"
7853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7854 break 2
7855 fi
7856done
7857 done
7858IFS=$as_save_IFS
7859
7860 ;;
7861esac
7862fi
7863PAXCTL=$ac_cv_path_PAXCTL
7864if test -n "$PAXCTL"; then
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PAXCTL" >&5
7866$as_echo "$PAXCTL" >&6; }
7867else
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7869$as_echo "no" >&6; }
7870fi
7871
7872
7ee3791f 7873fi
067d23c9 7874
9e40dda4 7875## Need makeinfo >= 4.7 (?) to build the manuals.
067d23c9
KY
7876# Extract the first word of "makeinfo", so it can be a program name with args.
7877set dummy makeinfo; ac_word=$2
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7879$as_echo_n "checking for $ac_word... " >&6; }
a9bec17c 7880if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
7881 $as_echo_n "(cached) " >&6
7882else
7883 case $MAKEINFO in
7884 [\\/]* | ?:[\\/]*)
7885 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
7886 ;;
7887 *)
7888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7889for as_dir in $PATH
7890do
7891 IFS=$as_save_IFS
7892 test -z "$as_dir" && as_dir=.
7893 for ac_exec_ext in '' $ac_executable_extensions; do
7894 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7895 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
7896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7897 break 2
7898 fi
7899done
7900 done
7901IFS=$as_save_IFS
7902
7903 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
7904 ;;
7905esac
7906fi
7907MAKEINFO=$ac_cv_path_MAKEINFO
7908if test -n "$MAKEINFO"; then
7909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7910$as_echo "$MAKEINFO" >&6; }
7911else
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7913$as_echo "no" >&6; }
7914fi
7915
7916
7917if test "$MAKEINFO" != "no" && \
9e40dda4 7918 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
7919 MAKEINFO=no
7920fi
7921
7922## Makeinfo is unusual. For a released Emacs, the manuals are
7923## pre-built, and not deleted by the normal clean rules. makeinfo is
7924## therefore in the category of "special tools" not normally required, which
7925## configure does not have to check for (eg autoconf itself).
7926## In a Bazaar checkout on the other hand, the manuals are not included.
7927## So makeinfo is a requirement to build from Bazaar, and configure
7928## should test for it as it does for any other build requirement.
7929## We use the presence of $srcdir/info/emacs to distinguish a release,
7930## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
7931HAVE_MAKEINFO=yes
7932
067d23c9 7933if test "$MAKEINFO" = "no"; then
96f129d5 7934 MAKEINFO=makeinfo
067d23c9 7935 if test "x${with_makeinfo}" = "xno"; then
96f129d5 7936 HAVE_MAKEINFO=no
067d23c9 7937 elif test ! -e $srcdir/info/emacs; then
9e40dda4 7938 as_fn_error "You do not seem to have makeinfo >= 4.7, and your
067d23c9
KY
7939source tree does not seem to have pre-built manuals in the \`info' directory.
7940Either install a suitable version of makeinfo, or re-run configure
7941with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
7942 fi
7943fi
7944
7945
141d074d
GM
7946INFO_EXT=.info
7947INFO_OPTS=--no-split
7948
7949
7950
96f129d5 7951
067d23c9
KY
7952if test x$GCC = xyes; then
7953 test "x$GCC_LINK_TEST_OPTIONS" != x && \
7954 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
7955else
7956 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
7957 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
7958fi
7959
7960
7961late_LDFLAGS=$LDFLAGS
7962if test x$GCC = xyes; then
7963 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
7964else
7965 LDFLAGS="$LDFLAGS -znocombreloc"
7966fi
7967
7968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
7969$as_echo_n "checking for -znocombreloc... " >&6; }
7970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7971/* end confdefs.h. */
7972
7973int
7974main ()
7975{
7976
7977 ;
7978 return 0;
7979}
7980_ACEOF
7981if ac_fn_c_try_link "$LINENO"; then :
7982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7983$as_echo "yes" >&6; }
7984else
7985 LDFLAGS=$late_LDFLAGS
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987$as_echo "no" >&6; }
7988fi
7989rm -f core conftest.err conftest.$ac_objext \
7990 conftest$ac_exeext conftest.$ac_ext
7991
7992
125c3718 7993test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 7994case "$opsys" in
125c3718
PE
7995 your-opsys-here) CANNOT_DUMP=yes ;;
7996esac
7997
7998test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
7999
8000$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
8001
125c3718 8002
067d23c9
KY
8003
8004
8005
8006UNEXEC_OBJ=unexelf.o
8007case "$opsys" in
8008 # MSDOS uses unexcoff.o
8009 # MSWindows uses unexw32.o
8010 aix4-2)
8011 UNEXEC_OBJ=unexaix.o
8012 ;;
8013 cygwin)
8014 UNEXEC_OBJ=unexcw.o
8015 ;;
8016 darwin)
8017 UNEXEC_OBJ=unexmacosx.o
8018 ;;
8019 hpux10-20 | hpux11)
8020 UNEXEC_OBJ=unexhp9k800.o
8021 ;;
8022 sol2-10)
8023 # Use the Solaris dldump() function, called from unexsol.c, to dump
8024 # emacs, instead of the generic ELF dump code found in unexelf.c.
8025 # The resulting binary has a complete symbol table, and is better
8026 # for debugging and other observability tools (debuggers, pstack, etc).
8027 #
8028 # If you encounter a problem using dldump(), please consider sending
8029 # a message to the OpenSolaris tools-linking mailing list:
8030 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
8031 #
8032 # It is likely that dldump() works with older Solaris too, but this has
8033 # not been tested, so for now this change is for Solaris 10 or newer.
8034 UNEXEC_OBJ=unexsol.o
8035 ;;
8036esac
8037
8038LD_SWITCH_SYSTEM=
8039case "$opsys" in
8040 freebsd)
8041 ## Let `ld' find image libs and similar things in /usr/local/lib.
8042 ## The system compiler, GCC, has apparently been modified to not
8043 ## look there, contrary to what a stock GCC would do.
a7479549
GM
8044### It's not our place to do this. See bug#10313#17.
8045### LD_SWITCH_SYSTEM=-L/usr/local/lib
8046 :
067d23c9
KY
8047 ;;
8048
8049 gnu-linux)
8050 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 8051 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
8052 ;;
8053
8054 netbsd)
a7479549
GM
8055### It's not our place to do this. See bug#10313#17.
8056### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
8057 :
067d23c9
KY
8058 ;;
8059
8060 openbsd)
8061 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
8062 ## otherwise Emacs dumps core on elf systems.
8063 LD_SWITCH_SYSTEM="-Z"
8064 ;;
8065esac
8066
8067
8068ac_link="$ac_link $LD_SWITCH_SYSTEM"
8069
ae629dae 8070## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
067d23c9
KY
8071## which has not been defined yet. When this was handled with cpp,
8072## it was expanded to null when configure sourced the s/*.h file.
8073## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
8074## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
8075## (or somesuch), but because it is supposed to go at the _front_
8076## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
8077## Compare with the gnu-linux case below, which added to the end
8078## of LD_SWITCH_SYSTEM, and so can instead go at the front of
8079## LD_SWITCH_SYSTEM_TEMACS.
8080case "$opsys" in
8081 netbsd|openbsd)
ae629dae 8082 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
067d23c9
KY
8083esac
8084
8085
8086C_SWITCH_MACHINE=
42bbbe8b
GM
8087case $canonical in
8088 alpha*)
067d23c9 8089 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
a9bec17c 8090if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
8091
8092fi
8093
8094 if test "$ac_cv_have_decl___ELF__" = "yes"; then
8095 ## With ELF, make sure that all common symbols get allocated to in the
8096 ## data section. Otherwise, the dump of temacs may miss variables in
8097 ## the shared library that have been initialized. For example, with
8098 ## GNU libc, __malloc_initialized would normally be resolved to the
8099 ## shared library's .bss section, which is fatal.
8100 if test "x$GCC" = "xyes"; then
8101 C_SWITCH_MACHINE="-fno-common"
8102 else
a9bec17c 8103 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
8104 fi
8105 else
8106 UNEXEC_OBJ=unexalpha.o
8107 fi
42bbbe8b
GM
8108 ;;
8109esac
067d23c9
KY
8110
8111
8112
8113
8114C_SWITCH_SYSTEM=
8115## Some programs in src produce warnings saying certain subprograms
8116## are too complex and need a MAXMEM value greater than 2000 for
8117## additional optimization. --nils@exp-math.uni-essen.de
8118test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
8119 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
8120## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
8121## It is redundant in glibc2, since we define _GNU_SOURCE.
8122
8123
8124
8125LIBS_SYSTEM=
8126case "$opsys" in
8127 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
8128 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
8129
8130 freebsd) LIBS_SYSTEM="-lutil" ;;
8131
8132 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8133
1f5d53eb 8134 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
8135
8136 ## Motif needs -lgen.
8137 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
8138esac
8139
8140
8141
8142### Make sure subsequent tests use flags consistent with the build flags.
8143
8144if test x"${OVERRIDE_CPPFLAGS}" != x; then
8145 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
8146else
8147 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
8148fi
8149
4fda9c95
GM
8150# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
8151
3e0be4ab
GM
8152# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
8153
4fda9c95 8154
067d23c9 8155
067d23c9
KY
8156LIB_MATH=-lm
8157LIB_STANDARD=
8158START_FILES=
4717915f 8159SYSTEM_TYPE=`echo $opsys | sed -e 's/[0-9].*//' -e 's|-|/|'`
067d23c9
KY
8160
8161case $opsys in
8162 cygwin )
8163 LIB_MATH=
8164 START_FILES='pre-crt0.o'
8165 ;;
8166 darwin )
8167 ## Adding -lm confuses the dynamic linker, so omit it.
8168 LIB_MATH=
8169 START_FILES='pre-crt0.o'
8170 ;;
8171 freebsd )
8172 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8173 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
15f79fcd 8174 SYSTEM_TYPE=berkeley-unix
067d23c9
KY
8175 ;;
8176 gnu-linux | gnu-kfreebsd )
8177 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
8178 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
8179 ;;
8180 hpux10-20 | hpux11 )
8181 LIB_STANDARD=-lc
8182 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
8183 ;;
bb72ce91
GM
8184 netbsd | openbsd )
8185 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8186 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
15f79fcd 8187 SYSTEM_TYPE=berkeley-unix
067d23c9 8188 ;;
15f79fcd
GM
8189
8190 sol2* | unixware )
8191 SYSTEM_TYPE=usg-unix-v
8192 ;;
8193
067d23c9
KY
8194esac
8195
8196
8197
8198
15f79fcd
GM
8199cat >>confdefs.h <<_ACEOF
8200#define SYSTEM_TYPE "$SYSTEM_TYPE"
8201_ACEOF
8202
8203
130f1dac
GM
8204crt_files=
8205
8206for file in x $LIB_STANDARD $START_FILES; do
8207 case "$file" in
8208 *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
8209 esac
8210done
8211
8212if test "x$crt_files" != x; then
8213
8214 ## If user specified a crt-dir, use that unconditionally.
8215 crt_gcc=no
8216
8217 if test "X$CRT_DIR" = "X"; then
8218
8219 CRT_DIR=/usr/lib # default
8220
8221 case "$canonical" in
8222 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
8223 ## On x86-64 and s390x GNU/Linux distributions, the standard library
8224 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
8225 ## For anything else (eg /usr/lib32), it is up the user to specify
8226 ## the location (bug#5655).
8227 ## Test for crtn.o, not just the directory, because sometimes the
8228 ## directory exists but does not have the relevant files (bug#1287).
8229 ## FIXME better to test for binary compatibility somehow.
8230 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
8231 ;;
8232
8233 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
8234 esac
8235
8236 case "$opsys" in
8237 hpux10-20) CRT_DIR=/lib ;;
8238 esac
8239
8240 test "x${GCC}" = xyes && crt_gcc=yes
8241
8242 fi # CRT_DIR = ""
8243
8244 crt_missing=
8245
8246 for file in $crt_files; do
8247
8248 ## If we're using gcc, try to determine it automatically by asking
8249 ## gcc. [If this doesn't work, CRT_DIR will remain at the
8250 ## system-dependent default from above.]
8251 if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
8252
8253 crt_file=`$CC --print-file-name=$file 2>/dev/null`
8254 case "$crt_file" in
8255 */*)
8256 CRT_DIR=`$as_dirname -- "$crt_file" ||
8257$as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8258 X"$crt_file" : 'X\(//\)[^/]' \| \
8259 X"$crt_file" : 'X\(//\)$' \| \
8260 X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
8261$as_echo X"$crt_file" |
8262 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8263 s//\1/
8264 q
8265 }
8266 /^X\(\/\/\)[^/].*/{
8267 s//\1/
8268 q
8269 }
8270 /^X\(\/\/\)$/{
8271 s//\1/
8272 q
8273 }
8274 /^X\(\/\).*/{
8275 s//\1/
8276 q
8277 }
8278 s/.*/./; q'`
8279 ;;
8280 esac
8281 fi
8282
8283 crt_gcc=no
8284
8285 test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
8286 done # $crt_files
8287
8288 test "x$crt_missing" = x || \
a9bec17c 8289 as_fn_error "Required file(s) not found:$crt_missing
130f1dac
GM
8290Try using the --with-crt-dir option." "$LINENO" 5
8291
8292fi # crt_files != ""
8293
8294
8295
bb72ce91
GM
8296case $opsys in
8297 netbsd | openbsd )
8298 if test -f $CRT_DIR/crti.o; then
8299
8300 test -f $CRT_DIR/crtn.o || \
8301 as_fn_error "Required file not found: crtn.o" "$LINENO" 5
8302
8303 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8304 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8305 fi
8306 ;;
8307esac
8308
130f1dac 8309
5476a9a4
GM
8310pre_PKG_CONFIG_CFLAGS=$CFLAGS
8311pre_PKG_CONFIG_LIBS=$LIBS
067d23c9 8312
5476a9a4
GM
8313# Extract the first word of "pkg-config", so it can be a program name with args.
8314set dummy pkg-config; ac_word=$2
8315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8316$as_echo_n "checking for $ac_word... " >&6; }
8317if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8318 $as_echo_n "(cached) " >&6
8319else
8320 case $PKG_CONFIG in
8321 [\\/]* | ?:[\\/]*)
8322 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8323 ;;
8324 *)
8325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8326for as_dir in $PATH
8327do
8328 IFS=$as_save_IFS
8329 test -z "$as_dir" && as_dir=.
8330 for ac_exec_ext in '' $ac_executable_extensions; do
8331 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8332 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8334 break 2
8335 fi
8336done
8337 done
8338IFS=$as_save_IFS
8339
8340 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8341 ;;
8342esac
8343fi
8344PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8345if test -n "$PKG_CONFIG"; then
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8347$as_echo "$PKG_CONFIG" >&6; }
8348else
8349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8350$as_echo "no" >&6; }
8351fi
f199cab1
GM
8352
8353
f199cab1 8354
5476a9a4
GM
8355
8356
8357
8358if test "${with_sound}" != "no"; then
8359 # Sound support for GNU/Linux and the free BSDs.
8360 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
8361do :
8362 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8363ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8364eval as_val=\$$as_ac_Header
8365 if test "x$as_val" = x""yes; then :
8366 cat >>confdefs.h <<_ACEOF
8367#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8368_ACEOF
8369 have_sound_header=yes
8370fi
8371
8372done
8373
8374 # Emulation library used on NetBSD.
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
8376$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
8377if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
8378 $as_echo_n "(cached) " >&6
8379else
5476a9a4
GM
8380 ac_check_lib_save_LIBS=$LIBS
8381LIBS="-lossaudio $LIBS"
8382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8383/* end confdefs.h. */
5476a9a4
GM
8384
8385/* Override any GCC internal prototype to avoid an error.
8386 Use char because int might match the return type of a GCC
8387 builtin and then its argument prototype would still apply. */
8388#ifdef __cplusplus
8389extern "C"
8390#endif
8391char _oss_ioctl ();
067d23c9
KY
8392int
8393main ()
8394{
5476a9a4 8395return _oss_ioctl ();
067d23c9
KY
8396 ;
8397 return 0;
8398}
8399_ACEOF
8400if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 8401 ac_cv_lib_ossaudio__oss_ioctl=yes
067d23c9 8402else
5476a9a4 8403 ac_cv_lib_ossaudio__oss_ioctl=no
067d23c9
KY
8404fi
8405rm -f core conftest.err conftest.$ac_objext \
8406 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
8407LIBS=$ac_check_lib_save_LIBS
8408fi
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
8410$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
8411if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
8412 LIBSOUND=-lossaudio
8413else
8414 LIBSOUND=
067d23c9
KY
8415fi
8416
8417
8418
5476a9a4
GM
8419 ALSA_REQUIRED=1.0.0
8420 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8421
8422 succeeded=no
8423
8424 if test "$PKG_CONFIG" = "no" ; then
8425 HAVE_ALSA=no
8426 else
8427 PKG_CONFIG_MIN_VERSION=0.9.0
8428 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8430$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8431
8432 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5 &&
8433 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES" 2>&5` &&
8434 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES" 2>&5`; then
8435 edit_cflags="
8436 s,///*,/,g
8437 s/^/ /
8438 s/ -I/ $isystem/g
8439 s/^ //
8440 "
8441 ALSA_CFLAGS=`$as_echo "$ALSA_CFLAGS" | sed -e "$edit_cflags"`
8442 ALSA_LIBS=`$as_echo "$ALSA_LIBS" | sed -e 's,///*,/,g'`
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&5
8444$as_echo "yes CFLAGS='$ALSA_CFLAGS' LIBS='$ALSA_LIBS'" >&6; }
8445 succeeded=yes
8446 else
8447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8448$as_echo "no" >&6; }
8449 ALSA_CFLAGS=""
8450 ALSA_LIBS=""
8451 ## If we have a custom action on failure, don't print errors, but
8452 ## do set a variable so people can do so.
8453 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
8454
8455 fi
8456
8457
8458
8459 else
8460 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8461 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8462 fi
8463 fi
8464
8465 if test $succeeded = yes; then
8466 HAVE_ALSA=yes
8467 else
8468 HAVE_ALSA=no
8469 fi
f199cab1 8470
5476a9a4
GM
8471 if test $HAVE_ALSA = yes; then
8472 SAVE_CFLAGS="$CFLAGS"
8473 SAVE_LIBS="$LIBS"
8474 CFLAGS="$ALSA_CFLAGS $CFLAGS"
8475 LIBS="$ALSA_LIBS $LIBS"
8476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8477/* end confdefs.h. */
8478#include <asoundlib.h>
067d23c9
KY
8479int
8480main ()
8481{
5476a9a4 8482snd_lib_error_set_handler (0);
067d23c9
KY
8483 ;
8484 return 0;
8485}
8486_ACEOF
5476a9a4
GM
8487if ac_fn_c_try_compile "$LINENO"; then :
8488 emacs_alsa_normal=yes
067d23c9 8489else
5476a9a4 8490 emacs_alsa_normal=no
067d23c9 8491fi
5476a9a4
GM
8492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8493 if test "$emacs_alsa_normal" != yes; then
8494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8495/* end confdefs.h. */
8496#include <alsa/asoundlib.h>
8497int
8498main ()
8499{
8500snd_lib_error_set_handler (0);
8501 ;
8502 return 0;
8503}
8504_ACEOF
8505if ac_fn_c_try_compile "$LINENO"; then :
8506 emacs_alsa_subdir=yes
8507else
8508 emacs_alsa_subdir=no
f199cab1 8509fi
5476a9a4
GM
8510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8511 if test "$emacs_alsa_subdir" != yes; then
8512 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
8513 fi
8514 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8515 fi
067d23c9 8516
5476a9a4
GM
8517 CFLAGS="$SAVE_CFLAGS"
8518 LIBS="$SAVE_LIBS"
8519 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8520 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
067d23c9 8521
5476a9a4 8522$as_echo "#define HAVE_ALSA 1" >>confdefs.h
067d23c9 8523
5476a9a4 8524 fi
067d23c9 8525
5476a9a4
GM
8526 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8527 case "$opsys" in
8528 gnu-linux|freebsd|netbsd)
067d23c9 8529
5476a9a4 8530$as_echo "#define HAVE_SOUND 1" >>confdefs.h
067d23c9 8531
5476a9a4
GM
8532 ;;
8533 esac
8534 fi
067d23c9
KY
8535
8536
5476a9a4 8537fi
067d23c9 8538
e700232f
GM
8539
8540
8541
5476a9a4
GM
8542 for ac_header in $ac_header_list
8543do :
8544 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8545ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
8546"
8547eval as_val=\$$as_ac_Header
8548 if test "x$as_val" = x""yes; then :
8549 cat >>confdefs.h <<_ACEOF
8550#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
067d23c9
KY
8551_ACEOF
8552
f199cab1 8553fi
e700232f 8554
5476a9a4
GM
8555done
8556
8557
e700232f
GM
8558
8559
8560
f199cab1 8561
067d23c9 8562
067d23c9 8563
067d23c9 8564
067d23c9 8565
f199cab1
GM
8566
8567
8568
067d23c9 8569
067d23c9 8570
f199cab1
GM
8571
8572
8573
f199cab1 8574
f199cab1 8575
067d23c9 8576
f199cab1 8577
067d23c9 8578
5476a9a4
GM
8579
8580
8581
8582
8583
8584
8585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8586$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8588/* end confdefs.h. */
8589#include <sys/personality.h>
067d23c9
KY
8590int
8591main ()
8592{
5476a9a4 8593personality (PER_LINUX32)
067d23c9
KY
8594 ;
8595 return 0;
8596}
8597_ACEOF
8598if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8599 emacs_cv_personality_linux32=yes
067d23c9 8600else
5476a9a4 8601 emacs_cv_personality_linux32=no
067d23c9 8602fi
f199cab1 8603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
8604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8605$as_echo "$emacs_cv_personality_linux32" >&6; }
f199cab1 8606
5476a9a4 8607if test $emacs_cv_personality_linux32 = yes; then
f199cab1 8608
5476a9a4
GM
8609$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8610
8611fi
8612
8613for ac_header in term.h
8614do :
8615 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
8616if test "x$ac_cv_header_term_h" = x""yes; then :
8617 cat >>confdefs.h <<_ACEOF
8618#define HAVE_TERM_H 1
067d23c9 8619_ACEOF
5476a9a4
GM
8620
8621fi
8622
8623done
8624
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8626$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
8627if test "${ac_cv_header_time+set}" = set; then :
8628 $as_echo_n "(cached) " >&6
8629else
8630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 8631/* end confdefs.h. */
5476a9a4
GM
8632#include <sys/types.h>
8633#include <sys/time.h>
8634#include <time.h>
f199cab1 8635
067d23c9
KY
8636int
8637main ()
8638{
5476a9a4
GM
8639if ((struct tm *) 0)
8640return 0;
067d23c9
KY
8641 ;
8642 return 0;
8643}
8644_ACEOF
8645if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 8646 ac_cv_header_time=yes
067d23c9 8647else
5476a9a4 8648 ac_cv_header_time=no
067d23c9
KY
8649fi
8650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8651fi
5476a9a4
GM
8652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8653$as_echo "$ac_cv_header_time" >&6; }
8654if test $ac_cv_header_time = yes; then
f199cab1 8655
5476a9a4
GM
8656$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8657
8658fi
8659
8660ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
8661if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
8662 ac_have_decl=1
8663else
8664 ac_have_decl=0
8665fi
8666
8667cat >>confdefs.h <<_ACEOF
8668#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
067d23c9 8669_ACEOF
5476a9a4
GM
8670
8671if test $ac_cv_have_decl_sys_siglist != yes; then
8672 # For Tru64, at least:
8673 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
8674if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
8675 ac_have_decl=1
8676else
8677 ac_have_decl=0
067d23c9 8678fi
5476a9a4
GM
8679
8680cat >>confdefs.h <<_ACEOF
8681#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8682_ACEOF
8683
8684 if test $ac_cv_have_decl___sys_siglist = yes; then
8685
8686$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8687
8688 fi
8689fi
8690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8691$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
8692if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8693 $as_echo_n "(cached) " >&6
067d23c9
KY
8694else
8695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8696/* end confdefs.h. */
5476a9a4
GM
8697#include <sys/types.h>
8698#include <sys/wait.h>
8699#ifndef WEXITSTATUS
8700# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8701#endif
8702#ifndef WIFEXITED
8703# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8704#endif
8705
067d23c9
KY
8706int
8707main ()
8708{
5476a9a4
GM
8709 int s;
8710 wait (&s);
8711 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
067d23c9
KY
8712 ;
8713 return 0;
8714}
8715_ACEOF
5476a9a4
GM
8716if ac_fn_c_try_compile "$LINENO"; then :
8717 ac_cv_header_sys_wait_h=yes
067d23c9 8718else
5476a9a4 8719 ac_cv_header_sys_wait_h=no
067d23c9 8720fi
5476a9a4 8721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 8722fi
5476a9a4
GM
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
8724$as_echo "$ac_cv_header_sys_wait_h" >&6; }
8725if test $ac_cv_header_sys_wait_h = yes; then
067d23c9 8726
5476a9a4 8727$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7417b37c 8728
5476a9a4 8729fi
7417b37c 8730
7417b37c 8731
5476a9a4
GM
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
8733$as_echo_n "checking for speed_t... " >&6; }
8734if test "${emacs_cv_speed_t+set}" = set; then :
f199cab1
GM
8735 $as_echo_n "(cached) " >&6
8736else
f199cab1
GM
8737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8738/* end confdefs.h. */
5476a9a4
GM
8739#include <termios.h>
8740int
8741main ()
8742{
8743speed_t x = 1;
8744 ;
8745 return 0;
8746}
7417b37c 8747_ACEOF
f199cab1 8748if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
8749 emacs_cv_speed_t=yes
8750else
8751 emacs_cv_speed_t=no
7417b37c 8752fi
f199cab1 8753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 8754fi
5476a9a4
GM
8755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
8756$as_echo "$emacs_cv_speed_t" >&6; }
8757if test $emacs_cv_speed_t = yes; then
7417b37c 8758
5476a9a4 8759$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
067d23c9 8760
5476a9a4 8761fi
067d23c9 8762
5476a9a4
GM
8763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
8764$as_echo_n "checking for struct exception... " >&6; }
8765if test "${emacs_cv_struct_exception+set}" = set; then :
f199cab1
GM
8766 $as_echo_n "(cached) " >&6
8767else
8768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8769/* end confdefs.h. */
5476a9a4 8770#include <math.h>
f199cab1
GM
8771int
8772main ()
8773{
5476a9a4 8774static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
f199cab1
GM
8775 ;
8776 return 0;
8777}
067d23c9 8778_ACEOF
5476a9a4
GM
8779if ac_fn_c_try_compile "$LINENO"; then :
8780 emacs_cv_struct_exception=yes
f199cab1 8781else
5476a9a4 8782 emacs_cv_struct_exception=no
067d23c9 8783fi
5476a9a4 8784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417b37c 8785fi
5476a9a4
GM
8786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
8787$as_echo "$emacs_cv_struct_exception" >&6; }
8788HAVE_EXCEPTION=$emacs_cv_struct_exception
8789if test $emacs_cv_struct_exception != yes || test $opsys = darwin; then
7417b37c 8790
5476a9a4 8791$as_echo "#define NO_MATHERR 1" >>confdefs.h
7417b37c 8792
5476a9a4 8793fi
7417b37c 8794
067d23c9
KY
8795
8796
e700232f 8797
5476a9a4
GM
8798for ac_header in net/if.h
8799do :
8800 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
8801#if HAVE_SYS_SOCKET_H
8802#include <sys/socket.h>
8803#endif
8804"
8805if test "x$ac_cv_header_net_if_h" = x""yes; then :
8806 cat >>confdefs.h <<_ACEOF
8807#define HAVE_NET_IF_H 1
067d23c9 8808_ACEOF
7cae64b4 8809
067d23c9 8810fi
067d23c9 8811
5476a9a4 8812done
4d4b75e8 8813
5476a9a4
GM
8814for ac_header in ifaddrs.h
8815do :
8816 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
8817#if HAVE_SYS_SOCKET_H
8818#include <sys/socket.h>
8819#endif
8820"
8821if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
8822 cat >>confdefs.h <<_ACEOF
8823#define HAVE_IFADDRS_H 1
8824_ACEOF
4d4b75e8 8825
5476a9a4 8826fi
4d4b75e8 8827
5476a9a4 8828done
7e723570 8829
5476a9a4 8830for ac_header in net/if_dl.h
7e723570 8831do :
5476a9a4
GM
8832 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
8833#if HAVE_SYS_SOCKET_H
8834#include <sys/socket.h>
8835#endif
7e723570 8836"
5476a9a4 8837if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
7e723570 8838 cat >>confdefs.h <<_ACEOF
5476a9a4 8839#define HAVE_NET_IF_DL_H 1
7e723570
GM
8840_ACEOF
8841
8842fi
8843
8844done
8845
8846
5476a9a4
GM
8847ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
8848#if HAVE_SYS_SOCKET_H
8849#include <sys/socket.h>
8850#endif
8851#if HAVE_NET_IF_H
8852#include <net/if.h>
8853#endif
8854"
8855if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
7e723570 8856
5476a9a4
GM
8857cat >>confdefs.h <<_ACEOF
8858#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8859_ACEOF
7e723570
GM
8860
8861
5476a9a4
GM
8862fi
8863ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
8864#if HAVE_SYS_SOCKET_H
8865#include <sys/socket.h>
f199cab1 8866#endif
5476a9a4
GM
8867#if HAVE_NET_IF_H
8868#include <net/if.h>
f199cab1 8869#endif
5476a9a4
GM
8870"
8871if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
8872
8873cat >>confdefs.h <<_ACEOF
8874#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8875_ACEOF
8876
8877
8878fi
8879ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
8880#if HAVE_SYS_SOCKET_H
8881#include <sys/socket.h>
f199cab1 8882#endif
5476a9a4
GM
8883#if HAVE_NET_IF_H
8884#include <net/if.h>
8885#endif
8886"
8887if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
8888
8889cat >>confdefs.h <<_ACEOF
8890#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
f199cab1 8891_ACEOF
5476a9a4
GM
8892
8893
8894fi
8895ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
8896#if HAVE_SYS_SOCKET_H
8897#include <sys/socket.h>
8898#endif
8899#if HAVE_NET_IF_H
8900#include <net/if.h>
8901#endif
8902"
8903if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
8904
8905cat >>confdefs.h <<_ACEOF
8906#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
f199cab1 8907_ACEOF
5476a9a4
GM
8908
8909
067d23c9 8910fi
5476a9a4
GM
8911ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
8912#if HAVE_SYS_SOCKET_H
8913#include <sys/socket.h>
8914#endif
8915#if HAVE_NET_IF_H
8916#include <net/if.h>
8917#endif
8918"
8919if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
8920
8921cat >>confdefs.h <<_ACEOF
8922#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8923_ACEOF
8924
067d23c9 8925
f199cab1 8926fi
5476a9a4
GM
8927ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
8928#if HAVE_SYS_SOCKET_H
8929#include <sys/socket.h>
8930#endif
8931#if HAVE_NET_IF_H
8932#include <net/if.h>
8933#endif
8934"
8935if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
8936
8937cat >>confdefs.h <<_ACEOF
8938#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
8939_ACEOF
8940
067d23c9
KY
8941
8942fi
8943
8944
067d23c9 8945
f199cab1 8946
5476a9a4
GM
8947DEPFLAGS=
8948MKDEPDIR=":"
8949deps_frag=deps.mk
8950if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
8952$as_echo_n "checking whether we are using GNU Make... " >&6; }
8953 HAVE_GNU_MAKE=no
8954 testval=`${MAKE-make} --version 2>/dev/null | grep 'GNU Make'`
8955 if test "x$testval" != x; then
8956 HAVE_GNU_MAKE=yes
8957 else
8958 ac_enable_autodepend=no
8959 fi
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
8961$as_echo "$HAVE_GNU_MAKE" >&6; }
8962 if test $HAVE_GNU_MAKE = yes; then
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
8964$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
8965 SAVE_CFLAGS="$CFLAGS"
8966 CFLAGS="$CFLAGS -MMD -MF deps.d -MP"
8967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8968/* end confdefs.h. */
f199cab1 8969
5476a9a4
GM
8970int
8971main ()
8972{
f199cab1 8973
5476a9a4
GM
8974 ;
8975 return 0;
8976}
8977_ACEOF
8978if ac_fn_c_try_compile "$LINENO"; then :
f199cab1 8979
5476a9a4
GM
8980else
8981 ac_enable_autodepend=no
8982fi
8983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8984 CFLAGS="$SAVE_CFLAGS"
8985 test -f deps.d || ac_enable_autodepend=no
8986 rm -rf deps.d
8987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
8988$as_echo "$ac_enable_autodepend" >&6; }
8989 fi
8990 if test $ac_enable_autodepend = yes; then
8991 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
8992 ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
8993 MKDEPDIR='${MKDIR_P} ${DEPDIR}'
8994 deps_frag=autodeps.mk
8995 fi
8996fi
8997deps_frag=$srcdir/src/$deps_frag
f199cab1
GM
8998
8999
9000
9001
9002
5476a9a4 9003lisp_frag=$srcdir/src/lisp.mk
f199cab1
GM
9004
9005
9006
5476a9a4
GM
9007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9008$as_echo_n "checking for long file names... " >&6; }
9009if test "${ac_cv_sys_long_file_names+set}" = set; then :
9010 $as_echo_n "(cached) " >&6
9011else
9012 ac_cv_sys_long_file_names=yes
9013# Test for long file names in all the places we know might matter:
9014# . the current directory, where building will happen
9015# $prefix/lib where we will be installing things
9016# $exec_prefix/lib likewise
9017# $TMPDIR if set, where it might want to write temporary files
9018# /tmp where it might want to write temporary files
9019# /var/tmp likewise
9020# /usr/tmp likewise
9021for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9022 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9023 # in the usual case where exec_prefix is '${prefix}'.
9024 case $ac_dir in #(
9025 . | /* | ?:[\\/]*) ;; #(
9026 *) continue;;
9027 esac
9028 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9029 ac_xdir=$ac_dir/cf$$
9030 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9031 ac_tf1=$ac_xdir/conftest9012345
9032 ac_tf2=$ac_xdir/conftest9012346
9033 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9034 ac_cv_sys_long_file_names=no
9035 rm -f -r "$ac_xdir" 2>/dev/null
9036 test $ac_cv_sys_long_file_names = no && break
9037done
9038fi
9039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9040$as_echo "$ac_cv_sys_long_file_names" >&6; }
9041if test $ac_cv_sys_long_file_names = yes; then
f199cab1 9042
5476a9a4 9043$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
f199cab1 9044
5476a9a4 9045fi
f199cab1 9046
f199cab1 9047
5476a9a4 9048#### Choose a window system.
f199cab1 9049
5476a9a4
GM
9050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9051$as_echo_n "checking for X... " >&6; }
f199cab1 9052
f199cab1 9053
5476a9a4
GM
9054# Check whether --with-x was given.
9055if test "${with_x+set}" = set; then :
9056 withval=$with_x;
9057fi
f199cab1 9058
5476a9a4
GM
9059# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9060if test "x$with_x" = xno; then
9061 # The user explicitly disabled X.
9062 have_x=disabled
9063else
9064 case $x_includes,$x_libraries in #(
9065 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9066 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
9067 $as_echo_n "(cached) " >&6
9068else
9069 # One or both of the vars are not set, and there is no cached value.
9070ac_x_includes=no ac_x_libraries=no
9071rm -f -r conftest.dir
9072if mkdir conftest.dir; then
9073 cd conftest.dir
9074 cat >Imakefile <<'_ACEOF'
9075incroot:
9076 @echo incroot='${INCROOT}'
9077usrlibdir:
9078 @echo usrlibdir='${USRLIBDIR}'
9079libdir:
9080 @echo libdir='${LIBDIR}'
9081_ACEOF
9082 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9083 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9084 for ac_var in incroot usrlibdir libdir; do
9085 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9086 done
9087 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9088 for ac_extension in a so sl dylib la dll; do
9089 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9090 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9091 ac_im_usrlibdir=$ac_im_libdir; break
9092 fi
9093 done
9094 # Screen out bogus values from the imake configuration. They are
9095 # bogus both because they are the default anyway, and because
9096 # using them would break gcc on systems where it needs fixed includes.
9097 case $ac_im_incroot in
9098 /usr/include) ac_x_includes= ;;
9099 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9100 esac
9101 case $ac_im_usrlibdir in
9102 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9103 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9104 esac
9105 fi
9106 cd ..
9107 rm -f -r conftest.dir
067d23c9
KY
9108fi
9109
5476a9a4
GM
9110# Standard set of common directories for X headers.
9111# Check X11 before X11Rn because it is often a symlink to the current release.
9112ac_x_header_dirs='
9113/usr/X11/include
9114/usr/X11R7/include
9115/usr/X11R6/include
9116/usr/X11R5/include
9117/usr/X11R4/include
067d23c9 9118
5476a9a4
GM
9119/usr/include/X11
9120/usr/include/X11R7
9121/usr/include/X11R6
9122/usr/include/X11R5
9123/usr/include/X11R4
067d23c9 9124
5476a9a4
GM
9125/usr/local/X11/include
9126/usr/local/X11R7/include
9127/usr/local/X11R6/include
9128/usr/local/X11R5/include
9129/usr/local/X11R4/include
067d23c9 9130
5476a9a4
GM
9131/usr/local/include/X11
9132/usr/local/include/X11R7
9133/usr/local/include/X11R6
9134/usr/local/include/X11R5
9135/usr/local/include/X11R4
067d23c9 9136
5476a9a4
GM
9137/usr/X386/include
9138/usr/x386/include
9139/usr/XFree86/include/X11
067d23c9 9140
5476a9a4
GM
9141/usr/include
9142/usr/local/include
9143/usr/unsupported/include
9144/usr/athena/include
9145/usr/local/x11r5/include
9146/usr/lpp/Xamples/include
067d23c9 9147
5476a9a4
GM
9148/usr/openwin/include
9149/usr/openwin/share/include'
067d23c9 9150
5476a9a4
GM
9151if test "$ac_x_includes" = no; then
9152 # Guess where to find include files, by looking for Xlib.h.
9153 # First, try using that file with no special directory specified.
9154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9155/* end confdefs.h. */
9156#include <X11/Xlib.h>
067d23c9 9157_ACEOF
5476a9a4
GM
9158if ac_fn_c_try_cpp "$LINENO"; then :
9159 # We can compile using X headers with no special include directory.
9160ac_x_includes=
067d23c9 9161else
5476a9a4
GM
9162 for ac_dir in $ac_x_header_dirs; do
9163 if test -r "$ac_dir/X11/Xlib.h"; then
9164 ac_x_includes=$ac_dir
9165 break
f199cab1 9166 fi
f199cab1 9167done
5476a9a4
GM
9168fi
9169rm -f conftest.err conftest.$ac_ext
9170fi # $ac_x_includes = no
067d23c9 9171
5476a9a4
GM
9172if test "$ac_x_libraries" = no; then
9173 # Check for the libraries.
9174 # See if we find them without any special options.
9175 # Don't add to $LIBS permanently.
9176 ac_save_LIBS=$LIBS
9177 LIBS="-lX11 $LIBS"
7ee3791f 9178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9179/* end confdefs.h. */
5476a9a4 9180#include <X11/Xlib.h>
067d23c9
KY
9181int
9182main ()
9183{
5476a9a4
GM
9184XrmInitialize ()
9185 ;
067d23c9
KY
9186 return 0;
9187}
9188_ACEOF
5476a9a4
GM
9189if ac_fn_c_try_link "$LINENO"; then :
9190 LIBS=$ac_save_LIBS
9191# We can link X programs with no special library path.
9192ac_x_libraries=
7ee3791f 9193else
5476a9a4
GM
9194 LIBS=$ac_save_LIBS
9195for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9196do
9197 # Don't even attempt the hair of trying to link an X program!
9198 for ac_extension in a so sl dylib la dll; do
9199 if test -r "$ac_dir/libX11.$ac_extension"; then
9200 ac_x_libraries=$ac_dir
9201 break 2
9202 fi
9203 done
9204done
7ee3791f 9205fi
5476a9a4
GM
9206rm -f core conftest.err conftest.$ac_objext \
9207 conftest$ac_exeext conftest.$ac_ext
9208fi # $ac_x_libraries = no
7ee3791f 9209
5476a9a4
GM
9210case $ac_x_includes,$ac_x_libraries in #(
9211 no,* | *,no | *\'*)
9212 # Didn't find X, or a directory has "'" in its name.
9213 ac_cv_have_x="have_x=no";; #(
9214 *)
9215 # Record where we found X for the cache.
9216 ac_cv_have_x="have_x=yes\
9217 ac_x_includes='$ac_x_includes'\
9218 ac_x_libraries='$ac_x_libraries'"
9219esac
9220fi
9221;; #(
9222 *) have_x=yes;;
9223 esac
9224 eval "$ac_cv_have_x"
9225fi # $with_x != no
9226
9227if test "$have_x" != yes; then
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9229$as_echo "$have_x" >&6; }
9230 no_x=yes
9231else
9232 # If each of the values was on the command line, it overrides each guess.
9233 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9234 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9235 # Update the cache value to reflect the command line values.
9236 ac_cv_have_x="have_x=yes\
9237 ac_x_includes='$x_includes'\
9238 ac_x_libraries='$x_libraries'"
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9240$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9241fi
9242
9243if test "$no_x" = yes; then
9244 window_system=none
9245else
9246 window_system=x11
9247fi
9248
9249LD_SWITCH_X_SITE_RPATH=
9250if test "${x_libraries}" != NONE; then
9251 if test -n "${x_libraries}"; then
9252 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9253 LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
9254 fi
9255 x_default_search_path=""
9256 x_search_path=${x_libraries}
9257 if test -z "${x_search_path}"; then
9258 x_search_path=/usr/lib
9259 fi
9260 for x_library in `echo ${x_search_path}: | \
9261 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9262 x_search_path="\
9263${x_library}/X11/%L/%T/%N%C%S:\
9264${x_library}/X11/%l/%T/%N%C%S:\
9265${x_library}/X11/%T/%N%C%S:\
9266${x_library}/X11/%L/%T/%N%S:\
9267${x_library}/X11/%l/%T/%N%S:\
9268${x_library}/X11/%T/%N%S"
9269 if test x"${x_default_search_path}" = x; then
9270 x_default_search_path=${x_search_path}
9271 else
9272 x_default_search_path="${x_search_path}:${x_default_search_path}"
9273 fi
9274 done
9275fi
9276
9277
9278if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9279 C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
9280fi
9281
9282if test x"${x_includes}" = x; then
9283 bitmapdir=/usr/include/X11/bitmaps
9284else
9285 # accumulate include directories that have X11 bitmap subdirectories
9286 bmd_acc="dummyval"
9287 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9288 if test -d "${bmd}/X11/bitmaps"; then
9289 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9290 fi
9291 if test -d "${bmd}/bitmaps"; then
9292 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9293 fi
9294 done
9295 if test ${bmd_acc} != "dummyval"; then
9296 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9297 fi
9298fi
7ee3791f 9299
5476a9a4
GM
9300HAVE_NS=no
9301NS_IMPL_COCOA=no
9302NS_IMPL_GNUSTEP=no
9303tmp_CPPFLAGS="$CPPFLAGS"
9304tmp_CFLAGS="$CFLAGS"
9305CPPFLAGS="$CPPFLAGS -x objective-c"
9306CFLAGS="$CFLAGS -x objective-c"
9307TEMACS_LDFLAGS2="\${LDFLAGS}"
9308GNU_OBJC_CFLAGS=
9309if test "${with_ns}" != no; then
9310 if test "${opsys}" = darwin; then
9311 NS_IMPL_COCOA=yes
9312 ns_appdir=`pwd`/nextstep/Emacs.app
9313 ns_appbindir=${ns_appdir}/Contents/MacOS
9314 ns_appresdir=${ns_appdir}/Contents/Resources
9315 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
9316 elif test -f $GNUSTEP_CONFIG_FILE; then
9317 NS_IMPL_GNUSTEP=yes
9318 ns_appdir=`pwd`/nextstep/Emacs.app
9319 ns_appbindir=${ns_appdir}
9320 ns_appresdir=${ns_appdir}/Resources
9321 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
9322 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9323 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9324 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9325 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9326 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9327 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9328 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9329 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9330 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9331 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9332 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9333 LIB_STANDARD=
9334 START_FILES=
9335 TEMACS_LDFLAGS2=
9336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS" >&5
9337$as_echo_n "checking if GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS... " >&6; }
9338if test "${emacs_cv_objc_exceptions+set}" = set; then :
9339 $as_echo_n "(cached) " >&6
9340else
9341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9342/* end confdefs.h. */
9343#include <GNUstepBase/GSConfig.h>
39b3d70b
GM
9344int
9345main ()
9346{
5476a9a4
GM
9347#if defined BASE_NATIVE_OBJC_EXCEPTIONS && BASE_NATIVE_OBJC_EXCEPTIONS > 0
93481;
9349#else
9350fail;
9351#endif
9352 ;
39b3d70b
GM
9353 return 0;
9354}
9355_ACEOF
5476a9a4
GM
9356if ac_fn_c_try_compile "$LINENO"; then :
9357 emacs_cv_objc_exceptions=yes
39b3d70b 9358else
5476a9a4 9359 emacs_cv_objc_exceptions=no
39b3d70b 9360fi
5476a9a4 9361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39b3d70b 9362fi
5476a9a4
GM
9363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_objc_exceptions" >&5
9364$as_echo "$emacs_cv_objc_exceptions" >&6; }
9365 if test $emacs_cv_objc_exceptions = yes; then
39b3d70b 9366
5476a9a4
GM
9367$as_echo "#define _NATIVE_OBJC_EXCEPTIONS 1" >>confdefs.h
9368
9369 GNU_OBJC_CFLAGS="-fobjc-exceptions"
9370 fi
9371 fi
9372
9373 CFLAGS="$CFLAGS $GNU_OBJC_CFLAGS"
9374
9375 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
9376if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9377 HAVE_NS=yes
067d23c9 9378else
5476a9a4
GM
9379 as_fn_error "\`--with-ns' was specified, but the include
9380 files are missing or cannot be compiled." "$LINENO" 5
9381fi
f199cab1 9382
f199cab1 9383
5476a9a4
GM
9384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9385/* end confdefs.h. */
9386#include <Foundation/NSObjCRuntime.h>
067d23c9
KY
9387int
9388main ()
9389{
5476a9a4
GM
9390NSInteger i;
9391 ;
067d23c9
KY
9392 return 0;
9393}
9394_ACEOF
5476a9a4
GM
9395if ac_fn_c_try_compile "$LINENO"; then :
9396 ns_have_nsinteger=yes
067d23c9 9397else
5476a9a4 9398 ns_have_nsinteger=no
067d23c9 9399fi
5476a9a4
GM
9400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9401 if test $ns_have_nsinteger = yes; then
067d23c9 9402
5476a9a4 9403$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
067d23c9 9404
067d23c9 9405 fi
5476a9a4 9406fi
067d23c9 9407
5476a9a4
GM
9408
9409INSTALL_ARCH_INDEP_EXTRA=install-etc
9410ns_self_contained=no
9411ns_frag=/dev/null
9412NS_OBJ=
9413NS_OBJC_OBJ=
9414if test "${HAVE_NS}" = yes; then
9415 if test "$with_toolkit_scroll_bars" = "no"; then
9416 as_fn_error "Non-toolkit scroll bars are not implemented for Nextstep." "$LINENO" 5
9417 fi
9418
9419 window_system=nextstep
9420 with_xft=no
9421 # set up packaging dirs
9422 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9423 ns_self_contained=yes
9424 prefix=${ns_appresdir}
9425 exec_prefix=${ns_appbindir}
9426 libexecdir="\${ns_appbindir}/libexec"
9427 archlibdir="\${ns_appbindir}/libexec"
9428 docdir="\${ns_appresdir}/etc"
9429 etcdir="\${ns_appresdir}/etc"
9430 infodir="\${ns_appresdir}/info"
9431 mandir="\${ns_appresdir}/man"
9432 lispdir="\${ns_appresdir}/lisp"
9433 leimdir="\${ns_appresdir}/leim"
9434 INSTALL_ARCH_INDEP_EXTRA=
9435 fi
9436 ns_frag=$srcdir/src/ns.mk
9437 NS_OBJ="fontset.o fringe.o image.o"
9438 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
9439fi
9440CFLAGS="$tmp_CFLAGS"
9441CPPFLAGS="$tmp_CPPFLAGS"
9442
9443
9444
9445
9446
9447
9448
9449case "${window_system}" in
9450 x11 )
9451 HAVE_X_WINDOWS=yes
9452 HAVE_X11=yes
9453 case "${with_x_toolkit}" in
9454 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9455 motif ) USE_X_TOOLKIT=MOTIF ;;
9456 gtk ) with_gtk=yes
9457 USE_X_TOOLKIT=none ;;
9458 gtk3 ) with_gtk3=yes
9459 USE_X_TOOLKIT=none ;;
9460 no ) USE_X_TOOLKIT=none ;;
9461 * ) USE_X_TOOLKIT=maybe ;;
9462 esac
9463 ;;
9464 nextstep | none )
9465 HAVE_X_WINDOWS=no
9466 HAVE_X11=no
9467 USE_X_TOOLKIT=none
9468 ;;
9469esac
9470
9471if test "$window_system" = none && test "X$with_x" != "Xno"; then
9472 # Extract the first word of "X", so it can be a program name with args.
9473set dummy X; ac_word=$2
9474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9475$as_echo_n "checking for $ac_word... " >&6; }
9476if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
9477 $as_echo_n "(cached) " >&6
9478else
9479 if test -n "$HAVE_XSERVER"; then
9480 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9481else
9482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9483for as_dir in $PATH
9484do
9485 IFS=$as_save_IFS
9486 test -z "$as_dir" && as_dir=.
9487 for ac_exec_ext in '' $ac_executable_extensions; do
9488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9489 ac_cv_prog_HAVE_XSERVER="true"
9490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9491 break 2
9492 fi
9493done
9494 done
9495IFS=$as_save_IFS
9496
9497 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9498fi
9499fi
9500HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9501if test -n "$HAVE_XSERVER"; then
9502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9503$as_echo "$HAVE_XSERVER" >&6; }
9504else
9505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9506$as_echo "no" >&6; }
9507fi
9508
9509
9510 if test "$HAVE_XSERVER" = true ||
9511 test -n "$DISPLAY" ||
9512 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9513 as_fn_error "You seem to be running X, but no X development libraries
9514were found. You should install the relevant development files for X
9515and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9516sure you have development files for image handling, i.e.
9517tiff, gif, jpeg, png and xpm.
9518If you are sure you want Emacs compiled without X window support, pass
9519 --without-x
9520to configure." "$LINENO" 5
9521 fi
9522fi
9523
9524### If we're using X11, we should use the X menu package.
9525HAVE_MENUS=no
9526case ${HAVE_X11} in
9527 yes ) HAVE_MENUS=yes ;;
9528esac
9529
9530# Does the opsystem file prohibit the use of the GNU malloc?
9531# Assume not, until told otherwise.
9532GNU_MALLOC=yes
9533
9534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
9535$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
9536if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
067d23c9
KY
9537 $as_echo_n "(cached) " >&6
9538else
5476a9a4
GM
9539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9540/* end confdefs.h. */
9541#include <malloc.h>
9542 static void hook (void) {}
9543int
9544main ()
9545{
9546malloc_set_state (malloc_get_state ());
9547 __after_morecore_hook = hook;
9548 __malloc_initialize_hook = hook;
9549 ;
9550 return 0;
9551}
9552_ACEOF
9553if ac_fn_c_try_link "$LINENO"; then :
9554 emacs_cv_var_doug_lea_malloc=yes
9555else
9556 emacs_cv_var_doug_lea_malloc=no
9557fi
9558rm -f core conftest.err conftest.$ac_objext \
9559 conftest$ac_exeext conftest.$ac_ext
9560fi
9561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
9562$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
9563doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
9564
9565
9566system_malloc=no
9567case "$opsys" in
9568 ## darwin ld insists on the use of malloc routines in the System framework.
9569 darwin|sol2-10) system_malloc=yes ;;
9570esac
9571
9572if test "${system_malloc}" = "yes"; then
9573
9574$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
9575
9576 GNU_MALLOC=no
9577 GNU_MALLOC_reason="
9578 (The GNU allocators don't work with this system configuration.)"
9579 GMALLOC_OBJ=
9580 VMLIMIT_OBJ=
9581else
9582 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
9583 VMLIMIT_OBJ=vm-limit.o
9584fi
9585
9586
9587
9588if test "$doug_lea_malloc" = "yes" ; then
9589 if test "$GNU_MALLOC" = yes ; then
9590 GNU_MALLOC_reason="
9591 (Using Doug Lea's new malloc from the GNU C Library.)"
9592 fi
9593
9594$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
9595
9596
9597 ## Use mmap directly for allocating larger buffers.
9598 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
9599 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
9600 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
9601 case "$opsys" in
9602 gnu*) REL_ALLOC=no ;;
9603 esac
9604fi
9605
9606if test x"${REL_ALLOC}" = x; then
9607 REL_ALLOC=${GNU_MALLOC}
9608fi
9609
9610use_mmap_for_buffers=no
9611case "$opsys" in
9612 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
9613esac
9614
9615
9616
9617
9618
9619
9620
9621
9622for ac_func in getpagesize
9623do :
9624 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9625if test "x$ac_cv_func_getpagesize" = x""yes; then :
9626 cat >>confdefs.h <<_ACEOF
9627#define HAVE_GETPAGESIZE 1
9628_ACEOF
9629
9630fi
9631done
9632
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9634$as_echo_n "checking for working mmap... " >&6; }
9635if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
9636 $as_echo_n "(cached) " >&6
9637else
9638 if test "$cross_compiling" = yes; then :
9639 ac_cv_func_mmap_fixed_mapped=no
9640else
9641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9642/* end confdefs.h. */
9643$ac_includes_default
9644/* malloc might have been renamed as rpl_malloc. */
9645#undef malloc
9646
9647/* Thanks to Mike Haertel and Jim Avera for this test.
9648 Here is a matrix of mmap possibilities:
9649 mmap private not fixed
9650 mmap private fixed at somewhere currently unmapped
9651 mmap private fixed at somewhere already mapped
9652 mmap shared not fixed
9653 mmap shared fixed at somewhere currently unmapped
9654 mmap shared fixed at somewhere already mapped
9655 For private mappings, we should verify that changes cannot be read()
9656 back from the file, nor mmap's back from the file at a different
9657 address. (There have been systems where private was not correctly
9658 implemented like the infamous i386 svr4.0, and systems where the
9659 VM page cache was not coherent with the file system buffer cache
9660 like early versions of FreeBSD and possibly contemporary NetBSD.)
9661 For shared mappings, we should conversely verify that changes get
9662 propagated back to all the places they're supposed to be.
9663
9664 Grep wants private fixed already mapped.
9665 The main things grep needs to know about mmap are:
9666 * does it exist and is it safe to write into the mmap'd area
9667 * how to use it (BSD variants) */
9668
9669#include <fcntl.h>
9670#include <sys/mman.h>
9671
9672#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9673char *malloc ();
9674#endif
9675
9676/* This mess was copied from the GNU getpagesize.h. */
9677#ifndef HAVE_GETPAGESIZE
9678# ifdef _SC_PAGESIZE
9679# define getpagesize() sysconf(_SC_PAGESIZE)
9680# else /* no _SC_PAGESIZE */
9681# ifdef HAVE_SYS_PARAM_H
9682# include <sys/param.h>
9683# ifdef EXEC_PAGESIZE
9684# define getpagesize() EXEC_PAGESIZE
9685# else /* no EXEC_PAGESIZE */
9686# ifdef NBPG
9687# define getpagesize() NBPG * CLSIZE
9688# ifndef CLSIZE
9689# define CLSIZE 1
9690# endif /* no CLSIZE */
9691# else /* no NBPG */
9692# ifdef NBPC
9693# define getpagesize() NBPC
9694# else /* no NBPC */
9695# ifdef PAGESIZE
9696# define getpagesize() PAGESIZE
9697# endif /* PAGESIZE */
9698# endif /* no NBPC */
9699# endif /* no NBPG */
9700# endif /* no EXEC_PAGESIZE */
9701# else /* no HAVE_SYS_PARAM_H */
9702# define getpagesize() 8192 /* punt totally */
9703# endif /* no HAVE_SYS_PARAM_H */
9704# endif /* no _SC_PAGESIZE */
9705
9706#endif /* no HAVE_GETPAGESIZE */
9707
9708int
9709main ()
9710{
9711 char *data, *data2, *data3;
9712 const char *cdata2;
9713 int i, pagesize;
9714 int fd, fd2;
9715
9716 pagesize = getpagesize ();
9717
9718 /* First, make a file with some known garbage in it. */
9719 data = (char *) malloc (pagesize);
9720 if (!data)
9721 return 1;
9722 for (i = 0; i < pagesize; ++i)
9723 *(data + i) = rand ();
9724 umask (0);
9725 fd = creat ("conftest.mmap", 0600);
9726 if (fd < 0)
9727 return 2;
9728 if (write (fd, data, pagesize) != pagesize)
9729 return 3;
9730 close (fd);
9731
9732 /* Next, check that the tail of a page is zero-filled. File must have
9733 non-zero length, otherwise we risk SIGBUS for entire page. */
9734 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
9735 if (fd2 < 0)
9736 return 4;
9737 cdata2 = "";
9738 if (write (fd2, cdata2, 1) != 1)
9739 return 5;
9740 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
9741 if (data2 == MAP_FAILED)
9742 return 6;
9743 for (i = 0; i < pagesize; ++i)
9744 if (*(data2 + i))
9745 return 7;
9746 close (fd2);
9747 if (munmap (data2, pagesize))
9748 return 8;
9749
9750 /* Next, try to mmap the file at a fixed address which already has
9751 something else allocated at it. If we can, also make sure that
9752 we see the same garbage. */
9753 fd = open ("conftest.mmap", O_RDWR);
9754 if (fd < 0)
9755 return 9;
9756 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9757 MAP_PRIVATE | MAP_FIXED, fd, 0L))
9758 return 10;
9759 for (i = 0; i < pagesize; ++i)
9760 if (*(data + i) != *(data2 + i))
9761 return 11;
9762
9763 /* Finally, make sure that changes to the mapped area do not
9764 percolate back to the file as seen by read(). (This is a bug on
9765 some variants of i386 svr4.0.) */
9766 for (i = 0; i < pagesize; ++i)
9767 *(data2 + i) = *(data2 + i) + 1;
9768 data3 = (char *) malloc (pagesize);
9769 if (!data3)
9770 return 12;
9771 if (read (fd, data3, pagesize) != pagesize)
9772 return 13;
9773 for (i = 0; i < pagesize; ++i)
9774 if (*(data + i) != *(data3 + i))
9775 return 14;
9776 close (fd);
9777 return 0;
9778}
9779_ACEOF
9780if ac_fn_c_try_run "$LINENO"; then :
9781 ac_cv_func_mmap_fixed_mapped=yes
9782else
9783 ac_cv_func_mmap_fixed_mapped=no
9784fi
9785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9786 conftest.$ac_objext conftest.beam conftest.$ac_ext
9787fi
9788
9789fi
9790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9791$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9792if test $ac_cv_func_mmap_fixed_mapped = yes; then
9793
9794$as_echo "#define HAVE_MMAP 1" >>confdefs.h
9795
9796fi
9797rm -f conftest.mmap conftest.txt
9798
9799if test $use_mmap_for_buffers = yes; then
f199cab1 9800
5476a9a4
GM
9801$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
9802
9803 REL_ALLOC=no
9804fi
9805
9806LIBS="$LIBS_SYSTEM $LIBS"
9807
9808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9809$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
9810if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
9811 $as_echo_n "(cached) " >&6
067d23c9 9812else
5476a9a4
GM
9813 ac_check_lib_save_LIBS=$LIBS
9814LIBS="-ldnet $LIBS"
9815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 9816/* end confdefs.h. */
067d23c9 9817
5476a9a4
GM
9818/* Override any GCC internal prototype to avoid an error.
9819 Use char because int might match the return type of a GCC
9820 builtin and then its argument prototype would still apply. */
9821#ifdef __cplusplus
9822extern "C"
9823#endif
9824char dnet_ntoa ();
9825int
9826main ()
f199cab1 9827{
5476a9a4
GM
9828return dnet_ntoa ();
9829 ;
9830 return 0;
f199cab1 9831}
5476a9a4
GM
9832_ACEOF
9833if ac_fn_c_try_link "$LINENO"; then :
9834 ac_cv_lib_dnet_dnet_ntoa=yes
9835else
9836 ac_cv_lib_dnet_dnet_ntoa=no
9837fi
9838rm -f core conftest.err conftest.$ac_objext \
9839 conftest$ac_exeext conftest.$ac_ext
9840LIBS=$ac_check_lib_save_LIBS
9841fi
9842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9843$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
9844if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
9845 cat >>confdefs.h <<_ACEOF
9846#define HAVE_LIBDNET 1
9847_ACEOF
9848
9849 LIBS="-ldnet $LIBS"
9850
9851fi
9852
9853
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
9855$as_echo_n "checking for main in -lXbsd... " >&6; }
9856if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
9857 $as_echo_n "(cached) " >&6
9858else
9859 ac_check_lib_save_LIBS=$LIBS
9860LIBS="-lXbsd $LIBS"
9861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9862/* end confdefs.h. */
9863
9864
9865int
9866main ()
f199cab1 9867{
5476a9a4
GM
9868return main ();
9869 ;
9870 return 0;
f199cab1 9871}
5476a9a4
GM
9872_ACEOF
9873if ac_fn_c_try_link "$LINENO"; then :
9874 ac_cv_lib_Xbsd_main=yes
9875else
9876 ac_cv_lib_Xbsd_main=no
9877fi
9878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext conftest.$ac_ext
9880LIBS=$ac_check_lib_save_LIBS
9881fi
9882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
9883$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
9884if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
9885 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
9886fi
9887
9888
9889LIB_PTHREAD=
9890
9891
9892
9893if test "$ac_cv_header_pthread_h"; then
9894 if test "$GMALLOC_OBJ" = gmalloc.o; then
9895 emacs_pthread_function=pthread_atfork
9896 else
9897 emacs_pthread_function=pthread_self
9898 fi
9899 as_ac_Lib=`$as_echo "ac_cv_lib_pthread_$emacs_pthread_function" | $as_tr_sh`
9900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $emacs_pthread_function in -lpthread" >&5
9901$as_echo_n "checking for $emacs_pthread_function in -lpthread... " >&6; }
9902if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
9903 $as_echo_n "(cached) " >&6
9904else
9905 ac_check_lib_save_LIBS=$LIBS
9906LIBS="-lpthread $LIBS"
9907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9908/* end confdefs.h. */
9909
9910/* Override any GCC internal prototype to avoid an error.
9911 Use char because int might match the return type of a GCC
9912 builtin and then its argument prototype would still apply. */
9913#ifdef __cplusplus
9914extern "C"
9915#endif
9916char $emacs_pthread_function ();
9917int
9918main ()
f199cab1 9919{
5476a9a4
GM
9920return $emacs_pthread_function ();
9921 ;
9922 return 0;
f199cab1 9923}
5476a9a4
GM
9924_ACEOF
9925if ac_fn_c_try_link "$LINENO"; then :
9926 eval "$as_ac_Lib=yes"
9927else
9928 eval "$as_ac_Lib=no"
9929fi
9930rm -f core conftest.err conftest.$ac_objext \
9931 conftest$ac_exeext conftest.$ac_ext
9932LIBS=$ac_check_lib_save_LIBS
9933fi
9934eval ac_res=\$$as_ac_Lib
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
9936$as_echo "$ac_res" >&6; }
9937eval as_val=\$$as_ac_Lib
9938 if test "x$as_val" = x""yes; then :
9939 HAVE_PTHREAD=yes
9940fi
9941
9942fi
9943if test "$HAVE_PTHREAD" = yes; then
9944 case "${canonical}" in
9945 *-hpux*) ;;
9946 *) LIB_PTHREAD="-lpthread"
9947 LIBS="$LIB_PTHREAD $LIBS" ;;
9948 esac
9949
9950$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
9951
9952fi
9953
9954
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
9956$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
9957if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
9958 $as_echo_n "(cached) " >&6
9959else
9960 ac_check_lib_save_LIBS=$LIBS
9961LIBS="-lpthreads $LIBS"
9962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9963/* end confdefs.h. */
9964
9965/* Override any GCC internal prototype to avoid an error.
9966 Use char because int might match the return type of a GCC
9967 builtin and then its argument prototype would still apply. */
9968#ifdef __cplusplus
9969extern "C"
f199cab1 9970#endif
5476a9a4
GM
9971char cma_open ();
9972int
9973main ()
9974{
9975return cma_open ();
9976 ;
9977 return 0;
f199cab1 9978}
5476a9a4
GM
9979_ACEOF
9980if ac_fn_c_try_link "$LINENO"; then :
9981 ac_cv_lib_pthreads_cma_open=yes
9982else
9983 ac_cv_lib_pthreads_cma_open=no
9984fi
9985rm -f core conftest.err conftest.$ac_objext \
9986 conftest$ac_exeext conftest.$ac_ext
9987LIBS=$ac_check_lib_save_LIBS
9988fi
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
9990$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
9991if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
9992 cat >>confdefs.h <<_ACEOF
9993#define HAVE_LIBPTHREADS 1
9994_ACEOF
9995
9996 LIBS="-lpthreads $LIBS"
9997
9998fi
9999
10000
10001## Note: when using cpp in s/aix4.2.h, this definition depended on
10002## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10003## the system file was sourced. Hence the value of LIBS_SYSTEM
10004## added to LIBS in configure would never contain the pthreads part,
10005## but the value used in Makefiles might. FIXME?
10006##
10007## -lpthreads seems to be necessary for Xlib in X11R6, and should
10008## be harmless on older versions of X where it happens to exist.
10009test "$opsys" = "aix4-2" && \
10010 test $ac_cv_lib_pthreads_cma_open = yes && \
10011 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10012
10013
10014case ${host_os} in
10015aix*)
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10017$as_echo_n "checking for -bbigtoc option... " >&6; }
10018if test "${gdb_cv_bigtoc+set}" = set; then :
10019 $as_echo_n "(cached) " >&6
10020else
10021
10022 case $GCC in
10023 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10024 *) gdb_cv_bigtoc=-bbigtoc ;;
10025 esac
067d23c9 10026
5476a9a4
GM
10027 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10029/* end confdefs.h. */
067d23c9
KY
10030
10031int
10032main ()
10033{
5476a9a4
GM
10034int i;
10035 ;
10036 return 0;
10037}
10038_ACEOF
10039if ac_fn_c_try_link "$LINENO"; then :
067d23c9 10040
5476a9a4
GM
10041else
10042 gdb_cv_bigtoc=
10043fi
10044rm -f core conftest.err conftest.$ac_objext \
10045 conftest$ac_exeext conftest.$ac_ext
067d23c9 10046
5476a9a4
GM
10047fi
10048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10049$as_echo "$gdb_cv_bigtoc" >&6; }
10050 ;;
10051esac
067d23c9 10052
5476a9a4
GM
10053# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10054# used for the tests that follow. We set them back to REAL_CFLAGS and
10055# REAL_CPPFLAGS later on.
067d23c9 10056
5476a9a4
GM
10057REAL_CFLAGS="$CFLAGS"
10058REAL_CPPFLAGS="$CPPFLAGS"
10059
10060if test "${HAVE_X11}" = "yes"; then
10061 DEFS="$C_SWITCH_X_SITE $DEFS"
10062 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10063 LIBS="-lX11 $LIBS"
10064 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10065 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10066
10067 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10068 # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
10069 # but it's more convenient here to set LD_RUN_PATH since this
10070 # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
10071 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10072 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10073 export LD_RUN_PATH
10074 fi
10075
10076 if test "${opsys}" = "gnu-linux"; then
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10078$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10080/* end confdefs.h. */
067d23c9 10081
5476a9a4
GM
10082int
10083main ()
10084{
10085XOpenDisplay ("foo");
f199cab1 10086 ;
067d23c9
KY
10087 return 0;
10088}
10089_ACEOF
5476a9a4
GM
10090if ac_fn_c_try_link "$LINENO"; then :
10091 xgnu_linux_first_failure=no
067d23c9 10092else
5476a9a4 10093 xgnu_linux_first_failure=yes
067d23c9 10094fi
5476a9a4
GM
10095rm -f core conftest.err conftest.$ac_objext \
10096 conftest$ac_exeext conftest.$ac_ext
10097 if test "${xgnu_linux_first_failure}" = "yes"; then
10098 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10099 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10100 OLD_CPPFLAGS="$CPPFLAGS"
10101 OLD_LIBS="$LIBS"
10102 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10103 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10104 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10105 LIBS="$LIBS -b i486-linuxaout"
10106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10107/* end confdefs.h. */
067d23c9 10108
5476a9a4
GM
10109int
10110main ()
10111{
10112XOpenDisplay ("foo");
10113 ;
10114 return 0;
10115}
10116_ACEOF
10117if ac_fn_c_try_link "$LINENO"; then :
10118 xgnu_linux_second_failure=no
10119else
10120 xgnu_linux_second_failure=yes
067d23c9 10121fi
5476a9a4
GM
10122rm -f core conftest.err conftest.$ac_objext \
10123 conftest$ac_exeext conftest.$ac_ext
10124 if test "${xgnu_linux_second_failure}" = "yes"; then
10125 # If we get the same failure with -b, there is no use adding -b.
10126 # So take it out. This plays safe.
10127 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10128 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10129 CPPFLAGS="$OLD_CPPFLAGS"
10130 LIBS="$OLD_LIBS"
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
10133 else
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10135$as_echo "yes" >&6; }
10136 fi
0eb4e0df 10137 else
5476a9a4
GM
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140 fi
10141 fi
0eb4e0df 10142
5476a9a4
GM
10143 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10144 # header files included from there.
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10146$as_echo_n "checking for Xkb... " >&6; }
0eb4e0df
GM
10147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10148/* end confdefs.h. */
5476a9a4
GM
10149#include <X11/Xlib.h>
10150#include <X11/XKBlib.h>
0eb4e0df
GM
10151int
10152main ()
10153{
5476a9a4 10154XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
0eb4e0df
GM
10155 ;
10156 return 0;
10157}
10158_ACEOF
5476a9a4
GM
10159if ac_fn_c_try_link "$LINENO"; then :
10160 emacs_xkb=yes
0eb4e0df 10161else
5476a9a4 10162 emacs_xkb=no
0eb4e0df 10163fi
5476a9a4
GM
10164rm -f core conftest.err conftest.$ac_objext \
10165 conftest$ac_exeext conftest.$ac_ext
10166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10167$as_echo "$emacs_xkb" >&6; }
10168 if test $emacs_xkb = yes; then
1abfdc54 10169
5476a9a4 10170$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
1abfdc54 10171
e1fefc61 10172 fi
1abfdc54 10173
5476a9a4
GM
10174 for ac_func in XrmSetDatabase XScreenResourceString \
10175XScreenNumberOfScreen
10176do :
10177 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10178ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10179eval as_val=\$$as_ac_var
10180 if test "x$as_val" = x""yes; then :
10181 cat >>confdefs.h <<_ACEOF
10182#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
f199cab1 10183_ACEOF
1abfdc54 10184
5476a9a4
GM
10185fi
10186done
1abfdc54 10187
5476a9a4 10188fi
1abfdc54 10189
5476a9a4
GM
10190if test "${window_system}" = "x11"; then
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10192$as_echo_n "checking X11 version 6... " >&6; }
10193 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
10194 $as_echo_n "(cached) " >&6
10195else
5476a9a4 10196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 10197/* end confdefs.h. */
5476a9a4 10198#include <X11/Xlib.h>
067d23c9
KY
10199int
10200main ()
10201{
5476a9a4
GM
10202#if XlibSpecificationRelease < 6
10203fail;
10204#endif
10205
067d23c9
KY
10206 ;
10207 return 0;
10208}
10209_ACEOF
5476a9a4
GM
10210if ac_fn_c_try_link "$LINENO"; then :
10211 emacs_cv_x11_version_6=yes
10212else
10213 emacs_cv_x11_version_6=no
10214fi
10215rm -f core conftest.err conftest.$ac_objext \
10216 conftest$ac_exeext conftest.$ac_ext
067d23c9 10217fi
f199cab1 10218
5476a9a4
GM
10219 if test $emacs_cv_x11_version_6 = yes; then
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10221$as_echo "6 or newer" >&6; }
f199cab1 10222
5476a9a4 10223$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f199cab1
GM
10224
10225
5476a9a4 10226$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
f199cab1 10227
5476a9a4
GM
10228 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10229 ## XIM support.
10230 case "$opsys" in
10231 sol2-*) : ;;
10232 *)
10233$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
f199cab1 10234
5476a9a4
GM
10235 ;;
10236 esac
10237 else
10238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10239$as_echo "before 6" >&6; }
10240 fi
10241fi
f199cab1 10242
067d23c9 10243
5476a9a4
GM
10244### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10245HAVE_RSVG=no
10246if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
10247 if test "${with_rsvg}" != "no"; then
10248 RSVG_REQUIRED=2.11.0
10249 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
067d23c9 10250
f199cab1 10251
5476a9a4 10252 succeeded=no
067d23c9 10253
5476a9a4
GM
10254 if test "$PKG_CONFIG" = "no" ; then
10255 :
10256 else
10257 PKG_CONFIG_MIN_VERSION=0.9.0
10258 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10260$as_echo_n "checking for $RSVG_MODULE... " >&6; }
f199cab1 10261
5476a9a4
GM
10262 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5 &&
10263 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE" 2>&5` &&
10264 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE" 2>&5`; then
10265 edit_cflags="
10266 s,///*,/,g
10267 s/^/ /
10268 s/ -I/ $isystem/g
10269 s/^ //
10270 "
10271 RSVG_CFLAGS=`$as_echo "$RSVG_CFLAGS" | sed -e "$edit_cflags"`
10272 RSVG_LIBS=`$as_echo "$RSVG_LIBS" | sed -e 's,///*,/,g'`
10273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&5
10274$as_echo "yes CFLAGS='$RSVG_CFLAGS' LIBS='$RSVG_LIBS'" >&6; }
10275 succeeded=yes
10276 else
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278$as_echo "no" >&6; }
10279 RSVG_CFLAGS=""
10280 RSVG_LIBS=""
10281 ## If we have a custom action on failure, don't print errors, but
10282 ## do set a variable so people can do so.
10283 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
f199cab1 10284
5476a9a4 10285 fi
067d23c9 10286
067d23c9 10287
067d23c9 10288
f199cab1 10289 else
5476a9a4
GM
10290 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10291 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10292 fi
5476a9a4
GM
10293 fi
10294
10295 if test $succeeded = yes; then
10296 HAVE_RSVG=yes
10297 else
10298 :
10299 fi
067d23c9 10300
067d23c9 10301
067d23c9 10302
f199cab1 10303
5476a9a4 10304 if test $HAVE_RSVG = yes; then
f199cab1 10305
5476a9a4
GM
10306$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10307
10308 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10309 LIBS="$RSVG_LIBS $LIBS"
10310 fi
f199cab1 10311 fi
5476a9a4 10312fi
f199cab1 10313
5476a9a4
GM
10314HAVE_IMAGEMAGICK=no
10315if test "${HAVE_X11}" = "yes"; then
10316 if test "${with_imagemagick}" != "no"; then
10317 ## 6.2.8 is the earliest version known to work, but earlier versions
10318 ## might work - let us know if you find one.
10319 ## 6.0.7 does not work. See bug#7955.
10320 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
f199cab1 10321
5476a9a4 10322 succeeded=no
f199cab1 10323
5476a9a4
GM
10324 if test "$PKG_CONFIG" = "no" ; then
10325 :
10326 else
10327 PKG_CONFIG_MIN_VERSION=0.9.0
10328 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10330$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
f199cab1 10331
5476a9a4
GM
10332 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5 &&
10333 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE" 2>&5` &&
10334 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE" 2>&5`; then
10335 edit_cflags="
10336 s,///*,/,g
10337 s/^/ /
10338 s/ -I/ $isystem/g
10339 s/^ //
10340 "
10341 IMAGEMAGICK_CFLAGS=`$as_echo "$IMAGEMAGICK_CFLAGS" | sed -e "$edit_cflags"`
10342 IMAGEMAGICK_LIBS=`$as_echo "$IMAGEMAGICK_LIBS" | sed -e 's,///*,/,g'`
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&5
10344$as_echo "yes CFLAGS='$IMAGEMAGICK_CFLAGS' LIBS='$IMAGEMAGICK_LIBS'" >&6; }
10345 succeeded=yes
10346 else
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348$as_echo "no" >&6; }
10349 IMAGEMAGICK_CFLAGS=""
10350 IMAGEMAGICK_LIBS=""
10351 ## If we have a custom action on failure, don't print errors, but
10352 ## do set a variable so people can do so.
10353 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
f199cab1 10354
5476a9a4 10355 fi
f199cab1 10356
f199cab1 10357
f199cab1 10358
5476a9a4
GM
10359 else
10360 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10361 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10362 fi
f199cab1 10363 fi
5476a9a4
GM
10364
10365 if test $succeeded = yes; then
10366 HAVE_IMAGEMAGICK=yes
f199cab1 10367 else
5476a9a4 10368 :
067d23c9
KY
10369 fi
10370
f199cab1 10371
067d23c9 10372
f199cab1 10373
5476a9a4 10374 if test $HAVE_IMAGEMAGICK = yes; then
067d23c9 10375
5476a9a4 10376$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
f199cab1 10377
5476a9a4
GM
10378 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10379 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10380 for ac_func in MagickExportImagePixels MagickMergeImageLayers
10381do :
10382 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10383ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10384eval as_val=\$$as_ac_var
10385 if test "x$as_val" = x""yes; then :
10386 cat >>confdefs.h <<_ACEOF
10387#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
067d23c9 10388_ACEOF
f199cab1
GM
10389
10390fi
5476a9a4
GM
10391done
10392
067d23c9
KY
10393 fi
10394 fi
5476a9a4 10395fi
067d23c9 10396
f199cab1 10397
5476a9a4
GM
10398HAVE_GTK=no
10399GTK_OBJ=
10400if test "${with_gtk3}" = "yes"; then
10401 GLIB_REQUIRED=2.28
10402 GTK_REQUIRED=3.0
10403 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1
GM
10404
10405
5476a9a4 10406 succeeded=no
f199cab1 10407
5476a9a4
GM
10408 if test "$PKG_CONFIG" = "no" ; then
10409 pkg_check_gtk=no
10410 else
10411 PKG_CONFIG_MIN_VERSION=0.9.0
10412 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10414$as_echo_n "checking for $GTK_MODULES... " >&6; }
f199cab1 10415
5476a9a4
GM
10416 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10417 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10418 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10419 edit_cflags="
10420 s,///*,/,g
10421 s/^/ /
10422 s/ -I/ $isystem/g
10423 s/^ //
10424 "
10425 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10426 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10428$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10429 succeeded=yes
10430 else
10431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10432$as_echo "no" >&6; }
10433 GTK_CFLAGS=""
10434 GTK_LIBS=""
10435 ## If we have a custom action on failure, don't print errors, but
10436 ## do set a variable so people can do so.
10437 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
f199cab1 10438
5476a9a4 10439 fi
f199cab1 10440
f199cab1 10441
f199cab1 10442
5476a9a4
GM
10443 else
10444 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10445 echo "*** See http://www.freedesktop.org/software/pkgconfig"
f199cab1 10446 fi
5476a9a4 10447 fi
067d23c9 10448
5476a9a4
GM
10449 if test $succeeded = yes; then
10450 pkg_check_gtk=yes
10451 else
10452 pkg_check_gtk=no
10453 fi
067d23c9 10454
5476a9a4
GM
10455 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10456 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9
KY
10457 fi
10458
5476a9a4 10459$as_echo "#define HAVE_GTK3 1" >>confdefs.h
067d23c9 10460
5476a9a4
GM
10461 GTK_OBJ=emacsgtkfixed.o
10462fi
067d23c9 10463
5476a9a4
GM
10464if test "$pkg_check_gtk" != "yes"; then
10465 HAVE_GTK=no
10466if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
10467 GLIB_REQUIRED=2.10
10468 GTK_REQUIRED=2.10
10469 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
f199cab1 10470
5476a9a4
GM
10471
10472 succeeded=no
10473
10474 if test "$PKG_CONFIG" = "no" ; then
10475 pkg_check_gtk=no
10476 else
10477 PKG_CONFIG_MIN_VERSION=0.9.0
10478 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10480$as_echo_n "checking for $GTK_MODULES... " >&6; }
10481
10482 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5 &&
10483 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES" 2>&5` &&
10484 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES" 2>&5`; then
10485 edit_cflags="
10486 s,///*,/,g
10487 s/^/ /
10488 s/ -I/ $isystem/g
10489 s/^ //
10490 "
10491 GTK_CFLAGS=`$as_echo "$GTK_CFLAGS" | sed -e "$edit_cflags"`
10492 GTK_LIBS=`$as_echo "$GTK_LIBS" | sed -e 's,///*,/,g'`
10493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&5
10494$as_echo "yes CFLAGS='$GTK_CFLAGS' LIBS='$GTK_LIBS'" >&6; }
10495 succeeded=yes
10496 else
10497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10498$as_echo "no" >&6; }
10499 GTK_CFLAGS=""
10500 GTK_LIBS=""
10501 ## If we have a custom action on failure, don't print errors, but
10502 ## do set a variable so people can do so.
10503 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10504
10505 fi
10506
10507
10508
10509 else
10510 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10511 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10512 fi
10513 fi
10514
10515 if test $succeeded = yes; then
10516 pkg_check_gtk=yes
10517 else
10518 pkg_check_gtk=no
10519 fi
10520
10521 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10522 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
10523 fi
067d23c9 10524fi
067d23c9
KY
10525fi
10526
5476a9a4
GM
10527if test x"$pkg_check_gtk" = xyes; then
10528
10529
10530
10531 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
10532 CFLAGS="$CFLAGS $GTK_CFLAGS"
10533 LIBS="$GTK_LIBS $LIBS"
10534 GTK_COMPILES=no
10535 for ac_func in gtk_main
10536do :
10537 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
10538if test "x$ac_cv_func_gtk_main" = x""yes; then :
10539 cat >>confdefs.h <<_ACEOF
10540#define HAVE_GTK_MAIN 1
10541_ACEOF
10542 GTK_COMPILES=yes
f199cab1 10543fi
5476a9a4 10544done
067d23c9 10545
5476a9a4
GM
10546 if test "${GTK_COMPILES}" != "yes"; then
10547 if test "$USE_X_TOOLKIT" != "maybe"; then
10548 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
10549 fi
10550 else
10551 HAVE_GTK=yes
10552
10553$as_echo "#define USE_GTK 1" >>confdefs.h
067d23c9 10554
5476a9a4
GM
10555 GTK_OBJ="gtkutil.o $GTK_OBJ"
10556 USE_X_TOOLKIT=none
10557 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
10558 :
10559 else
10560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
10561 closing open displays. This is no problem if you just use
10562 one display, but if you use more than one and close one of them
10563 Emacs may crash." >&5
10564$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
10565 closing open displays. This is no problem if you just use
10566 one display, but if you use more than one and close one of them
10567 Emacs may crash." >&2;}
10568 sleep 3
10569 fi
067d23c9
KY
10570 fi
10571
5476a9a4 10572fi
067d23c9
KY
10573
10574
10575
5476a9a4 10576if test "${HAVE_GTK}" = "yes"; then
067d23c9 10577
5476a9a4
GM
10578 if test "$with_toolkit_scroll_bars" != no; then
10579 with_toolkit_scroll_bars=yes
10580 fi
067d23c9 10581
5476a9a4
GM
10582 HAVE_GTK_FILE_SELECTION=no
10583 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
10584#include <gtk/gtk.h>
10585"
10586if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
10587 HAVE_GTK_FILE_SELECTION=yes
10588else
10589 HAVE_GTK_FILE_SELECTION=no
10590fi
067d23c9 10591
5476a9a4
GM
10592 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
10593 for ac_func in gtk_file_selection_new
10594do :
10595 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
10596if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
10597 cat >>confdefs.h <<_ACEOF
10598#define HAVE_GTK_FILE_SELECTION_NEW 1
f199cab1 10599_ACEOF
067d23c9 10600
f199cab1 10601fi
5476a9a4
GM
10602done
10603
f199cab1 10604 fi
067d23c9 10605
067d23c9 10606
5476a9a4
GM
10607 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
10608 gtk_dialog_get_action_area gtk_widget_get_sensitive \
10609 gtk_widget_get_mapped gtk_adjustment_get_page_size \
10610 gtk_orientable_set_orientation \
10611 gtk_window_set_has_resize_grip
10612do :
10613 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10614ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10615eval as_val=\$$as_ac_var
10616 if test "x$as_val" = x""yes; then :
10617 cat >>confdefs.h <<_ACEOF
10618#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10619_ACEOF
067d23c9 10620
5476a9a4
GM
10621fi
10622done
067d23c9 10623
5476a9a4 10624fi
067d23c9 10625
5476a9a4
GM
10626HAVE_DBUS=no
10627DBUS_OBJ=
10628if test "${with_dbus}" = "yes"; then
067d23c9 10629
5476a9a4 10630 succeeded=no
067d23c9 10631
5476a9a4
GM
10632 if test "$PKG_CONFIG" = "no" ; then
10633 HAVE_DBUS=no
f199cab1 10634 else
5476a9a4
GM
10635 PKG_CONFIG_MIN_VERSION=0.9.0
10636 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
10638$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
067d23c9 10639
5476a9a4
GM
10640 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5 &&
10641 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0" 2>&5` &&
10642 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0" 2>&5`; then
10643 edit_cflags="
10644 s,///*,/,g
10645 s/^/ /
10646 s/ -I/ $isystem/g
10647 s/^ //
10648 "
10649 DBUS_CFLAGS=`$as_echo "$DBUS_CFLAGS" | sed -e "$edit_cflags"`
10650 DBUS_LIBS=`$as_echo "$DBUS_LIBS" | sed -e 's,///*,/,g'`
10651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&5
10652$as_echo "yes CFLAGS='$DBUS_CFLAGS' LIBS='$DBUS_LIBS'" >&6; }
10653 succeeded=yes
10654 else
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10656$as_echo "no" >&6; }
10657 DBUS_CFLAGS=""
10658 DBUS_LIBS=""
10659 ## If we have a custom action on failure, don't print errors, but
10660 ## do set a variable so people can do so.
10661 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
067d23c9 10662
5476a9a4 10663 fi
067d23c9 10664
15f79fcd 10665
067d23c9 10666
5476a9a4
GM
10667 else
10668 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10669 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10670 fi
067d23c9 10671 fi
067d23c9 10672
5476a9a4
GM
10673 if test $succeeded = yes; then
10674 HAVE_DBUS=yes
f199cab1 10675 else
5476a9a4 10676 HAVE_DBUS=no
f199cab1 10677 fi
067d23c9 10678
5476a9a4
GM
10679 if test "$HAVE_DBUS" = yes; then
10680 LIBS="$LIBS $DBUS_LIBS"
067d23c9 10681
5476a9a4 10682$as_echo "#define HAVE_DBUS 1" >>confdefs.h
067d23c9 10683
5476a9a4
GM
10684 for ac_func in dbus_watch_get_unix_fd \
10685 dbus_type_is_valid \
10686 dbus_validate_bus_name \
10687 dbus_validate_path \
10688 dbus_validate_interface \
10689 dbus_validate_member
10690do :
10691 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10692ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10693eval as_val=\$$as_ac_var
10694 if test "x$as_val" = x""yes; then :
10695 cat >>confdefs.h <<_ACEOF
10696#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10697_ACEOF
067d23c9 10698
5476a9a4
GM
10699fi
10700done
067d23c9 10701
5476a9a4
GM
10702 DBUS_OBJ=dbusbind.o
10703 fi
10704fi
067d23c9
KY
10705
10706
5476a9a4
GM
10707HAVE_GSETTINGS=no
10708if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
067d23c9 10709
5476a9a4 10710 succeeded=no
067d23c9 10711
5476a9a4
GM
10712 if test "$PKG_CONFIG" = "no" ; then
10713 HAVE_GSETTINGS=no
10714 else
10715 PKG_CONFIG_MIN_VERSION=0.9.0
10716 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
10718$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
0afb4571 10719
5476a9a4
GM
10720 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5 &&
10721 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>&5` &&
10722 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 2>&5`; then
10723 edit_cflags="
10724 s,///*,/,g
10725 s/^/ /
10726 s/ -I/ $isystem/g
10727 s/^ //
10728 "
10729 GSETTINGS_CFLAGS=`$as_echo "$GSETTINGS_CFLAGS" | sed -e "$edit_cflags"`
10730 GSETTINGS_LIBS=`$as_echo "$GSETTINGS_LIBS" | sed -e 's,///*,/,g'`
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&5
10732$as_echo "yes CFLAGS='$GSETTINGS_CFLAGS' LIBS='$GSETTINGS_LIBS'" >&6; }
10733 succeeded=yes
10734 else
10735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10736$as_echo "no" >&6; }
10737 GSETTINGS_CFLAGS=""
10738 GSETTINGS_LIBS=""
10739 ## If we have a custom action on failure, don't print errors, but
10740 ## do set a variable so people can do so.
10741 GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"`
0afb4571 10742
5476a9a4 10743 fi
067d23c9
KY
10744
10745
10746
10747 else
5476a9a4
GM
10748 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10749 echo "*** See http://www.freedesktop.org/software/pkgconfig"
067d23c9 10750 fi
5476a9a4 10751 fi
067d23c9 10752
5476a9a4
GM
10753 if test $succeeded = yes; then
10754 HAVE_GSETTINGS=yes
10755 else
10756 HAVE_GSETTINGS=no
10757 fi
f199cab1 10758
5476a9a4 10759 if test "$HAVE_GSETTINGS" = "yes"; then
f199cab1 10760
5476a9a4 10761$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
f199cab1 10762
5476a9a4
GM
10763 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
10764 SETTINGS_LIBS="$GSETTINGS_LIBS"
10765 fi
10766fi
067d23c9 10767
5476a9a4
GM
10768HAVE_GCONF=no
10769if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9 10770
5476a9a4 10771 succeeded=no
067d23c9 10772
5476a9a4
GM
10773 if test "$PKG_CONFIG" = "no" ; then
10774 HAVE_GCONF=no
10775 else
10776 PKG_CONFIG_MIN_VERSION=0.9.0
10777 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
10779$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
067d23c9 10780
5476a9a4
GM
10781 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5 &&
10782 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13" 2>&5` &&
10783 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13" 2>&5`; then
10784 edit_cflags="
10785 s,///*,/,g
10786 s/^/ /
10787 s/ -I/ $isystem/g
10788 s/^ //
10789 "
10790 GCONF_CFLAGS=`$as_echo "$GCONF_CFLAGS" | sed -e "$edit_cflags"`
10791 GCONF_LIBS=`$as_echo "$GCONF_LIBS" | sed -e 's,///*,/,g'`
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&5
10793$as_echo "yes CFLAGS='$GCONF_CFLAGS' LIBS='$GCONF_LIBS'" >&6; }
10794 succeeded=yes
10795 else
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10797$as_echo "no" >&6; }
10798 GCONF_CFLAGS=""
10799 GCONF_LIBS=""
10800 ## If we have a custom action on failure, don't print errors, but
10801 ## do set a variable so people can do so.
10802 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
067d23c9 10803
5476a9a4 10804 fi
f199cab1 10805
f199cab1
GM
10806
10807
5476a9a4
GM
10808 else
10809 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10810 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10811 fi
10812 fi
f199cab1 10813
5476a9a4
GM
10814 if test $succeeded = yes; then
10815 HAVE_GCONF=yes
10816 else
10817 HAVE_GCONF=no
10818 fi
f199cab1 10819
5476a9a4 10820 if test "$HAVE_GCONF" = yes; then
f199cab1 10821
5476a9a4 10822$as_echo "#define HAVE_GCONF 1" >>confdefs.h
f199cab1 10823
5476a9a4
GM
10824 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
10825 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
10826 fi
10827fi
f199cab1 10828
5476a9a4
GM
10829if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
10830 SAVE_CFLAGS="$CFLAGS"
10831 SAVE_LIBS="$LIBS"
10832 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
10833 LIBS="$SETTINGS_LIBS $LIBS"
10834 for ac_func in g_type_init
10835do :
10836 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
10837if test "x$ac_cv_func_g_type_init" = x""yes; then :
10838 cat >>confdefs.h <<_ACEOF
10839#define HAVE_G_TYPE_INIT 1
067d23c9 10840_ACEOF
067d23c9 10841
5476a9a4
GM
10842fi
10843done
067d23c9 10844
5476a9a4
GM
10845 CFLAGS="$SAVE_CFLAGS"
10846 LIBS="$SAVE_LIBS"
10847fi
067d23c9 10848
067d23c9 10849
f199cab1 10850
067d23c9 10851
5476a9a4
GM
10852HAVE_LIBSELINUX=no
10853LIBSELINUX_LIBS=
10854if test "${with_selinux}" = "yes"; then
10855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
10856$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
10857if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
10858 $as_echo_n "(cached) " >&6
10859else
10860 ac_check_lib_save_LIBS=$LIBS
10861LIBS="-lselinux $LIBS"
10862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10863/* end confdefs.h. */
067d23c9 10864
5476a9a4
GM
10865/* Override any GCC internal prototype to avoid an error.
10866 Use char because int might match the return type of a GCC
10867 builtin and then its argument prototype would still apply. */
10868#ifdef __cplusplus
10869extern "C"
f199cab1 10870#endif
5476a9a4 10871char lgetfilecon ();
f199cab1
GM
10872int
10873main ()
10874{
5476a9a4 10875return lgetfilecon ();
f199cab1
GM
10876 ;
10877 return 0;
10878}
10879_ACEOF
5476a9a4
GM
10880if ac_fn_c_try_link "$LINENO"; then :
10881 ac_cv_lib_selinux_lgetfilecon=yes
10882else
10883 ac_cv_lib_selinux_lgetfilecon=no
f199cab1 10884fi
5476a9a4
GM
10885rm -f core conftest.err conftest.$ac_objext \
10886 conftest$ac_exeext conftest.$ac_ext
10887LIBS=$ac_check_lib_save_LIBS
10888fi
10889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
10890$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
10891if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
10892 HAVE_LIBSELINUX=yes
10893else
10894 HAVE_LIBSELINUX=no
067d23c9
KY
10895fi
10896
5476a9a4 10897 if test "$HAVE_LIBSELINUX" = yes; then
067d23c9 10898
5476a9a4 10899$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
067d23c9 10900
5476a9a4
GM
10901 LIBSELINUX_LIBS=-lselinux
10902 fi
f199cab1 10903fi
067d23c9 10904
067d23c9 10905
5476a9a4
GM
10906HAVE_GNUTLS=no
10907HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
10908if test "${with_gnutls}" = "yes" ; then
067d23c9 10909
5476a9a4 10910 succeeded=no
067d23c9 10911
5476a9a4
GM
10912 if test "$PKG_CONFIG" = "no" ; then
10913 HAVE_GNUTLS=no
10914 else
10915 PKG_CONFIG_MIN_VERSION=0.9.0
10916 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.6" >&5
10918$as_echo_n "checking for gnutls >= 2.6.6... " >&6; }
067d23c9 10919
5476a9a4
GM
10920 if $PKG_CONFIG --exists "gnutls >= 2.6.6" 2>&5 &&
10921 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.6" 2>&5` &&
10922 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.6" 2>&5`; then
10923 edit_cflags="
10924 s,///*,/,g
10925 s/^/ /
10926 s/ -I/ $isystem/g
10927 s/^ //
10928 "
10929 LIBGNUTLS_CFLAGS=`$as_echo "$LIBGNUTLS_CFLAGS" | sed -e "$edit_cflags"`
10930 LIBGNUTLS_LIBS=`$as_echo "$LIBGNUTLS_LIBS" | sed -e 's,///*,/,g'`
10931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&5
10932$as_echo "yes CFLAGS='$LIBGNUTLS_CFLAGS' LIBS='$LIBGNUTLS_LIBS'" >&6; }
10933 succeeded=yes
10934 else
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
10937 LIBGNUTLS_CFLAGS=""
10938 LIBGNUTLS_LIBS=""
10939 ## If we have a custom action on failure, don't print errors, but
10940 ## do set a variable so people can do so.
10941 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.6"`
067d23c9 10942
5476a9a4 10943 fi
067d23c9 10944
067d23c9 10945
067d23c9 10946
5476a9a4
GM
10947 else
10948 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10949 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10950 fi
10951 fi
067d23c9 10952
5476a9a4
GM
10953 if test $succeeded = yes; then
10954 HAVE_GNUTLS=yes
10955 else
10956 HAVE_GNUTLS=no
10957 fi
067d23c9 10958
5476a9a4 10959 if test "${HAVE_GNUTLS}" = "yes"; then
067d23c9 10960
5476a9a4 10961$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
067d23c9 10962
5476a9a4 10963 fi
f199cab1 10964
5476a9a4
GM
10965 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
10966 LIBS="$LIBGNUTLS_LIBS $LIBS"
10967 for ac_func in gnutls_certificate_set_verify_function
10968do :
10969 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
10970if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
10971 cat >>confdefs.h <<_ACEOF
10972#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
f199cab1 10973_ACEOF
5476a9a4
GM
10974 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
10975fi
10976done
067d23c9
KY
10977
10978
5476a9a4
GM
10979 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
10980
10981$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
f527bd02 10982
f199cab1 10983 fi
5476a9a4 10984fi
f527bd02 10985
f527bd02 10986
5476a9a4
GM
10987
10988
10989HAVE_XAW3D=no
10990LUCID_LIBW=
10991if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
10992 if test "$with_xaw3d" != no; then
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
10994$as_echo_n "checking for xaw3d... " >&6; }
10995 if test "${emacs_cv_xaw3d+set}" = set; then :
f199cab1
GM
10996 $as_echo_n "(cached) " >&6
10997else
5476a9a4
GM
10998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10999/* end confdefs.h. */
f527bd02 11000
5476a9a4
GM
11001#include <X11/Intrinsic.h>
11002#include <X11/Xaw3d/Simple.h>
11003int
11004main ()
11005{
11006
11007 ;
11008 return 0;
11009}
11010_ACEOF
11011if ac_fn_c_try_link "$LINENO"; then :
11012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11013$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
11014if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
11015 $as_echo_n "(cached) " >&6
11016else
11017 ac_check_lib_save_LIBS=$LIBS
11018LIBS="-lXaw3d $LIBS"
11019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11020/* end confdefs.h. */
f527bd02 11021
5476a9a4
GM
11022/* Override any GCC internal prototype to avoid an error.
11023 Use char because int might match the return type of a GCC
11024 builtin and then its argument prototype would still apply. */
11025#ifdef __cplusplus
11026extern "C"
11027#endif
11028char XawScrollbarSetThumb ();
11029int
11030main ()
11031{
11032return XawScrollbarSetThumb ();
11033 ;
11034 return 0;
11035}
11036_ACEOF
11037if ac_fn_c_try_link "$LINENO"; then :
11038 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
f199cab1 11039else
5476a9a4 11040 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
f199cab1 11041fi
5476a9a4
GM
11042rm -f core conftest.err conftest.$ac_objext \
11043 conftest$ac_exeext conftest.$ac_ext
11044LIBS=$ac_check_lib_save_LIBS
11045fi
11046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11047$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
11048if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
11049 emacs_cv_xaw3d=yes
11050else
11051 emacs_cv_xaw3d=no
f199cab1 11052fi
f527bd02 11053
5476a9a4
GM
11054else
11055 emacs_cv_xaw3d=no
11056fi
11057rm -f core conftest.err conftest.$ac_objext \
11058 conftest$ac_exeext conftest.$ac_ext
11059fi
f527bd02 11060
5476a9a4
GM
11061 else
11062 emacs_cv_xaw3d=no
11063 fi
11064 if test $emacs_cv_xaw3d = yes; then
11065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11066$as_echo "yes; using Lucid toolkit" >&6; }
11067 USE_X_TOOLKIT=LUCID
11068 HAVE_XAW3D=yes
11069 LUCID_LIBW=-lXaw3d
f527bd02 11070
5476a9a4 11071$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
f527bd02 11072
5476a9a4
GM
11073 else
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11075$as_echo "no" >&6; }
11076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11077$as_echo_n "checking for libXaw... " >&6; }
11078 if test "${emacs_cv_xaw+set}" = set; then :
f199cab1
GM
11079 $as_echo_n "(cached) " >&6
11080else
11081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11082/* end confdefs.h. */
067d23c9 11083
5476a9a4
GM
11084#include <X11/Intrinsic.h>
11085#include <X11/Xaw/Simple.h>
f199cab1
GM
11086int
11087main ()
11088{
067d23c9 11089
f199cab1
GM
11090 ;
11091 return 0;
11092}
11093_ACEOF
5476a9a4
GM
11094if ac_fn_c_try_link "$LINENO"; then :
11095 emacs_cv_xaw=yes
f199cab1 11096else
5476a9a4 11097 emacs_cv_xaw=no
f199cab1 11098fi
5476a9a4
GM
11099rm -f core conftest.err conftest.$ac_objext \
11100 conftest$ac_exeext conftest.$ac_ext
f199cab1 11101fi
067d23c9 11102
5476a9a4
GM
11103 if test $emacs_cv_xaw = yes; then
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11105$as_echo "yes; using Lucid toolkit" >&6; }
11106 USE_X_TOOLKIT=LUCID
11107 LUCID_LIBW=-lXaw
11108 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11109 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
f199cab1 11110 else
5476a9a4
GM
11111 as_fn_error "No X toolkit could be found.
11112If you are sure you want Emacs compiled without an X toolkit, pass
11113 --with-x-toolkit=no
11114to configure. Otherwise, install the development libraries for the toolkit
11115that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
f199cab1 11116 fi
5476a9a4
GM
11117 fi
11118fi
067d23c9 11119
5476a9a4 11120X_TOOLKIT_TYPE=$USE_X_TOOLKIT
067d23c9 11121
5476a9a4
GM
11122LIBXTR6=
11123if test "${USE_X_TOOLKIT}" != "none"; then
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11125$as_echo_n "checking X11 toolkit version... " >&6; }
11126 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
f199cab1
GM
11127 $as_echo_n "(cached) " >&6
11128else
5476a9a4 11129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11130/* end confdefs.h. */
5476a9a4 11131#include <X11/Intrinsic.h>
f199cab1
GM
11132int
11133main ()
11134{
5476a9a4
GM
11135#if XtSpecificationRelease < 6
11136fail;
11137#endif
f527bd02 11138
f199cab1
GM
11139 ;
11140 return 0;
11141}
067d23c9 11142_ACEOF
5476a9a4
GM
11143if ac_fn_c_try_link "$LINENO"; then :
11144 emacs_cv_x11_toolkit_version_6=yes
11145else
11146 emacs_cv_x11_toolkit_version_6=no
067d23c9 11147fi
5476a9a4
GM
11148rm -f core conftest.err conftest.$ac_objext \
11149 conftest$ac_exeext conftest.$ac_ext
067d23c9
KY
11150fi
11151
5476a9a4
GM
11152 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11153 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11155$as_echo "6 or newer" >&6; }
f527bd02 11156
5476a9a4 11157$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
f527bd02 11158
5476a9a4
GM
11159 LIBXTR6="-lSM -lICE"
11160 case "$opsys" in
11161 ## Use libw.a along with X11R6 Xt.
11162 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11163 esac
11164 else
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11166$as_echo "before 6" >&6; }
f199cab1 11167 fi
f527bd02 11168
5476a9a4
GM
11169 OLDLIBS="$LIBS"
11170 if test x$HAVE_X11XTR6 = xyes; then
11171 LIBS="-lXt -lSM -lICE $LIBS"
11172 else
11173 LIBS="-lXt $LIBS"
11174 fi
11175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11176$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
11177if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
11178 $as_echo_n "(cached) " >&6
11179else
11180 ac_check_lib_save_LIBS=$LIBS
11181LIBS="-lXmu $LIBS"
11182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11183/* end confdefs.h. */
f199cab1 11184
5476a9a4
GM
11185/* Override any GCC internal prototype to avoid an error.
11186 Use char because int might match the return type of a GCC
11187 builtin and then its argument prototype would still apply. */
11188#ifdef __cplusplus
11189extern "C"
11190#endif
11191char XmuConvertStandardSelection ();
067d23c9
KY
11192int
11193main ()
11194{
5476a9a4 11195return XmuConvertStandardSelection ();
067d23c9
KY
11196 ;
11197 return 0;
11198}
11199_ACEOF
5476a9a4
GM
11200if ac_fn_c_try_link "$LINENO"; then :
11201 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11202else
11203 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
067d23c9 11204fi
5476a9a4
GM
11205rm -f core conftest.err conftest.$ac_objext \
11206 conftest$ac_exeext conftest.$ac_ext
11207LIBS=$ac_check_lib_save_LIBS
067d23c9 11208fi
5476a9a4
GM
11209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11210$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
11211if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
11212 cat >>confdefs.h <<_ACEOF
11213#define HAVE_LIBXMU 1
f199cab1
GM
11214_ACEOF
11215
5476a9a4 11216 LIBS="-lXmu $LIBS"
f199cab1 11217
067d23c9
KY
11218fi
11219
5476a9a4
GM
11220 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11221 fi
067d23c9 11222
067d23c9 11223
5476a9a4
GM
11224LIBXMU=-lXmu
11225case $opsys in
11226 ## These systems don't supply Xmu.
11227 hpux* | aix4-2 )
11228 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11229 ;;
11230esac
067d23c9
KY
11231
11232
5476a9a4
GM
11233# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11234if test "${HAVE_X11}" = "yes"; then
11235 if test "${USE_X_TOOLKIT}" != "none"; then
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11237$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
11238if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
f199cab1
GM
11239 $as_echo_n "(cached) " >&6
11240else
5476a9a4
GM
11241 ac_check_lib_save_LIBS=$LIBS
11242LIBS="-lXext $LIBS"
11243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 11244/* end confdefs.h. */
f199cab1 11245
5476a9a4
GM
11246/* Override any GCC internal prototype to avoid an error.
11247 Use char because int might match the return type of a GCC
11248 builtin and then its argument prototype would still apply. */
11249#ifdef __cplusplus
11250extern "C"
11251#endif
11252char XShapeQueryExtension ();
11253int
11254main ()
11255{
11256return XShapeQueryExtension ();
11257 ;
11258 return 0;
11259}
e7d4e61f 11260_ACEOF
5476a9a4
GM
11261if ac_fn_c_try_link "$LINENO"; then :
11262 ac_cv_lib_Xext_XShapeQueryExtension=yes
11263else
11264 ac_cv_lib_Xext_XShapeQueryExtension=no
067d23c9 11265fi
5476a9a4
GM
11266rm -f core conftest.err conftest.$ac_objext \
11267 conftest$ac_exeext conftest.$ac_ext
11268LIBS=$ac_check_lib_save_LIBS
11269fi
11270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11271$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
11272if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
11273 cat >>confdefs.h <<_ACEOF
11274#define HAVE_LIBXEXT 1
11275_ACEOF
f199cab1 11276
5476a9a4 11277 LIBS="-lXext $LIBS"
f199cab1 11278
5476a9a4 11279fi
f199cab1 11280
5476a9a4
GM
11281 fi
11282fi
f199cab1 11283
5476a9a4
GM
11284LIBXP=
11285if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
11287$as_echo_n "checking for Motif version 2.1... " >&6; }
11288if test "${emacs_cv_motif_version_2_1+set}" = set; then :
ae1362a3
AS
11289 $as_echo_n "(cached) " >&6
11290else
f199cab1
GM
11291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11292/* end confdefs.h. */
5476a9a4
GM
11293#include <Xm/Xm.h>
11294int
11295main ()
11296{
11297#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11298int x = 5;
11299#else
11300Motif version prior to 2.1.
11301#endif
11302 ;
11303 return 0;
11304}
11305_ACEOF
11306if ac_fn_c_try_compile "$LINENO"; then :
11307 emacs_cv_motif_version_2_1=yes
11308else
11309 emacs_cv_motif_version_2_1=no
11310fi
11311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11312fi
11313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
11314$as_echo "$emacs_cv_motif_version_2_1" >&6; }
11315 if test $emacs_cv_motif_version_2_1 = yes; then
11316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
11317$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
11318if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
11319 $as_echo_n "(cached) " >&6
11320else
11321 ac_check_lib_save_LIBS=$LIBS
11322LIBS="-lXp $LIBS"
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11324/* end confdefs.h. */
f199cab1 11325
5476a9a4
GM
11326/* Override any GCC internal prototype to avoid an error.
11327 Use char because int might match the return type of a GCC
11328 builtin and then its argument prototype would still apply. */
11329#ifdef __cplusplus
11330extern "C"
11331#endif
11332char XpCreateContext ();
ae1362a3
AS
11333int
11334main ()
11335{
5476a9a4 11336return XpCreateContext ();
ae1362a3
AS
11337 ;
11338 return 0;
11339}
11340_ACEOF
5476a9a4
GM
11341if ac_fn_c_try_link "$LINENO"; then :
11342 ac_cv_lib_Xp_XpCreateContext=yes
067d23c9 11343else
5476a9a4 11344 ac_cv_lib_Xp_XpCreateContext=no
067d23c9 11345fi
5476a9a4
GM
11346rm -f core conftest.err conftest.$ac_objext \
11347 conftest$ac_exeext conftest.$ac_ext
11348LIBS=$ac_check_lib_save_LIBS
11349fi
11350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
11351$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
11352if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
11353 LIBXP=-lXp
067d23c9 11354fi
f199cab1 11355
5476a9a4
GM
11356 else
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
11358$as_echo_n "checking for LessTif where some systems put it... " >&6; }
11359if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9 11360 $as_echo_n "(cached) " >&6
f199cab1 11361else
5476a9a4
GM
11362 # We put this in CFLAGS temporarily to precede other -I options
11363 # that might be in CFLAGS temporarily.
11364 # We put this in CPPFLAGS where it precedes the other -I options.
11365 OLD_CPPFLAGS=$CPPFLAGS
11366 OLD_CFLAGS=$CFLAGS
11367 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11368 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11370/* end confdefs.h. */
5476a9a4 11371#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
067d23c9
KY
11372int
11373main ()
11374{
5476a9a4 11375int x = 5;
067d23c9
KY
11376 ;
11377 return 0;
11378}
11379_ACEOF
5476a9a4
GM
11380if ac_fn_c_try_compile "$LINENO"; then :
11381 emacs_cv_lesstif=yes
067d23c9 11382else
5476a9a4 11383 emacs_cv_lesstif=no
067d23c9 11384fi
5476a9a4 11385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 11386fi
5476a9a4
GM
11387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
11388$as_echo "$emacs_cv_lesstif" >&6; }
11389 if test $emacs_cv_lesstif = yes; then
11390 # Make sure this -I option remains in CPPFLAGS after it is set
11391 # back to REAL_CPPFLAGS.
11392 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11393 # have those other -I options anyway. Ultimately, having this
11394 # directory ultimately in CPPFLAGS will be enough.
11395 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11396 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11397 else
11398 CFLAGS=$OLD_CFLAGS
11399 CPPFLAGS=$OLD_CPPFLAGS
11400 fi
11401 fi
11402 ac_fn_c_check_header_mongrel "$LINENO" "Xm/BulletinB.h" "ac_cv_header_Xm_BulletinB_h" "$ac_includes_default"
11403if test "x$ac_cv_header_Xm_BulletinB_h" = x""yes; then :
067d23c9 11404
5476a9a4
GM
11405else
11406 as_fn_error "Motif toolkit requested but requirements not found." "$LINENO" 5
067d23c9 11407fi
f199cab1
GM
11408
11409
5476a9a4 11410fi
f199cab1
GM
11411
11412
5476a9a4
GM
11413USE_TOOLKIT_SCROLL_BARS=no
11414if test "${with_toolkit_scroll_bars}" != "no"; then
11415 if test "${USE_X_TOOLKIT}" != "none"; then
11416 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11417 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11418
5476a9a4
GM
11419 HAVE_XAW3D=no
11420 USE_TOOLKIT_SCROLL_BARS=yes
11421 elif test "${HAVE_XAW3D}" = "yes" || test "${USE_X_TOOLKIT}" = "LUCID"; then
11422 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11423
5476a9a4
GM
11424 USE_TOOLKIT_SCROLL_BARS=yes
11425 fi
11426 elif test "${HAVE_GTK}" = "yes"; then
11427 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11428
5476a9a4
GM
11429 USE_TOOLKIT_SCROLL_BARS=yes
11430 elif test "${HAVE_NS}" = "yes"; then
11431 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
f199cab1 11432
5476a9a4
GM
11433 USE_TOOLKIT_SCROLL_BARS=yes
11434 fi
11435fi
f199cab1 11436
5476a9a4 11437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11438/* end confdefs.h. */
5476a9a4
GM
11439
11440 #include <X11/Xlib.h>
11441 #include <X11/Xresource.h>
067d23c9
KY
11442int
11443main ()
11444{
5476a9a4 11445XIMProc callback;
067d23c9
KY
11446 ;
11447 return 0;
11448}
11449_ACEOF
f199cab1 11450if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4
GM
11451 HAVE_XIM=yes
11452
11453$as_echo "#define HAVE_XIM 1" >>confdefs.h
11454
067d23c9 11455else
5476a9a4 11456 HAVE_XIM=no
067d23c9 11457fi
f199cab1 11458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 11459
f199cab1 11460
5476a9a4
GM
11461if test "${with_xim}" != "no"; then
11462
11463$as_echo "#define USE_XIM 1" >>confdefs.h
11464
11465fi
11466
11467
11468if test "${HAVE_XIM}" != "no"; then
11469 late_CFLAGS=$CFLAGS
11470 if test "$GCC" = yes; then
11471 CFLAGS="$CFLAGS --pedantic-errors"
11472 fi
11473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11474/* end confdefs.h. */
f199cab1 11475
5476a9a4
GM
11476#include <X11/Xlib.h>
11477#include <X11/Xresource.h>
11478int
11479main ()
11480{
11481Display *display;
11482XrmDatabase db;
11483char *res_name;
11484char *res_class;
11485XIMProc callback;
11486XPointer *client_data;
11487#ifndef __GNUC__
11488/* If we're not using GCC, it's probably not XFree86, and this is
11489 probably right, but we can't use something like --pedantic-errors. */
11490extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11491 char*, XIMProc, XPointer*);
11492#endif
11493(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11494 client_data);
067d23c9
KY
11495 ;
11496 return 0;
11497}
11498_ACEOF
5476a9a4
GM
11499if ac_fn_c_try_compile "$LINENO"; then :
11500 emacs_cv_arg6_star=yes
067d23c9 11501fi
f199cab1 11502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
11503 if test "$emacs_cv_arg6_star" = yes; then
11504 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
11505
11506 else
11507 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
067d23c9 11508
5476a9a4
GM
11509 fi
11510 CFLAGS=$late_CFLAGS
067d23c9
KY
11511fi
11512
5476a9a4
GM
11513### Start of font-backend (under any platform) section.
11514# (nothing here yet -- this is a placeholder)
11515### End of font-backend (under any platform) section.
067d23c9 11516
5476a9a4
GM
11517### Start of font-backend (under X11) section.
11518if test "${HAVE_X11}" = "yes"; then
067d23c9 11519
5476a9a4 11520 succeeded=no
067d23c9 11521
5476a9a4
GM
11522 if test "$PKG_CONFIG" = "no" ; then
11523 HAVE_FC=no
11524 else
11525 PKG_CONFIG_MIN_VERSION=0.9.0
11526 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
11528$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
f199cab1 11529
5476a9a4
GM
11530 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5 &&
11531 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0" 2>&5` &&
11532 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0" 2>&5`; then
11533 edit_cflags="
11534 s,///*,/,g
11535 s/^/ /
11536 s/ -I/ $isystem/g
11537 s/^ //
11538 "
11539 FONTCONFIG_CFLAGS=`$as_echo "$FONTCONFIG_CFLAGS" | sed -e "$edit_cflags"`
11540 FONTCONFIG_LIBS=`$as_echo "$FONTCONFIG_LIBS" | sed -e 's,///*,/,g'`
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&5
11542$as_echo "yes CFLAGS='$FONTCONFIG_CFLAGS' LIBS='$FONTCONFIG_LIBS'" >&6; }
11543 succeeded=yes
11544 else
11545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11546$as_echo "no" >&6; }
11547 FONTCONFIG_CFLAGS=""
11548 FONTCONFIG_LIBS=""
11549 ## If we have a custom action on failure, don't print errors, but
11550 ## do set a variable so people can do so.
11551 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
f199cab1 11552
5476a9a4 11553 fi
f199cab1
GM
11554
11555
11556
f199cab1 11557 else
5476a9a4
GM
11558 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11559 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11560 fi
11561 fi
f199cab1 11562
5476a9a4
GM
11563 if test $succeeded = yes; then
11564 HAVE_FC=yes
11565 else
11566 HAVE_FC=no
11567 fi
f199cab1 11568
067d23c9 11569
5476a9a4
GM
11570 ## Use -lXft if available, unless `--with-xft=no'.
11571 HAVE_XFT=maybe
11572 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
11573 with_xft="no";
11574 fi
11575 if test "x${with_xft}" != "xno"; then
f199cab1 11576
f199cab1 11577
5476a9a4 11578 succeeded=no
f199cab1 11579
5476a9a4
GM
11580 if test "$PKG_CONFIG" = "no" ; then
11581 HAVE_XFT=no
11582 else
11583 PKG_CONFIG_MIN_VERSION=0.9.0
11584 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
11586$as_echo_n "checking for xft >= 0.13.0... " >&6; }
f199cab1 11587
5476a9a4
GM
11588 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5 &&
11589 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0" 2>&5` &&
11590 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0" 2>&5`; then
11591 edit_cflags="
11592 s,///*,/,g
11593 s/^/ /
11594 s/ -I/ $isystem/g
11595 s/^ //
11596 "
11597 XFT_CFLAGS=`$as_echo "$XFT_CFLAGS" | sed -e "$edit_cflags"`
11598 XFT_LIBS=`$as_echo "$XFT_LIBS" | sed -e 's,///*,/,g'`
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&5
11600$as_echo "yes CFLAGS='$XFT_CFLAGS' LIBS='$XFT_LIBS'" >&6; }
11601 succeeded=yes
11602 else
11603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
11605 XFT_CFLAGS=""
11606 XFT_LIBS=""
11607 ## If we have a custom action on failure, don't print errors, but
11608 ## do set a variable so people can do so.
11609 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
f199cab1 11610
5476a9a4 11611 fi
f199cab1
GM
11612
11613
11614
5476a9a4
GM
11615 else
11616 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11617 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11618 fi
11619 fi
f199cab1 11620
5476a9a4
GM
11621 if test $succeeded = yes; then
11622 :
f199cab1 11623 else
5476a9a4 11624 HAVE_XFT=no
f199cab1
GM
11625 fi
11626
5476a9a4
GM
11627 ## Because xftfont.c uses XRenderQueryExtension, we also
11628 ## need to link to -lXrender.
11629 HAVE_XRENDER=no
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
11631$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
11632if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
11633 $as_echo_n "(cached) " >&6
11634else
11635 ac_check_lib_save_LIBS=$LIBS
11636LIBS="-lXrender $LIBS"
11637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11638/* end confdefs.h. */
f199cab1 11639
5476a9a4
GM
11640/* Override any GCC internal prototype to avoid an error.
11641 Use char because int might match the return type of a GCC
11642 builtin and then its argument prototype would still apply. */
11643#ifdef __cplusplus
11644extern "C"
11645#endif
11646char XRenderQueryExtension ();
11647int
11648main ()
11649{
11650return XRenderQueryExtension ();
11651 ;
11652 return 0;
11653}
11654_ACEOF
11655if ac_fn_c_try_link "$LINENO"; then :
11656 ac_cv_lib_Xrender_XRenderQueryExtension=yes
11657else
11658 ac_cv_lib_Xrender_XRenderQueryExtension=no
11659fi
11660rm -f core conftest.err conftest.$ac_objext \
11661 conftest$ac_exeext conftest.$ac_ext
11662LIBS=$ac_check_lib_save_LIBS
11663fi
11664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
11665$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
11666if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
11667 HAVE_XRENDER=yes
11668fi
f199cab1 11669
5476a9a4
GM
11670 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
11671 OLD_CPPFLAGS="$CPPFLAGS"
11672 OLD_CFLAGS="$CFLAGS"
11673 OLD_LIBS="$LIBS"
11674 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11675 CFLAGS="$CFLAGS $XFT_CFLAGS"
11676 XFT_LIBS="-lXrender $XFT_LIBS"
11677 LIBS="$XFT_LIBS $LIBS"
11678 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
11679if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
11681$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
11682if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
11683 $as_echo_n "(cached) " >&6
11684else
11685 ac_check_lib_save_LIBS=$LIBS
11686LIBS="-lXft $XFT_LIBS $LIBS"
11687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11688/* end confdefs.h. */
f199cab1 11689
5476a9a4
GM
11690/* Override any GCC internal prototype to avoid an error.
11691 Use char because int might match the return type of a GCC
11692 builtin and then its argument prototype would still apply. */
11693#ifdef __cplusplus
11694extern "C"
11695#endif
11696char XftFontOpen ();
11697int
11698main ()
11699{
11700return XftFontOpen ();
11701 ;
11702 return 0;
11703}
067d23c9 11704_ACEOF
5476a9a4
GM
11705if ac_fn_c_try_link "$LINENO"; then :
11706 ac_cv_lib_Xft_XftFontOpen=yes
11707else
11708 ac_cv_lib_Xft_XftFontOpen=no
11709fi
11710rm -f core conftest.err conftest.$ac_objext \
11711 conftest$ac_exeext conftest.$ac_ext
11712LIBS=$ac_check_lib_save_LIBS
11713fi
11714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
11715$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
11716if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
11717 HAVE_XFT=yes
f199cab1
GM
11718fi
11719
5476a9a4 11720fi
f199cab1
GM
11721
11722
f199cab1 11723
5476a9a4 11724 if test "${HAVE_XFT}" = "yes"; then
f199cab1 11725
5476a9a4 11726$as_echo "#define HAVE_XFT 1" >>confdefs.h
f199cab1 11727
067d23c9 11728
5476a9a4
GM
11729 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
11730 else
11731 CPPFLAGS="$OLD_CPPFLAGS"
11732 CFLAGS="$OLD_CFLAGS"
11733 LIBS="$OLD_LIBS"
11734 fi # "${HAVE_XFT}" = "yes"
11735 fi # "$HAVE_XFT" != no
11736 fi # "x${with_xft}" != "xno"
f199cab1 11737
5476a9a4
GM
11738 ## We used to allow building with FreeType and without Xft.
11739 ## However, the ftx font backend driver is not in good shape.
11740 if test "$HAVE_XFT" != "yes"; then
11741 HAVE_XFT=no
11742 HAVE_FREETYPE=no
11743 else
f199cab1 11744
5476a9a4 11745 succeeded=no
f199cab1 11746
5476a9a4
GM
11747 if test "$PKG_CONFIG" = "no" ; then
11748 HAVE_FREETYPE=no
11749 else
11750 PKG_CONFIG_MIN_VERSION=0.9.0
11751 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
11753$as_echo_n "checking for freetype2... " >&6; }
f199cab1 11754
5476a9a4
GM
11755 if $PKG_CONFIG --exists "freetype2" 2>&5 &&
11756 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>&5` &&
11757 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>&5`; then
11758 edit_cflags="
11759 s,///*,/,g
11760 s/^/ /
11761 s/ -I/ $isystem/g
11762 s/^ //
11763 "
11764 FREETYPE_CFLAGS=`$as_echo "$FREETYPE_CFLAGS" | sed -e "$edit_cflags"`
11765 FREETYPE_LIBS=`$as_echo "$FREETYPE_LIBS" | sed -e 's,///*,/,g'`
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&5
11767$as_echo "yes CFLAGS='$FREETYPE_CFLAGS' LIBS='$FREETYPE_LIBS'" >&6; }
11768 succeeded=yes
11769 else
11770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771$as_echo "no" >&6; }
11772 FREETYPE_CFLAGS=""
11773 FREETYPE_LIBS=""
11774 ## If we have a custom action on failure, don't print errors, but
11775 ## do set a variable so people can do so.
11776 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
f199cab1 11777
5476a9a4 11778 fi
f199cab1 11779
f199cab1 11780
067d23c9 11781
5476a9a4
GM
11782 else
11783 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11784 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11785 fi
067d23c9 11786 fi
f199cab1 11787
5476a9a4
GM
11788 if test $succeeded = yes; then
11789 HAVE_FREETYPE=yes
11790 else
11791 HAVE_FREETYPE=no
11792 fi
f199cab1 11793
f199cab1 11794
5476a9a4
GM
11795 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
11796 fi
f199cab1 11797
5476a9a4
GM
11798 HAVE_LIBOTF=no
11799 if test "${HAVE_FREETYPE}" = "yes"; then
f199cab1 11800
5476a9a4 11801$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
f199cab1 11802
5476a9a4 11803 if test "${with_libotf}" != "no"; then
f199cab1 11804
5476a9a4 11805 succeeded=no
f199cab1 11806
5476a9a4
GM
11807 if test "$PKG_CONFIG" = "no" ; then
11808 HAVE_LIBOTF=no
11809 else
11810 PKG_CONFIG_MIN_VERSION=0.9.0
11811 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
11813$as_echo_n "checking for libotf... " >&6; }
f199cab1 11814
5476a9a4
GM
11815 if $PKG_CONFIG --exists "libotf" 2>&5 &&
11816 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf" 2>&5` &&
11817 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf" 2>&5`; then
11818 edit_cflags="
11819 s,///*,/,g
11820 s/^/ /
11821 s/ -I/ $isystem/g
11822 s/^ //
11823 "
11824 LIBOTF_CFLAGS=`$as_echo "$LIBOTF_CFLAGS" | sed -e "$edit_cflags"`
11825 LIBOTF_LIBS=`$as_echo "$LIBOTF_LIBS" | sed -e 's,///*,/,g'`
11826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&5
11827$as_echo "yes CFLAGS='$LIBOTF_CFLAGS' LIBS='$LIBOTF_LIBS'" >&6; }
11828 succeeded=yes
11829 else
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11831$as_echo "no" >&6; }
11832 LIBOTF_CFLAGS=""
11833 LIBOTF_LIBS=""
11834 ## If we have a custom action on failure, don't print errors, but
11835 ## do set a variable so people can do so.
11836 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
067d23c9 11837
5476a9a4 11838 fi
f199cab1
GM
11839
11840
067d23c9 11841
5476a9a4
GM
11842 else
11843 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11844 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11845 fi
11846 fi
f199cab1 11847
5476a9a4
GM
11848 if test $succeeded = yes; then
11849 HAVE_LIBOTF=yes
11850 else
11851 HAVE_LIBOTF=no
11852 fi
f199cab1 11853
5476a9a4 11854 if test "$HAVE_LIBOTF" = "yes"; then
f199cab1 11855
5476a9a4 11856$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
f199cab1 11857
5476a9a4
GM
11858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
11859$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
11860if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
11861 $as_echo_n "(cached) " >&6
11862else
5476a9a4
GM
11863 ac_check_lib_save_LIBS=$LIBS
11864LIBS="-lotf $LIBS"
11865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 11866/* end confdefs.h. */
5476a9a4
GM
11867
11868/* Override any GCC internal prototype to avoid an error.
11869 Use char because int might match the return type of a GCC
11870 builtin and then its argument prototype would still apply. */
11871#ifdef __cplusplus
11872extern "C"
11873#endif
11874char OTF_get_variation_glyphs ();
067d23c9
KY
11875int
11876main ()
11877{
5476a9a4 11878return OTF_get_variation_glyphs ();
067d23c9
KY
11879 ;
11880 return 0;
11881}
11882_ACEOF
5476a9a4
GM
11883if ac_fn_c_try_link "$LINENO"; then :
11884 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
067d23c9 11885else
5476a9a4 11886 ac_cv_lib_otf_OTF_get_variation_glyphs=no
067d23c9 11887fi
5476a9a4
GM
11888rm -f core conftest.err conftest.$ac_objext \
11889 conftest$ac_exeext conftest.$ac_ext
11890LIBS=$ac_check_lib_save_LIBS
11891fi
11892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
11893$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
11894if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
11895 HAVE_OTF_GET_VARIATION_GLYPHS=yes
11896else
11897 HAVE_OTF_GET_VARIATION_GLYPHS=no
067d23c9 11898fi
067d23c9 11899
5476a9a4
GM
11900 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
11901
11902$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
11903
11904 fi
11905 fi
11906 fi
11907 fi
11908
11909 HAVE_M17N_FLT=no
11910 if test "${HAVE_LIBOTF}" = yes; then
11911 if test "${with_m17n_flt}" != "no"; then
11912
11913 succeeded=no
11914
11915 if test "$PKG_CONFIG" = "no" ; then
11916 HAVE_M17N_FLT=no
11917 else
11918 PKG_CONFIG_MIN_VERSION=0.9.0
11919 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
11921$as_echo_n "checking for m17n-flt... " >&6; }
11922
11923 if $PKG_CONFIG --exists "m17n-flt" 2>&5 &&
11924 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt" 2>&5` &&
11925 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt" 2>&5`; then
11926 edit_cflags="
11927 s,///*,/,g
11928 s/^/ /
11929 s/ -I/ $isystem/g
11930 s/^ //
11931 "
11932 M17N_FLT_CFLAGS=`$as_echo "$M17N_FLT_CFLAGS" | sed -e "$edit_cflags"`
11933 M17N_FLT_LIBS=`$as_echo "$M17N_FLT_LIBS" | sed -e 's,///*,/,g'`
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&5
11935$as_echo "yes CFLAGS='$M17N_FLT_CFLAGS' LIBS='$M17N_FLT_LIBS'" >&6; }
11936 succeeded=yes
11937 else
11938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11939$as_echo "no" >&6; }
11940 M17N_FLT_CFLAGS=""
11941 M17N_FLT_LIBS=""
11942 ## If we have a custom action on failure, don't print errors, but
11943 ## do set a variable so people can do so.
11944 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
11945
11946 fi
11947
11948
067d23c9 11949
5476a9a4
GM
11950 else
11951 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11952 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11953 fi
f199cab1 11954 fi
067d23c9 11955
5476a9a4
GM
11956 if test $succeeded = yes; then
11957 HAVE_M17N_FLT=yes
11958 else
11959 HAVE_M17N_FLT=no
11960 fi
11961
11962 if test "$HAVE_M17N_FLT" = "yes"; then
11963
11964$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
11965
11966 fi
11967 fi
11968 fi
11969else
11970 HAVE_XFT=no
11971 HAVE_FREETYPE=no
11972 HAVE_LIBOTF=no
11973 HAVE_M17N_FLT=no
11974fi
11975
11976### End of font-backend (under X11) section.
11977
11978
067d23c9 11979
067d23c9 11980
5476a9a4
GM
11981
11982
11983
11984
11985
11986
11987### Use -lXpm if available, unless `--with-xpm=no'.
11988HAVE_XPM=no
11989LIBXPM=
11990if test "${HAVE_X11}" = "yes"; then
11991 if test "${with_xpm}" != "no"; then
11992 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
11993if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
11994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
11995$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
11996if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
f199cab1
GM
11997 $as_echo_n "(cached) " >&6
11998else
5476a9a4
GM
11999 ac_check_lib_save_LIBS=$LIBS
12000LIBS="-lXpm -lX11 $LIBS"
12001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12002/* end confdefs.h. */
12003
5476a9a4
GM
12004/* Override any GCC internal prototype to avoid an error.
12005 Use char because int might match the return type of a GCC
12006 builtin and then its argument prototype would still apply. */
12007#ifdef __cplusplus
12008extern "C"
12009#endif
12010char XpmReadFileToPixmap ();
067d23c9
KY
12011int
12012main ()
12013{
5476a9a4 12014return XpmReadFileToPixmap ();
067d23c9
KY
12015 ;
12016 return 0;
12017}
12018_ACEOF
5476a9a4
GM
12019if ac_fn_c_try_link "$LINENO"; then :
12020 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
067d23c9 12021else
5476a9a4 12022 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
067d23c9 12023fi
5476a9a4
GM
12024rm -f core conftest.err conftest.$ac_objext \
12025 conftest$ac_exeext conftest.$ac_ext
12026LIBS=$ac_check_lib_save_LIBS
12027fi
12028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12029$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
12030if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
12031 HAVE_XPM=yes
f199cab1 12032fi
067d23c9
KY
12033
12034fi
12035
12036
5476a9a4
GM
12037 if test "${HAVE_XPM}" = "yes"; then
12038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12039$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12041/* end confdefs.h. */
12042#include "X11/xpm.h"
12043#ifndef XpmReturnAllocPixels
12044no_return_alloc_pixels
12045#endif
067d23c9 12046
067d23c9 12047_ACEOF
5476a9a4
GM
12048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12049 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12050 HAVE_XPM=no
12051else
12052 HAVE_XPM=yes
12053fi
12054rm -f conftest*
067d23c9 12055
067d23c9 12056
5476a9a4
GM
12057 if test "${HAVE_XPM}" = "yes"; then
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12059$as_echo "yes" >&6; }
12060 else
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12062$as_echo "no" >&6; }
12063 fi
12064 fi
12065 fi
067d23c9 12066
5476a9a4 12067 if test "${HAVE_XPM}" = "yes"; then
067d23c9 12068
5476a9a4 12069$as_echo "#define HAVE_XPM 1" >>confdefs.h
067d23c9 12070
5476a9a4
GM
12071 LIBXPM=-lXpm
12072 fi
067d23c9
KY
12073fi
12074
f199cab1 12075
5476a9a4
GM
12076### Use -ljpeg if available, unless `--with-jpeg=no'.
12077HAVE_JPEG=no
12078LIBJPEG=
12079if test "${HAVE_X11}" = "yes"; then
12080 if test "${with_jpeg}" != "no"; then
12081 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
12082if test "x$ac_cv_header_jerror_h" = x""yes; then :
12083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12084$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
12085if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
12086 $as_echo_n "(cached) " >&6
12087else
5476a9a4
GM
12088 ac_check_lib_save_LIBS=$LIBS
12089LIBS="-ljpeg $LIBS"
12090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 12091/* end confdefs.h. */
f199cab1 12092
5476a9a4
GM
12093/* Override any GCC internal prototype to avoid an error.
12094 Use char because int might match the return type of a GCC
12095 builtin and then its argument prototype would still apply. */
12096#ifdef __cplusplus
12097extern "C"
12098#endif
12099char jpeg_destroy_compress ();
067d23c9
KY
12100int
12101main ()
12102{
5476a9a4 12103return jpeg_destroy_compress ();
067d23c9
KY
12104 ;
12105 return 0;
12106}
12107_ACEOF
12108if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 12109 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
067d23c9 12110else
5476a9a4 12111 ac_cv_lib_jpeg_jpeg_destroy_compress=no
067d23c9
KY
12112fi
12113rm -f core conftest.err conftest.$ac_objext \
12114 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
12115LIBS=$ac_check_lib_save_LIBS
12116fi
12117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12118$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
12119if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
12120 HAVE_JPEG=yes
12121fi
12122
067d23c9 12123fi
f199cab1 12124
f199cab1
GM
12125
12126 fi
067d23c9 12127
5476a9a4
GM
12128 if test "${HAVE_JPEG}" = "yes"; then
12129 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12130
5476a9a4
GM
12131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12132/* end confdefs.h. */
12133#include <jpeglib.h>
12134 version=JPEG_LIB_VERSION
f199cab1 12135
5476a9a4
GM
12136_ACEOF
12137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12138 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12139 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
f199cab1 12140
5476a9a4
GM
12141else
12142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12143$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12144 HAVE_JPEG=no
067d23c9 12145fi
5476a9a4 12146rm -f conftest*
067d23c9 12147
5476a9a4
GM
12148 fi
12149 if test "${HAVE_JPEG}" = "yes"; then
12150 LIBJPEG=-ljpeg
12151 fi
12152fi
067d23c9
KY
12153
12154
5476a9a4
GM
12155### Use -lpng if available, unless `--with-png=no'.
12156HAVE_PNG=no
12157LIBPNG=
12158if test "${HAVE_X11}" = "yes"; then
12159 if test "${with_png}" != "no"; then
12160 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12161 # in /usr/include/libpng.
12162 for ac_header in png.h libpng/png.h
12163do :
12164 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12165ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12166eval as_val=\$$as_ac_Header
12167 if test "x$as_val" = x""yes; then :
12168 cat >>confdefs.h <<_ACEOF
12169#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12170_ACEOF
12171 break
12172fi
067d23c9 12173
5476a9a4 12174done
067d23c9 12175
5476a9a4
GM
12176 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12178$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
12179if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
12180 $as_echo_n "(cached) " >&6
12181else
12182 ac_check_lib_save_LIBS=$LIBS
12183LIBS="-lpng -lz -lm $LIBS"
12184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12185/* end confdefs.h. */
067d23c9 12186
5476a9a4
GM
12187/* Override any GCC internal prototype to avoid an error.
12188 Use char because int might match the return type of a GCC
12189 builtin and then its argument prototype would still apply. */
12190#ifdef __cplusplus
12191extern "C"
12192#endif
12193char png_get_channels ();
12194int
12195main ()
12196{
12197return png_get_channels ();
12198 ;
12199 return 0;
12200}
12201_ACEOF
12202if ac_fn_c_try_link "$LINENO"; then :
12203 ac_cv_lib_png_png_get_channels=yes
f199cab1 12204else
5476a9a4
GM
12205 ac_cv_lib_png_png_get_channels=no
12206fi
12207rm -f core conftest.err conftest.$ac_objext \
12208 conftest$ac_exeext conftest.$ac_ext
12209LIBS=$ac_check_lib_save_LIBS
12210fi
12211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
12212$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
12213if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
12214 HAVE_PNG=yes
f199cab1 12215fi
067d23c9 12216
5476a9a4
GM
12217 fi
12218 fi
7834125e 12219
5476a9a4
GM
12220 if test "${HAVE_PNG}" = "yes"; then
12221
12222$as_echo "#define HAVE_PNG 1" >>confdefs.h
12223
12224 LIBPNG="-lpng -lz -lm"
12225
12226 ac_fn_c_check_decl "$LINENO" "png_longjmp" "ac_cv_have_decl_png_longjmp" "#ifdef HAVE_LIBPNG_PNG_H
12227 # include <libpng/png.h>
12228 #else
12229 # include <png.h>
12230 #endif
12231
12232"
12233if test "x$ac_cv_have_decl_png_longjmp" = x""yes; then :
12234
12235else
7834125e 12236
5476a9a4 12237$as_echo "#define PNG_DEPSTRUCT /**/" >>confdefs.h
7834125e 12238
f199cab1 12239fi
7834125e 12240
5476a9a4
GM
12241 fi
12242fi
7834125e
GM
12243
12244
5476a9a4
GM
12245### Use -ltiff if available, unless `--with-tiff=no'.
12246HAVE_TIFF=no
12247LIBTIFF=
12248if test "${HAVE_X11}" = "yes"; then
12249 if test "${with_tiff}" != "no"; then
12250 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
12251if test "x$ac_cv_header_tiffio_h" = x""yes; then :
12252 tifflibs="-lz -lm"
12253 # At least one tiff package requires the jpeg library.
12254 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
12255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
12256$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
12257if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
f199cab1
GM
12258 $as_echo_n "(cached) " >&6
12259else
5476a9a4
GM
12260 ac_check_lib_save_LIBS=$LIBS
12261LIBS="-ltiff $tifflibs $LIBS"
12262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12263/* end confdefs.h. */
067d23c9 12264
5476a9a4
GM
12265/* Override any GCC internal prototype to avoid an error.
12266 Use char because int might match the return type of a GCC
12267 builtin and then its argument prototype would still apply. */
12268#ifdef __cplusplus
12269extern "C"
f199cab1 12270#endif
5476a9a4
GM
12271char TIFFGetVersion ();
12272int
12273main ()
12274{
12275return TIFFGetVersion ();
12276 ;
12277 return 0;
12278}
f199cab1 12279_ACEOF
5476a9a4
GM
12280if ac_fn_c_try_link "$LINENO"; then :
12281 ac_cv_lib_tiff_TIFFGetVersion=yes
f199cab1 12282else
5476a9a4 12283 ac_cv_lib_tiff_TIFFGetVersion=no
f199cab1 12284fi
5476a9a4
GM
12285rm -f core conftest.err conftest.$ac_objext \
12286 conftest$ac_exeext conftest.$ac_ext
12287LIBS=$ac_check_lib_save_LIBS
f199cab1 12288fi
5476a9a4
GM
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
12290$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
12291if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
12292 HAVE_TIFF=yes
f199cab1 12293fi
067d23c9 12294
5476a9a4 12295fi
067d23c9 12296
067d23c9 12297
5476a9a4 12298 fi
f199cab1 12299
5476a9a4 12300 if test "${HAVE_TIFF}" = "yes"; then
067d23c9 12301
5476a9a4 12302$as_echo "#define HAVE_TIFF 1" >>confdefs.h
067d23c9 12303
5476a9a4
GM
12304 LIBTIFF=-ltiff
12305 fi
f199cab1 12306fi
067d23c9 12307
067d23c9 12308
5476a9a4
GM
12309### Use -lgif or -lungif if available, unless `--with-gif=no'.
12310HAVE_GIF=no
12311LIBGIF=
12312if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
12313 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
12314if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
12315 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12316# Earlier versions can crash Emacs.
12317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
12318$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
12319if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
12320 $as_echo_n "(cached) " >&6
12321else
5476a9a4
GM
12322 ac_check_lib_save_LIBS=$LIBS
12323LIBS="-lgif $LIBS"
12324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12325/* end confdefs.h. */
067d23c9 12326
5476a9a4
GM
12327/* Override any GCC internal prototype to avoid an error.
12328 Use char because int might match the return type of a GCC
12329 builtin and then its argument prototype would still apply. */
12330#ifdef __cplusplus
12331extern "C"
12332#endif
12333char EGifPutExtensionLast ();
f199cab1
GM
12334int
12335main ()
12336{
5476a9a4 12337return EGifPutExtensionLast ();
f199cab1
GM
12338 ;
12339 return 0;
12340}
12341_ACEOF
5476a9a4
GM
12342if ac_fn_c_try_link "$LINENO"; then :
12343 ac_cv_lib_gif_EGifPutExtensionLast=yes
f199cab1 12344else
5476a9a4 12345 ac_cv_lib_gif_EGifPutExtensionLast=no
f199cab1 12346fi
5476a9a4
GM
12347rm -f core conftest.err conftest.$ac_objext \
12348 conftest$ac_exeext conftest.$ac_ext
12349LIBS=$ac_check_lib_save_LIBS
12350fi
12351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
12352$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
12353if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
12354 HAVE_GIF=yes
12355else
12356 HAVE_GIF=maybe
f199cab1 12357fi
067d23c9 12358
5476a9a4
GM
12359fi
12360
12361
12362
12363 if test "$HAVE_GIF" = yes; then
12364 LIBGIF=-lgif
12365 elif test "$HAVE_GIF" = maybe; then
12366# If gif_lib.h but no libgif, try libungif.
12367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
12368$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
12369if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
f199cab1
GM
12370 $as_echo_n "(cached) " >&6
12371else
5476a9a4
GM
12372 ac_check_lib_save_LIBS=$LIBS
12373LIBS="-lungif $LIBS"
12374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 12375/* end confdefs.h. */
f199cab1 12376
5476a9a4
GM
12377/* Override any GCC internal prototype to avoid an error.
12378 Use char because int might match the return type of a GCC
12379 builtin and then its argument prototype would still apply. */
12380#ifdef __cplusplus
12381extern "C"
12382#endif
12383char EGifPutExtensionLast ();
f199cab1
GM
12384int
12385main ()
12386{
5476a9a4 12387return EGifPutExtensionLast ();
f199cab1
GM
12388 ;
12389 return 0;
12390}
12391_ACEOF
5476a9a4
GM
12392if ac_fn_c_try_link "$LINENO"; then :
12393 ac_cv_lib_ungif_EGifPutExtensionLast=yes
f199cab1 12394else
5476a9a4 12395 ac_cv_lib_ungif_EGifPutExtensionLast=no
f199cab1 12396fi
5476a9a4
GM
12397rm -f core conftest.err conftest.$ac_objext \
12398 conftest$ac_exeext conftest.$ac_ext
12399LIBS=$ac_check_lib_save_LIBS
f199cab1 12400fi
5476a9a4
GM
12401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
12402$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
12403if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
12404 HAVE_GIF=yes
12405else
12406 HAVE_GIF=no
12407fi
12408
12409 test "$HAVE_GIF" = yes && LIBGIF=-lungif
12410 fi
12411
12412 if test "${HAVE_GIF}" = "yes"; then
12413
12414$as_echo "#define HAVE_GIF 1" >>confdefs.h
12415
12416 fi
12417fi
12418
12419
12420if test "${HAVE_X11}" = "yes"; then
12421 MISSING=""
12422 WITH_NO=""
12423 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
12424 MISSING="libXpm" && WITH_NO="--with-xpm=no"
12425 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
12426 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
12427 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
12428 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
12429 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
12430 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
12431 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
12432 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
12433
12434 if test "X${MISSING}" != X; then
12435 as_fn_error "The following required libraries were not found:
12436 $MISSING
12437Maybe some development libraries/packages are missing?
12438If you don't want to link with them give
12439 $WITH_NO
12440as options to configure" "$LINENO" 5
12441 fi
12442fi
12443
12444### Use -lgpm if available, unless `--with-gpm=no'.
12445HAVE_GPM=no
12446LIBGPM=
12447if test "${with_gpm}" != "no"; then
12448 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
12449if test "x$ac_cv_header_gpm_h" = x""yes; then :
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
12451$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
12452if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
12453 $as_echo_n "(cached) " >&6
12454else
5476a9a4
GM
12455 ac_check_lib_save_LIBS=$LIBS
12456LIBS="-lgpm $LIBS"
12457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12458/* end confdefs.h. */
12459
5476a9a4
GM
12460/* Override any GCC internal prototype to avoid an error.
12461 Use char because int might match the return type of a GCC
12462 builtin and then its argument prototype would still apply. */
12463#ifdef __cplusplus
12464extern "C"
12465#endif
12466char Gpm_Open ();
067d23c9
KY
12467int
12468main ()
12469{
5476a9a4 12470return Gpm_Open ();
067d23c9
KY
12471 ;
12472 return 0;
12473}
12474_ACEOF
5476a9a4
GM
12475if ac_fn_c_try_link "$LINENO"; then :
12476 ac_cv_lib_gpm_Gpm_Open=yes
067d23c9 12477else
5476a9a4 12478 ac_cv_lib_gpm_Gpm_Open=no
067d23c9 12479fi
5476a9a4
GM
12480rm -f core conftest.err conftest.$ac_objext \
12481 conftest$ac_exeext conftest.$ac_ext
12482LIBS=$ac_check_lib_save_LIBS
12483fi
12484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12485$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
12486if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
12487 HAVE_GPM=yes
067d23c9 12488fi
f199cab1 12489
5476a9a4 12490fi
f199cab1 12491
f199cab1 12492
f199cab1 12493
5476a9a4 12494 if test "${HAVE_GPM}" = "yes"; then
f199cab1 12495
5476a9a4 12496$as_echo "#define HAVE_GPM 1" >>confdefs.h
f199cab1 12497
5476a9a4
GM
12498 LIBGPM=-lgpm
12499 fi
067d23c9 12500fi
067d23c9
KY
12501
12502
12503
12504
12505
12506
5476a9a4
GM
12507GNUSTEP_CFLAGS=
12508### Use NeXTstep API to implement GUI.
12509if test "${HAVE_NS}" = "yes"; then
067d23c9 12510
5476a9a4 12511$as_echo "#define HAVE_NS 1" >>confdefs.h
067d23c9 12512
5476a9a4 12513 if test "${NS_IMPL_COCOA}" = "yes"; then
067d23c9 12514
5476a9a4 12515$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
f199cab1 12516
5476a9a4
GM
12517 fi
12518 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
f199cab1 12519
5476a9a4 12520$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
f199cab1 12521
5476a9a4
GM
12522 # See also .m.o rule in Makefile.in */
12523 # FIXME: are all these flags really needed? Document here why. */
12524 GNUSTEP_CFLAGS="-D_REENTRANT -fPIC -fno-strict-aliasing -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
12525 ## Extra CFLAGS applied to src/*.m files.
12526 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"
12527 fi
12528 # We also have mouse menus.
12529 HAVE_MENUS=yes
12530 OTHER_FILES=ns-app
12531fi
f199cab1
GM
12532
12533
5476a9a4
GM
12534### Use session management (-lSM -lICE) if available
12535HAVE_X_SM=no
12536LIBXSM=
12537if test "${HAVE_X11}" = "yes"; then
12538 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
12539if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
12540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
12541$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
12542if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
12543 $as_echo_n "(cached) " >&6
12544else
5476a9a4
GM
12545 ac_check_lib_save_LIBS=$LIBS
12546LIBS="-lSM -lICE $LIBS"
12547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12548/* end confdefs.h. */
12549
5476a9a4
GM
12550/* Override any GCC internal prototype to avoid an error.
12551 Use char because int might match the return type of a GCC
12552 builtin and then its argument prototype would still apply. */
12553#ifdef __cplusplus
12554extern "C"
12555#endif
12556char SmcOpenConnection ();
f199cab1
GM
12557int
12558main ()
12559{
5476a9a4
GM
12560return SmcOpenConnection ();
12561 ;
12562 return 0;
f199cab1 12563}
067d23c9 12564_ACEOF
5476a9a4
GM
12565if ac_fn_c_try_link "$LINENO"; then :
12566 ac_cv_lib_SM_SmcOpenConnection=yes
067d23c9 12567else
5476a9a4 12568 ac_cv_lib_SM_SmcOpenConnection=no
f199cab1 12569fi
5476a9a4
GM
12570rm -f core conftest.err conftest.$ac_objext \
12571 conftest$ac_exeext conftest.$ac_ext
12572LIBS=$ac_check_lib_save_LIBS
12573fi
12574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
12575$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
12576if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
12577 HAVE_X_SM=yes
067d23c9 12578fi
067d23c9 12579
f199cab1 12580fi
f199cab1 12581
f199cab1 12582
067d23c9 12583
5476a9a4
GM
12584 if test "${HAVE_X_SM}" = "yes"; then
12585
12586$as_echo "#define HAVE_X_SM 1" >>confdefs.h
12587
12588 LIBXSM="-lSM -lICE"
12589 case "$LIBS" in
12590 *-lSM*) ;;
12591 *) LIBS="$LIBXSM $LIBS" ;;
12592 esac
067d23c9 12593 fi
5476a9a4 12594fi
067d23c9 12595
067d23c9 12596
5476a9a4
GM
12597### Use libxml (-lxml2) if available
12598HAVE_LIBXML2=no
12599if test "${with_xml2}" != "no"; then
12600 ### I'm not sure what the version number should be, so I just guessed.
067d23c9 12601
5476a9a4 12602 succeeded=no
067d23c9 12603
5476a9a4
GM
12604 if test "$PKG_CONFIG" = "no" ; then
12605 HAVE_LIBXML2=no
12606 else
12607 PKG_CONFIG_MIN_VERSION=0.9.0
12608 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
12610$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 12611
5476a9a4
GM
12612 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5 &&
12613 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17" 2>&5` &&
12614 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17" 2>&5`; then
12615 edit_cflags="
12616 s,///*,/,g
12617 s/^/ /
12618 s/ -I/ $isystem/g
12619 s/^ //
12620 "
12621 LIBXML2_CFLAGS=`$as_echo "$LIBXML2_CFLAGS" | sed -e "$edit_cflags"`
12622 LIBXML2_LIBS=`$as_echo "$LIBXML2_LIBS" | sed -e 's,///*,/,g'`
12623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&5
12624$as_echo "yes CFLAGS='$LIBXML2_CFLAGS' LIBS='$LIBXML2_LIBS'" >&6; }
12625 succeeded=yes
12626 else
12627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12628$as_echo "no" >&6; }
12629 LIBXML2_CFLAGS=""
12630 LIBXML2_LIBS=""
12631 ## If we have a custom action on failure, don't print errors, but
12632 ## do set a variable so people can do so.
12633 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"`
12634
12635 fi
12636
12637
12638
12639 else
12640 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12641 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12642 fi
12643 fi
12644
12645 if test $succeeded = yes; then
12646 HAVE_LIBXML2=yes
12647 else
12648 HAVE_LIBXML2=no
12649 fi
12650
12651 if test "${HAVE_LIBXML2}" = "yes"; then
12652 LIBS="$LIBXML2_LIBS $LIBS"
12653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
12654$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
12655if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
12656 $as_echo_n "(cached) " >&6
12657else
5476a9a4
GM
12658 ac_check_lib_save_LIBS=$LIBS
12659LIBS="-lxml2 $LIBS"
12660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12661/* end confdefs.h. */
12662
5476a9a4
GM
12663/* Override any GCC internal prototype to avoid an error.
12664 Use char because int might match the return type of a GCC
12665 builtin and then its argument prototype would still apply. */
12666#ifdef __cplusplus
12667extern "C"
12668#endif
12669char htmlReadMemory ();
067d23c9
KY
12670int
12671main ()
12672{
5476a9a4 12673return htmlReadMemory ();
067d23c9
KY
12674 ;
12675 return 0;
12676}
12677_ACEOF
5476a9a4
GM
12678if ac_fn_c_try_link "$LINENO"; then :
12679 ac_cv_lib_xml2_htmlReadMemory=yes
067d23c9 12680else
5476a9a4 12681 ac_cv_lib_xml2_htmlReadMemory=no
067d23c9 12682fi
5476a9a4
GM
12683rm -f core conftest.err conftest.$ac_objext \
12684 conftest$ac_exeext conftest.$ac_ext
12685LIBS=$ac_check_lib_save_LIBS
12686fi
12687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
12688$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
12689if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
12690 HAVE_LIBXML2=yes
12691else
12692 HAVE_LIBXML2=no
067d23c9
KY
12693fi
12694
5476a9a4 12695 if test "${HAVE_LIBXML2}" = "yes"; then
067d23c9 12696
5476a9a4 12697$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
067d23c9 12698
5476a9a4
GM
12699 else
12700 LIBXML2_LIBS=""
12701 LIBXML2_CFLAGS=""
12702 fi
067d23c9 12703 fi
5476a9a4 12704fi
067d23c9 12705
067d23c9 12706
067d23c9 12707
5476a9a4
GM
12708# If netdb.h doesn't declare h_errno, we must declare it by hand.
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
12710$as_echo_n "checking whether netdb declares h_errno... " >&6; }
12711if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
12712 $as_echo_n "(cached) " >&6
067d23c9 12713else
5476a9a4
GM
12714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12715/* end confdefs.h. */
12716#include <netdb.h>
12717int
12718main ()
12719{
12720return h_errno;
12721 ;
12722 return 0;
12723}
12724_ACEOF
12725if ac_fn_c_try_link "$LINENO"; then :
12726 emacs_cv_netdb_declares_h_errno=yes
12727else
12728 emacs_cv_netdb_declares_h_errno=no
067d23c9 12729fi
5476a9a4
GM
12730rm -f core conftest.err conftest.$ac_objext \
12731 conftest$ac_exeext conftest.$ac_ext
12732fi
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
12734$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
12735if test $emacs_cv_netdb_declares_h_errno = yes; then
067d23c9 12736
5476a9a4 12737$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
f199cab1 12738
5476a9a4 12739fi
f199cab1 12740
5476a9a4
GM
12741# fmod, logb, and frexp are found in -lm on most systems.
12742# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
12743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
12744$as_echo_n "checking for sqrt in -lm... " >&6; }
12745if test "${ac_cv_lib_m_sqrt+set}" = set; then :
12746 $as_echo_n "(cached) " >&6
12747else
12748 ac_check_lib_save_LIBS=$LIBS
12749LIBS="-lm $LIBS"
12750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
f199cab1 12752
5476a9a4
GM
12753/* Override any GCC internal prototype to avoid an error.
12754 Use char because int might match the return type of a GCC
12755 builtin and then its argument prototype would still apply. */
12756#ifdef __cplusplus
12757extern "C"
12758#endif
12759char sqrt ();
12760int
12761main ()
12762{
12763return sqrt ();
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768if ac_fn_c_try_link "$LINENO"; then :
12769 ac_cv_lib_m_sqrt=yes
12770else
12771 ac_cv_lib_m_sqrt=no
12772fi
12773rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext conftest.$ac_ext
12775LIBS=$ac_check_lib_save_LIBS
12776fi
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
12778$as_echo "$ac_cv_lib_m_sqrt" >&6; }
12779if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
12780 cat >>confdefs.h <<_ACEOF
12781#define HAVE_LIBM 1
12782_ACEOF
f199cab1 12783
5476a9a4 12784 LIBS="-lm $LIBS"
f199cab1 12785
5476a9a4 12786fi
f199cab1 12787
f199cab1 12788
5476a9a4
GM
12789# Check for mail-locking functions in a "mail" library. Probably this should
12790# have the same check as for liblockfile below.
12791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
12792$as_echo_n "checking for maillock in -lmail... " >&6; }
12793if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
12794 $as_echo_n "(cached) " >&6
12795else
5476a9a4
GM
12796 ac_check_lib_save_LIBS=$LIBS
12797LIBS="-lmail $LIBS"
12798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
12799/* end confdefs.h. */
12800
5476a9a4
GM
12801/* Override any GCC internal prototype to avoid an error.
12802 Use char because int might match the return type of a GCC
12803 builtin and then its argument prototype would still apply. */
12804#ifdef __cplusplus
12805extern "C"
067d23c9 12806#endif
5476a9a4
GM
12807char maillock ();
12808int
12809main ()
12810{
12811return maillock ();
12812 ;
12813 return 0;
12814}
067d23c9 12815_ACEOF
5476a9a4
GM
12816if ac_fn_c_try_link "$LINENO"; then :
12817 ac_cv_lib_mail_maillock=yes
067d23c9 12818else
5476a9a4 12819 ac_cv_lib_mail_maillock=no
067d23c9 12820fi
5476a9a4
GM
12821rm -f core conftest.err conftest.$ac_objext \
12822 conftest$ac_exeext conftest.$ac_ext
12823LIBS=$ac_check_lib_save_LIBS
067d23c9 12824fi
5476a9a4
GM
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
12826$as_echo "$ac_cv_lib_mail_maillock" >&6; }
12827if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
12828 have_mail=yes
f199cab1 12829else
5476a9a4 12830 have_mail=no
067d23c9
KY
12831fi
12832
5476a9a4
GM
12833if test $have_mail = yes; then
12834 LIBS_MAIL=-lmail
12835 LIBS="$LIBS_MAIL $LIBS"
067d23c9 12836
5476a9a4 12837$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
067d23c9 12838
5476a9a4
GM
12839else
12840 LIBS_MAIL=
12841fi
12842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
12843$as_echo_n "checking for maillock in -llockfile... " >&6; }
12844if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
12845 $as_echo_n "(cached) " >&6
12846else
5476a9a4
GM
12847 ac_check_lib_save_LIBS=$LIBS
12848LIBS="-llockfile $LIBS"
067d23c9
KY
12849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12850/* end confdefs.h. */
12851
12852/* Override any GCC internal prototype to avoid an error.
12853 Use char because int might match the return type of a GCC
12854 builtin and then its argument prototype would still apply. */
12855#ifdef __cplusplus
12856extern "C"
12857#endif
5476a9a4 12858char maillock ();
067d23c9
KY
12859int
12860main ()
12861{
5476a9a4 12862return maillock ();
067d23c9
KY
12863 ;
12864 return 0;
12865}
12866_ACEOF
5476a9a4
GM
12867if ac_fn_c_try_link "$LINENO"; then :
12868 ac_cv_lib_lockfile_maillock=yes
12869else
12870 ac_cv_lib_lockfile_maillock=no
067d23c9
KY
12871fi
12872rm -f core conftest.err conftest.$ac_objext \
5476a9a4
GM
12873 conftest$ac_exeext conftest.$ac_ext
12874LIBS=$ac_check_lib_save_LIBS
067d23c9 12875fi
5476a9a4
GM
12876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
12877$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
12878if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
12879 have_lockfile=yes
067d23c9 12880else
5476a9a4 12881 have_lockfile=no
f199cab1
GM
12882fi
12883
5476a9a4
GM
12884if test $have_lockfile = yes; then
12885 LIBS_MAIL=-llockfile
12886 LIBS="$LIBS_MAIL $LIBS"
067d23c9 12887
5476a9a4 12888$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
067d23c9 12889
5476a9a4
GM
12890else
12891# If we have the shared liblockfile, assume we must use it for mail
12892# locking (e.g. Debian). If we couldn't link against liblockfile
12893# (no liblockfile.a installed), ensure that we don't need to.
12894 # Extract the first word of "liblockfile.so", so it can be a program name with args.
12895set dummy liblockfile.so; ac_word=$2
12896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12897$as_echo_n "checking for $ac_word... " >&6; }
12898if test "${ac_cv_prog_liblockfile+set}" = set; then :
12899 $as_echo_n "(cached) " >&6
12900else
12901 if test -n "$liblockfile"; then
12902 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
12903else
12904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12905as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
12906for as_dir in $as_dummy
12907do
12908 IFS=$as_save_IFS
12909 test -z "$as_dir" && as_dir=.
12910 for ac_exec_ext in '' $ac_executable_extensions; do
12911 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12912 ac_cv_prog_liblockfile="yes"
12913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12914 break 2
12915 fi
12916done
12917 done
12918IFS=$as_save_IFS
067d23c9 12919
5476a9a4
GM
12920 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
12921fi
12922fi
12923liblockfile=$ac_cv_prog_liblockfile
12924if test -n "$liblockfile"; then
12925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
12926$as_echo "$liblockfile" >&6; }
12927else
12928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12929$as_echo "no" >&6; }
12930fi
067d23c9 12931
067d23c9 12932
5476a9a4
GM
12933 if test $ac_cv_prog_liblockfile = yes; then
12934 as_fn_error "Shared liblockfile found but can't link against it.
12935This probably means that movemail could lose mail.
12936There may be a \`development' package to install containing liblockfile." "$LINENO" 5
12937 fi
12938fi
067d23c9 12939
067d23c9 12940
067d23c9 12941
067d23c9
KY
12942
12943
5476a9a4
GM
12944## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
12945## interlock access to the mail spool. The alternative is a lock file named
12946## /usr/spool/mail/$USER.lock.
12947mail_lock=no
12948case "$opsys" in
12949 aix4-2) mail_lock="lockf" ;;
067d23c9 12950
5476a9a4 12951 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
067d23c9 12952
5476a9a4
GM
12953 ## On GNU/Linux systems, both methods are used by various mail programs.
12954 ## I assume most people are using newer mailers that have heard of flock.
12955 ## Change this if you need to.
12956 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
12957 ## configure gets the right answers, and that means *NOT* using flock.
12958 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
12959 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
12960 ## Debian maintainer hasn't provided a clean fix for Emacs.
12961 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
12962 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
12963 ## correct logic. -- fx
12964 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
12965 ## liblockfile is a Free Software replacement for libmail, used on
12966 ## Debian systems and elsewhere. -rfr.
12967 gnu-*)
12968 mail_lock="flock"
12969 if test $have_mail = yes || test $have_lockfile = yes; then
12970 test $ac_cv_header_maillock_h = yes && mail_lock=no
12971 fi
12972 ;;
12973esac
f199cab1 12974
5476a9a4
GM
12975BLESSMAIL_TARGET=
12976case "$mail_lock" in
12977 flock)
12978$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
12979 ;;
f199cab1 12980
5476a9a4
GM
12981 lockf)
12982$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
12983 ;;
f199cab1 12984
5476a9a4
GM
12985 *) BLESSMAIL_TARGET="need-blessmail" ;;
12986esac
f199cab1
GM
12987
12988
12989
5476a9a4
GM
12990for ac_func in gethostname \
12991closedir getrusage get_current_dir_name \
12992lrand48 logb frexp fmod cbrt setsid \
12993fpathconf select euidaccess getpagesize setlocale \
12994utimes getrlimit setrlimit setpgid getcwd shutdown getaddrinfo \
12995__fpending strsignal setitimer \
12996sendto recvfrom getsockname getpeername getifaddrs freeifaddrs \
12997gai_strerror mkstemp getline getdelim fsync sync \
12998difftime posix_memalign \
12999getpwent endpwent getgrent endgrent \
13000touchlock \
13001cfmakeraw cfsetspeed copysign __executable_start
13002do :
13003 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13004ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13005eval as_val=\$$as_ac_var
13006 if test "x$as_val" = x""yes; then :
13007 cat >>confdefs.h <<_ACEOF
13008#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13009_ACEOF
f199cab1 13010
5476a9a4
GM
13011fi
13012done
f199cab1
GM
13013
13014
5476a9a4
GM
13015if test $opsys != unixware; then
13016 for ac_func in getwd
13017do :
13018 ac_fn_c_check_func "$LINENO" "getwd" "ac_cv_func_getwd"
13019if test "x$ac_cv_func_getwd" = x""yes; then :
13020 cat >>confdefs.h <<_ACEOF
13021#define HAVE_GETWD 1
13022_ACEOF
f199cab1 13023
5476a9a4
GM
13024fi
13025done
f199cab1 13026
5476a9a4 13027fi
f199cab1 13028
5476a9a4
GM
13029## Eric Backus <ericb@lsid.hp.com> says, HP-UX 9.x on HP 700 machines
13030## has a broken `rint' in some library versions including math library
13031## version number A.09.05.
13032## You can fix the math library by installing patch number PHSS_4630.
13033## But we can fix it more reliably for Emacs by just not using rint.
13034## We also skip HAVE_RANDOM - see comments in src/s/hpux10-20.h.
13035case $opsys in
13036 hpux*) : ;;
13037 *) for ac_func in random rint
13038do :
13039 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13040ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13041eval as_val=\$$as_ac_var
13042 if test "x$as_val" = x""yes; then :
13043 cat >>confdefs.h <<_ACEOF
13044#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13045_ACEOF
f199cab1 13046
5476a9a4
GM
13047fi
13048done
13049 ;;
13050esac
f199cab1 13051
5476a9a4
GM
13052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13053$as_echo_n "checking for __builtin_unwind_init... " >&6; }
13054if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
067d23c9 13055 $as_echo_n "(cached) " >&6
f199cab1
GM
13056else
13057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13058/* end confdefs.h. */
13059
067d23c9
KY
13060int
13061main ()
13062{
5476a9a4 13063__builtin_unwind_init ();
067d23c9
KY
13064 ;
13065 return 0;
13066}
13067_ACEOF
5476a9a4
GM
13068if ac_fn_c_try_link "$LINENO"; then :
13069 emacs_cv_func___builtin_unwind_init=yes
067d23c9 13070else
5476a9a4 13071 emacs_cv_func___builtin_unwind_init=no
067d23c9 13072fi
5476a9a4
GM
13073rm -f core conftest.err conftest.$ac_objext \
13074 conftest$ac_exeext conftest.$ac_ext
067d23c9 13075fi
5476a9a4
GM
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13077$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13078if test $emacs_cv_func___builtin_unwind_init = yes; then
067d23c9 13079
5476a9a4 13080$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
f199cab1 13081
067d23c9 13082fi
067d23c9 13083
f199cab1
GM
13084
13085
13086
13087
5476a9a4
GM
13088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13089$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
13090if test "${ac_cv_sys_largefile_source+set}" = set; then :
13091 $as_echo_n "(cached) " >&6
13092else
13093 while :; do
13094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13095/* end confdefs.h. */
13096#include <sys/types.h> /* for off_t */
13097 #include <stdio.h>
13098int
13099main ()
13100{
13101int (*fp) (FILE *, off_t, int) = fseeko;
13102 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13103 ;
13104 return 0;
13105}
13106_ACEOF
13107if ac_fn_c_try_link "$LINENO"; then :
13108 ac_cv_sys_largefile_source=no; break
067d23c9 13109fi
5476a9a4
GM
13110rm -f core conftest.err conftest.$ac_objext \
13111 conftest$ac_exeext conftest.$ac_ext
13112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13113/* end confdefs.h. */
13114#define _LARGEFILE_SOURCE 1
13115#include <sys/types.h> /* for off_t */
13116 #include <stdio.h>
13117int
13118main ()
13119{
13120int (*fp) (FILE *, off_t, int) = fseeko;
13121 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
13122 ;
13123 return 0;
13124}
13125_ACEOF
13126if ac_fn_c_try_link "$LINENO"; then :
13127 ac_cv_sys_largefile_source=1; break
13128fi
13129rm -f core conftest.err conftest.$ac_objext \
13130 conftest$ac_exeext conftest.$ac_ext
13131 ac_cv_sys_largefile_source=unknown
13132 break
13133done
13134fi
13135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13136$as_echo "$ac_cv_sys_largefile_source" >&6; }
13137case $ac_cv_sys_largefile_source in #(
13138 no | unknown) ;;
13139 *)
13140cat >>confdefs.h <<_ACEOF
13141#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13142_ACEOF
13143;;
13144esac
13145rm -rf conftest*
067d23c9 13146
5476a9a4
GM
13147# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13148# in glibc 2.1.3, but that breaks too many other things.
13149# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13150if test $ac_cv_sys_largefile_source != unknown; then
067d23c9 13151
5476a9a4 13152$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 13153
5476a9a4 13154fi
067d23c9
KY
13155
13156
5476a9a4
GM
13157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
13158$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
13159if test "${ac_cv_func_getpgrp_void+set}" = set; then :
13160 $as_echo_n "(cached) " >&6
13161else
13162 # Use it with a single arg.
13163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13164/* end confdefs.h. */
13165$ac_includes_default
13166int
13167main ()
13168{
13169getpgrp (0);
13170 ;
13171 return 0;
13172}
13173_ACEOF
13174if ac_fn_c_try_compile "$LINENO"; then :
13175 ac_cv_func_getpgrp_void=no
13176else
13177 ac_cv_func_getpgrp_void=yes
13178fi
13179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 13180
5476a9a4
GM
13181fi
13182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
13183$as_echo "$ac_cv_func_getpgrp_void" >&6; }
13184if test $ac_cv_func_getpgrp_void = yes; then
067d23c9 13185
5476a9a4 13186$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
067d23c9 13187
5476a9a4 13188fi
067d23c9
KY
13189
13190
5476a9a4
GM
13191# UNIX98 PTYs.
13192for ac_func in grantpt
13193do :
13194 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13195if test "x$ac_cv_func_grantpt" = x""yes; then :
13196 cat >>confdefs.h <<_ACEOF
13197#define HAVE_GRANTPT 1
13198_ACEOF
f199cab1 13199
5476a9a4
GM
13200fi
13201done
f199cab1 13202
f199cab1 13203
5476a9a4
GM
13204# PTY-related GNU extensions.
13205for ac_func in getpt
13206do :
13207 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
13208if test "x$ac_cv_func_getpt" = x""yes; then :
13209 cat >>confdefs.h <<_ACEOF
13210#define HAVE_GETPT 1
13211_ACEOF
f199cab1 13212
5476a9a4
GM
13213fi
13214done
f199cab1 13215
f199cab1 13216
5476a9a4
GM
13217# Check this now, so that we will NOT find the above functions in ncurses.
13218# That is because we have not set up to link ncurses in lib-src.
13219# It's better to believe a function is not available
13220# than to expect to find it in ncurses.
13221# Also we need tputs and friends to be able to build at all.
13222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13223$as_echo_n "checking for library containing tputs... " >&6; }
13224# Run a test program that contains a call to tputs, a call that is
13225# never executed. This tests whether a pre-'main' dynamic linker
13226# works with the library. It's too much trouble to actually call
13227# tputs in the test program, due to portability hassles. When
13228# cross-compiling, assume the test program will run if it links.
f199cab1 13229
5476a9a4
GM
13230# Maybe curses should be tried earlier?
13231# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
13232for tputs_library in '' tinfo ncurses terminfo termcap curses; do
13233 OLIBS=$LIBS
13234 if test -z "$tputs_library"; then
13235 LIBS_TERMCAP=
13236 msg='none required'
13237 else
13238 LIBS_TERMCAP=-l$tputs_library
13239 msg=$LIBS_TERMCAP
13240 LIBS="$LIBS_TERMCAP $LIBS"
13241 fi
13242 if test "$cross_compiling" = yes; then :
13243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13244/* end confdefs.h. */
13245
5476a9a4
GM
13246 extern void tputs (const char *, int, int (*)(int));
13247 int main (int argc, char **argv)
13248 {
13249 if (argc == 10000)
13250 tputs (argv[0], 0, 0);
13251 return 0;
13252 }
13253
067d23c9
KY
13254_ACEOF
13255if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13256
067d23c9 13257else
5476a9a4 13258 msg=no
067d23c9
KY
13259fi
13260rm -f core conftest.err conftest.$ac_objext \
13261 conftest$ac_exeext conftest.$ac_ext
067d23c9 13262else
5476a9a4 13263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9
KY
13264/* end confdefs.h. */
13265
5476a9a4
GM
13266 extern void tputs (const char *, int, int (*)(int));
13267 int main (int argc, char **argv)
13268 {
13269 if (argc == 10000)
13270 tputs (argv[0], 0, 0);
13271 return 0;
13272 }
13273
067d23c9 13274_ACEOF
5476a9a4
GM
13275if ac_fn_c_try_run "$LINENO"; then :
13276
067d23c9 13277else
5476a9a4 13278 msg=no
067d23c9 13279fi
5476a9a4
GM
13280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13281 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 13282fi
5476a9a4
GM
13283
13284 LIBS=$OLIBS
13285 if test "X$msg" != Xno; then
13286 break
13287 fi
13288done
13289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
13290$as_echo "$msg" >&6; }
13291if test "X$msg" = Xno; then
13292 as_fn_error "The required function \`tputs' was not found in any library.
13293The following libraries were tried (in order):
13294 libtinfo, libncurses, libterminfo, libtermcap, libcurses
13295Please try installing whichever of these libraries is most appropriate
13296for your system, together with its header files.
13297For example, a libncurses-dev(el) or similar package." "$LINENO" 5
067d23c9
KY
13298fi
13299
5476a9a4
GM
13300## Use termcap instead of terminfo?
13301## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
13302TERMINFO=yes
13303## FIXME? In the cases below where we unconditionally set
13304## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
13305## if that was found above to have tputs.
13306## Should we use the gnu* logic everywhere?
13307case "$opsys" in
13308 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
13309 ## The ncurses library has been moved out of the System framework in
13310 ## Mac OS X 10.2. So if configure detects it, set the command-line
13311 ## option to use it.
13312 darwin) LIBS_TERMCAP="-lncurses" ;;
13313
13314 gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
13315
13316 freebsd)
13317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
13318$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
13319 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
067d23c9
KY
13320 $as_echo_n "(cached) " >&6
13321else
5476a9a4 13322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13323/* end confdefs.h. */
5476a9a4 13324#include <osreldate.h>
067d23c9
KY
13325int
13326main ()
13327{
5476a9a4
GM
13328#if __FreeBSD_version < 400000
13329fail;
13330#endif
13331
067d23c9
KY
13332 ;
13333 return 0;
13334}
13335_ACEOF
13336if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13337 emacs_cv_freebsd_terminfo=yes
067d23c9 13338else
5476a9a4 13339 emacs_cv_freebsd_terminfo=no
067d23c9
KY
13340fi
13341rm -f core conftest.err conftest.$ac_objext \
13342 conftest$ac_exeext conftest.$ac_ext
13343fi
5476a9a4
GM
13344
13345
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
13347$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
13348
13349 if test $emacs_cv_freebsd_terminfo = yes; then
13350 LIBS_TERMCAP="-lncurses"
13351 else
13352 TERMINFO=no
13353 LIBS_TERMCAP="-ltermcap"
13354 fi
13355 ;;
13356
13357 netbsd)
13358 if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
13359 TERMINFO=no
13360 LIBS_TERMCAP="-ltermcap"
13361 fi
13362 ;;
13363
13364 openbsd) LIBS_TERMCAP="-lncurses" ;;
13365
13366 ## hpux: Make sure we get select from libc rather than from libcurses
13367 ## because libcurses on HPUX 10.10 has a broken version of select.
13368 ## We used to use -lc -lcurses, but this may be cleaner.
13369 ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
13370 # set that way, now it uses the default). Isn't this a contradiction?
13371 hpux*) LIBS_TERMCAP="-ltermcap" ;;
13372
13373esac
13374
13375TERMCAP_OBJ=tparam.o
13376if test $TERMINFO = yes; then
13377
13378$as_echo "#define TERMINFO 1" >>confdefs.h
13379
13380 TERMCAP_OBJ=terminfo.o
067d23c9
KY
13381fi
13382
f199cab1 13383
067d23c9 13384
5476a9a4
GM
13385
13386# Do we have res_init, for detecting changes in /etc/resolv.conf?
13387# On Darwin, res_init appears not to be useful: see bug#562 and
13388# http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01467.html
13389resolv=no
13390
13391if test $opsys != darwin; then
13392
13393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13394/* end confdefs.h. */
13395#include <netinet/in.h>
13396#include <arpa/nameser.h>
13397#include <resolv.h>
067d23c9
KY
13398int
13399main ()
13400{
5476a9a4 13401return res_init();
067d23c9
KY
13402 ;
13403 return 0;
13404}
13405_ACEOF
13406if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13407 have_res_init=yes
067d23c9 13408else
5476a9a4 13409 have_res_init=no
067d23c9
KY
13410fi
13411rm -f core conftest.err conftest.$ac_objext \
13412 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13413 if test "$have_res_init" = no; then
13414 OLIBS="$LIBS"
13415 LIBS="$LIBS -lresolv"
13416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
13417$as_echo_n "checking for res_init with -lresolv... " >&6; }
13418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13419/* end confdefs.h. */
5476a9a4
GM
13420#include <netinet/in.h>
13421#include <arpa/nameser.h>
13422#include <resolv.h>
067d23c9
KY
13423int
13424main ()
13425{
5476a9a4 13426return res_init();
067d23c9
KY
13427 ;
13428 return 0;
13429}
13430_ACEOF
13431if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13432 have_res_init=yes
067d23c9 13433else
5476a9a4 13434 have_res_init=no
067d23c9
KY
13435fi
13436rm -f core conftest.err conftest.$ac_objext \
13437 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
13438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
13439$as_echo "$have_res_init" >&6; }
13440 if test "$have_res_init" = yes ; then
13441 resolv=yes
13442 fi
13443 LIBS="$OLIBS"
13444 fi
067d23c9 13445
5476a9a4
GM
13446 if test "$have_res_init" = yes; then
13447
13448$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
067d23c9 13449
5476a9a4 13450 fi
067d23c9 13451fi
5476a9a4
GM
13452# Do we need the Hesiod library to provide the support routines?
13453LIBHESIOD=
13454if test "$with_hesiod" != no ; then
13455 # Don't set $LIBS here -- see comments above. FIXME which comments?
13456 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
13457if test "x$ac_cv_func_res_send" = x""yes; then :
f199cab1 13458
5476a9a4
GM
13459else
13460 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
13461if test "x$ac_cv_func___res_send" = x""yes; then :
f199cab1 13462
5476a9a4
GM
13463else
13464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
13465$as_echo_n "checking for res_send in -lresolv... " >&6; }
13466if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
067d23c9
KY
13467 $as_echo_n "(cached) " >&6
13468else
13469 ac_check_lib_save_LIBS=$LIBS
5476a9a4 13470LIBS="-lresolv $LIBS"
067d23c9
KY
13471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13472/* end confdefs.h. */
13473
13474/* Override any GCC internal prototype to avoid an error.
13475 Use char because int might match the return type of a GCC
13476 builtin and then its argument prototype would still apply. */
13477#ifdef __cplusplus
13478extern "C"
13479#endif
5476a9a4 13480char res_send ();
067d23c9
KY
13481int
13482main ()
13483{
5476a9a4 13484return res_send ();
067d23c9
KY
13485 ;
13486 return 0;
13487}
13488_ACEOF
13489if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13490 ac_cv_lib_resolv_res_send=yes
067d23c9 13491else
5476a9a4 13492 ac_cv_lib_resolv_res_send=no
067d23c9
KY
13493fi
13494rm -f core conftest.err conftest.$ac_objext \
f199cab1
GM
13495 conftest$ac_exeext conftest.$ac_ext
13496LIBS=$ac_check_lib_save_LIBS
13497fi
5476a9a4
GM
13498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
13499$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
13500if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
13501 resolv=yes
13502else
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
13504$as_echo_n "checking for __res_send in -lresolv... " >&6; }
13505if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
f199cab1
GM
13506 $as_echo_n "(cached) " >&6
13507else
13508 ac_check_lib_save_LIBS=$LIBS
5476a9a4 13509LIBS="-lresolv $LIBS"
f199cab1
GM
13510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13511/* end confdefs.h. */
4717915f 13512
f199cab1
GM
13513/* Override any GCC internal prototype to avoid an error.
13514 Use char because int might match the return type of a GCC
13515 builtin and then its argument prototype would still apply. */
13516#ifdef __cplusplus
13517extern "C"
13518#endif
5476a9a4 13519char __res_send ();
f199cab1
GM
13520int
13521main ()
13522{
5476a9a4 13523return __res_send ();
f199cab1
GM
13524 ;
13525 return 0;
13526}
13527_ACEOF
13528if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 13529 ac_cv_lib_resolv___res_send=yes
f199cab1 13530else
5476a9a4 13531 ac_cv_lib_resolv___res_send=no
f199cab1
GM
13532fi
13533rm -f core conftest.err conftest.$ac_objext \
13534 conftest$ac_exeext conftest.$ac_ext
13535LIBS=$ac_check_lib_save_LIBS
13536fi
5476a9a4
GM
13537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
13538$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
13539if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
13540 resolv=yes
067d23c9 13541fi
f199cab1 13542
5476a9a4 13543fi
1f5d53eb 13544
5476a9a4 13545fi
067d23c9 13546
067d23c9
KY
13547fi
13548
5476a9a4
GM
13549 if test "$resolv" = yes ; then
13550 RESOLVLIB=-lresolv
13551 else
13552 RESOLVLIB=
13553 fi
13554 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
13555if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
13556
13557else
13558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
13559$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
13560if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
13561 $as_echo_n "(cached) " >&6
13562else
13563 ac_check_lib_save_LIBS=$LIBS
13564LIBS="-lhesiod $RESOLVLIB $LIBS"
13565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13566/* end confdefs.h. */
5476a9a4
GM
13567
13568/* Override any GCC internal prototype to avoid an error.
13569 Use char because int might match the return type of a GCC
13570 builtin and then its argument prototype would still apply. */
13571#ifdef __cplusplus
13572extern "C"
13573#endif
13574char hes_getmailhost ();
067d23c9
KY
13575int
13576main ()
13577{
5476a9a4 13578return hes_getmailhost ();
067d23c9
KY
13579 ;
13580 return 0;
13581}
13582_ACEOF
f199cab1 13583if ac_fn_c_try_link "$LINENO"; then :
5476a9a4
GM
13584 ac_cv_lib_hesiod_hes_getmailhost=yes
13585else
13586 ac_cv_lib_hesiod_hes_getmailhost=no
067d23c9 13587fi
f199cab1
GM
13588rm -f core conftest.err conftest.$ac_objext \
13589 conftest$ac_exeext conftest.$ac_ext
5476a9a4 13590LIBS=$ac_check_lib_save_LIBS
067d23c9 13591fi
5476a9a4
GM
13592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
13593$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
13594if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
13595 hesiod=yes
13596else
13597 :
067d23c9
KY
13598fi
13599
c5a68906 13600fi
f199cab1
GM
13601
13602
5476a9a4 13603 if test x"$hesiod" = xyes; then
f199cab1 13604
5476a9a4 13605$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
f199cab1 13606
5476a9a4 13607 LIBHESIOD=-lhesiod
c5a68906 13608 fi
5476a9a4 13609fi
4fc2b746 13610
4fc2b746 13611
5476a9a4
GM
13612# Do we need libresolv (due to res_init or Hesiod)?
13613if test "$resolv" = yes && test $opsys != darwin; then
4fc2b746 13614
5476a9a4 13615$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
4fc2b746 13616
5476a9a4
GM
13617 LIBRESOLV=-lresolv
13618else
13619 LIBRESOLV=
13620fi
4fc2b746 13621
4fc2b746 13622
5476a9a4
GM
13623# These tell us which Kerberos-related libraries to use.
13624COM_ERRLIB=
13625CRYPTOLIB=
13626KRB5LIB=
13627DESLIB=
13628KRB4LIB=
4fc2b746 13629
5476a9a4
GM
13630if test "${with_kerberos}" != no; then
13631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
13632$as_echo_n "checking for com_err in -lcom_err... " >&6; }
13633if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
13634 $as_echo_n "(cached) " >&6
13635else
13636 ac_check_lib_save_LIBS=$LIBS
13637LIBS="-lcom_err $LIBS"
13638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13639/* end confdefs.h. */
4fc2b746 13640
5476a9a4
GM
13641/* Override any GCC internal prototype to avoid an error.
13642 Use char because int might match the return type of a GCC
13643 builtin and then its argument prototype would still apply. */
13644#ifdef __cplusplus
13645extern "C"
13646#endif
13647char com_err ();
13648int
13649main ()
13650{
13651return com_err ();
13652 ;
13653 return 0;
13654}
13655_ACEOF
13656if ac_fn_c_try_link "$LINENO"; then :
13657 ac_cv_lib_com_err_com_err=yes
13658else
13659 ac_cv_lib_com_err_com_err=no
13660fi
13661rm -f core conftest.err conftest.$ac_objext \
13662 conftest$ac_exeext conftest.$ac_ext
13663LIBS=$ac_check_lib_save_LIBS
13664fi
13665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
13666$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
13667if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
13668 have_com_err=yes
13669else
13670 have_com_err=no
13671fi
f199cab1 13672
5476a9a4
GM
13673 if test $have_com_err = yes; then
13674 COM_ERRLIB=-lcom_err
13675 LIBS="$COM_ERRLIB $LIBS"
f199cab1 13676
5476a9a4 13677$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
f199cab1 13678
5476a9a4
GM
13679 fi
13680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
13681$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
13682if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
13683 $as_echo_n "(cached) " >&6
13684else
13685 ac_check_lib_save_LIBS=$LIBS
13686LIBS="-lcrypto $LIBS"
13687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13688/* end confdefs.h. */
f199cab1 13689
5476a9a4
GM
13690/* Override any GCC internal prototype to avoid an error.
13691 Use char because int might match the return type of a GCC
13692 builtin and then its argument prototype would still apply. */
13693#ifdef __cplusplus
13694extern "C"
13695#endif
13696char mit_des_cbc_encrypt ();
13697int
13698main ()
13699{
13700return mit_des_cbc_encrypt ();
13701 ;
13702 return 0;
13703}
13704_ACEOF
13705if ac_fn_c_try_link "$LINENO"; then :
13706 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
13707else
13708 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
13709fi
13710rm -f core conftest.err conftest.$ac_objext \
13711 conftest$ac_exeext conftest.$ac_ext
13712LIBS=$ac_check_lib_save_LIBS
13713fi
13714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
13715$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
13716if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
13717 have_crypto=yes
13718else
13719 have_crypto=no
13720fi
f199cab1 13721
5476a9a4
GM
13722 if test $have_crypto = yes; then
13723 CRYPTOLIB=-lcrypto
13724 LIBS="$CRYPTOLIB $LIBS"
f199cab1 13725
5476a9a4 13726$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
f199cab1 13727
5476a9a4
GM
13728 fi
13729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
13730$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
13731if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
13732 $as_echo_n "(cached) " >&6
13733else
13734 ac_check_lib_save_LIBS=$LIBS
13735LIBS="-lk5crypto $LIBS"
13736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13737/* end confdefs.h. */
f199cab1 13738
5476a9a4
GM
13739/* Override any GCC internal prototype to avoid an error.
13740 Use char because int might match the return type of a GCC
13741 builtin and then its argument prototype would still apply. */
13742#ifdef __cplusplus
13743extern "C"
13744#endif
13745char mit_des_cbc_encrypt ();
13746int
13747main ()
13748{
13749return mit_des_cbc_encrypt ();
13750 ;
13751 return 0;
13752}
13753_ACEOF
13754if ac_fn_c_try_link "$LINENO"; then :
13755 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
13756else
13757 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
13758fi
13759rm -f core conftest.err conftest.$ac_objext \
13760 conftest$ac_exeext conftest.$ac_ext
13761LIBS=$ac_check_lib_save_LIBS
13762fi
13763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
13764$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
13765if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
13766 have_k5crypto=yes
13767else
13768 have_k5crypto=no
4fc2b746 13769fi
4fc2b746 13770
5476a9a4
GM
13771 if test $have_k5crypto = yes; then
13772 CRYPTOLIB=-lk5crypto
13773 LIBS="$CRYPTOLIB $LIBS"
4fc2b746 13774
5476a9a4 13775$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
4fc2b746 13776
5476a9a4
GM
13777 fi
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
13779$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
13780if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
13781 $as_echo_n "(cached) " >&6
13782else
13783 ac_check_lib_save_LIBS=$LIBS
13784LIBS="-lkrb5 $LIBS"
13785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13786/* end confdefs.h. */
4fc2b746 13787
5476a9a4
GM
13788/* Override any GCC internal prototype to avoid an error.
13789 Use char because int might match the return type of a GCC
13790 builtin and then its argument prototype would still apply. */
13791#ifdef __cplusplus
13792extern "C"
13793#endif
13794char krb5_init_context ();
13795int
13796main ()
13797{
13798return krb5_init_context ();
13799 ;
13800 return 0;
13801}
13802_ACEOF
13803if ac_fn_c_try_link "$LINENO"; then :
13804 ac_cv_lib_krb5_krb5_init_context=yes
13805else
13806 ac_cv_lib_krb5_krb5_init_context=no
13807fi
13808rm -f core conftest.err conftest.$ac_objext \
13809 conftest$ac_exeext conftest.$ac_ext
13810LIBS=$ac_check_lib_save_LIBS
13811fi
13812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
13813$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
13814if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
13815 have_krb5=yes
13816else
13817 have_krb5=no
13818fi
f199cab1 13819
5476a9a4
GM
13820 if test $have_krb5=yes; then
13821 KRB5LIB=-lkrb5
13822 LIBS="$KRB5LIB $LIBS"
f199cab1 13823
5476a9a4 13824$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
f199cab1 13825
5476a9a4
GM
13826 fi
13827 if test "${with_kerberos5}" = no; then
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
13829$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
13830if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
f199cab1
GM
13831 $as_echo_n "(cached) " >&6
13832else
5476a9a4
GM
13833 ac_check_lib_save_LIBS=$LIBS
13834LIBS="-ldes425 $LIBS"
13835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 13836/* end confdefs.h. */
f199cab1 13837
5476a9a4
GM
13838/* Override any GCC internal prototype to avoid an error.
13839 Use char because int might match the return type of a GCC
13840 builtin and then its argument prototype would still apply. */
13841#ifdef __cplusplus
13842extern "C"
13843#endif
13844char des_cbc_encrypt ();
3e0be4ab
GM
13845int
13846main ()
13847{
5476a9a4 13848return des_cbc_encrypt ();
3e0be4ab
GM
13849 ;
13850 return 0;
13851}
13852_ACEOF
5476a9a4
GM
13853if ac_fn_c_try_link "$LINENO"; then :
13854 ac_cv_lib_des425_des_cbc_encrypt=yes
3e0be4ab 13855else
5476a9a4 13856 ac_cv_lib_des425_des_cbc_encrypt=no
3e0be4ab 13857fi
5476a9a4
GM
13858rm -f core conftest.err conftest.$ac_objext \
13859 conftest$ac_exeext conftest.$ac_ext
13860LIBS=$ac_check_lib_save_LIBS
4fc2b746 13861fi
5476a9a4
GM
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
13863$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
13864if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
13865 have_des425=yes
13866else
13867 have_des425=no
f199cab1 13868fi
6c051bab 13869
5476a9a4
GM
13870 if test $have_des425 = yes; then
13871 DESLIB=-ldes425
13872 LIBS="$DESLIB $LIBS"
6c051bab 13873
5476a9a4 13874$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
f199cab1 13875
5476a9a4
GM
13876 else
13877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
13878$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
13879if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
13880 $as_echo_n "(cached) " >&6
13881else
13882 ac_check_lib_save_LIBS=$LIBS
13883LIBS="-ldes $LIBS"
13884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13885/* end confdefs.h. */
f199cab1 13886
5476a9a4
GM
13887/* Override any GCC internal prototype to avoid an error.
13888 Use char because int might match the return type of a GCC
13889 builtin and then its argument prototype would still apply. */
13890#ifdef __cplusplus
13891extern "C"
13892#endif
13893char des_cbc_encrypt ();
13894int
13895main ()
13896{
13897return des_cbc_encrypt ();
13898 ;
13899 return 0;
13900}
13901_ACEOF
13902if ac_fn_c_try_link "$LINENO"; then :
13903 ac_cv_lib_des_des_cbc_encrypt=yes
13904else
13905 ac_cv_lib_des_des_cbc_encrypt=no
13906fi
13907rm -f core conftest.err conftest.$ac_objext \
13908 conftest$ac_exeext conftest.$ac_ext
13909LIBS=$ac_check_lib_save_LIBS
13910fi
13911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
13912$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
13913if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
13914 have_des=yes
13915else
13916 have_des=no
13917fi
f199cab1 13918
5476a9a4
GM
13919 if test $have_des = yes; then
13920 DESLIB=-ldes
13921 LIBS="$DESLIB $LIBS"
f199cab1 13922
5476a9a4 13923$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
f199cab1 13924
5476a9a4
GM
13925 fi
13926 fi
13927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
13928$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
13929if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
942f733f
PE
13930 $as_echo_n "(cached) " >&6
13931else
5476a9a4
GM
13932 ac_check_lib_save_LIBS=$LIBS
13933LIBS="-lkrb4 $LIBS"
13934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 13935/* end confdefs.h. */
942f733f 13936
5476a9a4
GM
13937/* Override any GCC internal prototype to avoid an error.
13938 Use char because int might match the return type of a GCC
13939 builtin and then its argument prototype would still apply. */
13940#ifdef __cplusplus
13941extern "C"
13942#endif
13943char krb_get_cred ();
942f733f
PE
13944int
13945main ()
13946{
5476a9a4 13947return krb_get_cred ();
942f733f
PE
13948 ;
13949 return 0;
13950}
13951_ACEOF
5476a9a4
GM
13952if ac_fn_c_try_link "$LINENO"; then :
13953 ac_cv_lib_krb4_krb_get_cred=yes
13954else
13955 ac_cv_lib_krb4_krb_get_cred=no
13956fi
13957rm -f core conftest.err conftest.$ac_objext \
13958 conftest$ac_exeext conftest.$ac_ext
13959LIBS=$ac_check_lib_save_LIBS
13960fi
13961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
13962$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
13963if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
13964 have_krb4=yes
13965else
13966 have_krb4=no
13967fi
13968
13969 if test $have_krb4 = yes; then
13970 KRB4LIB=-lkrb4
13971 LIBS="$KRB4LIB $LIBS"
13972
13973$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
13974
13975 else
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
13977$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
13978if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
13979 $as_echo_n "(cached) " >&6
3e0be4ab 13980else
5476a9a4
GM
13981 ac_check_lib_save_LIBS=$LIBS
13982LIBS="-lkrb $LIBS"
13983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 13984/* end confdefs.h. */
942f733f 13985
5476a9a4
GM
13986/* Override any GCC internal prototype to avoid an error.
13987 Use char because int might match the return type of a GCC
13988 builtin and then its argument prototype would still apply. */
13989#ifdef __cplusplus
13990extern "C"
13991#endif
13992char krb_get_cred ();
942f733f
PE
13993int
13994main ()
13995{
5476a9a4 13996return krb_get_cred ();
942f733f
PE
13997 ;
13998 return 0;
13999}
14000_ACEOF
5476a9a4
GM
14001if ac_fn_c_try_link "$LINENO"; then :
14002 ac_cv_lib_krb_krb_get_cred=yes
942f733f 14003else
5476a9a4 14004 ac_cv_lib_krb_krb_get_cred=no
942f733f 14005fi
5476a9a4
GM
14006rm -f core conftest.err conftest.$ac_objext \
14007 conftest$ac_exeext conftest.$ac_ext
14008LIBS=$ac_check_lib_save_LIBS
3e0be4ab 14009fi
5476a9a4
GM
14010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14011$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14012if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14013 have_krb=yes
14014else
14015 have_krb=no
942f733f 14016fi
f199cab1 14017
5476a9a4
GM
14018 if test $have_krb = yes; then
14019 KRB4LIB=-lkrb
14020 LIBS="$KRB4LIB $LIBS"
14021
14022$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
14023
14024 fi
14025 fi
f199cab1
GM
14026 fi
14027
5476a9a4
GM
14028 if test "${with_kerberos5}" != no; then
14029 for ac_header in krb5.h
14030do :
14031 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14032if test "x$ac_cv_header_krb5_h" = x""yes; then :
14033 cat >>confdefs.h <<_ACEOF
14034#define HAVE_KRB5_H 1
14035_ACEOF
14036 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14037"
14038if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
14039
f199cab1 14040cat >>confdefs.h <<_ACEOF
5476a9a4 14041#define HAVE_KRB5_ERROR_TEXT 1
f199cab1
GM
14042_ACEOF
14043
14044
5476a9a4
GM
14045fi
14046ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14047"
14048if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
f199cab1 14049
5476a9a4
GM
14050cat >>confdefs.h <<_ACEOF
14051#define HAVE_KRB5_ERROR_E_TEXT 1
14052_ACEOF
f199cab1
GM
14053
14054
5476a9a4 14055fi
f199cab1 14056
5476a9a4 14057fi
f199cab1 14058
5476a9a4 14059done
f199cab1 14060
5476a9a4
GM
14061 else
14062 for ac_header in des.h
14063do :
14064 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14065if test "x$ac_cv_header_des_h" = x""yes; then :
14066 cat >>confdefs.h <<_ACEOF
14067#define HAVE_DES_H 1
14068_ACEOF
f199cab1 14069
5476a9a4
GM
14070else
14071 for ac_header in kerberosIV/des.h
14072do :
14073 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14074if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14075 cat >>confdefs.h <<_ACEOF
14076#define HAVE_KERBEROSIV_DES_H 1
14077_ACEOF
f199cab1 14078
5476a9a4
GM
14079else
14080 for ac_header in kerberos/des.h
14081do :
14082 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14083if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14084 cat >>confdefs.h <<_ACEOF
14085#define HAVE_KERBEROS_DES_H 1
14086_ACEOF
f199cab1 14087
5476a9a4 14088fi
f199cab1 14089
5476a9a4
GM
14090done
14091
14092fi
14093
14094done
14095
14096fi
14097
14098done
14099
14100 for ac_header in krb.h
f199cab1 14101do :
5476a9a4
GM
14102 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14103if test "x$ac_cv_header_krb_h" = x""yes; then :
f199cab1 14104 cat >>confdefs.h <<_ACEOF
5476a9a4
GM
14105#define HAVE_KRB_H 1
14106_ACEOF
14107
14108else
14109 for ac_header in kerberosIV/krb.h
14110do :
14111 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14112if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
14113 cat >>confdefs.h <<_ACEOF
14114#define HAVE_KERBEROSIV_KRB_H 1
14115_ACEOF
14116
14117else
14118 for ac_header in kerberos/krb.h
14119do :
14120 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14121if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14122 cat >>confdefs.h <<_ACEOF
14123#define HAVE_KERBEROS_KRB_H 1
f199cab1 14124_ACEOF
942f733f 14125
3e0be4ab 14126fi
942f733f 14127
f199cab1
GM
14128done
14129
5476a9a4
GM
14130fi
14131
14132done
14133
14134fi
14135
14136done
14137
14138 fi
14139 for ac_header in com_err.h
f199cab1 14140do :
5476a9a4
GM
14141 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14142if test "x$ac_cv_header_com_err_h" = x""yes; then :
f199cab1 14143 cat >>confdefs.h <<_ACEOF
5476a9a4 14144#define HAVE_COM_ERR_H 1
f199cab1
GM
14145_ACEOF
14146
3e0be4ab 14147fi
f199cab1 14148
5476a9a4 14149done
3e0be4ab
GM
14150
14151fi
14152
f199cab1
GM
14153
14154
14155
14156
f199cab1
GM
14157
14158
14159
14160
14161
5476a9a4
GM
14162 for ac_func in $ac_func_list
14163do :
14164 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14165ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14166eval as_val=\$$as_ac_var
14167 if test "x$as_val" = x""yes; then :
14168 cat >>confdefs.h <<_ACEOF
14169#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14170_ACEOF
14171
14172fi
14173done
14174
f199cab1
GM
14175
14176
14177
5476a9a4
GM
14178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14179$as_echo_n "checking whether localtime caches TZ... " >&6; }
14180if test "${emacs_cv_localtime_cache+set}" = set; then :
14181 $as_echo_n "(cached) " >&6
14182else
14183 if test x$ac_cv_func_tzset = xyes; then
14184if test "$cross_compiling" = yes; then :
14185 # If we have tzset, assume the worst when cross-compiling.
14186emacs_cv_localtime_cache=yes
14187else
14188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14189/* end confdefs.h. */
14190#include <time.h>
14191char TZ_GMT0[] = "TZ=GMT0";
14192char TZ_PST8[] = "TZ=PST8";
14193main()
14194{
14195 time_t now = time ((time_t *) 0);
14196 int hour_GMT0, hour_unset;
14197 if (putenv (TZ_GMT0) != 0)
14198 exit (1);
14199 hour_GMT0 = localtime (&now)->tm_hour;
14200 unsetenv("TZ");
14201 hour_unset = localtime (&now)->tm_hour;
14202 if (putenv (TZ_PST8) != 0)
14203 exit (1);
14204 if (localtime (&now)->tm_hour == hour_GMT0)
14205 exit (1);
14206 unsetenv("TZ");
14207 if (localtime (&now)->tm_hour != hour_unset)
14208 exit (1);
14209 exit (0);
14210}
14211_ACEOF
14212if ac_fn_c_try_run "$LINENO"; then :
14213 emacs_cv_localtime_cache=no
14214else
14215 emacs_cv_localtime_cache=yes
14216fi
14217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14218 conftest.$ac_objext conftest.beam conftest.$ac_ext
14219fi
f199cab1 14220
5476a9a4
GM
14221else
14222 # If we lack tzset, report that localtime does not cache TZ,
14223 # since we can't invalidate the cache if we don't have tzset.
14224 emacs_cv_localtime_cache=no
14225fi
14226fi
14227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14228$as_echo "$emacs_cv_localtime_cache" >&6; }
14229if test $emacs_cv_localtime_cache = yes; then
f199cab1 14230
5476a9a4 14231$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
f199cab1 14232
5476a9a4 14233fi
f199cab1 14234
5476a9a4
GM
14235ok_so_far=yes
14236ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
14237if test "x$ac_cv_func_socket" = x""yes; then :
3e0be4ab 14238
5476a9a4
GM
14239else
14240 ok_so_far=no
14241fi
f199cab1 14242
5476a9a4
GM
14243if test $ok_so_far = yes; then
14244 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14245if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
f199cab1 14246
5476a9a4
GM
14247else
14248 ok_so_far=no
14249fi
f199cab1
GM
14250
14251
5476a9a4
GM
14252fi
14253if test $ok_so_far = yes; then
14254 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14255if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
f199cab1 14256
5476a9a4
GM
14257else
14258 ok_so_far=no
14259fi
f199cab1
GM
14260
14261
5476a9a4
GM
14262fi
14263if test $ok_so_far = yes; then
f199cab1 14264
5476a9a4 14265$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
f199cab1 14266
5476a9a4 14267fi
f199cab1 14268
5476a9a4 14269if test -f /usr/lpp/X11/bin/smt.exp; then
942f733f 14270
5476a9a4 14271$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
942f733f 14272
942f733f 14273fi
3e0be4ab 14274
5476a9a4
GM
14275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
14276$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
14277if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14279$as_echo "yes" >&6; }
14280
14281$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
3e0be4ab 14282
5476a9a4
GM
14283else
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14285$as_echo "no" >&6; }
14286fi
3e0be4ab 14287
5476a9a4
GM
14288ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14289if test "x$ac_cv_type_pid_t" = x""yes; then :
3e0be4ab 14290
5476a9a4 14291else
3e0be4ab 14292
5476a9a4
GM
14293cat >>confdefs.h <<_ACEOF
14294#define pid_t int
14295_ACEOF
f199cab1 14296
5476a9a4 14297fi
f199cab1 14298
5476a9a4
GM
14299for ac_header in vfork.h
14300do :
14301 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14302if test "x$ac_cv_header_vfork_h" = x""yes; then :
14303 cat >>confdefs.h <<_ACEOF
14304#define HAVE_VFORK_H 1
14305_ACEOF
f199cab1 14306
5476a9a4 14307fi
f199cab1 14308
5476a9a4 14309done
f199cab1 14310
5476a9a4
GM
14311for ac_func in fork vfork
14312do :
14313 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14314ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14315eval as_val=\$$as_ac_var
14316 if test "x$as_val" = x""yes; then :
14317 cat >>confdefs.h <<_ACEOF
14318#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14319_ACEOF
f199cab1 14320
5476a9a4
GM
14321fi
14322done
f199cab1 14323
5476a9a4
GM
14324if test "x$ac_cv_func_fork" = xyes; then
14325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
14326$as_echo_n "checking for working fork... " >&6; }
14327if test "${ac_cv_func_fork_works+set}" = set; then :
14328 $as_echo_n "(cached) " >&6
14329else
14330 if test "$cross_compiling" = yes; then :
14331 ac_cv_func_fork_works=cross
14332else
14333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334/* end confdefs.h. */
14335$ac_includes_default
14336int
14337main ()
14338{
f199cab1 14339
5476a9a4
GM
14340 /* By Ruediger Kuhlmann. */
14341 return fork () < 0;
f199cab1 14342
5476a9a4
GM
14343 ;
14344 return 0;
14345}
14346_ACEOF
14347if ac_fn_c_try_run "$LINENO"; then :
14348 ac_cv_func_fork_works=yes
14349else
14350 ac_cv_func_fork_works=no
14351fi
14352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14353 conftest.$ac_objext conftest.beam conftest.$ac_ext
14354fi
f199cab1 14355
5476a9a4
GM
14356fi
14357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
14358$as_echo "$ac_cv_func_fork_works" >&6; }
f199cab1 14359
5476a9a4
GM
14360else
14361 ac_cv_func_fork_works=$ac_cv_func_fork
14362fi
14363if test "x$ac_cv_func_fork_works" = xcross; then
14364 case $host in
14365 *-*-amigaos* | *-*-msdosdjgpp*)
14366 # Override, as these systems have only a dummy fork() stub
14367 ac_cv_func_fork_works=no
14368 ;;
14369 *)
14370 ac_cv_func_fork_works=yes
14371 ;;
14372 esac
14373 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
14374$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
14375fi
14376ac_cv_func_vfork_works=$ac_cv_func_vfork
14377if test "x$ac_cv_func_vfork" = xyes; then
14378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
14379$as_echo_n "checking for working vfork... " >&6; }
14380if test "${ac_cv_func_vfork_works+set}" = set; then :
f199cab1
GM
14381 $as_echo_n "(cached) " >&6
14382else
14383 if test "$cross_compiling" = yes; then :
5476a9a4 14384 ac_cv_func_vfork_works=cross
f199cab1
GM
14385else
14386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14387/* end confdefs.h. */
5476a9a4
GM
14388/* Thanks to Paul Eggert for this test. */
14389$ac_includes_default
14390#include <sys/wait.h>
14391#ifdef HAVE_VFORK_H
14392# include <vfork.h>
f199cab1 14393#endif
5476a9a4
GM
14394/* On some sparc systems, changes by the child to local and incoming
14395 argument registers are propagated back to the parent. The compiler
14396 is told about this with #include <vfork.h>, but some compilers
14397 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
14398 static variable whose address is put into a register that is
14399 clobbered by the vfork. */
14400static void
14401#ifdef __cplusplus
14402sparc_address_test (int arg)
14403# else
14404sparc_address_test (arg) int arg;
f199cab1 14405#endif
5476a9a4
GM
14406{
14407 static pid_t child;
14408 if (!child) {
14409 child = vfork ();
14410 if (child < 0) {
14411 perror ("vfork");
14412 _exit(2);
14413 }
14414 if (!child) {
14415 arg = getpid();
14416 write(-1, "", 0);
14417 _exit (arg);
14418 }
14419 }
14420}
f199cab1 14421
5476a9a4
GM
14422int
14423main ()
14424{
14425 pid_t parent = getpid ();
14426 pid_t child;
f199cab1 14427
5476a9a4 14428 sparc_address_test (0);
f199cab1 14429
5476a9a4 14430 child = vfork ();
3e0be4ab 14431
5476a9a4
GM
14432 if (child == 0) {
14433 /* Here is another test for sparc vfork register problems. This
14434 test uses lots of local variables, at least as many local
14435 variables as main has allocated so far including compiler
14436 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
14437 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
14438 reuse the register of parent for one of the local variables,
14439 since it will think that parent can't possibly be used any more
14440 in this routine. Assigning to the local variable will thus
14441 munge parent in the parent process. */
14442 pid_t
14443 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14444 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14445 /* Convince the compiler that p..p7 are live; otherwise, it might
14446 use the same hardware register for all 8 local variables. */
14447 if (p != p1 || p != p2 || p != p3 || p != p4
14448 || p != p5 || p != p6 || p != p7)
14449 _exit(1);
3e0be4ab 14450
5476a9a4
GM
14451 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14452 from child file descriptors. If the child closes a descriptor
14453 before it execs or exits, this munges the parent's descriptor
14454 as well. Test for this by closing stdout in the child. */
14455 _exit(close(fileno(stdout)) != 0);
14456 } else {
14457 int status;
14458 struct stat st;
3e0be4ab 14459
5476a9a4
GM
14460 while (wait(&status) != child)
14461 ;
14462 return (
14463 /* Was there some problem with vforking? */
14464 child < 0
3e0be4ab 14465
5476a9a4
GM
14466 /* Did the child fail? (This shouldn't happen.) */
14467 || status
14468
14469 /* Did the vfork/compiler bug occur? */
14470 || parent != getpid()
14471
14472 /* Did the file descriptor bug occur? */
14473 || fstat(fileno(stdout), &st) != 0
14474 );
14475 }
f199cab1 14476}
5476a9a4
GM
14477_ACEOF
14478if ac_fn_c_try_run "$LINENO"; then :
14479 ac_cv_func_vfork_works=yes
14480else
14481 ac_cv_func_vfork_works=no
14482fi
14483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14484 conftest.$ac_objext conftest.beam conftest.$ac_ext
14485fi
14486
14487fi
14488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
14489$as_echo "$ac_cv_func_vfork_works" >&6; }
14490
14491fi;
14492if test "x$ac_cv_func_fork_works" = xcross; then
14493 ac_cv_func_vfork_works=$ac_cv_func_vfork
14494 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
14495$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
14496fi
14497
14498if test "x$ac_cv_func_vfork_works" = xyes; then
3e0be4ab 14499
5476a9a4 14500$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
3e0be4ab 14501
5476a9a4 14502else
3e0be4ab 14503
5476a9a4 14504$as_echo "#define vfork fork" >>confdefs.h
942f733f 14505
5476a9a4
GM
14506fi
14507if test "x$ac_cv_func_fork_works" = xyes; then
942f733f 14508
5476a9a4 14509$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
942f733f 14510
5476a9a4 14511fi
f199cab1 14512
f199cab1 14513
5476a9a4
GM
14514for ac_func in snprintf
14515do :
14516 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
14517if test "x$ac_cv_func_snprintf" = x""yes; then :
14518 cat >>confdefs.h <<_ACEOF
14519#define HAVE_SNPRINTF 1
14520_ACEOF
14521
14522fi
14523done
14524
942f733f 14525
5476a9a4
GM
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
14527$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
14528if test "${emacs_cv_langinfo_codeset+set}" = set; then :
14529 $as_echo_n "(cached) " >&6
14530else
14531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14532/* end confdefs.h. */
14533#include <langinfo.h>
3e0be4ab
GM
14534int
14535main ()
14536{
5476a9a4
GM
14537char* cs = nl_langinfo(CODESET);
14538 ;
14539 return 0;
14540}
14541_ACEOF
14542if ac_fn_c_try_link "$LINENO"; then :
14543 emacs_cv_langinfo_codeset=yes
14544else
14545 emacs_cv_langinfo_codeset=no
14546fi
14547rm -f core conftest.err conftest.$ac_objext \
14548 conftest$ac_exeext conftest.$ac_ext
f199cab1 14549
5476a9a4
GM
14550fi
14551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
14552$as_echo "$emacs_cv_langinfo_codeset" >&6; }
14553if test $emacs_cv_langinfo_codeset = yes; then
f199cab1 14554
5476a9a4 14555$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
f199cab1 14556
5476a9a4 14557fi
f199cab1 14558
5476a9a4
GM
14559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
14560$as_echo_n "checking for mbstate_t... " >&6; }
14561if test "${ac_cv_type_mbstate_t+set}" = set; then :
14562 $as_echo_n "(cached) " >&6
14563else
14564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14565/* end confdefs.h. */
14566$ac_includes_default
14567# include <wchar.h>
14568int
14569main ()
14570{
14571mbstate_t x; return sizeof x;
14572 ;
14573 return 0;
3e0be4ab 14574}
942f733f 14575_ACEOF
5476a9a4
GM
14576if ac_fn_c_try_compile "$LINENO"; then :
14577 ac_cv_type_mbstate_t=yes
3e0be4ab 14578else
5476a9a4 14579 ac_cv_type_mbstate_t=no
942f733f 14580fi
5476a9a4 14581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 14582fi
5476a9a4
GM
14583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
14584$as_echo "$ac_cv_type_mbstate_t" >&6; }
14585 if test $ac_cv_type_mbstate_t = yes; then
f199cab1 14586
5476a9a4 14587$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
f199cab1 14588
5476a9a4 14589 else
f199cab1 14590
5476a9a4 14591$as_echo "#define mbstate_t int" >>confdefs.h
f199cab1 14592
5476a9a4
GM
14593 fi
14594
14595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
14596$as_echo_n "checking for C restricted array declarations... " >&6; }
14597if test "${emacs_cv_c_restrict_arr+set}" = set; then :
14598 $as_echo_n "(cached) " >&6
14599else
14600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14601/* end confdefs.h. */
14602void fred (int x[__restrict]);
14603int
14604main ()
14605{
14606
14607 ;
14608 return 0;
14609}
14610_ACEOF
14611if ac_fn_c_try_compile "$LINENO"; then :
14612 emacs_cv_c_restrict_arr=yes
14613else
14614 emacs_cv_c_restrict_arr=no
14615fi
14616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14617fi
14618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
14619$as_echo "$emacs_cv_c_restrict_arr" >&6; }
14620if test "$emacs_cv_c_restrict_arr" = yes; then
f199cab1 14621
5476a9a4 14622$as_echo "#define __restrict_arr __restrict" >>confdefs.h
f199cab1 14623
5476a9a4 14624fi
f199cab1
GM
14625
14626
14627
5476a9a4 14628$as_echo "#define CLASH_DETECTION 1" >>confdefs.h
f199cab1
GM
14629
14630
5476a9a4 14631## Note: PTYs are broken on darwin <6. Use at your own risk.
f199cab1 14632
5476a9a4 14633$as_echo "#define HAVE_PTYS 1" >>confdefs.h
f199cab1
GM
14634
14635
14636
5476a9a4 14637$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
f199cab1 14638
942f733f 14639
942f733f
PE
14640
14641
f199cab1 14642
5476a9a4
GM
14643case $opsys in
14644 aix4-2)
14645 if test x$ac_cv_lib_Xmu_XmuConvertStandardSelection != xyes; then
14646 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 14647
5476a9a4
GM
14648 fi
14649 ;;
f199cab1 14650
5476a9a4
GM
14651 hpux*)
14652 $as_echo "#define NO_EDITRES 1" >>confdefs.h
f199cab1 14653
5476a9a4
GM
14654 ;;
14655esac
f199cab1
GM
14656
14657
5476a9a4
GM
14658case $opsys in
14659 darwin | gnu | hpux* | *bsd )
f199cab1 14660
5476a9a4 14661$as_echo "#define NO_TERMIO 1" >>confdefs.h
f199cab1 14662
5476a9a4 14663 ;;
f199cab1 14664
5476a9a4 14665 irix6-5 | sol2* | unixware )
f199cab1 14666
5476a9a4 14667$as_echo "#define NSIG_MINIMUM 32" >>confdefs.h
f199cab1 14668
5476a9a4
GM
14669 ;;
14670esac
f199cab1
GM
14671
14672
5476a9a4
GM
14673case $opsys in
14674 hpux* | irix6-5 | openbsd | sol2* | unixware )
3e0be4ab 14675
5476a9a4 14676$as_echo "#define BROKEN_SIGIO 1" >>confdefs.h
f199cab1 14677
5476a9a4 14678 ;;
f199cab1 14679
5476a9a4 14680 aix4-2)
f199cab1 14681
5476a9a4 14682$as_echo "#define BROKEN_FIONREAD 1" >>confdefs.h
f199cab1
GM
14683
14684
5476a9a4 14685$as_echo "#define BROKEN_SIGAIO 1" >>confdefs.h
f199cab1
GM
14686
14687
5476a9a4 14688$as_echo "#define BROKEN_SIGPOLL 1" >>confdefs.h
f199cab1
GM
14689
14690
5476a9a4 14691$as_echo "#define BROKEN_SIGPTY 1" >>confdefs.h
f199cab1 14692
f199cab1 14693
067d23c9 14694
5476a9a4 14695$as_echo "#define BROKEN_GET_CURRENT_DIR_NAME 1" >>confdefs.h
067d23c9 14696
5476a9a4 14697 ;;
067d23c9 14698
5476a9a4 14699 freebsd)
f199cab1 14700
5476a9a4 14701$as_echo "#define BROKEN_PTY_READ_AFTER_EAGAIN 1" >>confdefs.h
f199cab1 14702
5476a9a4 14703 ;;
f199cab1 14704
5476a9a4 14705 darwin)
f199cab1 14706
5476a9a4 14707$as_echo "#define NO_ABORT 1" >>confdefs.h
f199cab1 14708
5476a9a4
GM
14709 ;;
14710esac
f199cab1 14711
5476a9a4
GM
14712case $opsys in
14713 gnu-* | sol2-10 )
f199cab1 14714
5476a9a4 14715$as_echo "#define HAVE_PROCFS 1" >>confdefs.h
f199cab1 14716
5476a9a4
GM
14717 ;;
14718esac
f199cab1 14719
5476a9a4
GM
14720case $opsys in
14721 darwin | freebsd | netbsd | openbsd )
f199cab1 14722
5476a9a4 14723$as_echo "#define DONT_REOPEN_PTY 1" >>confdefs.h
f199cab1 14724
5476a9a4
GM
14725 ;;
14726esac
f199cab1 14727
5476a9a4
GM
14728case $opsys in
14729 netbsd | openbsd) sound_device="/dev/audio" ;;
14730 *) sound_device="/dev/dsp" ;;
14731esac
f199cab1 14732
f199cab1 14733
5476a9a4
GM
14734cat >>confdefs.h <<_ACEOF
14735#define DEFAULT_SOUND_DEVICE "$sound_device"
14736_ACEOF
f199cab1
GM
14737
14738
14739
5476a9a4
GM
14740case $opsys in
14741 darwin | gnu-linux | gnu-kfreebsd )
f199cab1 14742
5476a9a4 14743$as_echo "#define INTERRUPT_INPUT 1" >>confdefs.h
f199cab1 14744
5476a9a4
GM
14745 ;;
14746esac
f199cab1 14747
f199cab1 14748
5476a9a4
GM
14749case $opsys in
14750 cygwin|gnu|gnu-linux|gnu-kfreebsd|irix6-5|freebsd|netbsd|openbsd)
f199cab1 14751
5476a9a4 14752$as_echo "#define NARROWPROTO 1" >>confdefs.h
067d23c9 14753
5476a9a4
GM
14754 ;;
14755esac
f199cab1
GM
14756
14757
067d23c9 14758
1f5d53eb
PE
14759
14760
f199cab1 14761
f199cab1 14762
7d2a1c5e 14763
5476a9a4
GM
14764case $opsys in
14765 aix4-2 )
14766 $as_echo "#define PTY_ITERATION int c; for (c = 0; !c ; c++) " >>confdefs.h
f199cab1 14767
5476a9a4 14768 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptc\"); " >>confdefs.h
f199cab1 14769
5476a9a4 14770 $as_echo "#define PTY_TTY_NAME_SPRINTF strcpy (pty_name, ttyname (fd)); " >>confdefs.h
7d2a1c5e 14771
5476a9a4 14772 ;;
7d2a1c5e 14773
5476a9a4
GM
14774 cygwin )
14775 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
7d2a1c5e 14776
5476a9a4 14777 $as_echo "#define PTY_OPEN do { int dummy; SIGMASKTYPE mask; mask = sigblock (sigmask (SIGCHLD)); if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) fd = -1; sigsetmask (mask); if (fd >= 0) emacs_close (dummy); } while (0) " >>confdefs.h
f199cab1 14778
5476a9a4 14779 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
7d2a1c5e 14780
5476a9a4 14781 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
f199cab1 14782
5476a9a4 14783 ;;
f199cab1 14784
5476a9a4
GM
14785 darwin )
14786 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
7d2a1c5e 14787
5476a9a4 14788 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
7d2a1c5e 14789
5476a9a4 14790 $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 14791
5476a9a4 14792 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
f199cab1 14793
5476a9a4 14794 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
f199cab1 14795
5476a9a4 14796 ;;
f199cab1 14797
5476a9a4
GM
14798 gnu | freebsd | netbsd | openbsd )
14799 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 14800
5476a9a4 14801 ;;
f199cab1 14802
5476a9a4
GM
14803 gnu-linux | gnu-kfreebsd )
14804 if test "x$ac_cv_func_grantpt" = xyes; then
f199cab1 14805
5476a9a4 14806$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
f199cab1 14807
5476a9a4 14808 $as_echo "#define PTY_ITERATION int i; for (i = 0; i < 1; i++) " >>confdefs.h
f199cab1 14809
5476a9a4 14810 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname; sigblock (sigmask (SIGCHLD)); if (grantpt (fd) == -1 || unlockpt (fd) == -1 || !(ptyname = ptsname(fd))) { sigunblock (sigmask (SIGCHLD)); close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); sigunblock (sigmask (SIGCHLD)); } " >>confdefs.h
f199cab1 14811
5476a9a4
GM
14812 if test "x$ac_cv_func_getpt" = xyes; then
14813 $as_echo "#define PTY_OPEN fd = getpt ()" >>confdefs.h
f199cab1 14814
5476a9a4 14815 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
f199cab1 14816
5476a9a4
GM
14817 else
14818 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
f199cab1 14819
5476a9a4
GM
14820 fi
14821 else
14822 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 14823
5476a9a4
GM
14824 fi
14825 ;;
f199cab1 14826
5476a9a4
GM
14827 hpux*)
14828 $as_echo "#define FIRST_PTY_LETTER 'p'" >>confdefs.h
f199cab1 14829
5476a9a4 14830 $as_echo "#define PTY_NAME_SPRINTF sprintf (pty_name, \"/dev/ptym/pty%c%x\", c, i); " >>confdefs.h
f199cab1 14831
5476a9a4 14832 $as_echo "#define PTY_TTY_NAME_SPRINTF sprintf (pty_name, \"/dev/pty/tty%c%x\", c, i); " >>confdefs.h
f199cab1 14833
5476a9a4 14834 ;;
f199cab1 14835
5476a9a4
GM
14836 irix6-5 )
14837 $as_echo "#define PTY_ITERATION /**/" >>confdefs.h
f199cab1 14838
5476a9a4 14839 $as_echo "#define FIRST_PTY_LETTER 'q'" >>confdefs.h
f199cab1 14840
5476a9a4 14841 $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 14842
5476a9a4 14843 $as_echo "#define PTY_NAME_SPRINTF " >>confdefs.h
f199cab1 14844
5476a9a4 14845 $as_echo "#define PTY_TTY_NAME_SPRINTF " >>confdefs.h
f199cab1 14846
5476a9a4 14847 ;;
f199cab1 14848
5476a9a4
GM
14849 sol2* )
14850 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock (sigmask (SIGCLD)); if (grantpt (fd) == -1) { emacs_close (fd); return -1; } sigunblock (sigmask (SIGCLD)); if (unlockpt (fd) == -1) { emacs_close (fd); return -1; } if (!(ptyname = ptsname (fd))) { emacs_close (fd); return -1; } snprintf (pty_name, sizeof pty_name, \"%s\", ptyname); } " >>confdefs.h
f199cab1 14851
5476a9a4 14852 ;;
f199cab1 14853
5476a9a4
GM
14854 unixware )
14855 $as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptsname (int), *ptyname; sigblock(sigmask(SIGCLD)); if (grantpt(fd) == -1) fatal(\"could not grant slave pty\"); sigunblock(sigmask(SIGCLD)); 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
14856
14857 ;;
14858esac
14859
14860
14861case $opsys in
14862 sol2* | unixware )
14863 $as_echo "#define FIRST_PTY_LETTER 'z'" >>confdefs.h
14864
14865 $as_echo "#define PTY_NAME_SPRINTF strcpy (pty_name, \"/dev/ptmx\"); " >>confdefs.h
14866
14867
14868$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
14869
14870 ;;
14871esac
14872
14873
14874
14875
14876case $opsys in
14877 aix4-2 | cygwin | gnu | irix6-5 | freebsd | netbsd | openbsd )
14878 $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
14879
14880 ;;
14881
14882 gnu-linux | gnu-kfreebsd )
14883
14884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signals via characters" >&5
14885$as_echo_n "checking for signals via characters... " >&6; }
14886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 14887/* end confdefs.h. */
5476a9a4
GM
14888
14889#include <linux/version.h>
14890#if LINUX_VERSION_CODE < 0x20400
14891# error "Linux version too old"
14892#endif
14893
3e0be4ab
GM
14894int
14895main ()
14896{
f199cab1 14897
3e0be4ab
GM
14898 ;
14899 return 0;
14900}
067d23c9 14901_ACEOF
5476a9a4
GM
14902if ac_fn_c_try_cpp "$LINENO"; then :
14903 emacs_signals_via_chars=yes
1f5d53eb 14904else
5476a9a4 14905 emacs_signals_via_chars=no
067d23c9 14906fi
5476a9a4 14907rm -f conftest.err conftest.$ac_ext
067d23c9 14908
5476a9a4
GM
14909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_signals_via_chars" >&5
14910$as_echo "$emacs_signals_via_chars" >&6; }
14911 test $emacs_signals_via_chars = yes && $as_echo "#define SIGNALS_VIA_CHARACTERS 1" >>confdefs.h
14912
14913 ;;
14914esac
14915
14916
14917
14918
14919
14920
14921case $opsys in
14922 cygwin | darwin | freebsd | netbsd | openbsd )
14923 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->_p - (FILE)->_bf._base)" >>confdefs.h
14924
14925 ;;
14926
14927 unixware)
14928 $as_echo "#define PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)" >>confdefs.h
14929
14930 ;;
14931
14932 gnu | gnu-linux | gnu-kfreebsd )
14933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of pending output formalism" >&5
14934$as_echo_n "checking for style of pending output formalism... " >&6; }
14935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 14936/* end confdefs.h. */
5476a9a4
GM
14937
14938#include <stdio.h>
14939#if !defined (_IO_STDIO_H) && !defined (_STDIO_USES_IOSTREAM)
14940# error "stdio definitions not found"
14941#endif
067d23c9 14942
3e0be4ab
GM
14943int
14944main ()
14945{
5476a9a4 14946
3e0be4ab
GM
14947 ;
14948 return 0;
14949}
067d23c9 14950_ACEOF
5476a9a4
GM
14951if ac_fn_c_try_cpp "$LINENO"; then :
14952 emacs_pending_output=new
1f5d53eb 14953else
5476a9a4 14954 emacs_pending_output=unknown
067d23c9 14955fi
5476a9a4 14956rm -f conftest.err conftest.$ac_ext
067d23c9 14957
5476a9a4
GM
14958 if test $emacs_pending_output = unknown; then
14959 case $opsys in
14960 gnu-linux | gnu-kfreebsd)
14961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14962/* end confdefs.h. */
067d23c9 14963
5476a9a4
GM
14964#include <stdio.h>
14965#ifndef __UCLIBC__
14966# error "not using uclibc"
14967#endif
067d23c9 14968
5476a9a4
GM
14969int
14970main ()
14971{
067d23c9 14972
5476a9a4
GM
14973 ;
14974 return 0;
14975}
14976_ACEOF
14977if ac_fn_c_try_cpp "$LINENO"; then :
14978 emacs_pending_output=uclibc
14979else
14980 emacs_pending_output=old
14981fi
14982rm -f conftest.err conftest.$ac_ext
14983 ;;
14984 esac
14985 fi
067d23c9 14986
5476a9a4
GM
14987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_pending_output" >&5
14988$as_echo "$emacs_pending_output" >&6; }
067d23c9 14989
5476a9a4
GM
14990 case $emacs_pending_output in
14991 new)
14992 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)" >>confdefs.h
067d23c9 14993
5476a9a4
GM
14994 ;;
14995 uclibc)
14996 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->__bufpos - (FILE)->__bufstart)" >>confdefs.h
067d23c9 14997
5476a9a4
GM
14998 ;;
14999 old)
15000 $as_echo "#define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) ((FILE)->_pptr - (FILE)->_pbase)" >>confdefs.h
067d23c9 15001
5476a9a4
GM
15002 ;;
15003 esac
15004 ;;
15005esac
067d23c9 15006
067d23c9 15007
067d23c9 15008
067d23c9 15009
f199cab1 15010
5476a9a4
GM
15011case $opsys in
15012 gnu)
15013 $as_echo "#define DATA_START ({ extern int data_start; (char *) &data_start; })" >>confdefs.h
f199cab1 15014
5476a9a4 15015 ;;
067d23c9 15016
5476a9a4
GM
15017 hpux*)
15018 $as_echo "#define DATA_START 0x40000000" >>confdefs.h
067d23c9 15019
5476a9a4 15020 $as_echo "#define DATA_SEG_BITS 0x40000000" >>confdefs.h
067d23c9 15021
5476a9a4
GM
15022 ;;
15023 irix6-5)
15024 $as_echo "#define DATA_START 0x10000000" >>confdefs.h
067d23c9 15025
5476a9a4 15026 $as_echo "#define DATA_SEG_BITS 0x10000000" >>confdefs.h
067d23c9 15027
5476a9a4
GM
15028 ;;
15029esac
067d23c9 15030
1f5d53eb 15031
1f5d53eb 15032
067d23c9 15033
f199cab1 15034
5476a9a4
GM
15035case $opsys in
15036 darwin) $as_echo "#define TAB3 OXTABS" >>confdefs.h
15037 ;;
f199cab1 15038
5476a9a4 15039 gnu | freebsd | netbsd | openbsd )
f199cab1 15040
5476a9a4 15041$as_echo "#define TABDLY OXTABS" >>confdefs.h
f199cab1 15042
5476a9a4 15043 $as_echo "#define TAB3 OXTABS" >>confdefs.h
f199cab1 15044
5476a9a4 15045 ;;
f199cab1 15046
5476a9a4
GM
15047 gnu-linux | gnu-kfreebsd )
15048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 15049/* end confdefs.h. */
3e0be4ab 15050
5476a9a4
GM
15051#ifndef __i386__
15052# error "not i386"
15053#endif
f199cab1 15054
5476a9a4
GM
15055int
15056main ()
15057{
067d23c9 15058
5476a9a4
GM
15059 ;
15060 return 0;
15061}
15062_ACEOF
15063if ac_fn_c_try_cpp "$LINENO"; then :
15064 $as_echo "#define ULIMIT_BREAK_VALUE (32*1024*1024)" >>confdefs.h
1f5d53eb 15065
3e0be4ab 15066fi
5476a9a4 15067rm -f conftest.err conftest.$ac_ext
3e0be4ab 15068
5476a9a4
GM
15069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15070/* end confdefs.h. */
3e0be4ab 15071
5476a9a4
GM
15072#ifndef __ia64__
15073# error "not ia64"
15074#endif
067d23c9 15075
5476a9a4
GM
15076int
15077main ()
15078{
3e0be4ab 15079
5476a9a4
GM
15080 ;
15081 return 0;
15082}
15083_ACEOF
15084if ac_fn_c_try_cpp "$LINENO"; then :
f199cab1 15085
5476a9a4 15086$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 15087
3e0be4ab 15088fi
5476a9a4
GM
15089rm -f conftest.err conftest.$ac_ext
15090 ;;
067d23c9 15091
5476a9a4 15092 hpux*)
3e0be4ab 15093
5476a9a4 15094$as_echo "#define RUN_TIME_REMAP 1" >>confdefs.h
3e0be4ab 15095
5476a9a4 15096 ;;
3e0be4ab 15097
5476a9a4
GM
15098 irix6-5)
15099 $as_echo "#define ULIMIT_BREAK_VALUE 0x14000000" >>confdefs.h
3e0be4ab 15100
5476a9a4
GM
15101 ;;
15102esac
3e0be4ab
GM
15103
15104
f199cab1 15105
e700232f
GM
15106
15107
15108
f199cab1 15109
5476a9a4
GM
15110case $opsys in
15111 aix4-2 | hpux* | unixware)
15112 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
f199cab1 15113
5476a9a4 15114 ;;
f199cab1 15115
5476a9a4
GM
15116 gnu-linux | gnu-kfreebsd )
15117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 15118/* end confdefs.h. */
f199cab1 15119
5476a9a4
GM
15120#if defined __i386__ || defined __sparc__ || defined __mc68000__ \
15121 || defined __alpha__ || defined __mips__ || defined __s390__ \
15122 || defined __arm__ || defined __powerpc__ || defined __amd64__ \
15123 || defined __ia64__ || defined __sh__
15124/* ok */
15125#else
15126# error "setjmp not known to work on this arch"
15127#endif
15128
f199cab1
GM
15129int
15130main ()
1fd182f0 15131{
5476a9a4 15132
f199cab1
GM
15133 ;
15134 return 0;
1fd182f0
PE
15135}
15136_ACEOF
5476a9a4
GM
15137if ac_fn_c_try_cpp "$LINENO"; then :
15138 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
f199cab1 15139
5476a9a4
GM
15140else
15141 $as_echo "#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE" >>confdefs.h
1fd182f0 15142
1f5d53eb 15143fi
5476a9a4
GM
15144rm -f conftest.err conftest.$ac_ext
15145 ;;
15146esac
1fd182f0 15147
f199cab1 15148
5476a9a4
GM
15149if test x$GCC = xyes; then
15150 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
15151
1fd182f0 15152else
5476a9a4
GM
15153 case $opsys in
15154 freebsd | netbsd | openbsd | irix6-5 | sol2* )
15155 $as_echo "#define GC_SETJMP_WORKS 1" >>confdefs.h
1fd182f0 15156
5476a9a4
GM
15157 ;;
15158 esac
15159fi
1fd182f0 15160
906debc3
GM
15161case $opsys in
15162 sol2* | unixware )
15163
15164$as_echo "#define _setjmp setjmp" >>confdefs.h
15165
15166
15167$as_echo "#define _longjmp longjmp" >>confdefs.h
15168
15169
15170$as_echo "#define TIOCSIGSEND TIOCSIGNAL" >>confdefs.h
15171
15172 ;;
15173esac
15174
15175case $opsys in
15176 irix6-5 | sol2* | unixware )
15177
15178$as_echo "#define wait3(status, options, rusage) waitpid ((pid_t) -1, (status), (options))" >>confdefs.h
15179
15180
15181$as_echo "#define WRETCODE(w) (w >> 8)" >>confdefs.h
15182
15183 ;;
15184esac
15185
15186
5476a9a4
GM
15187case $opsys in
15188 hpux* | sol2* )
1f5d53eb 15189
5476a9a4 15190$as_echo "#define XOS_NEEDS_TIME_H 1" >>confdefs.h
1f5d53eb 15191
5476a9a4 15192 ;;
906debc3
GM
15193
15194 netbsd | openbsd )
15195
15196$as_echo "#define SIGNAL_H_AHB 1" >>confdefs.h
15197
15198 ;;
5476a9a4 15199esac
1f5d53eb 15200
1f5d53eb 15201
4fda9c95 15202
3e0be4ab 15203
4fda9c95 15204
4fda9c95 15205
f199cab1 15206
906debc3 15207
5476a9a4
GM
15208case $opsys in
15209 aix4-2)
15210 $as_echo "#define USG /**/" >>confdefs.h
15211
15212 $as_echo "#define USG5 /**/" >>confdefs.h
15213
15214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15215/* end confdefs.h. */
15216
15217#ifndef _AIX
15218# error "_AIX not defined"
15219#endif
f199cab1 15220
4fda9c95
GM
15221int
15222main ()
15223{
3e0be4ab 15224
4fda9c95
GM
15225 ;
15226 return 0;
15227}
15228_ACEOF
5476a9a4 15229if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15230
3e0be4ab 15231else
4fda9c95 15232
5476a9a4 15233$as_echo "#define _AIX /**/" >>confdefs.h
3e0be4ab 15234
5476a9a4
GM
15235fi
15236rm -f conftest.err conftest.$ac_ext
15237 ;;
4fda9c95 15238
5476a9a4 15239 cygwin)
3e0be4ab 15240
5476a9a4 15241$as_echo "#define CYGWIN 1" >>confdefs.h
f199cab1 15242
5476a9a4 15243 ;;
f199cab1 15244
5476a9a4
GM
15245 darwin)
15246 $as_echo "#define BSD4_2 /**/" >>confdefs.h
f199cab1 15247
5476a9a4 15248 $as_echo "#define BSD_SYSTEM /**/" >>confdefs.h
f199cab1
GM
15249
15250
5476a9a4 15251$as_echo "#define DARWIN_OS /**/" >>confdefs.h
f199cab1 15252
5476a9a4 15253 ;;
4fda9c95 15254
5476a9a4
GM
15255 freebsd)
15256 $as_echo "#define BSD4_2 /**/" >>confdefs.h
4fda9c95 15257
4fda9c95 15258
5476a9a4 15259$as_echo "#define BSD_SYSTEM_AHB 1" >>confdefs.h
4fda9c95 15260
5476a9a4 15261 ;;
f199cab1 15262
5476a9a4
GM
15263 gnu | netbsd | openbsd )
15264 $as_echo "#define BSD4_2 /**/" >>confdefs.h
f199cab1 15265
5476a9a4
GM
15266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15267/* end confdefs.h. */
f199cab1 15268
5476a9a4
GM
15269#ifndef BSD_SYSTEM
15270# error "BSD_SYSTEM not defined"
15271#endif
f199cab1 15272
5476a9a4
GM
15273int
15274main ()
15275{
f199cab1 15276
5476a9a4
GM
15277 ;
15278 return 0;
15279}
f199cab1 15280_ACEOF
5476a9a4 15281if ac_fn_c_try_cpp "$LINENO"; then :
4fda9c95 15282
3e0be4ab 15283else
5476a9a4 15284 $as_echo "#define BSD_SYSTEM 43" >>confdefs.h
4fda9c95 15285
5476a9a4
GM
15286fi
15287rm -f conftest.err conftest.$ac_ext
15288 ;;
4fda9c95 15289
5476a9a4
GM
15290 gnu-linux | gnu-kfreebsd )
15291 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15292
f199cab1 15293
5476a9a4 15294$as_echo "#define GNU_LINUX /**/" >>confdefs.h
4fda9c95 15295
5476a9a4 15296 ;;
4fda9c95 15297
5476a9a4
GM
15298 hpux*)
15299 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15300
5476a9a4 15301 $as_echo "#define USG5 /**/" >>confdefs.h
697210c4 15302
4717915f 15303
5476a9a4 15304$as_echo "#define HPUX /**/" >>confdefs.h
697210c4 15305
5476a9a4 15306 ;;
697210c4 15307
5476a9a4
GM
15308 irix6-5)
15309 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15310
5476a9a4 15311 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 15312
906debc3
GM
15313 $as_echo "#define USG5_4 /**/" >>confdefs.h
15314
f199cab1 15315
5476a9a4 15316$as_echo "#define IRIX6_5 /**/" >>confdefs.h
f199cab1 15317
5476a9a4 15318 ;;
f199cab1 15319
5476a9a4
GM
15320 sol2*)
15321 $as_echo "#define USG /**/" >>confdefs.h
4fda9c95 15322
5476a9a4 15323 $as_echo "#define USG5 /**/" >>confdefs.h
4fda9c95 15324
906debc3
GM
15325 $as_echo "#define USG5_4 /**/" >>confdefs.h
15326
4fda9c95 15327
5476a9a4 15328$as_echo "#define SOLARIS2 /**/" >>confdefs.h
f199cab1 15329
5476a9a4 15330 ;;
f199cab1 15331
5476a9a4
GM
15332 unixware)
15333 $as_echo "#define USG /**/" >>confdefs.h
f199cab1 15334
5476a9a4 15335 $as_echo "#define USG5 /**/" >>confdefs.h
f199cab1 15336
906debc3
GM
15337 $as_echo "#define USG5_4 /**/" >>confdefs.h
15338
5476a9a4
GM
15339 ;;
15340esac
f199cab1 15341
4fda9c95 15342
5476a9a4
GM
15343case $opsys in
15344 cygwin)
4fda9c95 15345
5476a9a4 15346$as_echo "#define G_SLICE_ALWAYS_MALLOC 1" >>confdefs.h
4fda9c95 15347
5476a9a4 15348 ;;
4fda9c95 15349
5476a9a4 15350 hpux11)
f199cab1 15351
5476a9a4 15352$as_echo "#define BROKEN_SA_RESTART 1" >>confdefs.h
f199cab1
GM
15353
15354
5476a9a4 15355$as_echo "#define USG_SUBTTY_WORKS 1" >>confdefs.h
f199cab1 15356
5476a9a4 15357 ;;
f199cab1 15358
5476a9a4 15359 irix6-5)
f199cab1 15360
5476a9a4 15361$as_echo "#define PREFER_VSUSP 1" >>confdefs.h
f199cab1 15362
f199cab1 15363
5476a9a4 15364$as_echo "#define SETPGRP_RELEASES_CTTY 1" >>confdefs.h
f199cab1 15365
5476a9a4 15366 ;;
f199cab1 15367
5476a9a4 15368 sol2-10)
f199cab1 15369
5476a9a4 15370$as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
f199cab1 15371
5476a9a4
GM
15372 ;;
15373esac
f199cab1 15374
5476a9a4
GM
15375# Set up the CFLAGS for real compilation, so we can substitute it.
15376CFLAGS="$REAL_CFLAGS"
15377CPPFLAGS="$REAL_CPPFLAGS"
f199cab1 15378
5476a9a4
GM
15379## Hack to detect a buggy GCC version.
15380if test "x$GCC" = xyes \
15381 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
15382 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
15383 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
15384 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
15385fi
f199cab1 15386
5476a9a4 15387version=$PACKAGE_VERSION
f199cab1 15388
5476a9a4
GM
15389### Specify what sort of things we'll be editing into Makefile and config.h.
15390### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 15391
f199cab1 15392
5476a9a4 15393## Unused?
4fda9c95
GM
15394
15395
15396
15397
4717915f 15398
4717915f 15399
4717915f 15400
4717915f 15401
4717915f 15402
4717915f 15403
4717915f 15404
4717915f 15405
4717915f 15406
4717915f 15407
4717915f 15408
4717915f
GM
15409
15410
4717915f
GM
15411
15412
4717915f 15413
4717915f 15414
4717915f 15415
5476a9a4
GM
15416## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
15417## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
15418## end of LIBX_BASE, but nothing ever set it.
4717915f 15419
4717915f 15420
4fda9c95 15421
4fda9c95 15422
5476a9a4
GM
15423## Used in lwlib/Makefile.in.
15424
906debc3 15425S_FILE=
4fda9c95
GM
15426
15427
4fda9c95 15428
4fda9c95
GM
15429
15430
15431
15432
4fda9c95
GM
15433
15434
5476a9a4
GM
15435cat >>confdefs.h <<_ACEOF
15436#define EMACS_CONFIGURATION "${canonical}"
15437_ACEOF
4fda9c95
GM
15438
15439
5476a9a4
GM
15440cat >>confdefs.h <<_ACEOF
15441#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
15442_ACEOF
15443
906debc3 15444if test -z "No longer used"; then
5476a9a4 15445
906debc3 15446$as_echo "#define config_opsysfile /**/" >>confdefs.h
4fda9c95 15447
5476a9a4 15448fi
4fda9c95 15449
5476a9a4
GM
15450XMENU_OBJ=
15451XOBJ=
15452FONT_OBJ=
15453if test "${HAVE_X_WINDOWS}" = "yes" ; then
15454
15455$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
4fda9c95 15456
5476a9a4
GM
15457 XMENU_OBJ=xmenu.o
15458 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
15459 FONT_OBJ=xfont.o
15460 if test "$HAVE_XFT" = "yes"; then
15461 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
15462 elif test "$HAVE_FREETYPE" = "yes"; then
15463 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
15464 fi
4fda9c95 15465
f199cab1 15466fi
4fda9c95 15467
4fda9c95 15468
4fda9c95 15469
4fda9c95 15470
5476a9a4
GM
15471WIDGET_OBJ=
15472MOTIF_LIBW=
15473if test "${USE_X_TOOLKIT}" != "none" ; then
15474 WIDGET_OBJ=widget.o
15475
15476$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
15477
15478 if test "${USE_X_TOOLKIT}" = "LUCID"; then
15479
15480$as_echo "#define USE_LUCID 1" >>confdefs.h
e1939eb1 15481
5476a9a4 15482 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 15483
5476a9a4 15484$as_echo "#define USE_MOTIF 1" >>confdefs.h
3e0be4ab 15485
5476a9a4
GM
15486 MOTIF_LIBW=-lXm
15487 case "$opsys" in
15488 gnu-linux)
15489 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
15490 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
15491 ;;
3e0be4ab 15492
5476a9a4
GM
15493 unixware)
15494 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
15495 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
15496 MOTIF_LIBW="MOTIF_LIBW -lXimp"
15497 ;;
3e0be4ab 15498
5476a9a4
GM
15499 aix4-2)
15500 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
15501 MOTIF_LIBW="$MOTIF_LIBW -li18n"
15502 ;;
15503 esac
15504 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
15505 fi
15506fi
4fda9c95 15507
3e0be4ab 15508
5476a9a4
GM
15509TOOLKIT_LIBW=
15510case "$USE_X_TOOLKIT" in
15511 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
15512 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
15513 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
15514esac
4fda9c95
GM
15515
15516
5476a9a4
GM
15517if test "$USE_X_TOOLKIT" = "none"; then
15518 LIBXT_OTHER="\$(LIBXSM)"
15519 OLDXMENU_TARGET="really-oldXMenu"
15520else
15521 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
15522 OLDXMENU_TARGET="really-lwlib"
15523fi
4fda9c95
GM
15524
15525
5476a9a4
GM
15526## The X Menu stuff is present in the X10 distribution, but missing
15527## from X11. If we have X10, just use the installed library;
15528## otherwise, use our own copy.
15529if test "${HAVE_X11}" = "yes" ; then
4fda9c95 15530
5476a9a4 15531$as_echo "#define HAVE_X11 1" >>confdefs.h
4fda9c95 15532
4fda9c95 15533
5476a9a4
GM
15534 if test "$USE_X_TOOLKIT" = "none"; then
15535 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
15536 else
15537 OLDXMENU="\${lwlibdir}/liblw.a"
15538 fi
15539 LIBXMENU="\$(OLDXMENU)"
15540 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
15541 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
f199cab1 15542else
5476a9a4
GM
15543 ## For a syntactically valid Makefile; not actually used for anything.
15544 ## See comments in src/Makefile.in.
15545 OLDXMENU=nothing
15546 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
15547 if test "${HAVE_X_WINDOWS}" = "yes"; then
15548 LIBXMENU="-lXMenu"
15549 else
15550 LIBXMENU=
15551 fi
15552 LIBX_OTHER=
15553 OLDXMENU_DEPS=
15554fi
4fda9c95 15555
5476a9a4
GM
15556if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
15557 OLDXMENU_TARGET=
15558 OLDXMENU=nothing
15559 LIBXMENU=
15560 OLDXMENU_DEPS=
15561fi
4fda9c95 15562
4fda9c95
GM
15563
15564
3e0be4ab 15565
4fda9c95 15566
3e0be4ab 15567
3e0be4ab 15568
5476a9a4 15569if test "${HAVE_MENUS}" = "yes" ; then
3e0be4ab 15570
5476a9a4 15571$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95 15572
5476a9a4 15573fi
4fda9c95 15574
5476a9a4 15575if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 15576
5476a9a4 15577$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 15578
5476a9a4 15579fi
3e0be4ab 15580
5476a9a4
GM
15581RALLOC_OBJ=
15582if test "${REL_ALLOC}" = "yes" ; then
15583
15584$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95
GM
15585
15586
5476a9a4
GM
15587 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
15588fi
4fda9c95 15589
4fda9c95 15590
5476a9a4
GM
15591if test "$opsys" = "cygwin"; then
15592 CYGWIN_OBJ="sheap.o"
15593 ## Cygwin differs because of its unexec().
15594 PRE_ALLOC_OBJ=
15595 POST_ALLOC_OBJ=lastfile.o
15596else
15597 CYGWIN_OBJ=
15598 PRE_ALLOC_OBJ=lastfile.o
15599 POST_ALLOC_OBJ=
15600fi
4fda9c95 15601
3e0be4ab 15602
3e0be4ab 15603
3e0be4ab 15604
5476a9a4
GM
15605# Configure gnulib. Although this does not affect CFLAGS or LIBS permanently.
15606# it temporarily reverts them to their pre-pkg-config values,
15607# because gnulib needs to work with both src (which uses the
15608# pkg-config stuff) and lib-src (which does not). For example, gnulib
15609# may need to determine whether LIB_CLOCK_GETTIME should contain -lrt,
15610# and it therefore needs to run in an environment where LIBS does not
15611# already contain -lrt merely because 'pkg-config --libs' printed '-lrt'
15612# for some package unrelated to lib-src.
15613SAVE_CFLAGS=$CFLAGS
15614SAVE_LIBS=$LIBS
15615CFLAGS=$pre_PKG_CONFIG_CFLAGS
15616LIBS="$LIB_PTHREAD $pre_PKG_CONFIG_LIBS"
3e0be4ab 15617
3e0be4ab
GM
15618
15619
4fda9c95 15620
4fda9c95 15621
3e0be4ab 15622
3e0be4ab
GM
15623
15624
4fda9c95 15625
3e0be4ab
GM
15626
15627
5476a9a4
GM
15628 LIBC_FATAL_STDERR_=1
15629 export LIBC_FATAL_STDERR_
3e0be4ab 15630
5476a9a4
GM
15631# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15632# for constant arguments. Useless!
15633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
15634$as_echo_n "checking for working alloca.h... " >&6; }
15635if test "${ac_cv_working_alloca_h+set}" = set; then :
15636 $as_echo_n "(cached) " >&6
15637else
15638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15639/* end confdefs.h. */
15640#include <alloca.h>
15641int
15642main ()
15643{
15644char *p = (char *) alloca (2 * sizeof (int));
15645 if (p) return 0;
15646 ;
15647 return 0;
15648}
15649_ACEOF
15650if ac_fn_c_try_link "$LINENO"; then :
15651 ac_cv_working_alloca_h=yes
15652else
15653 ac_cv_working_alloca_h=no
15654fi
15655rm -f core conftest.err conftest.$ac_objext \
15656 conftest$ac_exeext conftest.$ac_ext
15657fi
15658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
15659$as_echo "$ac_cv_working_alloca_h" >&6; }
15660if test $ac_cv_working_alloca_h = yes; then
3e0be4ab 15661
5476a9a4 15662$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
3e0be4ab 15663
5476a9a4 15664fi
3e0be4ab 15665
5476a9a4
GM
15666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
15667$as_echo_n "checking for alloca... " >&6; }
15668if test "${ac_cv_func_alloca_works+set}" = set; then :
f199cab1
GM
15669 $as_echo_n "(cached) " >&6
15670else
5476a9a4 15671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 15672/* end confdefs.h. */
5476a9a4
GM
15673#ifdef __GNUC__
15674# define alloca __builtin_alloca
15675#else
15676# ifdef _MSC_VER
15677# include <malloc.h>
15678# define alloca _alloca
15679# else
15680# ifdef HAVE_ALLOCA_H
15681# include <alloca.h>
15682# else
15683# ifdef _AIX
15684 #pragma alloca
15685# else
15686# ifndef alloca /* predefined by HP cc +Olibcalls */
15687char *alloca ();
15688# endif
15689# endif
15690# endif
15691# endif
15692#endif
15693
15694int
15695main ()
15696{
15697char *p = (char *) alloca (1);
15698 if (p) return 0;
15699 ;
15700 return 0;
15701}
15702_ACEOF
15703if ac_fn_c_try_link "$LINENO"; then :
15704 ac_cv_func_alloca_works=yes
15705else
15706 ac_cv_func_alloca_works=no
15707fi
15708rm -f core conftest.err conftest.$ac_objext \
15709 conftest$ac_exeext conftest.$ac_ext
15710fi
15711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
15712$as_echo "$ac_cv_func_alloca_works" >&6; }
15713
15714if test $ac_cv_func_alloca_works = yes; then
15715
15716$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
15717
15718else
15719 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15720# that cause trouble. Some versions do not even contain alloca or
15721# contain a buggy version. If you still want to use their alloca,
15722# use ar to extract alloca.o from them instead of compiling alloca.c.
3e0be4ab 15723
4fda9c95 15724
4fda9c95 15725
4fda9c95
GM
15726
15727
5476a9a4 15728ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
4fda9c95 15729
5476a9a4 15730$as_echo "#define C_ALLOCA 1" >>confdefs.h
4fda9c95 15731
4fda9c95 15732
5476a9a4
GM
15733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
15734$as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
15735if test "${ac_cv_os_cray+set}" = set; then :
15736 $as_echo_n "(cached) " >&6
15737else
15738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15739/* end confdefs.h. */
15740#if defined CRAY && ! defined CRAY2
15741webecray
15742#else
15743wenotbecray
15744#endif
4fda9c95 15745
5476a9a4
GM
15746_ACEOF
15747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15748 $EGREP "webecray" >/dev/null 2>&1; then :
15749 ac_cv_os_cray=yes
15750else
15751 ac_cv_os_cray=no
15752fi
15753rm -f conftest*
4fda9c95 15754
5476a9a4
GM
15755fi
15756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
15757$as_echo "$ac_cv_os_cray" >&6; }
15758if test $ac_cv_os_cray = yes; then
15759 for ac_func in _getb67 GETB67 getb67; do
15760 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15761ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15762eval as_val=\$$as_ac_var
15763 if test "x$as_val" = x""yes; then :
4fda9c95 15764
5476a9a4
GM
15765cat >>confdefs.h <<_ACEOF
15766#define CRAY_STACKSEG_END $ac_func
15767_ACEOF
4fda9c95 15768
5476a9a4
GM
15769 break
15770fi
4fda9c95 15771
5476a9a4
GM
15772 done
15773fi
4fda9c95 15774
5476a9a4
GM
15775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
15776$as_echo_n "checking stack direction for C alloca... " >&6; }
15777if test "${ac_cv_c_stack_direction+set}" = set; then :
15778 $as_echo_n "(cached) " >&6
15779else
15780 if test "$cross_compiling" = yes; then :
15781 ac_cv_c_stack_direction=0
15782else
15783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15784/* end confdefs.h. */
15785$ac_includes_default
15786int
15787find_stack_direction (int *addr, int depth)
15788{
15789 int dir, dummy = 0;
15790 if (! addr)
15791 addr = &dummy;
15792 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
15793 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
15794 return dir + dummy;
15795}
4fda9c95 15796
5476a9a4
GM
15797int
15798main (int argc, char **argv)
15799{
15800 return find_stack_direction (0, argc + !argv + 20) < 0;
15801}
15802_ACEOF
15803if ac_fn_c_try_run "$LINENO"; then :
15804 ac_cv_c_stack_direction=1
15805else
15806 ac_cv_c_stack_direction=-1
15807fi
15808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15809 conftest.$ac_objext conftest.beam conftest.$ac_ext
15810fi
4fda9c95 15811
5476a9a4
GM
15812fi
15813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
15814$as_echo "$ac_cv_c_stack_direction" >&6; }
15815cat >>confdefs.h <<_ACEOF
15816#define STACK_DIRECTION $ac_cv_c_stack_direction
15817_ACEOF
3e0be4ab
GM
15818
15819
5476a9a4 15820fi
3e0be4ab
GM
15821
15822
15823
15824
5476a9a4
GM
15825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15826$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
15827if test "${ac_cv_c_bigendian+set}" = set; then :
15828 $as_echo_n "(cached) " >&6
15829else
15830 ac_cv_c_bigendian=unknown
15831 # See if we're dealing with a universal compiler.
15832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15833/* end confdefs.h. */
15834#ifndef __APPLE_CC__
15835 not a universal capable compiler
15836 #endif
15837 typedef int dummy;
15838
15839_ACEOF
15840if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 15841
5476a9a4
GM
15842 # Check for potential -arch flags. It is not universal unless
15843 # there are at least two -arch flags with different values.
15844 ac_arch=
15845 ac_prev=
15846 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15847 if test -n "$ac_prev"; then
15848 case $ac_word in
15849 i?86 | x86_64 | ppc | ppc64)
15850 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15851 ac_arch=$ac_word
15852 else
15853 ac_cv_c_bigendian=universal
15854 break
15855 fi
15856 ;;
15857 esac
15858 ac_prev=
15859 elif test "x$ac_word" = "x-arch"; then
15860 ac_prev=arch
15861 fi
15862 done
15863fi
15864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15865 if test $ac_cv_c_bigendian = unknown; then
15866 # See if sys/param.h defines the BYTE_ORDER macro.
15867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15868/* end confdefs.h. */
15869#include <sys/types.h>
15870 #include <sys/param.h>
3e0be4ab 15871
5476a9a4
GM
15872int
15873main ()
15874{
15875#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15876 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15877 && LITTLE_ENDIAN)
15878 bogus endian macros
15879 #endif
3e0be4ab 15880
5476a9a4
GM
15881 ;
15882 return 0;
15883}
15884_ACEOF
15885if ac_fn_c_try_compile "$LINENO"; then :
15886 # It does; now see whether it defined to BIG_ENDIAN or not.
15887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15888/* end confdefs.h. */
15889#include <sys/types.h>
15890 #include <sys/param.h>
369e19fc 15891
5476a9a4
GM
15892int
15893main ()
15894{
15895#if BYTE_ORDER != BIG_ENDIAN
15896 not big endian
15897 #endif
3e0be4ab 15898
5476a9a4
GM
15899 ;
15900 return 0;
15901}
15902_ACEOF
15903if ac_fn_c_try_compile "$LINENO"; then :
15904 ac_cv_c_bigendian=yes
15905else
15906 ac_cv_c_bigendian=no
15907fi
15908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15909fi
15910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15911 fi
15912 if test $ac_cv_c_bigendian = unknown; then
15913 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15915/* end confdefs.h. */
15916#include <limits.h>
4fda9c95 15917
5476a9a4
GM
15918int
15919main ()
15920{
15921#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15922 bogus endian macros
15923 #endif
4fda9c95 15924
5476a9a4
GM
15925 ;
15926 return 0;
15927}
15928_ACEOF
15929if ac_fn_c_try_compile "$LINENO"; then :
15930 # It does; now see whether it defined to _BIG_ENDIAN or not.
15931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15932/* end confdefs.h. */
15933#include <limits.h>
4fda9c95 15934
5476a9a4
GM
15935int
15936main ()
15937{
15938#ifndef _BIG_ENDIAN
15939 not big endian
15940 #endif
f199cab1 15941
5476a9a4
GM
15942 ;
15943 return 0;
15944}
15945_ACEOF
15946if ac_fn_c_try_compile "$LINENO"; then :
15947 ac_cv_c_bigendian=yes
f199cab1 15948else
5476a9a4
GM
15949 ac_cv_c_bigendian=no
15950fi
15951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15952fi
15953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15954 fi
15955 if test $ac_cv_c_bigendian = unknown; then
15956 # Compile a test program.
15957 if test "$cross_compiling" = yes; then :
15958 # Try to guess by grepping values from an object file.
15959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15960/* end confdefs.h. */
15961short int ascii_mm[] =
15962 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15963 short int ascii_ii[] =
15964 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15965 int use_ascii (int i) {
15966 return ascii_mm[i] + ascii_ii[i];
15967 }
15968 short int ebcdic_ii[] =
15969 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15970 short int ebcdic_mm[] =
15971 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15972 int use_ebcdic (int i) {
15973 return ebcdic_mm[i] + ebcdic_ii[i];
15974 }
15975 extern int foo;
f199cab1 15976
5476a9a4
GM
15977int
15978main ()
15979{
15980return use_ascii (foo) == use_ebcdic (foo);
15981 ;
15982 return 0;
15983}
15984_ACEOF
15985if ac_fn_c_try_compile "$LINENO"; then :
15986 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15987 ac_cv_c_bigendian=yes
15988 fi
15989 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15990 if test "$ac_cv_c_bigendian" = unknown; then
15991 ac_cv_c_bigendian=no
15992 else
15993 # finding both strings is unlikely to happen, but who knows?
15994 ac_cv_c_bigendian=unknown
15995 fi
15996 fi
15997fi
15998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4fda9c95 15999else
3e0be4ab 16000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 16001/* end confdefs.h. */
5476a9a4
GM
16002$ac_includes_default
16003int
16004main ()
4fda9c95 16005{
5476a9a4
GM
16006
16007 /* Are we little or big endian? From Harbison&Steele. */
16008 union
16009 {
16010 long int l;
16011 char c[sizeof (long int)];
16012 } u;
16013 u.l = 1;
16014 return u.c[sizeof (long int) - 1] == 1;
16015
16016 ;
4fda9c95
GM
16017 return 0;
16018}
16019_ACEOF
f199cab1 16020if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 16021 ac_cv_c_bigendian=no
3e0be4ab 16022else
5476a9a4 16023 ac_cv_c_bigendian=yes
4fda9c95 16024fi
f199cab1
GM
16025rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16026 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 16027fi
4fda9c95 16028
5476a9a4 16029 fi
f199cab1 16030fi
5476a9a4
GM
16031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16032$as_echo "$ac_cv_c_bigendian" >&6; }
16033 case $ac_cv_c_bigendian in #(
16034 yes)
16035 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16036;; #(
16037 no)
16038 ;; #(
16039 universal)
3e0be4ab 16040
5476a9a4 16041$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3e0be4ab 16042
5476a9a4
GM
16043 ;; #(
16044 *)
16045 as_fn_error "unknown endianness
16046 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16047 esac
4fda9c95 16048
4fda9c95 16049
5476a9a4
GM
16050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16051$as_echo_n "checking for inline... " >&6; }
16052if test "${ac_cv_c_inline+set}" = set; then :
16053 $as_echo_n "(cached) " >&6
f199cab1 16054else
5476a9a4
GM
16055 ac_cv_c_inline=no
16056for ac_kw in inline __inline__ __inline; do
16057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16058/* end confdefs.h. */
16059#ifndef __cplusplus
16060typedef int foo_t;
16061static $ac_kw foo_t static_foo () {return 0; }
16062$ac_kw foo_t foo () {return 0; }
16063#endif
3e0be4ab 16064
3e0be4ab 16065_ACEOF
5476a9a4
GM
16066if ac_fn_c_try_compile "$LINENO"; then :
16067 ac_cv_c_inline=$ac_kw
3e0be4ab 16068fi
5476a9a4
GM
16069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16070 test "$ac_cv_c_inline" != no && break
16071done
3e0be4ab 16072
4fda9c95 16073fi
5476a9a4
GM
16074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16075$as_echo "$ac_cv_c_inline" >&6; }
3e0be4ab 16076
5476a9a4
GM
16077case $ac_cv_c_inline in
16078 inline | yes) ;;
16079 *)
16080 case $ac_cv_c_inline in
16081 no) ac_val=;;
16082 *) ac_val=$ac_cv_c_inline;;
16083 esac
16084 cat >>confdefs.h <<_ACEOF
16085#ifndef __cplusplus
16086#define inline $ac_val
16087#endif
4fda9c95 16088_ACEOF
5476a9a4
GM
16089 ;;
16090esac
4fda9c95 16091
da6c8463 16092
5476a9a4
GM
16093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
16094$as_echo_n "checking whether strtold conforms to C99... " >&6; }
16095if test "${gl_cv_func_c99_strtold+set}" = set; then :
16096 $as_echo_n "(cached) " >&6
16097else
16098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16099/* end confdefs.h. */
16100/* On HP-UX before 11.23, strtold returns a struct instead of
16101 long double. Reject implementations like that, by requiring
16102 compatibility with the C99 prototype. */
16103 #include <stdlib.h>
16104 static long double (*p) (char const *, char **) = strtold;
16105 static long double
16106 test (char const *nptr, char **endptr)
16107 {
16108 long double r;
16109 r = strtold (nptr, endptr);
16110 return r;
16111 }
16112int
16113main ()
16114{
16115return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
16116 ;
16117 return 0;
16118}
16119_ACEOF
16120if ac_fn_c_try_link "$LINENO"; then :
16121 gl_cv_func_c99_strtold=yes
16122else
16123 gl_cv_func_c99_strtold=no
3e0be4ab 16124fi
5476a9a4
GM
16125rm -f core conftest.err conftest.$ac_objext \
16126 conftest$ac_exeext conftest.$ac_ext
16127fi
16128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
16129$as_echo "$gl_cv_func_c99_strtold" >&6; }
16130 if test $gl_cv_func_c99_strtold = yes; then
da6c8463 16131
5476a9a4 16132$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
da6c8463 16133
5476a9a4 16134 fi
da6c8463
GM
16135
16136
5476a9a4
GM
16137 GNULIB_CHDIR=0;
16138 GNULIB_CHOWN=0;
16139 GNULIB_CLOSE=0;
16140 GNULIB_DUP=0;
16141 GNULIB_DUP2=0;
16142 GNULIB_DUP3=0;
16143 GNULIB_ENVIRON=0;
16144 GNULIB_EUIDACCESS=0;
16145 GNULIB_FACCESSAT=0;
16146 GNULIB_FCHDIR=0;
16147 GNULIB_FCHOWNAT=0;
16148 GNULIB_FDATASYNC=0;
16149 GNULIB_FSYNC=0;
16150 GNULIB_FTRUNCATE=0;
16151 GNULIB_GETCWD=0;
16152 GNULIB_GETDOMAINNAME=0;
16153 GNULIB_GETDTABLESIZE=0;
16154 GNULIB_GETGROUPS=0;
16155 GNULIB_GETHOSTNAME=0;
16156 GNULIB_GETLOGIN=0;
16157 GNULIB_GETLOGIN_R=0;
16158 GNULIB_GETPAGESIZE=0;
16159 GNULIB_GETUSERSHELL=0;
16160 GNULIB_GROUP_MEMBER=0;
16161 GNULIB_ISATTY=0;
16162 GNULIB_LCHOWN=0;
16163 GNULIB_LINK=0;
16164 GNULIB_LINKAT=0;
16165 GNULIB_LSEEK=0;
16166 GNULIB_PIPE=0;
16167 GNULIB_PIPE2=0;
16168 GNULIB_PREAD=0;
16169 GNULIB_PWRITE=0;
16170 GNULIB_READ=0;
16171 GNULIB_READLINK=0;
16172 GNULIB_READLINKAT=0;
16173 GNULIB_RMDIR=0;
16174 GNULIB_SETHOSTNAME=0;
16175 GNULIB_SLEEP=0;
16176 GNULIB_SYMLINK=0;
16177 GNULIB_SYMLINKAT=0;
16178 GNULIB_TTYNAME_R=0;
16179 GNULIB_UNISTD_H_NONBLOCKING=0;
16180 GNULIB_UNISTD_H_SIGPIPE=0;
16181 GNULIB_UNLINK=0;
16182 GNULIB_UNLINKAT=0;
16183 GNULIB_USLEEP=0;
16184 GNULIB_WRITE=0;
16185 HAVE_CHOWN=1;
16186 HAVE_DUP2=1;
16187 HAVE_DUP3=1;
16188 HAVE_EUIDACCESS=1;
16189 HAVE_FACCESSAT=1;
16190 HAVE_FCHDIR=1;
16191 HAVE_FCHOWNAT=1;
16192 HAVE_FDATASYNC=1;
16193 HAVE_FSYNC=1;
16194 HAVE_FTRUNCATE=1;
16195 HAVE_GETDTABLESIZE=1;
16196 HAVE_GETGROUPS=1;
16197 HAVE_GETHOSTNAME=1;
16198 HAVE_GETLOGIN=1;
16199 HAVE_GETPAGESIZE=1;
16200 HAVE_GROUP_MEMBER=1;
16201 HAVE_LCHOWN=1;
16202 HAVE_LINK=1;
16203 HAVE_LINKAT=1;
16204 HAVE_PIPE=1;
16205 HAVE_PIPE2=1;
16206 HAVE_PREAD=1;
16207 HAVE_PWRITE=1;
16208 HAVE_READLINK=1;
16209 HAVE_READLINKAT=1;
16210 HAVE_SETHOSTNAME=1;
16211 HAVE_SLEEP=1;
16212 HAVE_SYMLINK=1;
16213 HAVE_SYMLINKAT=1;
16214 HAVE_UNLINKAT=1;
16215 HAVE_USLEEP=1;
16216 HAVE_DECL_ENVIRON=1;
16217 HAVE_DECL_FCHDIR=1;
16218 HAVE_DECL_FDATASYNC=1;
16219 HAVE_DECL_GETDOMAINNAME=1;
16220 HAVE_DECL_GETLOGIN_R=1;
16221 HAVE_DECL_GETPAGESIZE=1;
16222 HAVE_DECL_GETUSERSHELL=1;
16223 HAVE_DECL_SETHOSTNAME=1;
16224 HAVE_DECL_TTYNAME_R=1;
16225 HAVE_OS_H=0;
16226 HAVE_SYS_PARAM_H=0;
16227 REPLACE_CHOWN=0;
16228 REPLACE_CLOSE=0;
16229 REPLACE_DUP=0;
16230 REPLACE_DUP2=0;
16231 REPLACE_FCHOWNAT=0;
16232 REPLACE_FTRUNCATE=0;
16233 REPLACE_GETCWD=0;
16234 REPLACE_GETDOMAINNAME=0;
16235 REPLACE_GETLOGIN_R=0;
16236 REPLACE_GETGROUPS=0;
16237 REPLACE_GETPAGESIZE=0;
16238 REPLACE_ISATTY=0;
16239 REPLACE_LCHOWN=0;
16240 REPLACE_LINK=0;
16241 REPLACE_LINKAT=0;
16242 REPLACE_LSEEK=0;
16243 REPLACE_PREAD=0;
16244 REPLACE_PWRITE=0;
16245 REPLACE_READ=0;
16246 REPLACE_READLINK=0;
16247 REPLACE_RMDIR=0;
16248 REPLACE_SLEEP=0;
16249 REPLACE_SYMLINK=0;
16250 REPLACE_TTYNAME_R=0;
16251 REPLACE_UNLINK=0;
16252 REPLACE_UNLINKAT=0;
16253 REPLACE_USLEEP=0;
16254 REPLACE_WRITE=0;
16255 UNISTD_H_HAVE_WINSOCK2_H=0;
16256 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
f199cab1
GM
16257
16258
93131e11
GM
16259
16260
16261
16262
16263
16264
16265
16266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
16267$as_echo_n "checking if environ is properly declared... " >&6; }
16268 if test "${gt_cv_var_environ_declaration+set}" = set; then :
16269 $as_echo_n "(cached) " >&6
16270else
16271
16272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16273/* end confdefs.h. */
16274#if HAVE_UNISTD_H
16275 #include <unistd.h>
16276 #endif
16277 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
16278 #include <stdlib.h>
16279
16280 extern struct { int foo; } environ;
16281int
16282main ()
16283{
16284environ.foo = 1;
16285 ;
16286 return 0;
16287}
16288_ACEOF
16289if ac_fn_c_try_compile "$LINENO"; then :
16290 gt_cv_var_environ_declaration=no
16291else
16292 gt_cv_var_environ_declaration=yes
16293fi
16294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16295fi
16296
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
16298$as_echo "$gt_cv_var_environ_declaration" >&6; }
16299 if test $gt_cv_var_environ_declaration = yes; then
16300
16301$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
16302
16303 fi
16304
16305
16306 if test $gt_cv_var_environ_declaration != yes; then
16307 HAVE_DECL_ENVIRON=0
16308 fi
16309
5476a9a4
GM
16310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
16311$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
16312if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
f199cab1 16313 $as_echo_n "(cached) " >&6
ae0d7250 16314else
f199cab1 16315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 16316/* end confdefs.h. */
ae0d7250 16317
5476a9a4
GM
16318#include <sys/types.h>
16319#include <sys/stat.h>
3e0be4ab
GM
16320int
16321main ()
16322{
5476a9a4 16323struct stat s; s.st_dm_mode;
3e0be4ab
GM
16324 ;
16325 return 0;
16326}
6ad6792b 16327_ACEOF
5476a9a4
GM
16328if ac_fn_c_try_compile "$LINENO"; then :
16329 ac_cv_struct_st_dm_mode=yes
f199cab1 16330else
5476a9a4 16331 ac_cv_struct_st_dm_mode=no
f199cab1 16332fi
5476a9a4 16333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 16334fi
5476a9a4
GM
16335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
16336$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
f199cab1 16337
5476a9a4 16338 if test $ac_cv_struct_st_dm_mode = yes; then
f199cab1 16339
5476a9a4 16340$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
f199cab1 16341
5476a9a4 16342 fi
f199cab1 16343
f199cab1 16344
5476a9a4
GM
16345ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
16346if test "x$ac_cv_have_decl_strmode" = x""yes; then :
16347 ac_have_decl=1
16348else
16349 ac_have_decl=0
f199cab1
GM
16350fi
16351
5476a9a4
GM
16352cat >>confdefs.h <<_ACEOF
16353#define HAVE_DECL_STRMODE $ac_have_decl
16354_ACEOF
f199cab1 16355
4fda9c95 16356
5476a9a4
GM
16357 GNULIB__EXIT=0;
16358 GNULIB_ATOLL=0;
16359 GNULIB_CALLOC_POSIX=0;
16360 GNULIB_CANONICALIZE_FILE_NAME=0;
16361 GNULIB_GETLOADAVG=0;
16362 GNULIB_GETSUBOPT=0;
16363 GNULIB_GRANTPT=0;
16364 GNULIB_MALLOC_POSIX=0;
16365 GNULIB_MBTOWC=0;
16366 GNULIB_MKDTEMP=0;
16367 GNULIB_MKOSTEMP=0;
16368 GNULIB_MKOSTEMPS=0;
16369 GNULIB_MKSTEMP=0;
16370 GNULIB_MKSTEMPS=0;
16371 GNULIB_POSIX_OPENPT=0;
16372 GNULIB_PTSNAME=0;
16373 GNULIB_PTSNAME_R=0;
16374 GNULIB_PUTENV=0;
16375 GNULIB_RANDOM=0;
16376 GNULIB_RANDOM_R=0;
16377 GNULIB_REALLOC_POSIX=0;
16378 GNULIB_REALPATH=0;
16379 GNULIB_RPMATCH=0;
16380 GNULIB_SETENV=0;
16381 GNULIB_STRTOD=0;
16382 GNULIB_STRTOLL=0;
16383 GNULIB_STRTOULL=0;
16384 GNULIB_SYSTEM_POSIX=0;
16385 GNULIB_UNLOCKPT=0;
16386 GNULIB_UNSETENV=0;
16387 GNULIB_WCTOMB=0;
16388 HAVE__EXIT=1;
16389 HAVE_ATOLL=1;
16390 HAVE_CANONICALIZE_FILE_NAME=1;
16391 HAVE_DECL_GETLOADAVG=1;
16392 HAVE_GETSUBOPT=1;
16393 HAVE_GRANTPT=1;
16394 HAVE_MKDTEMP=1;
16395 HAVE_MKOSTEMP=1;
16396 HAVE_MKOSTEMPS=1;
16397 HAVE_MKSTEMP=1;
16398 HAVE_MKSTEMPS=1;
16399 HAVE_POSIX_OPENPT=1;
16400 HAVE_PTSNAME=1;
16401 HAVE_PTSNAME_R=1;
16402 HAVE_RANDOM=1;
16403 HAVE_RANDOM_H=1;
16404 HAVE_RANDOM_R=1;
16405 HAVE_REALPATH=1;
16406 HAVE_RPMATCH=1;
16407 HAVE_SETENV=1;
16408 HAVE_DECL_SETENV=1;
16409 HAVE_STRTOD=1;
16410 HAVE_STRTOLL=1;
16411 HAVE_STRTOULL=1;
16412 HAVE_STRUCT_RANDOM_DATA=1;
16413 HAVE_SYS_LOADAVG_H=0;
16414 HAVE_UNLOCKPT=1;
16415 HAVE_DECL_UNSETENV=1;
16416 REPLACE_CALLOC=0;
16417 REPLACE_CANONICALIZE_FILE_NAME=0;
16418 REPLACE_MALLOC=0;
16419 REPLACE_MBTOWC=0;
16420 REPLACE_MKSTEMP=0;
16421 REPLACE_PTSNAME_R=0;
16422 REPLACE_PUTENV=0;
16423 REPLACE_RANDOM_R=0;
16424 REPLACE_REALLOC=0;
16425 REPLACE_REALPATH=0;
16426 REPLACE_SETENV=0;
16427 REPLACE_STRTOD=0;
16428 REPLACE_UNSETENV=0;
16429 REPLACE_WCTOMB=0;
f199cab1
GM
16430
16431
16432
5476a9a4
GM
16433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
16434$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
16435if test "${gl_cv_have_include_next+set}" = set; then :
f199cab1
GM
16436 $as_echo_n "(cached) " >&6
16437else
5476a9a4
GM
16438 rm -rf conftestd1a conftestd1b conftestd2
16439 mkdir conftestd1a conftestd1b conftestd2
16440 cat <<EOF > conftestd1a/conftest.h
16441#define DEFINED_IN_CONFTESTD1
16442#include_next <conftest.h>
16443#ifdef DEFINED_IN_CONFTESTD2
16444int foo;
16445#else
16446#error "include_next doesn't work"
16447#endif
16448EOF
16449 cat <<EOF > conftestd1b/conftest.h
16450#define DEFINED_IN_CONFTESTD1
16451#include <stdio.h>
16452#include_next <conftest.h>
16453#ifdef DEFINED_IN_CONFTESTD2
16454int foo;
16455#else
16456#error "include_next doesn't work"
16457#endif
16458EOF
16459 cat <<EOF > conftestd2/conftest.h
16460#ifndef DEFINED_IN_CONFTESTD1
16461#error "include_next test doesn't work"
16462#endif
16463#define DEFINED_IN_CONFTESTD2
16464EOF
16465 gl_save_CPPFLAGS="$CPPFLAGS"
16466 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
16467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16468/* end confdefs.h. */
5476a9a4 16469#include <conftest.h>
5f90be1b 16470_ACEOF
4fda9c95 16471if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 16472 gl_cv_have_include_next=yes
5f90be1b 16473else
5476a9a4 16474 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
f199cab1 16475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 16476/* end confdefs.h. */
5476a9a4 16477#include <conftest.h>
4fda9c95 16478_ACEOF
3e0be4ab 16479if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 16480 gl_cv_have_include_next=buggy
3e0be4ab 16481else
5476a9a4 16482 gl_cv_have_include_next=no
3e0be4ab 16483fi
5476a9a4 16484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 16485
4fda9c95 16486fi
f199cab1 16487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
16488 CPPFLAGS="$gl_save_CPPFLAGS"
16489 rm -rf conftestd1a conftestd1b conftestd2
5f90be1b 16490
3e0be4ab 16491fi
5476a9a4
GM
16492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
16493$as_echo "$gl_cv_have_include_next" >&6; }
16494 PRAGMA_SYSTEM_HEADER=
16495 if test $gl_cv_have_include_next = yes; then
16496 INCLUDE_NEXT=include_next
16497 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16498 if test -n "$GCC"; then
16499 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
16500 fi
16501 else
16502 if test $gl_cv_have_include_next = buggy; then
16503 INCLUDE_NEXT=include
16504 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
16505 else
16506 INCLUDE_NEXT=include
16507 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
16508 fi
16509 fi
f199cab1
GM
16510
16511
16512
5476a9a4
GM
16513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
16514$as_echo_n "checking whether system header files limit the line length... " >&6; }
16515if test "${gl_cv_pragma_columns+set}" = set; then :
f199cab1
GM
16516 $as_echo_n "(cached) " >&6
16517else
5476a9a4 16518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 16519/* end confdefs.h. */
f199cab1 16520
5476a9a4
GM
16521#ifdef __TANDEM
16522choke me
16523#endif
f199cab1 16524
f199cab1 16525_ACEOF
5476a9a4
GM
16526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16527 $EGREP "choke me" >/dev/null 2>&1; then :
16528 gl_cv_pragma_columns=yes
16529else
16530 gl_cv_pragma_columns=no
f199cab1 16531fi
5476a9a4 16532rm -f conftest*
f199cab1 16533
f199cab1 16534
5476a9a4
GM
16535fi
16536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
16537$as_echo "$gl_cv_pragma_columns" >&6; }
16538 if test $gl_cv_pragma_columns = yes; then
16539 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
f199cab1 16540 else
5476a9a4 16541 PRAGMA_COLUMNS=
f199cab1
GM
16542 fi
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
5f90be1b 16557
f199cab1
GM
16558
16559
16560 if test $gl_cv_have_include_next = yes; then
5476a9a4 16561 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 16562 else
5476a9a4
GM
16563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
16564$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
16565if test "${gl_cv_next_getopt_h+set}" = set; then :
5f90be1b 16566 $as_echo_n "(cached) " >&6
5f90be1b 16567else
f199cab1 16568
5476a9a4 16569 if test $ac_cv_header_getopt_h = yes; then
f199cab1
GM
16570
16571
16572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 16573/* end confdefs.h. */
5476a9a4 16574#include <getopt.h>
4fda9c95 16575
5f90be1b 16576_ACEOF
f199cab1
GM
16577 case "$host_os" in
16578 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16579 *) gl_absname_cpp="$ac_cpp" ;;
16580 esac
5f90be1b 16581
f199cab1
GM
16582 case "$host_os" in
16583 mingw*)
16584 gl_dirsep_regex='[/\\]'
16585 ;;
16586 *)
16587 gl_dirsep_regex='\/'
16588 ;;
16589 esac
16590 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
5f90be1b 16591
5476a9a4 16592 gl_header_literal_regex=`echo 'getopt.h' \
f199cab1
GM
16593 | sed -e "$gl_make_literal_regex_sed"`
16594 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
16595 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
16596 s|^/[^/]|//&|
16597 p
16598 q
16599 }'
5476a9a4 16600 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
f199cab1
GM
16601 sed -n "$gl_absolute_header_sed"`'"'
16602 else
5476a9a4 16603 gl_cv_next_getopt_h='<'getopt.h'>'
f199cab1 16604 fi
5f90be1b
PE
16605
16606
3e0be4ab 16607fi
5476a9a4
GM
16608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
16609$as_echo "$gl_cv_next_getopt_h" >&6; }
f199cab1 16610 fi
5476a9a4 16611 NEXT_GETOPT_H=$gl_cv_next_getopt_h
3e0be4ab 16612
f199cab1
GM
16613 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16614 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
5476a9a4 16615 gl_next_as_first_directive='<'getopt.h'>'
f199cab1
GM
16616 else
16617 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
5476a9a4 16618 gl_next_as_first_directive=$gl_cv_next_getopt_h
f199cab1 16619 fi
5476a9a4 16620 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
f199cab1
GM
16621
16622
f199cab1 16623
f199cab1 16624
5476a9a4
GM
16625 if test $ac_cv_header_getopt_h = yes; then
16626 HAVE_GETOPT_H=1
16627 else
16628 HAVE_GETOPT_H=0
f199cab1
GM
16629 fi
16630
f199cab1 16631
5476a9a4 16632 gl_replace_getopt=
f199cab1 16633
5476a9a4
GM
16634 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16635 for ac_header in getopt.h
16636do :
16637 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
16638if test "x$ac_cv_header_getopt_h" = x""yes; then :
16639 cat >>confdefs.h <<_ACEOF
16640#define HAVE_GETOPT_H 1
16641_ACEOF
f199cab1 16642
5476a9a4
GM
16643else
16644 gl_replace_getopt=yes
3e0be4ab 16645fi
3e0be4ab 16646
5476a9a4 16647done
3e0be4ab 16648
5476a9a4 16649 fi
3e0be4ab 16650
5476a9a4
GM
16651 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16652 for ac_func in getopt_long_only
16653do :
16654 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
16655if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
16656 cat >>confdefs.h <<_ACEOF
16657#define HAVE_GETOPT_LONG_ONLY 1
16658_ACEOF
3e0be4ab 16659
3e0be4ab 16660else
5476a9a4 16661 gl_replace_getopt=yes
3e0be4ab 16662fi
5476a9a4 16663done
3e0be4ab 16664
f199cab1 16665 fi
3e0be4ab 16666
5476a9a4
GM
16667 if test -z "$gl_replace_getopt"; then
16668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
16669$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
16670if test "${gl_cv_func_getopt_posix+set}" = set; then :
3e0be4ab 16671 $as_echo_n "(cached) " >&6
5476a9a4
GM
16672else
16673
16674 if test $cross_compiling = no; then
16675 if test "$cross_compiling" = yes; then :
16676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16678as_fn_error "cannot run test program while cross compiling
16679See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 16680else
f199cab1 16681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 16682/* end confdefs.h. */
5476a9a4
GM
16683
16684#include <unistd.h>
16685#include <stdlib.h>
16686#include <string.h>
16687
f199cab1
GM
16688int
16689main ()
16690{
5476a9a4
GM
16691 static char program[] = "program";
16692 static char a[] = "-a";
16693 static char foo[] = "foo";
16694 static char bar[] = "bar";
16695 char *argv[] = { program, a, foo, bar, NULL };
16696 int c;
16697
16698 c = getopt (4, argv, "ab");
16699 if (!(c == 'a'))
16700 return 1;
16701 c = getopt (4, argv, "ab");
16702 if (!(c == -1))
16703 return 2;
16704 if (!(optind == 2))
16705 return 3;
f199cab1
GM
16706 return 0;
16707}
16708
3e0be4ab 16709_ACEOF
5476a9a4
GM
16710if ac_fn_c_try_run "$LINENO"; then :
16711 gl_cv_func_getopt_posix=maybe
3e0be4ab 16712else
5476a9a4 16713 gl_cv_func_getopt_posix=no
3e0be4ab 16714fi
5476a9a4
GM
16715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16716 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
16717fi
16718
5476a9a4
GM
16719 if test $gl_cv_func_getopt_posix = maybe; then
16720 if test "$cross_compiling" = yes; then :
16721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16723as_fn_error "cannot run test program while cross compiling
16724See \`config.log' for more details." "$LINENO" 5; }
3e0be4ab 16725else
5476a9a4
GM
16726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16727/* end confdefs.h. */
3e0be4ab 16728
5476a9a4
GM
16729#include <unistd.h>
16730#include <stdlib.h>
16731#include <string.h>
3e0be4ab 16732
5476a9a4
GM
16733int
16734main ()
16735{
16736 static char program[] = "program";
16737 static char donald[] = "donald";
16738 static char p[] = "-p";
16739 static char billy[] = "billy";
16740 static char duck[] = "duck";
16741 static char a[] = "-a";
16742 static char bar[] = "bar";
16743 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
16744 int c;
3e0be4ab 16745
5476a9a4
GM
16746 c = getopt (7, argv, "+abp:q:");
16747 if (!(c == -1))
16748 return 4;
16749 if (!(strcmp (argv[0], "program") == 0))
16750 return 5;
16751 if (!(strcmp (argv[1], "donald") == 0))
16752 return 6;
16753 if (!(strcmp (argv[2], "-p") == 0))
16754 return 7;
16755 if (!(strcmp (argv[3], "billy") == 0))
16756 return 8;
16757 if (!(strcmp (argv[4], "duck") == 0))
16758 return 9;
16759 if (!(strcmp (argv[5], "-a") == 0))
16760 return 10;
16761 if (!(strcmp (argv[6], "bar") == 0))
16762 return 11;
16763 if (!(optind == 1))
16764 return 12;
16765 return 0;
16766}
3e0be4ab
GM
16767
16768_ACEOF
5476a9a4
GM
16769if ac_fn_c_try_run "$LINENO"; then :
16770 gl_cv_func_getopt_posix=maybe
16771else
16772 gl_cv_func_getopt_posix=no
16773fi
16774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16775 conftest.$ac_objext conftest.beam conftest.$ac_ext
16776fi
b0415a03 16777
5476a9a4
GM
16778 fi
16779 if test $gl_cv_func_getopt_posix = maybe; then
16780 if test "$cross_compiling" = yes; then :
16781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16783as_fn_error "cannot run test program while cross compiling
16784See \`config.log' for more details." "$LINENO" 5; }
16785else
16786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16787/* end confdefs.h. */
b0415a03 16788
5476a9a4
GM
16789#include <unistd.h>
16790#include <stdlib.h>
16791#include <string.h>
3e0be4ab 16792
5476a9a4
GM
16793int
16794main ()
16795{
16796 static char program[] = "program";
16797 static char ab[] = "-ab";
16798 char *argv[3] = { program, ab, NULL };
16799 if (getopt (2, argv, "ab:") != 'a')
16800 return 13;
16801 if (getopt (2, argv, "ab:") != '?')
16802 return 14;
16803 if (optopt != 'b')
16804 return 15;
16805 if (optind != 2)
16806 return 16;
16807 return 0;
16808}
3e0be4ab 16809
5476a9a4
GM
16810_ACEOF
16811if ac_fn_c_try_run "$LINENO"; then :
16812 gl_cv_func_getopt_posix=yes
16813else
16814 gl_cv_func_getopt_posix=no
16815fi
16816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16817 conftest.$ac_objext conftest.beam conftest.$ac_ext
3e0be4ab 16818fi
3e0be4ab 16819
5476a9a4
GM
16820 fi
16821 else
16822 case "$host_os" in
16823 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
16824 *) gl_cv_func_getopt_posix="guessing yes";;
16825 esac
16826 fi
3e0be4ab 16827
5476a9a4
GM
16828fi
16829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
16830$as_echo "$gl_cv_func_getopt_posix" >&6; }
16831 case "$gl_cv_func_getopt_posix" in
16832 *no) gl_replace_getopt=yes ;;
16833 esac
3e0be4ab
GM
16834 fi
16835
5476a9a4
GM
16836 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
16838$as_echo_n "checking for working GNU getopt function... " >&6; }
16839if test "${gl_cv_func_getopt_gnu+set}" = set; then :
16840 $as_echo_n "(cached) " >&6
16841else
16842 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
16843 # optstring is necessary for programs like m4 that have POSIX-mandated
16844 # semantics for supporting options interspersed with files.
16845 # Also, since getopt_long is a GNU extension, we require optind=0.
16846 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
16847 # so take care to revert to the correct (non-)export state.
16848 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
16849 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
16850 xx) gl_had_POSIXLY_CORRECT=exported ;;
16851 x) gl_had_POSIXLY_CORRECT=yes ;;
16852 *) gl_had_POSIXLY_CORRECT= ;;
16853 esac
16854 POSIXLY_CORRECT=1
16855 export POSIXLY_CORRECT
16856 if test "$cross_compiling" = yes; then :
16857 gl_cv_func_getopt_gnu="guessing no"
3e0be4ab 16858
5476a9a4
GM
16859else
16860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16861/* end confdefs.h. */
16862#include <getopt.h>
16863 #include <stddef.h>
16864 #include <string.h>
3e0be4ab 16865
5476a9a4
GM
16866#include <stdlib.h>
16867#if defined __MACH__ && defined __APPLE__
16868/* Avoid a crash on Mac OS X. */
16869#include <mach/mach.h>
16870#include <mach/mach_error.h>
16871#include <mach/thread_status.h>
16872#include <mach/exception.h>
16873#include <mach/task.h>
16874#include <pthread.h>
16875/* The exception port on which our thread listens. */
16876static mach_port_t our_exception_port;
16877/* The main function of the thread listening for exceptions of type
16878 EXC_BAD_ACCESS. */
16879static void *
16880mach_exception_thread (void *arg)
16881{
16882 /* Buffer for a message to be received. */
16883 struct {
16884 mach_msg_header_t head;
16885 mach_msg_body_t msgh_body;
16886 char data[1024];
16887 } msg;
16888 mach_msg_return_t retval;
16889 /* Wait for a message on the exception port. */
16890 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
16891 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
16892 if (retval != MACH_MSG_SUCCESS)
16893 abort ();
16894 exit (1);
16895}
16896static void
16897nocrash_init (void)
16898{
16899 mach_port_t self = mach_task_self ();
16900 /* Allocate a port on which the thread shall listen for exceptions. */
16901 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
16902 == KERN_SUCCESS) {
16903 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
16904 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
16905 MACH_MSG_TYPE_MAKE_SEND)
16906 == KERN_SUCCESS) {
16907 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
16908 for us. */
16909 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
16910 /* Create the thread listening on the exception port. */
16911 pthread_attr_t attr;
16912 pthread_t thread;
16913 if (pthread_attr_init (&attr) == 0
16914 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
16915 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
16916 pthread_attr_destroy (&attr);
16917 /* Replace the exception port info for these exceptions with our own.
16918 Note that we replace the exception port for the entire task, not only
16919 for a particular thread. This has the effect that when our exception
16920 port gets the message, the thread specific exception port has already
16921 been asked, and we don't need to bother about it.
16922 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
16923 task_set_exception_ports (self, mask, our_exception_port,
16924 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
16925 }
16926 }
16927 }
16928}
16929#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16930/* Avoid a crash on native Windows. */
16931#define WIN32_LEAN_AND_MEAN
16932#include <windows.h>
16933#include <winerror.h>
16934static LONG WINAPI
16935exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
16936{
16937 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
16938 {
16939 case EXCEPTION_ACCESS_VIOLATION:
16940 case EXCEPTION_IN_PAGE_ERROR:
16941 case EXCEPTION_STACK_OVERFLOW:
16942 case EXCEPTION_GUARD_PAGE:
16943 case EXCEPTION_PRIV_INSTRUCTION:
16944 case EXCEPTION_ILLEGAL_INSTRUCTION:
16945 case EXCEPTION_DATATYPE_MISALIGNMENT:
16946 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
16947 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
16948 exit (1);
16949 }
16950 return EXCEPTION_CONTINUE_SEARCH;
16951}
16952static void
16953nocrash_init (void)
16954{
16955 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
16956}
16957#else
16958/* Avoid a crash on POSIX systems. */
16959#include <signal.h>
16960/* A POSIX signal handler. */
16961static void
16962exception_handler (int sig)
16963{
16964 exit (1);
16965}
16966static void
16967nocrash_init (void)
16968{
16969#ifdef SIGSEGV
16970 signal (SIGSEGV, exception_handler);
16971#endif
16972#ifdef SIGBUS
16973 signal (SIGBUS, exception_handler);
16974#endif
16975}
16976#endif
3e0be4ab 16977
3e0be4ab 16978
5476a9a4
GM
16979int
16980main ()
16981{
3e0be4ab 16982
5476a9a4 16983 int result = 0;
3e0be4ab 16984
5476a9a4 16985 nocrash_init();
3e0be4ab 16986
5476a9a4
GM
16987 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
16988 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
16989 OSF/1 5.1, Solaris 10. */
16990 {
16991 static char conftest[] = "conftest";
16992 static char plus[] = "-+";
16993 char *argv[3] = { conftest, plus, NULL };
16994 opterr = 0;
16995 if (getopt (2, argv, "+a") != '?')
16996 result |= 1;
16997 }
16998 /* This code succeeds on glibc 2.8, mingw,
16999 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
17000 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
17001 {
17002 static char program[] = "program";
17003 static char p[] = "-p";
17004 static char foo[] = "foo";
17005 static char bar[] = "bar";
17006 char *argv[] = { program, p, foo, bar, NULL };
3e0be4ab 17007
5476a9a4
GM
17008 optind = 1;
17009 if (getopt (4, argv, "p::") != 'p')
17010 result |= 2;
17011 else if (optarg != NULL)
17012 result |= 4;
17013 else if (getopt (4, argv, "p::") != -1)
17014 result |= 6;
17015 else if (optind != 2)
17016 result |= 8;
17017 }
17018 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
17019 {
17020 static char program[] = "program";
17021 static char foo[] = "foo";
17022 static char p[] = "-p";
17023 char *argv[] = { program, foo, p, NULL };
17024 optind = 0;
17025 if (getopt (3, argv, "-p") != 1)
17026 result |= 16;
17027 else if (getopt (3, argv, "-p") != 'p')
17028 result |= 16;
17029 }
17030 /* This code fails on glibc 2.11. */
17031 {
17032 static char program[] = "program";
17033 static char b[] = "-b";
17034 static char a[] = "-a";
17035 char *argv[] = { program, b, a, NULL };
17036 optind = opterr = 0;
17037 if (getopt (3, argv, "+:a:b") != 'b')
17038 result |= 32;
17039 else if (getopt (3, argv, "+:a:b") != ':')
17040 result |= 32;
17041 }
17042 /* This code dumps core on glibc 2.14. */
17043 {
17044 static char program[] = "program";
17045 static char w[] = "-W";
17046 static char dummy[] = "dummy";
17047 char *argv[] = { program, w, dummy, NULL };
17048 optind = opterr = 1;
17049 if (getopt (3, argv, "W;") != 'W')
17050 result |= 64;
17051 }
17052 return result;
3e0be4ab 17053
5476a9a4
GM
17054 ;
17055 return 0;
17056}
17057_ACEOF
17058if ac_fn_c_try_run "$LINENO"; then :
17059 gl_cv_func_getopt_gnu=yes
17060else
17061 gl_cv_func_getopt_gnu=no
17062fi
17063rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17064 conftest.$ac_objext conftest.beam conftest.$ac_ext
17065fi
3e0be4ab 17066
5476a9a4
GM
17067 case $gl_had_POSIXLY_CORRECT in
17068 exported) ;;
17069 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
17070 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
17071 esac
3e0be4ab 17072
5476a9a4
GM
17073fi
17074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
17075$as_echo "$gl_cv_func_getopt_gnu" >&6; }
17076 if test "$gl_cv_func_getopt_gnu" != yes; then
17077 gl_replace_getopt=yes
17078 else
17079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
17080$as_echo_n "checking for working GNU getopt_long function... " >&6; }
17081if test "${gl_cv_func_getopt_long_gnu+set}" = set; then :
f199cab1
GM
17082 $as_echo_n "(cached) " >&6
17083else
5476a9a4
GM
17084 if test "$cross_compiling" = yes; then :
17085 case "$host_os" in
17086 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
17087 *) gl_cv_func_getopt_long_gnu="guessing yes";;
17088 esac
3e0be4ab
GM
17089
17090else
17091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17092/* end confdefs.h. */
5476a9a4
GM
17093#include <getopt.h>
17094 #include <stddef.h>
17095 #include <string.h>
f199cab1
GM
17096
17097int
17098main ()
369e19fc 17099{
5476a9a4
GM
17100static const struct option long_options[] =
17101 {
17102 { "xtremely-",no_argument, NULL, 1003 },
17103 { "xtra", no_argument, NULL, 1001 },
17104 { "xtreme", no_argument, NULL, 1002 },
17105 { "xtremely", no_argument, NULL, 1003 },
17106 { NULL, 0, NULL, 0 }
17107 };
17108 /* This code fails on OpenBSD 5.0. */
17109 {
17110 static char program[] = "program";
17111 static char xtremel[] = "--xtremel";
17112 char *argv[] = { program, xtremel, NULL };
17113 int option_index;
17114 optind = 1; opterr = 0;
17115 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
17116 return 1;
17117 }
17118 return 0;
f199cab1
GM
17119
17120 ;
17121 return 0;
369e19fc 17122}
f199cab1
GM
17123_ACEOF
17124if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 17125 gl_cv_func_getopt_long_gnu=yes
f199cab1 17126else
5476a9a4 17127 gl_cv_func_getopt_long_gnu=no
f199cab1
GM
17128fi
17129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17130 conftest.$ac_objext conftest.beam conftest.$ac_ext
17131fi
17132
5476a9a4 17133
f199cab1 17134fi
5476a9a4
GM
17135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
17136$as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
17137 case "$gl_cv_func_getopt_long_gnu" in
17138 *yes) ;;
17139 *) gl_replace_getopt=yes ;;
17140 esac
17141 fi
17142 fi
f199cab1 17143
f199cab1 17144
f199cab1 17145
369e19fc
PE
17146
17147
5476a9a4
GM
17148
17149 REPLACE_GETOPT=0
17150 if test -n "$gl_replace_getopt"; then
17151 REPLACE_GETOPT=1
f199cab1 17152 fi
3e0be4ab 17153
5476a9a4 17154 if test $REPLACE_GETOPT = 1; then
369e19fc 17155
5476a9a4 17156 GETOPT_H=getopt.h
369e19fc 17157
5476a9a4 17158$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b
GM
17159
17160
f199cab1 17161
5476a9a4 17162 fi
f199cab1 17163
5476a9a4
GM
17164ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
17165if test "x$ac_cv_have_decl_getenv" = x""yes; then :
17166 ac_have_decl=1
3e0be4ab 17167else
5476a9a4 17168 ac_have_decl=0
3e0be4ab 17169fi
e275c824 17170
5476a9a4
GM
17171cat >>confdefs.h <<_ACEOF
17172#define HAVE_DECL_GETENV $ac_have_decl
17173_ACEOF
17174
17175
17176
17177
f199cab1 17178
5476a9a4
GM
17179
17180
17181
17182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
17183$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
17184if test "${ac_cv_c_restrict+set}" = set; then :
17185 $as_echo_n "(cached) " >&6
f199cab1 17186else
5476a9a4
GM
17187 ac_cv_c_restrict=no
17188 # The order here caters to the fact that C++ does not require restrict.
17189 for ac_kw in __restrict __restrict__ _Restrict restrict; do
17190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 17191/* end confdefs.h. */
5476a9a4
GM
17192typedef int * int_ptr;
17193 int foo (int_ptr $ac_kw ip) {
17194 return ip[0];
17195 }
f199cab1
GM
17196int
17197main ()
17198{
5476a9a4
GM
17199int s[1];
17200 int * $ac_kw t = s;
17201 t[0] = 0;
17202 return foo(t)
f199cab1
GM
17203 ;
17204 return 0;
17205}
17206_ACEOF
5476a9a4
GM
17207if ac_fn_c_try_compile "$LINENO"; then :
17208 ac_cv_c_restrict=$ac_kw
f199cab1 17209fi
5476a9a4
GM
17210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17211 test "$ac_cv_c_restrict" != no && break
17212 done
f199cab1 17213
f199cab1 17214fi
5476a9a4
GM
17215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
17216$as_echo "$ac_cv_c_restrict" >&6; }
f199cab1 17217
5476a9a4
GM
17218 case $ac_cv_c_restrict in
17219 restrict) ;;
17220 no) $as_echo "#define restrict /**/" >>confdefs.h
17221 ;;
17222 *) cat >>confdefs.h <<_ACEOF
17223#define restrict $ac_cv_c_restrict
17224_ACEOF
17225 ;;
17226 esac
f199cab1 17227
f199cab1 17228
5476a9a4
GM
17229 GNULIB_GETTIMEOFDAY=0;
17230 HAVE_GETTIMEOFDAY=1;
17231 HAVE_STRUCT_TIMEVAL=1;
17232 HAVE_SYS_TIME_H=1;
17233 REPLACE_GETTIMEOFDAY=0;
17234 REPLACE_STRUCT_TIMEVAL=0;
e275c824 17235
e275c824 17236
e275c824 17237
e275c824 17238
4fda9c95 17239
5fa4ac76 17240
5fa4ac76 17241
5fa4ac76 17242
f199cab1
GM
17243
17244
17245
5fa4ac76 17246
5fa4ac76 17247
5fa4ac76 17248
5fa4ac76 17249
5fa4ac76 17250
5476a9a4
GM
17251 if test $gl_cv_have_include_next = yes; then
17252 gl_cv_next_sys_time_h='<'sys/time.h'>'
17253 else
17254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
17255$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
17256if test "${gl_cv_next_sys_time_h+set}" = set; then :
17257 $as_echo_n "(cached) " >&6
17258else
5fa4ac76 17259
5476a9a4 17260 if test $ac_cv_header_sys_time_h = yes; then
5fa4ac76
PE
17261
17262
5476a9a4
GM
17263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17264/* end confdefs.h. */
17265#include <sys/time.h>
5fa4ac76 17266
5476a9a4
GM
17267_ACEOF
17268 case "$host_os" in
17269 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17270 *) gl_absname_cpp="$ac_cpp" ;;
17271 esac
1f5d53eb 17272
5476a9a4
GM
17273 case "$host_os" in
17274 mingw*)
17275 gl_dirsep_regex='[/\\]'
17276 ;;
17277 *)
17278 gl_dirsep_regex='\/'
17279 ;;
17280 esac
17281 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1f5d53eb 17282
5476a9a4
GM
17283 gl_header_literal_regex=`echo 'sys/time.h' \
17284 | sed -e "$gl_make_literal_regex_sed"`
17285 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17286 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17287 s|^/[^/]|//&|
17288 p
17289 q
17290 }'
17291 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17292 sed -n "$gl_absolute_header_sed"`'"'
17293 else
17294 gl_cv_next_sys_time_h='<'sys/time.h'>'
17295 fi
1f5d53eb 17296
1f5d53eb 17297
5476a9a4
GM
17298fi
17299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
17300$as_echo "$gl_cv_next_sys_time_h" >&6; }
17301 fi
17302 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
3e0be4ab 17303
5476a9a4
GM
17304 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17305 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17306 gl_next_as_first_directive='<'sys/time.h'>'
17307 else
17308 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17309 gl_next_as_first_directive=$gl_cv_next_sys_time_h
17310 fi
17311 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
3e0be4ab 17312
e275c824 17313
3e0be4ab 17314
f199cab1
GM
17315
17316
5476a9a4
GM
17317 if test $ac_cv_header_sys_time_h != yes; then
17318 HAVE_SYS_TIME_H=0
17319 fi
f199cab1
GM
17320
17321
17322
17323
17324
5476a9a4
GM
17325 if test $ac_cv_header_sys_socket_h != yes; then
17326 for ac_header in winsock2.h
17327do :
17328 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17329if test "x$ac_cv_header_winsock2_h" = x""yes; then :
17330 cat >>confdefs.h <<_ACEOF
17331#define HAVE_WINSOCK2_H 1
17332_ACEOF
f199cab1 17333
5476a9a4 17334fi
3e0be4ab 17335
5476a9a4 17336done
3e0be4ab 17337
5476a9a4
GM
17338 fi
17339 if test "$ac_cv_header_winsock2_h" = yes; then
17340 HAVE_WINSOCK2_H=1
17341 UNISTD_H_HAVE_WINSOCK2_H=1
17342 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17343 else
17344 HAVE_WINSOCK2_H=0
17345 fi
17346
17347
17348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
17349$as_echo_n "checking for struct timeval... " >&6; }
17350if test "${gl_cv_sys_struct_timeval+set}" = set; then :
17351 $as_echo_n "(cached) " >&6
17352else
17353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17354/* end confdefs.h. */
17355#if HAVE_SYS_TIME_H
17356 #include <sys/time.h>
17357 #endif
17358 #include <time.h>
17359 #if HAVE_WINSOCK2_H
17360 # include <winsock2.h>
17361 #endif
f199cab1 17362
5476a9a4
GM
17363int
17364main ()
17365{
17366static struct timeval x; x.tv_sec = x.tv_usec;
17367 ;
17368 return 0;
17369}
17370_ACEOF
17371if ac_fn_c_try_compile "$LINENO"; then :
17372 gl_cv_sys_struct_timeval=yes
17373else
17374 gl_cv_sys_struct_timeval=no
f199cab1 17375fi
5476a9a4 17376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 17377
5476a9a4
GM
17378fi
17379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
17380$as_echo "$gl_cv_sys_struct_timeval" >&6; }
17381 if test $gl_cv_sys_struct_timeval != yes; then
17382 HAVE_STRUCT_TIMEVAL=0
17383 else
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
17385$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
17386if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
17387 $as_echo_n "(cached) " >&6
17388else
17389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17390/* end confdefs.h. */
17391#if HAVE_SYS_TIME_H
17392 #include <sys/time.h>
17393 #endif
17394 #include <time.h>
17395 #if HAVE_WINSOCK2_H
17396 # include <winsock2.h>
17397 #endif
f199cab1 17398
5476a9a4
GM
17399int
17400main ()
17401{
17402static struct timeval x;
17403 typedef int verify_tv_sec_type[
17404 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
17405 ];
f199cab1 17406
5476a9a4
GM
17407 ;
17408 return 0;
17409}
17410_ACEOF
17411if ac_fn_c_try_compile "$LINENO"; then :
17412 gl_cv_sys_struct_timeval_tv_sec=yes
17413else
17414 gl_cv_sys_struct_timeval_tv_sec=no
17415fi
17416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 17417
5476a9a4
GM
17418fi
17419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
17420$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
17421 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
17422 REPLACE_STRUCT_TIMEVAL=1
17423 fi
17424 fi
f199cab1 17425
f199cab1
GM
17426
17427
17428
17429
17430
f199cab1 17431
5476a9a4
GM
17432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17433$as_echo_n "checking for unsigned long long int... " >&6; }
17434if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
17435 $as_echo_n "(cached) " >&6
17436else
17437 ac_cv_type_unsigned_long_long_int=yes
17438 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17440/* end confdefs.h. */
f199cab1 17441
5476a9a4
GM
17442 /* For now, do not test the preprocessor; as of 2007 there are too many
17443 implementations with broken preprocessors. Perhaps this can
17444 be revisited in 2012. In the meantime, code should not expect
17445 #if to work with literals wider than 32 bits. */
17446 /* Test literals. */
17447 long long int ll = 9223372036854775807ll;
17448 long long int nll = -9223372036854775807LL;
17449 unsigned long long int ull = 18446744073709551615ULL;
17450 /* Test constant expressions. */
17451 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17452 ? 1 : -1)];
17453 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17454 ? 1 : -1)];
17455 int i = 63;
17456int
17457main ()
17458{
17459/* Test availability of runtime routines for shift and division. */
17460 long long int llmax = 9223372036854775807ll;
17461 unsigned long long int ullmax = 18446744073709551615ull;
17462 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17463 | (llmax / ll) | (llmax % ll)
17464 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17465 | (ullmax / ull) | (ullmax % ull));
17466 ;
17467 return 0;
17468}
f199cab1 17469
e275c824 17470_ACEOF
5476a9a4 17471if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 17472
5476a9a4
GM
17473else
17474 ac_cv_type_unsigned_long_long_int=no
e275c824 17475fi
5476a9a4
GM
17476rm -f core conftest.err conftest.$ac_objext \
17477 conftest$ac_exeext conftest.$ac_ext
17478 fi
17479fi
17480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17481$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17482 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 17483
5476a9a4 17484$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 17485
5476a9a4 17486 fi
e275c824
PE
17487
17488
f199cab1 17489
5476a9a4
GM
17490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
17491$as_echo_n "checking for long long int... " >&6; }
17492if test "${ac_cv_type_long_long_int+set}" = set; then :
17493 $as_echo_n "(cached) " >&6
17494else
17495 ac_cv_type_long_long_int=yes
17496 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17497 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
17498 if test $ac_cv_type_long_long_int = yes; then
17499 if test "$cross_compiling" = yes; then :
f199cab1 17500 :
5476a9a4
GM
17501else
17502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17503/* end confdefs.h. */
17504#include <limits.h>
17505 #ifndef LLONG_MAX
17506 # define HALF \
17507 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17508 # define LLONG_MAX (HALF - 1 + HALF)
17509 #endif
17510int
17511main ()
17512{
17513long long int n = 1;
17514 int i;
17515 for (i = 0; ; i++)
17516 {
17517 long long int m = n << i;
17518 if (m >> i != n)
17519 return 1;
17520 if (LLONG_MAX / 2 < m)
17521 break;
17522 }
17523 return 0;
17524 ;
17525 return 0;
17526}
17527_ACEOF
17528if ac_fn_c_try_run "$LINENO"; then :
17529
17530else
17531 ac_cv_type_long_long_int=no
17532fi
17533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17534 conftest.$ac_objext conftest.beam conftest.$ac_ext
17535fi
e275c824 17536
5476a9a4
GM
17537 fi
17538 fi
1f5d53eb 17539fi
5476a9a4
GM
17540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17541$as_echo "$ac_cv_type_long_long_int" >&6; }
17542 if test $ac_cv_type_long_long_int = yes; then
e275c824 17543
5476a9a4 17544$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 17545
5476a9a4 17546 fi
e275c824
PE
17547
17548
e275c824
PE
17549
17550
17551
17552
5476a9a4
GM
17553 gl_cv_c_multiarch=no
17554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17555/* end confdefs.h. */
17556#ifndef __APPLE_CC__
17557 not a universal capable compiler
17558 #endif
17559 typedef int dummy;
e275c824 17560
5476a9a4
GM
17561_ACEOF
17562if ac_fn_c_try_compile "$LINENO"; then :
e275c824 17563
5476a9a4
GM
17564 arch=
17565 prev=
17566 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
17567 if test -n "$prev"; then
17568 case $word in
17569 i?86 | x86_64 | ppc | ppc64)
17570 if test -z "$arch" || test "$arch" = "$word"; then
17571 arch="$word"
17572 else
17573 gl_cv_c_multiarch=yes
17574 fi
17575 ;;
17576 esac
17577 prev=
17578 else
17579 if test "x$word" = "x-arch"; then
17580 prev=arch
17581 fi
17582 fi
17583 done
f199cab1 17584
f199cab1 17585fi
5476a9a4
GM
17586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17587 if test $gl_cv_c_multiarch = yes; then
17588 APPLE_UNIVERSAL_BUILD=1
17589 else
17590 APPLE_UNIVERSAL_BUILD=0
17591 fi
e275c824
PE
17592
17593
67342916 17594
67342916 17595
67342916 17596
5476a9a4
GM
17597 if test $ac_cv_type_long_long_int = yes; then
17598 HAVE_LONG_LONG_INT=1
17599 else
17600 HAVE_LONG_LONG_INT=0
17601 fi
e275c824 17602
e275c824 17603
5476a9a4
GM
17604 if test $ac_cv_type_unsigned_long_long_int = yes; then
17605 HAVE_UNSIGNED_LONG_LONG_INT=1
17606 else
17607 HAVE_UNSIGNED_LONG_LONG_INT=0
17608 fi
e275c824
PE
17609
17610
17611
5476a9a4
GM
17612 if test $ac_cv_header_wchar_h = yes; then
17613 HAVE_WCHAR_H=1
17614 else
17615 HAVE_WCHAR_H=0
17616 fi
e275c824 17617
e275c824 17618
5476a9a4
GM
17619 if test $ac_cv_header_inttypes_h = yes; then
17620 HAVE_INTTYPES_H=1
17621 else
17622 HAVE_INTTYPES_H=0
17623 fi
6c051bab 17624
942f733f 17625
5476a9a4
GM
17626 if test $ac_cv_header_sys_types_h = yes; then
17627 HAVE_SYS_TYPES_H=1
17628 else
17629 HAVE_SYS_TYPES_H=0
17630 fi
4fc2b746 17631
4fc2b746 17632
f199cab1
GM
17633
17634
17635
17636
17637
17638
17639
17640
17641
5476a9a4
GM
17642 if test $gl_cv_have_include_next = yes; then
17643 gl_cv_next_stdint_h='<'stdint.h'>'
17644 else
17645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17646$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
17647if test "${gl_cv_next_stdint_h+set}" = set; then :
17648 $as_echo_n "(cached) " >&6
17649else
f199cab1 17650
5476a9a4 17651 if test $ac_cv_header_stdint_h = yes; then
f199cab1
GM
17652
17653
5476a9a4
GM
17654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17655/* end confdefs.h. */
17656#include <stdint.h>
f199cab1 17657
5476a9a4
GM
17658_ACEOF
17659 case "$host_os" in
17660 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17661 *) gl_absname_cpp="$ac_cpp" ;;
17662 esac
f199cab1 17663
5476a9a4
GM
17664 case "$host_os" in
17665 mingw*)
17666 gl_dirsep_regex='[/\\]'
17667 ;;
17668 *)
17669 gl_dirsep_regex='\/'
17670 ;;
17671 esac
17672 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
4fc2b746 17673
5476a9a4
GM
17674 gl_header_literal_regex=`echo 'stdint.h' \
17675 | sed -e "$gl_make_literal_regex_sed"`
17676 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17677 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17678 s|^/[^/]|//&|
17679 p
17680 q
17681 }'
17682 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17683 sed -n "$gl_absolute_header_sed"`'"'
17684 else
17685 gl_cv_next_stdint_h='<'stdint.h'>'
17686 fi
4fc2b746 17687
4fc2b746 17688
5476a9a4
GM
17689fi
17690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17691$as_echo "$gl_cv_next_stdint_h" >&6; }
17692 fi
17693 NEXT_STDINT_H=$gl_cv_next_stdint_h
b0415a03 17694
5476a9a4
GM
17695 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17696 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17697 gl_next_as_first_directive='<'stdint.h'>'
17698 else
17699 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17700 gl_next_as_first_directive=$gl_cv_next_stdint_h
17701 fi
17702 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
b0415a03 17703
4fc2b746 17704
f199cab1 17705
f199cab1 17706
5476a9a4
GM
17707 if test $ac_cv_header_stdint_h = yes; then
17708 HAVE_STDINT_H=1
17709 else
17710 HAVE_STDINT_H=0
17711 fi
f199cab1
GM
17712
17713
5476a9a4
GM
17714 if test $ac_cv_header_stdint_h = yes; then
17715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17716$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
17717if test "${gl_cv_header_working_stdint_h+set}" = set; then :
f199cab1
GM
17718 $as_echo_n "(cached) " >&6
17719else
5476a9a4
GM
17720 gl_cv_header_working_stdint_h=no
17721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17722/* end confdefs.h. */
4fc2b746
GM
17723
17724
5476a9a4
GM
17725#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17726#include <stdint.h>
17727/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
17728#if !(defined WCHAR_MIN && defined WCHAR_MAX)
17729#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17730#endif
4fc2b746 17731
942f733f 17732
5476a9a4
GM
17733 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17734 included before <wchar.h>. */
17735 #include <stddef.h>
17736 #include <signal.h>
17737 #if HAVE_WCHAR_H
17738 # include <stdio.h>
17739 # include <time.h>
17740 # include <wchar.h>
17741 #endif
e275c824 17742
f199cab1 17743
5476a9a4
GM
17744#ifdef INT8_MAX
17745int8_t a1 = INT8_MAX;
17746int8_t a1min = INT8_MIN;
17747#endif
17748#ifdef INT16_MAX
17749int16_t a2 = INT16_MAX;
17750int16_t a2min = INT16_MIN;
17751#endif
17752#ifdef INT32_MAX
17753int32_t a3 = INT32_MAX;
17754int32_t a3min = INT32_MIN;
17755#endif
17756#ifdef INT64_MAX
17757int64_t a4 = INT64_MAX;
17758int64_t a4min = INT64_MIN;
17759#endif
17760#ifdef UINT8_MAX
17761uint8_t b1 = UINT8_MAX;
17762#else
17763typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17764#endif
17765#ifdef UINT16_MAX
17766uint16_t b2 = UINT16_MAX;
17767#endif
17768#ifdef UINT32_MAX
17769uint32_t b3 = UINT32_MAX;
17770#endif
17771#ifdef UINT64_MAX
17772uint64_t b4 = UINT64_MAX;
17773#endif
17774int_least8_t c1 = INT8_C (0x7f);
17775int_least8_t c1max = INT_LEAST8_MAX;
17776int_least8_t c1min = INT_LEAST8_MIN;
17777int_least16_t c2 = INT16_C (0x7fff);
17778int_least16_t c2max = INT_LEAST16_MAX;
17779int_least16_t c2min = INT_LEAST16_MIN;
17780int_least32_t c3 = INT32_C (0x7fffffff);
17781int_least32_t c3max = INT_LEAST32_MAX;
17782int_least32_t c3min = INT_LEAST32_MIN;
17783int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17784int_least64_t c4max = INT_LEAST64_MAX;
17785int_least64_t c4min = INT_LEAST64_MIN;
17786uint_least8_t d1 = UINT8_C (0xff);
17787uint_least8_t d1max = UINT_LEAST8_MAX;
17788uint_least16_t d2 = UINT16_C (0xffff);
17789uint_least16_t d2max = UINT_LEAST16_MAX;
17790uint_least32_t d3 = UINT32_C (0xffffffff);
17791uint_least32_t d3max = UINT_LEAST32_MAX;
17792uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17793uint_least64_t d4max = UINT_LEAST64_MAX;
17794int_fast8_t e1 = INT_FAST8_MAX;
17795int_fast8_t e1min = INT_FAST8_MIN;
17796int_fast16_t e2 = INT_FAST16_MAX;
17797int_fast16_t e2min = INT_FAST16_MIN;
17798int_fast32_t e3 = INT_FAST32_MAX;
17799int_fast32_t e3min = INT_FAST32_MIN;
17800int_fast64_t e4 = INT_FAST64_MAX;
17801int_fast64_t e4min = INT_FAST64_MIN;
17802uint_fast8_t f1 = UINT_FAST8_MAX;
17803uint_fast16_t f2 = UINT_FAST16_MAX;
17804uint_fast32_t f3 = UINT_FAST32_MAX;
17805uint_fast64_t f4 = UINT_FAST64_MAX;
17806#ifdef INTPTR_MAX
17807intptr_t g = INTPTR_MAX;
17808intptr_t gmin = INTPTR_MIN;
17809#endif
17810#ifdef UINTPTR_MAX
17811uintptr_t h = UINTPTR_MAX;
17812#endif
17813intmax_t i = INTMAX_MAX;
17814uintmax_t j = UINTMAX_MAX;
5fa4ac76 17815
5476a9a4
GM
17816#include <limits.h> /* for CHAR_BIT */
17817#define TYPE_MINIMUM(t) \
17818 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17819#define TYPE_MAXIMUM(t) \
17820 ((t) ((t) 0 < (t) -1 \
17821 ? (t) -1 \
17822 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17823struct s {
17824 int check_PTRDIFF:
17825 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17826 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17827 ? 1 : -1;
17828 /* Detect bug in FreeBSD 6.0 / ia64. */
17829 int check_SIG_ATOMIC:
17830 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17831 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17832 ? 1 : -1;
17833 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17834 int check_WCHAR:
17835 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17836 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17837 ? 1 : -1;
17838 /* Detect bug in mingw. */
17839 int check_WINT:
17840 WINT_MIN == TYPE_MINIMUM (wint_t)
17841 && WINT_MAX == TYPE_MAXIMUM (wint_t)
17842 ? 1 : -1;
5fa4ac76 17843
5476a9a4
GM
17844 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
17845 int check_UINT8_C:
17846 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17847 int check_UINT16_C:
17848 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
17849
17850 /* Detect bugs in OpenBSD 3.9 stdint.h. */
17851#ifdef UINT8_MAX
17852 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
3e0be4ab 17853#endif
5476a9a4
GM
17854#ifdef UINT16_MAX
17855 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17856#endif
17857#ifdef UINT32_MAX
17858 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17859#endif
17860#ifdef UINT64_MAX
17861 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17862#endif
17863 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17864 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17865 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17866 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17867 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17868 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17869 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17870 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17871 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17872 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17873 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17874};
17875
f199cab1
GM
17876int
17877main ()
17878{
5476a9a4 17879
f199cab1
GM
17880 ;
17881 return 0;
17882}
17883_ACEOF
5476a9a4
GM
17884if ac_fn_c_try_compile "$LINENO"; then :
17885 if test "$cross_compiling" = yes; then :
17886 gl_cv_header_working_stdint_h=yes
40e27e7f 17887
5476a9a4
GM
17888else
17889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17890/* end confdefs.h. */
40e27e7f 17891
f199cab1 17892
5476a9a4
GM
17893#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17894#include <stdint.h>
f199cab1
GM
17895
17896
5476a9a4
GM
17897 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17898 included before <wchar.h>. */
17899 #include <stddef.h>
17900 #include <signal.h>
17901 #if HAVE_WCHAR_H
17902 # include <stdio.h>
17903 # include <time.h>
17904 # include <wchar.h>
17905 #endif
f199cab1 17906
d87ffdb7 17907
5476a9a4
GM
17908#include <stdio.h>
17909#include <string.h>
17910#define MVAL(macro) MVAL1(macro)
17911#define MVAL1(expression) #expression
17912static const char *macro_values[] =
17913 {
17914#ifdef INT8_MAX
17915 MVAL (INT8_MAX),
17916#endif
17917#ifdef INT16_MAX
17918 MVAL (INT16_MAX),
17919#endif
17920#ifdef INT32_MAX
17921 MVAL (INT32_MAX),
17922#endif
17923#ifdef INT64_MAX
17924 MVAL (INT64_MAX),
17925#endif
17926#ifdef UINT8_MAX
17927 MVAL (UINT8_MAX),
17928#endif
17929#ifdef UINT16_MAX
17930 MVAL (UINT16_MAX),
17931#endif
17932#ifdef UINT32_MAX
17933 MVAL (UINT32_MAX),
17934#endif
17935#ifdef UINT64_MAX
17936 MVAL (UINT64_MAX),
17937#endif
17938 NULL
17939 };
f199cab1 17940
3e0be4ab
GM
17941int
17942main ()
17943{
5476a9a4
GM
17944
17945 const char **mv;
17946 for (mv = macro_values; *mv != NULL; mv++)
17947 {
17948 const char *value = *mv;
17949 /* Test whether it looks like a cast expression. */
17950 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17951 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17952 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17953 || strncmp (value, "((int)"/*)*/, 6) == 0
17954 || strncmp (value, "((signed short)"/*)*/, 15) == 0
17955 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17956 return mv - macro_values + 1;
17957 }
3e0be4ab 17958 return 0;
5476a9a4 17959
f199cab1
GM
17960 ;
17961 return 0;
17962}
17963_ACEOF
5476a9a4
GM
17964if ac_fn_c_try_run "$LINENO"; then :
17965 gl_cv_header_working_stdint_h=yes
f199cab1 17966fi
5476a9a4
GM
17967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17968 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
17969fi
17970
d87ffdb7 17971
5476a9a4
GM
17972fi
17973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d87ffdb7 17974
5476a9a4
GM
17975fi
17976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17977$as_echo "$gl_cv_header_working_stdint_h" >&6; }
17978 fi
17979 if test "$gl_cv_header_working_stdint_h" = yes; then
17980 STDINT_H=
17981 else
17982 for ac_header in sys/inttypes.h sys/bitypes.h
17983do :
17984 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17985ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17986eval as_val=\$$as_ac_Header
17987 if test "x$as_val" = x""yes; then :
17988 cat >>confdefs.h <<_ACEOF
17989#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17990_ACEOF
d87ffdb7 17991
5476a9a4 17992fi
d87ffdb7 17993
5476a9a4 17994done
7d2a1c5e 17995
5476a9a4
GM
17996 if test $ac_cv_header_sys_inttypes_h = yes; then
17997 HAVE_SYS_INTTYPES_H=1
17998 else
17999 HAVE_SYS_INTTYPES_H=0
18000 fi
7d2a1c5e 18001
5476a9a4
GM
18002 if test $ac_cv_header_sys_bitypes_h = yes; then
18003 HAVE_SYS_BITYPES_H=1
18004 else
18005 HAVE_SYS_BITYPES_H=0
18006 fi
7d2a1c5e 18007
f199cab1
GM
18008
18009
18010
5476a9a4 18011 if test $APPLE_UNIVERSAL_BUILD = 0; then
f199cab1
GM
18012
18013
5476a9a4
GM
18014 for gltype in ptrdiff_t size_t ; do
18015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18016$as_echo_n "checking for bit size of $gltype... " >&6; }
18017if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18018 $as_echo_n "(cached) " >&6
18019else
18020 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18021 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18022 included before <wchar.h>. */
18023 #include <stddef.h>
18024 #include <signal.h>
18025 #if HAVE_WCHAR_H
18026 # include <stdio.h>
18027 # include <time.h>
18028 # include <wchar.h>
18029 #endif
f199cab1 18030
5476a9a4 18031#include <limits.h>"; then :
f199cab1 18032
5476a9a4
GM
18033else
18034 result=unknown
18035fi
f199cab1 18036
5476a9a4 18037 eval gl_cv_bitsizeof_${gltype}=\$result
f199cab1 18038
5476a9a4
GM
18039fi
18040eval ac_res=\$gl_cv_bitsizeof_${gltype}
18041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18042$as_echo "$ac_res" >&6; }
18043 eval result=\$gl_cv_bitsizeof_${gltype}
18044 if test $result = unknown; then
18045 result=0
18046 fi
18047 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18048 cat >>confdefs.h <<_ACEOF
18049#define BITSIZEOF_${GLTYPE} $result
18050_ACEOF
f199cab1 18051
5476a9a4
GM
18052 eval BITSIZEOF_${GLTYPE}=\$result
18053 done
f199cab1
GM
18054
18055
5476a9a4 18056 fi
f199cab1
GM
18057
18058
5476a9a4
GM
18059 for gltype in sig_atomic_t wchar_t wint_t ; do
18060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
18061$as_echo_n "checking for bit size of $gltype... " >&6; }
18062if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
18063 $as_echo_n "(cached) " >&6
18064else
18065 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
18066 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18067 included before <wchar.h>. */
18068 #include <stddef.h>
18069 #include <signal.h>
18070 #if HAVE_WCHAR_H
18071 # include <stdio.h>
18072 # include <time.h>
18073 # include <wchar.h>
18074 #endif
f199cab1 18075
5476a9a4 18076#include <limits.h>"; then :
f199cab1 18077
f199cab1 18078else
5476a9a4 18079 result=unknown
7d2a1c5e 18080fi
7d2a1c5e 18081
5476a9a4 18082 eval gl_cv_bitsizeof_${gltype}=\$result
7d2a1c5e 18083
3e0be4ab 18084fi
5476a9a4
GM
18085eval ac_res=\$gl_cv_bitsizeof_${gltype}
18086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18087$as_echo "$ac_res" >&6; }
18088 eval result=\$gl_cv_bitsizeof_${gltype}
18089 if test $result = unknown; then
18090 result=0
18091 fi
18092 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18093 cat >>confdefs.h <<_ACEOF
18094#define BITSIZEOF_${GLTYPE} $result
3e0be4ab 18095_ACEOF
7d2a1c5e 18096
5476a9a4
GM
18097 eval BITSIZEOF_${GLTYPE}=\$result
18098 done
7d2a1c5e
GM
18099
18100
5476a9a4
GM
18101
18102
18103 for gltype in sig_atomic_t wchar_t wint_t ; do
18104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
18105$as_echo_n "checking whether $gltype is signed... " >&6; }
18106if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
3e0be4ab
GM
18107 $as_echo_n "(cached) " >&6
18108else
f199cab1
GM
18109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18110/* end confdefs.h. */
f199cab1 18111
5476a9a4
GM
18112 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18113 included before <wchar.h>. */
18114 #include <stddef.h>
18115 #include <signal.h>
18116 #if HAVE_WCHAR_H
18117 # include <stdio.h>
18118 # include <time.h>
18119 # include <wchar.h>
18120 #endif
18121
18122 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
f199cab1
GM
18123int
18124main ()
18125{
5476a9a4 18126
f199cab1
GM
18127 ;
18128 return 0;
18129}
18130_ACEOF
18131if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18132 result=yes
f199cab1 18133else
5476a9a4 18134 result=no
f199cab1
GM
18135fi
18136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4 18137 eval gl_cv_type_${gltype}_signed=\$result
7d2a1c5e 18138
3e0be4ab 18139fi
5476a9a4
GM
18140eval ac_res=\$gl_cv_type_${gltype}_signed
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18142$as_echo "$ac_res" >&6; }
18143 eval result=\$gl_cv_type_${gltype}_signed
18144 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18145 if test "$result" = yes; then
18146 cat >>confdefs.h <<_ACEOF
18147#define HAVE_SIGNED_${GLTYPE} 1
f199cab1 18148_ACEOF
d87ffdb7 18149
5476a9a4
GM
18150 eval HAVE_SIGNED_${GLTYPE}=1
18151 else
18152 eval HAVE_SIGNED_${GLTYPE}=0
18153 fi
18154 done
f199cab1 18155
e275c824 18156
5476a9a4
GM
18157 gl_cv_type_ptrdiff_t_signed=yes
18158 gl_cv_type_size_t_signed=no
18159 if test $APPLE_UNIVERSAL_BUILD = 0; then
e275c824 18160
e275c824 18161
5476a9a4
GM
18162 for gltype in ptrdiff_t size_t ; do
18163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18164$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18165if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
18166 $as_echo_n "(cached) " >&6
18167else
5476a9a4
GM
18168 eval gl_cv_type_${gltype}_suffix=no
18169 eval result=\$gl_cv_type_${gltype}_signed
18170 if test "$result" = yes; then
18171 glsufu=
18172 else
18173 glsufu=u
18174 fi
18175 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18176 case $glsuf in
18177 '') gltype1='int';;
18178 l) gltype1='long int';;
18179 ll) gltype1='long long int';;
18180 i64) gltype1='__int64';;
18181 u) gltype1='unsigned int';;
18182 ul) gltype1='unsigned long int';;
18183 ull) gltype1='unsigned long long int';;
18184 ui64)gltype1='unsigned __int64';;
18185 esac
18186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18187/* end confdefs.h. */
16c3e636 18188
5476a9a4
GM
18189 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18190 included before <wchar.h>. */
18191 #include <stddef.h>
18192 #include <signal.h>
18193 #if HAVE_WCHAR_H
18194 # include <stdio.h>
18195 # include <time.h>
18196 # include <wchar.h>
18197 #endif
1f5d53eb 18198
5476a9a4
GM
18199 extern $gltype foo;
18200 extern $gltype1 foo;
f199cab1
GM
18201int
18202main ()
18203{
5476a9a4 18204
f199cab1
GM
18205 ;
18206 return 0;
18207}
18208_ACEOF
18209if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18210 eval gl_cv_type_${gltype}_suffix=\$glsuf
f199cab1
GM
18211fi
18212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18213 eval result=\$gl_cv_type_${gltype}_suffix
18214 test "$result" != no && break
18215 done
f199cab1 18216fi
5476a9a4
GM
18217eval ac_res=\$gl_cv_type_${gltype}_suffix
18218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18219$as_echo "$ac_res" >&6; }
18220 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18221 eval result=\$gl_cv_type_${gltype}_suffix
18222 test "$result" = no && result=
18223 eval ${GLTYPE}_SUFFIX=\$result
18224 cat >>confdefs.h <<_ACEOF
18225#define ${GLTYPE}_SUFFIX $result
18226_ACEOF
16c3e636 18227
5476a9a4 18228 done
16c3e636 18229
3e0be4ab 18230
5476a9a4
GM
18231 fi
18232
18233
18234 for gltype in sig_atomic_t wchar_t wint_t ; do
18235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
18236$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
18237if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
18238 $as_echo_n "(cached) " >&6
18239else
5476a9a4
GM
18240 eval gl_cv_type_${gltype}_suffix=no
18241 eval result=\$gl_cv_type_${gltype}_signed
18242 if test "$result" = yes; then
18243 glsufu=
18244 else
18245 glsufu=u
18246 fi
18247 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
18248 case $glsuf in
18249 '') gltype1='int';;
18250 l) gltype1='long int';;
18251 ll) gltype1='long long int';;
18252 i64) gltype1='__int64';;
18253 u) gltype1='unsigned int';;
18254 ul) gltype1='unsigned long int';;
18255 ull) gltype1='unsigned long long int';;
18256 ui64)gltype1='unsigned __int64';;
18257 esac
18258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 18259/* end confdefs.h. */
5476a9a4
GM
18260
18261 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
18262 included before <wchar.h>. */
18263 #include <stddef.h>
18264 #include <signal.h>
18265 #if HAVE_WCHAR_H
18266 # include <stdio.h>
18267 # include <time.h>
18268 # include <wchar.h>
18269 #endif
18270
18271 extern $gltype foo;
18272 extern $gltype1 foo;
1fd182f0
PE
18273int
18274main ()
18275{
5476a9a4 18276
1fd182f0
PE
18277 ;
18278 return 0;
18279}
18280_ACEOF
3e0be4ab 18281if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18282 eval gl_cv_type_${gltype}_suffix=\$glsuf
1f5d53eb 18283fi
3e0be4ab 18284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18285 eval result=\$gl_cv_type_${gltype}_suffix
18286 test "$result" != no && break
18287 done
f199cab1 18288fi
5476a9a4
GM
18289eval ac_res=\$gl_cv_type_${gltype}_suffix
18290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18291$as_echo "$ac_res" >&6; }
18292 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
18293 eval result=\$gl_cv_type_${gltype}_suffix
18294 test "$result" = no && result=
18295 eval ${GLTYPE}_SUFFIX=\$result
18296 cat >>confdefs.h <<_ACEOF
18297#define ${GLTYPE}_SUFFIX $result
f199cab1
GM
18298_ACEOF
18299
5476a9a4 18300 done
f199cab1 18301
f199cab1 18302
f199cab1 18303
5476a9a4
GM
18304 if test $BITSIZEOF_WINT_T -lt 32; then
18305 BITSIZEOF_WINT_T=32
18306 fi
f199cab1 18307
5476a9a4
GM
18308 STDINT_H=stdint.h
18309 fi
f199cab1 18310
5476a9a4
GM
18311 if test -n "$STDINT_H"; then
18312 GL_GENERATE_STDINT_H_TRUE=
18313 GL_GENERATE_STDINT_H_FALSE='#'
18314else
18315 GL_GENERATE_STDINT_H_TRUE='#'
18316 GL_GENERATE_STDINT_H_FALSE=
f199cab1
GM
18317fi
18318
f199cab1 18319
f199cab1 18320
3e0be4ab 18321
f199cab1 18322
5476a9a4
GM
18323 GNULIB_IMAXABS=0;
18324 GNULIB_IMAXDIV=0;
18325 GNULIB_STRTOIMAX=0;
18326 GNULIB_STRTOUMAX=0;
18327 HAVE_DECL_IMAXABS=1;
18328 HAVE_DECL_IMAXDIV=1;
18329 HAVE_DECL_STRTOIMAX=1;
18330 HAVE_DECL_STRTOUMAX=1;
18331 REPLACE_STRTOIMAX=0;
18332 INT32_MAX_LT_INTMAX_MAX=1;
18333 INT64_MAX_EQ_LONG_MAX='defined _LP64';
18334 PRI_MACROS_BROKEN=0;
18335 PRIPTR_PREFIX=__PRIPTR_PREFIX;
18336 UINT32_MAX_LT_UINTMAX_MAX=1;
18337 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
1fd182f0 18338
1fd182f0 18339
1f5d53eb 18340
3e0be4ab
GM
18341
18342
1fd182f0 18343
3e0be4ab 18344
3e0be4ab 18345
f199cab1 18346
1fd182f0 18347
1f5d53eb 18348
1f5d53eb 18349
1f5d53eb 18350
3e0be4ab 18351
3e0be4ab 18352
5476a9a4
GM
18353 if test $gl_cv_have_include_next = yes; then
18354 gl_cv_next_inttypes_h='<'inttypes.h'>'
18355 else
18356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
18357$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
18358if test "${gl_cv_next_inttypes_h+set}" = set; then :
18359 $as_echo_n "(cached) " >&6
f199cab1 18360else
2b1928b8 18361
5476a9a4 18362 if test $ac_cv_header_inttypes_h = yes; then
3e0be4ab
GM
18363
18364
5476a9a4 18365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 18366/* end confdefs.h. */
5476a9a4 18367#include <inttypes.h>
3e0be4ab 18368
f199cab1 18369_ACEOF
5476a9a4
GM
18370 case "$host_os" in
18371 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18372 *) gl_absname_cpp="$ac_cpp" ;;
18373 esac
1fd182f0 18374
5476a9a4
GM
18375 case "$host_os" in
18376 mingw*)
18377 gl_dirsep_regex='[/\\]'
18378 ;;
18379 *)
18380 gl_dirsep_regex='\/'
18381 ;;
18382 esac
18383 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
1fd182f0 18384
5476a9a4
GM
18385 gl_header_literal_regex=`echo 'inttypes.h' \
18386 | sed -e "$gl_make_literal_regex_sed"`
18387 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18388 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18389 s|^/[^/]|//&|
18390 p
18391 q
18392 }'
18393 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18394 sed -n "$gl_absolute_header_sed"`'"'
18395 else
18396 gl_cv_next_inttypes_h='<'inttypes.h'>'
18397 fi
1fd182f0
PE
18398
18399
5476a9a4
GM
18400fi
18401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
18402$as_echo "$gl_cv_next_inttypes_h" >&6; }
18403 fi
18404 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
1fd182f0 18405
5476a9a4
GM
18406 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18407 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18408 gl_next_as_first_directive='<'inttypes.h'>'
18409 else
18410 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18411 gl_next_as_first_directive=$gl_cv_next_inttypes_h
18412 fi
18413 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902
GM
18414
18415
3e0be4ab 18416
34119902 18417
3e0be4ab 18418
34119902 18419
b0415a03 18420
b0415a03 18421
3e0be4ab 18422
34119902 18423
34119902 18424
5476a9a4
GM
18425 case "$host_os" in
18426 mingw*)
18427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
18428$as_echo_n "checking for 64-bit off_t... " >&6; }
18429if test "${gl_cv_type_off_t_64+set}" = set; then :
f199cab1
GM
18430 $as_echo_n "(cached) " >&6
18431else
5476a9a4
GM
18432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18433/* end confdefs.h. */
18434#include <sys/types.h>
18435 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
18436
18437int
18438main ()
18439{
18440
18441 ;
18442 return 0;
18443}
f199cab1 18444_ACEOF
5476a9a4
GM
18445if ac_fn_c_try_compile "$LINENO"; then :
18446 gl_cv_type_off_t_64=yes
18447else
18448 gl_cv_type_off_t_64=no
f199cab1 18449fi
5476a9a4 18450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119902 18451
5476a9a4
GM
18452fi
18453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
18454$as_echo "$gl_cv_type_off_t_64" >&6; }
18455 if test $gl_cv_type_off_t_64 = no; then
18456 WINDOWS_64_BIT_OFF_T=1
18457 else
18458 WINDOWS_64_BIT_OFF_T=0
18459 fi
18460 WINDOWS_64_BIT_ST_SIZE=1
18461 ;;
18462 *)
18463 WINDOWS_64_BIT_OFF_T=0
18464 WINDOWS_64_BIT_ST_SIZE=0
18465 ;;
18466 esac
34119902
GM
18467
18468
5476a9a4
GM
18469 GNULIB_FCHMODAT=0;
18470 GNULIB_FSTAT=0;
18471 GNULIB_FSTATAT=0;
18472 GNULIB_FUTIMENS=0;
18473 GNULIB_LCHMOD=0;
18474 GNULIB_LSTAT=0;
18475 GNULIB_MKDIRAT=0;
18476 GNULIB_MKFIFO=0;
18477 GNULIB_MKFIFOAT=0;
18478 GNULIB_MKNOD=0;
18479 GNULIB_MKNODAT=0;
18480 GNULIB_STAT=0;
18481 GNULIB_UTIMENSAT=0;
18482 HAVE_FCHMODAT=1;
18483 HAVE_FSTATAT=1;
18484 HAVE_FUTIMENS=1;
18485 HAVE_LCHMOD=1;
18486 HAVE_LSTAT=1;
18487 HAVE_MKDIRAT=1;
18488 HAVE_MKFIFO=1;
18489 HAVE_MKFIFOAT=1;
18490 HAVE_MKNOD=1;
18491 HAVE_MKNODAT=1;
18492 HAVE_UTIMENSAT=1;
18493 REPLACE_FSTAT=0;
18494 REPLACE_FSTATAT=0;
18495 REPLACE_FUTIMENS=0;
18496 REPLACE_LSTAT=0;
18497 REPLACE_MKDIR=0;
18498 REPLACE_MKFIFO=0;
18499 REPLACE_MKNOD=0;
18500 REPLACE_STAT=0;
18501 REPLACE_UTIMENSAT=0;
34119902
GM
18502
18503
18504
18505
5476a9a4
GM
18506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
18507$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
18508if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
18509 $as_echo_n "(cached) " >&6
f199cab1 18510else
5476a9a4
GM
18511 rm -f conftest.sym conftest.file
18512 echo >conftest.file
18513 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
18514 if test "$cross_compiling" = yes; then :
18515 case "$host_os" in
18516 # Guess yes on glibc systems.
18517 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
18518 # If we don't know, assume the worst.
18519 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
18520 esac
34119902 18521
5476a9a4 18522else
f199cab1
GM
18523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18524/* end confdefs.h. */
5476a9a4 18525$ac_includes_default
0eb775a3
GM
18526int
18527main ()
18528{
5476a9a4
GM
18529struct stat sbuf;
18530 /* Linux will dereference the symlink and fail, as required by
18531 POSIX. That is better in the sense that it means we will not
18532 have to compile and use the lstat wrapper. */
18533 return lstat ("conftest.sym/", &sbuf) == 0;
18534
0eb775a3
GM
18535 ;
18536 return 0;
18537}
18538_ACEOF
5476a9a4
GM
18539if ac_fn_c_try_run "$LINENO"; then :
18540 gl_cv_func_lstat_dereferences_slashed_symlink=yes
0eb775a3 18541else
5476a9a4
GM
18542 gl_cv_func_lstat_dereferences_slashed_symlink=no
18543fi
18544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18545 conftest.$ac_objext conftest.beam conftest.$ac_ext
0eb775a3 18546fi
0eb775a3 18547
5476a9a4
GM
18548 else
18549 # If the 'ln -s' command failed, then we probably don't even
18550 # have an lstat function.
18551 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
18552 fi
18553 rm -f conftest.sym conftest.file
18554
0eb775a3 18555fi
5476a9a4
GM
18556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18557$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18558 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
18559 *yes)
18560
18561cat >>confdefs.h <<_ACEOF
18562#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18563_ACEOF
18564
18565 ;;
0eb775a3 18566 esac
34119902
GM
18567
18568
5476a9a4
GM
18569 GNULIB_MKTIME=0;
18570 GNULIB_NANOSLEEP=0;
18571 GNULIB_STRPTIME=0;
18572 GNULIB_TIMEGM=0;
18573 GNULIB_TIME_R=0;
18574 HAVE_DECL_LOCALTIME_R=1;
18575 HAVE_NANOSLEEP=1;
18576 HAVE_STRPTIME=1;
18577 HAVE_TIMEGM=1;
18578 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
18579 REPLACE_MKTIME=GNULIB_PORTCHECK;
18580 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
18581 REPLACE_TIMEGM=GNULIB_PORTCHECK;
34119902 18582
3e0be4ab
GM
18583
18584
18585
5476a9a4
GM
18586 GNULIB_PSELECT=0;
18587 GNULIB_SELECT=0;
18588 HAVE_PSELECT=1;
18589 REPLACE_PSELECT=0;
18590 REPLACE_SELECT=0;
18591
18592
3e0be4ab 18593
5476a9a4
GM
18594
18595
18596
18597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
18598$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
18599if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
f199cab1 18600 $as_echo_n "(cached) " >&6
3e0be4ab 18601else
5476a9a4
GM
18602
18603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 18604/* end confdefs.h. */
5476a9a4 18605#include <sys/select.h>
3e0be4ab
GM
18606int
18607main ()
18608{
5476a9a4 18609struct timeval b;
3e0be4ab
GM
18610 ;
18611 return 0;
18612}
34119902 18613_ACEOF
f199cab1 18614if ac_fn_c_try_compile "$LINENO"; then :
5476a9a4 18615 gl_cv_header_sys_select_h_selfcontained=yes
3e0be4ab 18616else
5476a9a4 18617 gl_cv_header_sys_select_h_selfcontained=no
3e0be4ab 18618fi
f199cab1 18619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476a9a4
GM
18620 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
18621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18622/* end confdefs.h. */
18623#include <sys/select.h>
18624int
18625main ()
18626{
18627int memset; int bzero;
18628 ;
18629 return 0;
18630}
3e0be4ab 18631
5476a9a4
GM
18632_ACEOF
18633if ac_fn_c_try_compile "$LINENO"; then :
f199cab1
GM
18634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18635/* end confdefs.h. */
5476a9a4 18636#include <sys/select.h>
f199cab1
GM
18637int
18638main ()
18639{
5476a9a4
GM
18640
18641 #undef memset
18642 #define memset nonexistent_memset
18643 extern
18644 #ifdef __cplusplus
18645 "C"
18646 #endif
18647 void *memset (void *, int, unsigned long);
18648 #undef bzero
18649 #define bzero nonexistent_bzero
18650 extern
18651 #ifdef __cplusplus
18652 "C"
18653 #endif
18654 void bzero (void *, unsigned long);
18655 fd_set fds;
18656 FD_ZERO (&fds);
18657
f199cab1
GM
18658 ;
18659 return 0;
18660}
5476a9a4 18661
f199cab1 18662_ACEOF
5476a9a4
GM
18663if ac_fn_c_try_link "$LINENO"; then :
18664
f199cab1 18665else
5476a9a4 18666 gl_cv_header_sys_select_h_selfcontained=no
f199cab1 18667fi
5476a9a4
GM
18668rm -f core conftest.err conftest.$ac_objext \
18669 conftest$ac_exeext conftest.$ac_ext
1fd182f0 18670
f199cab1 18671fi
5476a9a4
GM
18672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18673 fi
1fd182f0 18674
f199cab1 18675fi
5476a9a4
GM
18676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
18677$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
1fd182f0
PE
18678
18679
b06b1098 18680
0eb775a3
GM
18681
18682
b06b1098 18683
1fd182f0 18684
1fd182f0 18685
5476a9a4
GM
18686
18687 if test $gl_cv_have_include_next = yes; then
18688 gl_cv_next_sys_select_h='<'sys/select.h'>'
18689 else
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
18691$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
18692if test "${gl_cv_next_sys_select_h+set}" = set; then :
f199cab1 18693 $as_echo_n "(cached) " >&6
3e0be4ab 18694else
1fd182f0 18695
5476a9a4
GM
18696 if test $ac_cv_header_sys_select_h = yes; then
18697
18698
18699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18700/* end confdefs.h. */
18701#include <sys/select.h>
18702
18703_ACEOF
18704 case "$host_os" in
18705 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18706 *) gl_absname_cpp="$ac_cpp" ;;
18707 esac
18708
18709 case "$host_os" in
18710 mingw*)
18711 gl_dirsep_regex='[/\\]'
18712 ;;
18713 *)
18714 gl_dirsep_regex='\/'
18715 ;;
18716 esac
18717 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18718
18719 gl_header_literal_regex=`echo 'sys/select.h' \
18720 | sed -e "$gl_make_literal_regex_sed"`
18721 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18722 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18723 s|^/[^/]|//&|
18724 p
18725 q
18726 }'
18727 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18728 sed -n "$gl_absolute_header_sed"`'"'
18729 else
18730 gl_cv_next_sys_select_h='<'sys/select.h'>'
18731 fi
1fd182f0 18732
3e0be4ab 18733
1f5d53eb 18734fi
5476a9a4
GM
18735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
18736$as_echo "$gl_cv_next_sys_select_h" >&6; }
18737 fi
18738 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
1fd182f0 18739
5476a9a4
GM
18740 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18741 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18742 gl_next_as_first_directive='<'sys/select.h'>'
18743 else
18744 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18745 gl_next_as_first_directive=$gl_cv_next_sys_select_h
18746 fi
18747 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
1fd182f0
PE
18748
18749
5476a9a4
GM
18750
18751
18752 if test $ac_cv_header_sys_select_h = yes; then
18753 HAVE_SYS_SELECT_H=1
18754 else
18755 HAVE_SYS_SELECT_H=0
18756 fi
18757
18758
18759
18760
18761
18762 if test $ac_cv_header_sys_socket_h != yes; then
18763 for ac_header in winsock2.h
18764do :
18765 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18766if test "x$ac_cv_header_winsock2_h" = x""yes; then :
18767 cat >>confdefs.h <<_ACEOF
18768#define HAVE_WINSOCK2_H 1
f199cab1 18769_ACEOF
5476a9a4 18770
f199cab1 18771fi
3e0be4ab 18772
5476a9a4 18773done
3e0be4ab 18774
5476a9a4
GM
18775 fi
18776 if test "$ac_cv_header_winsock2_h" = yes; then
18777 HAVE_WINSOCK2_H=1
18778 UNISTD_H_HAVE_WINSOCK2_H=1
18779 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18780 else
18781 HAVE_WINSOCK2_H=0
18782 fi
f199cab1 18783
f199cab1 18784
f199cab1 18785
f199cab1 18786
3e0be4ab 18787
3e0be4ab 18788
3e0be4ab 18789
3e0be4ab 18790
5476a9a4
GM
18791 GNULIB_PTHREAD_SIGMASK=0;
18792 GNULIB_RAISE=0;
18793 GNULIB_SIGNAL_H_SIGPIPE=0;
18794 GNULIB_SIGPROCMASK=0;
18795 GNULIB_SIGACTION=0;
18796 HAVE_POSIX_SIGNALBLOCKING=1;
18797 HAVE_PTHREAD_SIGMASK=1;
18798 HAVE_RAISE=1;
18799 HAVE_SIGSET_T=1;
18800 HAVE_SIGINFO_T=1;
18801 HAVE_SIGACTION=1;
18802 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
18803
18804 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
f199cab1 18805
5476a9a4
GM
18806 HAVE_SIGHANDLER_T=1;
18807 REPLACE_PTHREAD_SIGMASK=0;
18808 REPLACE_RAISE=0;
1f5d53eb 18809
1fd182f0 18810
b06b1098 18811
1fd182f0 18812
3e0be4ab
GM
18813
18814
5476a9a4
GM
18815 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
18816 #include <signal.h>
18817 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
18818 #include <sys/types.h>
18819
18820"
18821if test "x$ac_cv_type_sigset_t" = x""yes; then :
18822
18823cat >>confdefs.h <<_ACEOF
18824#define HAVE_SIGSET_T 1
f199cab1 18825_ACEOF
3e0be4ab 18826
5476a9a4
GM
18827gl_cv_type_sigset_t=yes
18828else
18829 gl_cv_type_sigset_t=no
f199cab1 18830fi
3e0be4ab 18831
5476a9a4
GM
18832 if test $gl_cv_type_sigset_t != yes; then
18833 HAVE_SIGSET_T=0
18834 fi
3e0be4ab 18835
1f5d53eb 18836
3e0be4ab 18837
5476a9a4
GM
18838 if test $ac_cv_header_sys_socket_h = no; then
18839 for ac_header in ws2tcpip.h
18840do :
18841 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
18842if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
18843 cat >>confdefs.h <<_ACEOF
18844#define HAVE_WS2TCPIP_H 1
18845_ACEOF
3e0be4ab 18846
5476a9a4 18847fi
3e0be4ab 18848
5476a9a4
GM
18849done
18850
18851 fi
18852
18853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
18854$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
18855if test "${ac_cv_header_stdbool_h+set}" = set; then :
18856 $as_echo_n "(cached) " >&6
18857else
18858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18859/* end confdefs.h. */
1f5d53eb 18860
5476a9a4
GM
18861 #include <stdbool.h>
18862 #ifndef bool
18863 "error: bool is not defined"
18864 #endif
18865 #ifndef false
18866 "error: false is not defined"
18867 #endif
18868 #if false
18869 "error: false is not 0"
18870 #endif
18871 #ifndef true
18872 "error: true is not defined"
18873 #endif
18874 #if true != 1
18875 "error: true is not 1"
18876 #endif
18877 #ifndef __bool_true_false_are_defined
18878 "error: __bool_true_false_are_defined is not defined"
18879 #endif
18880
18881 struct s { _Bool s: 1; _Bool t; } s;
18882
18883 char a[true == 1 ? 1 : -1];
18884 char b[false == 0 ? 1 : -1];
18885 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
18886 char d[(bool) 0.5 == true ? 1 : -1];
18887 /* See body of main program for 'e'. */
18888 char f[(_Bool) 0.0 == false ? 1 : -1];
18889 char g[true];
18890 char h[sizeof (_Bool)];
18891 char i[sizeof s.t];
18892 enum { j = false, k = true, l = false * true, m = true * 256 };
18893 /* The following fails for
18894 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
18895 _Bool n[m];
18896 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
18897 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
18898 /* Catch a bug in an HP-UX C compiler. See
18899 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
18900 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
18901 */
18902 _Bool q = true;
18903 _Bool *pq = &q;
1ebc9c87
GM
18904
18905int
18906main ()
18907{
f199cab1 18908
5476a9a4
GM
18909 bool e = &s;
18910 *pq |= q;
18911 *pq |= ! q;
18912 /* Refer to every declared value, to avoid compiler optimizations. */
18913 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
18914 + !m + !n + !o + !p + !q + !pq);
f199cab1 18915
5476a9a4 18916 ;
1ebc9c87
GM
18917 return 0;
18918}
18919_ACEOF
5476a9a4
GM
18920if ac_fn_c_try_compile "$LINENO"; then :
18921 ac_cv_header_stdbool_h=yes
1ebc9c87 18922else
5476a9a4 18923 ac_cv_header_stdbool_h=no
1ebc9c87 18924fi
5476a9a4 18925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 18926fi
5476a9a4
GM
18927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
18928$as_echo "$ac_cv_header_stdbool_h" >&6; }
18929 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
18930if test "x$ac_cv_type__Bool" = x""yes; then :
1ebc9c87 18931
5476a9a4
GM
18932cat >>confdefs.h <<_ACEOF
18933#define HAVE__BOOL 1
18934_ACEOF
1ebc9c87 18935
1ebc9c87
GM
18936
18937fi
18938
1ebc9c87 18939
1ebc9c87 18940
5476a9a4
GM
18941 REPLACE_NULL=0;
18942 HAVE_WCHAR_T=1;
18943
18944
18945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
18946$as_echo_n "checking for wchar_t... " >&6; }
18947if test "${gt_cv_c_wchar_t+set}" = set; then :
18948 $as_echo_n "(cached) " >&6
18949else
18950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18951/* end confdefs.h. */
18952#include <stddef.h>
18953 wchar_t foo = (wchar_t)'\0';
18954int
18955main ()
18956{
18957
18958 ;
18959 return 0;
18960}
18961_ACEOF
18962if ac_fn_c_try_compile "$LINENO"; then :
18963 gt_cv_c_wchar_t=yes
18964else
18965 gt_cv_c_wchar_t=no
18966fi
18967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 18968fi
5476a9a4
GM
18969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
18970$as_echo "$gt_cv_c_wchar_t" >&6; }
18971 if test $gt_cv_c_wchar_t = yes; then
1ebc9c87 18972
5476a9a4
GM
18973$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
18974
18975 fi
18976
18977
18978 GNULIB_DPRINTF=0;
18979 GNULIB_FCLOSE=0;
18980 GNULIB_FDOPEN=0;
18981 GNULIB_FFLUSH=0;
18982 GNULIB_FGETC=0;
18983 GNULIB_FGETS=0;
18984 GNULIB_FOPEN=0;
18985 GNULIB_FPRINTF=0;
18986 GNULIB_FPRINTF_POSIX=0;
18987 GNULIB_FPURGE=0;
18988 GNULIB_FPUTC=0;
18989 GNULIB_FPUTS=0;
18990 GNULIB_FREAD=0;
18991 GNULIB_FREOPEN=0;
18992 GNULIB_FSCANF=0;
18993 GNULIB_FSEEK=0;
18994 GNULIB_FSEEKO=0;
18995 GNULIB_FTELL=0;
18996 GNULIB_FTELLO=0;
18997 GNULIB_FWRITE=0;
18998 GNULIB_GETC=0;
18999 GNULIB_GETCHAR=0;
19000 GNULIB_GETDELIM=0;
19001 GNULIB_GETLINE=0;
19002 GNULIB_OBSTACK_PRINTF=0;
19003 GNULIB_OBSTACK_PRINTF_POSIX=0;
19004 GNULIB_PCLOSE=0;
19005 GNULIB_PERROR=0;
19006 GNULIB_POPEN=0;
19007 GNULIB_PRINTF=0;
19008 GNULIB_PRINTF_POSIX=0;
19009 GNULIB_PUTC=0;
19010 GNULIB_PUTCHAR=0;
19011 GNULIB_PUTS=0;
19012 GNULIB_REMOVE=0;
19013 GNULIB_RENAME=0;
19014 GNULIB_RENAMEAT=0;
19015 GNULIB_SCANF=0;
19016 GNULIB_SNPRINTF=0;
19017 GNULIB_SPRINTF_POSIX=0;
19018 GNULIB_STDIO_H_NONBLOCKING=0;
19019 GNULIB_STDIO_H_SIGPIPE=0;
19020 GNULIB_TMPFILE=0;
19021 GNULIB_VASPRINTF=0;
19022 GNULIB_VFSCANF=0;
19023 GNULIB_VSCANF=0;
19024 GNULIB_VDPRINTF=0;
19025 GNULIB_VFPRINTF=0;
19026 GNULIB_VFPRINTF_POSIX=0;
19027 GNULIB_VPRINTF=0;
19028 GNULIB_VPRINTF_POSIX=0;
19029 GNULIB_VSNPRINTF=0;
19030 GNULIB_VSPRINTF_POSIX=0;
19031 HAVE_DECL_FPURGE=1;
19032 HAVE_DECL_FSEEKO=1;
19033 HAVE_DECL_FTELLO=1;
19034 HAVE_DECL_GETDELIM=1;
19035 HAVE_DECL_GETLINE=1;
19036 HAVE_DECL_OBSTACK_PRINTF=1;
19037 HAVE_DECL_SNPRINTF=1;
19038 HAVE_DECL_VSNPRINTF=1;
19039 HAVE_DPRINTF=1;
19040 HAVE_FSEEKO=1;
19041 HAVE_FTELLO=1;
19042 HAVE_PCLOSE=1;
19043 HAVE_POPEN=1;
19044 HAVE_RENAMEAT=1;
19045 HAVE_VASPRINTF=1;
19046 HAVE_VDPRINTF=1;
19047 REPLACE_DPRINTF=0;
19048 REPLACE_FCLOSE=0;
19049 REPLACE_FDOPEN=0;
19050 REPLACE_FFLUSH=0;
19051 REPLACE_FOPEN=0;
19052 REPLACE_FPRINTF=0;
19053 REPLACE_FPURGE=0;
19054 REPLACE_FREOPEN=0;
19055 REPLACE_FSEEK=0;
19056 REPLACE_FSEEKO=0;
19057 REPLACE_FTELL=0;
19058 REPLACE_FTELLO=0;
19059 REPLACE_GETDELIM=0;
19060 REPLACE_GETLINE=0;
19061 REPLACE_OBSTACK_PRINTF=0;
19062 REPLACE_PERROR=0;
19063 REPLACE_POPEN=0;
19064 REPLACE_PRINTF=0;
19065 REPLACE_REMOVE=0;
19066 REPLACE_RENAME=0;
19067 REPLACE_RENAMEAT=0;
19068 REPLACE_SNPRINTF=0;
19069 REPLACE_SPRINTF=0;
19070 REPLACE_STDIO_READ_FUNCS=0;
19071 REPLACE_STDIO_WRITE_FUNCS=0;
19072 REPLACE_TMPFILE=0;
19073 REPLACE_VASPRINTF=0;
19074 REPLACE_VDPRINTF=0;
19075 REPLACE_VFPRINTF=0;
19076 REPLACE_VPRINTF=0;
19077 REPLACE_VSNPRINTF=0;
19078 REPLACE_VSPRINTF=0;
1ebc9c87 19079
5476a9a4
GM
19080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
19081$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
19082if test "${ac_cv_struct_tm+set}" = set; then :
1ebc9c87
GM
19083 $as_echo_n "(cached) " >&6
19084else
5476a9a4 19085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1ebc9c87 19086/* end confdefs.h. */
5476a9a4
GM
19087#include <sys/types.h>
19088#include <time.h>
1ebc9c87
GM
19089
19090int
19091main ()
19092{
5476a9a4
GM
19093struct tm tm;
19094 int *p = &tm.tm_sec;
19095 return !p;
1ebc9c87
GM
19096 ;
19097 return 0;
19098}
19099_ACEOF
5476a9a4
GM
19100if ac_fn_c_try_compile "$LINENO"; then :
19101 ac_cv_struct_tm=time.h
1ebc9c87 19102else
5476a9a4 19103 ac_cv_struct_tm=sys/time.h
1ebc9c87 19104fi
5476a9a4 19105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1ebc9c87 19106fi
5476a9a4
GM
19107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
19108$as_echo "$ac_cv_struct_tm" >&6; }
19109if test $ac_cv_struct_tm = sys/time.h; then
1ebc9c87 19110
5476a9a4 19111$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
1ebc9c87 19112
1ebc9c87
GM
19113fi
19114
5476a9a4
GM
19115ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
19116#include <$ac_cv_struct_tm>
1fd182f0 19117
5476a9a4
GM
19118"
19119if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
1fd182f0 19120
5476a9a4
GM
19121cat >>confdefs.h <<_ACEOF
19122#define HAVE_STRUCT_TM_TM_ZONE 1
f199cab1 19123_ACEOF
5476a9a4
GM
19124
19125
1f5d53eb 19126fi
1fd182f0 19127
5476a9a4 19128if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
1f5d53eb 19129
5476a9a4 19130$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
1fd182f0 19131
5476a9a4
GM
19132else
19133 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
19134"
19135if test "x$ac_cv_have_decl_tzname" = x""yes; then :
19136 ac_have_decl=1
19137else
19138 ac_have_decl=0
19139fi
1fd182f0 19140
5476a9a4
GM
19141cat >>confdefs.h <<_ACEOF
19142#define HAVE_DECL_TZNAME $ac_have_decl
19143_ACEOF
f199cab1 19144
5476a9a4
GM
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
19146$as_echo_n "checking for tzname... " >&6; }
19147if test "${ac_cv_var_tzname+set}" = set; then :
f199cab1 19148 $as_echo_n "(cached) " >&6
3e0be4ab 19149else
5476a9a4 19150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 19151/* end confdefs.h. */
5476a9a4
GM
19152#include <time.h>
19153#if !HAVE_DECL_TZNAME
19154extern char *tzname[];
f199cab1 19155#endif
5476a9a4 19156
f199cab1
GM
19157int
19158main ()
19159{
5476a9a4 19160return tzname[0][0];
f199cab1
GM
19161 ;
19162 return 0;
19163}
3e0be4ab 19164_ACEOF
f199cab1 19165if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 19166 ac_cv_var_tzname=yes
3e0be4ab 19167else
5476a9a4 19168 ac_cv_var_tzname=no
f199cab1
GM
19169fi
19170rm -f core conftest.err conftest.$ac_objext \
19171 conftest$ac_exeext conftest.$ac_ext
f199cab1 19172fi
5476a9a4
GM
19173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
19174$as_echo "$ac_cv_var_tzname" >&6; }
19175 if test $ac_cv_var_tzname = yes; then
19176
19177$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
f199cab1 19178
5476a9a4 19179 fi
3e0be4ab 19180fi
cc322c06 19181
5476a9a4
GM
19182
19183 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
19184"
19185if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
19186
19187$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
cc322c06 19188
f199cab1 19189fi
cc322c06 19190
1f5d53eb 19191
e275c824 19192
5476a9a4
GM
19193
19194ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
19195if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
19196 ac_have_decl=1
3e0be4ab 19197else
5476a9a4 19198 ac_have_decl=0
3e0be4ab 19199fi
5476a9a4
GM
19200
19201cat >>confdefs.h <<_ACEOF
19202#define HAVE_DECL_STRTOIMAX $ac_have_decl
f199cab1 19203_ACEOF
e275c824
PE
19204
19205
5476a9a4
GM
19206
19207ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
19208if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
19209 ac_have_decl=1
19210else
19211 ac_have_decl=0
3e0be4ab 19212fi
e275c824 19213
5476a9a4
GM
19214cat >>confdefs.h <<_ACEOF
19215#define HAVE_DECL_STRTOUMAX $ac_have_decl
19216_ACEOF
e275c824
PE
19217
19218
2b1928b8 19219
5476a9a4
GM
19220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
19221$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
19222if test "${ac_cv_header_stat_broken+set}" = set; then :
f199cab1 19223 $as_echo_n "(cached) " >&6
2b1928b8 19224else
5476a9a4
GM
19225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19226/* end confdefs.h. */
19227#include <sys/types.h>
19228#include <sys/stat.h>
2b1928b8 19229
5476a9a4
GM
19230#if defined S_ISBLK && defined S_IFDIR
19231extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
19232#endif
2b1928b8 19233
5476a9a4
GM
19234#if defined S_ISBLK && defined S_IFCHR
19235extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
19236#endif
0eb775a3 19237
5476a9a4
GM
19238#if defined S_ISLNK && defined S_IFREG
19239extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
19240#endif
19241
19242#if defined S_ISSOCK && defined S_IFREG
19243extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
19244#endif
0eb775a3 19245
5476a9a4
GM
19246_ACEOF
19247if ac_fn_c_try_compile "$LINENO"; then :
19248 ac_cv_header_stat_broken=no
f199cab1 19249else
5476a9a4 19250 ac_cv_header_stat_broken=yes
f199cab1 19251fi
5476a9a4 19252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19253fi
5476a9a4
GM
19254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
19255$as_echo "$ac_cv_header_stat_broken" >&6; }
19256if test $ac_cv_header_stat_broken = yes; then
0eb775a3 19257
5476a9a4 19258$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
0eb775a3 19259
5476a9a4 19260fi
0eb775a3
GM
19261
19262
19263
5476a9a4
GM
19264ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
19265if test "x$ac_cv_type_mode_t" = x""yes; then :
f199cab1 19266
3e0be4ab 19267else
5476a9a4
GM
19268
19269cat >>confdefs.h <<_ACEOF
19270#define mode_t int
19271_ACEOF
19272
f199cab1 19273fi
5476a9a4
GM
19274
19275
19276
19277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
19278$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
19279if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
19280 $as_echo_n "(cached) " >&6
19281else
19282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19283/* end confdefs.h. */
5476a9a4 19284#include <time.h>
52724a05 19285
3e0be4ab
GM
19286int
19287main ()
19288{
5476a9a4 19289static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19290 ;
19291 return 0;
19292}
19293_ACEOF
5476a9a4
GM
19294if ac_fn_c_try_compile "$LINENO"; then :
19295 gl_cv_sys_struct_timespec_in_time_h=yes
3e0be4ab 19296else
5476a9a4 19297 gl_cv_sys_struct_timespec_in_time_h=no
3e0be4ab 19298fi
5476a9a4
GM
19299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19300fi
19301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
19302$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 19303
5476a9a4
GM
19304 TIME_H_DEFINES_STRUCT_TIMESPEC=0
19305 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
19306 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
19307 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
19308 TIME_H_DEFINES_STRUCT_TIMESPEC=1
19309 else
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
19311$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
19312if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
19313 $as_echo_n "(cached) " >&6
19314else
3e0be4ab
GM
19315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19316/* end confdefs.h. */
5476a9a4
GM
19317#include <sys/time.h>
19318
3e0be4ab
GM
19319int
19320main ()
19321{
5476a9a4 19322static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19323 ;
19324 return 0;
19325}
19326_ACEOF
5476a9a4
GM
19327if ac_fn_c_try_compile "$LINENO"; then :
19328 gl_cv_sys_struct_timespec_in_sys_time_h=yes
3e0be4ab 19329else
5476a9a4 19330 gl_cv_sys_struct_timespec_in_sys_time_h=no
3e0be4ab 19331fi
5476a9a4 19332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19333fi
5476a9a4
GM
19334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
19335$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
19336 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
19337 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
19338 else
19339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
19340$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
19341if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
3e0be4ab
GM
19342 $as_echo_n "(cached) " >&6
19343else
19344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19345/* end confdefs.h. */
5476a9a4
GM
19346#include <pthread.h>
19347
3e0be4ab
GM
19348int
19349main ()
19350{
5476a9a4 19351static struct timespec x; x.tv_sec = x.tv_nsec;
3e0be4ab
GM
19352 ;
19353 return 0;
19354}
19355_ACEOF
5476a9a4
GM
19356if ac_fn_c_try_compile "$LINENO"; then :
19357 gl_cv_sys_struct_timespec_in_pthread_h=yes
3e0be4ab 19358else
5476a9a4 19359 gl_cv_sys_struct_timespec_in_pthread_h=no
3e0be4ab 19360fi
5476a9a4 19361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab 19362fi
5476a9a4
GM
19363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
19364$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
19365 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
19366 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
19367 fi
19368 fi
f199cab1 19369 fi
e275c824
PE
19370
19371
b0415a03 19372
b0415a03 19373
e275c824 19374
e275c824
PE
19375
19376
f199cab1 19377
e275c824
PE
19378
19379
19380
19381
19382
19383
19384
5476a9a4
GM
19385 if test $gl_cv_have_include_next = yes; then
19386 gl_cv_next_time_h='<'time.h'>'
19387 else
19388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
19389$as_echo_n "checking absolute name of <time.h>... " >&6; }
19390if test "${gl_cv_next_time_h+set}" = set; then :
19391 $as_echo_n "(cached) " >&6
19392else
e275c824 19393
5476a9a4
GM
19394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19395/* end confdefs.h. */
19396#include <time.h>
e275c824 19397
5476a9a4
GM
19398_ACEOF
19399 case "$host_os" in
19400 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19401 *) gl_absname_cpp="$ac_cpp" ;;
19402 esac
e275c824 19403
5476a9a4
GM
19404 case "$host_os" in
19405 mingw*)
19406 gl_dirsep_regex='[/\\]'
19407 ;;
19408 *)
19409 gl_dirsep_regex='\/'
19410 ;;
19411 esac
19412 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
e275c824 19413
5476a9a4
GM
19414 gl_header_literal_regex=`echo 'time.h' \
19415 | sed -e "$gl_make_literal_regex_sed"`
19416 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19417 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19418 s|^/[^/]|//&|
19419 p
19420 q
19421 }'
19422 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19423 sed -n "$gl_absolute_header_sed"`'"'
e275c824
PE
19424
19425
5476a9a4
GM
19426fi
19427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
19428$as_echo "$gl_cv_next_time_h" >&6; }
19429 fi
19430 NEXT_TIME_H=$gl_cv_next_time_h
67342916 19431
5476a9a4
GM
19432 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19433 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19434 gl_next_as_first_directive='<'time.h'>'
f199cab1 19435 else
5476a9a4
GM
19436 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19437 gl_next_as_first_directive=$gl_cv_next_time_h
f199cab1 19438 fi
5476a9a4 19439 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
4fda9c95
GM
19440
19441
52724a05
GM
19442
19443
19444
19445
19446
19447
19448
ae0d7250
PE
19449
19450
19451
cc322c06 19452
f199cab1 19453
cc322c06 19454
5476a9a4
GM
19455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
19456$as_echo_n "checking whether the utimes function works... " >&6; }
19457if test "${gl_cv_func_working_utimes+set}" = set; then :
19458 $as_echo_n "(cached) " >&6
19459else
1fd182f0 19460
5476a9a4
GM
19461 if test "$cross_compiling" = yes; then :
19462 gl_cv_func_working_utimes=no
19463else
19464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19465/* end confdefs.h. */
19466
19467#include <sys/types.h>
19468#include <sys/stat.h>
19469#include <fcntl.h>
19470#include <sys/time.h>
19471#include <time.h>
19472#include <unistd.h>
19473#include <stdlib.h>
19474#include <stdio.h>
19475#include <utime.h>
1fd182f0 19476
5476a9a4
GM
19477static int
19478inorder (time_t a, time_t b, time_t c)
19479{
19480 return a <= b && b <= c;
19481}
1fd182f0 19482
5476a9a4
GM
19483int
19484main ()
19485{
19486 int result = 0;
19487 char const *file = "conftest.utimes";
19488 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
1fd182f0 19489
5476a9a4
GM
19490 /* Test whether utimes() essentially works. */
19491 {
19492 struct stat sbuf;
19493 FILE *f = fopen (file, "w");
19494 if (f == NULL)
19495 result |= 1;
19496 else if (fclose (f) != 0)
19497 result |= 1;
19498 else if (utimes (file, timeval) != 0)
19499 result |= 2;
19500 else if (lstat (file, &sbuf) != 0)
19501 result |= 1;
19502 else if (!(sbuf.st_atime == timeval[0].tv_sec
19503 && sbuf.st_mtime == timeval[1].tv_sec))
19504 result |= 4;
19505 if (unlink (file) != 0)
19506 result |= 1;
19507 }
1fd182f0 19508
5476a9a4
GM
19509 /* Test whether utimes() with a NULL argument sets the file's timestamp
19510 to the current time. Use 'fstat' as well as 'time' to
19511 determine the "current" time, to accommodate NFS file systems
19512 if there is a time skew between the host and the NFS server. */
19513 {
19514 int fd = open (file, O_WRONLY|O_CREAT, 0644);
19515 if (fd < 0)
19516 result |= 1;
19517 else
19518 {
19519 time_t t0, t2;
19520 struct stat st0, st1, st2;
19521 if (time (&t0) == (time_t) -1)
19522 result |= 1;
19523 else if (fstat (fd, &st0) != 0)
19524 result |= 1;
19525 else if (utimes (file, timeval) != 0)
19526 result |= 2;
19527 else if (utimes (file, NULL) != 0)
19528 result |= 8;
19529 else if (fstat (fd, &st1) != 0)
19530 result |= 1;
19531 else if (write (fd, "\n", 1) != 1)
19532 result |= 1;
19533 else if (fstat (fd, &st2) != 0)
19534 result |= 1;
19535 else if (time (&t2) == (time_t) -1)
19536 result |= 1;
19537 else
19538 {
19539 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
19540 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
19541 if (! (st1.st_atime == st1.st_mtime))
19542 result |= 16;
19543 if (! (m_ok_POSIX || m_ok_NFS))
19544 result |= 32;
19545 }
19546 if (close (fd) != 0)
19547 result |= 1;
19548 }
19549 if (unlink (file) != 0)
19550 result |= 1;
19551 }
52724a05 19552
5476a9a4
GM
19553 /* Test whether utimes() with a NULL argument works on read-only files. */
19554 {
19555 int fd = open (file, O_WRONLY|O_CREAT, 0444);
19556 if (fd < 0)
19557 result |= 1;
19558 else if (close (fd) != 0)
19559 result |= 1;
19560 else if (utimes (file, NULL) != 0)
19561 result |= 64;
19562 if (unlink (file) != 0)
19563 result |= 1;
19564 }
1fd182f0 19565
5476a9a4
GM
19566 return result;
19567}
1fd182f0 19568
5476a9a4
GM
19569_ACEOF
19570if ac_fn_c_try_run "$LINENO"; then :
19571 gl_cv_func_working_utimes=yes
19572else
19573 gl_cv_func_working_utimes=no
19574fi
19575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19576 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 19577fi
1fd182f0 19578
5476a9a4
GM
19579fi
19580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
19581$as_echo "$gl_cv_func_working_utimes" >&6; }
1fd182f0 19582
5476a9a4 19583 if test $gl_cv_func_working_utimes = yes; then
1fd182f0 19584
5476a9a4 19585$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
1fd182f0 19586
5476a9a4 19587 fi
1fd182f0 19588
1fd182f0 19589
1fd182f0 19590
1fd182f0 19591
1fd182f0 19592
5476a9a4
GM
19593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
19594$as_echo_n "checking for struct utimbuf... " >&6; }
19595if test "${gl_cv_sys_struct_utimbuf+set}" = set; then :
19596 $as_echo_n "(cached) " >&6
19597else
19598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19599/* end confdefs.h. */
19600#if HAVE_SYS_TIME_H
19601 #include <sys/time.h>
19602 #endif
19603 #include <time.h>
19604 #ifdef HAVE_UTIME_H
19605 #include <utime.h>
19606 #endif
1fd182f0 19607
5476a9a4
GM
19608int
19609main ()
19610{
19611static struct utimbuf x; x.actime = x.modtime;
19612 ;
19613 return 0;
19614}
19615_ACEOF
19616if ac_fn_c_try_compile "$LINENO"; then :
19617 gl_cv_sys_struct_utimbuf=yes
19618else
19619 gl_cv_sys_struct_utimbuf=no
f199cab1 19620fi
5476a9a4 19621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 19622fi
5476a9a4
GM
19623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
19624$as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
1fd182f0 19625
5476a9a4 19626 if test $gl_cv_sys_struct_utimbuf = yes; then
1fd182f0 19627
5476a9a4 19628$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1fd182f0 19629
5476a9a4 19630 fi
1fd182f0 19631
1fd182f0 19632
1fd182f0 19633
1fd182f0 19634
1fd182f0 19635
1fd182f0 19636
1fd182f0 19637
3e0be4ab 19638
f199cab1 19639
f199cab1 19640
067d23c9 19641
067d23c9 19642
5476a9a4
GM
19643 if false; then
19644 GL_COND_LIBTOOL_TRUE=
19645 GL_COND_LIBTOOL_FALSE='#'
19646else
19647 GL_COND_LIBTOOL_TRUE='#'
19648 GL_COND_LIBTOOL_FALSE=
1fd182f0 19649fi
067d23c9 19650
5476a9a4
GM
19651 gl_cond_libtool=false
19652 gl_libdeps=
19653 gl_ltlibdeps=
19654 gl_m4_base='m4'
067d23c9 19655
f199cab1 19656
f199cab1 19657
f199cab1 19658
067d23c9 19659
f199cab1 19660
f199cab1 19661
f199cab1 19662
067d23c9 19663
5476a9a4 19664 gl_source_base='lib'
cc322c06
GM
19665
19666
5476a9a4
GM
19667 if test $ac_cv_func_alloca_works = no; then
19668 :
f199cab1 19669 fi
cc322c06 19670
5476a9a4
GM
19671 # Define an additional variable used in the Makefile substitution.
19672 if test $ac_cv_working_alloca_h = yes; then
19673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
19674$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
19675if test "${gl_cv_rpl_alloca+set}" = set; then :
19676 $as_echo_n "(cached) " >&6
19677else
cc322c06 19678
5476a9a4
GM
19679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19680/* end confdefs.h. */
067d23c9 19681
5476a9a4
GM
19682#if defined __GNUC__ || defined _AIX || defined _MSC_VER
19683 Need own alloca
19684#endif
067d23c9 19685
f199cab1 19686_ACEOF
5476a9a4
GM
19687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19688 $EGREP "Need own alloca" >/dev/null 2>&1; then :
19689 gl_cv_rpl_alloca=yes
19690else
19691 gl_cv_rpl_alloca=no
369e19fc 19692fi
5476a9a4 19693rm -f conftest*
067d23c9 19694
ae0d7250 19695
5476a9a4
GM
19696fi
19697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
19698$as_echo "$gl_cv_rpl_alloca" >&6; }
19699 if test $gl_cv_rpl_alloca = yes; then
52724a05 19700
5476a9a4 19701$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
ae0d7250 19702
5476a9a4
GM
19703 ALLOCA_H=alloca.h
19704 else
19705 ALLOCA_H=
19706 fi
f199cab1 19707 else
5476a9a4
GM
19708 ALLOCA_H=alloca.h
19709 fi
ae0d7250 19710
5476a9a4
GM
19711 if test -n "$ALLOCA_H"; then
19712 GL_GENERATE_ALLOCA_H_TRUE=
19713 GL_GENERATE_ALLOCA_H_FALSE='#'
19714else
19715 GL_GENERATE_ALLOCA_H_TRUE='#'
19716 GL_GENERATE_ALLOCA_H_FALSE=
19717fi
f199cab1 19718
ae0d7250
PE
19719
19720
19721
19722
19723
5476a9a4
GM
19724 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
19725 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
ae0d7250 19726
5476a9a4
GM
19727 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
19728 # programs in the package would end up linked with that potentially-shared
19729 # library, inducing unnecessary run-time overhead.
19730 LIB_CLOCK_GETTIME=
ae0d7250 19731
5476a9a4
GM
19732 gl_saved_libs=$LIBS
19733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19734$as_echo_n "checking for library containing clock_gettime... " >&6; }
19735if test "${ac_cv_search_clock_gettime+set}" = set; then :
19736 $as_echo_n "(cached) " >&6
19737else
19738 ac_func_search_save_LIBS=$LIBS
19739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19740/* end confdefs.h. */
19741
19742/* Override any GCC internal prototype to avoid an error.
19743 Use char because int might match the return type of a GCC
19744 builtin and then its argument prototype would still apply. */
19745#ifdef __cplusplus
19746extern "C"
19747#endif
19748char clock_gettime ();
19749int
19750main ()
19751{
19752return clock_gettime ();
19753 ;
19754 return 0;
19755}
19756_ACEOF
19757for ac_lib in '' rt posix4; do
19758 if test -z "$ac_lib"; then
19759 ac_res="none required"
19760 else
19761 ac_res=-l$ac_lib
19762 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19763 fi
19764 if ac_fn_c_try_link "$LINENO"; then :
19765 ac_cv_search_clock_gettime=$ac_res
f199cab1 19766fi
5476a9a4
GM
19767rm -f core conftest.err conftest.$ac_objext \
19768 conftest$ac_exeext
19769 if test "${ac_cv_search_clock_gettime+set}" = set; then :
19770 break
19771fi
19772done
19773if test "${ac_cv_search_clock_gettime+set}" = set; then :
ae0d7250 19774
5476a9a4
GM
19775else
19776 ac_cv_search_clock_gettime=no
19777fi
19778rm conftest.$ac_ext
19779LIBS=$ac_func_search_save_LIBS
19780fi
19781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19782$as_echo "$ac_cv_search_clock_gettime" >&6; }
19783ac_res=$ac_cv_search_clock_gettime
19784if test "$ac_res" != no; then :
19785 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19786 test "$ac_cv_search_clock_gettime" = "none required" ||
19787 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
19788fi
ae0d7250 19789
5476a9a4
GM
19790 for ac_func in clock_gettime clock_settime
19791do :
19792 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19793ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19794eval as_val=\$$as_ac_var
19795 if test "x$as_val" = x""yes; then :
19796 cat >>confdefs.h <<_ACEOF
19797#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19798_ACEOF
ae0d7250 19799
5476a9a4
GM
19800fi
19801done
ae0d7250 19802
5476a9a4 19803 LIBS=$gl_saved_libs
3e0be4ab
GM
19804
19805
3e0be4ab 19806
3e0be4ab 19807
5476a9a4 19808 :
3e0be4ab 19809
f199cab1 19810
f199cab1 19811
f199cab1 19812
5476a9a4 19813 :
3e0be4ab 19814
f199cab1 19815
f199cab1 19816
3e0be4ab 19817
f199cab1
GM
19818
19819
19820
5476a9a4
GM
19821
19822
19823
19824
19825
19826
19827
19828
19829$as_echo "#define HAVE_DUP2 1" >>confdefs.h
19830
19831
19832 if test $HAVE_DUP2 = 1; then
19833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19834$as_echo_n "checking whether dup2 works... " >&6; }
19835if test "${gl_cv_func_dup2_works+set}" = set; then :
3e0be4ab
GM
19836 $as_echo_n "(cached) " >&6
19837else
5476a9a4
GM
19838 if test "$cross_compiling" = yes; then :
19839 case "$host_os" in
19840 mingw*) # on this platform, dup2 always returns 0 for success
19841 gl_cv_func_dup2_works="guessing no" ;;
19842 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
19843 gl_cv_func_dup2_works="guessing no" ;;
19844 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
19845 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
19846 gl_cv_func_dup2_works="guessing no" ;;
19847 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
19848 gl_cv_func_dup2_works="guessing no" ;;
19849 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19850 gl_cv_func_dup2_works="guessing no" ;;
19851 *) gl_cv_func_dup2_works="guessing yes" ;;
19852 esac
19853else
19854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 19855/* end confdefs.h. */
ae0d7250 19856
5476a9a4
GM
19857 #include <unistd.h>
19858#include <fcntl.h>
19859#include <errno.h>
3e0be4ab
GM
19860int
19861main ()
19862{
5476a9a4
GM
19863int result = 0;
19864#ifdef FD_CLOEXEC
19865 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19866 result |= 1;
19867#endif
19868 if (dup2 (1, 1) == 0)
19869 result |= 2;
19870#ifdef FD_CLOEXEC
19871 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19872 result |= 4;
19873#endif
19874 close (0);
19875 if (dup2 (0, 0) != -1)
19876 result |= 8;
19877 /* Many gnulib modules require POSIX conformance of EBADF. */
19878 if (dup2 (2, 1000000) == -1 && errno != EBADF)
19879 result |= 16;
19880 return result;
19881
ae0d7250
PE
19882 ;
19883 return 0;
19884}
5476a9a4 19885
ae0d7250 19886_ACEOF
5476a9a4
GM
19887if ac_fn_c_try_run "$LINENO"; then :
19888 gl_cv_func_dup2_works=yes
ae0d7250 19889else
5476a9a4 19890 gl_cv_func_dup2_works=no
ae0d7250 19891fi
5476a9a4
GM
19892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19893 conftest.$ac_objext conftest.beam conftest.$ac_ext
ae0d7250 19894fi
5476a9a4
GM
19895
19896
3e0be4ab 19897fi
5476a9a4
GM
19898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19899$as_echo "$gl_cv_func_dup2_works" >&6; }
19900 case "$gl_cv_func_dup2_works" in
19901 *yes) ;;
19902 *)
19903 REPLACE_DUP2=1
19904 ;;
19905 esac
19906 fi
3e0be4ab 19907
3e0be4ab 19908
5476a9a4 19909if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
f199cab1 19910
f199cab1
GM
19911
19912
f199cab1 19913
f199cab1 19914
f199cab1 19915
f199cab1 19916
f199cab1 19917
5476a9a4 19918 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
f199cab1
GM
19919
19920
5476a9a4 19921fi
f199cab1 19922
f199cab1 19923
f199cab1 19924
f199cab1 19925
f199cab1 19926
5476a9a4 19927 GNULIB_DUP2=1
f199cab1
GM
19928
19929
f199cab1 19930
f199cab1 19931
3e0be4ab 19932
3e0be4ab 19933
f199cab1
GM
19934
19935
ae0d7250 19936
ae0d7250 19937
5476a9a4 19938
93131e11
GM
19939 GNULIB_ENVIRON=1
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
5476a9a4
GM
19951# Persuade glibc <stdlib.h> to declare getloadavg().
19952
19953
19954gl_save_LIBS=$LIBS
19955
19956# getloadvg is present in libc on glibc >= 2.2, Mac OS X, FreeBSD >= 2.0,
19957# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
19958HAVE_GETLOADAVG=1
19959ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
19960if test "x$ac_cv_func_getloadavg" = x""yes; then :
19961
19962else
19963 gl_func_getloadavg_done=no
19964
19965 # Some systems with -lutil have (and need) -lkvm as well, some do not.
19966 # On Solaris, -lkvm requires nlist from -lelf, so check that first
19967 # to get the right answer into the cache.
19968 # For kstat on solaris, we need to test for libelf and libkvm to force the
19969 # definition of SVR4 below.
19970 if test $gl_func_getloadavg_done = no; then
19971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
19972$as_echo_n "checking for elf_begin in -lelf... " >&6; }
19973if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
6ad6792b
GM
19974 $as_echo_n "(cached) " >&6
19975else
3e0be4ab 19976 ac_check_lib_save_LIBS=$LIBS
5476a9a4 19977LIBS="-lelf $LIBS"
3e0be4ab 19978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 19979/* end confdefs.h. */
6ad6792b 19980
3e0be4ab
GM
19981/* Override any GCC internal prototype to avoid an error.
19982 Use char because int might match the return type of a GCC
19983 builtin and then its argument prototype would still apply. */
19984#ifdef __cplusplus
19985extern "C"
19986#endif
5476a9a4 19987char elf_begin ();
6ad6792b
GM
19988int
19989main ()
19990{
5476a9a4 19991return elf_begin ();
6ad6792b
GM
19992 ;
19993 return 0;
19994}
19995_ACEOF
3e0be4ab 19996if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 19997 ac_cv_lib_elf_elf_begin=yes
3e0be4ab 19998else
5476a9a4 19999 ac_cv_lib_elf_elf_begin=no
6ad6792b 20000fi
3e0be4ab
GM
20001rm -f core conftest.err conftest.$ac_objext \
20002 conftest$ac_exeext conftest.$ac_ext
20003LIBS=$ac_check_lib_save_LIBS
6ad6792b 20004fi
5476a9a4
GM
20005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
20006$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
20007if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
20008 LIBS="-lelf $LIBS"
6ad6792b
GM
20009fi
20010
5476a9a4
GM
20011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
20012$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
20013if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
6c051bab
GM
20014 $as_echo_n "(cached) " >&6
20015else
5476a9a4
GM
20016 ac_check_lib_save_LIBS=$LIBS
20017LIBS="-lkvm $LIBS"
20018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 20019/* end confdefs.h. */
3e0be4ab 20020
5476a9a4
GM
20021/* Override any GCC internal prototype to avoid an error.
20022 Use char because int might match the return type of a GCC
20023 builtin and then its argument prototype would still apply. */
20024#ifdef __cplusplus
20025extern "C"
20026#endif
20027char kvm_open ();
6c051bab
GM
20028int
20029main ()
20030{
5476a9a4 20031return kvm_open ();
6c051bab
GM
20032 ;
20033 return 0;
20034}
20035_ACEOF
3e0be4ab 20036if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20037 ac_cv_lib_kvm_kvm_open=yes
6c051bab 20038else
5476a9a4 20039 ac_cv_lib_kvm_kvm_open=no
6c051bab 20040fi
3e0be4ab
GM
20041rm -f core conftest.err conftest.$ac_objext \
20042 conftest$ac_exeext conftest.$ac_ext
5476a9a4 20043LIBS=$ac_check_lib_save_LIBS
6c051bab 20044fi
5476a9a4
GM
20045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
20046$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
20047if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
20048 LIBS="-lkvm $LIBS"
3e0be4ab 20049fi
6c051bab 20050
5476a9a4
GM
20051 # Check for the 4.4BSD definition of getloadavg.
20052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
20053$as_echo_n "checking for getloadavg in -lutil... " >&6; }
20054if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
20055 $as_echo_n "(cached) " >&6
20056else
5476a9a4
GM
20057 ac_check_lib_save_LIBS=$LIBS
20058LIBS="-lutil $LIBS"
20059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 20060/* end confdefs.h. */
5476a9a4
GM
20061
20062/* Override any GCC internal prototype to avoid an error.
20063 Use char because int might match the return type of a GCC
20064 builtin and then its argument prototype would still apply. */
20065#ifdef __cplusplus
20066extern "C"
20067#endif
20068char getloadavg ();
ae0d7250
PE
20069int
20070main ()
20071{
5476a9a4 20072return getloadavg ();
ae0d7250
PE
20073 ;
20074 return 0;
20075}
20076_ACEOF
3e0be4ab 20077if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20078 ac_cv_lib_util_getloadavg=yes
ae0d7250 20079else
5476a9a4 20080 ac_cv_lib_util_getloadavg=no
ae0d7250 20081fi
3e0be4ab
GM
20082rm -f core conftest.err conftest.$ac_objext \
20083 conftest$ac_exeext conftest.$ac_ext
5476a9a4
GM
20084LIBS=$ac_check_lib_save_LIBS
20085fi
20086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
20087$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
20088if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
20089 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
3e0be4ab 20090fi
6d153f56 20091
5476a9a4 20092 fi
6d153f56 20093
5476a9a4
GM
20094 if test $gl_func_getloadavg_done = no; then
20095 # There is a commonly available library for RS/6000 AIX.
20096 # Since it is not a standard part of AIX, it might be installed locally.
20097 gl_getloadavg_LIBS=$LIBS
20098 LIBS="-L/usr/local/lib $LIBS"
20099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
20100$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
20101if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
f199cab1 20102 $as_echo_n "(cached) " >&6
3e0be4ab 20103else
f199cab1 20104 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20105LIBS="-lgetloadavg $LIBS"
f199cab1
GM
20106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20107/* end confdefs.h. */
3e0be4ab 20108
f199cab1
GM
20109/* Override any GCC internal prototype to avoid an error.
20110 Use char because int might match the return type of a GCC
20111 builtin and then its argument prototype would still apply. */
20112#ifdef __cplusplus
20113extern "C"
20114#endif
5476a9a4 20115char getloadavg ();
f199cab1
GM
20116int
20117main ()
20118{
5476a9a4 20119return getloadavg ();
f199cab1
GM
20120 ;
20121 return 0;
20122}
ae0d7250 20123_ACEOF
f199cab1 20124if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20125 ac_cv_lib_getloadavg_getloadavg=yes
f199cab1 20126else
5476a9a4 20127 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 20128fi
f199cab1
GM
20129rm -f core conftest.err conftest.$ac_objext \
20130 conftest$ac_exeext conftest.$ac_ext
20131LIBS=$ac_check_lib_save_LIBS
3e0be4ab 20132fi
5476a9a4
GM
20133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
20134$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
20135if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
20136 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
20137else
20138 LIBS=$gl_getloadavg_LIBS
6d153f56 20139fi
ae0d7250 20140
5476a9a4 20141 fi
16c3e636 20142
5476a9a4
GM
20143 # Set up the replacement function if necessary.
20144 if test $gl_func_getloadavg_done = no; then
20145 HAVE_GETLOADAVG=0
16c3e636 20146
5476a9a4
GM
20147 # Solaris has libkstat which does not require root.
20148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
20149$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
20150if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
f199cab1
GM
20151 $as_echo_n "(cached) " >&6
20152else
20153 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20154LIBS="-lkstat $LIBS"
f199cab1
GM
20155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20156/* end confdefs.h. */
5f90be1b 20157
f199cab1
GM
20158/* Override any GCC internal prototype to avoid an error.
20159 Use char because int might match the return type of a GCC
20160 builtin and then its argument prototype would still apply. */
20161#ifdef __cplusplus
20162extern "C"
20163#endif
5476a9a4 20164char kstat_open ();
f199cab1
GM
20165int
20166main ()
20167{
5476a9a4 20168return kstat_open ();
f199cab1
GM
20169 ;
20170 return 0;
20171}
3e0be4ab 20172_ACEOF
f199cab1 20173if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20174 ac_cv_lib_kstat_kstat_open=yes
f199cab1 20175else
5476a9a4 20176 ac_cv_lib_kstat_kstat_open=no
5f90be1b 20177fi
f199cab1
GM
20178rm -f core conftest.err conftest.$ac_objext \
20179 conftest$ac_exeext conftest.$ac_ext
20180LIBS=$ac_check_lib_save_LIBS
3e0be4ab 20181fi
5476a9a4
GM
20182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
20183$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
20184if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
3e0be4ab 20185 cat >>confdefs.h <<_ACEOF
5476a9a4 20186#define HAVE_LIBKSTAT 1
3e0be4ab 20187_ACEOF
5f90be1b 20188
5476a9a4 20189 LIBS="-lkstat $LIBS"
5f90be1b 20190
f199cab1 20191fi
5f90be1b 20192
5476a9a4 20193 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
da6c8463 20194
5476a9a4
GM
20195 # AIX has libperfstat which does not require root
20196 if test $gl_func_getloadavg_done = no; then
20197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
20198$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
20199if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
f199cab1
GM
20200 $as_echo_n "(cached) " >&6
20201else
5476a9a4
GM
20202 ac_check_lib_save_LIBS=$LIBS
20203LIBS="-lperfstat $LIBS"
20204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 20205/* end confdefs.h. */
5476a9a4
GM
20206
20207/* Override any GCC internal prototype to avoid an error.
20208 Use char because int might match the return type of a GCC
20209 builtin and then its argument prototype would still apply. */
20210#ifdef __cplusplus
20211extern "C"
20212#endif
20213char perfstat_cpu_total ();
5f90be1b
PE
20214int
20215main ()
20216{
5476a9a4 20217return perfstat_cpu_total ();
5f90be1b
PE
20218 ;
20219 return 0;
20220}
20221_ACEOF
5476a9a4
GM
20222if ac_fn_c_try_link "$LINENO"; then :
20223 ac_cv_lib_perfstat_perfstat_cpu_total=yes
f199cab1 20224else
5476a9a4 20225 ac_cv_lib_perfstat_perfstat_cpu_total=no
f199cab1 20226fi
5476a9a4
GM
20227rm -f core conftest.err conftest.$ac_objext \
20228 conftest$ac_exeext conftest.$ac_ext
20229LIBS=$ac_check_lib_save_LIBS
f199cab1 20230fi
5476a9a4
GM
20231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
20232$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
20233if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
20234 cat >>confdefs.h <<_ACEOF
20235#define HAVE_LIBPERFSTAT 1
20236_ACEOF
20237
20238 LIBS="-lperfstat $LIBS"
20239
20240fi
20241
20242 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
20243 fi
20244
20245 if test $gl_func_getloadavg_done = no; then
20246 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
20247if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
20248 gl_func_getloadavg_done=yes
20249
20250$as_echo "#define DGUX 1" >>confdefs.h
20251
20252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
20253$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
20254if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
f199cab1
GM
20255 $as_echo_n "(cached) " >&6
20256else
20257 ac_check_lib_save_LIBS=$LIBS
5476a9a4 20258LIBS="-ldgc $LIBS"
f199cab1
GM
20259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20260/* end confdefs.h. */
3e0be4ab 20261
f199cab1
GM
20262/* Override any GCC internal prototype to avoid an error.
20263 Use char because int might match the return type of a GCC
20264 builtin and then its argument prototype would still apply. */
20265#ifdef __cplusplus
20266extern "C"
20267#endif
5476a9a4 20268char dg_sys_info ();
f199cab1
GM
20269int
20270main ()
20271{
5476a9a4 20272return dg_sys_info ();
f199cab1
GM
20273 ;
20274 return 0;
20275}
20276_ACEOF
20277if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 20278 ac_cv_lib_dgc_dg_sys_info=yes
f199cab1 20279else
5476a9a4 20280 ac_cv_lib_dgc_dg_sys_info=no
5f90be1b 20281fi
3e0be4ab
GM
20282rm -f core conftest.err conftest.$ac_objext \
20283 conftest$ac_exeext conftest.$ac_ext
f199cab1 20284LIBS=$ac_check_lib_save_LIBS
5f90be1b 20285fi
5476a9a4
GM
20286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
20287$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
20288if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
20289 cat >>confdefs.h <<_ACEOF
20290#define HAVE_LIBDGC 1
20291_ACEOF
20292
20293 LIBS="-ldgc $LIBS"
20294
da6c8463
GM
20295fi
20296
5476a9a4
GM
20297fi
20298
20299
20300 fi
20301 fi
20302fi
20303
20304
20305if test "x$gl_save_LIBS" = x; then
20306 GETLOADAVG_LIBS=$LIBS
f199cab1 20307else
5476a9a4
GM
20308 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
20309fi
20310LIBS=$gl_save_LIBS
20311
20312
20313# Test whether the system declares getloadavg. Solaris has the function
20314# but declares it in <sys/loadavg.h>, not <stdlib.h>.
20315for ac_header in sys/loadavg.h
20316do :
20317 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
20318if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
20319 cat >>confdefs.h <<_ACEOF
20320#define HAVE_SYS_LOADAVG_H 1
f199cab1 20321_ACEOF
5476a9a4 20322
f199cab1 20323fi
5476a9a4
GM
20324
20325done
20326
20327if test $ac_cv_header_sys_loadavg_h = yes; then
20328 HAVE_SYS_LOADAVG_H=1
20329else
20330 HAVE_SYS_LOADAVG_H=0
f199cab1 20331fi
5476a9a4
GM
20332ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
20333 # include <sys/loadavg.h>
20334 #endif
20335 #include <stdlib.h>
20336"
20337if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
5f90be1b 20338
f199cab1 20339else
5476a9a4 20340 HAVE_DECL_GETLOADAVG=0
f199cab1 20341fi
5f90be1b 20342
5f90be1b 20343
5476a9a4
GM
20344if test $HAVE_GETLOADAVG = 0; then
20345
20346
20347
20348
20349
20350
20351
20352
20353 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
20354
20355
20356# Figure out what our getloadavg.c needs.
20357
20358
20359
20360# On HPUX9, an unprivileged user can get load averages this way.
20361if test $gl_func_getloadavg_done = no; then
20362 for ac_func in pstat_getdynamic
20363do :
20364 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
20365if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
20366 cat >>confdefs.h <<_ACEOF
20367#define HAVE_PSTAT_GETDYNAMIC 1
20368_ACEOF
20369 gl_func_getloadavg_done=yes
3e0be4ab 20370fi
5476a9a4 20371done
6ad6792b 20372
5476a9a4 20373fi
6ad6792b 20374
5476a9a4
GM
20375# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
20376# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
20377# Irix 4.0.5F has the header but not the library.
20378if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
20379 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
20380 gl_func_getloadavg_done=yes
6ad6792b 20381
5476a9a4 20382$as_echo "#define SVR4 1" >>confdefs.h
6ad6792b 20383
5476a9a4
GM
20384fi
20385
20386if test $gl_func_getloadavg_done = no; then
20387 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
20388if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
20389 gl_func_getloadavg_done=yes
20390
20391$as_echo "#define UMAX 1" >>confdefs.h
20392
20393
20394$as_echo "#define UMAX4_3 1" >>confdefs.h
20395
20396fi
20397
20398
20399fi
20400
20401if test $gl_func_getloadavg_done = no; then
20402 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
20403if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
20404 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
20405
20406fi
20407
20408
20409fi
20410
20411if test $gl_func_getloadavg_done = no; then
20412 for ac_header in mach/mach.h
20413do :
20414 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
20415if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
20416 cat >>confdefs.h <<_ACEOF
20417#define HAVE_MACH_MACH_H 1
20418_ACEOF
20419
20420fi
20421
20422done
20423
20424fi
20425
20426for ac_header in nlist.h
20427do :
20428 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
20429if test "x$ac_cv_header_nlist_h" = x""yes; then :
20430 cat >>confdefs.h <<_ACEOF
20431#define HAVE_NLIST_H 1
20432_ACEOF
20433 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
20434"
20435if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
20436
20437cat >>confdefs.h <<_ACEOF
20438#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
20439_ACEOF
6ad6792b 20440
0eb775a3 20441
f199cab1 20442fi
3e0be4ab 20443
5476a9a4 20444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20445/* end confdefs.h. */
5476a9a4 20446#include <nlist.h>
f199cab1
GM
20447int
20448main ()
20449{
5476a9a4
GM
20450struct nlist x;
20451 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
20452 x.n_un.n_name = "";
20453 #else
20454 x.n_name = "";
20455 #endif
f199cab1
GM
20456 ;
20457 return 0;
20458}
20459_ACEOF
5476a9a4 20460if ac_fn_c_try_link "$LINENO"; then :
6ad6792b 20461
5476a9a4 20462$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
6ad6792b
GM
20463
20464fi
5476a9a4
GM
20465rm -f core conftest.err conftest.$ac_objext \
20466 conftest$ac_exeext conftest.$ac_ext
6ad6792b 20467
5476a9a4 20468fi
6ad6792b 20469
5476a9a4 20470done
6ad6792b 20471
f199cab1 20472fi
ca36e0ff 20473
ca36e0ff
GM
20474
20475
1f5d53eb
PE
20476
20477
5476a9a4 20478 GNULIB_GETLOADAVG=1
1f5d53eb
PE
20479
20480
20481
20482
20483
20484
20485
1f5d53eb 20486
1f5d53eb 20487
3e0be4ab 20488
5476a9a4 20489if test $REPLACE_GETOPT = 1; then
3e0be4ab 20490
1f5d53eb
PE
20491
20492
1f5d53eb 20493
1f5d53eb
PE
20494
20495
20496
20497
5476a9a4 20498 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
0eb775a3
GM
20499
20500
1f5d53eb
PE
20501
20502
16c3e636 20503
5476a9a4
GM
20504
20505
20506
20507
20508 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20509
20510
20511
20512
20513 GNULIB_GL_UNISTD_H_GETOPT=1
f199cab1 20514fi
16c3e636
PE
20515
20516
20517
4fda9c95
GM
20518
20519
20520
20521
5476a9a4
GM
20522 REPLACE_GETOPT=0
20523 if test -n "$gl_replace_getopt"; then
20524 REPLACE_GETOPT=1
20525 fi
20526
20527 if test $REPLACE_GETOPT = 1; then
20528
20529 GETOPT_H=getopt.h
20530
20531$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
20532
20533
20534
20535 fi
20536
20537if test $REPLACE_GETOPT = 1; then
20538
20539
20540
20541
20542
20543
20544
20545
20546 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
4fda9c95
GM
20557
20558
20559
20560
5476a9a4
GM
20561 GNULIB_GL_UNISTD_H_GETOPT=1
20562fi
4fda9c95
GM
20563
20564
20565
20566
4fda9c95 20567
4fda9c95 20568
4fda9c95 20569
5476a9a4
GM
20570
20571
20572
20573
20574
20575 gl_gettimeofday_timezone=void
20576 if test $ac_cv_func_gettimeofday != yes; then
20577 HAVE_GETTIMEOFDAY=0
f199cab1 20578 else
4fda9c95
GM
20579
20580
3e0be4ab 20581
5476a9a4
GM
20582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20583$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20584if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
20585 $as_echo_n "(cached) " >&6
20586else
20587 if test "$cross_compiling" = yes; then :
20588 # When cross-compiling:
20589 case "$host_os" in
20590 # Guess all is fine on glibc systems.
20591 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20592 # If we don't know, assume the worst.
20593 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20594 esac
4fda9c95 20595
5476a9a4
GM
20596else
20597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20598/* end confdefs.h. */
20599#include <string.h>
20600 #include <sys/time.h>
20601 #include <time.h>
20602 #include <stdlib.h>
4fda9c95 20603
5476a9a4
GM
20604int
20605main ()
20606{
4fda9c95 20607
5476a9a4
GM
20608 time_t t = 0;
20609 struct tm *lt;
20610 struct tm saved_lt;
20611 struct timeval tv;
20612 lt = localtime (&t);
20613 saved_lt = *lt;
20614 gettimeofday (&tv, NULL);
20615 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
cc322c06 20616
5476a9a4
GM
20617 ;
20618 return 0;
20619}
20620_ACEOF
20621if ac_fn_c_try_run "$LINENO"; then :
20622 gl_cv_func_gettimeofday_clobber=no
20623else
20624 gl_cv_func_gettimeofday_clobber=yes
20625fi
20626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20627 conftest.$ac_objext conftest.beam conftest.$ac_ext
20628fi
cc322c06 20629
5476a9a4
GM
20630fi
20631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20632$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
cc322c06 20633
5476a9a4
GM
20634 case "$gl_cv_func_gettimeofday_clobber" in
20635 *yes)
20636 REPLACE_GETTIMEOFDAY=1
cc322c06 20637
4fda9c95 20638
5476a9a4 20639$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
4fda9c95 20640
ae0d7250 20641
5476a9a4 20642$as_echo "#define localtime rpl_localtime" >>confdefs.h
ae0d7250
PE
20643
20644
ae0d7250 20645
5476a9a4
GM
20646$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20647
20648 ;;
20649 esac
20650
20651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20652$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20653if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
f199cab1
GM
20654 $as_echo_n "(cached) " >&6
20655else
5476a9a4
GM
20656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20657/* end confdefs.h. */
20658#include <sys/time.h>
20659 struct timeval c;
20660 int gettimeofday (struct timeval *restrict, void *restrict);
20661
20662int
20663main ()
20664{
20665/* glibc uses struct timezone * rather than the POSIX void *
20666 if _GNU_SOURCE is defined. However, since the only portable
20667 use of gettimeofday uses NULL as the second parameter, and
20668 since the glibc definition is actually more typesafe, it is
20669 not worth wrapping this to get a compliant signature. */
20670 int (*f) (struct timeval *restrict, void *restrict)
20671 = gettimeofday;
20672 int x = f (&c, 0);
20673 return !(x | c.tv_sec | c.tv_usec);
20674
20675 ;
20676 return 0;
20677}
20678_ACEOF
20679if ac_fn_c_try_compile "$LINENO"; then :
20680 gl_cv_func_gettimeofday_posix_signature=yes
20681else
20682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20683/* end confdefs.h. */
5476a9a4
GM
20684#include <sys/time.h>
20685int gettimeofday (struct timeval *restrict, struct timezone *restrict);
ae0d7250 20686
f199cab1
GM
20687int
20688main ()
20689{
5476a9a4 20690
f199cab1
GM
20691 ;
20692 return 0;
ae0d7250
PE
20693}
20694_ACEOF
5476a9a4
GM
20695if ac_fn_c_try_compile "$LINENO"; then :
20696 gl_cv_func_gettimeofday_posix_signature=almost
ae0d7250 20697else
5476a9a4 20698 gl_cv_func_gettimeofday_posix_signature=no
ae0d7250 20699fi
5476a9a4 20700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 20701fi
5476a9a4 20702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 20703fi
5476a9a4
GM
20704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20705$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20706 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20707 gl_gettimeofday_timezone='struct timezone'
20708 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20709 REPLACE_GETTIMEOFDAY=1
20710 fi
20711 if test $REPLACE_STRUCT_TIMEVAL = 1; then
20712 REPLACE_GETTIMEOFDAY=1
20713 fi
3e0be4ab 20714
5476a9a4 20715 fi
ae0d7250 20716
5476a9a4
GM
20717cat >>confdefs.h <<_ACEOF
20718#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20719_ACEOF
f199cab1 20720
ae0d7250 20721
5476a9a4 20722if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
ae0d7250 20723
cc322c06
GM
20724
20725
cc322c06
GM
20726
20727
ae0d7250
PE
20728
20729
20730
5476a9a4 20731 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
5fa4ac76
PE
20732
20733
5476a9a4
GM
20734 for ac_header in sys/timeb.h
20735do :
20736 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20737if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
20738 cat >>confdefs.h <<_ACEOF
20739#define HAVE_SYS_TIMEB_H 1
20740_ACEOF
5fa4ac76 20741
3e0be4ab 20742fi
5fa4ac76 20743
5476a9a4 20744done
f199cab1 20745
5476a9a4
GM
20746 for ac_func in _ftime
20747do :
20748 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20749if test "x$ac_cv_func__ftime" = x""yes; then :
20750 cat >>confdefs.h <<_ACEOF
20751#define HAVE__FTIME 1
20752_ACEOF
5fa4ac76 20753
5476a9a4
GM
20754fi
20755done
5fa4ac76
PE
20756
20757
5476a9a4 20758fi
5fa4ac76
PE
20759
20760
20761
20762
20763
5476a9a4 20764 GNULIB_GETTIMEOFDAY=1
5fa4ac76
PE
20765
20766
20767
20768
0eb775a3
GM
20769
20770
369e19fc
PE
20771
20772
369e19fc
PE
20773
20774
20775
5476a9a4
GM
20776 if test $ac_cv_func_lstat = yes; then
20777
20778 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
20779 *no)
20780 REPLACE_LSTAT=1
20781 ;;
20782 esac
20783 else
20784 HAVE_LSTAT=0
f199cab1 20785 fi
369e19fc 20786
5476a9a4 20787if test $REPLACE_LSTAT = 1; then
369e19fc 20788
5fa4ac76 20789
369e19fc 20790
369e19fc 20791
369e19fc 20792
369e19fc 20793
369e19fc 20794
369e19fc 20795
5476a9a4 20796 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
f199cab1 20797
f199cab1 20798
5fa4ac76 20799
5476a9a4 20800 :
369e19fc 20801
f199cab1 20802fi
369e19fc 20803
369e19fc 20804
369e19fc 20805
5fa4ac76
PE
20806
20807
5476a9a4 20808 GNULIB_LSTAT=1
5fa4ac76 20809
5fa4ac76 20810
27505cf5 20811
27505cf5 20812
27505cf5 20813
27505cf5 20814
27505cf5 20815
27505cf5 20816
5fa4ac76
PE
20817
20818
5476a9a4
GM
20819
20820 if test $APPLE_UNIVERSAL_BUILD = 1; then
20821 # A universal build on Apple Mac OS X platforms.
20822 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
20823 # But we need a configuration result that is valid in both modes.
20824 gl_cv_func_working_mktime=no
20825 fi
20826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
20827$as_echo_n "checking for working mktime... " >&6; }
20828if test "${gl_cv_func_working_mktime+set}" = set; then :
f199cab1
GM
20829 $as_echo_n "(cached) " >&6
20830else
5476a9a4
GM
20831 if test "$cross_compiling" = yes; then :
20832 gl_cv_func_working_mktime=no
20833else
20834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 20835/* end confdefs.h. */
5476a9a4
GM
20836/* Test program from Paul Eggert and Tony Leneis. */
20837#include <limits.h>
20838#include <stdlib.h>
20839#include <time.h>
5fa4ac76 20840
5476a9a4
GM
20841#ifdef HAVE_UNISTD_H
20842# include <unistd.h>
f199cab1 20843#endif
5476a9a4
GM
20844
20845#ifndef HAVE_ALARM
20846# define alarm(X) /* empty */
20847#endif
20848
20849/* Work around redefinition to rpl_putenv by other config tests. */
20850#undef putenv
20851
20852static time_t time_t_max;
20853static time_t time_t_min;
20854
20855/* Values we'll use to set the TZ environment variable. */
20856static char *tz_strings[] = {
20857 (char *) 0, "TZ=GMT0", "TZ=JST-9",
20858 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
20859};
20860#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
20861
20862/* Return 0 if mktime fails to convert a date in the spring-forward gap.
20863 Based on a problem report from Andreas Jaeger. */
20864static int
20865spring_forward_gap ()
f199cab1 20866{
5476a9a4
GM
20867 /* glibc (up to about 1998-10-07) failed this test. */
20868 struct tm tm;
20869
20870 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
20871 instead of "TZ=America/Vancouver" in order to detect the bug even
20872 on systems that don't support the Olson extension, or don't have the
20873 full zoneinfo tables installed. */
20874 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
20875
20876 tm.tm_year = 98;
20877 tm.tm_mon = 3;
20878 tm.tm_mday = 5;
20879 tm.tm_hour = 2;
20880 tm.tm_min = 0;
20881 tm.tm_sec = 0;
20882 tm.tm_isdst = -1;
20883 return mktime (&tm) != (time_t) -1;
f199cab1 20884}
5fa4ac76 20885
5476a9a4
GM
20886static int
20887mktime_test1 (time_t now)
20888{
20889 struct tm *lt;
20890 return ! (lt = localtime (&now)) || mktime (lt) == now;
20891}
5fa4ac76 20892
5476a9a4
GM
20893static int
20894mktime_test (time_t now)
20895{
20896 return (mktime_test1 (now)
20897 && mktime_test1 ((time_t) (time_t_max - now))
20898 && mktime_test1 ((time_t) (time_t_min + now)));
20899}
067d23c9 20900
5476a9a4
GM
20901static int
20902irix_6_4_bug ()
20903{
20904 /* Based on code from Ariel Faigon. */
20905 struct tm tm;
20906 tm.tm_year = 96;
20907 tm.tm_mon = 3;
20908 tm.tm_mday = 0;
20909 tm.tm_hour = 0;
20910 tm.tm_min = 0;
20911 tm.tm_sec = 0;
20912 tm.tm_isdst = -1;
20913 mktime (&tm);
20914 return tm.tm_mon == 2 && tm.tm_mday == 31;
20915}
20916
20917static int
20918bigtime_test (int j)
20919{
20920 struct tm tm;
20921 time_t now;
20922 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
20923 now = mktime (&tm);
20924 if (now != (time_t) -1)
20925 {
20926 struct tm *lt = localtime (&now);
20927 if (! (lt
20928 && lt->tm_year == tm.tm_year
20929 && lt->tm_mon == tm.tm_mon
20930 && lt->tm_mday == tm.tm_mday
20931 && lt->tm_hour == tm.tm_hour
20932 && lt->tm_min == tm.tm_min
20933 && lt->tm_sec == tm.tm_sec
20934 && lt->tm_yday == tm.tm_yday
20935 && lt->tm_wday == tm.tm_wday
20936 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
20937 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
20938 return 0;
20939 }
20940 return 1;
20941}
369e19fc 20942
5476a9a4
GM
20943static int
20944year_2050_test ()
20945{
20946 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
20947 ignoring leap seconds. */
20948 unsigned long int answer = 2527315200UL;
369e19fc 20949
5476a9a4
GM
20950 struct tm tm;
20951 time_t t;
20952 tm.tm_year = 2050 - 1900;
20953 tm.tm_mon = 2 - 1;
20954 tm.tm_mday = 1;
20955 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
20956 tm.tm_isdst = -1;
369e19fc 20957
5476a9a4
GM
20958 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
20959 instead of "TZ=America/Vancouver" in order to detect the bug even
20960 on systems that don't support the Olson extension, or don't have the
20961 full zoneinfo tables installed. */
20962 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
067d23c9 20963
5476a9a4 20964 t = mktime (&tm);
067d23c9 20965
5476a9a4
GM
20966 /* Check that the result is either a failure, or close enough
20967 to the correct answer that we can assume the discrepancy is
20968 due to leap seconds. */
20969 return (t == (time_t) -1
20970 || (0 < t && answer - 120 <= t && t <= answer + 120));
20971}
067d23c9 20972
f199cab1
GM
20973int
20974main ()
20975{
5476a9a4
GM
20976 int result = 0;
20977 time_t t, delta;
20978 int i, j;
20979 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
20980 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
067d23c9 20981
5476a9a4
GM
20982 /* This test makes some buggy mktime implementations loop.
20983 Give up after 60 seconds; a mktime slower than that
20984 isn't worth using anyway. */
20985 alarm (60);
067d23c9 20986
5476a9a4
GM
20987 time_t_max = (! time_t_signed
20988 ? (time_t) -1
20989 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
20990 * 2 + 1));
20991 time_t_min = (! time_t_signed
20992 ? (time_t) 0
20993 : time_t_signed_magnitude
20994 ? ~ (time_t) 0
20995 : ~ time_t_max);
3e0be4ab 20996
5476a9a4
GM
20997 delta = time_t_max / 997; /* a suitable prime number */
20998 for (i = 0; i < N_STRINGS; i++)
20999 {
21000 if (tz_strings[i])
21001 putenv (tz_strings[i]);
3e0be4ab 21002
5476a9a4
GM
21003 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
21004 if (! mktime_test (t))
21005 result |= 1;
21006 if ((result & 2) == 0
21007 && ! (mktime_test ((time_t) 1)
21008 && mktime_test ((time_t) (60 * 60))
21009 && mktime_test ((time_t) (60 * 60 * 24))))
21010 result |= 2;
f199cab1 21011
5476a9a4
GM
21012 for (j = 1; (result & 4) == 0; j <<= 1)
21013 {
21014 if (! bigtime_test (j))
21015 result |= 4;
21016 if (INT_MAX / 2 < j)
21017 break;
21018 }
21019 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
21020 result |= 8;
21021 }
21022 if (! irix_6_4_bug ())
21023 result |= 16;
21024 if (! spring_forward_gap ())
21025 result |= 32;
21026 if (! year_2050_test ())
21027 result |= 64;
21028 return result;
067d23c9
KY
21029}
21030_ACEOF
5476a9a4
GM
21031if ac_fn_c_try_run "$LINENO"; then :
21032 gl_cv_func_working_mktime=yes
067d23c9 21033else
5476a9a4 21034 gl_cv_func_working_mktime=no
3e0be4ab 21035fi
5476a9a4
GM
21036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21037 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1
GM
21038fi
21039
f199cab1 21040
5476a9a4
GM
21041fi
21042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
21043$as_echo "$gl_cv_func_working_mktime" >&6; }
f199cab1 21044
5476a9a4
GM
21045 if test $gl_cv_func_working_mktime = no; then
21046 REPLACE_MKTIME=1
21047 else
21048 REPLACE_MKTIME=0
f199cab1 21049 fi
f199cab1 21050
5476a9a4 21051if test $REPLACE_MKTIME = 1; then
f199cab1 21052
f199cab1 21053
0eb775a3 21054
067d23c9 21055
a451f14b 21056
a451f14b 21057
743c80a7
PE
21058
21059
5476a9a4
GM
21060 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
21061
21062
cc322c06
GM
21063
21064
f199cab1 21065fi
a451f14b
PE
21066
21067
21068
e275c824
PE
21069
21070
5476a9a4 21071 GNULIB_MKTIME=1
e275c824
PE
21072
21073
21074
21075
21076
21077
21078
21079
d87ffdb7 21080
5476a9a4
GM
21081
21082
21083 if test $ac_cv_func_pselect = yes; then
21084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether signature of pselect conforms to POSIX" >&5
21085$as_echo_n "checking whether signature of pselect conforms to POSIX... " >&6; }
21086if test "${gl_cv_sig_pselect+set}" = set; then :
e275c824
PE
21087 $as_echo_n "(cached) " >&6
21088else
5476a9a4 21089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 21090/* end confdefs.h. */
5476a9a4 21091#include <sys/select.h>
e275c824 21092
f199cab1
GM
21093int
21094main ()
21095{
5476a9a4
GM
21096int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
21097 struct timespec const *restrict,
21098 sigset_t const *restrict) = pselect;
21099 return !p;
f199cab1
GM
21100 ;
21101 return 0;
21102}
e275c824 21103_ACEOF
f199cab1 21104if ac_fn_c_try_link "$LINENO"; then :
5476a9a4 21105 gl_cv_sig_pselect=yes
3e0be4ab 21106else
5476a9a4 21107 gl_cv_sig_pselect=no
f199cab1
GM
21108fi
21109rm -f core conftest.err conftest.$ac_objext \
21110 conftest$ac_exeext conftest.$ac_ext
3e0be4ab 21111fi
5476a9a4
GM
21112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sig_pselect" >&5
21113$as_echo "$gl_cv_sig_pselect" >&6; }
21114 fi
3e0be4ab 21115
5476a9a4
GM
21116 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
21117 REPLACE_PSELECT=1
21118 fi
3e0be4ab 21119
5476a9a4 21120if test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1; then
3e0be4ab
GM
21121
21122
3e0be4ab 21123
3e0be4ab 21124
3e0be4ab 21125
3e0be4ab 21126
3e0be4ab 21127
3e0be4ab 21128
5476a9a4 21129 gl_LIBOBJS="$gl_LIBOBJS pselect.$ac_objext"
3e0be4ab 21130
5476a9a4 21131fi
3e0be4ab
GM
21132
21133
f199cab1 21134
f199cab1 21135
f199cab1 21136
5476a9a4 21137 GNULIB_PSELECT=1
f199cab1 21138
6d153f56 21139
f199cab1 21140
3e0be4ab 21141
3e0be4ab
GM
21142
21143
f199cab1 21144
0eb775a3
GM
21145
21146
5476a9a4 21147 LIB_PTHREAD_SIGMASK=
0eb775a3 21148
f199cab1 21149
5476a9a4
GM
21150 if test $ac_cv_func_pthread_sigmask = yes; then
21151 :
21152 else
21153 HAVE_PTHREAD_SIGMASK=0
21154 REPLACE_PTHREAD_SIGMASK=1
21155 fi
6d153f56 21156
52724a05 21157
6d153f56
GM
21158
21159
5476a9a4
GM
21160 if test $HAVE_PTHREAD_SIGMASK = 1; then
21161
21162
21163 if test -z "$LIB_PTHREAD_SIGMASK"; then
21164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask works without -lpthread" >&5
21165$as_echo_n "checking whether pthread_sigmask works without -lpthread... " >&6; }
21166if test "${gl_cv_func_pthread_sigmask_in_libc_works+set}" = set; then :
f199cab1
GM
21167 $as_echo_n "(cached) " >&6
21168else
5476a9a4
GM
21169
21170 if test "$cross_compiling" = yes; then :
21171
21172 case "$host_os" in
21173 freebsd* | hpux* | solaris | solaris2.[2-9]*)
21174 gl_cv_func_pthread_sigmask_in_libc_works="guessing no";;
21175 *)
21176 gl_cv_func_pthread_sigmask_in_libc_works="guessing yes";;
21177 esac
21178
21179else
21180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21181/* end confdefs.h. */
6d153f56 21182
5476a9a4
GM
21183#include <pthread.h>
21184#include <signal.h>
21185#include <stddef.h>
21186int main ()
f199cab1 21187{
5476a9a4
GM
21188 sigset_t set;
21189 sigemptyset (&set);
21190 return pthread_sigmask (1729, &set, NULL) != 0;
f199cab1
GM
21191}
21192_ACEOF
5476a9a4
GM
21193if ac_fn_c_try_run "$LINENO"; then :
21194 gl_cv_func_pthread_sigmask_in_libc_works=no
f199cab1 21195else
5476a9a4 21196 gl_cv_func_pthread_sigmask_in_libc_works=yes
f199cab1 21197fi
5476a9a4
GM
21198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21199 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21200fi
5476a9a4
GM
21201
21202
f199cab1 21203fi
5476a9a4
GM
21204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_in_libc_works" >&5
21205$as_echo "$gl_cv_func_pthread_sigmask_in_libc_works" >&6; }
21206 case "$gl_cv_func_pthread_sigmask_in_libc_works" in
21207 *no)
21208 REPLACE_PTHREAD_SIGMASK=1
cc322c06 21209
5476a9a4 21210$as_echo "#define PTHREAD_SIGMASK_INEFFECTIVE 1" >>confdefs.h
cc322c06 21211
5476a9a4
GM
21212 ;;
21213 esac
21214 fi
3e0be4ab 21215
5476a9a4
GM
21216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask returns error numbers" >&5
21217$as_echo_n "checking whether pthread_sigmask returns error numbers... " >&6; }
21218if test "${gl_cv_func_pthread_sigmask_return_works+set}" = set; then :
3e0be4ab
GM
21219 $as_echo_n "(cached) " >&6
21220else
5476a9a4
GM
21221
21222 gl_save_LIBS="$LIBS"
21223 LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
21224 if test "$cross_compiling" = yes; then :
21225 case "$host_os" in
21226 cygwin*)
21227 gl_cv_func_pthread_sigmask_return_works="guessing no";;
21228 *)
21229 gl_cv_func_pthread_sigmask_return_works="guessing yes";;
21230 esac
21231
21232else
21233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21234/* end confdefs.h. */
f199cab1 21235
5476a9a4
GM
21236#include <pthread.h>
21237#include <signal.h>
21238#include <stddef.h>
21239int main ()
3e0be4ab 21240{
5476a9a4
GM
21241 sigset_t set;
21242 sigemptyset (&set);
21243 if (pthread_sigmask (1729, &set, NULL) == -1)
21244 return 1;
3e0be4ab
GM
21245 return 0;
21246}
6d153f56 21247_ACEOF
5476a9a4
GM
21248if ac_fn_c_try_run "$LINENO"; then :
21249 gl_cv_func_pthread_sigmask_return_works=yes
3e0be4ab 21250else
5476a9a4 21251 gl_cv_func_pthread_sigmask_return_works=no
6d153f56 21252fi
5476a9a4
GM
21253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21254 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21255fi
5476a9a4
GM
21256
21257 LIBS="$gl_save_LIBS"
21258
52724a05 21259fi
5476a9a4
GM
21260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_return_works" >&5
21261$as_echo "$gl_cv_func_pthread_sigmask_return_works" >&6; }
21262 case "$gl_cv_func_pthread_sigmask_return_works" in
21263 *no)
21264 REPLACE_PTHREAD_SIGMASK=1
6d153f56 21265
5476a9a4 21266$as_echo "#define PTHREAD_SIGMASK_FAILS_WITH_ERRNO 1" >>confdefs.h
6d153f56 21267
5476a9a4
GM
21268 ;;
21269 esac
cc322c06 21270
5476a9a4
GM
21271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_sigmask unblocks signals correctly" >&5
21272$as_echo_n "checking whether pthread_sigmask unblocks signals correctly... " >&6; }
21273if test "${gl_cv_func_pthread_sigmask_unblock_works+set}" = set; then :
f199cab1
GM
21274 $as_echo_n "(cached) " >&6
21275else
5476a9a4
GM
21276
21277 case "$host_os" in
21278 irix*)
21279 gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
21280 *)
21281 gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
21282 esac
21283 gl_save_LIBS="$LIBS"
21284 LIBS="$LIBS $LIBMULTITHREAD"
21285 if test "$cross_compiling" = yes; then :
21286 :
f199cab1 21287else
5476a9a4
GM
21288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21289/* end confdefs.h. */
6d153f56 21290
5476a9a4
GM
21291#include <pthread.h>
21292#include <signal.h>
21293#include <stdio.h>
21294#include <stdlib.h>
21295#include <unistd.h>
21296static volatile int sigint_occurred;
21297static void
21298sigint_handler (int sig)
21299{
21300 sigint_occurred++;
21301}
21302int main ()
21303{
21304 sigset_t set;
21305 int pid = getpid ();
21306 char command[80];
21307 signal (SIGINT, sigint_handler);
21308 sigemptyset (&set);
21309 sigaddset (&set, SIGINT);
21310 if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
21311 return 1;
21312 sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
21313 if (!(system (command) == 0))
21314 return 2;
21315 sleep (2);
21316 if (!(sigint_occurred == 0))
21317 return 3;
21318 if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
21319 return 4;
21320 if (!(sigint_occurred == 1)) /* This fails on IRIX. */
21321 return 5;
21322 return 0;
21323}
21324_ACEOF
21325if ac_fn_c_try_run "$LINENO"; then :
21326 :
21327else
21328 gl_cv_func_pthread_sigmask_unblock_works=no
f199cab1 21329fi
5476a9a4
GM
21330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21331 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21332fi
5476a9a4
GM
21333
21334 LIBS="$gl_save_LIBS"
21335
f199cab1 21336fi
5476a9a4
GM
21337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_pthread_sigmask_unblock_works" >&5
21338$as_echo "$gl_cv_func_pthread_sigmask_unblock_works" >&6; }
21339 case "$gl_cv_func_pthread_sigmask_unblock_works" in
21340 *no)
21341 REPLACE_PTHREAD_SIGMASK=1
6d153f56 21342
5476a9a4 21343$as_echo "#define PTHREAD_SIGMASK_UNBLOCK_BUG 1" >>confdefs.h
6d153f56 21344
5476a9a4
GM
21345 ;;
21346 esac
6d153f56 21347 fi
6d153f56 21348
5476a9a4 21349if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
a451f14b 21350
a451f14b 21351
743c80a7
PE
21352
21353
21354
21355
21356
f199cab1 21357
5476a9a4 21358 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
743c80a7
PE
21359
21360
5476a9a4 21361 if test $HAVE_PTHREAD_SIGMASK = 1; then
743c80a7 21362
5476a9a4 21363$as_echo "#define HAVE_PTHREAD_SIGMASK 1" >>confdefs.h
743c80a7 21364
5476a9a4 21365 fi
743c80a7 21366
f199cab1 21367fi
938a4ef9 21368
938a4ef9 21369
938a4ef9 21370
938a4ef9 21371
938a4ef9 21372
5476a9a4 21373 GNULIB_PTHREAD_SIGMASK=1
a451f14b 21374
a451f14b 21375
743c80a7
PE
21376
21377
21378
21379
21380
21381
5476a9a4
GM
21382 if test $ac_cv_func_readlink = no; then
21383 HAVE_READLINK=0
21384 else
21385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
21386$as_echo_n "checking whether readlink signature is correct... " >&6; }
21387if test "${gl_cv_decl_readlink_works+set}" = set; then :
3e0be4ab
GM
21388 $as_echo_n "(cached) " >&6
21389else
f199cab1 21390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3e0be4ab 21391/* end confdefs.h. */
5476a9a4
GM
21392#include <unistd.h>
21393 /* Cause compilation failure if original declaration has wrong type. */
21394 ssize_t readlink (const char *, char *, size_t);
f199cab1
GM
21395int
21396main ()
21397{
5476a9a4 21398
f199cab1
GM
21399 ;
21400 return 0;
21401}
3e0be4ab 21402_ACEOF
5476a9a4
GM
21403if ac_fn_c_try_compile "$LINENO"; then :
21404 gl_cv_decl_readlink_works=yes
21405else
21406 gl_cv_decl_readlink_works=no
3e0be4ab 21407fi
5476a9a4
GM
21408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21409fi
21410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
21411$as_echo "$gl_cv_decl_readlink_works" >&6; }
21412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
21413$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
21414if test "${gl_cv_func_readlink_works+set}" = set; then :
21415 $as_echo_n "(cached) " >&6
21416else
21417 # We have readlink, so assume ln -s works.
21418 ln -s conftest.no-such conftest.link
21419 ln -s conftest.link conftest.lnk2
21420 if test "$cross_compiling" = yes; then :
21421 case "$host_os" in
21422 # Guess yes on glibc systems.
21423 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
21424 # If we don't know, assume the worst.
21425 *) gl_cv_func_readlink_works="guessing no" ;;
21426 esac
21427
21428else
f199cab1 21429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 21430/* end confdefs.h. */
5476a9a4
GM
21431#include <unistd.h>
21432
f199cab1
GM
21433int
21434main ()
21435{
5476a9a4
GM
21436char buf[20];
21437 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
f199cab1
GM
21438 ;
21439 return 0;
21440}
067d23c9 21441_ACEOF
5476a9a4
GM
21442if ac_fn_c_try_run "$LINENO"; then :
21443 gl_cv_func_readlink_works=yes
21444else
21445 gl_cv_func_readlink_works=no
067d23c9 21446fi
5476a9a4
GM
21447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21448 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 21449fi
067d23c9 21450
5476a9a4 21451 rm -f conftest.link conftest.lnk2
f199cab1 21452fi
5476a9a4
GM
21453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
21454$as_echo "$gl_cv_func_readlink_works" >&6; }
21455 case "$gl_cv_func_readlink_works" in
21456 *yes)
21457 if test "$gl_cv_decl_readlink_works" != yes; then
21458 REPLACE_READLINK=1
21459 fi
21460 ;;
21461 *)
067d23c9 21462
5476a9a4 21463$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
067d23c9 21464
5476a9a4
GM
21465 REPLACE_READLINK=1
21466 ;;
21467 esac
21468 fi
3e0be4ab 21469
5476a9a4 21470if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
3e0be4ab
GM
21471
21472
21473
21474
3e0be4ab
GM
21475
21476
5476a9a4
GM
21477
21478
21479 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
21480
21481
21482 :
3e0be4ab 21483
f199cab1 21484fi
3e0be4ab 21485
067d23c9 21486
067d23c9 21487
067d23c9 21488
067d23c9 21489
5476a9a4 21490 GNULIB_READLINK=1
067d23c9 21491
067d23c9 21492
067d23c9 21493
067d23c9
KY
21494
21495
067d23c9 21496
369e19fc 21497
067d23c9 21498
5476a9a4
GM
21499
21500
21501
21502
21503
21504
21505
21506
21507 if test $gl_cv_have_include_next = yes; then
21508 gl_cv_next_signal_h='<'signal.h'>'
21509 else
21510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
21511$as_echo_n "checking absolute name of <signal.h>... " >&6; }
21512if test "${gl_cv_next_signal_h+set}" = set; then :
0eb775a3 21513 $as_echo_n "(cached) " >&6
0eb775a3 21514else
5476a9a4
GM
21515
21516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0eb775a3 21517/* end confdefs.h. */
5476a9a4 21518#include <signal.h>
f199cab1 21519
0eb775a3 21520_ACEOF
5476a9a4
GM
21521 case "$host_os" in
21522 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21523 *) gl_absname_cpp="$ac_cpp" ;;
21524 esac
0eb775a3 21525
5476a9a4
GM
21526 case "$host_os" in
21527 mingw*)
21528 gl_dirsep_regex='[/\\]'
21529 ;;
21530 *)
21531 gl_dirsep_regex='\/'
21532 ;;
21533 esac
21534 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
0eb775a3 21535
5476a9a4
GM
21536 gl_header_literal_regex=`echo 'signal.h' \
21537 | sed -e "$gl_make_literal_regex_sed"`
21538 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21539 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21540 s|^/[^/]|//&|
21541 p
21542 q
21543 }'
21544 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21545 sed -n "$gl_absolute_header_sed"`'"'
0eb775a3 21546
f199cab1 21547
5476a9a4
GM
21548fi
21549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
21550$as_echo "$gl_cv_next_signal_h" >&6; }
21551 fi
21552 NEXT_SIGNAL_H=$gl_cv_next_signal_h
067d23c9 21553
5476a9a4
GM
21554 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21555 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21556 gl_next_as_first_directive='<'signal.h'>'
21557 else
21558 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21559 gl_next_as_first_directive=$gl_cv_next_signal_h
21560 fi
21561 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
067d23c9 21562
067d23c9
KY
21563
21564
067d23c9 21565
067d23c9 21566
5476a9a4
GM
21567# AIX declares sig_atomic_t to already include volatile, and C89 compilers
21568# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
21569 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
21570#include <signal.h>
21571
21572"
21573if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
21574
21575else
21576 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
f199cab1 21577fi
067d23c9 21578
067d23c9 21579
067d23c9 21580
067d23c9 21581
938a4ef9 21582
938a4ef9 21583
5476a9a4
GM
21584
21585 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
21586#include <signal.h>
21587
21588"
21589if test "x$ac_cv_type_sighandler_t" = x""yes; then :
21590
21591else
21592 HAVE_SIGHANDLER_T=0
21593fi
21594
21595
21596
21597
21598 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
21599/* <sys/types.h> is not needed according to POSIX, but the
21600 <sys/socket.h> in i386-unknown-freebsd4.10 and
21601 powerpc-apple-darwin5.5 required it. */
21602#include <sys/types.h>
21603#if HAVE_SYS_SOCKET_H
21604# include <sys/socket.h>
21605#elif HAVE_WS2TCPIP_H
21606# include <ws2tcpip.h>
21607#endif
21608
21609"
21610if test "x$ac_cv_type_socklen_t" = x""yes; then :
21611
067d23c9 21612else
5476a9a4
GM
21613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
21614$as_echo_n "checking for socklen_t equivalent... " >&6; }
21615 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
21616 $as_echo_n "(cached) " >&6
21617else
21618 # Systems have either "struct sockaddr *" or
21619 # "void *" as the second argument to getpeername
21620 gl_cv_socklen_t_equiv=
21621 for arg2 in "struct sockaddr" void; do
21622 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
21623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21624/* end confdefs.h. */
5476a9a4
GM
21625#include <sys/types.h>
21626 #include <sys/socket.h>
21627
21628 int getpeername (int, $arg2 *, $t *);
f199cab1
GM
21629int
21630main ()
21631{
5476a9a4
GM
21632$t len;
21633 getpeername (0, 0, &len);
f199cab1
GM
21634 ;
21635 return 0;
21636}
3e0be4ab 21637_ACEOF
5476a9a4
GM
21638if ac_fn_c_try_compile "$LINENO"; then :
21639 gl_cv_socklen_t_equiv="$t"
067d23c9 21640fi
5476a9a4
GM
21641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21642 test "$gl_cv_socklen_t_equiv" != "" && break
21643 done
21644 test "$gl_cv_socklen_t_equiv" != "" && break
21645 done
067d23c9 21646
5476a9a4 21647fi
067d23c9 21648
5476a9a4
GM
21649 if test "$gl_cv_socklen_t_equiv" = ""; then
21650 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
21651 fi
21652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
21653$as_echo "$gl_cv_socklen_t_equiv" >&6; }
21654
21655cat >>confdefs.h <<_ACEOF
21656#define socklen_t $gl_cv_socklen_t_equiv
21657_ACEOF
067d23c9 21658
f199cab1 21659fi
3e0be4ab 21660
3e0be4ab 21661
5476a9a4
GM
21662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
21663$as_echo_n "checking for ssize_t... " >&6; }
21664if test "${gt_cv_ssize_t+set}" = set; then :
f199cab1
GM
21665 $as_echo_n "(cached) " >&6
21666else
5476a9a4 21667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21668/* end confdefs.h. */
5476a9a4 21669#include <sys/types.h>
f199cab1
GM
21670int
21671main ()
21672{
5476a9a4
GM
21673int x = sizeof (ssize_t *) + sizeof (ssize_t);
21674 return !x;
f199cab1
GM
21675 ;
21676 return 0;
21677}
21678_ACEOF
5476a9a4
GM
21679if ac_fn_c_try_compile "$LINENO"; then :
21680 gt_cv_ssize_t=yes
067d23c9 21681else
5476a9a4 21682 gt_cv_ssize_t=no
f199cab1 21683fi
5476a9a4 21684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 21685fi
5476a9a4
GM
21686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
21687$as_echo "$gt_cv_ssize_t" >&6; }
21688 if test $gt_cv_ssize_t = no; then
21689
21690$as_echo "#define ssize_t int" >>confdefs.h
21691
21692 fi
21693
21694
21695
21696
21697
21698
21699 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>
21700 #include <sys/stat.h>
21701"
21702if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then :
21703
21704cat >>confdefs.h <<_ACEOF
21705#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
21706_ACEOF
21707
21708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
21709$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
21710if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then :
f199cab1
GM
21711 $as_echo_n "(cached) " >&6
21712else
5476a9a4 21713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21714/* end confdefs.h. */
3e0be4ab 21715
5476a9a4
GM
21716 #include <sys/types.h>
21717 #include <sys/stat.h>
21718 #if HAVE_SYS_TIME_H
21719 # include <sys/time.h>
21720 #endif
21721 #include <time.h>
21722 struct timespec ts;
21723 struct stat st;
21724
f199cab1
GM
21725int
21726main ()
21727{
5476a9a4
GM
21728
21729 st.st_atim = ts;
21730
f199cab1
GM
21731 ;
21732 return 0;
21733}
3e0be4ab 21734_ACEOF
5476a9a4
GM
21735if ac_fn_c_try_compile "$LINENO"; then :
21736 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
f199cab1 21737else
5476a9a4 21738 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
f199cab1 21739fi
5476a9a4 21740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 21741fi
5476a9a4
GM
21742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
21743$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
21744 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
067d23c9 21745
5476a9a4 21746$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
067d23c9 21747
5476a9a4
GM
21748 fi
21749else
21750 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>
21751 #include <sys/stat.h>
21752"
21753if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then :
067d23c9 21754
5476a9a4
GM
21755cat >>confdefs.h <<_ACEOF
21756#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
21757_ACEOF
3e0be4ab 21758
0eb775a3 21759
3e0be4ab 21760else
5476a9a4
GM
21761 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
21762 #include <sys/stat.h>
21763"
21764if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then :
21765
21766cat >>confdefs.h <<_ACEOF
21767#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
067d23c9 21768_ACEOF
5476a9a4
GM
21769
21770
067d23c9 21771else
5476a9a4
GM
21772 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>
21773 #include <sys/stat.h>
21774"
21775if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then :
21776
21777cat >>confdefs.h <<_ACEOF
21778#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
21779_ACEOF
21780
21781
3e0be4ab 21782fi
5476a9a4 21783
067d23c9 21784fi
5476a9a4 21785
067d23c9 21786fi
067d23c9
KY
21787
21788fi
21789
067d23c9 21790
067d23c9 21791
067d23c9 21792
067d23c9
KY
21793
21794
5476a9a4
GM
21795 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>
21796 #include <sys/stat.h>
21797"
21798if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then :
21799
21800cat >>confdefs.h <<_ACEOF
21801#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
21802_ACEOF
067d23c9
KY
21803
21804
f199cab1 21805else
5476a9a4
GM
21806 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
21807 #include <sys/stat.h>
21808"
21809if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then :
067d23c9 21810
5476a9a4
GM
21811cat >>confdefs.h <<_ACEOF
21812#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
21813_ACEOF
067d23c9 21814
3e0be4ab 21815
067d23c9 21816else
5476a9a4
GM
21817 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>
21818 #include <sys/stat.h>
21819"
21820if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then :
067d23c9 21821
5476a9a4
GM
21822cat >>confdefs.h <<_ACEOF
21823#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
067d23c9 21824_ACEOF
5476a9a4
GM
21825
21826
f199cab1 21827fi
5476a9a4 21828
f199cab1 21829fi
5476a9a4 21830
067d23c9 21831fi
0eb775a3 21832
0eb775a3 21833
0eb775a3 21834
5476a9a4
GM
21835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
21836$as_echo_n "checking for working stdalign.h... " >&6; }
21837if test "${gl_cv_header_working_stdalign_h+set}" = set; then :
f199cab1 21838 $as_echo_n "(cached) " >&6
067d23c9 21839else
5476a9a4 21840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21841/* end confdefs.h. */
5476a9a4
GM
21842#include <stdalign.h>
21843 #include <stddef.h>
21844
21845 /* Test that alignof yields a result consistent with offsetof.
21846 This catches GCC bug 52023
21847 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
21848 #ifdef __cplusplus
21849 template <class t> struct alignof_helper { char a; t b; };
21850 # define ao(type) offsetof (alignof_helper<type>, b)
21851 #else
21852 # define ao(type) offsetof (struct { char a; type b; }, b)
21853 #endif
21854 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
21855 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
21856 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
21857
21858 /* Test _Alignas only on platforms where gnulib can help. */
21859 #if \
21860 (__GNUC__ || __IBMC__ || __IBMCPP__ \
21861 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
21862 int alignas (8) alignas_int = 1;
21863 char test_alignas[_Alignof (alignas_int) == 8 ? 1 : -1];
21864 #endif
067d23c9 21865
f199cab1
GM
21866int
21867main ()
21868{
5476a9a4 21869
f199cab1
GM
21870 ;
21871 return 0;
21872}
21873_ACEOF
5476a9a4
GM
21874if ac_fn_c_try_compile "$LINENO"; then :
21875 gl_cv_header_working_stdalign_h=yes
f199cab1 21876else
5476a9a4 21877 gl_cv_header_working_stdalign_h=no
f199cab1 21878fi
5476a9a4 21879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 21880fi
5476a9a4
GM
21881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
21882$as_echo "$gl_cv_header_working_stdalign_h" >&6; }
067d23c9 21883
5476a9a4
GM
21884 if test $gl_cv_header_working_stdalign_h = yes; then
21885 STDALIGN_H=''
21886 else
21887 STDALIGN_H='stdalign.h'
f199cab1 21888 fi
0eb775a3 21889
5476a9a4
GM
21890
21891 if test -n "$STDALIGN_H"; then
21892 GL_GENERATE_STDALIGN_H_TRUE=
21893 GL_GENERATE_STDALIGN_H_FALSE='#'
f199cab1 21894else
5476a9a4
GM
21895 GL_GENERATE_STDALIGN_H_TRUE='#'
21896 GL_GENERATE_STDALIGN_H_FALSE=
0eb775a3 21897fi
0eb775a3
GM
21898
21899
21900
5476a9a4
GM
21901 STDARG_H=''
21902 NEXT_STDARG_H='<stdarg.h>'
21903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
21904$as_echo_n "checking for va_copy... " >&6; }
21905 if test "${gl_cv_func_va_copy+set}" = set; then :
f199cab1 21906 $as_echo_n "(cached) " >&6
5476a9a4
GM
21907else
21908
21909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21910/* end confdefs.h. */
21911#include <stdarg.h>
f199cab1
GM
21912int
21913main ()
21914{
5476a9a4
GM
21915
21916#ifndef va_copy
21917void (*func) (va_list, va_list) = va_copy;
21918#endif
21919
f199cab1
GM
21920 ;
21921 return 0;
21922}
21923_ACEOF
5476a9a4
GM
21924if ac_fn_c_try_compile "$LINENO"; then :
21925 gl_cv_func_va_copy=yes
f199cab1 21926else
5476a9a4 21927 gl_cv_func_va_copy=no
f199cab1 21928fi
5476a9a4 21929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 21930fi
5476a9a4
GM
21931
21932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
21933$as_echo "$gl_cv_func_va_copy" >&6; }
21934 if test $gl_cv_func_va_copy = no; then
21935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21936/* end confdefs.h. */
21937#if defined _AIX && !defined __GNUC__
21938 AIX vaccine
21939 #endif
21940
21941_ACEOF
21942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21943 $EGREP "vaccine" >/dev/null 2>&1; then :
21944 gl_aixcc=yes
f199cab1 21945else
5476a9a4 21946 gl_aixcc=no
f199cab1 21947fi
5476a9a4 21948rm -f conftest*
0eb775a3 21949
5476a9a4
GM
21950 if test $gl_aixcc = yes; then
21951 STDARG_H=stdarg.h
0eb775a3
GM
21952
21953
5476a9a4
GM
21954
21955
21956
21957
21958
21959
21960 if test $gl_cv_have_include_next = yes; then
21961 gl_cv_next_stdarg_h='<'stdarg.h'>'
21962 else
21963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
21964$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
21965if test "${gl_cv_next_stdarg_h+set}" = set; then :
f199cab1
GM
21966 $as_echo_n "(cached) " >&6
21967else
5476a9a4
GM
21968
21969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 21970/* end confdefs.h. */
5476a9a4 21971#include <stdarg.h>
0eb775a3 21972
f199cab1 21973_ACEOF
5476a9a4
GM
21974 case "$host_os" in
21975 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21976 *) gl_absname_cpp="$ac_cpp" ;;
21977 esac
21978
21979 case "$host_os" in
21980 mingw*)
21981 gl_dirsep_regex='[/\\]'
21982 ;;
21983 *)
21984 gl_dirsep_regex='\/'
21985 ;;
21986 esac
21987 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21988
21989 gl_header_literal_regex=`echo 'stdarg.h' \
21990 | sed -e "$gl_make_literal_regex_sed"`
21991 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21992 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21993 s|^/[^/]|//&|
21994 p
21995 q
21996 }'
21997 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21998 sed -n "$gl_absolute_header_sed"`'"'
21999
22000
f199cab1 22001fi
5476a9a4
GM
22002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
22003$as_echo "$gl_cv_next_stdarg_h" >&6; }
22004 fi
22005 NEXT_STDARG_H=$gl_cv_next_stdarg_h
22006
22007 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22008 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22009 gl_next_as_first_directive='<'stdarg.h'>'
22010 else
22011 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22012 gl_next_as_first_directive=$gl_cv_next_stdarg_h
22013 fi
22014 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
0eb775a3
GM
22015
22016
22017
5476a9a4
GM
22018
22019 if test "$gl_cv_next_stdarg_h" = '""'; then
22020 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
22021 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
22022 fi
f199cab1 22023 else
5476a9a4
GM
22024
22025 saved_as_echo_n="$as_echo_n"
22026 as_echo_n=':'
22027 if test "${gl_cv_func___va_copy+set}" = set; then :
f199cab1
GM
22028 $as_echo_n "(cached) " >&6
22029else
0eb775a3 22030
5476a9a4
GM
22031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22032/* end confdefs.h. */
22033#include <stdarg.h>
f199cab1
GM
22034int
22035main ()
22036{
5476a9a4
GM
22037
22038#ifndef __va_copy
22039error, bail out
22040#endif
22041
f199cab1
GM
22042 ;
22043 return 0;
22044}
22045_ACEOF
5476a9a4
GM
22046if ac_fn_c_try_compile "$LINENO"; then :
22047 gl_cv_func___va_copy=yes
f199cab1 22048else
5476a9a4 22049 gl_cv_func___va_copy=no
f199cab1 22050fi
5476a9a4 22051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22052fi
0eb775a3 22053
5476a9a4
GM
22054 as_echo_n="$saved_as_echo_n"
22055
22056 if test $gl_cv_func___va_copy = yes; then
22057
22058$as_echo "#define va_copy __va_copy" >>confdefs.h
22059
22060 else
0eb775a3 22061
5476a9a4
GM
22062
22063$as_echo "#define va_copy gl_va_copy" >>confdefs.h
0eb775a3 22064
f199cab1
GM
22065 fi
22066 fi
5476a9a4
GM
22067 fi
22068
22069 if test -n "$STDARG_H"; then
22070 GL_GENERATE_STDARG_H_TRUE=
22071 GL_GENERATE_STDARG_H_FALSE='#'
22072else
22073 GL_GENERATE_STDARG_H_TRUE='#'
22074 GL_GENERATE_STDARG_H_FALSE=
22075fi
22076
22077
22078
22079
22080
22081
22082 # Define two additional variables used in the Makefile substitution.
22083
22084 if test "$ac_cv_header_stdbool_h" = yes; then
22085 STDBOOL_H=''
22086 else
22087 STDBOOL_H='stdbool.h'
22088 fi
22089
22090 if test -n "$STDBOOL_H"; then
22091 GL_GENERATE_STDBOOL_H_TRUE=
22092 GL_GENERATE_STDBOOL_H_FALSE='#'
22093else
22094 GL_GENERATE_STDBOOL_H_TRUE='#'
22095 GL_GENERATE_STDBOOL_H_FALSE=
22096fi
22097
22098
22099 if test "$ac_cv_type__Bool" = yes; then
22100 HAVE__BOOL=1
22101 else
22102 HAVE__BOOL=0
22103 fi
22104
22105
22106
22107
22108
22109 STDDEF_H=
22110 if test $gt_cv_c_wchar_t = no; then
22111 HAVE_WCHAR_T=0
22112 STDDEF_H=stddef.h
22113 fi
22114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
22115$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
22116if test "${gl_cv_decl_null_works+set}" = set; then :
f199cab1
GM
22117 $as_echo_n "(cached) " >&6
22118else
5476a9a4 22119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22120/* end confdefs.h. */
5476a9a4
GM
22121#include <stddef.h>
22122 int test[2 * (sizeof NULL == sizeof (void *)) -1];
3e0be4ab 22123
f199cab1
GM
22124int
22125main ()
22126{
5476a9a4 22127
f199cab1
GM
22128 ;
22129 return 0;
22130}
22131_ACEOF
5476a9a4
GM
22132if ac_fn_c_try_compile "$LINENO"; then :
22133 gl_cv_decl_null_works=yes
f199cab1 22134else
5476a9a4 22135 gl_cv_decl_null_works=no
f199cab1 22136fi
5476a9a4 22137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f199cab1 22138fi
5476a9a4
GM
22139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
22140$as_echo "$gl_cv_decl_null_works" >&6; }
22141 if test $gl_cv_decl_null_works = no; then
22142 REPLACE_NULL=1
22143 STDDEF_H=stddef.h
22144 fi
22145
22146 if test -n "$STDDEF_H"; then
22147 GL_GENERATE_STDDEF_H_TRUE=
22148 GL_GENERATE_STDDEF_H_FALSE='#'
f199cab1 22149else
5476a9a4
GM
22150 GL_GENERATE_STDDEF_H_TRUE='#'
22151 GL_GENERATE_STDDEF_H_FALSE=
f199cab1 22152fi
3e0be4ab 22153
5476a9a4 22154 if test -n "$STDDEF_H"; then
3e0be4ab
GM
22155
22156
5476a9a4
GM
22157
22158
22159
22160
22161
22162
22163 if test $gl_cv_have_include_next = yes; then
22164 gl_cv_next_stddef_h='<'stddef.h'>'
22165 else
22166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
22167$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
22168if test "${gl_cv_next_stddef_h+set}" = set; then :
067d23c9
KY
22169 $as_echo_n "(cached) " >&6
22170else
5476a9a4
GM
22171
22172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 22173/* end confdefs.h. */
5476a9a4 22174#include <stddef.h>
f199cab1 22175
067d23c9 22176_ACEOF
5476a9a4
GM
22177 case "$host_os" in
22178 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22179 *) gl_absname_cpp="$ac_cpp" ;;
22180 esac
22181
22182 case "$host_os" in
22183 mingw*)
22184 gl_dirsep_regex='[/\\]'
22185 ;;
22186 *)
22187 gl_dirsep_regex='\/'
22188 ;;
22189 esac
22190 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22191
22192 gl_header_literal_regex=`echo 'stddef.h' \
22193 | sed -e "$gl_make_literal_regex_sed"`
22194 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22195 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22196 s|^/[^/]|//&|
22197 p
22198 q
22199 }'
22200 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22201 sed -n "$gl_absolute_header_sed"`'"'
22202
22203
f199cab1 22204fi
5476a9a4
GM
22205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
22206$as_echo "$gl_cv_next_stddef_h" >&6; }
22207 fi
22208 NEXT_STDDEF_H=$gl_cv_next_stddef_h
22209
22210 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22211 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22212 gl_next_as_first_directive='<'stddef.h'>'
22213 else
22214 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22215 gl_next_as_first_directive=$gl_cv_next_stddef_h
22216 fi
22217 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
22218
f199cab1 22219
f199cab1 22220
f199cab1 22221
067d23c9 22222 fi
067d23c9 22223
f199cab1 22224
067d23c9 22225
067d23c9 22226
067d23c9 22227
067d23c9
KY
22228
22229
067d23c9 22230
067d23c9
KY
22231
22232
067d23c9 22233
3e0be4ab 22234
5476a9a4
GM
22235
22236 if test $gl_cv_have_include_next = yes; then
22237 gl_cv_next_stdio_h='<'stdio.h'>'
22238 else
22239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
22240$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
22241if test "${gl_cv_next_stdio_h+set}" = set; then :
22242 $as_echo_n "(cached) " >&6
f199cab1 22243else
5476a9a4
GM
22244
22245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22246/* end confdefs.h. */
22247#include <stdio.h>
22248
f199cab1 22249_ACEOF
5476a9a4
GM
22250 case "$host_os" in
22251 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22252 *) gl_absname_cpp="$ac_cpp" ;;
22253 esac
067d23c9 22254
5476a9a4
GM
22255 case "$host_os" in
22256 mingw*)
22257 gl_dirsep_regex='[/\\]'
22258 ;;
22259 *)
22260 gl_dirsep_regex='\/'
22261 ;;
22262 esac
22263 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22264
22265 gl_header_literal_regex=`echo 'stdio.h' \
22266 | sed -e "$gl_make_literal_regex_sed"`
22267 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22268 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22269 s|^/[^/]|//&|
22270 p
22271 q
22272 }'
22273 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22274 sed -n "$gl_absolute_header_sed"`'"'
067d23c9 22275
067d23c9 22276
f199cab1 22277fi
5476a9a4
GM
22278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
22279$as_echo "$gl_cv_next_stdio_h" >&6; }
22280 fi
22281 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 22282
5476a9a4
GM
22283 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22284 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22285 gl_next_as_first_directive='<'stdio.h'>'
22286 else
22287 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22288 gl_next_as_first_directive=$gl_cv_next_stdio_h
22289 fi
22290 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
22291
22292
22293
22294
22295
22296 GNULIB_FSCANF=1
22297
22298
22299cat >>confdefs.h <<_ACEOF
22300#define GNULIB_FSCANF 1
22301_ACEOF
067d23c9 22302
067d23c9 22303
5476a9a4 22304 GNULIB_SCANF=1
f199cab1 22305
f199cab1 22306
5476a9a4
GM
22307cat >>confdefs.h <<_ACEOF
22308#define GNULIB_SCANF 1
f199cab1
GM
22309_ACEOF
22310
067d23c9 22311
5476a9a4
GM
22312 GNULIB_FGETC=1
22313 GNULIB_GETC=1
22314 GNULIB_GETCHAR=1
22315 GNULIB_FGETS=1
22316 GNULIB_FREAD=1
067d23c9 22317
067d23c9 22318
5476a9a4
GM
22319 GNULIB_FPRINTF=1
22320 GNULIB_PRINTF=1
22321 GNULIB_VFPRINTF=1
22322 GNULIB_VPRINTF=1
22323 GNULIB_FPUTC=1
22324 GNULIB_PUTC=1
22325 GNULIB_PUTCHAR=1
22326 GNULIB_FPUTS=1
22327 GNULIB_PUTS=1
22328 GNULIB_FWRITE=1
067d23c9 22329
067d23c9 22330
067d23c9 22331
067d23c9 22332
067d23c9 22333
067d23c9 22334
067d23c9 22335
067d23c9 22336
3e0be4ab
GM
22337
22338
22339
22340
22341
22342
3e0be4ab 22343
5476a9a4
GM
22344 if test $gl_cv_have_include_next = yes; then
22345 gl_cv_next_stdlib_h='<'stdlib.h'>'
22346 else
22347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
22348$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
22349if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
22350 $as_echo_n "(cached) " >&6
22351else
5476a9a4
GM
22352
22353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f199cab1 22354/* end confdefs.h. */
5476a9a4
GM
22355#include <stdlib.h>
22356
f199cab1 22357_ACEOF
5476a9a4
GM
22358 case "$host_os" in
22359 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22360 *) gl_absname_cpp="$ac_cpp" ;;
22361 esac
067d23c9 22362
5476a9a4
GM
22363 case "$host_os" in
22364 mingw*)
22365 gl_dirsep_regex='[/\\]'
22366 ;;
22367 *)
22368 gl_dirsep_regex='\/'
22369 ;;
22370 esac
22371 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22372
22373 gl_header_literal_regex=`echo 'stdlib.h' \
22374 | sed -e "$gl_make_literal_regex_sed"`
22375 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22376 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22377 s|^/[^/]|//&|
22378 p
22379 q
22380 }'
22381 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22382 sed -n "$gl_absolute_header_sed"`'"'
3e0be4ab 22383
067d23c9 22384
f199cab1 22385fi
5476a9a4
GM
22386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
22387$as_echo "$gl_cv_next_stdlib_h" >&6; }
22388 fi
22389 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
b0415a03 22390
5476a9a4
GM
22391 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22392 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22393 gl_next_as_first_directive='<'stdlib.h'>'
22394 else
22395 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22396 gl_next_as_first_directive=$gl_cv_next_stdlib_h
22397 fi
22398 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
b0415a03 22399
067d23c9 22400
067d23c9 22401
067d23c9 22402
067d23c9 22403
067d23c9 22404
067d23c9 22405
067d23c9 22406
067d23c9 22407
5476a9a4 22408 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
067d23c9 22409
067d23c9 22410
067d23c9 22411
b0415a03
GM
22412
22413
ac1ca7e9 22414
0eb775a3 22415
5476a9a4 22416$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 22417
067d23c9 22418
a0a61e58
GM
22419
22420
22421
3e0be4ab 22422
5476a9a4
GM
22423
22424
22425 if test "$ac_cv_have_decl_strtoimax" != yes; then
22426 HAVE_DECL_STRTOIMAX=0
22427 fi
22428
22429 if test $ac_cv_func_strtoimax = yes; then
22430 HAVE_STRTOIMAX=1
22431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
22432$as_echo_n "checking whether strtoimax works... " >&6; }
22433if test "${gl_cv_func_strtoimax+set}" = set; then :
f199cab1
GM
22434 $as_echo_n "(cached) " >&6
22435else
22436 if test "$cross_compiling" = yes; then :
5476a9a4
GM
22437 case "$host_os" in
22438 # Guess no on AIX 5.
22439 aix5*) gl_cv_func_strtoimax="guessing no" ;;
22440 # Guess yes otherwise.
22441 *) gl_cv_func_strtoimax="guessing yes" ;;
22442 esac
22443
f199cab1
GM
22444else
22445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22446/* end confdefs.h. */
3e0be4ab 22447
5476a9a4
GM
22448#include <errno.h>
22449#include <string.h>
22450#include <inttypes.h>
22451int main ()
22452{
22453 if (sizeof (intmax_t) > sizeof (int))
22454 {
22455 const char *s = "4294967295";
22456 char *p;
22457 intmax_t res;
22458 errno = 0;
22459 res = strtoimax (s, &p, 10);
22460 if (p != s + strlen (s))
22461 return 1;
22462 if (errno != 0)
22463 return 2;
22464 if (res != (intmax_t) 65535 * (intmax_t) 65537)
22465 return 3;
22466 }
22467 else
22468 {
22469 const char *s = "2147483647";
22470 char *p;
22471 intmax_t res;
22472 errno = 0;
22473 res = strtoimax (s, &p, 10);
22474 if (p != s + strlen (s))
22475 return 1;
22476 if (errno != 0)
22477 return 2;
22478 if (res != 2147483647)
22479 return 3;
22480 }
f199cab1
GM
22481 return 0;
22482}
5476a9a4 22483
f199cab1
GM
22484_ACEOF
22485if ac_fn_c_try_run "$LINENO"; then :
5476a9a4 22486 gl_cv_func_strtoimax=yes
f199cab1 22487else
5476a9a4 22488 gl_cv_func_strtoimax=no
f199cab1
GM
22489fi
22490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22491 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
22492fi
22493
3e0be4ab 22494
f199cab1 22495fi
5476a9a4
GM
22496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
22497$as_echo "$gl_cv_func_strtoimax" >&6; }
22498 case "$gl_cv_func_strtoimax" in
22499 *no) REPLACE_STRTOIMAX=1 ;;
22500 esac
22501 else
22502 HAVE_STRTOIMAX=0
22503 fi
067d23c9 22504
5476a9a4 22505if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
067d23c9 22506
067d23c9 22507
067d23c9 22508
067d23c9 22509
067d23c9 22510
3e0be4ab 22511
2b1928b8
GM
22512
22513
5476a9a4
GM
22514 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
22515
22516
22517 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
22518if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
22519 ac_have_decl=1
f199cab1 22520else
5476a9a4 22521 ac_have_decl=0
f199cab1 22522fi
2b1928b8 22523
5476a9a4
GM
22524cat >>confdefs.h <<_ACEOF
22525#define HAVE_DECL_STRTOLL $ac_have_decl
22526_ACEOF
22527
22528
067d23c9 22529
f199cab1 22530fi
067d23c9 22531
3e0be4ab
GM
22532
22533
22534
3e0be4ab 22535
5476a9a4 22536 GNULIB_STRTOIMAX=1
3e0be4ab
GM
22537
22538
22539
22540
3e0be4ab
GM
22541
22542
22543
f199cab1 22544
f199cab1 22545
5476a9a4
GM
22546 if test "$ac_cv_have_decl_strtoumax" != yes; then
22547 HAVE_DECL_STRTOUMAX=0
22548 fi
067d23c9 22549
5476a9a4 22550if test $ac_cv_func_strtoumax = no; then
0eb775a3 22551
5476a9a4
GM
22552
22553
22554
22555
22556
22557
22558
22559 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
22560
22561
22562 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
22563if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
22564 ac_have_decl=1
067d23c9 22565else
5476a9a4 22566 ac_have_decl=0
067d23c9 22567fi
5476a9a4
GM
22568
22569cat >>confdefs.h <<_ACEOF
22570#define HAVE_DECL_STRTOULL $ac_have_decl
22571_ACEOF
22572
22573
22574
3e0be4ab 22575fi
067d23c9 22576
067d23c9 22577
067d23c9 22578
067d23c9 22579
067d23c9 22580
5476a9a4
GM
22581 GNULIB_STRTOUMAX=1
22582
22583
22584
22585
22586
22587
22588
22589 if test $ac_cv_func_symlink = no; then
22590 HAVE_SYMLINK=0
22591 else
22592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
22593$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
22594if test "${gl_cv_func_symlink_works+set}" = set; then :
f199cab1 22595 $as_echo_n "(cached) " >&6
5476a9a4
GM
22596else
22597 if test "$cross_compiling" = yes; then :
22598 case "$host_os" in
22599 # Guess yes on glibc systems.
22600 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
22601 # If we don't know, assume the worst.
22602 *) gl_cv_func_symlink_works="guessing no" ;;
22603 esac
22604
f199cab1
GM
22605else
22606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22607/* end confdefs.h. */
5476a9a4
GM
22608#include <unistd.h>
22609
f199cab1
GM
22610int
22611main ()
22612{
5476a9a4
GM
22613int result = 0;
22614 if (!symlink ("a", "conftest.link/"))
22615 result |= 1;
22616 if (symlink ("conftest.f", "conftest.lnk2"))
22617 result |= 2;
22618 else if (!symlink ("a", "conftest.lnk2/"))
22619 result |= 4;
22620 return result;
067d23c9 22621
f199cab1
GM
22622 ;
22623 return 0;
22624}
22625_ACEOF
5476a9a4
GM
22626if ac_fn_c_try_run "$LINENO"; then :
22627 gl_cv_func_symlink_works=yes
f199cab1 22628else
5476a9a4 22629 gl_cv_func_symlink_works=no
f199cab1 22630fi
5476a9a4
GM
22631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22632 conftest.$ac_objext conftest.beam conftest.$ac_ext
f199cab1 22633fi
067d23c9 22634
5476a9a4 22635 rm -f conftest.f conftest.link conftest.lnk2
f199cab1 22636fi
5476a9a4
GM
22637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
22638$as_echo "$gl_cv_func_symlink_works" >&6; }
22639 case "$gl_cv_func_symlink_works" in
22640 *yes) ;;
22641 *)
22642 REPLACE_SYMLINK=1
22643 ;;
22644 esac
22645 fi
067d23c9 22646
5476a9a4 22647if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9 22648
7e723570 22649
7e723570
GM
22650
22651
dd0d840e 22652
dd0d840e
GM
22653
22654
22655
5476a9a4 22656 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
dd0d840e 22657
5476a9a4 22658fi
dd0d840e
GM
22659
22660
d3127c14
GM
22661
22662
d3127c14 22663
5476a9a4 22664 GNULIB_SYMLINK=1
d3127c14 22665
d3127c14 22666
d3127c14
GM
22667
22668
067d23c9 22669
067d23c9 22670
d3127c14 22671
d3127c14 22672
5476a9a4
GM
22673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
22674$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
22675if test "${gl_cv_header_sys_select_h_selfcontained+set}" = set; then :
22676 $as_echo_n "(cached) " >&6
22677else
d3127c14 22678
5476a9a4
GM
22679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22680/* end confdefs.h. */
22681#include <sys/select.h>
22682int
22683main ()
22684{
22685struct timeval b;
22686 ;
22687 return 0;
22688}
22689_ACEOF
22690if ac_fn_c_try_compile "$LINENO"; then :
22691 gl_cv_header_sys_select_h_selfcontained=yes
22692else
22693 gl_cv_header_sys_select_h_selfcontained=no
22694fi
22695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22696 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
22697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22698/* end confdefs.h. */
22699#include <sys/select.h>
22700int
22701main ()
22702{
22703int memset; int bzero;
22704 ;
22705 return 0;
22706}
3e0be4ab 22707
5476a9a4
GM
22708_ACEOF
22709if ac_fn_c_try_compile "$LINENO"; then :
22710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22711/* end confdefs.h. */
22712#include <sys/select.h>
22713int
22714main ()
22715{
dd0d840e 22716
5476a9a4
GM
22717 #undef memset
22718 #define memset nonexistent_memset
22719 extern
22720 #ifdef __cplusplus
22721 "C"
22722 #endif
22723 void *memset (void *, int, unsigned long);
22724 #undef bzero
22725 #define bzero nonexistent_bzero
22726 extern
22727 #ifdef __cplusplus
22728 "C"
22729 #endif
22730 void bzero (void *, unsigned long);
22731 fd_set fds;
22732 FD_ZERO (&fds);
3e0be4ab 22733
5476a9a4
GM
22734 ;
22735 return 0;
22736}
067d23c9 22737
5476a9a4
GM
22738_ACEOF
22739if ac_fn_c_try_link "$LINENO"; then :
dd0d840e 22740
5476a9a4
GM
22741else
22742 gl_cv_header_sys_select_h_selfcontained=no
22743fi
22744rm -f core conftest.err conftest.$ac_objext \
22745 conftest$ac_exeext conftest.$ac_ext
dd0d840e 22746
5476a9a4
GM
22747fi
22748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22749 fi
dd0d840e 22750
5476a9a4
GM
22751fi
22752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
22753$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
dd0d840e 22754
dd0d840e
GM
22755
22756
dd0d840e
GM
22757
22758
dd0d840e
GM
22759
22760
22761
dd0d840e 22762
5476a9a4
GM
22763 if test $gl_cv_have_include_next = yes; then
22764 gl_cv_next_sys_select_h='<'sys/select.h'>'
22765 else
22766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
22767$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
22768if test "${gl_cv_next_sys_select_h+set}" = set; then :
22769 $as_echo_n "(cached) " >&6
22770else
dd0d840e 22771
5476a9a4 22772 if test $ac_cv_header_sys_select_h = yes; then
dd0d840e 22773
dd0d840e 22774
5476a9a4
GM
22775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22776/* end confdefs.h. */
22777#include <sys/select.h>
dd0d840e 22778
5476a9a4
GM
22779_ACEOF
22780 case "$host_os" in
22781 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22782 *) gl_absname_cpp="$ac_cpp" ;;
22783 esac
dd0d840e 22784
5476a9a4
GM
22785 case "$host_os" in
22786 mingw*)
22787 gl_dirsep_regex='[/\\]'
22788 ;;
22789 *)
22790 gl_dirsep_regex='\/'
22791 ;;
22792 esac
22793 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 22794
5476a9a4
GM
22795 gl_header_literal_regex=`echo 'sys/select.h' \
22796 | sed -e "$gl_make_literal_regex_sed"`
22797 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22798 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22799 s|^/[^/]|//&|
22800 p
22801 q
22802 }'
22803 gl_cv_next_sys_select_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22804 sed -n "$gl_absolute_header_sed"`'"'
22805 else
22806 gl_cv_next_sys_select_h='<'sys/select.h'>'
22807 fi
067d23c9 22808
067d23c9 22809
5476a9a4
GM
22810fi
22811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
22812$as_echo "$gl_cv_next_sys_select_h" >&6; }
22813 fi
22814 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
22815
22816 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22817 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22818 gl_next_as_first_directive='<'sys/select.h'>'
22819 else
22820 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22821 gl_next_as_first_directive=$gl_cv_next_sys_select_h
22822 fi
22823 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
22824
22825
22826
22827
22828 if test $ac_cv_header_sys_select_h = yes; then
22829 HAVE_SYS_SELECT_H=1
22830 else
22831 HAVE_SYS_SELECT_H=0
22832 fi
067d23c9
KY
22833
22834
7e723570 22835
7e723570 22836
7e723570 22837
5476a9a4
GM
22838 if test $ac_cv_header_sys_socket_h != yes; then
22839 for ac_header in winsock2.h
22840do :
22841 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
22842if test "x$ac_cv_header_winsock2_h" = x""yes; then :
22843 cat >>confdefs.h <<_ACEOF
22844#define HAVE_WINSOCK2_H 1
22845_ACEOF
7e723570 22846
5476a9a4 22847fi
7e723570 22848
5476a9a4 22849done
7e723570 22850
5476a9a4
GM
22851 fi
22852 if test "$ac_cv_header_winsock2_h" = yes; then
22853 HAVE_WINSOCK2_H=1
22854 UNISTD_H_HAVE_WINSOCK2_H=1
22855 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
22856 else
22857 HAVE_WINSOCK2_H=0
22858 fi
7e723570
GM
22859
22860
dd0d840e 22861
dd0d840e 22862
dd0d840e
GM
22863
22864
dd0d840e 22865
dd0d840e 22866
dd0d840e
GM
22867
22868
22869
22870
22871
22872
22873
22874
dd0d840e 22875
dd0d840e 22876
dd0d840e 22877
dd0d840e 22878
dd0d840e 22879
dd0d840e 22880
5476a9a4
GM
22881 if test $gl_cv_have_include_next = yes; then
22882 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22883 else
22884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
22885$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
22886if test "${gl_cv_next_sys_stat_h+set}" = set; then :
22887 $as_echo_n "(cached) " >&6
22888else
dd0d840e 22889
5476a9a4 22890 if test $ac_cv_header_sys_stat_h = yes; then
dd0d840e 22891
dd0d840e 22892
5476a9a4
GM
22893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22894/* end confdefs.h. */
22895#include <sys/stat.h>
dd0d840e 22896
5476a9a4
GM
22897_ACEOF
22898 case "$host_os" in
22899 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22900 *) gl_absname_cpp="$ac_cpp" ;;
22901 esac
dd0d840e 22902
5476a9a4
GM
22903 case "$host_os" in
22904 mingw*)
22905 gl_dirsep_regex='[/\\]'
22906 ;;
22907 *)
22908 gl_dirsep_regex='\/'
22909 ;;
22910 esac
22911 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
dd0d840e 22912
5476a9a4
GM
22913 gl_header_literal_regex=`echo 'sys/stat.h' \
22914 | sed -e "$gl_make_literal_regex_sed"`
22915 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22916 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22917 s|^/[^/]|//&|
22918 p
22919 q
22920 }'
22921 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22922 sed -n "$gl_absolute_header_sed"`'"'
22923 else
22924 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
22925 fi
dd0d840e 22926
dd0d840e 22927
5476a9a4
GM
22928fi
22929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
22930$as_echo "$gl_cv_next_sys_stat_h" >&6; }
22931 fi
22932 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
dd0d840e 22933
5476a9a4
GM
22934 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22935 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22936 gl_next_as_first_directive='<'sys/stat.h'>'
22937 else
22938 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22939 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
22940 fi
22941 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
dd0d840e 22942
dd0d840e 22943
d3127c14 22944
d3127c14 22945
dd0d840e 22946
dd0d840e 22947
dd0d840e 22948
dd0d840e 22949
dd0d840e 22950
dd0d840e 22951
dd0d840e 22952
5476a9a4 22953 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
dd0d840e 22954
5476a9a4 22955$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
dd0d840e 22956
5476a9a4 22957 fi
dd0d840e 22958
5476a9a4
GM
22959 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
22960 #include <sys/stat.h>
22961"
22962if test "x$ac_cv_type_nlink_t" = x""yes; then :
dd0d840e 22963
5476a9a4 22964else
dd0d840e 22965
5476a9a4 22966$as_echo "#define nlink_t int" >>confdefs.h
dd0d840e 22967
5476a9a4 22968fi
dd0d840e 22969
dd0d840e 22970
dd0d840e 22971
dd0d840e 22972
dd0d840e 22973
dd0d840e 22974
dd0d840e 22975
c9ca3f76 22976
dd0d840e 22977
dd0d840e 22978
dd0d840e 22979
c9ca3f76 22980
dd0d840e 22981
dd0d840e
GM
22982
22983
7e723570
GM
22984
22985
7e723570 22986
5476a9a4
GM
22987 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
22988"
22989if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
22990 ac_have_decl=1
22991else
22992 ac_have_decl=0
22993fi
7e723570 22994
5476a9a4
GM
22995cat >>confdefs.h <<_ACEOF
22996#define HAVE_DECL_LOCALTIME_R $ac_have_decl
22997_ACEOF
7e723570 22998
5476a9a4
GM
22999 if test $ac_cv_have_decl_localtime_r = no; then
23000 HAVE_DECL_LOCALTIME_R=0
23001 fi
7e723570 23002
7e723570 23003
5476a9a4
GM
23004 if test $ac_cv_func_localtime_r = yes; then
23005 HAVE_LOCALTIME_R=1
23006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
23007$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
23008if test "${gl_cv_time_r_posix+set}" = set; then :
23009 $as_echo_n "(cached) " >&6
23010else
23011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23012/* end confdefs.h. */
23013#include <time.h>
7e723570
GM
23014int
23015main ()
23016{
5476a9a4
GM
23017/* We don't need to append 'restrict's to the argument types,
23018 even though the POSIX signature has the 'restrict's,
23019 since C99 says they can't affect type compatibility. */
23020 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
23021 if (ptr) return 0;
23022 /* Check the return type is a pointer.
23023 On HP-UX 10 it is 'int'. */
23024 *localtime_r (0, 0);
7e723570
GM
23025 ;
23026 return 0;
23027}
5476a9a4 23028
7e723570 23029_ACEOF
5476a9a4
GM
23030if ac_fn_c_try_compile "$LINENO"; then :
23031 gl_cv_time_r_posix=yes
7e723570 23032else
5476a9a4 23033 gl_cv_time_r_posix=no
7e723570 23034fi
5476a9a4 23035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
02bd7257 23036
5476a9a4
GM
23037fi
23038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
23039$as_echo "$gl_cv_time_r_posix" >&6; }
23040 if test $gl_cv_time_r_posix = yes; then
23041 REPLACE_LOCALTIME_R=0
23042 else
23043 REPLACE_LOCALTIME_R=1
23044 fi
23045 else
23046 HAVE_LOCALTIME_R=0
23047 fi
02bd7257 23048
5476a9a4 23049if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
02bd7257
GM
23050
23051
02bd7257 23052
02bd7257 23053
02bd7257 23054
02bd7257 23055
7e723570 23056
7e723570 23057
5476a9a4
GM
23058 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
23059
23060
23061 :
7e723570 23062
7e723570 23063fi
7e723570 23064
7e723570 23065
7e723570 23066
7e723570 23067
7e723570 23068
5476a9a4 23069 GNULIB_TIME_R=1
7e723570 23070
7e723570 23071
7e723570 23072
7e723570 23073
7e723570
GM
23074
23075
23076
23077
23078
02bd7257 23079
02bd7257 23080
02bd7257 23081
02bd7257 23082
02bd7257 23083
02bd7257 23084
02bd7257 23085
dd0d840e
GM
23086
23087
23088
d3127c14 23089
dd0d840e 23090
dd0d840e 23091
5476a9a4
GM
23092 if test $gl_cv_have_include_next = yes; then
23093 gl_cv_next_unistd_h='<'unistd.h'>'
23094 else
23095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
23096$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
23097if test "${gl_cv_next_unistd_h+set}" = set; then :
23098 $as_echo_n "(cached) " >&6
23099else
dd0d840e 23100
5476a9a4 23101 if test $ac_cv_header_unistd_h = yes; then
dd0d840e 23102
dd0d840e 23103
5476a9a4 23104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23105/* end confdefs.h. */
5476a9a4 23106#include <unistd.h>
d3127c14 23107
5476a9a4
GM
23108_ACEOF
23109 case "$host_os" in
23110 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23111 *) gl_absname_cpp="$ac_cpp" ;;
23112 esac
d3127c14 23113
5476a9a4
GM
23114 case "$host_os" in
23115 mingw*)
23116 gl_dirsep_regex='[/\\]'
23117 ;;
23118 *)
23119 gl_dirsep_regex='\/'
23120 ;;
23121 esac
23122 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23123
23124 gl_header_literal_regex=`echo 'unistd.h' \
23125 | sed -e "$gl_make_literal_regex_sed"`
23126 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23127 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23128 s|^/[^/]|//&|
23129 p
23130 q
23131 }'
23132 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23133 sed -n "$gl_absolute_header_sed"`'"'
23134 else
23135 gl_cv_next_unistd_h='<'unistd.h'>'
23136 fi
d3127c14 23137
d3127c14 23138
c9ca3f76 23139fi
5476a9a4
GM
23140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
23141$as_echo "$gl_cv_next_unistd_h" >&6; }
23142 fi
23143 NEXT_UNISTD_H=$gl_cv_next_unistd_h
c9ca3f76 23144
5476a9a4
GM
23145 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23146 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23147 gl_next_as_first_directive='<'unistd.h'>'
23148 else
23149 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23150 gl_next_as_first_directive=$gl_cv_next_unistd_h
23151 fi
23152 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
c9ca3f76 23153
c9ca3f76 23154
c9ca3f76 23155
c9ca3f76 23156
5476a9a4
GM
23157 if test $ac_cv_header_unistd_h = yes; then
23158 HAVE_UNISTD_H=1
23159 else
23160 HAVE_UNISTD_H=0
23161 fi
c9ca3f76 23162
d3127c14 23163
dd0d840e 23164
dd0d840e 23165
d3127c14 23166
d3127c14 23167
dd0d840e
GM
23168
23169
c9ca3f76
GM
23170
23171
23172
23173
23174
c9ca3f76 23175
5476a9a4
GM
23176 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
23177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
23178$as_echo_n "checking whether futimesat handles NULL file... " >&6; }
23179if test "${gl_cv_func_futimesat_works+set}" = set; then :
23180 $as_echo_n "(cached) " >&6
23181else
23182 touch conftest.file
23183 if test "$cross_compiling" = yes; then :
23184 case "$host_os" in
23185 # Guess yes on glibc systems.
23186 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
23187 # If we don't know, assume the worst.
23188 *) gl_cv_func_futimesat_works="guessing no" ;;
23189 esac
c9ca3f76 23190
5476a9a4
GM
23191else
23192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
c9ca3f76
GM
23193/* end confdefs.h. */
23194
5476a9a4
GM
23195#include <stddef.h>
23196#include <sys/times.h>
23197#include <fcntl.h>
c9ca3f76
GM
23198
23199int
23200main ()
23201{
5476a9a4
GM
23202 int fd = open ("conftest.file", O_RDWR);
23203 if (fd < 0) return 1;
23204 if (futimesat (fd, NULL, NULL)) return 2;
c9ca3f76
GM
23205
23206 ;
23207 return 0;
23208}
23209_ACEOF
5476a9a4
GM
23210if ac_fn_c_try_run "$LINENO"; then :
23211 gl_cv_func_futimesat_works=yes
c9ca3f76 23212else
5476a9a4 23213 gl_cv_func_futimesat_works=no
c9ca3f76 23214fi
5476a9a4
GM
23215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23216 conftest.$ac_objext conftest.beam conftest.$ac_ext
c9ca3f76
GM
23217fi
23218
5476a9a4
GM
23219 rm -f conftest.file
23220fi
23221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
23222$as_echo "$gl_cv_func_futimesat_works" >&6; }
23223 case "$gl_cv_func_futimesat_works" in
23224 *yes) ;;
23225 *)
7e723570 23226
5476a9a4 23227$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
067d23c9 23228
5476a9a4
GM
23229 ;;
23230 esac
23231 fi
dd0d840e 23232
5476a9a4
GM
23233 gl_gnulib_enabled_dosname=false
23234 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
23235 gl_gnulib_enabled_pathmax=false
23236 gl_gnulib_enabled_stat=false
23237 gl_gnulib_enabled_strtoll=false
23238 gl_gnulib_enabled_strtoull=false
23239 gl_gnulib_enabled_verify=false
23240 func_gl_gnulib_m4code_dosname ()
23241 {
23242 if ! $gl_gnulib_enabled_dosname; then
23243 gl_gnulib_enabled_dosname=true
23244 fi
23245 }
23246 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
23247 {
23248 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
dd0d840e 23249
d3127c14 23250
5476a9a4
GM
23251 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
23252 fi
23253 }
23254 func_gl_gnulib_m4code_pathmax ()
23255 {
23256 if ! $gl_gnulib_enabled_pathmax; then
d3127c14
GM
23257
23258
23259
5476a9a4
GM
23260 gl_gnulib_enabled_pathmax=true
23261 fi
23262 }
23263 func_gl_gnulib_m4code_stat ()
23264 {
23265 if ! $gl_gnulib_enabled_stat; then
d3127c14 23266
d3127c14 23267
d3127c14 23268
5476a9a4
GM
23269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
23270$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
23271if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
23272 $as_echo_n "(cached) " >&6
23273else
23274 if test "$cross_compiling" = yes; then :
23275 case $host_os in
23276 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
23277 *) gl_cv_func_stat_dir_slash="guessing yes";;
23278 esac
23279else
23280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23281/* end confdefs.h. */
5476a9a4 23282#include <sys/stat.h>
d3127c14
GM
23283
23284int
23285main ()
23286{
5476a9a4 23287struct stat st; return stat (".", &st) != stat ("./", &st);
d3127c14
GM
23288 ;
23289 return 0;
23290}
23291_ACEOF
5476a9a4
GM
23292if ac_fn_c_try_run "$LINENO"; then :
23293 gl_cv_func_stat_dir_slash=yes
d3127c14 23294else
5476a9a4
GM
23295 gl_cv_func_stat_dir_slash=no
23296fi
23297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23298 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 23299fi
d3127c14 23300
5476a9a4
GM
23301fi
23302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
23303$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
23304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
23305$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
23306if test "${gl_cv_func_stat_file_slash+set}" = set; then :
23307 $as_echo_n "(cached) " >&6
23308else
23309 touch conftest.tmp
23310 # Assume that if we have lstat, we can also check symlinks.
23311 if test $ac_cv_func_lstat = yes; then
23312 ln -s conftest.tmp conftest.lnk
23313 fi
23314 if test "$cross_compiling" = yes; then :
23315 case "$host_os" in
23316 # Guess yes on glibc systems.
23317 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
23318 # If we don't know, assume the worst.
23319 *) gl_cv_func_stat_file_slash="guessing no" ;;
23320 esac
d3127c14 23321
5476a9a4
GM
23322else
23323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d3127c14 23324/* end confdefs.h. */
5476a9a4 23325#include <sys/stat.h>
d3127c14
GM
23326
23327int
23328main ()
23329{
5476a9a4
GM
23330int result = 0;
23331 struct stat st;
23332 if (!stat ("conftest.tmp/", &st))
23333 result |= 1;
23334#if HAVE_LSTAT
23335 if (!stat ("conftest.lnk/", &st))
23336 result |= 2;
23337#endif
23338 return result;
d3127c14
GM
23339
23340 ;
23341 return 0;
23342}
23343_ACEOF
5476a9a4
GM
23344if ac_fn_c_try_run "$LINENO"; then :
23345 gl_cv_func_stat_file_slash=yes
d3127c14 23346else
5476a9a4
GM
23347 gl_cv_func_stat_file_slash=no
23348fi
23349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23350 conftest.$ac_objext conftest.beam conftest.$ac_ext
d3127c14 23351fi
d3127c14 23352
5476a9a4
GM
23353 rm -f conftest.tmp conftest.lnk
23354fi
23355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
23356$as_echo "$gl_cv_func_stat_file_slash" >&6; }
23357 case $gl_cv_func_stat_dir_slash in
23358 *no) REPLACE_STAT=1
d3127c14 23359
5476a9a4
GM
23360$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
23361;;
23362 esac
23363 case $gl_cv_func_stat_file_slash in
23364 *no) REPLACE_STAT=1
d3127c14 23365
5476a9a4
GM
23366$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
23367;;
23368 esac
d3127c14 23369
5476a9a4 23370if test $REPLACE_STAT = 1; then
d3127c14 23371
dd0d840e 23372
dd0d840e 23373
dd0d840e 23374
dd0d840e 23375
dd0d840e 23376
067d23c9
KY
23377
23378
5476a9a4 23379 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9
KY
23380
23381
23382
5476a9a4 23383 :
067d23c9 23384
5476a9a4 23385fi
067d23c9 23386
dd0d840e
GM
23387
23388
dd0d840e 23389
dd0d840e 23390
5476a9a4 23391 GNULIB_STAT=1
dd0d840e 23392
067d23c9
KY
23393
23394
23395
23396
5476a9a4
GM
23397 gl_gnulib_enabled_stat=true
23398 if test $REPLACE_STAT = 1; then
23399 func_gl_gnulib_m4code_dosname
23400 fi
23401 if test $REPLACE_STAT = 1; then
23402 func_gl_gnulib_m4code_pathmax
23403 fi
23404 if test $REPLACE_STAT = 1; then
23405 func_gl_gnulib_m4code_verify
23406 fi
23407 fi
23408 }
23409 func_gl_gnulib_m4code_strtoll ()
23410 {
23411 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
23412
23413
23414
5476a9a4
GM
23415 if test "$ac_cv_type_long_long_int" = yes; then
23416 for ac_func in strtoll
23417do :
23418 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
23419if test "x$ac_cv_func_strtoll" = x""yes; then :
23420 cat >>confdefs.h <<_ACEOF
23421#define HAVE_STRTOLL 1
23422_ACEOF
067d23c9 23423
5476a9a4
GM
23424fi
23425done
067d23c9 23426
5476a9a4
GM
23427 if test $ac_cv_func_strtoll = no; then
23428 HAVE_STRTOLL=0
23429 fi
23430 fi
067d23c9 23431
5476a9a4 23432if test $HAVE_STRTOLL = 0; then
067d23c9
KY
23433
23434
23435
067d23c9
KY
23436
23437
23438
23439
23440
5476a9a4 23441 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
23442
23443
5476a9a4 23444 :
067d23c9 23445
5476a9a4 23446fi
067d23c9
KY
23447
23448
23449
067d23c9 23450
067d23c9 23451
5476a9a4 23452 GNULIB_STRTOLL=1
067d23c9 23453
397f7161 23454
067d23c9
KY
23455
23456
067d23c9 23457
5476a9a4
GM
23458 gl_gnulib_enabled_strtoll=true
23459 fi
23460 }
23461 func_gl_gnulib_m4code_strtoull ()
23462 {
23463 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 23464
067d23c9 23465
067d23c9 23466
5476a9a4
GM
23467 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
23468 for ac_func in strtoull
23469do :
23470 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
23471if test "x$ac_cv_func_strtoull" = x""yes; then :
23472 cat >>confdefs.h <<_ACEOF
23473#define HAVE_STRTOULL 1
23474_ACEOF
067d23c9 23475
f199cab1 23476fi
5476a9a4 23477done
067d23c9 23478
5476a9a4
GM
23479 if test $ac_cv_func_strtoull = no; then
23480 HAVE_STRTOULL=0
23481 fi
23482 fi
067d23c9 23483
5476a9a4 23484if test $HAVE_STRTOULL = 0; then
067d23c9
KY
23485
23486
067d23c9 23487
067d23c9 23488
067d23c9 23489
067d23c9 23490
067d23c9 23491
067d23c9 23492
5476a9a4 23493 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 23494
067d23c9 23495
5476a9a4 23496 :
067d23c9 23497
f199cab1 23498fi
067d23c9
KY
23499
23500
3e0be4ab 23501
3e0be4ab 23502
067d23c9 23503
5476a9a4 23504 GNULIB_STRTOULL=1
067d23c9 23505
a0a61e58 23506
067d23c9 23507
067d23c9
KY
23508
23509
5476a9a4
GM
23510 gl_gnulib_enabled_strtoull=true
23511 fi
23512 }
23513 func_gl_gnulib_m4code_verify ()
23514 {
23515 if ! $gl_gnulib_enabled_verify; then
23516 gl_gnulib_enabled_verify=true
23517 fi
23518 }
23519 if test $REPLACE_GETOPT = 1; then
23520 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
23521 fi
23522 if test $REPLACE_LSTAT = 1; then
23523 func_gl_gnulib_m4code_dosname
23524 fi
23525 if test $REPLACE_LSTAT = 1; then
23526 func_gl_gnulib_m4code_stat
23527 fi
23528 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
23529 func_gl_gnulib_m4code_stat
23530 fi
23531 if { test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; } && test $ac_cv_type_long_long_int = yes; then
23532 func_gl_gnulib_m4code_strtoll
23533 fi
23534 if test $HAVE_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
23535 func_gl_gnulib_m4code_verify
23536 fi
23537 if test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
23538 func_gl_gnulib_m4code_strtoull
23539 fi
23540 if test $ac_cv_func_strtoumax = no; then
23541 func_gl_gnulib_m4code_verify
23542 fi
067d23c9 23543
5476a9a4
GM
23544 if $gl_gnulib_enabled_dosname; then
23545 gl_GNULIB_ENABLED_dosname_TRUE=
23546 gl_GNULIB_ENABLED_dosname_FALSE='#'
23547else
23548 gl_GNULIB_ENABLED_dosname_TRUE='#'
23549 gl_GNULIB_ENABLED_dosname_FALSE=
23550fi
067d23c9 23551
5476a9a4
GM
23552 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
23553 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
23554 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
23555else
23556 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
23557 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
23558fi
067d23c9 23559
5476a9a4
GM
23560 if $gl_gnulib_enabled_pathmax; then
23561 gl_GNULIB_ENABLED_pathmax_TRUE=
23562 gl_GNULIB_ENABLED_pathmax_FALSE='#'
23563else
23564 gl_GNULIB_ENABLED_pathmax_TRUE='#'
23565 gl_GNULIB_ENABLED_pathmax_FALSE=
23566fi
067d23c9 23567
5476a9a4
GM
23568 if $gl_gnulib_enabled_stat; then
23569 gl_GNULIB_ENABLED_stat_TRUE=
23570 gl_GNULIB_ENABLED_stat_FALSE='#'
23571else
23572 gl_GNULIB_ENABLED_stat_TRUE='#'
23573 gl_GNULIB_ENABLED_stat_FALSE=
23574fi
067d23c9 23575
5476a9a4
GM
23576 if $gl_gnulib_enabled_strtoll; then
23577 gl_GNULIB_ENABLED_strtoll_TRUE=
23578 gl_GNULIB_ENABLED_strtoll_FALSE='#'
23579else
23580 gl_GNULIB_ENABLED_strtoll_TRUE='#'
23581 gl_GNULIB_ENABLED_strtoll_FALSE=
23582fi
067d23c9 23583
5476a9a4
GM
23584 if $gl_gnulib_enabled_strtoull; then
23585 gl_GNULIB_ENABLED_strtoull_TRUE=
23586 gl_GNULIB_ENABLED_strtoull_FALSE='#'
23587else
23588 gl_GNULIB_ENABLED_strtoull_TRUE='#'
23589 gl_GNULIB_ENABLED_strtoull_FALSE=
f199cab1 23590fi
067d23c9 23591
5476a9a4
GM
23592 if $gl_gnulib_enabled_verify; then
23593 gl_GNULIB_ENABLED_verify_TRUE=
23594 gl_GNULIB_ENABLED_verify_FALSE='#'
23595else
23596 gl_GNULIB_ENABLED_verify_TRUE='#'
23597 gl_GNULIB_ENABLED_verify_FALSE=
23598fi
067d23c9 23599
5476a9a4 23600 # End of code from modules
067d23c9 23601
067d23c9 23602
067d23c9 23603
067d23c9 23604
f199cab1 23605
f199cab1
GM
23606
23607
067d23c9 23608
5476a9a4
GM
23609
23610 gltests_libdeps=
23611 gltests_ltlibdeps=
067d23c9 23612
067d23c9 23613
067d23c9
KY
23614
23615
067d23c9
KY
23616
23617
3e0be4ab 23618
3e0be4ab 23619
3e0be4ab 23620
5476a9a4
GM
23621 gl_source_base='tests'
23622 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 23623
5476a9a4 23624 gl_module_indicator_condition=$gltests_WITNESS
3e0be4ab
GM
23625
23626
23627
23628
23629
067d23c9
KY
23630
23631
23632
3e0be4ab 23633
3e0be4ab 23634
5476a9a4
GM
23635 LIBGNU_LIBDEPS="$gl_libdeps"
23636
23637 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
23638
067d23c9 23639
5476a9a4
GM
23640CFLAGS=$SAVE_CFLAGS
23641LIBS=$SAVE_LIBS
067d23c9
KY
23642
23643case "$opsys" in
23644 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
23645
23646 darwin)
23647 ## The -headerpad option tells ld (see man page) to leave room at the
23648 ## end of the header for adding load commands. Needed for dumping.
23649 ## 0x690 is the total size of 30 segment load commands (at 56
23650 ## each); under Cocoa 31 commands are required.
23651 if test "$HAVE_NS" = "yes"; then
23652 libs_nsgui="-framework AppKit"
23653 headerpad_extra=6C8
23654 else
23655 libs_nsgui=
23656 headerpad_extra=690
23657 fi
85cf5029 23658 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
23659
23660 ## This is here because src/Makefile.in did some extra fiddling around
23661 ## with LD_SWITCH_SYSTEM. The cpp logic was:
23662 ## #ifndef LD_SWITCH_SYSTEM
23663 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
23664 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
42bbbe8b 23665 ## not using gcc, darwin.
067d23c9
KY
23666 ## Because this was done in src/Makefile.in, the resulting part of
23667 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
23668 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
23669 ## rather than LD_SWITCH_SYSTEM.
23670 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
23671 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
23672 ;;
23673
ae629dae
GM
23674 ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
23675 ## find X at run-time.
23676 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
23677 ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
067d23c9
KY
23678 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
23679 ## had different values in configure (in ac_link) and src/Makefile.in.
23680 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
ae629dae 23681 gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
067d23c9
KY
23682
23683 *) LD_SWITCH_SYSTEM_TEMACS= ;;
23684esac
23685
23686if test "$NS_IMPL_GNUSTEP" = "yes"; then
23687 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
23688fi
23689
23690
23691
23692
23693LD_FIRSTFLAG=
23694ORDINARY_LINK=
23695case "$opsys" in
23696 ## gnu: GNU needs its own crt0.
23697 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
23698
23699 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
23700 ## library search parth, i.e. it won't search /usr/lib for libc and
23701 ## friends. Using -nostartfiles instead avoids this problem, and
23702 ## will also work on earlier NetBSD releases.
23703 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
23704
42bbbe8b 23705 ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
067d23c9 23706 ## MkLinux/LinuxPPC needs this.
42bbbe8b 23707 ## s390x-* only supports opsys = gnu-linux so it can be added here.
067d23c9 23708 gnu-*)
42bbbe8b
GM
23709 case "$canonical" in
23710 powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
067d23c9
KY
23711 esac
23712 ;;
23713esac
23714
23715
23716if test "x$ORDINARY_LINK" = "xyes"; then
23717
23718 LD_FIRSTFLAG=""
23719
23720$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
23721
23722
23723## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
42bbbe8b 23724## freebsd, gnu-* not on powerpc*|s390x*.
067d23c9
KY
23725elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
23726
23727 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
23728 ## places that are difficult to figure out at make time. Fortunately,
23729 ## these same versions allow you to pass arbitrary flags on to the
23730 ## linker, so there is no reason not to use it as a linker.
23731 ##
23732 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
23733 ## searching for libraries in its internal directories, so we have to
23734 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
23735 LD_FIRSTFLAG="-nostdlib"
23736fi
23737
23738## FIXME? What setting of EDIT_LDFLAGS should this have?
23739test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
23740
23741
23742
23743
23744## FIXME? The logic here is not precisely the same as that above.
23745## There is no check here for a pre-defined LD_FIRSTFLAG.
23746## Should we only be setting LIB_GCC if LD ~ -nostdlib?
23747LIB_GCC=
23748if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
23749
23750 case "$opsys" in
23751 freebsd|netbsd|openbsd) LIB_GCC= ;;
23752
23753 gnu-*)
23754 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
23755 ## build on ARM EABI under GNU/Linux. (Bug#5518)
d6a003a8
AS
23756 case $host_cpu in
23757 arm*)
067d23c9 23758 LIB_GCC="-lgcc_s"
d6a003a8
AS
23759 ;;
23760 *)
067d23c9
KY
23761 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
23762 ## immediately undefine it again and redefine it to empty.
23763 ## Was the C_SWITCH_X_SITE part really necessary?
23764## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
23765 LIB_GCC=
d6a003a8
AS
23766 ;;
23767 esac
067d23c9
KY
23768 ;;
23769
23770 ## Ask GCC where to find libgcc.a.
23771 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
23772 esac
23773fi
23774
23775
067d23c9
KY
23776## If we're using X11/GNUstep, define some consequences.
23777if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
23778
23779$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
23780
23781
23782$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
23783
067d23c9
KY
23784fi
23785
23786
23787
23788
067d23c9
KY
23789#### Report on what we decided to do.
23790#### Report GTK as a toolkit, even if it doesn't use Xt.
23791#### It makes printing result more understandable as using GTK sets
23792#### toolkit_scroll_bars to yes by default.
23793if test "${HAVE_GTK}" = "yes"; then
5476a9a4
GM
23794 if test "${with_gtk3}" = "yes"; then
23795 USE_X_TOOLKIT=GTK3
23796 else
23797 USE_X_TOOLKIT=GTK
23798 fi
067d23c9
KY
23799fi
23800
23801echo "
23802Configured for \`${canonical}'.
23803
23804 Where should the build process find the source code? ${srcdir}
067d23c9
KY
23805 What compiler should emacs be built with? ${CC} ${CFLAGS}
23806 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
23807 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
23808 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
23809 What window system should Emacs use? ${window_system}
23810 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
23811
23812if test -n "${x_includes}"; then
23813echo " Where do we find X Windows header files? ${x_includes}"
23814else
23815echo " Where do we find X Windows header files? Standard dirs"
23816fi
23817if test -n "${x_libraries}"; then
23818echo " Where do we find X Windows libraries? ${x_libraries}"
23819else
23820echo " Where do we find X Windows libraries? Standard dirs"
23821fi
23822
23823echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23824echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23825echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23826echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
23827echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
23828echo " Does Emacs use -lpng? ${HAVE_PNG}"
23829echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
23830echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
23831
23832echo " Does Emacs use -lgpm? ${HAVE_GPM}"
23833echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
23834echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 23835echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
067d23c9 23836echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
27f5a136 23837echo " Does Emacs use -lgnutls? ${HAVE_GNUTLS}"
067d23c9
KY
23838echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
23839
23840echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
23841echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
23842echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
23843echo " Does Emacs use -lxft? ${HAVE_XFT}"
23844
23845echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23846echo
23847
eb39a72d
GM
23848if test -n "${EMACSDATA}"; then
23849 echo " Environment variable EMACSDATA set to: $EMACSDATA"
23850fi
23851if test -n "${EMACSDOC}"; then
23852 echo " Environment variable EMACSDOC set to: $EMACSDOC"
23853fi
23854
067d23c9
KY
23855echo
23856
23857if test "$HAVE_NS" = "yes"; then
23858 echo
3d0788a9 23859 echo "You must run \"${MAKE-make} install\" in order to test the built application.
067d23c9
KY
23860The installed application will go to nextstep/Emacs.app and can be
23861run or moved from there."
23862 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
23863 echo "The application will be fully self-contained."
23864 else
23865 echo "The lisp resources for the application will be installed under ${prefix}.
3d0788a9 23866You may need to run \"${MAKE-make} install\" with sudo. The application will fail
067d23c9
KY
23867to run if these resources are not installed."
23868 fi
23869 echo
23870fi
23871
031fabfc
GM
23872if test "${opsys}" = "cygwin"; then
23873 case `uname -r` in
23874 1.5.*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building Emacs on Cygwin 1.5 is not supported." >&5
23875$as_echo "$as_me: WARNING: building Emacs on Cygwin 1.5 is not supported." >&2;}
23876 echo
23877 ;;
23878 esac
23879fi
067d23c9
KY
23880
23881# Remove any trailing slashes in these variables.
23882test "${prefix}" != NONE &&
23883 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23884test "${exec_prefix}" != NONE &&
23885 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23886
56ade35c
GM
23887SUBDIR_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"
23888
23889ac_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"
23890
a877df06 23891
73b78882 23892opt_makefile=test/automated/Makefile
a877df06 23893
56ade35c 23894if test -f $srcdir/${opt_makefile}.in; then
73b78882 23895 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 23896 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 23897
56ade35c 23898fi
73b78882 23899
40b65096
GM
23900
23901opt_makefile=admin/unidata/Makefile
23902
23903if test -f $srcdir/${opt_makefile}.in; then
23904 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
23905 ac_config_files="$ac_config_files admin/unidata/Makefile"
23906
23907fi
23908
23909
56ade35c 23910SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 23911
067d23c9 23912
9411886d
PE
23913
23914ac_config_commands="$ac_config_commands mkdirs"
23915
23916
23917ac_config_commands="$ac_config_commands epaths"
23918
23919
23920ac_config_commands="$ac_config_commands gdbinit"
23921
067d23c9
KY
23922
23923cat >confcache <<\_ACEOF
23924# This file is a shell script that caches the results of configure
23925# tests run on this system so they can be shared between configure
23926# scripts and configure runs, see configure's option --config-cache.
23927# It is not useful on other systems. If it contains results you don't
23928# want to keep, you may remove or edit it.
23929#
23930# config.status only pays attention to the cache file if you give it
23931# the --recheck option to rerun configure.
23932#
23933# `ac_cv_env_foo' variables (set or unset) will be overridden when
23934# loading this file, other *unset* `ac_cv_foo' will be assigned the
23935# following values.
23936
23937_ACEOF
23938
23939# The following way of writing the cache mishandles newlines in values,
23940# but we know of no workaround that is simple, portable, and efficient.
23941# So, we kill variables containing newlines.
23942# Ultrix sh set writes to stderr and can't be redirected directly,
23943# and sets the high bit in the cache file unless we assign to the vars.
23944(
23945 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23946 eval ac_val=\$$ac_var
23947 case $ac_val in #(
23948 *${as_nl}*)
23949 case $ac_var in #(
23950 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
23951$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
23952 esac
23953 case $ac_var in #(
23954 _ | IFS | as_nl) ;; #(
23955 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
23956 *) { eval $ac_var=; unset $ac_var;} ;;
23957 esac ;;
23958 esac
23959 done
23960
23961 (set) 2>&1 |
23962 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23963 *${as_nl}ac_space=\ *)
23964 # `set' does not quote correctly, so add quotes: double-quote
23965 # substitution turns \\\\ into \\, and sed turns \\ into \.
23966 sed -n \
23967 "s/'/'\\\\''/g;
23968 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23969 ;; #(
23970 *)
23971 # `set' quotes correctly as required by POSIX, so do not add quotes.
23972 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
23973 ;;
23974 esac |
23975 sort
23976) |
23977 sed '
23978 /^ac_cv_env_/b end
23979 t clear
23980 :clear
23981 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23982 t end
23983 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23984 :end' >>confcache
23985if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23986 if test -w "$cache_file"; then
a9bec17c 23987 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
23988 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
23989$as_echo "$as_me: updating cache $cache_file" >&6;}
a9bec17c 23990 cat confcache >$cache_file
067d23c9
KY
23991 else
23992 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
23993$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
23994 fi
23995fi
23996rm -f confcache
23997
23998test "x$prefix" = xNONE && prefix=$ac_default_prefix
23999# Let make expand exec_prefix.
24000test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24001
24002DEFS=-DHAVE_CONFIG_H
24003
24004ac_libobjs=
24005ac_ltlibobjs=
24006for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24007 # 1. Remove the extension, and $U if already installed.
24008 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24009 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24010 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24011 # will be set to the directory where LIBOBJS objects are built.
24012 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24013 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24014done
24015LIBOBJS=$ac_libobjs
24016
24017LTLIBOBJS=$ac_ltlibobjs
24018
24019
743c80a7
PE
24020 if test -n "$EXEEXT"; then
24021 am__EXEEXT_TRUE=
24022 am__EXEEXT_FALSE='#'
24023else
24024 am__EXEEXT_TRUE='#'
24025 am__EXEEXT_FALSE=
24026fi
24027
24028if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
a9bec17c 24029 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
24030Usually this means the macro was only invoked conditionally." "$LINENO" 5
24031fi
24032if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
a9bec17c 24033 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
24034Usually this means the macro was only invoked conditionally." "$LINENO" 5
24035fi
743c80a7 24036if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
a9bec17c 24037 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
24038Usually this means the macro was only invoked conditionally." "$LINENO" 5
24039fi
4fc2b746 24040if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
a9bec17c 24041 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
4fc2b746
GM
24042Usually this means the macro was only invoked conditionally." "$LINENO" 5
24043fi
743c80a7 24044
4fda9c95 24045if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
a9bec17c 24046 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
4fda9c95
GM
24047Usually this means the macro was only invoked conditionally." "$LINENO" 5
24048fi
0eb775a3
GM
24049if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
24050 as_fn_error "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
24051Usually this means the macro was only invoked conditionally." "$LINENO" 5
24052fi
6d153f56 24053if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
a9bec17c 24054 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
6d153f56
GM
24055Usually this means the macro was only invoked conditionally." "$LINENO" 5
24056fi
6c051bab 24057if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
a9bec17c 24058 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
24059Usually this means the macro was only invoked conditionally." "$LINENO" 5
24060fi
24061if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
a9bec17c 24062 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
24063Usually this means the macro was only invoked conditionally." "$LINENO" 5
24064fi
6d153f56 24065if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
a9bec17c 24066 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
6d153f56
GM
24067Usually this means the macro was only invoked conditionally." "$LINENO" 5
24068fi
24069if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
a9bec17c 24070 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
6d153f56
GM
24071Usually this means the macro was only invoked conditionally." "$LINENO" 5
24072fi
a0a61e58
GM
24073if test -z "${gl_GNULIB_ENABLED_pathmax_TRUE}" && test -z "${gl_GNULIB_ENABLED_pathmax_FALSE}"; then
24074 as_fn_error "conditional \"gl_GNULIB_ENABLED_pathmax\" was never defined.
24075Usually this means the macro was only invoked conditionally." "$LINENO" 5
24076fi
6d153f56 24077if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
a9bec17c 24078 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
6d153f56
GM
24079Usually this means the macro was only invoked conditionally." "$LINENO" 5
24080fi
3e0be4ab 24081if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
a9bec17c 24082 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
3e0be4ab
GM
24083Usually this means the macro was only invoked conditionally." "$LINENO" 5
24084fi
6d153f56 24085if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
a9bec17c 24086 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
6d153f56
GM
24087Usually this means the macro was only invoked conditionally." "$LINENO" 5
24088fi
24089if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
a9bec17c 24090 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
6d153f56 24091Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 24092fi
942f733f 24093
743c80a7
PE
24094 gl_libobjs=
24095 gl_ltlibobjs=
24096 if test -n "$gl_LIBOBJS"; then
24097 # Remove the extension.
24098 sed_drop_objext='s/\.o$//;s/\.obj$//'
24099 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24100 gl_libobjs="$gl_libobjs $i.$ac_objext"
24101 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
24102 done
24103 fi
24104 gl_LIBOBJS=$gl_libobjs
24105
24106 gl_LTLIBOBJS=$gl_ltlibobjs
24107
24108
24109
24110 gltests_libobjs=
24111 gltests_ltlibobjs=
24112 if test -n "$gltests_LIBOBJS"; then
24113 # Remove the extension.
24114 sed_drop_objext='s/\.o$//;s/\.obj$//'
24115 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
24116 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
24117 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
24118 done
24119 fi
24120 gltests_LIBOBJS=$gltests_libobjs
24121
24122 gltests_LTLIBOBJS=$gltests_ltlibobjs
24123
067d23c9
KY
24124
24125
a9bec17c 24126: ${CONFIG_STATUS=./config.status}
067d23c9
KY
24127ac_write_fail=0
24128ac_clean_files_save=$ac_clean_files
24129ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24130{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24131$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24132as_write_fail=0
24133cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24134#! $SHELL
24135# Generated by $as_me.
24136# Run this file to recreate the current configuration.
24137# Compiler output produced by configure, useful for debugging
24138# configure, is in config.log if it exists.
24139
24140debug=false
24141ac_cs_recheck=false
24142ac_cs_silent=false
24143
24144SHELL=\${CONFIG_SHELL-$SHELL}
24145export SHELL
24146_ASEOF
24147cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24148## -------------------- ##
24149## M4sh Initialization. ##
24150## -------------------- ##
24151
24152# Be more Bourne compatible
24153DUALCASE=1; export DUALCASE # for MKS sh
24154if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24155 emulate sh
24156 NULLCMD=:
24157 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24158 # is contrary to our usage. Disable this feature.
24159 alias -g '${1+"$@"}'='"$@"'
24160 setopt NO_GLOB_SUBST
24161else
24162 case `(set -o) 2>/dev/null` in #(
24163 *posix*) :
24164 set -o posix ;; #(
24165 *) :
24166 ;;
24167esac
24168fi
24169
24170
24171as_nl='
24172'
24173export as_nl
24174# Printing a long string crashes Solaris 7 /usr/bin/printf.
24175as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24176as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24177as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24178# Prefer a ksh shell builtin over an external printf program on Solaris,
24179# but without wasting forks for bash or zsh.
24180if test -z "$BASH_VERSION$ZSH_VERSION" \
24181 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24182 as_echo='print -r --'
24183 as_echo_n='print -rn --'
24184elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24185 as_echo='printf %s\n'
24186 as_echo_n='printf %s'
24187else
24188 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24189 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24190 as_echo_n='/usr/ucb/echo -n'
24191 else
24192 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24193 as_echo_n_body='eval
24194 arg=$1;
24195 case $arg in #(
24196 *"$as_nl"*)
24197 expr "X$arg" : "X\\(.*\\)$as_nl";
24198 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24199 esac;
24200 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24201 '
24202 export as_echo_n_body
24203 as_echo_n='sh -c $as_echo_n_body as_echo'
24204 fi
24205 export as_echo_body
24206 as_echo='sh -c $as_echo_body as_echo'
24207fi
24208
24209# The user is always right.
24210if test "${PATH_SEPARATOR+set}" != set; then
24211 PATH_SEPARATOR=:
24212 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24213 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24214 PATH_SEPARATOR=';'
24215 }
24216fi
24217
24218
24219# IFS
24220# We need space, tab and new line, in precisely that order. Quoting is
24221# there to prevent editors from complaining about space-tab.
24222# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24223# splitting by setting IFS to empty value.)
24224IFS=" "" $as_nl"
24225
24226# Find who we are. Look in the path if we contain no directory separator.
24227case $0 in #((
24228 *[\\/]* ) as_myself=$0 ;;
24229 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24230for as_dir in $PATH
24231do
24232 IFS=$as_save_IFS
24233 test -z "$as_dir" && as_dir=.
24234 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24235 done
24236IFS=$as_save_IFS
24237
24238 ;;
24239esac
24240# We did not find ourselves, most probably we were run as `sh COMMAND'
24241# in which case we are not to be found in the path.
24242if test "x$as_myself" = x; then
24243 as_myself=$0
24244fi
24245if test ! -f "$as_myself"; then
24246 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24247 exit 1
24248fi
24249
24250# Unset variables that we do not need and which cause bugs (e.g. in
24251# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
24252# suppresses any "Segmentation fault" message there. '((' could
24253# trigger a bug in pdksh 5.2.14.
24254for as_var in BASH_ENV ENV MAIL MAILPATH
24255do eval test x\${$as_var+set} = xset \
24256 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24257done
24258PS1='$ '
24259PS2='> '
24260PS4='+ '
24261
24262# NLS nuisances.
24263LC_ALL=C
24264export LC_ALL
24265LANGUAGE=C
24266export LANGUAGE
24267
24268# CDPATH.
24269(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24270
24271
a9bec17c
GM
24272# as_fn_error ERROR [LINENO LOG_FD]
24273# ---------------------------------
067d23c9
KY
24274# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24275# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
a9bec17c 24276# script with status $?, using 1 if that was 0.
067d23c9
KY
24277as_fn_error ()
24278{
a9bec17c
GM
24279 as_status=$?; test $as_status -eq 0 && as_status=1
24280 if test "$3"; then
24281 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24282 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 24283 fi
a9bec17c 24284 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
24285 as_fn_exit $as_status
24286} # as_fn_error
24287
24288
24289# as_fn_set_status STATUS
24290# -----------------------
24291# Set $? to STATUS, without forking.
24292as_fn_set_status ()
24293{
24294 return $1
24295} # as_fn_set_status
24296
24297# as_fn_exit STATUS
24298# -----------------
24299# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24300as_fn_exit ()
24301{
24302 set +e
24303 as_fn_set_status $1
24304 exit $1
24305} # as_fn_exit
24306
24307# as_fn_unset VAR
24308# ---------------
24309# Portably unset VAR.
24310as_fn_unset ()
24311{
24312 { eval $1=; unset $1;}
24313}
24314as_unset=as_fn_unset
24315# as_fn_append VAR VALUE
24316# ----------------------
24317# Append the text in VALUE to the end of the definition contained in VAR. Take
24318# advantage of any shell optimizations that allow amortized linear growth over
24319# repeated appends, instead of the typical quadratic growth present in naive
24320# implementations.
24321if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
24322 eval 'as_fn_append ()
24323 {
24324 eval $1+=\$2
24325 }'
24326else
24327 as_fn_append ()
24328 {
24329 eval $1=\$$1\$2
24330 }
24331fi # as_fn_append
24332
24333# as_fn_arith ARG...
24334# ------------------
24335# Perform arithmetic evaluation on the ARGs, and store the result in the
24336# global $as_val. Take advantage of shells that can avoid forks. The arguments
24337# must be portable across $(()) and expr.
24338if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
24339 eval 'as_fn_arith ()
24340 {
24341 as_val=$(( $* ))
24342 }'
24343else
24344 as_fn_arith ()
24345 {
24346 as_val=`expr "$@" || test $? -eq 1`
24347 }
24348fi # as_fn_arith
24349
24350
24351if expr a : '\(a\)' >/dev/null 2>&1 &&
24352 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24353 as_expr=expr
24354else
24355 as_expr=false
24356fi
24357
24358if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24359 as_basename=basename
24360else
24361 as_basename=false
24362fi
24363
24364if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24365 as_dirname=dirname
24366else
24367 as_dirname=false
24368fi
24369
24370as_me=`$as_basename -- "$0" ||
24371$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24372 X"$0" : 'X\(//\)$' \| \
24373 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24374$as_echo X/"$0" |
24375 sed '/^.*\/\([^/][^/]*\)\/*$/{
24376 s//\1/
24377 q
24378 }
24379 /^X\/\(\/\/\)$/{
24380 s//\1/
24381 q
24382 }
24383 /^X\/\(\/\).*/{
24384 s//\1/
24385 q
24386 }
24387 s/.*/./; q'`
24388
24389# Avoid depending upon Character Ranges.
24390as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24391as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24392as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24393as_cr_digits='0123456789'
24394as_cr_alnum=$as_cr_Letters$as_cr_digits
24395
24396ECHO_C= ECHO_N= ECHO_T=
24397case `echo -n x` in #(((((
24398-n*)
24399 case `echo 'xy\c'` in
24400 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24401 xy) ECHO_C='\c';;
24402 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
24403 ECHO_T=' ';;
24404 esac;;
24405*)
24406 ECHO_N='-n';;
24407esac
24408
24409rm -f conf$$ conf$$.exe conf$$.file
24410if test -d conf$$.dir; then
24411 rm -f conf$$.dir/conf$$.file
24412else
24413 rm -f conf$$.dir
24414 mkdir conf$$.dir 2>/dev/null
24415fi
24416if (echo >conf$$.file) 2>/dev/null; then
24417 if ln -s conf$$.file conf$$ 2>/dev/null; then
24418 as_ln_s='ln -s'
24419 # ... but there are two gotchas:
24420 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24421 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24422 # In both cases, we have to default to `cp -p'.
24423 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24424 as_ln_s='cp -p'
24425 elif ln conf$$.file conf$$ 2>/dev/null; then
24426 as_ln_s=ln
24427 else
24428 as_ln_s='cp -p'
24429 fi
24430else
24431 as_ln_s='cp -p'
24432fi
24433rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24434rmdir conf$$.dir 2>/dev/null
24435
24436
24437# as_fn_mkdir_p
24438# -------------
24439# Create "$as_dir" as a directory, including parents if necessary.
24440as_fn_mkdir_p ()
24441{
24442
24443 case $as_dir in #(
24444 -*) as_dir=./$as_dir;;
24445 esac
24446 test -d "$as_dir" || eval $as_mkdir_p || {
24447 as_dirs=
24448 while :; do
24449 case $as_dir in #(
24450 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24451 *) as_qdir=$as_dir;;
24452 esac
24453 as_dirs="'$as_qdir' $as_dirs"
24454 as_dir=`$as_dirname -- "$as_dir" ||
24455$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24456 X"$as_dir" : 'X\(//\)[^/]' \| \
24457 X"$as_dir" : 'X\(//\)$' \| \
24458 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24459$as_echo X"$as_dir" |
24460 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24461 s//\1/
24462 q
24463 }
24464 /^X\(\/\/\)[^/].*/{
24465 s//\1/
24466 q
24467 }
24468 /^X\(\/\/\)$/{
24469 s//\1/
24470 q
24471 }
24472 /^X\(\/\).*/{
24473 s//\1/
24474 q
24475 }
24476 s/.*/./; q'`
24477 test -d "$as_dir" && break
24478 done
24479 test -z "$as_dirs" || eval "mkdir $as_dirs"
a9bec17c 24480 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
24481
24482
24483} # as_fn_mkdir_p
24484if mkdir -p . 2>/dev/null; then
24485 as_mkdir_p='mkdir -p "$as_dir"'
24486else
24487 test -d ./-p && rmdir ./-p
24488 as_mkdir_p=false
24489fi
24490
24491if test -x / >/dev/null 2>&1; then
24492 as_test_x='test -x'
24493else
24494 if ls -dL / >/dev/null 2>&1; then
24495 as_ls_L_option=L
24496 else
24497 as_ls_L_option=
24498 fi
24499 as_test_x='
24500 eval sh -c '\''
24501 if test -d "$1"; then
24502 test -d "$1/.";
24503 else
24504 case $1 in #(
24505 -*)set "./$1";;
24506 esac;
24507 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
24508 ???[sx]*):;;*)false;;esac;fi
24509 '\'' sh
24510 '
24511fi
24512as_executable_p=$as_test_x
24513
24514# Sed expression to map a string onto a valid CPP name.
24515as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24516
24517# Sed expression to map a string onto a valid variable name.
24518as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24519
24520
24521exec 6>&1
24522## ----------------------------------- ##
24523## Main body of $CONFIG_STATUS script. ##
24524## ----------------------------------- ##
24525_ASEOF
24526test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24527
24528cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24529# Save the log message, to keep $0 and so on meaningful, and to
24530# report actual input values of CONFIG_FILES etc. instead of their
24531# values after options handling.
24532ac_log="
67d34197 24533This file was extended by emacs $as_me 24.1.50, which was
a9bec17c 24534generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
24535
24536 CONFIG_FILES = $CONFIG_FILES
24537 CONFIG_HEADERS = $CONFIG_HEADERS
24538 CONFIG_LINKS = $CONFIG_LINKS
24539 CONFIG_COMMANDS = $CONFIG_COMMANDS
24540 $ $0 $@
24541
24542on `(hostname || uname -n) 2>/dev/null | sed 1q`
24543"
24544
24545_ACEOF
24546
24547case $ac_config_files in *"
24548"*) set x $ac_config_files; shift; ac_config_files=$*;;
24549esac
24550
24551case $ac_config_headers in *"
24552"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24553esac
24554
24555
24556cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24557# Files that config.status was made for.
24558config_files="$ac_config_files"
24559config_headers="$ac_config_headers"
24560config_commands="$ac_config_commands"
24561
24562_ACEOF
24563
24564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24565ac_cs_usage="\
24566\`$as_me' instantiates files and other configuration actions
24567from templates according to the current configuration. Unless the files
24568and actions are specified as TAGs, all are instantiated by default.
24569
24570Usage: $0 [OPTION]... [TAG]...
24571
24572 -h, --help print this help, then exit
24573 -V, --version print version number and configuration settings, then exit
24574 --config print configuration, then exit
24575 -q, --quiet, --silent
24576 do not print progress messages
24577 -d, --debug don't remove temporary files
24578 --recheck update $as_me by reconfiguring in the same conditions
24579 --file=FILE[:TEMPLATE]
24580 instantiate the configuration file FILE
24581 --header=FILE[:TEMPLATE]
24582 instantiate the configuration header FILE
24583
24584Configuration files:
24585$config_files
24586
24587Configuration headers:
24588$config_headers
24589
24590Configuration commands:
24591$config_commands
24592
24593Report bugs to the package provider."
24594
24595_ACEOF
24596cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24597ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
24598ac_cs_version="\\
67d34197 24599emacs config.status 24.1.50
a9bec17c 24600configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
24601 with options \\"\$ac_cs_config\\"
24602
a9bec17c 24603Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
24604This config.status script is free software; the Free Software Foundation
24605gives unlimited permission to copy, distribute and modify it."
24606
24607ac_pwd='$ac_pwd'
24608srcdir='$srcdir'
24609INSTALL='$INSTALL'
743c80a7
PE
24610MKDIR_P='$MKDIR_P'
24611AWK='$AWK'
067d23c9
KY
24612test -n "\$AWK" || AWK=awk
24613_ACEOF
24614
24615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24616# The default lists apply if the user does not specify any file.
24617ac_need_defaults=:
24618while test $# != 0
24619do
24620 case $1 in
a9bec17c 24621 --*=*)
067d23c9
KY
24622 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24623 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24624 ac_shift=:
24625 ;;
24626 *)
24627 ac_option=$1
24628 ac_optarg=$2
24629 ac_shift=shift
24630 ;;
24631 esac
24632
24633 case $ac_option in
24634 # Handling of the options.
24635 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24636 ac_cs_recheck=: ;;
24637 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24638 $as_echo "$ac_cs_version"; exit ;;
24639 --config | --confi | --conf | --con | --co | --c )
24640 $as_echo "$ac_cs_config"; exit ;;
24641 --debug | --debu | --deb | --de | --d | -d )
24642 debug=: ;;
24643 --file | --fil | --fi | --f )
24644 $ac_shift
24645 case $ac_optarg in
24646 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24647 esac
24648 as_fn_append CONFIG_FILES " '$ac_optarg'"
24649 ac_need_defaults=false;;
24650 --header | --heade | --head | --hea )
24651 $ac_shift
24652 case $ac_optarg in
24653 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24654 esac
24655 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24656 ac_need_defaults=false;;
24657 --he | --h)
24658 # Conflict between --help and --header
a9bec17c 24659 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
24660Try \`$0 --help' for more information.";;
24661 --help | --hel | -h )
24662 $as_echo "$ac_cs_usage"; exit ;;
24663 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24664 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24665 ac_cs_silent=: ;;
24666
24667 # This is an error.
a9bec17c 24668 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
24669Try \`$0 --help' for more information." ;;
24670
24671 *) as_fn_append ac_config_targets " $1"
24672 ac_need_defaults=false ;;
24673
24674 esac
24675 shift
24676done
24677
24678ac_configure_extra_args=
24679
24680if $ac_cs_silent; then
24681 exec 6>/dev/null
24682 ac_configure_extra_args="$ac_configure_extra_args --silent"
24683fi
24684
24685_ACEOF
24686cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24687if \$ac_cs_recheck; then
24688 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
24689 shift
24690 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
24691 CONFIG_SHELL='$SHELL'
24692 export CONFIG_SHELL
24693 exec "\$@"
24694fi
24695
24696_ACEOF
24697cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24698exec 5>>config.log
24699{
24700 echo
24701 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24702## Running $as_me. ##
24703_ASBOX
24704 $as_echo "$ac_log"
24705} >&5
24706
24707_ACEOF
24708cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24709#
24710# INIT-COMMANDS
24711#
743c80a7 24712AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
5ec54608 24713GCC="$GCC" CPPFLAGS="$CPPFLAGS"
067d23c9
KY
24714
24715_ACEOF
24716
24717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24718
24719# Handling of arguments.
24720for ac_config_target in $ac_config_targets
24721do
24722 case $ac_config_target in
24723 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 24724 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
067d23c9 24725 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 24726 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
24727 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
24728 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
24729 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24730 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24731 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24732 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
24733 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
24734 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
24735 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
24736 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24737 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
40b65096 24738 "admin/unidata/Makefile") CONFIG_FILES="$CONFIG_FILES admin/unidata/Makefile" ;;
9411886d
PE
24739 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
24740 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
24741 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 24742
a9bec17c 24743 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
24744 esac
24745done
24746
24747
24748# If the user did not use the arguments to specify the items to instantiate,
24749# then the envvar interface is used. Set only those that are not.
24750# We use the long form for the default assignment because of an extremely
24751# bizarre bug on SunOS 4.1.3.
24752if $ac_need_defaults; then
24753 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24754 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24755 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24756fi
24757
24758# Have a temporary directory for convenience. Make it in the build tree
24759# simply because there is no reason against having it here, and in addition,
24760# creating and moving files from /tmp can sometimes cause problems.
24761# Hook for its removal unless debugging.
24762# Note that there is a small window in which the directory will not be cleaned:
24763# after its creation but before its name has been assigned to `$tmp'.
24764$debug ||
24765{
a9bec17c 24766 tmp=
067d23c9 24767 trap 'exit_status=$?
a9bec17c 24768 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
24769' 0
24770 trap 'as_fn_exit 1' 1 2 13 15
24771}
24772# Create a (secure) tmp directory for tmp files.
24773
24774{
24775 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
a9bec17c 24776 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
24777} ||
24778{
24779 tmp=./conf$$-$RANDOM
24780 (umask 077 && mkdir "$tmp")
a9bec17c 24781} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
24782
24783# Set up the scripts for CONFIG_FILES section.
24784# No need to generate them if there are no CONFIG_FILES.
24785# This happens for instance with `./config.status config.h'.
24786if test -n "$CONFIG_FILES"; then
24787
24788if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
24789 ac_cs_awk_getline=:
24790 ac_cs_awk_pipe_init=
24791 ac_cs_awk_read_file='
24792 while ((getline aline < (F[key])) > 0)
24793 print(aline)
24794 close(F[key])'
24795 ac_cs_awk_pipe_fini=
24796else
24797 ac_cs_awk_getline=false
24798 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
24799 ac_cs_awk_read_file='
24800 print "|#_!!_#|"
24801 print "cat " F[key] " &&"
24802 '$ac_cs_awk_pipe_init
24803 # The final `:' finishes the AND list.
24804 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
24805fi
24806ac_cr=`echo X | tr X '\015'`
24807# On cygwin, bash can eat \r inside `` if the user requested igncr.
24808# But we know of no other shell where ac_cr would be empty at this
24809# point, so we can use a bashism as a fallback.
24810if test "x$ac_cr" = x; then
24811 eval ac_cr=\$\'\\r\'
24812fi
24813ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
24814if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
a9bec17c 24815 ac_cs_awk_cr='\r'
067d23c9
KY
24816else
24817 ac_cs_awk_cr=$ac_cr
24818fi
24819
a9bec17c 24820echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
24821_ACEOF
24822
24823# Create commands to substitute file output variables.
24824{
24825 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
a9bec17c 24826 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
24827 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
24828 echo "_ACAWK" &&
24829 echo "_ACEOF"
24830} >conf$$files.sh &&
24831. ./conf$$files.sh ||
a9bec17c 24832 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
24833rm -f conf$$files.sh
24834
24835{
24836 echo "cat >conf$$subs.awk <<_ACEOF" &&
24837 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
24838 echo "_ACEOF"
24839} >conf$$subs.sh ||
a9bec17c
GM
24840 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
24841ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
24842ac_delim='%!_!# '
24843for ac_last_try in false false false false false :; do
24844 . ./conf$$subs.sh ||
a9bec17c 24845 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
24846
24847 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
24848 if test $ac_delim_n = $ac_delim_num; then
24849 break
24850 elif $ac_last_try; then
a9bec17c 24851 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
24852 else
24853 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24854 fi
24855done
24856rm -f conf$$subs.sh
24857
24858cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
a9bec17c 24859cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
24860_ACEOF
24861sed -n '
24862h
24863s/^/S["/; s/!.*/"]=/
24864p
24865g
24866s/^[^!]*!//
24867:repl
24868t repl
24869s/'"$ac_delim"'$//
24870t delim
24871:nl
24872h
24873s/\(.\{148\}\)..*/\1/
24874t more1
24875s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
24876p
24877n
24878b repl
24879:more1
24880s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24881p
24882g
24883s/.\{148\}//
24884t nl
24885:delim
24886h
24887s/\(.\{148\}\)..*/\1/
24888t more2
24889s/["\\]/\\&/g; s/^/"/; s/$/"/
24890p
24891b
24892:more2
24893s/["\\]/\\&/g; s/^/"/; s/$/"\\/
24894p
24895g
24896s/.\{148\}//
24897t delim
24898' <conf$$subs.awk | sed '
24899/^[^""]/{
24900 N
24901 s/\n//
24902}
24903' >>$CONFIG_STATUS || ac_write_fail=1
24904rm -f conf$$subs.awk
24905cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24906_ACAWK
a9bec17c 24907cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
24908 for (key in S) S_is_set[key] = 1
24909 FS = "\a"
24910 \$ac_cs_awk_pipe_init
24911}
24912{
24913 line = $ 0
24914 nfields = split(line, field, "@")
24915 substed = 0
24916 len = length(field[1])
24917 for (i = 2; i < nfields; i++) {
24918 key = field[i]
24919 keylen = length(key)
24920 if (S_is_set[key]) {
24921 value = S[key]
24922 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
24923 len += length(value) + length(field[++i])
24924 substed = 1
24925 } else
24926 len += 1 + keylen
24927 }
24928 if (nfields == 3 && !substed) {
24929 key = field[2]
24930 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
24931 \$ac_cs_awk_read_file
24932 next
24933 }
24934 }
24935 print line
24936}
24937\$ac_cs_awk_pipe_fini
24938_ACAWK
24939_ACEOF
24940cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24941if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
24942 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
24943else
24944 cat
a9bec17c
GM
24945fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
24946 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
24947_ACEOF
24948
a9bec17c
GM
24949# VPATH may cause trouble with some makes, so we remove $(srcdir),
24950# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
24951# trailing colons and then remove the whole line if VPATH becomes empty
24952# (actually we leave an empty line to preserve line numbers).
24953if test "x$srcdir" = x.; then
a9bec17c
GM
24954 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24955s/:*\$(srcdir):*/:/
24956s/:*\${srcdir}:*/:/
24957s/:*@srcdir@:*/:/
24958s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
24959s/:*$//
24960s/^[^=]*=[ ]*$//
24961}'
24962fi
24963
24964cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24965fi # test -n "$CONFIG_FILES"
24966
24967# Set up the scripts for CONFIG_HEADERS section.
24968# No need to generate them if there are no CONFIG_HEADERS.
24969# This happens for instance with `./config.status Makefile'.
24970if test -n "$CONFIG_HEADERS"; then
a9bec17c 24971cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
24972BEGIN {
24973_ACEOF
24974
24975# Transform confdefs.h into an awk script `defines.awk', embedded as
24976# here-document in config.status, that substitutes the proper values into
24977# config.h.in to produce config.h.
24978
24979# Create a delimiter string that does not exist in confdefs.h, to ease
24980# handling of long lines.
24981ac_delim='%!_!# '
24982for ac_last_try in false false :; do
a9bec17c
GM
24983 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
24984 if test -z "$ac_t"; then
067d23c9
KY
24985 break
24986 elif $ac_last_try; then
a9bec17c 24987 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
24988 else
24989 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24990 fi
24991done
24992
24993# For the awk script, D is an array of macro values keyed by name,
24994# likewise P contains macro parameters if any. Preserve backslash
24995# newline sequences.
24996
24997ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24998sed -n '
24999s/.\{148\}/&'"$ac_delim"'/g
25000t rset
25001:rset
25002s/^[ ]*#[ ]*define[ ][ ]*/ /
25003t def
25004d
25005:def
25006s/\\$//
25007t bsnl
25008s/["\\]/\\&/g
25009s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25010D["\1"]=" \3"/p
25011s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25012d
25013:bsnl
25014s/["\\]/\\&/g
25015s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25016D["\1"]=" \3\\\\\\n"\\/p
25017t cont
25018s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25019t cont
25020d
25021:cont
25022n
25023s/.\{148\}/&'"$ac_delim"'/g
25024t clear
25025:clear
25026s/\\$//
25027t bsnlc
25028s/["\\]/\\&/g; s/^/"/; s/$/"/p
25029d
25030:bsnlc
25031s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25032b cont
25033' <confdefs.h | sed '
25034s/'"$ac_delim"'/"\\\
25035"/g' >>$CONFIG_STATUS || ac_write_fail=1
25036
25037cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25038 for (key in D) D_is_set[key] = 1
25039 FS = "\a"
25040}
25041/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25042 line = \$ 0
25043 split(line, arg, " ")
25044 if (arg[1] == "#") {
25045 defundef = arg[2]
25046 mac1 = arg[3]
25047 } else {
25048 defundef = substr(arg[1], 2)
25049 mac1 = arg[2]
25050 }
25051 split(mac1, mac2, "(") #)
25052 macro = mac2[1]
25053 prefix = substr(line, 1, index(line, defundef) - 1)
25054 if (D_is_set[macro]) {
25055 # Preserve the white space surrounding the "#".
25056 print prefix "define", macro P[macro] D[macro]
25057 next
25058 } else {
25059 # Replace #undef with comments. This is necessary, for example,
25060 # in the case of _POSIX_SOURCE, which is predefined and required
25061 # on some systems where configure will not decide to define it.
25062 if (defundef == "undef") {
25063 print "/*", prefix defundef, macro, "*/"
25064 next
25065 }
25066 }
25067}
25068{ print }
25069_ACAWK
25070_ACEOF
25071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
a9bec17c 25072 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
25073fi # test -n "$CONFIG_HEADERS"
25074
25075
25076eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
25077shift
25078for ac_tag
25079do
25080 case $ac_tag in
25081 :[FHLC]) ac_mode=$ac_tag; continue;;
25082 esac
25083 case $ac_mode$ac_tag in
25084 :[FHL]*:*);;
a9bec17c 25085 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
25086 :[FH]-) ac_tag=-:-;;
25087 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25088 esac
25089 ac_save_IFS=$IFS
25090 IFS=:
25091 set x $ac_tag
25092 IFS=$ac_save_IFS
25093 shift
25094 ac_file=$1
25095 shift
25096
25097 case $ac_mode in
25098 :L) ac_source=$1;;
25099 :[FH])
25100 ac_file_inputs=
25101 for ac_f
25102 do
25103 case $ac_f in
a9bec17c 25104 -) ac_f="$tmp/stdin";;
067d23c9
KY
25105 *) # Look for the file first in the build tree, then in the source tree
25106 # (if the path is not absolute). The absolute path cannot be DOS-style,
25107 # because $ac_f cannot contain `:'.
25108 test -f "$ac_f" ||
25109 case $ac_f in
25110 [\\/$]*) false;;
25111 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25112 esac ||
a9bec17c 25113 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
25114 esac
25115 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25116 as_fn_append ac_file_inputs " '$ac_f'"
25117 done
25118
25119 # Let's still pretend it is `configure' which instantiates (i.e., don't
25120 # use $as_me), people would be surprised to read:
25121 # /* config.h. Generated by config.status. */
25122 configure_input='Generated from '`
25123 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25124 `' by configure.'
25125 if test x"$ac_file" != x-; then
25126 configure_input="$ac_file. $configure_input"
25127 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25128$as_echo "$as_me: creating $ac_file" >&6;}
25129 fi
25130 # Neutralize special characters interpreted by sed in replacement strings.
25131 case $configure_input in #(
25132 *\&* | *\|* | *\\* )
25133 ac_sed_conf_input=`$as_echo "$configure_input" |
25134 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25135 *) ac_sed_conf_input=$configure_input;;
25136 esac
25137
25138 case $ac_tag in
a9bec17c
GM
25139 *:-:* | *:-) cat >"$tmp/stdin" \
25140 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
25141 esac
25142 ;;
25143 esac
25144
25145 ac_dir=`$as_dirname -- "$ac_file" ||
25146$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25147 X"$ac_file" : 'X\(//\)[^/]' \| \
25148 X"$ac_file" : 'X\(//\)$' \| \
25149 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25150$as_echo X"$ac_file" |
25151 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25152 s//\1/
25153 q
25154 }
25155 /^X\(\/\/\)[^/].*/{
25156 s//\1/
25157 q
25158 }
25159 /^X\(\/\/\)$/{
25160 s//\1/
25161 q
25162 }
25163 /^X\(\/\).*/{
25164 s//\1/
25165 q
25166 }
25167 s/.*/./; q'`
25168 as_dir="$ac_dir"; as_fn_mkdir_p
25169 ac_builddir=.
25170
25171case "$ac_dir" in
25172.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25173*)
25174 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25175 # A ".." for each directory in $ac_dir_suffix.
25176 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25177 case $ac_top_builddir_sub in
25178 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25179 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25180 esac ;;
25181esac
25182ac_abs_top_builddir=$ac_pwd
25183ac_abs_builddir=$ac_pwd$ac_dir_suffix
25184# for backward compatibility:
25185ac_top_builddir=$ac_top_build_prefix
25186
25187case $srcdir in
25188 .) # We are building in place.
25189 ac_srcdir=.
25190 ac_top_srcdir=$ac_top_builddir_sub
25191 ac_abs_top_srcdir=$ac_pwd ;;
25192 [\\/]* | ?:[\\/]* ) # Absolute name.
25193 ac_srcdir=$srcdir$ac_dir_suffix;
25194 ac_top_srcdir=$srcdir
25195 ac_abs_top_srcdir=$srcdir ;;
25196 *) # Relative name.
25197 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25198 ac_top_srcdir=$ac_top_build_prefix$srcdir
25199 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25200esac
25201ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25202
25203
25204 case $ac_mode in
25205 :F)
25206 #
25207 # CONFIG_FILE
25208 #
25209
25210 case $INSTALL in
25211 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25212 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25213 esac
743c80a7
PE
25214 ac_MKDIR_P=$MKDIR_P
25215 case $MKDIR_P in
25216 [\\/$]* | ?:[\\/]* ) ;;
25217 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
25218 esac
067d23c9
KY
25219_ACEOF
25220
25221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25222# If the template does not know about datarootdir, expand it.
25223# FIXME: This hack should be removed a few years after 2.60.
25224ac_datarootdir_hack=; ac_datarootdir_seen=
25225ac_sed_dataroot='
25226/datarootdir/ {
25227 p
25228 q
25229}
25230/@datadir@/p
25231/@docdir@/p
25232/@infodir@/p
25233/@localedir@/p
25234/@mandir@/p'
25235case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25236*datarootdir*) ac_datarootdir_seen=yes;;
25237*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25238 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25239$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25240_ACEOF
25241cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25242 ac_datarootdir_hack='
25243 s&@datadir@&$datadir&g
25244 s&@docdir@&$docdir&g
25245 s&@infodir@&$infodir&g
25246 s&@localedir@&$localedir&g
25247 s&@mandir@&$mandir&g
25248 s&\\\${datarootdir}&$datarootdir&g' ;;
25249esac
25250_ACEOF
25251
25252# Neutralize VPATH when `$srcdir' = `.'.
25253# Shell code in configure.ac might set extrasub.
25254# FIXME: do we really want to maintain this feature?
25255cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25256ac_sed_extra="$ac_vpsub
25257$extrasub
25258_ACEOF
25259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25260:t
25261/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25262s|@configure_input@|$ac_sed_conf_input|;t t
25263s&@top_builddir@&$ac_top_builddir_sub&;t t
25264s&@top_build_prefix@&$ac_top_build_prefix&;t t
25265s&@srcdir@&$ac_srcdir&;t t
25266s&@abs_srcdir@&$ac_abs_srcdir&;t t
25267s&@top_srcdir@&$ac_top_srcdir&;t t
25268s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25269s&@builddir@&$ac_builddir&;t t
25270s&@abs_builddir@&$ac_abs_builddir&;t t
25271s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25272s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 25273s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
25274$ac_datarootdir_hack
25275"
25276eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
25277if $ac_cs_awk_getline; then
a9bec17c 25278 $AWK -f "$tmp/subs.awk"
067d23c9 25279else
a9bec17c
GM
25280 $AWK -f "$tmp/subs.awk" | $SHELL
25281fi >$tmp/out \
25282 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25283
25284test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
a9bec17c
GM
25285 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25286 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 25287 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 25288which seems to be undefined. Please make sure it is defined." >&5
067d23c9 25289$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
a9bec17c 25290which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 25291
a9bec17c 25292 rm -f "$tmp/stdin"
067d23c9 25293 case $ac_file in
a9bec17c
GM
25294 -) cat "$tmp/out" && rm -f "$tmp/out";;
25295 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 25296 esac \
a9bec17c 25297 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25298 ;;
25299 :H)
25300 #
25301 # CONFIG_HEADER
25302 #
25303 if test x"$ac_file" != x-; then
25304 {
25305 $as_echo "/* $configure_input */" \
a9bec17c
GM
25306 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
25307 } >"$tmp/config.h" \
25308 || as_fn_error "could not create $ac_file" "$LINENO" 5
25309 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
25310 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25311$as_echo "$as_me: $ac_file is unchanged" >&6;}
25312 else
25313 rm -f "$ac_file"
a9bec17c
GM
25314 mv "$tmp/config.h" "$ac_file" \
25315 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
25316 fi
25317 else
25318 $as_echo "/* $configure_input */" \
a9bec17c
GM
25319 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
25320 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 25321 fi
743c80a7
PE
25322# Compute "$ac_file"'s index in $config_headers.
25323_am_arg="$ac_file"
25324_am_stamp_count=1
25325for _am_header in $config_headers :; do
25326 case $_am_header in
25327 $_am_arg | $_am_arg:* )
25328 break ;;
25329 * )
25330 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
25331 esac
25332done
25333echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
25334$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25335 X"$_am_arg" : 'X\(//\)[^/]' \| \
25336 X"$_am_arg" : 'X\(//\)$' \| \
25337 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
25338$as_echo X"$_am_arg" |
25339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25340 s//\1/
25341 q
25342 }
25343 /^X\(\/\/\)[^/].*/{
25344 s//\1/
25345 q
25346 }
25347 /^X\(\/\/\)$/{
25348 s//\1/
25349 q
25350 }
25351 /^X\(\/\).*/{
25352 s//\1/
25353 q
25354 }
25355 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
25356 ;;
25357
25358 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25359$as_echo "$as_me: executing $ac_file commands" >&6;}
25360 ;;
25361 esac
25362
25363
25364 case $ac_file$ac_mode in
743c80a7
PE
25365 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
25366 # Autoconf 2.62 quotes --file arguments for eval, but not when files
25367 # are listed without --file. Let's play safe and only enable the eval
25368 # if we detect the quoting.
25369 case $CONFIG_FILES in
25370 *\'*) eval set x "$CONFIG_FILES" ;;
25371 *) set x $CONFIG_FILES ;;
25372 esac
25373 shift
25374 for mf
25375 do
25376 # Strip MF so we end up with the name of the file.
25377 mf=`echo "$mf" | sed -e 's/:.*$//'`
25378 # Check whether this is an Automake generated Makefile or not.
25379 # We used to match only the files named `Makefile.in', but
25380 # some people rename them; so instead we look at the file content.
25381 # Grep'ing the first line is not enough: some people post-process
25382 # each Makefile.in and add a new line on top of each file to say so.
25383 # Grep'ing the whole file is not good either: AIX grep has a line
25384 # limit of 2048, but all sed's we know have understand at least 4000.
25385 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
25386 dirpart=`$as_dirname -- "$mf" ||
25387$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25388 X"$mf" : 'X\(//\)[^/]' \| \
25389 X"$mf" : 'X\(//\)$' \| \
25390 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
25391$as_echo X"$mf" |
25392 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25393 s//\1/
25394 q
25395 }
25396 /^X\(\/\/\)[^/].*/{
25397 s//\1/
25398 q
25399 }
25400 /^X\(\/\/\)$/{
25401 s//\1/
25402 q
25403 }
25404 /^X\(\/\).*/{
25405 s//\1/
25406 q
25407 }
25408 s/.*/./; q'`
25409 else
25410 continue
25411 fi
25412 # Extract the definition of DEPDIR, am__include, and am__quote
25413 # from the Makefile without running `make'.
25414 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
25415 test -z "$DEPDIR" && continue
25416 am__include=`sed -n 's/^am__include = //p' < "$mf"`
25417 test -z "am__include" && continue
25418 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
25419 # When using ansi2knr, U may be empty or an underscore; expand it
25420 U=`sed -n 's/^U = //p' < "$mf"`
25421 # Find all dependency output files, they are included files with
25422 # $(DEPDIR) in their names. We invoke sed twice because it is the
25423 # simplest approach to changing $(DEPDIR) to its actual value in the
25424 # expansion.
25425 for file in `sed -n "
25426 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
25427 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
25428 # Make sure the directory exists.
25429 test -f "$dirpart/$file" && continue
25430 fdir=`$as_dirname -- "$file" ||
25431$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25432 X"$file" : 'X\(//\)[^/]' \| \
25433 X"$file" : 'X\(//\)$' \| \
25434 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
25435$as_echo X"$file" |
25436 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25437 s//\1/
25438 q
25439 }
25440 /^X\(\/\/\)[^/].*/{
25441 s//\1/
25442 q
25443 }
25444 /^X\(\/\/\)$/{
25445 s//\1/
25446 q
25447 }
25448 /^X\(\/\).*/{
25449 s//\1/
25450 q
25451 }
25452 s/.*/./; q'`
25453 as_dir=$dirpart/$fdir; as_fn_mkdir_p
25454 # echo "creating $dirpart/$file"
25455 echo '# dummy' > "$dirpart/$file"
25456 done
25457 done
25458}
25459 ;;
9411886d 25460 "mkdirs":C)
067d23c9
KY
25461for dir in etc lisp ; do
25462 test -d ${dir} || mkdir ${dir}
25463done
9411886d
PE
25464 ;;
25465 "epaths":C)
067d23c9 25466echo creating src/epaths.h
906debc3 25467${MAKE-make} MAKEFILE_NAME=do-not-make-Makefile epaths-force
9411886d
PE
25468 ;;
25469 "gdbinit":C)
067d23c9
KY
25470if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
25471 echo creating src/.gdbinit
25472 echo source $srcdir/src/.gdbinit > src/.gdbinit
25473fi
067d23c9
KY
25474 ;;
25475
25476 esac
25477done # for ac_tag
25478
25479
25480as_fn_exit 0
25481_ACEOF
25482ac_clean_files=$ac_clean_files_save
25483
25484test $ac_write_fail = 0 ||
a9bec17c 25485 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
25486
25487
25488# configure is writing to config.log, and then calls config.status.
25489# config.status does its own redirection, appending to config.log.
25490# Unfortunately, on DOS this fails, as config.log is still kept open
25491# by configure, so config.status won't be able to write to it; its
25492# output is simply discarded. So we exec the FD to /dev/null,
25493# effectively closing config.log, so it can be properly (re)opened and
25494# appended to by config.status. When coming back to configure, we
25495# need to make the FD available again.
25496if test "$no_create" != yes; then
25497 ac_cs_success=:
25498 ac_config_status_args=
25499 test "$silent" = yes &&
25500 ac_config_status_args="$ac_config_status_args --quiet"
25501 exec 5>/dev/null
25502 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
25503 exec 5>>config.log
25504 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25505 # would make configure fail if this is the last instruction.
a9bec17c 25506 $ac_cs_success || as_fn_exit $?
067d23c9
KY
25507fi
25508if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
25509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
25510$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
25511fi
25512