Fix bidi reordering around TAB characters covered by display properties.
[bpt/emacs.git] / autogen / configure
CommitLineData
067d23c9
KY
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
5f64f7bd 3# Generated by GNU Autoconf 2.65 for emacs 24.0.50.
067d23c9
KY
4#
5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
5f64f7bd
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
5f64f7bd 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"
5f64f7bd 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
5f64f7bd
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
5f64f7bd 363# script with status $?, using 1 if that was 0.
067d23c9
KY
364as_fn_error ()
365{
5f64f7bd
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
5f64f7bd 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.
5f64f7bd 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'
552PACKAGE_VERSION='24.0.50'
553PACKAGE_STRING='emacs 24.0.50'
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
067d23c9 594ac_header_list=
6c051bab 595ac_func_list=
e275c824
PE
596gl_getopt_required=POSIX
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
3e0be4ab
GM
621gl_GNULIB_ENABLED_sigprocmask_FALSE
622gl_GNULIB_ENABLED_sigprocmask_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
e275c824
PE
629HAVE_UNISTD_H
630NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
631NEXT_UNISTD_H
1fd182f0
PE
632PTHREAD_H_DEFINES_STRUCT_TIMESPEC
633SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
634TIME_H_DEFINES_STRUCT_TIMESPEC
635NEXT_AS_FIRST_DIRECTIVE_TIME_H
636NEXT_TIME_H
5fa4ac76
PE
637NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
638NEXT_SYS_STAT_H
1f5d53eb
PE
639NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
640NEXT_STDLIB_H
6ad6792b
GM
641NEXT_AS_FIRST_DIRECTIVE_STDIO_H
642NEXT_STDIO_H
643REPLACE_VSPRINTF
644REPLACE_VSNPRINTF
645REPLACE_VPRINTF
646REPLACE_VFPRINTF
647REPLACE_VDPRINTF
648REPLACE_VASPRINTF
649REPLACE_TMPFILE
650REPLACE_STDIO_WRITE_FUNCS
ca36e0ff 651REPLACE_STDIO_READ_FUNCS
6ad6792b
GM
652REPLACE_SPRINTF
653REPLACE_SNPRINTF
654REPLACE_RENAMEAT
655REPLACE_RENAME
656REPLACE_REMOVE
657REPLACE_PRINTF
658REPLACE_POPEN
659REPLACE_PERROR
660REPLACE_OBSTACK_PRINTF
661REPLACE_GETLINE
662REPLACE_GETDELIM
663REPLACE_FTELLO
664REPLACE_FTELL
665REPLACE_FSEEKO
666REPLACE_FSEEK
667REPLACE_FREOPEN
668REPLACE_FPURGE
669REPLACE_FPRINTF
670REPLACE_FOPEN
671REPLACE_FFLUSH
672REPLACE_FCLOSE
673REPLACE_DPRINTF
674HAVE_VDPRINTF
675HAVE_VASPRINTF
676HAVE_RENAMEAT
677HAVE_FTELLO
678HAVE_FSEEKO
679HAVE_DPRINTF
680HAVE_DECL_VSNPRINTF
681HAVE_DECL_SNPRINTF
682HAVE_DECL_OBSTACK_PRINTF
683HAVE_DECL_GETLINE
684HAVE_DECL_GETDELIM
685HAVE_DECL_FTELLO
686HAVE_DECL_FSEEKO
687HAVE_DECL_FPURGE
688GNULIB_VSPRINTF_POSIX
689GNULIB_VSNPRINTF
690GNULIB_VPRINTF_POSIX
691GNULIB_VPRINTF
692GNULIB_VFPRINTF_POSIX
693GNULIB_VFPRINTF
694GNULIB_VDPRINTF
ca36e0ff
GM
695GNULIB_VSCANF
696GNULIB_VFSCANF
6ad6792b
GM
697GNULIB_VASPRINTF
698GNULIB_TMPFILE
699GNULIB_STDIO_H_SIGPIPE
ca36e0ff 700GNULIB_STDIO_H_NONBLOCKING
6ad6792b
GM
701GNULIB_SPRINTF_POSIX
702GNULIB_SNPRINTF
ca36e0ff 703GNULIB_SCANF
6ad6792b
GM
704GNULIB_RENAMEAT
705GNULIB_RENAME
706GNULIB_REMOVE
707GNULIB_PUTS
708GNULIB_PUTCHAR
709GNULIB_PUTC
710GNULIB_PRINTF_POSIX
711GNULIB_PRINTF
712GNULIB_POPEN
713GNULIB_PERROR
714GNULIB_OBSTACK_PRINTF_POSIX
715GNULIB_OBSTACK_PRINTF
ca36e0ff 716GNULIB_GETS
6ad6792b
GM
717GNULIB_GETLINE
718GNULIB_GETDELIM
ca36e0ff
GM
719GNULIB_GETCHAR
720GNULIB_GETC
6ad6792b
GM
721GNULIB_FWRITE
722GNULIB_FTELLO
723GNULIB_FTELL
724GNULIB_FSEEKO
725GNULIB_FSEEK
ca36e0ff 726GNULIB_FSCANF
6ad6792b 727GNULIB_FREOPEN
ca36e0ff 728GNULIB_FREAD
6ad6792b
GM
729GNULIB_FPUTS
730GNULIB_FPUTC
731GNULIB_FPURGE
732GNULIB_FPRINTF_POSIX
733GNULIB_FPRINTF
734GNULIB_FOPEN
ca36e0ff
GM
735GNULIB_FGETS
736GNULIB_FGETC
6ad6792b
GM
737GNULIB_FFLUSH
738GNULIB_FCLOSE
739GNULIB_DPRINTF
1fd182f0
PE
740NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
741NEXT_STDDEF_H
6c051bab
GM
742GL_GENERATE_STDDEF_H_FALSE
743GL_GENERATE_STDDEF_H_TRUE
1fd182f0
PE
744STDDEF_H
745HAVE_WCHAR_T
746REPLACE_NULL
16c3e636 747HAVE__BOOL
6c051bab
GM
748GL_GENERATE_STDBOOL_H_FALSE
749GL_GENERATE_STDBOOL_H_TRUE
16c3e636 750STDBOOL_H
6d153f56
GM
751GL_GENERATE_STDARG_H_FALSE
752GL_GENERATE_STDARG_H_TRUE
753STDARG_H
754NEXT_AS_FIRST_DIRECTIVE_STDARG_H
755NEXT_STDARG_H
3e0be4ab
GM
756NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
757NEXT_SIGNAL_H
758REPLACE_PTHREAD_SIGMASK
759HAVE_SIGHANDLER_T
760HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
761HAVE_STRUCT_SIGACTION_SA_SIGACTION
762HAVE_SIGACTION
763HAVE_SIGINFO_T
764HAVE_SIGSET_T
765HAVE_PTHREAD_SIGMASK
766HAVE_POSIX_SIGNALBLOCKING
767GNULIB_SIGACTION
768GNULIB_SIGPROCMASK
769GNULIB_SIGNAL_H_SIGPIPE
770GNULIB_PTHREAD_SIGMASK
771LIB_PTHREAD_SIGMASK
1fd182f0
PE
772REPLACE_TIMEGM
773REPLACE_NANOSLEEP
774REPLACE_MKTIME
775REPLACE_LOCALTIME_R
776HAVE_TIMEGM
777HAVE_STRPTIME
778HAVE_NANOSLEEP
779HAVE_DECL_LOCALTIME_R
780GNULIB_TIME_R
781GNULIB_TIMEGM
782GNULIB_STRPTIME
783GNULIB_NANOSLEEP
784GNULIB_MKTIME
ae0d7250
PE
785REPLACE_UTIMENSAT
786REPLACE_STAT
787REPLACE_MKNOD
788REPLACE_MKFIFO
789REPLACE_MKDIR
790REPLACE_LSTAT
791REPLACE_FUTIMENS
792REPLACE_FSTATAT
793REPLACE_FSTAT
794HAVE_UTIMENSAT
795HAVE_MKNODAT
796HAVE_MKNOD
797HAVE_MKFIFOAT
798HAVE_MKFIFO
799HAVE_MKDIRAT
800HAVE_LSTAT
801HAVE_LCHMOD
802HAVE_FUTIMENS
803HAVE_FSTATAT
804HAVE_FCHMODAT
805GNULIB_UTIMENSAT
806GNULIB_STAT
807GNULIB_MKNODAT
808GNULIB_MKNOD
809GNULIB_MKFIFOAT
810GNULIB_MKFIFO
811GNULIB_MKDIRAT
812GNULIB_LSTAT
813GNULIB_LCHMOD
814GNULIB_FUTIMENS
815GNULIB_FSTATAT
816GNULIB_FCHMODAT
4fda9c95
GM
817NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
818NEXT_INTTYPES_H
819UINT64_MAX_EQ_ULONG_MAX
820UINT32_MAX_LT_UINTMAX_MAX
821PRIPTR_PREFIX
822PRI_MACROS_BROKEN
823INT64_MAX_EQ_LONG_MAX
824INT32_MAX_LT_INTMAX_MAX
825HAVE_DECL_STRTOUMAX
826HAVE_DECL_STRTOIMAX
827HAVE_DECL_IMAXDIV
828HAVE_DECL_IMAXABS
829GNULIB_STRTOUMAX
830GNULIB_STRTOIMAX
831GNULIB_IMAXDIV
832GNULIB_IMAXABS
833GL_GENERATE_STDINT_H_FALSE
834GL_GENERATE_STDINT_H_TRUE
835STDINT_H
836WINT_T_SUFFIX
837WCHAR_T_SUFFIX
838SIG_ATOMIC_T_SUFFIX
839SIZE_T_SUFFIX
840PTRDIFF_T_SUFFIX
841HAVE_SIGNED_WINT_T
842HAVE_SIGNED_WCHAR_T
843HAVE_SIGNED_SIG_ATOMIC_T
844BITSIZEOF_WINT_T
845BITSIZEOF_WCHAR_T
846BITSIZEOF_SIG_ATOMIC_T
847BITSIZEOF_SIZE_T
848BITSIZEOF_PTRDIFF_T
849APPLE_UNIVERSAL_BUILD
850HAVE_SYS_BITYPES_H
851HAVE_SYS_INTTYPES_H
852HAVE_STDINT_H
853NEXT_AS_FIRST_DIRECTIVE_STDINT_H
854NEXT_STDINT_H
855HAVE_SYS_TYPES_H
856HAVE_INTTYPES_H
857HAVE_WCHAR_H
858HAVE_UNSIGNED_LONG_LONG_INT
859HAVE_LONG_LONG_INT
e275c824
PE
860GETOPT_H
861HAVE_GETOPT_H
862NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
863NEXT_GETOPT_H
864PRAGMA_COLUMNS
865PRAGMA_SYSTEM_HEADER
866INCLUDE_NEXT_AS_FIRST_DIRECTIVE
867INCLUDE_NEXT
7d2a1c5e
GM
868GETLOADAVG_LIBS
869REPLACE_WCTOMB
870REPLACE_UNSETENV
871REPLACE_STRTOD
872REPLACE_SETENV
873REPLACE_REALPATH
874REPLACE_REALLOC
875REPLACE_PUTENV
876REPLACE_MKSTEMP
877REPLACE_MBTOWC
878REPLACE_MALLOC
879REPLACE_CANONICALIZE_FILE_NAME
880REPLACE_CALLOC
881HAVE_DECL_UNSETENV
882HAVE_UNLOCKPT
883HAVE_SYS_LOADAVG_H
884HAVE_STRUCT_RANDOM_DATA
885HAVE_STRTOULL
886HAVE_STRTOLL
887HAVE_STRTOD
888HAVE_DECL_SETENV
889HAVE_SETENV
890HAVE_RPMATCH
891HAVE_REALPATH
892HAVE_RANDOM_R
893HAVE_RANDOM_H
894HAVE_PTSNAME
895HAVE_MKSTEMPS
896HAVE_MKSTEMP
897HAVE_MKOSTEMPS
898HAVE_MKOSTEMP
899HAVE_MKDTEMP
900HAVE_GRANTPT
901HAVE_GETSUBOPT
902HAVE_DECL_GETLOADAVG
903HAVE_CANONICALIZE_FILE_NAME
904HAVE_ATOLL
905HAVE__EXIT
906GNULIB_WCTOMB
907GNULIB_UNSETENV
908GNULIB_UNLOCKPT
909GNULIB_SYSTEM_POSIX
910GNULIB_STRTOULL
911GNULIB_STRTOLL
912GNULIB_STRTOD
913GNULIB_SETENV
914GNULIB_RPMATCH
915GNULIB_REALPATH
916GNULIB_REALLOC_POSIX
917GNULIB_RANDOM_R
918GNULIB_PUTENV
919GNULIB_PTSNAME
920GNULIB_MKSTEMPS
921GNULIB_MKSTEMP
922GNULIB_MKOSTEMPS
923GNULIB_MKOSTEMP
924GNULIB_MKDTEMP
925GNULIB_MBTOWC
926GNULIB_MALLOC_POSIX
927GNULIB_GRANTPT
928GNULIB_GETSUBOPT
929GNULIB_GETLOADAVG
930GNULIB_CANONICALIZE_FILE_NAME
931GNULIB_CALLOC_POSIX
932GNULIB_ATOLL
933GNULIB__EXIT
e275c824
PE
934UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
935UNISTD_H_HAVE_WINSOCK2_H
936REPLACE_WRITE
937REPLACE_USLEEP
938REPLACE_UNLINKAT
939REPLACE_UNLINK
940REPLACE_TTYNAME_R
941REPLACE_SYMLINK
942REPLACE_SLEEP
943REPLACE_RMDIR
944REPLACE_READLINK
ca36e0ff 945REPLACE_READ
e275c824
PE
946REPLACE_PWRITE
947REPLACE_PREAD
948REPLACE_LSEEK
949REPLACE_LINKAT
950REPLACE_LINK
951REPLACE_LCHOWN
952REPLACE_GETPAGESIZE
953REPLACE_GETGROUPS
954REPLACE_GETLOGIN_R
955REPLACE_GETDOMAINNAME
956REPLACE_GETCWD
957REPLACE_FCHOWNAT
958REPLACE_DUP2
959REPLACE_DUP
960REPLACE_CLOSE
961REPLACE_CHOWN
962HAVE_SYS_PARAM_H
963HAVE_OS_H
964HAVE_DECL_TTYNAME_R
965HAVE_DECL_GETUSERSHELL
966HAVE_DECL_GETPAGESIZE
967HAVE_DECL_GETLOGIN_R
968HAVE_DECL_GETDOMAINNAME
969HAVE_DECL_FCHDIR
970HAVE_DECL_ENVIRON
971HAVE_USLEEP
972HAVE_UNLINKAT
973HAVE_SYMLINKAT
974HAVE_SYMLINK
975HAVE_SLEEP
976HAVE_READLINKAT
977HAVE_READLINK
978HAVE_PWRITE
979HAVE_PREAD
980HAVE_PIPE2
981HAVE_PIPE
982HAVE_LINKAT
983HAVE_LINK
984HAVE_LCHOWN
da6c8463 985HAVE_GROUP_MEMBER
e275c824
PE
986HAVE_GETPAGESIZE
987HAVE_GETLOGIN
988HAVE_GETHOSTNAME
989HAVE_GETGROUPS
990HAVE_GETDTABLESIZE
991HAVE_FTRUNCATE
992HAVE_FSYNC
993HAVE_FCHOWNAT
994HAVE_FCHDIR
995HAVE_FACCESSAT
996HAVE_EUIDACCESS
997HAVE_DUP3
998HAVE_DUP2
999HAVE_CHOWN
1000GNULIB_WRITE
1001GNULIB_USLEEP
1002GNULIB_UNLINKAT
1003GNULIB_UNLINK
1004GNULIB_UNISTD_H_SIGPIPE
ca36e0ff 1005GNULIB_UNISTD_H_NONBLOCKING
e275c824
PE
1006GNULIB_UNISTD_H_GETOPT
1007GNULIB_TTYNAME_R
1008GNULIB_SYMLINKAT
1009GNULIB_SYMLINK
1010GNULIB_SLEEP
1011GNULIB_RMDIR
1012GNULIB_READLINKAT
1013GNULIB_READLINK
ca36e0ff 1014GNULIB_READ
e275c824
PE
1015GNULIB_PWRITE
1016GNULIB_PREAD
1017GNULIB_PIPE2
1018GNULIB_PIPE
1019GNULIB_LSEEK
1020GNULIB_LINKAT
1021GNULIB_LINK
1022GNULIB_LCHOWN
da6c8463 1023GNULIB_GROUP_MEMBER
e275c824
PE
1024GNULIB_GETUSERSHELL
1025GNULIB_GETPAGESIZE
1026GNULIB_GETLOGIN_R
1027GNULIB_GETLOGIN
1028GNULIB_GETHOSTNAME
1029GNULIB_GETGROUPS
1030GNULIB_GETDTABLESIZE
1031GNULIB_GETDOMAINNAME
1032GNULIB_GETCWD
1033GNULIB_FTRUNCATE
1034GNULIB_FSYNC
1035GNULIB_FCHOWNAT
1036GNULIB_FCHDIR
1037GNULIB_FACCESSAT
1038GNULIB_EUIDACCESS
1039GNULIB_ENVIRON
1040GNULIB_DUP3
1041GNULIB_DUP2
1042GNULIB_CLOSE
1043GNULIB_CHOWN
4fc2b746
GM
1044GL_GENERATE_ALLOCA_H_FALSE
1045GL_GENERATE_ALLOCA_H_TRUE
1046ALLOCA_H
1047ALLOCA
743c80a7
PE
1048GL_COND_LIBTOOL_FALSE
1049GL_COND_LIBTOOL_TRUE
3e0be4ab
GM
1050POST_ALLOC_OBJ
1051PRE_ALLOC_OBJ
1052CYGWIN_OBJ
1053RALLOC_OBJ
1054OLDXMENU_DEPS
1055LIBX_OTHER
1056LIBXMENU
1057OLDXMENU
1058OLDXMENU_TARGET
1059LIBXT_OTHER
1060TOOLKIT_LIBW
1061WIDGET_OBJ
1062XOBJ
1063XMENU_OBJ
1064FONT_OBJ
1065OTHER_FILES
1066GNU_OBJC_CFLAGS
1067ns_appsrc
1068ns_appresdir
1069ns_appbindir
1070ns_appdir
1071S_FILE
1072M_FILE
1073X_TOOLKIT_TYPE
1074C_SWITCH_X_SYSTEM
1075C_SWITCH_X_SITE
1076LD_SWITCH_X_SITE
1077gameuser
1078gamedir
1079bitmapdir
1080archlibdir
1081etcdir
1082x_default_search_path
1083lisppath
1084locallisppath
1085lispdir
1086srcdir
1087canonical
1088configuration
1089version
1090KRB4LIB
1091DESLIB
1092KRB5LIB
1093CRYPTOLIB
1094COM_ERRLIB
1095LIBRESOLV
1096LIBHESIOD
1097TERMCAP_OBJ
1098LIBS_TERMCAP
067d23c9
KY
1099BLESSMAIL_TARGET
1100LIBS_MAIL
1101liblockfile
067d23c9
KY
1102LIBXML2_LIBS
1103LIBXML2_CFLAGS
1104LIBXSM
1105LIBGPM
1106LIBGIF
1107LIBTIFF
1108LIBPNG
1109LIBJPEG
1110LIBXPM
067d23c9
KY
1111M17N_FLT_LIBS
1112M17N_FLT_CFLAGS
1113LIBOTF_LIBS
1114LIBOTF_CFLAGS
7834125e
GM
1115FREETYPE_LIBS
1116FREETYPE_CFLAGS
067d23c9
KY
1117XFT_LIBS
1118XFT_CFLAGS
1119FONTCONFIG_LIBS
1120FONTCONFIG_CFLAGS
1121LIBXMU
1122LIBXTR6
1123LIBGNUTLS_LIBS
1124LIBGNUTLS_CFLAGS
1125LIBSELINUX_LIBS
f527bd02
GM
1126SETTINGS_LIBS
1127SETTINGS_CFLAGS
067d23c9
KY
1128GCONF_LIBS
1129GCONF_CFLAGS
f527bd02
GM
1130GSETTINGS_LIBS
1131GSETTINGS_CFLAGS
067d23c9
KY
1132DBUS_OBJ
1133DBUS_LIBS
1134DBUS_CFLAGS
1135GTK_OBJ
1136GTK_LIBS
1137GTK_CFLAGS
1138IMAGEMAGICK_LIBS
1139IMAGEMAGICK_CFLAGS
1140RSVG_LIBS
1141RSVG_CFLAGS
1abfdc54 1142LIB_PTHREAD
067d23c9
KY
1143VMLIMIT_OBJ
1144GMALLOC_OBJ
1145HAVE_XSERVER
1146LIB_STANDARD
00b3c7ac 1147NS_OBJC_OBJ
067d23c9
KY
1148NS_OBJ
1149TEMACS_LDFLAGS2
1150LD_SWITCH_X_SITE_AUX_RPATH
1151LD_SWITCH_X_SITE_AUX
1152XMKMF
1153DEPFLAGS
1154MKDEPDIR
067d23c9
KY
1155CFLAGS_SOUND
1156ALSA_LIBS
1157ALSA_CFLAGS
1158PKG_CONFIG
1159LIBSOUND
130f1dac 1160CRT_DIR
067d23c9
KY
1161START_FILES
1162LIB_MATH
067d23c9
KY
1163LIBS_SYSTEM
1164C_SWITCH_SYSTEM
1165UNEXEC_OBJ
1166C_SWITCH_MACHINE
1167LD_SWITCH_SYSTEM
1168CANNOT_DUMP
96f129d5 1169HAVE_MAKEINFO
067d23c9
KY
1170GZIP_PROG
1171INSTALL_INFO
067d23c9
KY
1172C_WARNINGS_SWITCH
1173EGREP
1174GREP
1175CPP
743c80a7
PE
1176RANLIB
1177am__fastdepCC_FALSE
1178am__fastdepCC_TRUE
1179CCDEPMODE
1180AMDEPBACKSLASH
1181AMDEP_FALSE
1182AMDEP_TRUE
1183am__quote
1184am__include
1185DEPDIR
067d23c9
KY
1186OBJEXT
1187EXEEXT
1188ac_ct_CC
1189CPPFLAGS
1190LDFLAGS
1191CFLAGS
1192CC
1193host_os
1194host_vendor
1195host_cpu
1196host
1197build_os
1198build_vendor
1199build_cpu
1200build
1201PROFILING_CFLAGS
1202MAINT
1203GZIP_INFO
743c80a7
PE
1204am__untar
1205am__tar
1206AMTAR
1207am__leading_dot
1208SET_MAKE
1209AWK
1210mkdir_p
1211MKDIR_P
1212INSTALL_STRIP_PROGRAM
1213STRIP
1214install_sh
1215MAKEINFO
1216AUTOHEADER
1217AUTOMAKE
1218AUTOCONF
1219ACLOCAL
1220VERSION
1221PACKAGE
1222CYGPATH_W
1223am__isrc
1224INSTALL_DATA
1225INSTALL_SCRIPT
1226INSTALL_PROGRAM
067d23c9
KY
1227target_alias
1228host_alias
1229build_alias
1230LIBS
1231ECHO_T
1232ECHO_N
1233ECHO_C
1234DEFS
1235mandir
1236localedir
1237libdir
1238psdir
1239pdfdir
1240dvidir
1241htmldir
1242infodir
1243docdir
1244oldincludedir
1245includedir
1246localstatedir
1247sharedstatedir
1248sysconfdir
1249datadir
1250datarootdir
1251libexecdir
1252sbindir
1253bindir
1254program_transform_name
1255prefix
1256exec_prefix
1257PACKAGE_URL
1258PACKAGE_BUGREPORT
1259PACKAGE_STRING
1260PACKAGE_VERSION
1261PACKAGE_TARNAME
1262PACKAGE_NAME
1263PATH_SEPARATOR
1264SHELL'
1265ac_subst_files='deps_frag
4d4b75e8 1266lisp_frag
067d23c9
KY
1267ns_frag'
1268ac_user_opts='
1269enable_option_checking
1270with_pop
1271with_kerberos
1272with_kerberos5
1273with_hesiod
1274with_mmdf
1275with_mail_unlink
1276with_mailhost
1277with_sound
1278with_sync_input
1279with_x_toolkit
0442dc7f 1280with_wide_int
067d23c9
KY
1281with_xpm
1282with_jpeg
1283with_tiff
1284with_gif
1285with_png
1286with_rsvg
1287with_xml2
1288with_imagemagick
1289with_xft
1290with_libotf
1291with_m17n_flt
1292with_toolkit_scroll_bars
1293with_xaw3d
1294with_xim
1295with_ns
1296with_gpm
1297with_dbus
1298with_gconf
f527bd02 1299with_gsettings
067d23c9
KY
1300with_selinux
1301with_gnutls
1302with_makeinfo
1303with_compress_info
1304with_pkg_config_prog
1305with_crt_dir
4fc5868a 1306with_gameuser
067d23c9
KY
1307with_gnustep_conf
1308enable_ns_self_contained
1309enable_asserts
1310enable_maintainer_mode
1311enable_locallisppath
1312enable_checking
1313enable_use_lisp_union_type
1314enable_profiling
1315enable_autodepend
743c80a7 1316enable_dependency_tracking
067d23c9
KY
1317enable_largefile
1318with_x
1319'
1320 ac_precious_vars='build_alias
1321host_alias
1322target_alias
1323CC
1324CFLAGS
1325LDFLAGS
1326LIBS
1327CPPFLAGS
1328CPP
1329XMKMF'
1330
1331
1332# Initialize some variables set by options.
1333ac_init_help=
1334ac_init_version=false
1335ac_unrecognized_opts=
1336ac_unrecognized_sep=
1337# The variables have the same names as the options, with
1338# dashes changed to underlines.
1339cache_file=/dev/null
1340exec_prefix=NONE
1341no_create=
1342no_recursion=
1343prefix=NONE
1344program_prefix=NONE
1345program_suffix=NONE
1346program_transform_name=s,x,x,
1347silent=
1348site=
1349srcdir=
1350verbose=
1351x_includes=NONE
1352x_libraries=NONE
1353
1354# Installation directory options.
1355# These are left unexpanded so users can "make install exec_prefix=/foo"
1356# and all the variables that are supposed to be based on exec_prefix
1357# by default will actually change.
1358# Use braces instead of parens because sh, perl, etc. also accept them.
1359# (The list follows the same order as the GNU Coding Standards.)
1360bindir='${exec_prefix}/bin'
1361sbindir='${exec_prefix}/sbin'
1362libexecdir='${exec_prefix}/libexec'
1363datarootdir='${prefix}/share'
1364datadir='${datarootdir}'
1365sysconfdir='${prefix}/etc'
1366sharedstatedir='${prefix}/com'
1367localstatedir='${prefix}/var'
1368includedir='${prefix}/include'
1369oldincludedir='/usr/include'
1370docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1371infodir='${datarootdir}/info'
1372htmldir='${docdir}'
1373dvidir='${docdir}'
1374pdfdir='${docdir}'
1375psdir='${docdir}'
1376libdir='${exec_prefix}/lib'
1377localedir='${datarootdir}/locale'
1378mandir='${datarootdir}/man'
1379
1380ac_prev=
1381ac_dashdash=
1382for ac_option
1383do
1384 # If the previous option needs an argument, assign it.
1385 if test -n "$ac_prev"; then
1386 eval $ac_prev=\$ac_option
1387 ac_prev=
1388 continue
1389 fi
1390
1391 case $ac_option in
5f64f7bd
GM
1392 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1393 *) ac_optarg=yes ;;
067d23c9
KY
1394 esac
1395
1396 # Accept the important Cygnus configure options, so we can diagnose typos.
1397
1398 case $ac_dashdash$ac_option in
1399 --)
1400 ac_dashdash=yes ;;
1401
1402 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1403 ac_prev=bindir ;;
1404 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1405 bindir=$ac_optarg ;;
1406
1407 -build | --build | --buil | --bui | --bu)
1408 ac_prev=build_alias ;;
1409 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1410 build_alias=$ac_optarg ;;
1411
1412 -cache-file | --cache-file | --cache-fil | --cache-fi \
1413 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1414 ac_prev=cache_file ;;
1415 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1416 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1417 cache_file=$ac_optarg ;;
1418
1419 --config-cache | -C)
1420 cache_file=config.cache ;;
1421
1422 -datadir | --datadir | --datadi | --datad)
1423 ac_prev=datadir ;;
1424 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1425 datadir=$ac_optarg ;;
1426
1427 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1428 | --dataroo | --dataro | --datar)
1429 ac_prev=datarootdir ;;
1430 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1431 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1432 datarootdir=$ac_optarg ;;
1433
1434 -disable-* | --disable-*)
1435 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1436 # Reject names that are not valid shell variable names.
1437 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
5f64f7bd 1438 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1439 ac_useropt_orig=$ac_useropt
1440 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1441 case $ac_user_opts in
1442 *"
1443"enable_$ac_useropt"
1444"*) ;;
1445 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1446 ac_unrecognized_sep=', ';;
1447 esac
1448 eval enable_$ac_useropt=no ;;
1449
1450 -docdir | --docdir | --docdi | --doc | --do)
1451 ac_prev=docdir ;;
1452 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1453 docdir=$ac_optarg ;;
1454
1455 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1456 ac_prev=dvidir ;;
1457 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1458 dvidir=$ac_optarg ;;
1459
1460 -enable-* | --enable-*)
1461 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1462 # Reject names that are not valid shell variable names.
1463 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
5f64f7bd 1464 as_fn_error "invalid feature name: $ac_useropt"
067d23c9
KY
1465 ac_useropt_orig=$ac_useropt
1466 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467 case $ac_user_opts in
1468 *"
1469"enable_$ac_useropt"
1470"*) ;;
1471 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1472 ac_unrecognized_sep=', ';;
1473 esac
1474 eval enable_$ac_useropt=\$ac_optarg ;;
1475
1476 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1477 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1478 | --exec | --exe | --ex)
1479 ac_prev=exec_prefix ;;
1480 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1481 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1482 | --exec=* | --exe=* | --ex=*)
1483 exec_prefix=$ac_optarg ;;
1484
1485 -gas | --gas | --ga | --g)
1486 # Obsolete; use --with-gas.
1487 with_gas=yes ;;
1488
1489 -help | --help | --hel | --he | -h)
1490 ac_init_help=long ;;
1491 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1492 ac_init_help=recursive ;;
1493 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1494 ac_init_help=short ;;
1495
1496 -host | --host | --hos | --ho)
1497 ac_prev=host_alias ;;
1498 -host=* | --host=* | --hos=* | --ho=*)
1499 host_alias=$ac_optarg ;;
1500
1501 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1502 ac_prev=htmldir ;;
1503 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1504 | --ht=*)
1505 htmldir=$ac_optarg ;;
1506
1507 -includedir | --includedir | --includedi | --included | --include \
1508 | --includ | --inclu | --incl | --inc)
1509 ac_prev=includedir ;;
1510 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1511 | --includ=* | --inclu=* | --incl=* | --inc=*)
1512 includedir=$ac_optarg ;;
1513
1514 -infodir | --infodir | --infodi | --infod | --info | --inf)
1515 ac_prev=infodir ;;
1516 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1517 infodir=$ac_optarg ;;
1518
1519 -libdir | --libdir | --libdi | --libd)
1520 ac_prev=libdir ;;
1521 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1522 libdir=$ac_optarg ;;
1523
1524 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1525 | --libexe | --libex | --libe)
1526 ac_prev=libexecdir ;;
1527 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1528 | --libexe=* | --libex=* | --libe=*)
1529 libexecdir=$ac_optarg ;;
1530
1531 -localedir | --localedir | --localedi | --localed | --locale)
1532 ac_prev=localedir ;;
1533 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1534 localedir=$ac_optarg ;;
1535
1536 -localstatedir | --localstatedir | --localstatedi | --localstated \
1537 | --localstate | --localstat | --localsta | --localst | --locals)
1538 ac_prev=localstatedir ;;
1539 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1540 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1541 localstatedir=$ac_optarg ;;
1542
1543 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1544 ac_prev=mandir ;;
1545 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1546 mandir=$ac_optarg ;;
1547
1548 -nfp | --nfp | --nf)
1549 # Obsolete; use --without-fp.
1550 with_fp=no ;;
1551
1552 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1553 | --no-cr | --no-c | -n)
1554 no_create=yes ;;
1555
1556 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1557 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1558 no_recursion=yes ;;
1559
1560 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1561 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1562 | --oldin | --oldi | --old | --ol | --o)
1563 ac_prev=oldincludedir ;;
1564 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1565 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1566 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1567 oldincludedir=$ac_optarg ;;
1568
1569 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1570 ac_prev=prefix ;;
1571 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1572 prefix=$ac_optarg ;;
1573
1574 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1575 | --program-pre | --program-pr | --program-p)
1576 ac_prev=program_prefix ;;
1577 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1578 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1579 program_prefix=$ac_optarg ;;
1580
1581 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1582 | --program-suf | --program-su | --program-s)
1583 ac_prev=program_suffix ;;
1584 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1585 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1586 program_suffix=$ac_optarg ;;
1587
1588 -program-transform-name | --program-transform-name \
1589 | --program-transform-nam | --program-transform-na \
1590 | --program-transform-n | --program-transform- \
1591 | --program-transform | --program-transfor \
1592 | --program-transfo | --program-transf \
1593 | --program-trans | --program-tran \
1594 | --progr-tra | --program-tr | --program-t)
1595 ac_prev=program_transform_name ;;
1596 -program-transform-name=* | --program-transform-name=* \
1597 | --program-transform-nam=* | --program-transform-na=* \
1598 | --program-transform-n=* | --program-transform-=* \
1599 | --program-transform=* | --program-transfor=* \
1600 | --program-transfo=* | --program-transf=* \
1601 | --program-trans=* | --program-tran=* \
1602 | --progr-tra=* | --program-tr=* | --program-t=*)
1603 program_transform_name=$ac_optarg ;;
1604
1605 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1606 ac_prev=pdfdir ;;
1607 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1608 pdfdir=$ac_optarg ;;
1609
1610 -psdir | --psdir | --psdi | --psd | --ps)
1611 ac_prev=psdir ;;
1612 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1613 psdir=$ac_optarg ;;
1614
1615 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1616 | -silent | --silent | --silen | --sile | --sil)
1617 silent=yes ;;
1618
1619 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1620 ac_prev=sbindir ;;
1621 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1622 | --sbi=* | --sb=*)
1623 sbindir=$ac_optarg ;;
1624
1625 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1626 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1627 | --sharedst | --shareds | --shared | --share | --shar \
1628 | --sha | --sh)
1629 ac_prev=sharedstatedir ;;
1630 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1631 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1632 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1633 | --sha=* | --sh=*)
1634 sharedstatedir=$ac_optarg ;;
1635
1636 -site | --site | --sit)
1637 ac_prev=site ;;
1638 -site=* | --site=* | --sit=*)
1639 site=$ac_optarg ;;
1640
1641 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1642 ac_prev=srcdir ;;
1643 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1644 srcdir=$ac_optarg ;;
1645
1646 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1647 | --syscon | --sysco | --sysc | --sys | --sy)
1648 ac_prev=sysconfdir ;;
1649 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1650 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1651 sysconfdir=$ac_optarg ;;
1652
1653 -target | --target | --targe | --targ | --tar | --ta | --t)
1654 ac_prev=target_alias ;;
1655 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1656 target_alias=$ac_optarg ;;
1657
1658 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1659 verbose=yes ;;
1660
1661 -version | --version | --versio | --versi | --vers | -V)
1662 ac_init_version=: ;;
1663
1664 -with-* | --with-*)
1665 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1666 # Reject names that are not valid shell variable names.
1667 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
5f64f7bd 1668 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1669 ac_useropt_orig=$ac_useropt
1670 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1671 case $ac_user_opts in
1672 *"
1673"with_$ac_useropt"
1674"*) ;;
1675 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1676 ac_unrecognized_sep=', ';;
1677 esac
1678 eval with_$ac_useropt=\$ac_optarg ;;
1679
1680 -without-* | --without-*)
1681 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1682 # Reject names that are not valid shell variable names.
1683 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
5f64f7bd 1684 as_fn_error "invalid package name: $ac_useropt"
067d23c9
KY
1685 ac_useropt_orig=$ac_useropt
1686 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1687 case $ac_user_opts in
1688 *"
1689"with_$ac_useropt"
1690"*) ;;
1691 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1692 ac_unrecognized_sep=', ';;
1693 esac
1694 eval with_$ac_useropt=no ;;
1695
1696 --x)
1697 # Obsolete; use --with-x.
1698 with_x=yes ;;
1699
1700 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1701 | --x-incl | --x-inc | --x-in | --x-i)
1702 ac_prev=x_includes ;;
1703 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1704 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1705 x_includes=$ac_optarg ;;
1706
1707 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1708 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1709 ac_prev=x_libraries ;;
1710 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1711 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1712 x_libraries=$ac_optarg ;;
1713
5f64f7bd
GM
1714 -*) as_fn_error "unrecognized option: \`$ac_option'
1715Try \`$0 --help' for more information."
067d23c9
KY
1716 ;;
1717
1718 *=*)
1719 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1720 # Reject names that are not valid shell variable names.
1721 case $ac_envvar in #(
1722 '' | [0-9]* | *[!_$as_cr_alnum]* )
5f64f7bd 1723 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
067d23c9
KY
1724 esac
1725 eval $ac_envvar=\$ac_optarg
1726 export $ac_envvar ;;
1727
1728 *)
1729 # FIXME: should be removed in autoconf 3.0.
1730 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1731 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1732 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
5f64f7bd 1733 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
067d23c9
KY
1734 ;;
1735
1736 esac
1737done
1738
1739if test -n "$ac_prev"; then
1740 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
5f64f7bd 1741 as_fn_error "missing argument to $ac_option"
067d23c9
KY
1742fi
1743
1744if test -n "$ac_unrecognized_opts"; then
1745 case $enable_option_checking in
1746 no) ;;
5f64f7bd 1747 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
067d23c9
KY
1748 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1749 esac
1750fi
1751
1752# Check all directory arguments for consistency.
1753for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1754 datadir sysconfdir sharedstatedir localstatedir includedir \
1755 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1756 libdir localedir mandir
1757do
1758 eval ac_val=\$$ac_var
1759 # Remove trailing slashes.
1760 case $ac_val in
1761 */ )
1762 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1763 eval $ac_var=\$ac_val;;
1764 esac
1765 # Be sure to have absolute directory names.
1766 case $ac_val in
1767 [\\/$]* | ?:[\\/]* ) continue;;
1768 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1769 esac
5f64f7bd 1770 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
067d23c9
KY
1771done
1772
1773# There might be people who depend on the old broken behavior: `$host'
1774# used to hold the argument of --host etc.
1775# FIXME: To remove some day.
1776build=$build_alias
1777host=$host_alias
1778target=$target_alias
1779
1780# FIXME: To remove some day.
1781if test "x$host_alias" != x; then
1782 if test "x$build_alias" = x; then
1783 cross_compiling=maybe
5f64f7bd
GM
1784 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1785 If a cross compiler is detected then cross compile mode will be used." >&2
067d23c9
KY
1786 elif test "x$build_alias" != "x$host_alias"; then
1787 cross_compiling=yes
1788 fi
1789fi
1790
1791ac_tool_prefix=
1792test -n "$host_alias" && ac_tool_prefix=$host_alias-
1793
1794test "$silent" = yes && exec 6>/dev/null
1795
1796
1797ac_pwd=`pwd` && test -n "$ac_pwd" &&
1798ac_ls_di=`ls -di .` &&
1799ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
5f64f7bd 1800 as_fn_error "working directory cannot be determined"
067d23c9 1801test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
5f64f7bd 1802 as_fn_error "pwd does not report name of working directory"
067d23c9
KY
1803
1804
1805# Find the source files, if location was not specified.
1806if test -z "$srcdir"; then
1807 ac_srcdir_defaulted=yes
1808 # Try the directory containing this script, then the parent directory.
1809 ac_confdir=`$as_dirname -- "$as_myself" ||
1810$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1811 X"$as_myself" : 'X\(//\)[^/]' \| \
1812 X"$as_myself" : 'X\(//\)$' \| \
1813 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1814$as_echo X"$as_myself" |
1815 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1816 s//\1/
1817 q
1818 }
1819 /^X\(\/\/\)[^/].*/{
1820 s//\1/
1821 q
1822 }
1823 /^X\(\/\/\)$/{
1824 s//\1/
1825 q
1826 }
1827 /^X\(\/\).*/{
1828 s//\1/
1829 q
1830 }
1831 s/.*/./; q'`
1832 srcdir=$ac_confdir
1833 if test ! -r "$srcdir/$ac_unique_file"; then
1834 srcdir=..
1835 fi
1836else
1837 ac_srcdir_defaulted=no
1838fi
1839if test ! -r "$srcdir/$ac_unique_file"; then
1840 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
5f64f7bd 1841 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
067d23c9
KY
1842fi
1843ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1844ac_abs_confdir=`(
5f64f7bd 1845 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
067d23c9
KY
1846 pwd)`
1847# When building in place, set srcdir=.
1848if test "$ac_abs_confdir" = "$ac_pwd"; then
1849 srcdir=.
1850fi
1851# Remove unnecessary trailing slashes from srcdir.
1852# Double slashes in file names in object file debugging info
1853# mess up M-x gdb in Emacs.
1854case $srcdir in
1855*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1856esac
1857for ac_var in $ac_precious_vars; do
1858 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1859 eval ac_env_${ac_var}_value=\$${ac_var}
1860 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1861 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1862done
1863
1864#
1865# Report the --help message.
1866#
1867if test "$ac_init_help" = "long"; then
1868 # Omit some internal or obsolete options to make the list less imposing.
1869 # This message is too long to be a string in the A/UX 3.1 sh.
1870 cat <<_ACEOF
1871\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
1872
1873Usage: $0 [OPTION]... [VAR=VALUE]...
1874
1875To assign environment variables (e.g., CC, CFLAGS...), specify them as
1876VAR=VALUE. See below for descriptions of some of the useful variables.
1877
1878Defaults for the options are specified in brackets.
1879
1880Configuration:
1881 -h, --help display this help and exit
1882 --help=short display options specific to this package
1883 --help=recursive display the short help of all the included packages
1884 -V, --version display version information and exit
5f64f7bd 1885 -q, --quiet, --silent do not print \`checking...' messages
067d23c9
KY
1886 --cache-file=FILE cache test results in FILE [disabled]
1887 -C, --config-cache alias for \`--cache-file=config.cache'
1888 -n, --no-create do not create output files
1889 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1890
1891Installation directories:
1892 --prefix=PREFIX install architecture-independent files in PREFIX
1893 [$ac_default_prefix]
1894 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1895 [PREFIX]
1896
1897By default, \`make install' will install all the files in
1898\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1899an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1900for instance \`--prefix=\$HOME'.
1901
1902For better control, use the options below.
1903
1904Fine tuning of the installation directories:
1905 --bindir=DIR user executables [EPREFIX/bin]
1906 --sbindir=DIR system admin executables [EPREFIX/sbin]
1907 --libexecdir=DIR program executables [EPREFIX/libexec]
1908 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1909 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1910 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1911 --libdir=DIR object code libraries [EPREFIX/lib]
1912 --includedir=DIR C header files [PREFIX/include]
1913 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1914 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1915 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1916 --infodir=DIR info documentation [DATAROOTDIR/info]
1917 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1918 --mandir=DIR man documentation [DATAROOTDIR/man]
1919 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1920 --htmldir=DIR html documentation [DOCDIR]
1921 --dvidir=DIR dvi documentation [DOCDIR]
1922 --pdfdir=DIR pdf documentation [DOCDIR]
1923 --psdir=DIR ps documentation [DOCDIR]
1924_ACEOF
1925
1926 cat <<\_ACEOF
1927
1928Program names:
1929 --program-prefix=PREFIX prepend PREFIX to installed program names
1930 --program-suffix=SUFFIX append SUFFIX to installed program names
1931 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1932
1933X features:
1934 --x-includes=DIR X include files are in DIR
1935 --x-libraries=DIR X library files are in DIR
1936
1937System types:
1938 --build=BUILD configure for building on BUILD [guessed]
1939 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1940_ACEOF
1941fi
1942
1943if test -n "$ac_init_help"; then
1944 case $ac_init_help in
1945 short | recursive ) echo "Configuration of emacs 24.0.50:";;
1946 esac
1947 cat <<\_ACEOF
1948
1949Optional Features:
1950 --disable-option-checking ignore unrecognized --enable/--with options
1951 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1952 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1953 --disable-ns-self-contained
1954 disable self contained build under NeXTstep
1955 --enable-asserts compile code with asserts enabled
2b7f7d99
GM
1956 --disable-maintainer-mode
1957 disable make rules and dependencies not useful (and
067d23c9
KY
1958 sometimes confusing) to the casual installer
1959 --enable-locallisppath=PATH
1960 directories Emacs should search for lisp files
1961 specific to this site
1962 --enable-checking[=LIST]
1963 enable expensive run-time checks. With LIST, enable
1964 only specific categories of checks. Categories are:
1965 all,yes,no. Flags are: stringbytes, stringoverrun,
1966 stringfreelist, xmallocoverrun, conslist
1967 --enable-use-lisp-union-type
1968 use a union for the Lisp_Object data type. This is
1969 only useful for development for catching certain
1970 types of bugs.
1971 --enable-profiling build emacs with profiling support. This might not
1972 work on all platforms
1973 --enable-autodepend automatically generate dependencies to .h-files.
1974 Requires GNU Make and Gcc. Enabled if GNU Make and
1975 Gcc is found
743c80a7
PE
1976 --disable-dependency-tracking speeds up one-time build
1977 --enable-dependency-tracking do not reject slow dependency extractors
067d23c9
KY
1978 --disable-largefile omit support for large files
1979
1980Optional Packages:
1981 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1982 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1983 --without-pop don't support POP mail retrieval with movemail
1984 --with-kerberos support Kerberos-authenticated POP
1985 --with-kerberos5 support Kerberos version 5 authenticated POP
1986 --with-hesiod support Hesiod to get the POP server host
1987 --with-mmdf support MMDF mailboxes
1988 --with-mail-unlink unlink, rather than empty, mail spool after reading
1989 --with-mailhost=HOSTNAME
1990 string giving default POP mail host
1991 --without-sound don't compile with sound support
1992 --without-sync-input process async input synchronously
1993 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
1994 lucid or athena, motif, no)
0442dc7f 1995 --with-wide-int prefer wide Emacs integers (typically 62-bit)
067d23c9
KY
1996 --without-xpm don't compile with XPM image support
1997 --without-jpeg don't compile with JPEG image support
1998 --without-tiff don't compile with TIFF image support
1999 --without-gif don't compile with GIF image support
2000 --without-png don't compile with PNG image support
2001 --without-rsvg don't compile with SVG image support
2002 --without-xml2 don't compile with XML parsing support
2003 --without-imagemagick don't compile with ImageMagick image support
2004 --without-xft don't use XFT for anti aliased fonts
2005 --without-libotf don't use libotf for OpenType font support
2006 --without-m17n-flt don't use m17n-flt for text shaping
2007 --without-toolkit-scroll-bars
2008 don't use Motif or Xaw3d scroll bars
2009 --without-xaw3d don't use Xaw3d
2010 --without-xim don't use X11 XIM
7834125e 2011 --with-ns use NeXTstep (Cocoa or GNUstep) windowing system
067d23c9
KY
2012 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
2013 console
2014 --without-dbus don't compile with D-Bus support
2015 --without-gconf don't compile with GConf support
f527bd02 2016 --without-gsettings don't compile with GSettings support
067d23c9
KY
2017 --without-selinux don't compile with SELinux support
2018 --without-gnutls don't use -lgnutls for SSL/TLS support
2019 --without-makeinfo don't require makeinfo for building manuals
2020 --without-compress-info don't compress the installed Info pages
2021 --with-pkg-config-prog=PATH
2022 path to pkg-config for finding GTK and librsvg
2023 --with-crt-dir=DIR directory containing crtn.o etc. The default is
2024 /usr/lib, or /usr/lib64 on some platforms.
4fc5868a 2025 --with-gameuser=USER user for shared game score files
067d23c9
KY
2026 --with-gnustep-conf=PATH
2027 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
2028 or /etc/GNUstep/GNUstep.conf
2029 --with-x use the X Window System
2030
2031Some influential environment variables:
2032 CC C compiler command
2033 CFLAGS C compiler flags
2034 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2035 nonstandard directory <lib dir>
2036 LIBS libraries to pass to the linker, e.g. -l<library>
2037 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2038 you have headers in a nonstandard directory <include dir>
2039 CPP C preprocessor
2040 XMKMF Path to xmkmf, Makefile generator for X Window System
2041
2042Use these variables to override the choices made by `configure' or to help
2043it to find libraries and programs with nonstandard names/locations.
2044
2045Report bugs to the package provider.
2046_ACEOF
2047ac_status=$?
2048fi
2049
2050if test "$ac_init_help" = "recursive"; then
2051 # If there are subdirs, report their specific --help.
2052 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2053 test -d "$ac_dir" ||
2054 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2055 continue
2056 ac_builddir=.
2057
2058case "$ac_dir" in
2059.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2060*)
2061 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2062 # A ".." for each directory in $ac_dir_suffix.
2063 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2064 case $ac_top_builddir_sub in
2065 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2066 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2067 esac ;;
2068esac
2069ac_abs_top_builddir=$ac_pwd
2070ac_abs_builddir=$ac_pwd$ac_dir_suffix
2071# for backward compatibility:
2072ac_top_builddir=$ac_top_build_prefix
2073
2074case $srcdir in
2075 .) # We are building in place.
2076 ac_srcdir=.
2077 ac_top_srcdir=$ac_top_builddir_sub
2078 ac_abs_top_srcdir=$ac_pwd ;;
2079 [\\/]* | ?:[\\/]* ) # Absolute name.
2080 ac_srcdir=$srcdir$ac_dir_suffix;
2081 ac_top_srcdir=$srcdir
2082 ac_abs_top_srcdir=$srcdir ;;
2083 *) # Relative name.
2084 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2085 ac_top_srcdir=$ac_top_build_prefix$srcdir
2086 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2087esac
2088ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2089
2090 cd "$ac_dir" || { ac_status=$?; continue; }
2091 # Check for guested configure.
2092 if test -f "$ac_srcdir/configure.gnu"; then
2093 echo &&
2094 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2095 elif test -f "$ac_srcdir/configure"; then
2096 echo &&
2097 $SHELL "$ac_srcdir/configure" --help=recursive
2098 else
2099 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2100 fi || ac_status=$?
2101 cd "$ac_pwd" || { ac_status=$?; break; }
2102 done
2103fi
2104
2105test -n "$ac_init_help" && exit $ac_status
2106if $ac_init_version; then
2107 cat <<\_ACEOF
2108emacs configure 24.0.50
5f64f7bd 2109generated by GNU Autoconf 2.65
067d23c9 2110
5f64f7bd 2111Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
2112This configure script is free software; the Free Software Foundation
2113gives unlimited permission to copy, distribute and modify it.
2114_ACEOF
2115 exit
2116fi
2117
2118## ------------------------ ##
2119## Autoconf initialization. ##
2120## ------------------------ ##
2121
2122# ac_fn_c_try_compile LINENO
2123# --------------------------
2124# Try to compile conftest.$ac_ext, and return whether this succeeded.
2125ac_fn_c_try_compile ()
2126{
2127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128 rm -f conftest.$ac_objext
2129 if { { ac_try="$ac_compile"
2130case "(($ac_try" in
2131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2132 *) ac_try_echo=$ac_try;;
2133esac
2134eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2135$as_echo "$ac_try_echo"; } >&5
2136 (eval "$ac_compile") 2>conftest.err
2137 ac_status=$?
2138 if test -s conftest.err; then
2139 grep -v '^ *+' conftest.err >conftest.er1
2140 cat conftest.er1 >&5
2141 mv -f conftest.er1 conftest.err
2142 fi
2143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2144 test $ac_status = 0; } && {
2145 test -z "$ac_c_werror_flag" ||
2146 test ! -s conftest.err
2147 } && test -s conftest.$ac_objext; then :
2148 ac_retval=0
2149else
2150 $as_echo "$as_me: failed program was:" >&5
2151sed 's/^/| /' conftest.$ac_ext >&5
2152
2153 ac_retval=1
2154fi
5f64f7bd 2155 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_try_compile
2159
067d23c9
KY
2160# ac_fn_c_try_cpp LINENO
2161# ----------------------
2162# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2163ac_fn_c_try_cpp ()
2164{
2165 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2166 if { { ac_try="$ac_cpp conftest.$ac_ext"
2167case "(($ac_try" in
2168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2169 *) ac_try_echo=$ac_try;;
2170esac
2171eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2172$as_echo "$ac_try_echo"; } >&5
2173 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2174 ac_status=$?
2175 if test -s conftest.err; then
2176 grep -v '^ *+' conftest.err >conftest.er1
2177 cat conftest.er1 >&5
2178 mv -f conftest.er1 conftest.err
2179 fi
2180 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5f64f7bd 2181 test $ac_status = 0; } >/dev/null && {
067d23c9
KY
2182 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2183 test ! -s conftest.err
2184 }; then :
2185 ac_retval=0
2186else
2187 $as_echo "$as_me: failed program was:" >&5
2188sed 's/^/| /' conftest.$ac_ext >&5
2189
2190 ac_retval=1
2191fi
5f64f7bd 2192 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2193 as_fn_set_status $ac_retval
2194
2195} # ac_fn_c_try_cpp
2196
2197# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2198# -------------------------------------------------------
2199# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2200# the include files in INCLUDES and setting the cache variable VAR
2201# accordingly.
2202ac_fn_c_check_header_mongrel ()
2203{
2204 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5f64f7bd 2205 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2207$as_echo_n "checking for $2... " >&6; }
5f64f7bd 2208if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2209 $as_echo_n "(cached) " >&6
2210fi
2211eval ac_res=\$$3
2212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2213$as_echo "$ac_res" >&6; }
2214else
2215 # Is the header compilable?
2216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2217$as_echo_n "checking $2 usability... " >&6; }
2218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219/* end confdefs.h. */
2220$4
2221#include <$2>
2222_ACEOF
2223if ac_fn_c_try_compile "$LINENO"; then :
2224 ac_header_compiler=yes
2225else
2226 ac_header_compiler=no
2227fi
2228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2230$as_echo "$ac_header_compiler" >&6; }
2231
2232# Is the header present?
2233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2234$as_echo_n "checking $2 presence... " >&6; }
2235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236/* end confdefs.h. */
2237#include <$2>
2238_ACEOF
2239if ac_fn_c_try_cpp "$LINENO"; then :
2240 ac_header_preproc=yes
2241else
2242 ac_header_preproc=no
2243fi
5f64f7bd 2244rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2246$as_echo "$ac_header_preproc" >&6; }
2247
2248# So? What about this header?
2249case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2250 yes:no: )
2251 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2252$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2254$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2255 ;;
2256 no:yes:* )
2257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2258$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2260$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2262$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2264$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2266$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2267 ;;
2268esac
2269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2270$as_echo_n "checking for $2... " >&6; }
5f64f7bd 2271if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2272 $as_echo_n "(cached) " >&6
2273else
2274 eval "$3=\$ac_header_compiler"
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279fi
5f64f7bd 2280 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2281
2282} # ac_fn_c_check_header_mongrel
2283
2284# ac_fn_c_try_run LINENO
2285# ----------------------
2286# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2287# that executables *can* be run.
2288ac_fn_c_try_run ()
2289{
2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291 if { { ac_try="$ac_link"
2292case "(($ac_try" in
2293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2294 *) ac_try_echo=$ac_try;;
2295esac
2296eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2297$as_echo "$ac_try_echo"; } >&5
2298 (eval "$ac_link") 2>&5
2299 ac_status=$?
2300 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2301 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2302 { { case "(($ac_try" in
2303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2304 *) ac_try_echo=$ac_try;;
2305esac
2306eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2307$as_echo "$ac_try_echo"; } >&5
2308 (eval "$ac_try") 2>&5
2309 ac_status=$?
2310 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2311 test $ac_status = 0; }; }; then :
2312 ac_retval=0
2313else
2314 $as_echo "$as_me: program exited with status $ac_status" >&5
2315 $as_echo "$as_me: failed program was:" >&5
2316sed 's/^/| /' conftest.$ac_ext >&5
2317
2318 ac_retval=$ac_status
2319fi
2320 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
5f64f7bd 2321 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2322 as_fn_set_status $ac_retval
2323
2324} # ac_fn_c_try_run
2325
2326# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2327# -------------------------------------------------------
2328# Tests whether HEADER exists and can be compiled using the include files in
2329# INCLUDES, setting the cache variable VAR accordingly.
2330ac_fn_c_check_header_compile ()
2331{
2332 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2334$as_echo_n "checking for $2... " >&6; }
5f64f7bd 2335if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2336 $as_echo_n "(cached) " >&6
2337else
2338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2339/* end confdefs.h. */
2340$4
2341#include <$2>
2342_ACEOF
2343if ac_fn_c_try_compile "$LINENO"; then :
2344 eval "$3=yes"
2345else
2346 eval "$3=no"
2347fi
2348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349fi
2350eval ac_res=\$$3
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
5f64f7bd 2353 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2354
2355} # ac_fn_c_check_header_compile
2356
1fd182f0
PE
2357# ac_fn_c_try_link LINENO
2358# -----------------------
2359# Try to link conftest.$ac_ext, and return whether this succeeded.
2360ac_fn_c_try_link ()
2361{
2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2363 rm -f conftest.$ac_objext conftest$ac_exeext
2364 if { { ac_try="$ac_link"
2365case "(($ac_try" in
2366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2367 *) ac_try_echo=$ac_try;;
2368esac
2369eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2370$as_echo "$ac_try_echo"; } >&5
2371 (eval "$ac_link") 2>conftest.err
2372 ac_status=$?
2373 if test -s conftest.err; then
2374 grep -v '^ *+' conftest.err >conftest.er1
2375 cat conftest.er1 >&5
2376 mv -f conftest.er1 conftest.err
2377 fi
2378 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2379 test $ac_status = 0; } && {
2380 test -z "$ac_c_werror_flag" ||
2381 test ! -s conftest.err
2382 } && test -s conftest$ac_exeext && {
2383 test "$cross_compiling" = yes ||
2384 $as_test_x conftest$ac_exeext
2385 }; then :
2386 ac_retval=0
2387else
2388 $as_echo "$as_me: failed program was:" >&5
2389sed 's/^/| /' conftest.$ac_ext >&5
2390
2391 ac_retval=1
2392fi
2393 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2394 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2395 # interfere with the next link command; also delete a directory that is
2396 # left behind by Apple's compiler. We do this before executing the actions.
2397 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
5f64f7bd 2398 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1fd182f0
PE
2399 as_fn_set_status $ac_retval
2400
2401} # ac_fn_c_try_link
2402
5f64f7bd
GM
2403# ac_fn_c_check_decl LINENO SYMBOL VAR
2404# ------------------------------------
2405# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
067d23c9
KY
2406ac_fn_c_check_decl ()
2407{
2408 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5f64f7bd
GM
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2410$as_echo_n "checking whether $2 is declared... " >&6; }
2411if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2412 $as_echo_n "(cached) " >&6
2413else
2414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415/* end confdefs.h. */
2416$4
2417int
2418main ()
2419{
5f64f7bd
GM
2420#ifndef $2
2421 (void) $2;
067d23c9
KY
2422#endif
2423
2424 ;
2425 return 0;
2426}
2427_ACEOF
2428if ac_fn_c_try_compile "$LINENO"; then :
2429 eval "$3=yes"
2430else
2431 eval "$3=no"
2432fi
2433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2434fi
2435eval ac_res=\$$3
2436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2437$as_echo "$ac_res" >&6; }
5f64f7bd 2438 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2439
2440} # ac_fn_c_check_decl
2441
2442# ac_fn_c_check_header_preproc LINENO HEADER VAR
2443# ----------------------------------------------
2444# Tests whether HEADER is present, setting the cache variable VAR accordingly.
2445ac_fn_c_check_header_preproc ()
2446{
2447 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2449$as_echo_n "checking for $2... " >&6; }
5f64f7bd 2450if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2451 $as_echo_n "(cached) " >&6
2452else
2453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2454/* end confdefs.h. */
2455#include <$2>
2456_ACEOF
2457if ac_fn_c_try_cpp "$LINENO"; then :
2458 eval "$3=yes"
2459else
2460 eval "$3=no"
2461fi
5f64f7bd 2462rm -f conftest.err conftest.$ac_ext
067d23c9
KY
2463fi
2464eval ac_res=\$$3
2465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2466$as_echo "$ac_res" >&6; }
5f64f7bd 2467 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2468
2469} # ac_fn_c_check_header_preproc
2470
067d23c9
KY
2471# ac_fn_c_check_func LINENO FUNC VAR
2472# ----------------------------------
2473# Tests whether FUNC exists, setting the cache variable VAR accordingly
2474ac_fn_c_check_func ()
2475{
2476 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2478$as_echo_n "checking for $2... " >&6; }
5f64f7bd 2479if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
2480 $as_echo_n "(cached) " >&6
2481else
2482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2483/* end confdefs.h. */
2484/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2485 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2486#define $2 innocuous_$2
2487
2488/* System header to define __stub macros and hopefully few prototypes,
2489 which can conflict with char $2 (); below.
2490 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2491 <limits.h> exists even on freestanding compilers. */
2492
2493#ifdef __STDC__
2494# include <limits.h>
2495#else
2496# include <assert.h>
2497#endif
2498
2499#undef $2
2500
2501/* Override any GCC internal prototype to avoid an error.
2502 Use char because int might match the return type of a GCC
2503 builtin and then its argument prototype would still apply. */
2504#ifdef __cplusplus
2505extern "C"
2506#endif
2507char $2 ();
2508/* The GNU C library defines this for functions which it implements
2509 to always fail with ENOSYS. Some functions are actually named
2510 something starting with __ and the normal name is an alias. */
2511#if defined __stub_$2 || defined __stub___$2
2512choke me
2513#endif
2514
2515int
2516main ()
2517{
2518return $2 ();
2519 ;
2520 return 0;
2521}
2522_ACEOF
2523if ac_fn_c_try_link "$LINENO"; then :
2524 eval "$3=yes"
2525else
2526 eval "$3=no"
2527fi
2528rm -f core conftest.err conftest.$ac_objext \
2529 conftest$ac_exeext conftest.$ac_ext
2530fi
2531eval ac_res=\$$3
2532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2533$as_echo "$ac_res" >&6; }
5f64f7bd 2534 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
067d23c9
KY
2535
2536} # ac_fn_c_check_func
2537
7417b37c
GM
2538# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2539# ----------------------------------------------------
2540# Tries to find if the field MEMBER exists in type AGGR, after including
2541# INCLUDES, setting cache variable VAR accordingly.
2542ac_fn_c_check_member ()
2543{
2544 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2546$as_echo_n "checking for $2.$3... " >&6; }
2547if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2548 $as_echo_n "(cached) " >&6
2549else
2550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2551/* end confdefs.h. */
2552$5
2553int
2554main ()
2555{
2556static $2 ac_aggr;
2557if (ac_aggr.$3)
2558return 0;
2559 ;
2560 return 0;
2561}
2562_ACEOF
2563if ac_fn_c_try_compile "$LINENO"; then :
2564 eval "$4=yes"
2565else
2566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567/* end confdefs.h. */
2568$5
2569int
2570main ()
2571{
2572static $2 ac_aggr;
2573if (sizeof ac_aggr.$3)
2574return 0;
2575 ;
2576 return 0;
2577}
2578_ACEOF
2579if ac_fn_c_try_compile "$LINENO"; then :
2580 eval "$4=yes"
2581else
2582 eval "$4=no"
2583fi
2584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2585fi
2586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2587fi
2588eval ac_res=\$$4
2589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2590$as_echo "$ac_res" >&6; }
2591 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2592
2593} # ac_fn_c_check_member
2594
3e0be4ab
GM
2595# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2596# -------------------------------------------
2597# Tests whether TYPE exists after having included INCLUDES, setting cache
2598# variable VAR accordingly.
2599ac_fn_c_check_type ()
2600{
2601 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2603$as_echo_n "checking for $2... " >&6; }
2604if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2605 $as_echo_n "(cached) " >&6
2606else
2607 eval "$3=no"
2608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h. */
2610$4
2611int
2612main ()
2613{
2614if (sizeof ($2))
2615 return 0;
2616 ;
2617 return 0;
2618}
2619_ACEOF
2620if ac_fn_c_try_compile "$LINENO"; then :
2621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622/* end confdefs.h. */
2623$4
2624int
2625main ()
2626{
2627if (sizeof (($2)))
2628 return 0;
2629 ;
2630 return 0;
2631}
2632_ACEOF
2633if ac_fn_c_try_compile "$LINENO"; then :
2634
2635else
2636 eval "$3=yes"
2637fi
2638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2639fi
2640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2641fi
2642eval ac_res=\$$3
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2644$as_echo "$ac_res" >&6; }
2645 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2646
2647} # ac_fn_c_check_type
2648
5f90be1b
PE
2649# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2650# --------------------------------------------
2651# Tries to find the compile-time value of EXPR in a program that includes
2652# INCLUDES, setting VAR accordingly. Returns whether the value could be
2653# computed
2654ac_fn_c_compute_int ()
2655{
2656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2657 if test "$cross_compiling" = yes; then
2658 # Depending upon the size, compute the lo and hi bounds.
2659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h. */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) >= 0)];
2666test_array [0] = 0
2667
2668 ;
2669 return 0;
2670}
2671_ACEOF
2672if ac_fn_c_try_compile "$LINENO"; then :
2673 ac_lo=0 ac_mid=0
2674 while :; do
2675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2676/* end confdefs.h. */
2677$4
2678int
2679main ()
2680{
2681static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2682test_array [0] = 0
2683
2684 ;
2685 return 0;
2686}
2687_ACEOF
2688if ac_fn_c_try_compile "$LINENO"; then :
2689 ac_hi=$ac_mid; break
2690else
2691 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2692 if test $ac_lo -le $ac_mid; then
2693 ac_lo= ac_hi=
2694 break
2695 fi
2696 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2697fi
2698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2699 done
2700else
2701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2702/* end confdefs.h. */
2703$4
2704int
2705main ()
2706{
2707static int test_array [1 - 2 * !(($2) < 0)];
2708test_array [0] = 0
2709
2710 ;
2711 return 0;
2712}
2713_ACEOF
2714if ac_fn_c_try_compile "$LINENO"; then :
2715 ac_hi=-1 ac_mid=-1
2716 while :; do
2717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2718/* end confdefs.h. */
2719$4
2720int
2721main ()
2722{
2723static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2724test_array [0] = 0
2725
2726 ;
2727 return 0;
2728}
2729_ACEOF
2730if ac_fn_c_try_compile "$LINENO"; then :
2731 ac_lo=$ac_mid; break
2732else
2733 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2734 if test $ac_mid -le $ac_hi; then
2735 ac_lo= ac_hi=
2736 break
2737 fi
2738 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2739fi
2740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2741 done
2742else
2743 ac_lo= ac_hi=
2744fi
2745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2746fi
2747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2748# Binary search between lo and hi bounds.
2749while test "x$ac_lo" != "x$ac_hi"; do
2750 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h. */
2753$4
2754int
2755main ()
2756{
2757static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2758test_array [0] = 0
2759
2760 ;
2761 return 0;
2762}
2763_ACEOF
2764if ac_fn_c_try_compile "$LINENO"; then :
2765 ac_hi=$ac_mid
2766else
2767 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2768fi
2769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2770done
2771case $ac_lo in #((
2772?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2773'') ac_retval=1 ;;
2774esac
2775 else
2776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2777/* end confdefs.h. */
2778$4
2779static long int longval () { return $2; }
2780static unsigned long int ulongval () { return $2; }
2781#include <stdio.h>
2782#include <stdlib.h>
2783int
2784main ()
2785{
2786
2787 FILE *f = fopen ("conftest.val", "w");
2788 if (! f)
2789 return 1;
2790 if (($2) < 0)
2791 {
2792 long int i = longval ();
2793 if (i != ($2))
2794 return 1;
2795 fprintf (f, "%ld", i);
2796 }
2797 else
2798 {
2799 unsigned long int i = ulongval ();
2800 if (i != ($2))
2801 return 1;
2802 fprintf (f, "%lu", i);
2803 }
2804 /* Do not output a trailing newline, as this causes \r\n confusion
2805 on some platforms. */
2806 return ferror (f) || fclose (f) != 0;
2807
2808 ;
2809 return 0;
2810}
2811_ACEOF
2812if ac_fn_c_try_run "$LINENO"; then :
2813 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2814else
2815 ac_retval=1
2816fi
2817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2818 conftest.$ac_objext conftest.beam conftest.$ac_ext
2819rm -f conftest.val
2820
2821 fi
5f64f7bd 2822 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
5f90be1b
PE
2823 as_fn_set_status $ac_retval
2824
2825} # ac_fn_c_compute_int
067d23c9
KY
2826cat >config.log <<_ACEOF
2827This file contains any messages produced by compilers while
2828running configure, to aid debugging if configure makes a mistake.
2829
2830It was created by emacs $as_me 24.0.50, which was
5f64f7bd 2831generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
2832
2833 $ $0 $@
2834
2835_ACEOF
2836exec 5>>config.log
2837{
2838cat <<_ASUNAME
2839## --------- ##
2840## Platform. ##
2841## --------- ##
2842
2843hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2844uname -m = `(uname -m) 2>/dev/null || echo unknown`
2845uname -r = `(uname -r) 2>/dev/null || echo unknown`
2846uname -s = `(uname -s) 2>/dev/null || echo unknown`
2847uname -v = `(uname -v) 2>/dev/null || echo unknown`
2848
2849/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2850/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2851
2852/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2853/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2854/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2855/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2856/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2857/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2858/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2859
2860_ASUNAME
2861
2862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2863for as_dir in $PATH
2864do
2865 IFS=$as_save_IFS
2866 test -z "$as_dir" && as_dir=.
2867 $as_echo "PATH: $as_dir"
2868 done
2869IFS=$as_save_IFS
2870
2871} >&5
2872
2873cat >&5 <<_ACEOF
2874
2875
2876## ----------- ##
2877## Core tests. ##
2878## ----------- ##
2879
2880_ACEOF
2881
2882
2883# Keep a trace of the command line.
2884# Strip out --no-create and --no-recursion so they do not pile up.
2885# Strip out --silent because we don't want to record it for future runs.
2886# Also quote any args containing shell meta-characters.
2887# Make two passes to allow for proper duplicate-argument suppression.
2888ac_configure_args=
2889ac_configure_args0=
2890ac_configure_args1=
2891ac_must_keep_next=false
2892for ac_pass in 1 2
2893do
2894 for ac_arg
2895 do
2896 case $ac_arg in
2897 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2898 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2899 | -silent | --silent | --silen | --sile | --sil)
2900 continue ;;
2901 *\'*)
2902 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2903 esac
2904 case $ac_pass in
2905 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2906 2)
2907 as_fn_append ac_configure_args1 " '$ac_arg'"
2908 if test $ac_must_keep_next = true; then
2909 ac_must_keep_next=false # Got value, back to normal.
2910 else
2911 case $ac_arg in
2912 *=* | --config-cache | -C | -disable-* | --disable-* \
2913 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2914 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2915 | -with-* | --with-* | -without-* | --without-* | --x)
2916 case "$ac_configure_args0 " in
2917 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2918 esac
2919 ;;
2920 -* ) ac_must_keep_next=true ;;
2921 esac
2922 fi
2923 as_fn_append ac_configure_args " '$ac_arg'"
2924 ;;
2925 esac
2926 done
2927done
2928{ ac_configure_args0=; unset ac_configure_args0;}
2929{ ac_configure_args1=; unset ac_configure_args1;}
2930
2931# When interrupted or exit'd, cleanup temporary files, and complete
2932# config.log. We remove comments because anyway the quotes in there
2933# would cause problems or look ugly.
2934# WARNING: Use '\'' to represent an apostrophe within the trap.
2935# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2936trap 'exit_status=$?
2937 # Save into config.log some information that might help in debugging.
2938 {
2939 echo
2940
5f64f7bd
GM
2941 cat <<\_ASBOX
2942## ---------------- ##
067d23c9 2943## Cache variables. ##
5f64f7bd
GM
2944## ---------------- ##
2945_ASBOX
067d23c9
KY
2946 echo
2947 # The following way of writing the cache mishandles newlines in values,
2948(
2949 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2950 eval ac_val=\$$ac_var
2951 case $ac_val in #(
2952 *${as_nl}*)
2953 case $ac_var in #(
2954 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2955$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2956 esac
2957 case $ac_var in #(
2958 _ | IFS | as_nl) ;; #(
2959 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2960 *) { eval $ac_var=; unset $ac_var;} ;;
2961 esac ;;
2962 esac
2963 done
2964 (set) 2>&1 |
2965 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2966 *${as_nl}ac_space=\ *)
2967 sed -n \
2968 "s/'\''/'\''\\\\'\'''\''/g;
2969 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2970 ;; #(
2971 *)
2972 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2973 ;;
2974 esac |
2975 sort
2976)
2977 echo
2978
5f64f7bd
GM
2979 cat <<\_ASBOX
2980## ----------------- ##
067d23c9 2981## Output variables. ##
5f64f7bd
GM
2982## ----------------- ##
2983_ASBOX
067d23c9
KY
2984 echo
2985 for ac_var in $ac_subst_vars
2986 do
2987 eval ac_val=\$$ac_var
2988 case $ac_val in
2989 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2990 esac
2991 $as_echo "$ac_var='\''$ac_val'\''"
2992 done | sort
2993 echo
2994
2995 if test -n "$ac_subst_files"; then
5f64f7bd
GM
2996 cat <<\_ASBOX
2997## ------------------- ##
067d23c9 2998## File substitutions. ##
5f64f7bd
GM
2999## ------------------- ##
3000_ASBOX
067d23c9
KY
3001 echo
3002 for ac_var in $ac_subst_files
3003 do
3004 eval ac_val=\$$ac_var
3005 case $ac_val in
3006 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3007 esac
3008 $as_echo "$ac_var='\''$ac_val'\''"
3009 done | sort
3010 echo
3011 fi
3012
3013 if test -s confdefs.h; then
5f64f7bd
GM
3014 cat <<\_ASBOX
3015## ----------- ##
067d23c9 3016## confdefs.h. ##
5f64f7bd
GM
3017## ----------- ##
3018_ASBOX
067d23c9
KY
3019 echo
3020 cat confdefs.h
3021 echo
3022 fi
3023 test "$ac_signal" != 0 &&
3024 $as_echo "$as_me: caught signal $ac_signal"
3025 $as_echo "$as_me: exit $exit_status"
3026 } >&5
3027 rm -f core *.core core.conftest.* &&
3028 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3029 exit $exit_status
3030' 0
3031for ac_signal in 1 2 13 15; do
3032 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3033done
3034ac_signal=0
3035
3036# confdefs.h avoids OS command line length limits that DEFS can exceed.
3037rm -f -r conftest* confdefs.h
3038
3039$as_echo "/* confdefs.h */" > confdefs.h
3040
3041# Predefined preprocessor variables.
3042
3043cat >>confdefs.h <<_ACEOF
3044#define PACKAGE_NAME "$PACKAGE_NAME"
3045_ACEOF
3046
3047cat >>confdefs.h <<_ACEOF
3048#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3049_ACEOF
3050
3051cat >>confdefs.h <<_ACEOF
3052#define PACKAGE_VERSION "$PACKAGE_VERSION"
3053_ACEOF
3054
3055cat >>confdefs.h <<_ACEOF
3056#define PACKAGE_STRING "$PACKAGE_STRING"
3057_ACEOF
3058
3059cat >>confdefs.h <<_ACEOF
3060#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3061_ACEOF
3062
3063cat >>confdefs.h <<_ACEOF
3064#define PACKAGE_URL "$PACKAGE_URL"
3065_ACEOF
3066
3067
3068# Let the site file select an alternate cache file if it wants to.
3069# Prefer an explicitly selected file to automatically selected ones.
3070ac_site_file1=NONE
3071ac_site_file2=NONE
3072if test -n "$CONFIG_SITE"; then
5f64f7bd 3073 ac_site_file1=$CONFIG_SITE
067d23c9
KY
3074elif test "x$prefix" != xNONE; then
3075 ac_site_file1=$prefix/share/config.site
3076 ac_site_file2=$prefix/etc/config.site
3077else
3078 ac_site_file1=$ac_default_prefix/share/config.site
3079 ac_site_file2=$ac_default_prefix/etc/config.site
3080fi
3081for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3082do
3083 test "x$ac_site_file" = xNONE && continue
3084 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3086$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3087 sed 's/^/| /' "$ac_site_file" >&5
5f64f7bd 3088 . "$ac_site_file"
067d23c9
KY
3089 fi
3090done
3091
3092if test -r "$cache_file"; then
3093 # Some versions of bash will fail to source /dev/null (special files
3094 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3095 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3097$as_echo "$as_me: loading cache $cache_file" >&6;}
3098 case $cache_file in
3099 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3100 *) . "./$cache_file";;
3101 esac
3102 fi
3103else
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3105$as_echo "$as_me: creating cache $cache_file" >&6;}
3106 >$cache_file
3107fi
3108
3109as_fn_append ac_header_list " stdlib.h"
3110as_fn_append ac_header_list " unistd.h"
3111as_fn_append ac_header_list " sys/param.h"
6c051bab 3112as_fn_append ac_func_list " readlinkat"
7d2a1c5e 3113as_fn_append ac_func_list " dup2"
e275c824
PE
3114gl_getopt_required=GNU
3115as_fn_append ac_header_list " getopt.h"
4fda9c95
GM
3116as_fn_append ac_header_list " wchar.h"
3117as_fn_append ac_header_list " stdint.h"
3118as_fn_append ac_header_list " inttypes.h"
ae0d7250 3119as_fn_append ac_func_list " lstat"
067d23c9 3120as_fn_append ac_func_list " alarm"
3e0be4ab 3121as_fn_append ac_func_list " pthread_sigmask"
ae0d7250 3122as_fn_append ac_func_list " readlink"
6ad6792b 3123as_fn_append ac_header_list " sys/socket.h"
16c3e636 3124as_fn_append ac_func_list " tzset"
ae0d7250 3125as_fn_append ac_func_list " symlink"
5fa4ac76 3126as_fn_append ac_header_list " sys/stat.h"
1fd182f0
PE
3127as_fn_append ac_header_list " sys/time.h"
3128as_fn_append ac_func_list " localtime_r"
067d23c9
KY
3129# Check that the precious variables saved in the cache have kept the same
3130# value.
3131ac_cache_corrupted=false
3132for ac_var in $ac_precious_vars; do
3133 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3134 eval ac_new_set=\$ac_env_${ac_var}_set
3135 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3136 eval ac_new_val=\$ac_env_${ac_var}_value
3137 case $ac_old_set,$ac_new_set in
3138 set,)
3139 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3140$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3141 ac_cache_corrupted=: ;;
3142 ,set)
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3144$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3145 ac_cache_corrupted=: ;;
3146 ,);;
3147 *)
3148 if test "x$ac_old_val" != "x$ac_new_val"; then
3149 # differences in whitespace do not lead to failure.
3150 ac_old_val_w=`echo x $ac_old_val`
3151 ac_new_val_w=`echo x $ac_new_val`
3152 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3153 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3154$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3155 ac_cache_corrupted=:
3156 else
3157 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3158$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3159 eval $ac_var=\$ac_old_val
3160 fi
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3162$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3163 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3164$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3165 fi;;
3166 esac
3167 # Pass precious variables to config.status.
3168 if test "$ac_new_set" = set; then
3169 case $ac_new_val in
3170 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3171 *) ac_arg=$ac_var=$ac_new_val ;;
3172 esac
3173 case " $ac_configure_args " in
3174 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3175 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3176 esac
3177 fi
3178done
3179if $ac_cache_corrupted; then
3180 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3182 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3183$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
5f64f7bd 3184 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
067d23c9
KY
3185fi
3186## -------------------- ##
3187## Main body of script. ##
3188## -------------------- ##
3189
3190ac_ext=c
3191ac_cpp='$CPP $CPPFLAGS'
3192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3194ac_compiler_gnu=$ac_cv_c_compiler_gnu
3195
3196
3197ac_config_headers="$ac_config_headers src/config.h:src/config.in"
3198
3199
743c80a7 3200am__api_version='1.11'
067d23c9 3201
743c80a7
PE
3202ac_aux_dir=
3203for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5f64f7bd
GM
3204 for ac_t in install-sh install.sh shtool; do
3205 if test -f "$ac_dir/$ac_t"; then
3206 ac_aux_dir=$ac_dir
3207 ac_install_sh="$ac_aux_dir/$ac_t -c"
3208 break 2
3209 fi
3210 done
743c80a7
PE
3211done
3212if test -z "$ac_aux_dir"; then
5f64f7bd 3213 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
743c80a7 3214fi
067d23c9 3215
743c80a7
PE
3216# These three variables are undocumented and unsupported,
3217# and are intended to be withdrawn in a future Autoconf release.
3218# They can cause serious problems if a builder's source tree is in a directory
3219# whose full name contains unusual characters.
3220ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3221ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3222ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
067d23c9 3223
067d23c9 3224
743c80a7
PE
3225# Find a good install program. We prefer a C program (faster),
3226# so one script is as good as another. But avoid the broken or
3227# incompatible versions:
3228# SysV /etc/install, /usr/sbin/install
3229# SunOS /usr/etc/install
3230# IRIX /sbin/install
3231# AIX /bin/install
3232# AmigaOS /C/install, which installs bootblocks on floppy discs
3233# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3234# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3235# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3236# OS/2's system install, which has a completely different semantic
3237# ./install, which can be erroneously created by make from ./install.sh.
3238# Reject install programs that cannot install multiple files.
3239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3240$as_echo_n "checking for a BSD-compatible install... " >&6; }
3241if test -z "$INSTALL"; then
5f64f7bd 3242if test "${ac_cv_path_install+set}" = set; then :
743c80a7
PE
3243 $as_echo_n "(cached) " >&6
3244else
3245 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3246for as_dir in $PATH
3247do
3248 IFS=$as_save_IFS
3249 test -z "$as_dir" && as_dir=.
3250 # Account for people who put trailing slashes in PATH elements.
3251case $as_dir/ in #((
3252 ./ | .// | /[cC]/* | \
3253 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3254 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3255 /usr/ucb/* ) ;;
3256 *)
3257 # OSF1 and SCO ODT 3.0 have their own names for install.
3258 # Don't use installbsd from OSF since it installs stuff as root
3259 # by default.
3260 for ac_prog in ginstall scoinst install; do
3261 for ac_exec_ext in '' $ac_executable_extensions; do
3262 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3263 if test $ac_prog = install &&
3264 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3265 # AIX install. It has an incompatible calling convention.
3266 :
3267 elif test $ac_prog = install &&
3268 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3269 # program-specific install script used by HP pwplus--don't use.
3270 :
3271 else
3272 rm -rf conftest.one conftest.two conftest.dir
3273 echo one > conftest.one
3274 echo two > conftest.two
3275 mkdir conftest.dir
3276 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3277 test -s conftest.one && test -s conftest.two &&
3278 test -s conftest.dir/conftest.one &&
3279 test -s conftest.dir/conftest.two
3280 then
3281 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3282 break 3
3283 fi
3284 fi
3285 fi
3286 done
3287 done
3288 ;;
3289esac
067d23c9 3290
743c80a7
PE
3291 done
3292IFS=$as_save_IFS
067d23c9 3293
743c80a7 3294rm -rf conftest.one conftest.two conftest.dir
067d23c9 3295
067d23c9 3296fi
743c80a7
PE
3297 if test "${ac_cv_path_install+set}" = set; then
3298 INSTALL=$ac_cv_path_install
3299 else
3300 # As a last resort, use the slow shell script. Don't cache a
3301 # value for INSTALL within a source directory, because that will
3302 # break other packages using the cache if that directory is
3303 # removed, or if the value is a relative name.
3304 INSTALL=$ac_install_sh
3305 fi
067d23c9 3306fi
743c80a7
PE
3307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3308$as_echo "$INSTALL" >&6; }
067d23c9 3309
743c80a7
PE
3310# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3311# It thinks the first close brace ends the variable substitution.
3312test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
067d23c9 3313
743c80a7 3314test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
067d23c9 3315
743c80a7 3316test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
067d23c9 3317
743c80a7
PE
3318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3319$as_echo_n "checking whether build environment is sane... " >&6; }
3320# Just in case
3321sleep 1
3322echo timestamp > conftest.file
3323# Reject unsafe characters in $srcdir or the absolute working directory
3324# name. Accept space and tab only in the latter.
3325am_lf='
3326'
3327case `pwd` in
3328 *[\\\"\#\$\&\'\`$am_lf]*)
5f64f7bd 3329 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
743c80a7
PE
3330esac
3331case $srcdir in
3332 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
5f64f7bd 3333 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
743c80a7 3334esac
067d23c9 3335
743c80a7
PE
3336# Do `set' in a subshell so we don't clobber the current shell's
3337# arguments. Must try -L first in case configure is actually a
3338# symlink; some systems play weird games with the mod time of symlinks
3339# (eg FreeBSD returns the mod time of the symlink's containing
3340# directory).
3341if (
3342 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3343 if test "$*" = "X"; then
3344 # -L didn't work.
3345 set X `ls -t "$srcdir/configure" conftest.file`
3346 fi
3347 rm -f conftest.file
3348 if test "$*" != "X $srcdir/configure conftest.file" \
3349 && test "$*" != "X conftest.file $srcdir/configure"; then
3350
3351 # If neither matched, then we have a broken ls. This can happen
3352 # if, for instance, CONFIG_SHELL is bash and it inherits a
3353 # broken ls alias from the environment. This has actually
3354 # happened. Such a system could not be considered "sane".
5f64f7bd 3355 as_fn_error "ls -t appears to fail. Make sure there is not a broken
743c80a7
PE
3356alias in your environment" "$LINENO" 5
3357 fi
067d23c9 3358
743c80a7
PE
3359 test "$2" = conftest.file
3360 )
3361then
3362 # Ok.
3363 :
067d23c9 3364else
5f64f7bd 3365 as_fn_error "newly created file is older than distributed files!
743c80a7 3366Check your system clock" "$LINENO" 5
067d23c9 3367fi
743c80a7
PE
3368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3369$as_echo "yes" >&6; }
3370test "$program_prefix" != NONE &&
3371 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3372# Use a double $ so make ignores it.
3373test "$program_suffix" != NONE &&
3374 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3375# Double any \ or $.
3376# By default was `s,x,x', remove it if useless.
3377ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3378program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
067d23c9 3379
743c80a7
PE
3380# expand $ac_aux_dir to an absolute path
3381am_aux_dir=`cd $ac_aux_dir && pwd`
067d23c9 3382
743c80a7
PE
3383if test x"${MISSING+set}" != xset; then
3384 case $am_aux_dir in
3385 *\ * | *\ *)
3386 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3387 *)
3388 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3389 esac
067d23c9 3390fi
743c80a7
PE
3391# Use eval to expand $SHELL
3392if eval "$MISSING --run true"; then
3393 am_missing_run="$MISSING --run "
067d23c9 3394else
743c80a7
PE
3395 am_missing_run=
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3397$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
067d23c9
KY
3398fi
3399
743c80a7
PE
3400if test x"${install_sh}" != xset; then
3401 case $am_aux_dir in
3402 *\ * | *\ *)
3403 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3404 *)
3405 install_sh="\${SHELL} $am_aux_dir/install-sh"
3406 esac
067d23c9
KY
3407fi
3408
743c80a7
PE
3409# Installed binaries are usually stripped using `strip' when the user
3410# run `make install-strip'. However `strip' might not be the right
3411# tool to use in cross-compilation environments, therefore Automake
3412# will honor the `STRIP' environment variable to overrule this program.
3413if test "$cross_compiling" != no; then
3414 if test -n "$ac_tool_prefix"; then
3415 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3416set dummy ${ac_tool_prefix}strip; ac_word=$2
3417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3418$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 3419if test "${ac_cv_prog_STRIP+set}" = set; then :
743c80a7 3420 $as_echo_n "(cached) " >&6
067d23c9 3421else
743c80a7
PE
3422 if test -n "$STRIP"; then
3423 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3424else
3425as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3426for as_dir in $PATH
3427do
3428 IFS=$as_save_IFS
3429 test -z "$as_dir" && as_dir=.
3430 for ac_exec_ext in '' $ac_executable_extensions; do
3431 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3432 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3434 break 2
3435 fi
3436done
3437 done
3438IFS=$as_save_IFS
067d23c9
KY
3439
3440fi
067d23c9 3441fi
743c80a7
PE
3442STRIP=$ac_cv_prog_STRIP
3443if test -n "$STRIP"; then
3444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3445$as_echo "$STRIP" >&6; }
3446else
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3448$as_echo "no" >&6; }
067d23c9
KY
3449fi
3450
3451
067d23c9 3452fi
743c80a7
PE
3453if test -z "$ac_cv_prog_STRIP"; then
3454 ac_ct_STRIP=$STRIP
3455 # Extract the first word of "strip", so it can be a program name with args.
3456set dummy strip; ac_word=$2
3457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3458$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 3459if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
743c80a7
PE
3460 $as_echo_n "(cached) " >&6
3461else
3462 if test -n "$ac_ct_STRIP"; then
3463 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3464else
3465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3466for as_dir in $PATH
3467do
3468 IFS=$as_save_IFS
3469 test -z "$as_dir" && as_dir=.
3470 for ac_exec_ext in '' $ac_executable_extensions; do
3471 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3472 ac_cv_prog_ac_ct_STRIP="strip"
3473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3474 break 2
3475 fi
3476done
3477 done
3478IFS=$as_save_IFS
3479
3480fi
3481fi
3482ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3483if test -n "$ac_ct_STRIP"; then
3484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3485$as_echo "$ac_ct_STRIP" >&6; }
3486else
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3488$as_echo "no" >&6; }
3489fi
3490
3491 if test "x$ac_ct_STRIP" = x; then
3492 STRIP=":"
3493 else
3494 case $cross_compiling:$ac_tool_warned in
3495yes:)
3496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3498ac_tool_warned=yes ;;
3499esac
3500 STRIP=$ac_ct_STRIP
3501 fi
3502else
3503 STRIP="$ac_cv_prog_STRIP"
3504fi
3505
3506fi
3507INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3508
3509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3510$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3511if test -z "$MKDIR_P"; then
5f64f7bd 3512 if test "${ac_cv_path_mkdir+set}" = set; then :
743c80a7
PE
3513 $as_echo_n "(cached) " >&6
3514else
3515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3516for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3517do
3518 IFS=$as_save_IFS
3519 test -z "$as_dir" && as_dir=.
3520 for ac_prog in mkdir gmkdir; do
3521 for ac_exec_ext in '' $ac_executable_extensions; do
3522 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3523 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3524 'mkdir (GNU coreutils) '* | \
3525 'mkdir (coreutils) '* | \
3526 'mkdir (fileutils) '4.1*)
3527 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3528 break 3;;
3529 esac
3530 done
3531 done
3532 done
3533IFS=$as_save_IFS
3534
3535fi
3536
3537 test -d ./--version && rmdir ./--version
3538 if test "${ac_cv_path_mkdir+set}" = set; then
3539 MKDIR_P="$ac_cv_path_mkdir -p"
3540 else
3541 # As a last resort, use the slow shell script. Don't cache a
3542 # value for MKDIR_P within a source directory, because that will
3543 # break other packages using the cache if that directory is
3544 # removed, or if the value is a relative name.
3545 MKDIR_P="$ac_install_sh -d"
3546 fi
3547fi
3548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3549$as_echo "$MKDIR_P" >&6; }
3550
a451f14b 3551
743c80a7
PE
3552mkdir_p="$MKDIR_P"
3553case $mkdir_p in
3554 [\\/$]* | ?:[\\/]*) ;;
3555 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3556esac
3557
3558for ac_prog in gawk mawk nawk awk
3559do
3560 # Extract the first word of "$ac_prog", so it can be a program name with args.
3561set dummy $ac_prog; ac_word=$2
3562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3563$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 3564if test "${ac_cv_prog_AWK+set}" = set; then :
743c80a7
PE
3565 $as_echo_n "(cached) " >&6
3566else
3567 if test -n "$AWK"; then
3568 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3569else
3570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3571for as_dir in $PATH
3572do
3573 IFS=$as_save_IFS
3574 test -z "$as_dir" && as_dir=.
3575 for ac_exec_ext in '' $ac_executable_extensions; do
3576 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3577 ac_cv_prog_AWK="$ac_prog"
3578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3579 break 2
3580 fi
3581done
3582 done
3583IFS=$as_save_IFS
3584
3585fi
3586fi
3587AWK=$ac_cv_prog_AWK
3588if test -n "$AWK"; then
3589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3590$as_echo "$AWK" >&6; }
3591else
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3593$as_echo "no" >&6; }
3594fi
3595
3596
3597 test -n "$AWK" && break
3598done
3599
3600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3601$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3602set x ${MAKE-make}
3603ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5f64f7bd 3604if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
743c80a7
PE
3605 $as_echo_n "(cached) " >&6
3606else
3607 cat >conftest.make <<\_ACEOF
3608SHELL = /bin/sh
3609all:
3610 @echo '@@@%%%=$(MAKE)=@@@%%%'
3611_ACEOF
5f64f7bd 3612# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
743c80a7
PE
3613case `${MAKE-make} -f conftest.make 2>/dev/null` in
3614 *@@@%%%=?*=@@@%%%*)
3615 eval ac_cv_prog_make_${ac_make}_set=yes;;
3616 *)
3617 eval ac_cv_prog_make_${ac_make}_set=no;;
3618esac
3619rm -f conftest.make
3620fi
3621if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3623$as_echo "yes" >&6; }
3624 SET_MAKE=
3625else
3626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3627$as_echo "no" >&6; }
3628 SET_MAKE="MAKE=${MAKE-make}"
3629fi
3630
3631rm -rf .tst 2>/dev/null
3632mkdir .tst 2>/dev/null
3633if test -d .tst; then
3634 am__leading_dot=.
3635else
3636 am__leading_dot=_
3637fi
3638rmdir .tst 2>/dev/null
3639
3640if test "`cd $srcdir && pwd`" != "`pwd`"; then
3641 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3642 # is not polluted with repeated "-I."
3643 am__isrc=' -I$(srcdir)'
3644 # test to see if srcdir already configured
3645 if test -f $srcdir/config.status; then
5f64f7bd 3646 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
743c80a7
PE
3647 fi
3648fi
3649
3650# test whether we have cygpath
3651if test -z "$CYGPATH_W"; then
3652 if (cygpath --version) >/dev/null 2>/dev/null; then
3653 CYGPATH_W='cygpath -w'
3654 else
3655 CYGPATH_W=echo
3656 fi
3657fi
3658
3659
3660# Define the identity of the package.
3661 PACKAGE='emacs'
3662 VERSION='24.0.50'
3663
3664
3665cat >>confdefs.h <<_ACEOF
3666#define PACKAGE "$PACKAGE"
3667_ACEOF
3668
3669
3670cat >>confdefs.h <<_ACEOF
3671#define VERSION "$VERSION"
3672_ACEOF
3673
3674# Some tools Automake needs.
3675
3676ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3677
3678
3679AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3680
3681
3682AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3683
3684
3685AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3686
3687
3688MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3689
3690# We need awk for the "check" target. The system "awk" is bad on
3691# some platforms.
3692# Always define AMTAR for backward compatibility.
3693
3694AMTAR=${AMTAR-"${am_missing_run}tar"}
3695
3696am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3697
3698
3699
3700
3701
3702
3703
3704
3705lispdir='${datadir}/emacs/${version}/lisp'
3706locallisppath='${datadir}/emacs/${version}/site-lisp:'\
3707'${datadir}/emacs/site-lisp'
3708lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
3709etcdir='${datadir}/emacs/${version}/etc'
3710archlibdir='${libexecdir}/emacs/${version}/${configuration}'
3711docdir='${datadir}/emacs/${version}/etc'
3712gamedir='${localstatedir}/games/emacs'
3713
3714
3715
3716
3717# Check whether --with-pop was given.
3718if test "${with_pop+set}" = set; then :
3719 withval=$with_pop;
3720else
3721 with_pop=yes
3722fi
3723
3724if test "$with_pop" = yes; then
3725 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3726
3727fi
3728
3729
3730# Check whether --with-kerberos was given.
3731if test "${with_kerberos+set}" = set; then :
3732 withval=$with_kerberos;
3733else
3734 with_kerberos=no
3735fi
3736
3737if test "$with_kerberos" != no; then
3738 $as_echo "#define KERBEROS 1" >>confdefs.h
3739
3740fi
3741
3742
3743# Check whether --with-kerberos5 was given.
3744if test "${with_kerberos5+set}" = set; then :
3745 withval=$with_kerberos5;
3746else
3747 with_kerberos5=no
3748fi
3749
3750if test "${with_kerberos5}" != no; then
3751 if test "${with_kerberos}" = no; then
3752 with_kerberos=yes
3753 $as_echo "#define KERBEROS 1" >>confdefs.h
3754
3755 fi
3756
3757$as_echo "#define KERBEROS5 1" >>confdefs.h
3758
3759fi
3760
3761
3762# Check whether --with-hesiod was given.
3763if test "${with_hesiod+set}" = set; then :
3764 withval=$with_hesiod;
3765else
3766 with_hesiod=no
3767fi
3768
3769if test "$with_hesiod" != no; then
3770
3771$as_echo "#define HESIOD 1" >>confdefs.h
3772
3773fi
3774
3775
3776# Check whether --with-mmdf was given.
3777if test "${with_mmdf+set}" = set; then :
3778 withval=$with_mmdf;
3779else
3780 with_mmdf=no
3781fi
3782
3783if test "$with_mmdf" != no; then
3784
3785$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
3786
3787fi
3788
3789
3790# Check whether --with-mail-unlink was given.
3791if test "${with_mail_unlink+set}" = set; then :
3792 withval=$with_mail_unlink;
3793else
3794 with_mail_unlink=no
3795fi
3796
3797if test "$with_mail_unlink" != no; then
3798
3799$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
3800
3801fi
3802
3803
3804# Check whether --with-mailhost was given.
3805if test "${with_mailhost+set}" = set; then :
3806 withval=$with_mailhost;
3807cat >>confdefs.h <<_ACEOF
3808#define MAILHOST "$withval"
3809_ACEOF
3810
3811fi
3812
3813
3814
067d23c9
KY
3815# Check whether --with-sound was given.
3816if test "${with_sound+set}" = set; then :
3817 withval=$with_sound;
3818else
3819 with_sound=yes
3820fi
3821
3822
3823
3824# Check whether --with-sync-input was given.
3825if test "${with_sync_input+set}" = set; then :
3826 withval=$with_sync_input;
3827else
3828 with_sync_input=yes
3829fi
3830
3831if test "$with_sync_input" = yes; then
3832
3833$as_echo "#define SYNC_INPUT 1" >>confdefs.h
3834
3835fi
3836
3837
3838# Check whether --with-x-toolkit was given.
3839if test "${with_x_toolkit+set}" = set; then :
3840 withval=$with_x_toolkit; case "${withval}" in
3841 y | ye | yes ) val=gtk ;;
3842 n | no ) val=no ;;
3843 l | lu | luc | luci | lucid ) val=lucid ;;
3844 a | at | ath | athe | athen | athena ) val=athena ;;
3845 m | mo | mot | moti | motif ) val=motif ;;
3846 g | gt | gtk ) val=gtk ;;
3847 gtk3 ) val=gtk3 ;;
3848 * )
5f64f7bd 3849as_fn_error "\`--with-x-toolkit=$withval' is invalid;
067d23c9
KY
3850this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
3851\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
3852 ;;
3853 esac
3854 with_x_toolkit=$val
3855
3856fi
3857
3858
3859
0442dc7f
GM
3860# Check whether --with-wide-int was given.
3861if test "${with_wide_int+set}" = set; then :
3862 withval=$with_wide_int;
3863else
3864 with_wide_int=no
3865fi
3866
3867if test "$with_wide_int" = yes; then
3868
3869$as_echo "#define WIDE_EMACS_INT 1" >>confdefs.h
3870
3871fi
3872
3873
067d23c9
KY
3874# Check whether --with-xpm was given.
3875if test "${with_xpm+set}" = set; then :
3876 withval=$with_xpm;
3877else
3878 with_xpm=yes
3879fi
3880
3881
3882# Check whether --with-jpeg was given.
3883if test "${with_jpeg+set}" = set; then :
3884 withval=$with_jpeg;
3885else
3886 with_jpeg=yes
3887fi
3888
3889
3890# Check whether --with-tiff was given.
3891if test "${with_tiff+set}" = set; then :
3892 withval=$with_tiff;
3893else
3894 with_tiff=yes
3895fi
3896
3897
3898# Check whether --with-gif was given.
3899if test "${with_gif+set}" = set; then :
3900 withval=$with_gif;
3901else
3902 with_gif=yes
3903fi
3904
3905
3906# Check whether --with-png was given.
3907if test "${with_png+set}" = set; then :
3908 withval=$with_png;
3909else
3910 with_png=yes
3911fi
3912
3913
3914# Check whether --with-rsvg was given.
3915if test "${with_rsvg+set}" = set; then :
3916 withval=$with_rsvg;
3917else
3918 with_rsvg=yes
3919fi
3920
3921
3922# Check whether --with-xml2 was given.
3923if test "${with_xml2+set}" = set; then :
3924 withval=$with_xml2;
3925else
3926 with_xml2=yes
3927fi
3928
3929
3930# Check whether --with-imagemagick was given.
3931if test "${with_imagemagick+set}" = set; then :
3932 withval=$with_imagemagick;
3933else
3934 with_imagemagick=yes
3935fi
3936
3937
3938
3939# Check whether --with-xft was given.
3940if test "${with_xft+set}" = set; then :
3941 withval=$with_xft;
3942else
3943 with_xft=yes
3944fi
3945
3946
3947# Check whether --with-libotf was given.
3948if test "${with_libotf+set}" = set; then :
3949 withval=$with_libotf;
3950else
3951 with_libotf=yes
3952fi
3953
3954
3955# Check whether --with-m17n-flt was given.
3956if test "${with_m17n_flt+set}" = set; then :
3957 withval=$with_m17n_flt;
3958else
3959 with_m17n_flt=yes
3960fi
3961
3962
3963
3964# Check whether --with-toolkit-scroll-bars was given.
3965if test "${with_toolkit_scroll_bars+set}" = set; then :
3966 withval=$with_toolkit_scroll_bars;
3967else
3968 with_toolkit_scroll_bars=yes
3969fi
3970
3971
3972# Check whether --with-xaw3d was given.
3973if test "${with_xaw3d+set}" = set; then :
3974 withval=$with_xaw3d;
3975else
3976 with_xaw3d=yes
3977fi
3978
3979
3980# Check whether --with-xim was given.
3981if test "${with_xim+set}" = set; then :
3982 withval=$with_xim;
3983else
3984 with_xim=yes
3985fi
3986
3987
3988# Check whether --with-ns was given.
3989if test "${with_ns+set}" = set; then :
3990 withval=$with_ns;
3991else
3992 with_ns=no
3993fi
3994
3995
3996
3997# Check whether --with-gpm was given.
3998if test "${with_gpm+set}" = set; then :
3999 withval=$with_gpm;
4000else
4001 with_gpm=yes
4002fi
4003
4004
4005# Check whether --with-dbus was given.
4006if test "${with_dbus+set}" = set; then :
4007 withval=$with_dbus;
4008else
4009 with_dbus=yes
4010fi
4011
4012
4013# Check whether --with-gconf was given.
4014if test "${with_gconf+set}" = set; then :
4015 withval=$with_gconf;
4016else
4017 with_gconf=yes
4018fi
4019
4020
f527bd02
GM
4021# Check whether --with-gsettings was given.
4022if test "${with_gsettings+set}" = set; then :
4023 withval=$with_gsettings;
4024else
4025 with_gsettings=yes
4026fi
4027
4028
067d23c9
KY
4029# Check whether --with-selinux was given.
4030if test "${with_selinux+set}" = set; then :
4031 withval=$with_selinux;
4032else
4033 with_selinux=yes
4034fi
4035
4036
4037# Check whether --with-gnutls was given.
4038if test "${with_gnutls+set}" = set; then :
4039 withval=$with_gnutls;
4040else
4041 with_gnutls=yes
4042fi
4043
4044
4045## For the times when you want to build Emacs but don't have
4046## a suitable makeinfo, and can live without the manuals.
4047
4048# Check whether --with-makeinfo was given.
4049if test "${with_makeinfo+set}" = set; then :
4050 withval=$with_makeinfo;
4051else
4052 with_makeinfo=yes
4053fi
4054
4055
4056## This is an option because I do not know if all info/man support
4057## compressed files, nor how to test if they do so.
4058
4059# Check whether --with-compress-info was given.
4060if test "${with_compress_info+set}" = set; then :
4061 withval=$with_compress_info;
4062else
4063 with_compress_info=yes
4064fi
4065
4066if test $with_compress_info = yes; then
4067 GZIP_INFO=yes
4068else
4069 GZIP_INFO=
4070fi
4071
4072
4073
4074# Check whether --with-pkg-config-prog was given.
4075if test "${with_pkg_config_prog+set}" = set; then :
4076 withval=$with_pkg_config_prog;
4077fi
4078
4079if test "X${with_pkg_config_prog}" != X; then
4080 if test "${with_pkg_config_prog}" != yes; then
4081 PKG_CONFIG="${with_pkg_config_prog}"
4082 fi
4083fi
4084
4085CRT_DIR=
4086
4087# Check whether --with-crt-dir was given.
4088if test "${with_crt_dir+set}" = set; then :
4089 withval=$with_crt_dir;
4090fi
4091
4092CRT_DIR="${with_crt_dir}"
4093
4094
4fc5868a
UM
4095# Check whether --with-gameuser was given.
4096if test "${with_gameuser+set}" = set; then :
4097 withval=$with_gameuser;
4098fi
4099
4100test "X${with_gameuser}" != X && test "${with_gameuser}" != yes \
4101 && gameuser="${with_gameuser}"
4102test "X$gameuser" = X && gameuser=games
4103
4104
067d23c9
KY
4105# Check whether --with-gnustep-conf was given.
4106if test "${with_gnustep_conf+set}" = set; then :
4107 withval=$with_gnustep_conf;
4108fi
4109
4110test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
4111 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
4112test "X$GNUSTEP_CONFIG_FILE" = "X" && \
4113 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
4114
4115# Check whether --enable-ns-self-contained was given.
4116if test "${enable_ns_self_contained+set}" = set; then :
4117 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
4118else
4119 EN_NS_SELF_CONTAINED=yes
4120fi
4121
4122
4123# Check whether --enable-asserts was given.
4124if test "${enable_asserts+set}" = set; then :
4125 enableval=$enable_asserts; USE_XASSERTS=$enableval
4126else
4127 USE_XASSERTS=no
4128fi
4129
4130
4131# Check whether --enable-maintainer-mode was given.
4132if test "${enable_maintainer_mode+set}" = set; then :
4133 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
4134else
dccef361 4135 USE_MAINTAINER_MODE=yes
067d23c9
KY
4136fi
4137
4138if test $USE_MAINTAINER_MODE = yes; then
4139 MAINT=
4140else
4141 MAINT=#
4142fi
4143
4144
4145# Check whether --enable-locallisppath was given.
4146if test "${enable_locallisppath+set}" = set; then :
4147 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
4148 locallisppath=
4149elif test "${enableval}" != "yes"; then
4150 locallisppath=${enableval}
4151fi
4152fi
4153
4154
4155# Check whether --enable-checking was given.
4156if test "${enable_checking+set}" = set; then :
4157 enableval=$enable_checking; ac_checking_flags="${enableval}"
4158fi
4159
4160IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
4161for check in $ac_checking_flags
4162do
4163 case $check in
4164 # these set all the flags to specific states
4165 yes) ac_enable_checking=1 ;;
4166 no) ac_enable_checking= ;
4167 ac_gc_check_stringbytes= ;
4168 ac_gc_check_string_overrun= ;
4169 ac_gc_check_string_free_list= ;
4170 ac_xmalloc_overrun= ;
4171 ac_gc_check_cons_list= ;;
4172 all) ac_enable_checking=1 ;
4173 ac_gc_check_stringbytes=1 ;
4174 ac_gc_check_string_overrun=1 ;
4175 ac_gc_check_string_free_list=1 ;
4176 ac_xmalloc_overrun=1 ;
4177 ac_gc_check_cons_list=1 ;;
4178 # these enable particular checks
4179 stringbytes) ac_gc_check_stringbytes=1 ;;
4180 stringoverrun) ac_gc_check_string_overrun=1 ;;
4181 stringfreelist) ac_gc_check_string_free_list=1 ;;
4182 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4183 conslist) ac_gc_check_cons_list=1 ;;
5f64f7bd 4184 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
067d23c9
KY
4185 esac
4186done
4187IFS="$ac_save_IFS"
4188
4189if test x$ac_enable_checking != x ; then
4190
4191$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
4192
4193fi
4194if test x$ac_gc_check_stringbytes != x ; then
4195
4196$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
4197
4198fi
4fda9c95 4199if test x$ac_gc_check_string_overrun != x ; then
067d23c9
KY
4200
4201$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
4202
4203fi
4204if test x$ac_gc_check_string_free_list != x ; then
4205
4206$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
4207
4208fi
4209if test x$ac_xmalloc_overrun != x ; then
4210
4211$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
4212
4213fi
4214if test x$ac_gc_check_cons_list != x ; then
4215
4216$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
4217
4218fi
4219
4220# Check whether --enable-use-lisp-union-type was given.
4221if test "${enable_use_lisp_union_type+set}" = set; then :
4222 enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then
4223
4224$as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h
4225
4226fi
4227fi
4228
4229
4230
4231# Check whether --enable-profiling was given.
4232if test "${enable_profiling+set}" = set; then :
4233 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
4234fi
4235
4236if test x$ac_enable_profiling != x ; then
4237 PROFILING_CFLAGS="-DPROFILING=1 -pg"
4238else
4239 PROFILING_CFLAGS=
4240fi
4241
4242
4243# Check whether --enable-autodepend was given.
4244if test "${enable_autodepend+set}" = set; then :
4245 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
4246else
4247 ac_enable_autodepend=yes
4248fi
4249
4250
4251#### Make srcdir absolute, if it isn't already. It's important to
4252#### avoid running the path through pwd unnecessarily, since pwd can
4253#### give you automounter prefixes, which can go away. We do all this
4254#### so Emacs can find its files when run uninstalled.
4255## Make sure CDPATH doesn't affect cd (in case PWD is relative).
4256unset CDPATH
4257case "${srcdir}" in
4258 /* ) ;;
4259 . )
4260 ## We may be able to use the $PWD environment variable to make this
4261 ## absolute. But sometimes PWD is inaccurate.
4262 ## Note: we used to use ${PWD} at the end instead of `pwd`,
4263 ## but that tested only for a well-formed and valid PWD,
4264 ## it did not object when PWD was well-formed and valid but just wrong.
4265 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
4266 then
4267 srcdir="$PWD"
4268 else
4269 srcdir="`(cd ${srcdir}; pwd)`"
4270 fi
4271 ;;
4272 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
4273esac
4274
067d23c9
KY
4275#### Given the configuration name, set machfile and opsysfile to the
4276#### names of the m/*.h and s/*.h files we should use.
4277
4278### Canonicalize the configuration name.
4279
067d23c9
KY
4280# Make sure we can run config.sub.
4281$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5f64f7bd 4282 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
067d23c9
KY
4283
4284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4285$as_echo_n "checking build system type... " >&6; }
5f64f7bd 4286if test "${ac_cv_build+set}" = set; then :
067d23c9
KY
4287 $as_echo_n "(cached) " >&6
4288else
4289 ac_build_alias=$build_alias
4290test "x$ac_build_alias" = x &&
4291 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4292test "x$ac_build_alias" = x &&
5f64f7bd 4293 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
067d23c9 4294ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5f64f7bd 4295 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
067d23c9
KY
4296
4297fi
4298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4299$as_echo "$ac_cv_build" >&6; }
4300case $ac_cv_build in
4301*-*-*) ;;
5f64f7bd 4302*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
067d23c9
KY
4303esac
4304build=$ac_cv_build
4305ac_save_IFS=$IFS; IFS='-'
4306set x $ac_cv_build
4307shift
4308build_cpu=$1
4309build_vendor=$2
4310shift; shift
4311# Remember, the first character of IFS is used to create $*,
4312# except with old shells:
4313build_os=$*
4314IFS=$ac_save_IFS
4315case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4316
4317
4318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4319$as_echo_n "checking host system type... " >&6; }
5f64f7bd 4320if test "${ac_cv_host+set}" = set; then :
067d23c9
KY
4321 $as_echo_n "(cached) " >&6
4322else
4323 if test "x$host_alias" = x; then
4324 ac_cv_host=$ac_cv_build
4325else
4326 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5f64f7bd 4327 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
067d23c9
KY
4328fi
4329
4330fi
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4332$as_echo "$ac_cv_host" >&6; }
4333case $ac_cv_host in
4334*-*-*) ;;
5f64f7bd 4335*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
067d23c9
KY
4336esac
4337host=$ac_cv_host
4338ac_save_IFS=$IFS; IFS='-'
4339set x $ac_cv_host
4340shift
4341host_cpu=$1
4342host_vendor=$2
4343shift; shift
4344# Remember, the first character of IFS is used to create $*,
4345# except with old shells:
4346host_os=$*
4347IFS=$ac_save_IFS
4348case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4349
4350
4351canonical=$host
4352configuration=${host_alias-${build_alias-$host}}
4353
4354
4355
4356### If you add support for a new configuration, add code to this
4357### switch statement to recognize your configuration name and select
4358### the appropriate operating system and machine description files.
4359
4360### You would hope that you could choose an m/*.h file pretty much
4361### based on the machine portion of the configuration name, and an s/*.h
4362### file based on the operating system portion. However, it turns out
4363### that each m/*.h file is pretty manufacturer-specific - for
4364### example mips.h is MIPS
4365### So we basically have to have a special case for each
4366### configuration name.
4367###
4368### As far as handling version numbers on operating systems is
4369### concerned, make sure things will fail in a fixable way. If
4370### /etc/MACHINES doesn't say anything about version numbers, be
4371### prepared to handle anything reasonably. If version numbers
4372### matter, be sure /etc/MACHINES says something about it.
4373
4374machine='' opsys='' unported=no
4375case "${canonical}" in
4376
d6a003a8
AS
4377 ## GNU/Linux ports
4378 *-*-linux-gnu*)
4379 opsys=gnu-linux
4380 case ${canonical} in
4381 alpha*) machine=alpha ;;
4382 s390-*) machine=ibms390 ;;
4383 s390x-*) machine=ibms390x ;;
4384 powerpc*) machine=macppc ;;
4385 sparc*) machine=sparc ;;
4386 ia64*) machine=ia64 ;;
4387 m68k*) machine=m68k ;;
4388 x86_64*) machine=amdx86-64 ;;
4389 esac
4390 ;;
4391
067d23c9
KY
4392 ## FreeBSD ports
4393 *-*-freebsd* )
4394 opsys=freebsd
4395 case "${canonical}" in
4396 alpha*) machine=alpha ;;
4397 amd64-*|x86_64-*) machine=amdx86-64 ;;
067d23c9
KY
4398 ia64-*) machine=ia64 ;;
4399 i[3456]86-*) machine=intel386 ;;
4400 powerpc-*) machine=macppc ;;
4401 sparc-*) machine=sparc ;;
4402 sparc64-*) machine=sparc ;;
4403 esac
4404 ;;
4405
4406 ## FreeBSD kernel + glibc based userland
4407 *-*-kfreebsd*gnu* )
4408 opsys=gnu-kfreebsd
4409 case "${canonical}" in
4410 alpha*) machine=alpha ;;
4411 amd64-*|x86_64-*) machine=amdx86-64 ;;
4412 ia64-*) machine=ia64 ;;
4413 i[3456]86-*) machine=intel386 ;;
4414 powerpc-*) machine=macppc ;;
4415 sparc-*) machine=sparc ;;
4416 sparc64-*) machine=sparc ;;
4417 esac
4418 ;;
4419
4420 ## NetBSD ports
4421 *-*-netbsd* )
4422 opsys=netbsd
4423 case "${canonical}" in
4424 alpha*) machine=alpha ;;
4425 x86_64-*) machine=amdx86-64 ;;
067d23c9
KY
4426 i[3456]86-*) machine=intel386 ;;
4427 m68k-*) machine=m68k ;;
4428 powerpc-*) machine=macppc ;;
067d23c9
KY
4429 sparc*-) machine=sparc ;;
4430 vax-*) machine=vax ;;
4431 esac
4432 ;;
4433
4434 ## OpenBSD ports
4435 *-*-openbsd* )
4436 opsys=openbsd
4437 case "${canonical}" in
4438 alpha*) machine=alpha ;;
4439 x86_64-*) machine=amdx86-64 ;;
067d23c9
KY
4440 i386-*) machine=intel386 ;;
4441 powerpc-*) machine=macppc ;;
4442 sparc*) machine=sparc ;;
4443 vax-*) machine=vax ;;
4444 esac
4445 ;;
4446
067d23c9
KY
4447 ## Apple Darwin / Mac OS X
4448 *-apple-darwin* )
4449 case "${canonical}" in
4450 i[3456]86-* ) machine=intel386 ;;
4451 powerpc-* ) machine=macppc ;;
4452 x86_64-* ) machine=amdx86-64 ;;
4453 * ) unported=yes ;;
4454 esac
4455 opsys=darwin
4456 # Define CPP as follows to make autoconf work correctly.
4457 CPP="${CC-cc} -E -no-cpp-precomp"
4458 # Use fink packages if available.
4459 if test -d /sw/include && test -d /sw/lib; then
4460 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
4461 CPP="${CPP} ${GCC_TEST_OPTIONS}"
4462 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
4463 fi
4464 ;;
4465
4466 ## HP 9000 series 700 and 800, running HP/UX
4467 hppa*-hp-hpux10.2* )
d6a003a8 4468 opsys=hpux10-20
067d23c9
KY
4469 ;;
4470 hppa*-hp-hpux1[1-9]* )
d6a003a8 4471 opsys=hpux11
067d23c9
KY
4472 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
4473 ;;
4474
125c3718
PE
4475 ia64*-hp-hpux1[1-9]* )
4476 machine=hp800 opsys=hpux11
4477 ## FIXME. Peter O'Gorman reports that dumping using unexelf.o doesn't
4478 ## work either: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6811
4479 CANNOT_DUMP=yes
4480 ;;
4481
4482 hppa*-*-linux-gnu* )
4483 machine=hp800 opsys=gnu-linux
4484 ;;
4485
067d23c9 4486 ## IBM machines
067d23c9
KY
4487 rs6000-ibm-aix4.[23]* )
4488 machine=ibmrs6000 opsys=aix4-2
4489 ;;
4490 powerpc-ibm-aix4.[23]* )
4491 machine=ibmrs6000 opsys=aix4-2
4492 ;;
4493 rs6000-ibm-aix[56]* )
4494 machine=ibmrs6000 opsys=aix4-2
4495 ;;
4496 powerpc-ibm-aix[56]* )
4497 machine=ibmrs6000 opsys=aix4-2
4498 ;;
4499
067d23c9
KY
4500 ## Silicon Graphics machines
4501 ## Iris 4D
4502 mips-sgi-irix6.5 )
fd44db7f 4503 opsys=irix6-5
067d23c9
KY
4504 # Without defining _LANGUAGE_C, things get masked out in the headers
4505 # so that, for instance, grepping for `free' in stdlib.h fails and
4506 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
4507 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
4508 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
4509 ;;
4510
4511 ## Suns
067d23c9
KY
4512 *-sun-solaris* \
4513 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
4514 | x86_64-*-solaris2* | x86_64-*-sunos5*)
4515 case "${canonical}" in
4516 i[3456]86-*-* ) machine=intel386 ;;
4517 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
4518 sparc* ) machine=sparc ;;
4519 * ) unported=yes ;;
4520 esac
4521 case "${canonical}" in
4522 *-sunos5.6* | *-solaris2.6* )
4523 opsys=sol2-6
4524 NON_GNU_CPP=/usr/ccs/lib/cpp
4525 RANLIB="ar -ts"
4526 ;;
4527 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
4528 opsys=sol2-6
4529 emacs_check_sunpro_c=yes
4530 NON_GNU_CPP=/usr/ccs/lib/cpp
4531 ;;
4532 *-sunos5* | *-solaris* )
4533 opsys=sol2-10
4534 emacs_check_sunpro_c=yes
4535 NON_GNU_CPP=/usr/ccs/lib/cpp
4536 ;;
4537 esac
4538 ## Watch out for a compiler that we know will not work.
4539 case "${canonical}" in
4540 *-solaris* | *-sunos5* )
4541 if [ "x$CC" = x/usr/ucb/cc ]; then
4542 ## /usr/ucb/cc doesn't work;
4543 ## we should find some other compiler that does work.
4544 unset CC
4545 fi
4546 ;;
4547 *) ;;
4548 esac
4549 ;;
4550
067d23c9
KY
4551 ## Intel 386 machines where we don't care about the manufacturer.
4552 i[3456]86-*-* )
4553 machine=intel386
4554 case "${canonical}" in
4555 *-cygwin ) opsys=cygwin ;;
4556 *-darwin* ) opsys=darwin
4557 CPP="${CC-cc} -E -no-cpp-precomp"
4558 ;;
067d23c9
KY
4559 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
4560 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
4561 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
4562 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
4563 esac
4564 ;;
4565
067d23c9
KY
4566 * )
4567 unported=yes
4568 ;;
4569esac
4570
4571### If the code above didn't choose an operating system, just choose
4572### an operating system based on the configuration name. You really
4573### only want to use this when you have no idea what the right
4574### operating system is; if you know what operating systems a machine
4575### runs, it's cleaner to make it explicit in the case statement
4576### above.
4577if test x"${opsys}" = x; then
4578 case "${canonical}" in
4579 *-gnu* ) opsys=gnu ;;
4580 * )
4581 unported=yes
4582 ;;
4583 esac
4584fi
4585
4586
4587
4588if test $unported = yes; then
5f64f7bd 4589 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
067d23c9
KY
4590Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4591fi
4592
d6a003a8
AS
4593if test -n "$machine"; then
4594 machfile="m/${machine}.h"
4595else
4596 machfile=
4597fi
067d23c9
KY
4598opsysfile="s/${opsys}.h"
4599
4600
4601#### Choose a compiler.
4602test -n "$CC" && cc_specified=yes
4603
4604# Save the value of CFLAGS that the user specified.
4605SPECIFIED_CFLAGS="$CFLAGS"
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; }
5f64f7bd 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; }
5f64f7bd 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; }
5f64f7bd 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; }
5f64f7bd 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; }
5f64f7bd 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; }
5f64f7bd 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;}
5f64f7bd
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;}
5f64f7bd
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;}
5f64f7bd
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;}
5f64f7bd 5124as_fn_error "cannot run C compiled programs.
067d23c9 5125If you meant to cross compile, use \`--host'.
5f64f7bd 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; }
5f64f7bd 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;}
5f64f7bd
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; }
5f64f7bd 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; }
5f64f7bd 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; }
5f64f7bd 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; }
5f64f7bd 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]/_/'`
5f64f7bd 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
5714# Initialize gnulib right after verifying that the C compiler works.
5715if test -n "$ac_tool_prefix"; then
5716 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5717set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5719$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 5720if test "${ac_cv_prog_RANLIB+set}" = set; then :
743c80a7
PE
5721 $as_echo_n "(cached) " >&6
5722else
5723 if test -n "$RANLIB"; then
5724 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5725else
5726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5727for as_dir in $PATH
5728do
5729 IFS=$as_save_IFS
5730 test -z "$as_dir" && as_dir=.
5731 for ac_exec_ext in '' $ac_executable_extensions; do
5732 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5733 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5735 break 2
5736 fi
5737done
5738 done
5739IFS=$as_save_IFS
5740
5741fi
5742fi
5743RANLIB=$ac_cv_prog_RANLIB
5744if test -n "$RANLIB"; then
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5746$as_echo "$RANLIB" >&6; }
5747else
5748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749$as_echo "no" >&6; }
5750fi
5751
5752
5753fi
5754if test -z "$ac_cv_prog_RANLIB"; then
5755 ac_ct_RANLIB=$RANLIB
5756 # Extract the first word of "ranlib", so it can be a program name with args.
5757set dummy ranlib; ac_word=$2
5758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5759$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 5760if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
743c80a7
PE
5761 $as_echo_n "(cached) " >&6
5762else
5763 if test -n "$ac_ct_RANLIB"; then
5764 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5765else
5766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5767for as_dir in $PATH
5768do
5769 IFS=$as_save_IFS
5770 test -z "$as_dir" && as_dir=.
5771 for ac_exec_ext in '' $ac_executable_extensions; do
5772 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5773 ac_cv_prog_ac_ct_RANLIB="ranlib"
5774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5775 break 2
5776 fi
5777done
5778 done
5779IFS=$as_save_IFS
067d23c9
KY
5780
5781fi
743c80a7
PE
5782fi
5783ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5784if test -n "$ac_ct_RANLIB"; then
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5786$as_echo "$ac_ct_RANLIB" >&6; }
5787else
5788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5789$as_echo "no" >&6; }
5790fi
067d23c9 5791
743c80a7
PE
5792 if test "x$ac_ct_RANLIB" = x; then
5793 RANLIB=":"
5794 else
5795 case $cross_compiling:$ac_tool_warned in
5796yes:)
5797{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5798$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5799ac_tool_warned=yes ;;
5800esac
5801 RANLIB=$ac_ct_RANLIB
5802 fi
5803else
5804 RANLIB="$ac_cv_prog_RANLIB"
067d23c9
KY
5805fi
5806
743c80a7 5807
067d23c9
KY
5808ac_ext=c
5809ac_cpp='$CPP $CPPFLAGS'
5810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5812ac_compiler_gnu=$ac_cv_c_compiler_gnu
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5814$as_echo_n "checking how to run the C preprocessor... " >&6; }
5815# On Suns, sometimes $CPP names a directory.
5816if test -n "$CPP" && test -d "$CPP"; then
5817 CPP=
5818fi
5819if test -z "$CPP"; then
5f64f7bd 5820 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
5821 $as_echo_n "(cached) " >&6
5822else
5823 # Double quotes because CPP needs to be expanded
5824 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5825 do
5826 ac_preproc_ok=false
5827for ac_c_preproc_warn_flag in '' yes
5828do
5829 # Use a header file that comes with gcc, so configuring glibc
5830 # with a fresh cross-compiler works.
5831 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5832 # <limits.h> exists even on freestanding compilers.
5833 # On the NeXT, cc -E runs the code through the compiler's parser,
5834 # not just through cpp. "Syntax error" is here to catch this case.
5835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5836/* end confdefs.h. */
5837#ifdef __STDC__
5838# include <limits.h>
5839#else
5840# include <assert.h>
5841#endif
5842 Syntax error
5843_ACEOF
5844if ac_fn_c_try_cpp "$LINENO"; then :
5845
5846else
5847 # Broken: fails on valid input.
5848continue
5849fi
5f64f7bd 5850rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5851
5852 # OK, works on sane cases. Now check whether nonexistent headers
5853 # can be detected and how.
5854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5855/* end confdefs.h. */
5856#include <ac_nonexistent.h>
5857_ACEOF
5858if ac_fn_c_try_cpp "$LINENO"; then :
5859 # Broken: success on invalid input.
5860continue
5861else
5862 # Passes both tests.
5863ac_preproc_ok=:
5864break
5865fi
5f64f7bd 5866rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5867
5868done
5869# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5f64f7bd 5870rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5871if $ac_preproc_ok; then :
5872 break
5873fi
5874
5875 done
5876 ac_cv_prog_CPP=$CPP
5877
5878fi
5879 CPP=$ac_cv_prog_CPP
5880else
5881 ac_cv_prog_CPP=$CPP
5882fi
5883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5884$as_echo "$CPP" >&6; }
5885ac_preproc_ok=false
5886for ac_c_preproc_warn_flag in '' yes
5887do
5888 # Use a header file that comes with gcc, so configuring glibc
5889 # with a fresh cross-compiler works.
5890 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5891 # <limits.h> exists even on freestanding compilers.
5892 # On the NeXT, cc -E runs the code through the compiler's parser,
5893 # not just through cpp. "Syntax error" is here to catch this case.
5894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5895/* end confdefs.h. */
5896#ifdef __STDC__
5897# include <limits.h>
5898#else
5899# include <assert.h>
5900#endif
5901 Syntax error
5902_ACEOF
5903if ac_fn_c_try_cpp "$LINENO"; then :
5904
5905else
5906 # Broken: fails on valid input.
5907continue
5908fi
5f64f7bd 5909rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5910
5911 # OK, works on sane cases. Now check whether nonexistent headers
5912 # can be detected and how.
5913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5914/* end confdefs.h. */
5915#include <ac_nonexistent.h>
5916_ACEOF
5917if ac_fn_c_try_cpp "$LINENO"; then :
5918 # Broken: success on invalid input.
5919continue
5920else
5921 # Passes both tests.
5922ac_preproc_ok=:
5923break
5924fi
5f64f7bd 5925rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5926
5927done
5928# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5f64f7bd 5929rm -f conftest.err conftest.$ac_ext
067d23c9
KY
5930if $ac_preproc_ok; then :
5931
5932else
5933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5f64f7bd
GM
5935as_fn_error "C preprocessor \"$CPP\" fails sanity check
5936See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
5937fi
5938
5939ac_ext=c
5940ac_cpp='$CPP $CPPFLAGS'
5941ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5942ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5943ac_compiler_gnu=$ac_cv_c_compiler_gnu
5944
5945
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5947$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5f64f7bd 5948if test "${ac_cv_path_GREP+set}" = set; then :
067d23c9
KY
5949 $as_echo_n "(cached) " >&6
5950else
5951 if test -z "$GREP"; then
5952 ac_path_GREP_found=false
5953 # Loop through the user's path and test for each of PROGNAME-LIST
5954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5955for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5956do
5957 IFS=$as_save_IFS
5958 test -z "$as_dir" && as_dir=.
5959 for ac_prog in grep ggrep; do
5960 for ac_exec_ext in '' $ac_executable_extensions; do
5961 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5962 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5963# Check for GNU ac_path_GREP and select it if it is found.
5964 # Check for GNU $ac_path_GREP
5965case `"$ac_path_GREP" --version 2>&1` in
5966*GNU*)
5967 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5968*)
5969 ac_count=0
5970 $as_echo_n 0123456789 >"conftest.in"
5971 while :
5972 do
5973 cat "conftest.in" "conftest.in" >"conftest.tmp"
5974 mv "conftest.tmp" "conftest.in"
5975 cp "conftest.in" "conftest.nl"
5976 $as_echo 'GREP' >> "conftest.nl"
5977 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5978 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5979 as_fn_arith $ac_count + 1 && ac_count=$as_val
5980 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5981 # Best one so far, save it but keep looking for a better one
5982 ac_cv_path_GREP="$ac_path_GREP"
5983 ac_path_GREP_max=$ac_count
5984 fi
5985 # 10*(2^10) chars as input seems more than enough
5986 test $ac_count -gt 10 && break
5987 done
5988 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5989esac
5990
5991 $ac_path_GREP_found && break 3
5992 done
5993 done
5994 done
5995IFS=$as_save_IFS
5996 if test -z "$ac_cv_path_GREP"; then
5f64f7bd 5997 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
5998 fi
5999else
6000 ac_cv_path_GREP=$GREP
6001fi
6002
6003fi
6004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6005$as_echo "$ac_cv_path_GREP" >&6; }
6006 GREP="$ac_cv_path_GREP"
6007
6008
6009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6010$as_echo_n "checking for egrep... " >&6; }
5f64f7bd 6011if test "${ac_cv_path_EGREP+set}" = set; then :
067d23c9
KY
6012 $as_echo_n "(cached) " >&6
6013else
6014 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6015 then ac_cv_path_EGREP="$GREP -E"
6016 else
6017 if test -z "$EGREP"; then
6018 ac_path_EGREP_found=false
6019 # Loop through the user's path and test for each of PROGNAME-LIST
6020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6022do
6023 IFS=$as_save_IFS
6024 test -z "$as_dir" && as_dir=.
6025 for ac_prog in egrep; do
6026 for ac_exec_ext in '' $ac_executable_extensions; do
6027 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6028 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6029# Check for GNU ac_path_EGREP and select it if it is found.
6030 # Check for GNU $ac_path_EGREP
6031case `"$ac_path_EGREP" --version 2>&1` in
6032*GNU*)
6033 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6034*)
6035 ac_count=0
6036 $as_echo_n 0123456789 >"conftest.in"
6037 while :
6038 do
6039 cat "conftest.in" "conftest.in" >"conftest.tmp"
6040 mv "conftest.tmp" "conftest.in"
6041 cp "conftest.in" "conftest.nl"
6042 $as_echo 'EGREP' >> "conftest.nl"
6043 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6044 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6045 as_fn_arith $ac_count + 1 && ac_count=$as_val
6046 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6047 # Best one so far, save it but keep looking for a better one
6048 ac_cv_path_EGREP="$ac_path_EGREP"
6049 ac_path_EGREP_max=$ac_count
6050 fi
6051 # 10*(2^10) chars as input seems more than enough
6052 test $ac_count -gt 10 && break
6053 done
6054 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6055esac
6056
6057 $ac_path_EGREP_found && break 3
6058 done
6059 done
6060 done
6061IFS=$as_save_IFS
6062 if test -z "$ac_cv_path_EGREP"; then
5f64f7bd 6063 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
067d23c9
KY
6064 fi
6065else
6066 ac_cv_path_EGREP=$EGREP
6067fi
6068
6069 fi
6070fi
6071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6072$as_echo "$ac_cv_path_EGREP" >&6; }
6073 EGREP="$ac_cv_path_EGREP"
6074
6075
6076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6077$as_echo_n "checking for ANSI C header files... " >&6; }
5f64f7bd 6078if test "${ac_cv_header_stdc+set}" = set; then :
067d23c9
KY
6079 $as_echo_n "(cached) " >&6
6080else
6081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6082/* end confdefs.h. */
6083#include <stdlib.h>
6084#include <stdarg.h>
6085#include <string.h>
6086#include <float.h>
6087
6088int
6089main ()
6090{
6091
6092 ;
6093 return 0;
6094}
6095_ACEOF
6096if ac_fn_c_try_compile "$LINENO"; then :
6097 ac_cv_header_stdc=yes
6098else
6099 ac_cv_header_stdc=no
6100fi
6101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102
6103if test $ac_cv_header_stdc = yes; then
6104 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6106/* end confdefs.h. */
6107#include <string.h>
6108
6109_ACEOF
6110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6111 $EGREP "memchr" >/dev/null 2>&1; then :
6112
6113else
6114 ac_cv_header_stdc=no
6115fi
6116rm -f conftest*
6117
6118fi
6119
6120if test $ac_cv_header_stdc = yes; then
6121 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6123/* end confdefs.h. */
6124#include <stdlib.h>
6125
6126_ACEOF
6127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6128 $EGREP "free" >/dev/null 2>&1; then :
6129
6130else
6131 ac_cv_header_stdc=no
6132fi
6133rm -f conftest*
6134
6135fi
6136
6137if test $ac_cv_header_stdc = yes; then
6138 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6139 if test "$cross_compiling" = yes; then :
6140 :
6141else
6142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6143/* end confdefs.h. */
6144#include <ctype.h>
6145#include <stdlib.h>
6146#if ((' ' & 0x0FF) == 0x020)
6147# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6148# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6149#else
6150# define ISLOWER(c) \
6151 (('a' <= (c) && (c) <= 'i') \
6152 || ('j' <= (c) && (c) <= 'r') \
6153 || ('s' <= (c) && (c) <= 'z'))
6154# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6155#endif
6156
6157#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6158int
6159main ()
6160{
6161 int i;
6162 for (i = 0; i < 256; i++)
6163 if (XOR (islower (i), ISLOWER (i))
6164 || toupper (i) != TOUPPER (i))
6165 return 2;
6166 return 0;
6167}
6168_ACEOF
6169if ac_fn_c_try_run "$LINENO"; then :
6170
6171else
6172 ac_cv_header_stdc=no
6173fi
6174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6175 conftest.$ac_objext conftest.beam conftest.$ac_ext
6176fi
6177
6178fi
6179fi
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6181$as_echo "$ac_cv_header_stdc" >&6; }
6182if test $ac_cv_header_stdc = yes; then
6183
6184$as_echo "#define STDC_HEADERS 1" >>confdefs.h
6185
6186fi
6187
6188# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6189for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6190 inttypes.h stdint.h unistd.h
6191do :
6192 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6193ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6194"
5f64f7bd
GM
6195eval as_val=\$$as_ac_Header
6196 if test "x$as_val" = x""yes; then :
067d23c9
KY
6197 cat >>confdefs.h <<_ACEOF
6198#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6199_ACEOF
6200
6201fi
6202
6203done
6204
6205
6206
1fd182f0
PE
6207
6208
067d23c9 6209 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5f64f7bd 6210if test "x$ac_cv_header_minix_config_h" = x""yes; then :
067d23c9
KY
6211 MINIX=yes
6212else
6213 MINIX=
6214fi
6215
6216
6217 if test "$MINIX" = yes; then
6218
6219$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6220
6221
6222$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6223
6224
6225$as_echo "#define _MINIX 1" >>confdefs.h
6226
6227 fi
6228
1fd182f0
PE
6229 case "$host_os" in
6230 hpux*)
6231
6232$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6233
6234 ;;
6235 esac
6236
067d23c9
KY
6237
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6239$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5f64f7bd 6240if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
067d23c9
KY
6241 $as_echo_n "(cached) " >&6
6242else
6243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6244/* end confdefs.h. */
6245
1fd182f0
PE
6246# define __EXTENSIONS__ 1
6247 $ac_includes_default
067d23c9
KY
6248int
6249main ()
6250{
6251
6252 ;
6253 return 0;
6254}
6255_ACEOF
6256if ac_fn_c_try_compile "$LINENO"; then :
6257 ac_cv_safe_to_define___extensions__=yes
6258else
6259 ac_cv_safe_to_define___extensions__=no
6260fi
6261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6262fi
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6264$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6265 test $ac_cv_safe_to_define___extensions__ = yes &&
6266 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6267
6268 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6269
6270 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6271
6272 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6273
6274 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6275
6276
6277
1fd182f0
PE
6278
6279
6280
6281
6282
6d153f56
GM
6283 case $ac_cv_prog_cc_stdc in #(
6284 no) :
6285 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6286 *) :
6287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6288$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6289if test "${ac_cv_prog_cc_c99+set}" = set; then :
6290 $as_echo_n "(cached) " >&6
6291else
6292 ac_cv_prog_cc_c99=no
6293ac_save_CC=$CC
6294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6295/* end confdefs.h. */
6296#include <stdarg.h>
6297#include <stdbool.h>
6298#include <stdlib.h>
6299#include <wchar.h>
6300#include <stdio.h>
6301
6302// Check varargs macros. These examples are taken from C99 6.10.3.5.
6303#define debug(...) fprintf (stderr, __VA_ARGS__)
6304#define showlist(...) puts (#__VA_ARGS__)
6305#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6306static void
6307test_varargs_macros (void)
6308{
6309 int x = 1234;
6310 int y = 5678;
6311 debug ("Flag");
6312 debug ("X = %d\n", x);
6313 showlist (The first, second, and third items.);
6314 report (x>y, "x is %d but y is %d", x, y);
6315}
6316
6317// Check long long types.
6318#define BIG64 18446744073709551615ull
6319#define BIG32 4294967295ul
6320#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6321#if !BIG_OK
6322 your preprocessor is broken;
6323#endif
6324#if BIG_OK
6325#else
6326 your preprocessor is broken;
6327#endif
6328static long long int bignum = -9223372036854775807LL;
6329static unsigned long long int ubignum = BIG64;
6330
6331struct incomplete_array
6332{
6333 int datasize;
6334 double data[];
6335};
6336
6337struct named_init {
6338 int number;
6339 const wchar_t *name;
6340 double average;
6341};
6342
6343typedef const char *ccp;
6344
6345static inline int
6346test_restrict (ccp restrict text)
6347{
6348 // See if C++-style comments work.
6349 // Iterate through items via the restricted pointer.
6350 // Also check for declarations in for loops.
6351 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6352 continue;
6353 return 0;
6354}
6355
6356// Check varargs and va_copy.
6357static void
6358test_varargs (const char *format, ...)
6359{
6360 va_list args;
6361 va_start (args, format);
6362 va_list args_copy;
6363 va_copy (args_copy, args);
6364
6365 const char *str;
6366 int number;
6367 float fnumber;
6368
6369 while (*format)
6370 {
6371 switch (*format++)
6372 {
6373 case 's': // string
6374 str = va_arg (args_copy, const char *);
6375 break;
6376 case 'd': // int
6377 number = va_arg (args_copy, int);
6378 break;
6379 case 'f': // float
6380 fnumber = va_arg (args_copy, double);
6381 break;
6382 default:
6383 break;
6384 }
6385 }
6386 va_end (args_copy);
6387 va_end (args);
6388}
6389
6390int
6391main ()
6392{
6393
6394 // Check bool.
6395 _Bool success = false;
6396
6397 // Check restrict.
6398 if (test_restrict ("String literal") == 0)
6399 success = true;
6400 char *restrict newvar = "Another string";
6401
6402 // Check varargs.
6403 test_varargs ("s, d' f .", "string", 65, 34.234);
6404 test_varargs_macros ();
6405
6406 // Check flexible array members.
6407 struct incomplete_array *ia =
6408 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6409 ia->datasize = 10;
6410 for (int i = 0; i < ia->datasize; ++i)
6411 ia->data[i] = i * 1.234;
6412
6413 // Check named initializers.
6414 struct named_init ni = {
6415 .number = 34,
6416 .name = L"Test wide string",
6417 .average = 543.34343,
6418 };
6419
6420 ni.number = 58;
6421
6422 int dynamic_array[ni.number];
6423 dynamic_array[ni.number - 1] = 543;
6424
6425 // work around unused variable warnings
6426 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6427 || dynamic_array[ni.number - 1] != 543);
6428
6429 ;
6430 return 0;
6431}
6432_ACEOF
6433for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
6434do
6435 CC="$ac_save_CC $ac_arg"
6436 if ac_fn_c_try_compile "$LINENO"; then :
6437 ac_cv_prog_cc_c99=$ac_arg
6438fi
6439rm -f core conftest.err conftest.$ac_objext
6440 test "x$ac_cv_prog_cc_c99" != "xno" && break
6441done
6442rm -f conftest.$ac_ext
6443CC=$ac_save_CC
6444
6445fi
6446# AC_CACHE_VAL
6447case "x$ac_cv_prog_cc_c99" in
6448 x)
6449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6450$as_echo "none needed" >&6; } ;;
6451 xno)
6452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6453$as_echo "unsupported" >&6; } ;;
6454 *)
6455 CC="$CC $ac_cv_prog_cc_c99"
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6457$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6458esac
6459if test "x$ac_cv_prog_cc_c99" != xno; then :
6460 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6461else
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6463$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6464if test "${ac_cv_prog_cc_c89+set}" = set; then :
6465 $as_echo_n "(cached) " >&6
6466else
6467 ac_cv_prog_cc_c89=no
6468ac_save_CC=$CC
6469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6470/* end confdefs.h. */
6471#include <stdarg.h>
6472#include <stdio.h>
6473#include <sys/types.h>
6474#include <sys/stat.h>
6475/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6476struct buf { int x; };
6477FILE * (*rcsopen) (struct buf *, struct stat *, int);
6478static char *e (p, i)
6479 char **p;
6480 int i;
6481{
6482 return p[i];
6483}
6484static char *f (char * (*g) (char **, int), char **p, ...)
6485{
6486 char *s;
6487 va_list v;
6488 va_start (v,p);
6489 s = g (p, va_arg (v,int));
6490 va_end (v);
6491 return s;
6492}
6493
6494/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6495 function prototypes and stuff, but not '\xHH' hex character constants.
6496 These don't provoke an error unfortunately, instead are silently treated
6497 as 'x'. The following induces an error, until -std is added to get
6498 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6499 array size at least. It's necessary to write '\x00'==0 to get something
6500 that's true only with -std. */
6501int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6502
6503/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6504 inside strings and character constants. */
6505#define FOO(x) 'x'
6506int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6507
6508int test (int i, double x);
6509struct s1 {int (*f) (int a);};
6510struct s2 {int (*f) (double a);};
6511int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6512int argc;
6513char **argv;
6514int
6515main ()
6516{
6517return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6518 ;
6519 return 0;
6520}
6521_ACEOF
6522for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6523 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6524do
6525 CC="$ac_save_CC $ac_arg"
6526 if ac_fn_c_try_compile "$LINENO"; then :
6527 ac_cv_prog_cc_c89=$ac_arg
6528fi
6529rm -f core conftest.err conftest.$ac_objext
6530 test "x$ac_cv_prog_cc_c89" != "xno" && break
6531done
6532rm -f conftest.$ac_ext
6533CC=$ac_save_CC
6534
6535fi
6536# AC_CACHE_VAL
6537case "x$ac_cv_prog_cc_c89" in
6538 x)
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6540$as_echo "none needed" >&6; } ;;
6541 xno)
6542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6543$as_echo "unsupported" >&6; } ;;
6544 *)
6545 CC="$CC $ac_cv_prog_cc_c89"
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6547$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6548esac
6549if test "x$ac_cv_prog_cc_c89" != xno; then :
6550 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6551else
6552 ac_cv_prog_cc_stdc=no
6553fi
6554
6555fi
6556 ;;
6557esac
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6559$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6560 if test "${ac_cv_prog_cc_stdc+set}" = set; then :
6561 $as_echo_n "(cached) " >&6
6562fi
6563
6564 case $ac_cv_prog_cc_stdc in #(
6565 no) :
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6567$as_echo "unsupported" >&6; } ;; #(
6568 '') :
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6570$as_echo "none needed" >&6; } ;; #(
6571 *) :
6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6573$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6574esac
6575
1fd182f0
PE
6576
6577
4fc2b746 6578 # Code from module alloca-opt:
8d8af66d 6579 # Code from module allocator:
1fd182f0
PE
6580 # Code from module arg-nonnull:
6581 # Code from module c++defs:
6c051bab 6582 # Code from module careadlinkat:
942f733f 6583 # Code from module crypto/md5:
40e27e7f 6584 # Code from module crypto/sha1:
d87ffdb7
GM
6585 # Code from module crypto/sha256:
6586 # Code from module crypto/sha512:
36f13e16 6587 # Code from module dosname:
f737437b 6588 # Code from module dtoastr:
7d2a1c5e 6589 # Code from module dup2:
1fd182f0
PE
6590 # Code from module extensions:
6591
5fa4ac76 6592 # Code from module filemode:
1f5d53eb 6593 # Code from module getloadavg:
e275c824
PE
6594 # Code from module getopt-gnu:
6595 # Code from module getopt-posix:
6596 # Code from module gettext-h:
67342916 6597 # Code from module ignore-value:
1fd182f0
PE
6598 # Code from module include_next:
6599 # Code from module intprops:
4fda9c95 6600 # Code from module inttypes-incomplete:
ae0d7250 6601 # Code from module lstat:
1fd182f0
PE
6602 # Code from module mktime:
6603 # Code from module multiarch:
3e0be4ab 6604 # Code from module pthread_sigmask:
ae0d7250 6605 # Code from module readlink:
3e0be4ab
GM
6606 # Code from module signal:
6607 # Code from module sigprocmask:
6ad6792b 6608 # Code from module socklen:
6c051bab 6609 # Code from module ssize_t:
ae0d7250 6610 # Code from module stat:
6d153f56
GM
6611 # Code from module stdarg:
6612
16c3e636 6613 # Code from module stdbool:
1fd182f0 6614 # Code from module stddef:
5f90be1b 6615 # Code from module stdint:
6ad6792b 6616 # Code from module stdio:
1f5d53eb 6617 # Code from module stdlib:
16c3e636 6618 # Code from module strftime:
3e0be4ab
GM
6619 # Code from module strtoimax:
6620 # Code from module strtoll:
4fda9c95
GM
6621 # Code from module strtoull:
6622 # Code from module strtoumax:
ae0d7250 6623 # Code from module symlink:
5fa4ac76 6624 # Code from module sys_stat:
1fd182f0
PE
6625 # Code from module time:
6626 # Code from module time_r:
d87ffdb7 6627 # Code from module u64:
e275c824 6628 # Code from module unistd:
4fda9c95 6629 # Code from module verify:
1fd182f0
PE
6630 # Code from module warn-on-use:
6631
6632
6633# On Suns, sometimes $CPP names a directory.
6634if test -n "$CPP" && test -d "$CPP"; then
6635 CPP=
6636fi
6637
6638## If not using gcc, and on Solaris, and no CPP specified, see if
6639## using a Sun compiler, which needs -Xs to prevent whitespace.
6640if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
6641 test x"$CPP" = x; then
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
6643$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
5f64f7bd 6644 if test "${emacs_cv_sunpro_c+set}" = set; then :
1fd182f0
PE
6645 $as_echo_n "(cached) " >&6
6646else
6647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6648/* end confdefs.h. */
6649
6650int
6651main ()
6652{
6653#ifndef __SUNPRO_C
6654fail;
6655#endif
6656
6657 ;
6658 return 0;
6659}
6660_ACEOF
6661if ac_fn_c_try_link "$LINENO"; then :
6662 emacs_cv_sunpro_c=yes
6663else
6664 emacs_cv_sunpro_c=no
6665fi
6666rm -f core conftest.err conftest.$ac_objext \
6667 conftest$ac_exeext conftest.$ac_ext
6668fi
6669
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
6671$as_echo "$emacs_cv_sunpro_c" >&6; }
6672
6673 if test x"$emacs_cv_sunpro_c" = xyes; then
6674 NON_GNU_CPP="$CC -E -Xs"
6675 fi
6676fi
6677
6678#### Some systems specify a CPP to use unless we are using GCC.
6679#### Now that we know whether we are using GCC, we can decide whether
6680#### to use that one.
6681if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
6682then
6683 CPP="$NON_GNU_CPP"
6684fi
6685
6686#### Some systems specify a CC to use unless we are using GCC.
6687#### Now that we know whether we are using GCC, we can decide whether
6688#### to use that one.
6689if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
6690 test x$cc_specified != xyes
6691then
6692 CC="$NON_GNU_CC"
6693fi
6694
6695if test x$GCC = xyes; then
6696 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
6697else
6698 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
6699fi
6700
067d23c9
KY
6701### Use -Wdeclaration-after-statement if the compiler supports it
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
6703$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
6704SAVE_CFLAGS="$CFLAGS"
6705CFLAGS="$CFLAGS -Wdeclaration-after-statement"
6706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6707/* end confdefs.h. */
6708
6709int
6710main ()
6711{
6712
6713 ;
6714 return 0;
6715}
6716_ACEOF
6717if ac_fn_c_try_compile "$LINENO"; then :
6718 has_option=yes
6719else
6720 has_option=no
6721fi
6722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6723if test $has_option = yes; then
6724 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
6725fi
6726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
6727$as_echo "$has_option" >&6; }
6728CFLAGS="$SAVE_CFLAGS"
6729unset has_option
6730unset SAVE_CFLAGS
6731
6732### Use -Wold-style-definition if the compiler supports it
6733# This can be removed when conversion to standard C is finished.
6734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5
6735$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; }
6736SAVE_CFLAGS="$CFLAGS"
6737CFLAGS="$CFLAGS -Wold-style-definition"
6738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6739/* end confdefs.h. */
6740
6741int
6742main ()
6743{
6744
6745 ;
6746 return 0;
6747}
6748_ACEOF
6749if ac_fn_c_try_compile "$LINENO"; then :
6750 has_option=yes
6751else
6752 has_option=no
6753fi
6754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6755if test $has_option = yes; then
6756 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
6757fi
6758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
6759$as_echo "$has_option" >&6; }
6760CFLAGS="$SAVE_CFLAGS"
6761unset has_option
6762unset SAVE_CFLAGS
6763
6764### Use -Wimplicit-function-declaration if the compiler supports it
6765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5
6766$as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; }
6767SAVE_CFLAGS="$CFLAGS"
6768CFLAGS="$CFLAGS -Wimplicit-function-declaration"
6769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6770/* end confdefs.h. */
6771
6772int
6773main ()
6774{
6775
6776 ;
6777 return 0;
6778}
6779_ACEOF
6780if ac_fn_c_try_compile "$LINENO"; then :
6781 has_option=yes
6782else
6783 has_option=no
6784fi
6785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6786if test $has_option = yes; then
6787 C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH"
6788fi
6789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
6790$as_echo "$has_option" >&6; }
6791CFLAGS="$SAVE_CFLAGS"
6792unset has_option
6793unset SAVE_CFLAGS
6794
6795
6796
6797
6798#### Some other nice autoconf tests.
6799
6800ac_ext=c
6801ac_cpp='$CPP $CPPFLAGS'
6802ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6803ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6804ac_compiler_gnu=$ac_cv_c_compiler_gnu
6805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6806$as_echo_n "checking how to run the C preprocessor... " >&6; }
6807# On Suns, sometimes $CPP names a directory.
6808if test -n "$CPP" && test -d "$CPP"; then
6809 CPP=
6810fi
6811if test -z "$CPP"; then
5f64f7bd 6812 if test "${ac_cv_prog_CPP+set}" = set; then :
067d23c9
KY
6813 $as_echo_n "(cached) " >&6
6814else
6815 # Double quotes because CPP needs to be expanded
6816 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6817 do
6818 ac_preproc_ok=false
6819for ac_c_preproc_warn_flag in '' yes
6820do
6821 # Use a header file that comes with gcc, so configuring glibc
6822 # with a fresh cross-compiler works.
6823 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6824 # <limits.h> exists even on freestanding compilers.
6825 # On the NeXT, cc -E runs the code through the compiler's parser,
6826 # not just through cpp. "Syntax error" is here to catch this case.
6827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6828/* end confdefs.h. */
6829#ifdef __STDC__
6830# include <limits.h>
6831#else
6832# include <assert.h>
6833#endif
6834 Syntax error
6835_ACEOF
6836if ac_fn_c_try_cpp "$LINENO"; then :
6837
6838else
6839 # Broken: fails on valid input.
6840continue
6841fi
5f64f7bd 6842rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6843
6844 # OK, works on sane cases. Now check whether nonexistent headers
6845 # can be detected and how.
6846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6847/* end confdefs.h. */
6848#include <ac_nonexistent.h>
6849_ACEOF
6850if ac_fn_c_try_cpp "$LINENO"; then :
6851 # Broken: success on invalid input.
6852continue
6853else
6854 # Passes both tests.
6855ac_preproc_ok=:
6856break
6857fi
5f64f7bd 6858rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6859
6860done
6861# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5f64f7bd 6862rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6863if $ac_preproc_ok; then :
6864 break
6865fi
6866
6867 done
6868 ac_cv_prog_CPP=$CPP
6869
6870fi
6871 CPP=$ac_cv_prog_CPP
6872else
6873 ac_cv_prog_CPP=$CPP
6874fi
6875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6876$as_echo "$CPP" >&6; }
6877ac_preproc_ok=false
6878for ac_c_preproc_warn_flag in '' yes
6879do
6880 # Use a header file that comes with gcc, so configuring glibc
6881 # with a fresh cross-compiler works.
6882 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6883 # <limits.h> exists even on freestanding compilers.
6884 # On the NeXT, cc -E runs the code through the compiler's parser,
6885 # not just through cpp. "Syntax error" is here to catch this case.
6886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6887/* end confdefs.h. */
6888#ifdef __STDC__
6889# include <limits.h>
6890#else
6891# include <assert.h>
6892#endif
6893 Syntax error
6894_ACEOF
6895if ac_fn_c_try_cpp "$LINENO"; then :
6896
6897else
6898 # Broken: fails on valid input.
6899continue
6900fi
5f64f7bd 6901rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6902
6903 # OK, works on sane cases. Now check whether nonexistent headers
6904 # can be detected and how.
6905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906/* end confdefs.h. */
6907#include <ac_nonexistent.h>
6908_ACEOF
6909if ac_fn_c_try_cpp "$LINENO"; then :
6910 # Broken: success on invalid input.
6911continue
6912else
6913 # Passes both tests.
6914ac_preproc_ok=:
6915break
6916fi
5f64f7bd 6917rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6918
6919done
6920# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5f64f7bd 6921rm -f conftest.err conftest.$ac_ext
067d23c9
KY
6922if $ac_preproc_ok; then :
6923
6924else
6925 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5f64f7bd
GM
6927as_fn_error "C preprocessor \"$CPP\" fails sanity check
6928See \`config.log' for more details." "$LINENO" 5; }
067d23c9
KY
6929fi
6930
6931ac_ext=c
6932ac_cpp='$CPP $CPPFLAGS'
6933ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6934ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6935ac_compiler_gnu=$ac_cv_c_compiler_gnu
6936
067d23c9
KY
6937
6938if test "x$RANLIB" = x; then
6939 if test -n "$ac_tool_prefix"; then
6940 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6941set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6943$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 6944if test "${ac_cv_prog_RANLIB+set}" = set; then :
067d23c9
KY
6945 $as_echo_n "(cached) " >&6
6946else
6947 if test -n "$RANLIB"; then
6948 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6949else
6950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6951for as_dir in $PATH
6952do
6953 IFS=$as_save_IFS
6954 test -z "$as_dir" && as_dir=.
6955 for ac_exec_ext in '' $ac_executable_extensions; do
6956 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6957 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6959 break 2
6960 fi
6961done
6962 done
6963IFS=$as_save_IFS
6964
6965fi
6966fi
6967RANLIB=$ac_cv_prog_RANLIB
6968if test -n "$RANLIB"; then
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6970$as_echo "$RANLIB" >&6; }
6971else
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6973$as_echo "no" >&6; }
6974fi
6975
6976
6977fi
6978if test -z "$ac_cv_prog_RANLIB"; then
6979 ac_ct_RANLIB=$RANLIB
6980 # Extract the first word of "ranlib", so it can be a program name with args.
6981set dummy ranlib; ac_word=$2
6982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6983$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 6984if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
067d23c9
KY
6985 $as_echo_n "(cached) " >&6
6986else
6987 if test -n "$ac_ct_RANLIB"; then
6988 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6989else
6990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6991for as_dir in $PATH
6992do
6993 IFS=$as_save_IFS
6994 test -z "$as_dir" && as_dir=.
6995 for ac_exec_ext in '' $ac_executable_extensions; do
6996 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6997 ac_cv_prog_ac_ct_RANLIB="ranlib"
6998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6999 break 2
7000 fi
7001done
7002 done
7003IFS=$as_save_IFS
7004
7005fi
7006fi
7007ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7008if test -n "$ac_ct_RANLIB"; then
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7010$as_echo "$ac_ct_RANLIB" >&6; }
7011else
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7013$as_echo "no" >&6; }
7014fi
7015
7016 if test "x$ac_ct_RANLIB" = x; then
7017 RANLIB=":"
7018 else
7019 case $cross_compiling:$ac_tool_warned in
7020yes:)
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7022$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7023ac_tool_warned=yes ;;
7024esac
7025 RANLIB=$ac_ct_RANLIB
7026 fi
7027else
7028 RANLIB="$ac_cv_prog_RANLIB"
7029fi
7030
7031fi
7032
7033## Although we're running on an amd64 kernel, we're actually compiling for
7034## the x86 architecture. The user should probably have provided an
7035## explicit --build to `configure', but if everything else than the kernel
7036## is running in i386 mode, we can help them out.
7037if test "$machine" = "amdx86-64"; then
7038 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
5f64f7bd 7039if test "x$ac_cv_have_decl_i386" = x""yes; then :
067d23c9
KY
7040
7041fi
7042
7043 if test "$ac_cv_have_decl_i386" = "yes"; then
7044 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
7045 machine=intel386
7046 machfile="m/${machine}.h"
7047 fi
7048fi
7049
7050# Extract the first word of "install-info", so it can be a program name with args.
7051set dummy install-info; ac_word=$2
7052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7053$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 7054if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
7055 $as_echo_n "(cached) " >&6
7056else
7057 case $INSTALL_INFO in
7058 [\\/]* | ?:[\\/]*)
7059 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7060 ;;
7061 *)
7062 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7063for as_dir in $PATH
7064do
7065 IFS=$as_save_IFS
7066 test -z "$as_dir" && as_dir=.
7067 for ac_exec_ext in '' $ac_executable_extensions; do
7068 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7069 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7071 break 2
7072 fi
7073done
7074 done
7075IFS=$as_save_IFS
7076
7077 ;;
7078esac
7079fi
7080INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7081if test -n "$INSTALL_INFO"; then
7082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7083$as_echo "$INSTALL_INFO" >&6; }
7084else
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7086$as_echo "no" >&6; }
7087fi
7088
7089
7090# Extract the first word of "install-info", so it can be a program name with args.
7091set dummy install-info; ac_word=$2
7092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7093$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 7094if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
7095 $as_echo_n "(cached) " >&6
7096else
7097 case $INSTALL_INFO in
7098 [\\/]* | ?:[\\/]*)
7099 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7100 ;;
7101 *)
7102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7103for as_dir in /usr/sbin
7104do
7105 IFS=$as_save_IFS
7106 test -z "$as_dir" && as_dir=.
7107 for ac_exec_ext in '' $ac_executable_extensions; do
7108 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7109 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7111 break 2
7112 fi
7113done
7114 done
7115IFS=$as_save_IFS
7116
7117 ;;
7118esac
7119fi
7120INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7121if test -n "$INSTALL_INFO"; then
7122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7123$as_echo "$INSTALL_INFO" >&6; }
7124else
7125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7126$as_echo "no" >&6; }
7127fi
7128
7129
7130# Extract the first word of "install-info", so it can be a program name with args.
7131set dummy install-info; ac_word=$2
7132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7133$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 7134if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
067d23c9
KY
7135 $as_echo_n "(cached) " >&6
7136else
7137 case $INSTALL_INFO in
7138 [\\/]* | ?:[\\/]*)
7139 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
7140 ;;
7141 *)
7142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7143for as_dir in /sbin
7144do
7145 IFS=$as_save_IFS
7146 test -z "$as_dir" && as_dir=.
7147 for ac_exec_ext in '' $ac_executable_extensions; do
7148 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7149 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
7150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7151 break 2
7152 fi
7153done
7154 done
7155IFS=$as_save_IFS
7156
7157 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
7158 ;;
7159esac
7160fi
7161INSTALL_INFO=$ac_cv_path_INSTALL_INFO
7162if test -n "$INSTALL_INFO"; then
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
7164$as_echo "$INSTALL_INFO" >&6; }
7165else
7166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7167$as_echo "no" >&6; }
7168fi
7169
7170
7171# Extract the first word of "gzip", so it can be a program name with args.
7172set dummy gzip; ac_word=$2
7173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7174$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 7175if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
067d23c9
KY
7176 $as_echo_n "(cached) " >&6
7177else
7178 case $GZIP_PROG in
7179 [\\/]* | ?:[\\/]*)
7180 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
7181 ;;
7182 *)
7183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7184for as_dir in $PATH
7185do
7186 IFS=$as_save_IFS
7187 test -z "$as_dir" && as_dir=.
7188 for ac_exec_ext in '' $ac_executable_extensions; do
7189 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7190 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
7191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7192 break 2
7193 fi
7194done
7195 done
7196IFS=$as_save_IFS
7197
7198 ;;
7199esac
7200fi
7201GZIP_PROG=$ac_cv_path_GZIP_PROG
7202if test -n "$GZIP_PROG"; then
7203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
7204$as_echo "$GZIP_PROG" >&6; }
7205else
7206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7207$as_echo "no" >&6; }
7208fi
7209
7210
7211
7212
7213## Need makeinfo >= 4.6 (?) to build the manuals.
7214# Extract the first word of "makeinfo", so it can be a program name with args.
7215set dummy makeinfo; ac_word=$2
7216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7217$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 7218if test "${ac_cv_path_MAKEINFO+set}" = set; then :
067d23c9
KY
7219 $as_echo_n "(cached) " >&6
7220else
7221 case $MAKEINFO in
7222 [\\/]* | ?:[\\/]*)
7223 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
7224 ;;
7225 *)
7226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227for as_dir in $PATH
7228do
7229 IFS=$as_save_IFS
7230 test -z "$as_dir" && as_dir=.
7231 for ac_exec_ext in '' $ac_executable_extensions; do
7232 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7233 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
7234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7235 break 2
7236 fi
7237done
7238 done
7239IFS=$as_save_IFS
7240
7241 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
7242 ;;
7243esac
7244fi
7245MAKEINFO=$ac_cv_path_MAKEINFO
7246if test -n "$MAKEINFO"; then
7247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
7248$as_echo "$MAKEINFO" >&6; }
7249else
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7251$as_echo "no" >&6; }
7252fi
7253
7254
7255if test "$MAKEINFO" != "no" && \
7256 test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then
7257 MAKEINFO=no
7258fi
7259
7260## Makeinfo is unusual. For a released Emacs, the manuals are
7261## pre-built, and not deleted by the normal clean rules. makeinfo is
7262## therefore in the category of "special tools" not normally required, which
7263## configure does not have to check for (eg autoconf itself).
7264## In a Bazaar checkout on the other hand, the manuals are not included.
7265## So makeinfo is a requirement to build from Bazaar, and configure
7266## should test for it as it does for any other build requirement.
7267## We use the presence of $srcdir/info/emacs to distinguish a release,
7268## with pre-built manuals, from a Bazaar checkout.
96f129d5
GM
7269HAVE_MAKEINFO=yes
7270
067d23c9 7271if test "$MAKEINFO" = "no"; then
96f129d5 7272 MAKEINFO=makeinfo
067d23c9 7273 if test "x${with_makeinfo}" = "xno"; then
96f129d5 7274 HAVE_MAKEINFO=no
067d23c9 7275 elif test ! -e $srcdir/info/emacs; then
5f64f7bd 7276 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
067d23c9
KY
7277source tree does not seem to have pre-built manuals in the \`info' directory.
7278Either install a suitable version of makeinfo, or re-run configure
7279with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
7280 fi
7281fi
7282
7283
96f129d5 7284
067d23c9
KY
7285if test x$GCC = xyes; then
7286 test "x$GCC_LINK_TEST_OPTIONS" != x && \
7287 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
7288else
7289 test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \
7290 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
7291fi
7292
7293
7294late_LDFLAGS=$LDFLAGS
7295if test x$GCC = xyes; then
7296 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
7297else
7298 LDFLAGS="$LDFLAGS -znocombreloc"
7299fi
7300
7301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
7302$as_echo_n "checking for -znocombreloc... " >&6; }
7303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7304/* end confdefs.h. */
7305
7306int
7307main ()
7308{
7309
7310 ;
7311 return 0;
7312}
7313_ACEOF
7314if ac_fn_c_try_link "$LINENO"; then :
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7316$as_echo "yes" >&6; }
7317else
7318 LDFLAGS=$late_LDFLAGS
7319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7320$as_echo "no" >&6; }
7321fi
7322rm -f core conftest.err conftest.$ac_objext \
7323 conftest$ac_exeext conftest.$ac_ext
7324
7325
7326# The value of CPP is a quoted variable reference, so we need to do this
7327# to get its actual value...
7328CPP=`eval "echo $CPP"`
7329
7330
125c3718 7331test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
067d23c9 7332case "$opsys" in
125c3718
PE
7333 your-opsys-here) CANNOT_DUMP=yes ;;
7334esac
7335
7336test "$CANNOT_DUMP" = "yes" && \
067d23c9
KY
7337
7338$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
7339
125c3718 7340
067d23c9
KY
7341
7342
7343
7344UNEXEC_OBJ=unexelf.o
7345case "$opsys" in
7346 # MSDOS uses unexcoff.o
7347 # MSWindows uses unexw32.o
7348 aix4-2)
7349 UNEXEC_OBJ=unexaix.o
7350 ;;
7351 cygwin)
7352 UNEXEC_OBJ=unexcw.o
7353 ;;
7354 darwin)
7355 UNEXEC_OBJ=unexmacosx.o
7356 ;;
7357 hpux10-20 | hpux11)
7358 UNEXEC_OBJ=unexhp9k800.o
7359 ;;
7360 sol2-10)
7361 # Use the Solaris dldump() function, called from unexsol.c, to dump
7362 # emacs, instead of the generic ELF dump code found in unexelf.c.
7363 # The resulting binary has a complete symbol table, and is better
7364 # for debugging and other observability tools (debuggers, pstack, etc).
7365 #
7366 # If you encounter a problem using dldump(), please consider sending
7367 # a message to the OpenSolaris tools-linking mailing list:
7368 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
7369 #
7370 # It is likely that dldump() works with older Solaris too, but this has
7371 # not been tested, so for now this change is for Solaris 10 or newer.
7372 UNEXEC_OBJ=unexsol.o
7373 ;;
7374esac
7375
7376LD_SWITCH_SYSTEM=
7377case "$opsys" in
7378 freebsd)
7379 ## Let `ld' find image libs and similar things in /usr/local/lib.
7380 ## The system compiler, GCC, has apparently been modified to not
7381 ## look there, contrary to what a stock GCC would do.
7382 LD_SWITCH_SYSTEM=-L/usr/local/lib
7383 ;;
7384
7385 gnu-linux)
7386 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
d6a003a8 7387 case $host_cpu in mips*) LD_SWITCH_SYSTEM="-G 0";; esac
067d23c9
KY
7388 ;;
7389
7390 netbsd)
7391 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
7392 ;;
7393
7394 openbsd)
7395 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
7396 ## otherwise Emacs dumps core on elf systems.
7397 LD_SWITCH_SYSTEM="-Z"
7398 ;;
7399esac
7400
7401
7402ac_link="$ac_link $LD_SWITCH_SYSTEM"
7403
7404## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
7405## which has not been defined yet. When this was handled with cpp,
7406## it was expanded to null when configure sourced the s/*.h file.
7407## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
7408## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
7409## (or somesuch), but because it is supposed to go at the _front_
7410## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
7411## Compare with the gnu-linux case below, which added to the end
7412## of LD_SWITCH_SYSTEM, and so can instead go at the front of
7413## LD_SWITCH_SYSTEM_TEMACS.
7414case "$opsys" in
7415 netbsd|openbsd)
7416 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
7417 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
7418esac
7419
7420
7421C_SWITCH_MACHINE=
7422if test "$machine" = "alpha"; then
7423 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
5f64f7bd 7424if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
067d23c9
KY
7425
7426fi
7427
7428 if test "$ac_cv_have_decl___ELF__" = "yes"; then
7429 ## With ELF, make sure that all common symbols get allocated to in the
7430 ## data section. Otherwise, the dump of temacs may miss variables in
7431 ## the shared library that have been initialized. For example, with
7432 ## GNU libc, __malloc_initialized would normally be resolved to the
7433 ## shared library's .bss section, which is fatal.
7434 if test "x$GCC" = "xyes"; then
7435 C_SWITCH_MACHINE="-fno-common"
7436 else
5f64f7bd 7437 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
067d23c9
KY
7438 fi
7439 else
7440 UNEXEC_OBJ=unexalpha.o
7441 fi
7442fi
7443
7444
7445
7446
7447C_SWITCH_SYSTEM=
7448## Some programs in src produce warnings saying certain subprograms
7449## are too complex and need a MAXMEM value greater than 2000 for
7450## additional optimization. --nils@exp-math.uni-essen.de
7451test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
7452 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
7453## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
7454## It is redundant in glibc2, since we define _GNU_SOURCE.
7455
7456
7457
7458LIBS_SYSTEM=
7459case "$opsys" in
7460 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
7461 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
7462
7463 freebsd) LIBS_SYSTEM="-lutil" ;;
7464
7465 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
7466
1f5d53eb 7467 sol2*) LIBS_SYSTEM="-lsocket -lnsl" ;;
067d23c9
KY
7468
7469 ## Motif needs -lgen.
7470 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
7471esac
7472
7473
7474
7475### Make sure subsequent tests use flags consistent with the build flags.
7476
7477if test x"${OVERRIDE_CPPFLAGS}" != x; then
7478 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
7479else
7480 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
7481fi
7482
4fda9c95
GM
7483# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
7484
3e0be4ab
GM
7485# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
7486
4fda9c95 7487
067d23c9
KY
7488# Check whether --enable-largefile was given.
7489if test "${enable_largefile+set}" = set; then :
7490 enableval=$enable_largefile;
7491fi
7492
7493if test "$enable_largefile" != no; then
7494
7495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7496$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5f64f7bd 7497if test "${ac_cv_sys_largefile_CC+set}" = set; then :
067d23c9
KY
7498 $as_echo_n "(cached) " >&6
7499else
7500 ac_cv_sys_largefile_CC=no
7501 if test "$GCC" != yes; then
7502 ac_save_CC=$CC
7503 while :; do
7504 # IRIX 6.2 and later do not support large files by default,
7505 # so use the C compiler's -n32 option if that helps.
7506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7507/* end confdefs.h. */
7508#include <sys/types.h>
7509 /* Check that off_t can represent 2**63 - 1 correctly.
7510 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7511 since some C++ compilers masquerading as C compilers
7512 incorrectly reject 9223372036854775807. */
7513#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7514 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7515 && LARGE_OFF_T % 2147483647 == 1)
7516 ? 1 : -1];
7517int
7518main ()
7519{
7520
7521 ;
7522 return 0;
7523}
7524_ACEOF
7525 if ac_fn_c_try_compile "$LINENO"; then :
7526 break
7527fi
7528rm -f core conftest.err conftest.$ac_objext
7529 CC="$CC -n32"
7530 if ac_fn_c_try_compile "$LINENO"; then :
7531 ac_cv_sys_largefile_CC=' -n32'; break
7532fi
7533rm -f core conftest.err conftest.$ac_objext
7534 break
7535 done
7536 CC=$ac_save_CC
7537 rm -f conftest.$ac_ext
7538 fi
7539fi
7540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7541$as_echo "$ac_cv_sys_largefile_CC" >&6; }
7542 if test "$ac_cv_sys_largefile_CC" != no; then
7543 CC=$CC$ac_cv_sys_largefile_CC
7544 fi
7545
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7547$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5f64f7bd 7548if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
067d23c9
KY
7549 $as_echo_n "(cached) " >&6
7550else
7551 while :; do
7552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7553/* end confdefs.h. */
7554#include <sys/types.h>
7555 /* Check that off_t can represent 2**63 - 1 correctly.
7556 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7557 since some C++ compilers masquerading as C compilers
7558 incorrectly reject 9223372036854775807. */
7559#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7560 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7561 && LARGE_OFF_T % 2147483647 == 1)
7562 ? 1 : -1];
7563int
7564main ()
7565{
7566
7567 ;
7568 return 0;
7569}
7570_ACEOF
7571if ac_fn_c_try_compile "$LINENO"; then :
7572 ac_cv_sys_file_offset_bits=no; break
7573fi
7574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7576/* end confdefs.h. */
7577#define _FILE_OFFSET_BITS 64
7578#include <sys/types.h>
7579 /* Check that off_t can represent 2**63 - 1 correctly.
7580 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7581 since some C++ compilers masquerading as C compilers
7582 incorrectly reject 9223372036854775807. */
7583#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7584 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7585 && LARGE_OFF_T % 2147483647 == 1)
7586 ? 1 : -1];
7587int
7588main ()
7589{
7590
7591 ;
7592 return 0;
7593}
7594_ACEOF
7595if ac_fn_c_try_compile "$LINENO"; then :
7596 ac_cv_sys_file_offset_bits=64; break
7597fi
7598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7599 ac_cv_sys_file_offset_bits=unknown
7600 break
7601done
7602fi
7603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7604$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7605case $ac_cv_sys_file_offset_bits in #(
7606 no | unknown) ;;
7607 *)
7608cat >>confdefs.h <<_ACEOF
7609#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7610_ACEOF
7611;;
7612esac
7613rm -rf conftest*
7614 if test $ac_cv_sys_file_offset_bits = unknown; then
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7616$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5f64f7bd 7617if test "${ac_cv_sys_large_files+set}" = set; then :
067d23c9
KY
7618 $as_echo_n "(cached) " >&6
7619else
7620 while :; do
7621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7622/* end confdefs.h. */
7623#include <sys/types.h>
7624 /* Check that off_t can represent 2**63 - 1 correctly.
7625 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7626 since some C++ compilers masquerading as C compilers
7627 incorrectly reject 9223372036854775807. */
7628#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7629 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7630 && LARGE_OFF_T % 2147483647 == 1)
7631 ? 1 : -1];
7632int
7633main ()
7634{
7635
7636 ;
7637 return 0;
7638}
7639_ACEOF
7640if ac_fn_c_try_compile "$LINENO"; then :
7641 ac_cv_sys_large_files=no; break
7642fi
7643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7645/* end confdefs.h. */
7646#define _LARGE_FILES 1
7647#include <sys/types.h>
7648 /* Check that off_t can represent 2**63 - 1 correctly.
7649 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7650 since some C++ compilers masquerading as C compilers
7651 incorrectly reject 9223372036854775807. */
7652#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7653 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7654 && LARGE_OFF_T % 2147483647 == 1)
7655 ? 1 : -1];
7656int
7657main ()
7658{
7659
7660 ;
7661 return 0;
7662}
7663_ACEOF
7664if ac_fn_c_try_compile "$LINENO"; then :
7665 ac_cv_sys_large_files=1; break
7666fi
7667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7668 ac_cv_sys_large_files=unknown
7669 break
7670done
7671fi
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7673$as_echo "$ac_cv_sys_large_files" >&6; }
7674case $ac_cv_sys_large_files in #(
7675 no | unknown) ;;
7676 *)
7677cat >>confdefs.h <<_ACEOF
7678#define _LARGE_FILES $ac_cv_sys_large_files
7679_ACEOF
7680;;
7681esac
7682rm -rf conftest*
7683 fi
7684fi
7685
7686
7687
067d23c9
KY
7688LIB_MATH=-lm
7689LIB_STANDARD=
7690START_FILES=
7691
7692case $opsys in
7693 cygwin )
7694 LIB_MATH=
7695 START_FILES='pre-crt0.o'
7696 ;;
7697 darwin )
7698 ## Adding -lm confuses the dynamic linker, so omit it.
7699 LIB_MATH=
7700 START_FILES='pre-crt0.o'
7701 ;;
7702 freebsd )
7703 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
7704 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
7705 ;;
7706 gnu-linux | gnu-kfreebsd )
7707 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
7708 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
7709 ;;
7710 hpux10-20 | hpux11 )
7711 LIB_STANDARD=-lc
7712 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
7713 ;;
7714 netbsd | openbsd )
7715 if test -f $CRT_DIR/crti.o; then
7716 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
7717 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
7718 else
7719 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
7720 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
7721 fi
7722 ;;
7723esac
7724
7725
7726
7727
130f1dac
GM
7728crt_files=
7729
7730for file in x $LIB_STANDARD $START_FILES; do
7731 case "$file" in
7732 *CRT_DIR*) crt_files="$crt_files `echo $file | sed -e 's|.*/||'`" ;;
7733 esac
7734done
7735
7736if test "x$crt_files" != x; then
7737
7738 ## If user specified a crt-dir, use that unconditionally.
7739 crt_gcc=no
7740
7741 if test "X$CRT_DIR" = "X"; then
7742
7743 CRT_DIR=/usr/lib # default
7744
7745 case "$canonical" in
7746 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
7747 ## On x86-64 and s390x GNU/Linux distributions, the standard library
7748 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
7749 ## For anything else (eg /usr/lib32), it is up the user to specify
7750 ## the location (bug#5655).
7751 ## Test for crtn.o, not just the directory, because sometimes the
7752 ## directory exists but does not have the relevant files (bug#1287).
7753 ## FIXME better to test for binary compatibility somehow.
7754 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
7755 ;;
7756
7757 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
7758 esac
7759
7760 case "$opsys" in
7761 hpux10-20) CRT_DIR=/lib ;;
7762 esac
7763
7764 test "x${GCC}" = xyes && crt_gcc=yes
7765
7766 fi # CRT_DIR = ""
7767
7768 crt_missing=
7769
7770 for file in $crt_files; do
7771
7772 ## If we're using gcc, try to determine it automatically by asking
7773 ## gcc. [If this doesn't work, CRT_DIR will remain at the
7774 ## system-dependent default from above.]
7775 if test $crt_gcc = yes && test ! -e $CRT_DIR/$file; then
7776
7777 crt_file=`$CC --print-file-name=$file 2>/dev/null`
7778 case "$crt_file" in
7779 */*)
7780 CRT_DIR=`$as_dirname -- "$crt_file" ||
7781$as_expr X"$crt_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7782 X"$crt_file" : 'X\(//\)[^/]' \| \
7783 X"$crt_file" : 'X\(//\)$' \| \
7784 X"$crt_file" : 'X\(/\)' \| . 2>/dev/null ||
7785$as_echo X"$crt_file" |
7786 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
7787 s//\1/
7788 q
7789 }
7790 /^X\(\/\/\)[^/].*/{
7791 s//\1/
7792 q
7793 }
7794 /^X\(\/\/\)$/{
7795 s//\1/
7796 q
7797 }
7798 /^X\(\/\).*/{
7799 s//\1/
7800 q
7801 }
7802 s/.*/./; q'`
7803 ;;
7804 esac
7805 fi
7806
7807 crt_gcc=no
7808
7809 test -e $CRT_DIR/$file || crt_missing="$crt_missing $file"
7810 done # $crt_files
7811
7812 test "x$crt_missing" = x || \
7813 as_fn_error "Required file(s) not found:$crt_missing
7814Try using the --with-crt-dir option." "$LINENO" 5
7815
7816fi # crt_files != ""
7817
7818
7819
7820
067d23c9
KY
7821
7822
7823
7824if test "${with_sound}" != "no"; then
7825 # Sound support for GNU/Linux and the free BSDs.
7826 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
7827do :
7828 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7829ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5f64f7bd
GM
7830eval as_val=\$$as_ac_Header
7831 if test "x$as_val" = x""yes; then :
067d23c9
KY
7832 cat >>confdefs.h <<_ACEOF
7833#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7834_ACEOF
7835 have_sound_header=yes
7836fi
7837
7838done
7839
7840 # Emulation library used on NetBSD.
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
7842$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
5f64f7bd 7843if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
067d23c9
KY
7844 $as_echo_n "(cached) " >&6
7845else
7846 ac_check_lib_save_LIBS=$LIBS
7847LIBS="-lossaudio $LIBS"
7848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849/* end confdefs.h. */
7850
7851/* Override any GCC internal prototype to avoid an error.
7852 Use char because int might match the return type of a GCC
7853 builtin and then its argument prototype would still apply. */
7854#ifdef __cplusplus
7855extern "C"
7856#endif
7857char _oss_ioctl ();
7858int
7859main ()
7860{
7861return _oss_ioctl ();
7862 ;
7863 return 0;
7864}
7865_ACEOF
7866if ac_fn_c_try_link "$LINENO"; then :
7867 ac_cv_lib_ossaudio__oss_ioctl=yes
7868else
7869 ac_cv_lib_ossaudio__oss_ioctl=no
7870fi
7871rm -f core conftest.err conftest.$ac_objext \
7872 conftest$ac_exeext conftest.$ac_ext
7873LIBS=$ac_check_lib_save_LIBS
7874fi
7875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
7876$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
5f64f7bd 7877if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
067d23c9
KY
7878 LIBSOUND=-lossaudio
7879else
7880 LIBSOUND=
7881fi
7882
7883
7884
7885 ALSA_REQUIRED=1.0.0
7886 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
7887
7888 succeeded=no
7889
7890 # Extract the first word of "pkg-config", so it can be a program name with args.
7891set dummy pkg-config; ac_word=$2
7892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7893$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 7894if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
7895 $as_echo_n "(cached) " >&6
7896else
7897 case $PKG_CONFIG in
7898 [\\/]* | ?:[\\/]*)
7899 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7900 ;;
7901 *)
7902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7903for as_dir in $PATH
7904do
7905 IFS=$as_save_IFS
7906 test -z "$as_dir" && as_dir=.
7907 for ac_exec_ext in '' $ac_executable_extensions; do
7908 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7909 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7910 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7911 break 2
7912 fi
7913done
7914 done
7915IFS=$as_save_IFS
7916
7917 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
7918 ;;
7919esac
7920fi
7921PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7922if test -n "$PKG_CONFIG"; then
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7924$as_echo "$PKG_CONFIG" >&6; }
7925else
7926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7927$as_echo "no" >&6; }
7928fi
7929
7930
7931
7932 if test "$PKG_CONFIG" = "no" ; then
7933 HAVE_ALSA=no
7934 else
7935 PKG_CONFIG_MIN_VERSION=0.9.0
7936 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
7938$as_echo_n "checking for $ALSA_MODULES... " >&6; }
7939
7940 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7942$as_echo "yes" >&6; }
7943 succeeded=yes
7944
7945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
7946$as_echo_n "checking ALSA_CFLAGS... " >&6; }
7947 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
7949$as_echo "$ALSA_CFLAGS" >&6; }
7950
7951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
7952$as_echo_n "checking ALSA_LIBS... " >&6; }
7953 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
7955$as_echo "$ALSA_LIBS" >&6; }
7956 else
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7958$as_echo "no" >&6; }
7959 ALSA_CFLAGS=""
7960 ALSA_LIBS=""
7961 ## If we have a custom action on failure, don't print errors, but
7962 ## do set a variable so people can do so.
7963 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
7964
7965 fi
7966
7967
7968
7969 else
7970 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
7971 echo "*** See http://www.freedesktop.org/software/pkgconfig"
7972 fi
7973 fi
7974
7975 if test $succeeded = yes; then
7976 HAVE_ALSA=yes
7977 else
7978 HAVE_ALSA=no
7979 fi
7980
7981 if test $HAVE_ALSA = yes; then
7982 SAVE_CFLAGS="$CFLAGS"
7983 SAVE_LDFLAGS="$LDFLAGS"
7984 CFLAGS="$ALSA_CFLAGS $CFLAGS"
7985 LDFLAGS="$ALSA_LIBS $LDFLAGS"
7986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7987/* end confdefs.h. */
7988#include <asoundlib.h>
7989int
7990main ()
7991{
7992snd_lib_error_set_handler (0);
7993 ;
7994 return 0;
7995}
7996_ACEOF
7997if ac_fn_c_try_compile "$LINENO"; then :
7998 emacs_alsa_normal=yes
7999else
8000 emacs_alsa_normal=no
8001fi
8002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8003 if test "$emacs_alsa_normal" != yes; then
8004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8005/* end confdefs.h. */
8006#include <alsa/asoundlib.h>
8007int
8008main ()
8009{
8010snd_lib_error_set_handler (0);
8011 ;
8012 return 0;
8013}
8014_ACEOF
8015if ac_fn_c_try_compile "$LINENO"; then :
8016 emacs_alsa_subdir=yes
8017else
8018 emacs_alsa_subdir=no
8019fi
8020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8021 if test "$emacs_alsa_subdir" != yes; then
5f64f7bd 8022 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
067d23c9
KY
8023 fi
8024 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8025 fi
8026
8027 CFLAGS="$SAVE_CFLAGS"
8028 LDFLAGS="$SAVE_LDFLAGS"
8029 LIBSOUND="$LIBSOUND $ALSA_LIBS"
8030 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
8031
8032$as_echo "#define HAVE_ALSA 1" >>confdefs.h
8033
8034 fi
8035
8036 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8037 case "$opsys" in
8038 gnu-linux|freebsd|netbsd)
8039
8040$as_echo "#define HAVE_SOUND 1" >>confdefs.h
8041
8042 ;;
8043 esac
8044 fi
8045
8046
8047fi
8048
8049for ac_header in sys/select.h sys/time.h unistd.h utime.h \
1fb8351b 8050 linux/version.h sys/systeminfo.h \
067d23c9
KY
8051 stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \
8052 sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
8053 sys/utsname.h pwd.h utmp.h dirent.h util.h
8054do :
8055 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8056ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5f64f7bd
GM
8057eval as_val=\$$as_ac_Header
8058 if test "x$as_val" = x""yes; then :
067d23c9
KY
8059 cat >>confdefs.h <<_ACEOF
8060#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8061_ACEOF
8062
8063fi
8064
8065done
8066
8067
8068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
8069$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
8070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8071/* end confdefs.h. */
8072#include <sys/personality.h>
8073int
8074main ()
8075{
8076personality (PER_LINUX32)
8077 ;
8078 return 0;
8079}
8080_ACEOF
8081if ac_fn_c_try_compile "$LINENO"; then :
8082 emacs_cv_personality_linux32=yes
8083else
8084 emacs_cv_personality_linux32=no
8085fi
8086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
8088$as_echo "$emacs_cv_personality_linux32" >&6; }
8089
8090if test $emacs_cv_personality_linux32 = yes; then
8091
8092$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
8093
8094fi
8095
8096for ac_header in term.h
8097do :
8098 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
5f64f7bd 8099if test "x$ac_cv_header_term_h" = x""yes; then :
067d23c9
KY
8100 cat >>confdefs.h <<_ACEOF
8101#define HAVE_TERM_H 1
8102_ACEOF
8103
8104fi
8105
8106done
8107
067d23c9
KY
8108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
8109$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
5f64f7bd 8110if test "${ac_cv_header_time+set}" = set; then :
067d23c9
KY
8111 $as_echo_n "(cached) " >&6
8112else
8113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8114/* end confdefs.h. */
8115#include <sys/types.h>
8116#include <sys/time.h>
8117#include <time.h>
8118
8119int
8120main ()
8121{
8122if ((struct tm *) 0)
8123return 0;
8124 ;
8125 return 0;
8126}
8127_ACEOF
8128if ac_fn_c_try_compile "$LINENO"; then :
8129 ac_cv_header_time=yes
8130else
8131 ac_cv_header_time=no
8132fi
8133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8134fi
8135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
8136$as_echo "$ac_cv_header_time" >&6; }
8137if test $ac_cv_header_time = yes; then
8138
8139$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
8140
8141fi
8142
8143ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
5f64f7bd 8144if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
067d23c9
KY
8145 ac_have_decl=1
8146else
8147 ac_have_decl=0
8148fi
8149
8150cat >>confdefs.h <<_ACEOF
8151#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
8152_ACEOF
8153
8154if test $ac_cv_have_decl_sys_siglist != yes; then
8155 # For Tru64, at least:
8156 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
5f64f7bd 8157if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
067d23c9
KY
8158 ac_have_decl=1
8159else
8160 ac_have_decl=0
8161fi
8162
8163cat >>confdefs.h <<_ACEOF
8164#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
8165_ACEOF
8166
8167 if test $ac_cv_have_decl___sys_siglist = yes; then
8168
8169$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
8170
8171 fi
8172fi
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
8174$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
5f64f7bd 8175if test "${ac_cv_header_sys_wait_h+set}" = set; then :
067d23c9
KY
8176 $as_echo_n "(cached) " >&6
8177else
8178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8179/* end confdefs.h. */
8180#include <sys/types.h>
8181#include <sys/wait.h>
8182#ifndef WEXITSTATUS
8183# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
8184#endif
8185#ifndef WIFEXITED
8186# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8187#endif
8188
8189int
8190main ()
8191{
8192 int s;
8193 wait (&s);
8194 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8195 ;
8196 return 0;
8197}
8198_ACEOF
8199if ac_fn_c_try_compile "$LINENO"; then :
8200 ac_cv_header_sys_wait_h=yes
8201else
8202 ac_cv_header_sys_wait_h=no
8203fi
8204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8205fi
8206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
8207$as_echo "$ac_cv_header_sys_wait_h" >&6; }
8208if test $ac_cv_header_sys_wait_h = yes; then
8209
8210$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
8211
8212fi
8213
8214
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
8216$as_echo_n "checking for struct utimbuf... " >&6; }
5f64f7bd 8217if test "${emacs_cv_struct_utimbuf+set}" = set; then :
067d23c9
KY
8218 $as_echo_n "(cached) " >&6
8219else
8220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8221/* end confdefs.h. */
8222#ifdef TIME_WITH_SYS_TIME
8223#include <sys/time.h>
8224#include <time.h>
8225#else
8226#ifdef HAVE_SYS_TIME_H
8227#include <sys/time.h>
8228#else
8229#include <time.h>
8230#endif
8231#endif
8232#ifdef HAVE_UTIME_H
8233#include <utime.h>
8234#endif
8235int
8236main ()
8237{
8238static struct utimbuf x; x.actime = x.modtime;
8239 ;
8240 return 0;
8241}
8242_ACEOF
8243if ac_fn_c_try_compile "$LINENO"; then :
8244 emacs_cv_struct_utimbuf=yes
8245else
8246 emacs_cv_struct_utimbuf=no
8247fi
8248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8249fi
8250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
8251$as_echo "$emacs_cv_struct_utimbuf" >&6; }
8252if test $emacs_cv_struct_utimbuf = yes; then
8253
8254$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
8255
8256fi
8257
067d23c9
KY
8258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
8259$as_echo_n "checking for speed_t... " >&6; }
5f64f7bd 8260if test "${emacs_cv_speed_t+set}" = set; then :
067d23c9
KY
8261 $as_echo_n "(cached) " >&6
8262else
8263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8264/* end confdefs.h. */
8265#include <termios.h>
8266int
8267main ()
8268{
8269speed_t x = 1;
8270 ;
8271 return 0;
8272}
8273_ACEOF
8274if ac_fn_c_try_compile "$LINENO"; then :
8275 emacs_cv_speed_t=yes
8276else
8277 emacs_cv_speed_t=no
8278fi
8279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8280fi
8281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
8282$as_echo "$emacs_cv_speed_t" >&6; }
8283if test $emacs_cv_speed_t = yes; then
8284
8285$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
8286
8287fi
8288
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
8290$as_echo_n "checking for struct timeval... " >&6; }
5f64f7bd 8291if test "${emacs_cv_struct_timeval+set}" = set; then :
067d23c9
KY
8292 $as_echo_n "(cached) " >&6
8293else
8294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8295/* end confdefs.h. */
8296#ifdef TIME_WITH_SYS_TIME
8297#include <sys/time.h>
8298#include <time.h>
8299#else
8300#ifdef HAVE_SYS_TIME_H
8301#include <sys/time.h>
8302#else
8303#include <time.h>
8304#endif
8305#endif
8306int
8307main ()
8308{
8309static struct timeval x; x.tv_sec = x.tv_usec;
8310 ;
8311 return 0;
8312}
8313_ACEOF
8314if ac_fn_c_try_compile "$LINENO"; then :
8315 emacs_cv_struct_timeval=yes
8316else
8317 emacs_cv_struct_timeval=no
8318fi
8319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8320fi
8321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
8322$as_echo "$emacs_cv_struct_timeval" >&6; }
8323HAVE_TIMEVAL=$emacs_cv_struct_timeval
8324if test $emacs_cv_struct_timeval = yes; then
8325
8326$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
8327
8328fi
8329
8330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
8331$as_echo_n "checking for struct exception... " >&6; }
5f64f7bd 8332if test "${emacs_cv_struct_exception+set}" = set; then :
067d23c9
KY
8333 $as_echo_n "(cached) " >&6
8334else
8335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8336/* end confdefs.h. */
8337#include <math.h>
8338int
8339main ()
8340{
8341static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
8342 ;
8343 return 0;
8344}
8345_ACEOF
8346if ac_fn_c_try_compile "$LINENO"; then :
8347 emacs_cv_struct_exception=yes
8348else
8349 emacs_cv_struct_exception=no
8350fi
8351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8352fi
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
8354$as_echo "$emacs_cv_struct_exception" >&6; }
8355HAVE_EXCEPTION=$emacs_cv_struct_exception
8356if test $emacs_cv_struct_exception != yes; then
8357
8358$as_echo "#define NO_MATHERR 1" >>confdefs.h
8359
8360fi
8361
7417b37c
GM
8362for ac_header in sys/socket.h
8363do :
8364 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
8365if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
8366 cat >>confdefs.h <<_ACEOF
8367#define HAVE_SYS_SOCKET_H 1
8368_ACEOF
8369
8370fi
8371
8372done
8373
067d23c9
KY
8374for ac_header in net/if.h
8375do :
8376 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
8377#if HAVE_SYS_SOCKET_H
8378#include <sys/socket.h>
8379#endif
8380"
5f64f7bd 8381if test "x$ac_cv_header_net_if_h" = x""yes; then :
067d23c9
KY
8382 cat >>confdefs.h <<_ACEOF
8383#define HAVE_NET_IF_H 1
8384_ACEOF
8385
8386fi
8387
8388done
8389
7417b37c
GM
8390for ac_header in ifaddrs.h
8391do :
8392 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default
8393#if HAVE_SYS_SOCKET_H
8394#include <sys/socket.h>
8395#endif
8396"
8397if test "x$ac_cv_header_ifaddrs_h" = x""yes; then :
8398 cat >>confdefs.h <<_ACEOF
8399#define HAVE_IFADDRS_H 1
8400_ACEOF
8401
8402fi
8403
8404done
8405
8406for ac_header in net/if_dl.h
8407do :
8408 ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default
8409#if HAVE_SYS_SOCKET_H
8410#include <sys/socket.h>
8411#endif
8412"
8413if test "x$ac_cv_header_net_if_dl_h" = x""yes; then :
8414 cat >>confdefs.h <<_ACEOF
8415#define HAVE_NET_IF_DL_H 1
8416_ACEOF
8417
8418fi
8419
8420done
8421
8422for ac_func in getifaddrs freeifaddrs
8423do :
8424 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8425ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8426eval as_val=\$$as_ac_var
8427 if test "x$as_val" = x""yes; then :
8428 cat >>confdefs.h <<_ACEOF
8429#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8430_ACEOF
8431
8432fi
8433done
8434
067d23c9
KY
8435
8436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
8437$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
5f64f7bd 8438if test "${ac_cv_struct_tm+set}" = set; then :
067d23c9
KY
8439 $as_echo_n "(cached) " >&6
8440else
8441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8442/* end confdefs.h. */
8443#include <sys/types.h>
8444#include <time.h>
8445
8446int
8447main ()
8448{
8449struct tm tm;
8450 int *p = &tm.tm_sec;
8451 return !p;
8452 ;
8453 return 0;
8454}
8455_ACEOF
8456if ac_fn_c_try_compile "$LINENO"; then :
8457 ac_cv_struct_tm=time.h
8458else
8459 ac_cv_struct_tm=sys/time.h
8460fi
8461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8462fi
8463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
8464$as_echo "$ac_cv_struct_tm" >&6; }
8465if test $ac_cv_struct_tm = sys/time.h; then
8466
8467$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
8468
8469fi
8470
8471ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
8472#include <$ac_cv_struct_tm>
8473
8474"
5f64f7bd 8475if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
067d23c9
KY
8476
8477cat >>confdefs.h <<_ACEOF
8478#define HAVE_STRUCT_TM_TM_ZONE 1
8479_ACEOF
8480
8481
8482fi
8483
8484if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
8485
8486$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
8487
8488else
8489 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
8490"
5f64f7bd 8491if test "x$ac_cv_have_decl_tzname" = x""yes; then :
067d23c9
KY
8492 ac_have_decl=1
8493else
8494 ac_have_decl=0
8495fi
8496
8497cat >>confdefs.h <<_ACEOF
8498#define HAVE_DECL_TZNAME $ac_have_decl
8499_ACEOF
8500
8501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
8502$as_echo_n "checking for tzname... " >&6; }
5f64f7bd 8503if test "${ac_cv_var_tzname+set}" = set; then :
067d23c9
KY
8504 $as_echo_n "(cached) " >&6
8505else
8506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8507/* end confdefs.h. */
8508#include <time.h>
8509#if !HAVE_DECL_TZNAME
8510extern char *tzname[];
8511#endif
8512
8513int
8514main ()
8515{
8516return tzname[0][0];
8517 ;
8518 return 0;
8519}
8520_ACEOF
8521if ac_fn_c_try_link "$LINENO"; then :
8522 ac_cv_var_tzname=yes
8523else
8524 ac_cv_var_tzname=no
8525fi
8526rm -f core conftest.err conftest.$ac_objext \
8527 conftest$ac_exeext conftest.$ac_ext
8528fi
8529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
8530$as_echo "$ac_cv_var_tzname" >&6; }
8531 if test $ac_cv_var_tzname = yes; then
8532
8533$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
8534
8535 fi
8536fi
8537
8538ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
8539"
5f64f7bd 8540if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
067d23c9
KY
8541
8542$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
8543
8544fi
8545
8546ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
8547#if HAVE_SYS_SOCKET_H
8548#include <sys/socket.h>
8549#endif
8550#if HAVE_NET_IF_H
8551#include <net/if.h>
8552#endif
8553"
5f64f7bd 8554if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
067d23c9
KY
8555
8556cat >>confdefs.h <<_ACEOF
8557#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8558_ACEOF
8559
8560
8561fi
8562ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
8563#if HAVE_SYS_SOCKET_H
8564#include <sys/socket.h>
8565#endif
8566#if HAVE_NET_IF_H
8567#include <net/if.h>
8568#endif
8569"
5f64f7bd 8570if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
067d23c9
KY
8571
8572cat >>confdefs.h <<_ACEOF
8573#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8574_ACEOF
8575
8576
8577fi
8578ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
8579#if HAVE_SYS_SOCKET_H
8580#include <sys/socket.h>
8581#endif
8582#if HAVE_NET_IF_H
8583#include <net/if.h>
8584#endif
8585"
5f64f7bd 8586if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
067d23c9
KY
8587
8588cat >>confdefs.h <<_ACEOF
8589#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8590_ACEOF
8591
8592
8593fi
8594ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
8595#if HAVE_SYS_SOCKET_H
8596#include <sys/socket.h>
8597#endif
8598#if HAVE_NET_IF_H
8599#include <net/if.h>
8600#endif
8601"
5f64f7bd 8602if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
067d23c9
KY
8603
8604cat >>confdefs.h <<_ACEOF
8605#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8606_ACEOF
8607
8608
8609fi
8610ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
8611#if HAVE_SYS_SOCKET_H
8612#include <sys/socket.h>
8613#endif
8614#if HAVE_NET_IF_H
8615#include <net/if.h>
8616#endif
8617"
5f64f7bd 8618if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
067d23c9
KY
8619
8620cat >>confdefs.h <<_ACEOF
8621#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8622_ACEOF
8623
8624
7417b37c
GM
8625fi
8626ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr.sa_len" "ac_cv_member_struct_ifreq_ifr_addr_sa_len" "$ac_includes_default
8627#if HAVE_SYS_SOCKET_H
8628#include <sys/socket.h>
8629#endif
8630#if HAVE_NET_IF_H
8631#include <net/if.h>
8632#endif
8633"
8634if test "x$ac_cv_member_struct_ifreq_ifr_addr_sa_len" = x""yes; then :
8635
8636cat >>confdefs.h <<_ACEOF
8637#define HAVE_STRUCT_IFREQ_IFR_ADDR_SA_LEN 1
8638_ACEOF
8639
8640
067d23c9
KY
8641fi
8642
8643
8644
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
8646$as_echo_n "checking for function prototypes... " >&6; }
8647if test "$ac_cv_prog_cc_c89" != no; then
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8649$as_echo "yes" >&6; }
8650
8651$as_echo "#define PROTOTYPES 1" >>confdefs.h
8652
8653
8654$as_echo "#define __PROTOTYPES 1" >>confdefs.h
8655
8656else
8657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8658$as_echo "no" >&6; }
8659fi
8660
8661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
8662$as_echo_n "checking for working volatile... " >&6; }
5f64f7bd 8663if test "${ac_cv_c_volatile+set}" = set; then :
067d23c9
KY
8664 $as_echo_n "(cached) " >&6
8665else
8666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8667/* end confdefs.h. */
8668
8669int
8670main ()
8671{
8672
8673volatile int x;
8674int * volatile y = (int *) 0;
8675return !x && !y;
8676 ;
8677 return 0;
8678}
8679_ACEOF
8680if ac_fn_c_try_compile "$LINENO"; then :
8681 ac_cv_c_volatile=yes
8682else
8683 ac_cv_c_volatile=no
8684fi
8685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8686fi
8687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
8688$as_echo "$ac_cv_c_volatile" >&6; }
8689if test $ac_cv_c_volatile = no; then
8690
8691$as_echo "#define volatile /**/" >>confdefs.h
8692
8693fi
8694
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
8696$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
5f64f7bd 8697if test "${ac_cv_c_const+set}" = set; then :
067d23c9
KY
8698 $as_echo_n "(cached) " >&6
8699else
8700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8701/* end confdefs.h. */
8702
8703int
8704main ()
8705{
8706/* FIXME: Include the comments suggested by Paul. */
8707#ifndef __cplusplus
8708 /* Ultrix mips cc rejects this. */
8709 typedef int charset[2];
8710 const charset cs;
8711 /* SunOS 4.1.1 cc rejects this. */
8712 char const *const *pcpcc;
8713 char **ppc;
8714 /* NEC SVR4.0.2 mips cc rejects this. */
8715 struct point {int x, y;};
8716 static struct point const zero = {0,0};
8717 /* AIX XL C 1.02.0.0 rejects this.
8718 It does not let you subtract one const X* pointer from another in
8719 an arm of an if-expression whose if-part is not a constant
8720 expression */
8721 const char *g = "string";
8722 pcpcc = &g + (g ? g-g : 0);
8723 /* HPUX 7.0 cc rejects these. */
8724 ++pcpcc;
8725 ppc = (char**) pcpcc;
8726 pcpcc = (char const *const *) ppc;
8727 { /* SCO 3.2v4 cc rejects this. */
8728 char *t;
8729 char const *s = 0 ? (char *) 0 : (char const *) 0;
8730
8731 *t++ = 0;
8732 if (s) return 0;
8733 }
8734 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8735 int x[] = {25, 17};
8736 const int *foo = &x[0];
8737 ++foo;
8738 }
8739 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8740 typedef const int *iptr;
8741 iptr p = 0;
8742 ++p;
8743 }
8744 { /* AIX XL C 1.02.0.0 rejects this saying
8745 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8746 struct s { int j; const int *ap[3]; };
8747 struct s *b; b->j = 5;
8748 }
8749 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8750 const int foo = 10;
8751 if (!foo) return 0;
8752 }
8753 return !cs[0] && !zero.x;
8754#endif
8755
8756 ;
8757 return 0;
8758}
8759_ACEOF
8760if ac_fn_c_try_compile "$LINENO"; then :
8761 ac_cv_c_const=yes
8762else
8763 ac_cv_c_const=no
8764fi
8765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8766fi
8767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
8768$as_echo "$ac_cv_c_const" >&6; }
8769if test $ac_cv_c_const = no; then
8770
8771$as_echo "#define const /**/" >>confdefs.h
8772
8773fi
8774
8775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
8776$as_echo_n "checking for void * support... " >&6; }
5f64f7bd 8777if test "${emacs_cv_void_star+set}" = set; then :
067d23c9
KY
8778 $as_echo_n "(cached) " >&6
8779else
8780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8781/* end confdefs.h. */
8782
8783int
8784main ()
8785{
8786void * foo;
8787 ;
8788 return 0;
8789}
8790_ACEOF
8791if ac_fn_c_try_compile "$LINENO"; then :
8792 emacs_cv_void_star=yes
8793else
8794 emacs_cv_void_star=no
8795fi
8796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8797fi
8798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
8799$as_echo "$emacs_cv_void_star" >&6; }
8800if test $emacs_cv_void_star = yes; then
8801 $as_echo "#define POINTER_TYPE void" >>confdefs.h
8802
8803else
8804 $as_echo "#define POINTER_TYPE char" >>confdefs.h
8805
8806fi
8807
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
8809$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
5f64f7bd 8810if test "${ac_cv_c_bigendian+set}" = set; then :
067d23c9
KY
8811 $as_echo_n "(cached) " >&6
8812else
8813 ac_cv_c_bigendian=unknown
8814 # See if we're dealing with a universal compiler.
8815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8816/* end confdefs.h. */
8817#ifndef __APPLE_CC__
8818 not a universal capable compiler
8819 #endif
8820 typedef int dummy;
8821
8822_ACEOF
8823if ac_fn_c_try_compile "$LINENO"; then :
8824
8825 # Check for potential -arch flags. It is not universal unless
8826 # there are at least two -arch flags with different values.
8827 ac_arch=
8828 ac_prev=
8829 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
8830 if test -n "$ac_prev"; then
8831 case $ac_word in
8832 i?86 | x86_64 | ppc | ppc64)
8833 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
8834 ac_arch=$ac_word
8835 else
8836 ac_cv_c_bigendian=universal
8837 break
8838 fi
8839 ;;
8840 esac
8841 ac_prev=
8842 elif test "x$ac_word" = "x-arch"; then
8843 ac_prev=arch
8844 fi
8845 done
8846fi
8847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8848 if test $ac_cv_c_bigendian = unknown; then
8849 # See if sys/param.h defines the BYTE_ORDER macro.
8850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8851/* end confdefs.h. */
8852#include <sys/types.h>
8853 #include <sys/param.h>
8854
8855int
8856main ()
8857{
8858#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
8859 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
8860 && LITTLE_ENDIAN)
8861 bogus endian macros
8862 #endif
8863
8864 ;
8865 return 0;
8866}
8867_ACEOF
8868if ac_fn_c_try_compile "$LINENO"; then :
8869 # It does; now see whether it defined to BIG_ENDIAN or not.
8870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8871/* end confdefs.h. */
8872#include <sys/types.h>
8873 #include <sys/param.h>
8874
8875int
8876main ()
8877{
8878#if BYTE_ORDER != BIG_ENDIAN
8879 not big endian
8880 #endif
8881
8882 ;
8883 return 0;
8884}
8885_ACEOF
8886if ac_fn_c_try_compile "$LINENO"; then :
8887 ac_cv_c_bigendian=yes
8888else
8889 ac_cv_c_bigendian=no
8890fi
8891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8892fi
8893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8894 fi
8895 if test $ac_cv_c_bigendian = unknown; then
8896 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
8897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8898/* end confdefs.h. */
8899#include <limits.h>
8900
8901int
8902main ()
8903{
8904#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
8905 bogus endian macros
8906 #endif
8907
8908 ;
8909 return 0;
8910}
8911_ACEOF
8912if ac_fn_c_try_compile "$LINENO"; then :
8913 # It does; now see whether it defined to _BIG_ENDIAN or not.
8914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8915/* end confdefs.h. */
8916#include <limits.h>
8917
8918int
8919main ()
8920{
8921#ifndef _BIG_ENDIAN
8922 not big endian
8923 #endif
8924
8925 ;
8926 return 0;
8927}
8928_ACEOF
8929if ac_fn_c_try_compile "$LINENO"; then :
8930 ac_cv_c_bigendian=yes
8931else
8932 ac_cv_c_bigendian=no
8933fi
8934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8935fi
8936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8937 fi
8938 if test $ac_cv_c_bigendian = unknown; then
8939 # Compile a test program.
8940 if test "$cross_compiling" = yes; then :
8941 # Try to guess by grepping values from an object file.
8942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8943/* end confdefs.h. */
8944short int ascii_mm[] =
8945 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
8946 short int ascii_ii[] =
8947 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
8948 int use_ascii (int i) {
8949 return ascii_mm[i] + ascii_ii[i];
8950 }
8951 short int ebcdic_ii[] =
8952 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
8953 short int ebcdic_mm[] =
8954 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
8955 int use_ebcdic (int i) {
8956 return ebcdic_mm[i] + ebcdic_ii[i];
8957 }
8958 extern int foo;
8959
8960int
8961main ()
8962{
8963return use_ascii (foo) == use_ebcdic (foo);
8964 ;
8965 return 0;
8966}
8967_ACEOF
8968if ac_fn_c_try_compile "$LINENO"; then :
8969 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
8970 ac_cv_c_bigendian=yes
8971 fi
8972 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
8973 if test "$ac_cv_c_bigendian" = unknown; then
8974 ac_cv_c_bigendian=no
8975 else
8976 # finding both strings is unlikely to happen, but who knows?
8977 ac_cv_c_bigendian=unknown
8978 fi
8979 fi
8980fi
8981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8982else
8983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8984/* end confdefs.h. */
8985$ac_includes_default
8986int
8987main ()
8988{
8989
8990 /* Are we little or big endian? From Harbison&Steele. */
8991 union
8992 {
8993 long int l;
8994 char c[sizeof (long int)];
8995 } u;
8996 u.l = 1;
8997 return u.c[sizeof (long int) - 1] == 1;
8998
8999 ;
9000 return 0;
9001}
9002_ACEOF
9003if ac_fn_c_try_run "$LINENO"; then :
9004 ac_cv_c_bigendian=no
9005else
9006 ac_cv_c_bigendian=yes
9007fi
9008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9009 conftest.$ac_objext conftest.beam conftest.$ac_ext
9010fi
9011
9012 fi
9013fi
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
9015$as_echo "$ac_cv_c_bigendian" >&6; }
9016 case $ac_cv_c_bigendian in #(
9017 yes)
9018 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
9019;; #(
9020 no)
9021 ;; #(
9022 universal)
9023
9024$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
9025
9026 ;; #(
9027 *)
5f64f7bd 9028 as_fn_error "unknown endianness
0afb4571 9029 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
067d23c9
KY
9030 esac
9031
9032
7cae64b4
PE
9033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__aligned__ (expr)))" >&5
9034$as_echo_n "checking for __attribute__ ((__aligned__ (expr)))... " >&6; }
5f64f7bd 9035if test "${emacs_cv_attribute_aligned+set}" = set; then :
7cae64b4
PE
9036 $as_echo_n "(cached) " >&6
9037else
9038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9039/* end confdefs.h. */
9040char __attribute__ ((__aligned__ (1 << 3))) c;
9041int
9042main ()
9043{
9044
9045 ;
9046 return 0;
9047}
9048_ACEOF
9049if ac_fn_c_try_compile "$LINENO"; then :
9050 emacs_cv_attribute_aligned=yes
9051else
9052 emacs_cv_attribute_aligned=no
9053fi
9054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9055fi
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_attribute_aligned" >&5
9057$as_echo "$emacs_cv_attribute_aligned" >&6; }
9058if test $emacs_cv_attribute_aligned = yes; then
9059
9060$as_echo "#define HAVE_ATTRIBUTE_ALIGNED 1" >>confdefs.h
9061
9062fi
9063
067d23c9
KY
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9065$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
9066set x ${MAKE-make}
9067ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5f64f7bd 9068if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
067d23c9
KY
9069 $as_echo_n "(cached) " >&6
9070else
9071 cat >conftest.make <<\_ACEOF
9072SHELL = /bin/sh
9073all:
9074 @echo '@@@%%%=$(MAKE)=@@@%%%'
9075_ACEOF
5f64f7bd 9076# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
067d23c9
KY
9077case `${MAKE-make} -f conftest.make 2>/dev/null` in
9078 *@@@%%%=?*=@@@%%%*)
9079 eval ac_cv_prog_make_${ac_make}_set=yes;;
9080 *)
9081 eval ac_cv_prog_make_${ac_make}_set=no;;
9082esac
9083rm -f conftest.make
9084fi
9085if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9087$as_echo "yes" >&6; }
9088 SET_MAKE=
9089else
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9091$as_echo "no" >&6; }
9092 SET_MAKE="MAKE=${MAKE-make}"
9093fi
9094
9095
9096DEPFLAGS=
9097MKDEPDIR=":"
9098deps_frag=deps.mk
9099if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
9101$as_echo_n "checking whether we are using GNU Make... " >&6; }
9102 HAVE_GNU_MAKE=no
9103 testval=`make --version 2>/dev/null | grep 'GNU Make'`
9104 if test "x$testval" != x; then
9105 HAVE_GNU_MAKE=yes
9106 else
9107 ac_enable_autodepend=no
9108 fi
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
9110$as_echo "$HAVE_GNU_MAKE" >&6; }
9111 if test $HAVE_GNU_MAKE = yes; then
9112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
9113$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
9114 SAVE_CFLAGS="$CFLAGS"
9115 CFLAGS="$CFLAGS -MMD -MF deps.d"
9116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9117/* end confdefs.h. */
9118
9119int
9120main ()
9121{
9122
9123 ;
9124 return 0;
9125}
9126_ACEOF
9127if ac_fn_c_try_compile "$LINENO"; then :
9128
9129else
9130 ac_enable_autodepend=no
9131fi
9132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9133 CFLAGS="$SAVE_CFLAGS"
9134 test -f deps.d || ac_enable_autodepend=no
9135 rm -rf deps.d
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
9137$as_echo "$ac_enable_autodepend" >&6; }
9138 fi
9139 if test $ac_enable_autodepend = yes; then
9140 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
9141 ## In parallel builds, another make might create depdir between
9142 ## the first test and mkdir, so stick another test on the end.
6ad6792b 9143 ## Or use install-sh -d? mkdir -p is not portable.
067d23c9
KY
9144 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
9145 deps_frag=autodeps.mk
9146 fi
9147fi
9148deps_frag=$srcdir/src/$deps_frag
9149
9150
9151
9152
9153
4d4b75e8
GM
9154lisp_frag=$srcdir/src/lisp.mk
9155
9156
9157
067d23c9
KY
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
9159$as_echo_n "checking for long file names... " >&6; }
5f64f7bd 9160if test "${ac_cv_sys_long_file_names+set}" = set; then :
067d23c9
KY
9161 $as_echo_n "(cached) " >&6
9162else
9163 ac_cv_sys_long_file_names=yes
9164# Test for long file names in all the places we know might matter:
9165# . the current directory, where building will happen
9166# $prefix/lib where we will be installing things
9167# $exec_prefix/lib likewise
9168# $TMPDIR if set, where it might want to write temporary files
9169# /tmp where it might want to write temporary files
9170# /var/tmp likewise
9171# /usr/tmp likewise
9172for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9173 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9174 # in the usual case where exec_prefix is '${prefix}'.
9175 case $ac_dir in #(
9176 . | /* | ?:[\\/]*) ;; #(
9177 *) continue;;
9178 esac
9179 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
9180 ac_xdir=$ac_dir/cf$$
9181 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
9182 ac_tf1=$ac_xdir/conftest9012345
9183 ac_tf2=$ac_xdir/conftest9012346
9184 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
9185 ac_cv_sys_long_file_names=no
9186 rm -f -r "$ac_xdir" 2>/dev/null
9187 test $ac_cv_sys_long_file_names = no && break
9188done
9189fi
9190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
9191$as_echo "$ac_cv_sys_long_file_names" >&6; }
9192if test $ac_cv_sys_long_file_names = yes; then
9193
9194$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
9195
9196fi
9197
9198
9199#### Choose a window system.
9200
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
9202$as_echo_n "checking for X... " >&6; }
9203
9204
9205# Check whether --with-x was given.
9206if test "${with_x+set}" = set; then :
9207 withval=$with_x;
9208fi
9209
9210# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9211if test "x$with_x" = xno; then
9212 # The user explicitly disabled X.
9213 have_x=disabled
9214else
9215 case $x_includes,$x_libraries in #(
5f64f7bd
GM
9216 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
9217 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
067d23c9
KY
9218 $as_echo_n "(cached) " >&6
9219else
9220 # One or both of the vars are not set, and there is no cached value.
9221ac_x_includes=no ac_x_libraries=no
9222rm -f -r conftest.dir
9223if mkdir conftest.dir; then
9224 cd conftest.dir
9225 cat >Imakefile <<'_ACEOF'
9226incroot:
9227 @echo incroot='${INCROOT}'
9228usrlibdir:
9229 @echo usrlibdir='${USRLIBDIR}'
9230libdir:
9231 @echo libdir='${LIBDIR}'
9232_ACEOF
9233 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
5f64f7bd 9234 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
067d23c9
KY
9235 for ac_var in incroot usrlibdir libdir; do
9236 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9237 done
9238 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9239 for ac_extension in a so sl dylib la dll; do
9240 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9241 test -f "$ac_im_libdir/libX11.$ac_extension"; then
9242 ac_im_usrlibdir=$ac_im_libdir; break
9243 fi
9244 done
9245 # Screen out bogus values from the imake configuration. They are
9246 # bogus both because they are the default anyway, and because
9247 # using them would break gcc on systems where it needs fixed includes.
9248 case $ac_im_incroot in
9249 /usr/include) ac_x_includes= ;;
9250 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9251 esac
9252 case $ac_im_usrlibdir in
9253 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
9254 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9255 esac
9256 fi
9257 cd ..
9258 rm -f -r conftest.dir
9259fi
9260
9261# Standard set of common directories for X headers.
9262# Check X11 before X11Rn because it is often a symlink to the current release.
9263ac_x_header_dirs='
9264/usr/X11/include
9265/usr/X11R7/include
9266/usr/X11R6/include
9267/usr/X11R5/include
9268/usr/X11R4/include
9269
9270/usr/include/X11
9271/usr/include/X11R7
9272/usr/include/X11R6
9273/usr/include/X11R5
9274/usr/include/X11R4
9275
9276/usr/local/X11/include
9277/usr/local/X11R7/include
9278/usr/local/X11R6/include
9279/usr/local/X11R5/include
9280/usr/local/X11R4/include
9281
9282/usr/local/include/X11
9283/usr/local/include/X11R7
9284/usr/local/include/X11R6
9285/usr/local/include/X11R5
9286/usr/local/include/X11R4
9287
9288/usr/X386/include
9289/usr/x386/include
9290/usr/XFree86/include/X11
9291
9292/usr/include
9293/usr/local/include
9294/usr/unsupported/include
9295/usr/athena/include
9296/usr/local/x11r5/include
9297/usr/lpp/Xamples/include
9298
9299/usr/openwin/include
9300/usr/openwin/share/include'
9301
9302if test "$ac_x_includes" = no; then
9303 # Guess where to find include files, by looking for Xlib.h.
9304 # First, try using that file with no special directory specified.
9305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9306/* end confdefs.h. */
9307#include <X11/Xlib.h>
9308_ACEOF
9309if ac_fn_c_try_cpp "$LINENO"; then :
9310 # We can compile using X headers with no special include directory.
9311ac_x_includes=
9312else
9313 for ac_dir in $ac_x_header_dirs; do
9314 if test -r "$ac_dir/X11/Xlib.h"; then
9315 ac_x_includes=$ac_dir
9316 break
9317 fi
9318done
9319fi
5f64f7bd 9320rm -f conftest.err conftest.$ac_ext
067d23c9
KY
9321fi # $ac_x_includes = no
9322
9323if test "$ac_x_libraries" = no; then
9324 # Check for the libraries.
9325 # See if we find them without any special options.
9326 # Don't add to $LIBS permanently.
9327 ac_save_LIBS=$LIBS
9328 LIBS="-lX11 $LIBS"
9329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9330/* end confdefs.h. */
9331#include <X11/Xlib.h>
9332int
9333main ()
9334{
9335XrmInitialize ()
9336 ;
9337 return 0;
9338}
9339_ACEOF
9340if ac_fn_c_try_link "$LINENO"; then :
9341 LIBS=$ac_save_LIBS
9342# We can link X programs with no special library path.
9343ac_x_libraries=
9344else
9345 LIBS=$ac_save_LIBS
9346for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9347do
9348 # Don't even attempt the hair of trying to link an X program!
9349 for ac_extension in a so sl dylib la dll; do
9350 if test -r "$ac_dir/libX11.$ac_extension"; then
9351 ac_x_libraries=$ac_dir
9352 break 2
9353 fi
9354 done
9355done
9356fi
9357rm -f core conftest.err conftest.$ac_objext \
9358 conftest$ac_exeext conftest.$ac_ext
9359fi # $ac_x_libraries = no
9360
9361case $ac_x_includes,$ac_x_libraries in #(
9362 no,* | *,no | *\'*)
9363 # Didn't find X, or a directory has "'" in its name.
9364 ac_cv_have_x="have_x=no";; #(
9365 *)
9366 # Record where we found X for the cache.
9367 ac_cv_have_x="have_x=yes\
9368 ac_x_includes='$ac_x_includes'\
9369 ac_x_libraries='$ac_x_libraries'"
9370esac
9371fi
9372;; #(
9373 *) have_x=yes;;
9374 esac
9375 eval "$ac_cv_have_x"
9376fi # $with_x != no
9377
9378if test "$have_x" != yes; then
9379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9380$as_echo "$have_x" >&6; }
9381 no_x=yes
9382else
9383 # If each of the values was on the command line, it overrides each guess.
9384 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9385 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9386 # Update the cache value to reflect the command line values.
9387 ac_cv_have_x="have_x=yes\
9388 ac_x_includes='$x_includes'\
9389 ac_x_libraries='$x_libraries'"
9390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9391$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
9392fi
9393
9394if test "$no_x" = yes; then
9395 window_system=none
9396else
9397 window_system=x11
9398fi
9399
9400## Workaround for bug in autoconf <= 2.62.
9401## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9402## No need to do anything special for these standard directories.
9403if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9404
9405 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9406
9407fi
9408
9409LD_SWITCH_X_SITE_AUX=
9410LD_SWITCH_X_SITE_AUX_RPATH=
9411if test "${x_libraries}" != NONE; then
9412 if test -n "${x_libraries}"; then
9413 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9414 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9415 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
9416 fi
9417 x_default_search_path=""
9418 x_search_path=${x_libraries}
9419 if test -z "${x_search_path}"; then
9420 x_search_path=/usr/lib
9421 fi
9422 for x_library in `echo ${x_search_path}: | \
9423 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
9424 x_search_path="\
9425${x_library}/X11/%L/%T/%N%C%S:\
9426${x_library}/X11/%l/%T/%N%C%S:\
9427${x_library}/X11/%T/%N%C%S:\
9428${x_library}/X11/%L/%T/%N%S:\
9429${x_library}/X11/%l/%T/%N%S:\
9430${x_library}/X11/%T/%N%S"
9431 if test x"${x_default_search_path}" = x; then
9432 x_default_search_path=${x_search_path}
9433 else
9434 x_default_search_path="${x_search_path}:${x_default_search_path}"
9435 fi
9436 done
9437fi
9438
9439
9440
9441if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9442 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9443fi
9444
9445if test x"${x_includes}" = x; then
9446 bitmapdir=/usr/include/X11/bitmaps
9447else
9448 # accumulate include directories that have X11 bitmap subdirectories
9449 bmd_acc="dummyval"
9450 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9451 if test -d "${bmd}/X11/bitmaps"; then
9452 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9453 fi
9454 if test -d "${bmd}/bitmaps"; then
9455 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9456 fi
9457 done
9458 if test ${bmd_acc} != "dummyval"; then
9459 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9460 fi
9461fi
9462
9463HAVE_NS=no
9464NS_IMPL_COCOA=no
9465NS_IMPL_GNUSTEP=no
9466tmp_CPPFLAGS="$CPPFLAGS"
9467tmp_CFLAGS="$CFLAGS"
9468CPPFLAGS="$CPPFLAGS -x objective-c"
9469CFLAGS="$CFLAGS -x objective-c"
9470TEMACS_LDFLAGS2="\${LDFLAGS}"
9471if test "${with_ns}" != no; then
9472 if test "${opsys}" = darwin; then
9473 NS_IMPL_COCOA=yes
9474 ns_appdir=`pwd`/nextstep/Emacs.app
9475 ns_appbindir=${ns_appdir}/Contents/MacOS/
9476 ns_appresdir=${ns_appdir}/Contents/Resources
9477 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
9478 elif test -f $GNUSTEP_CONFIG_FILE; then
9479 NS_IMPL_GNUSTEP=yes
9480 ns_appdir=`pwd`/nextstep/Emacs.app
9481 ns_appbindir=${ns_appdir}/
9482 ns_appresdir=${ns_appdir}/Resources
9483 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
9484 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9485 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9486 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
9487 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
9488 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
9489 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
9490 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
9491 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
9492 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9493 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
9494 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
9495 LIB_STANDARD=
9496 START_FILES=
9497 TEMACS_LDFLAGS2=
9498 fi
9499 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
5f64f7bd 9500if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
067d23c9
KY
9501 HAVE_NS=yes
9502else
5f64f7bd 9503 as_fn_error "\`--with-ns' was specified, but the include
067d23c9
KY
9504 files are missing or cannot be compiled." "$LINENO" 5
9505fi
9506
9507
9508 NS_HAVE_NSINTEGER=yes
9509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9510/* end confdefs.h. */
9511#include <Foundation/NSObjCRuntime.h>
9512int
9513main ()
9514{
9515NSInteger i;
9516 ;
9517 return 0;
9518}
9519_ACEOF
9520if ac_fn_c_try_compile "$LINENO"; then :
9521 ns_have_nsinteger=yes
9522else
9523 ns_have_nsinteger=no
9524fi
9525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9526 if test $ns_have_nsinteger = no; then
9527 NS_HAVE_NSINTEGER=no
9528 fi
9529fi
9530
9531
9532ns_frag=/dev/null
9533NS_OBJ=
00b3c7ac 9534NS_OBJC_OBJ=
067d23c9
KY
9535if test "${HAVE_NS}" = yes; then
9536 window_system=nextstep
9537 with_xft=no
9538 # set up packaging dirs
9539 exec_prefix=${ns_appbindir}
9540 libexecdir=${ns_appbindir}/libexec
9541 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9542 prefix=${ns_appresdir}
9543 fi
9544 ns_frag=$srcdir/src/ns.mk
00b3c7ac
TT
9545 NS_OBJ="fontset.o fringe.o image.o"
9546 NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
067d23c9
KY
9547fi
9548CFLAGS="$tmp_CFLAGS"
9549CPPFLAGS="$tmp_CPPFLAGS"
9550
9551
9552
9553
9554
9555case "${window_system}" in
9556 x11 )
9557 HAVE_X_WINDOWS=yes
9558 HAVE_X11=yes
9559 case "${with_x_toolkit}" in
9560 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9561 motif ) USE_X_TOOLKIT=MOTIF ;;
9562 gtk ) with_gtk=yes
9563 USE_X_TOOLKIT=none ;;
9564 gtk3 ) with_gtk3=yes
9565 USE_X_TOOLKIT=none ;;
9566 no ) USE_X_TOOLKIT=none ;;
9567 * ) USE_X_TOOLKIT=maybe ;;
9568 esac
9569 ;;
9570 nextstep | none )
9571 HAVE_X_WINDOWS=no
9572 HAVE_X11=no
9573 USE_X_TOOLKIT=none
9574 ;;
9575esac
9576
9577if test "$window_system" = none && test "X$with_x" != "Xno"; then
9578 # Extract the first word of "X", so it can be a program name with args.
9579set dummy X; ac_word=$2
9580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9581$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 9582if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
067d23c9
KY
9583 $as_echo_n "(cached) " >&6
9584else
9585 if test -n "$HAVE_XSERVER"; then
9586 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9587else
9588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9589for as_dir in $PATH
9590do
9591 IFS=$as_save_IFS
9592 test -z "$as_dir" && as_dir=.
9593 for ac_exec_ext in '' $ac_executable_extensions; do
9594 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9595 ac_cv_prog_HAVE_XSERVER="true"
9596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9597 break 2
9598 fi
9599done
9600 done
9601IFS=$as_save_IFS
9602
9603 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9604fi
9605fi
9606HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9607if test -n "$HAVE_XSERVER"; then
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
9609$as_echo "$HAVE_XSERVER" >&6; }
9610else
9611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9612$as_echo "no" >&6; }
9613fi
9614
9615
9616 if test "$HAVE_XSERVER" = true ||
9617 test -n "$DISPLAY" ||
9618 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
5f64f7bd 9619 as_fn_error "You seem to be running X, but no X development libraries
067d23c9
KY
9620were found. You should install the relevant development files for X
9621and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9622sure you have development files for image handling, i.e.
9623tiff, gif, jpeg, png and xpm.
9624If you are sure you want Emacs compiled without X window support, pass
9625 --without-x
9626to configure." "$LINENO" 5
9627 fi
9628fi
9629
9630### If we're using X11, we should use the X menu package.
9631HAVE_MENUS=no
9632case ${HAVE_X11} in
9633 yes ) HAVE_MENUS=yes ;;
9634esac
9635
9636# Do the opsystem or machine files prohibit the use of the GNU malloc?
9637# Assume not, until told otherwise.
9638GNU_MALLOC=yes
9639doug_lea_malloc=yes
9640ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
5f64f7bd 9641if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
067d23c9
KY
9642
9643else
9644 doug_lea_malloc=no
9645fi
9646
9647ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
5f64f7bd 9648if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
067d23c9
KY
9649
9650else
9651 doug_lea_malloc=no
9652fi
9653
9654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
9655$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
5f64f7bd 9656if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
067d23c9
KY
9657 $as_echo_n "(cached) " >&6
9658else
9659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9660/* end confdefs.h. */
9661extern void (* __after_morecore_hook)();
9662int
9663main ()
9664{
9665__after_morecore_hook = 0
9666 ;
9667 return 0;
9668}
9669_ACEOF
9670if ac_fn_c_try_link "$LINENO"; then :
9671 emacs_cv_var___after_morecore_hook=yes
9672else
9673 emacs_cv_var___after_morecore_hook=no
9674fi
9675rm -f core conftest.err conftest.$ac_objext \
9676 conftest$ac_exeext conftest.$ac_ext
9677fi
9678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
9679$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
9680if test $emacs_cv_var___after_morecore_hook = no; then
9681 doug_lea_malloc=no
9682fi
9683
9684
9685system_malloc=no
9686case "$opsys" in
9687 ## darwin ld insists on the use of malloc routines in the System framework.
9688 darwin|sol2-10) system_malloc=yes ;;
9689esac
9690
9691if test "${system_malloc}" = "yes"; then
9692
9693$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
9694
9695 GNU_MALLOC=no
9696 GNU_MALLOC_reason="
9697 (The GNU allocators don't work with this system configuration.)"
9698 GMALLOC_OBJ=
9699 VMLIMIT_OBJ=
9700else
9701 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
9702 VMLIMIT_OBJ=vm-limit.o
9703fi
9704
9705
9706
9707if test "$doug_lea_malloc" = "yes" ; then
9708 if test "$GNU_MALLOC" = yes ; then
9709 GNU_MALLOC_reason="
9710 (Using Doug Lea's new malloc from the GNU C Library.)"
9711 fi
9712
9713$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
9714
9715
9716 ## Use mmap directly for allocating larger buffers.
9717 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
9718 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
9719 ## Does the AC_FUNC_MMAP test below make this check unecessary?
9720 case "$opsys" in
9721 gnu*) REL_ALLOC=no ;;
9722 esac
9723fi
9724
9725if test x"${REL_ALLOC}" = x; then
9726 REL_ALLOC=${GNU_MALLOC}
9727fi
9728
9729use_mmap_for_buffers=no
9730case "$opsys" in
e7dcef2a 9731 cygwin|freebsd|irix6-5) use_mmap_for_buffers=yes ;;
067d23c9
KY
9732esac
9733
9734
9735
9736
9737 for ac_header in $ac_header_list
9738do :
9739 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9740ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9741"
5f64f7bd
GM
9742eval as_val=\$$as_ac_Header
9743 if test "x$as_val" = x""yes; then :
067d23c9
KY
9744 cat >>confdefs.h <<_ACEOF
9745#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9746_ACEOF
9747
9748fi
9749
9750done
9751
9752
9753
9754
9755
9756
9757
9758
9759for ac_func in getpagesize
9760do :
9761 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
5f64f7bd 9762if test "x$ac_cv_func_getpagesize" = x""yes; then :
067d23c9
KY
9763 cat >>confdefs.h <<_ACEOF
9764#define HAVE_GETPAGESIZE 1
9765_ACEOF
9766
9767fi
9768done
9769
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9771$as_echo_n "checking for working mmap... " >&6; }
5f64f7bd 9772if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
067d23c9
KY
9773 $as_echo_n "(cached) " >&6
9774else
9775 if test "$cross_compiling" = yes; then :
9776 ac_cv_func_mmap_fixed_mapped=no
9777else
9778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9779/* end confdefs.h. */
9780$ac_includes_default
9781/* malloc might have been renamed as rpl_malloc. */
9782#undef malloc
9783
9784/* Thanks to Mike Haertel and Jim Avera for this test.
9785 Here is a matrix of mmap possibilities:
9786 mmap private not fixed
9787 mmap private fixed at somewhere currently unmapped
9788 mmap private fixed at somewhere already mapped
9789 mmap shared not fixed
9790 mmap shared fixed at somewhere currently unmapped
9791 mmap shared fixed at somewhere already mapped
9792 For private mappings, we should verify that changes cannot be read()
9793 back from the file, nor mmap's back from the file at a different
9794 address. (There have been systems where private was not correctly
9795 implemented like the infamous i386 svr4.0, and systems where the
9796 VM page cache was not coherent with the file system buffer cache
9797 like early versions of FreeBSD and possibly contemporary NetBSD.)
9798 For shared mappings, we should conversely verify that changes get
9799 propagated back to all the places they're supposed to be.
9800
9801 Grep wants private fixed already mapped.
9802 The main things grep needs to know about mmap are:
9803 * does it exist and is it safe to write into the mmap'd area
9804 * how to use it (BSD variants) */
9805
9806#include <fcntl.h>
9807#include <sys/mman.h>
9808
9809#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9810char *malloc ();
9811#endif
9812
9813/* This mess was copied from the GNU getpagesize.h. */
9814#ifndef HAVE_GETPAGESIZE
9815# ifdef _SC_PAGESIZE
9816# define getpagesize() sysconf(_SC_PAGESIZE)
9817# else /* no _SC_PAGESIZE */
9818# ifdef HAVE_SYS_PARAM_H
9819# include <sys/param.h>
9820# ifdef EXEC_PAGESIZE
9821# define getpagesize() EXEC_PAGESIZE
9822# else /* no EXEC_PAGESIZE */
9823# ifdef NBPG
9824# define getpagesize() NBPG * CLSIZE
9825# ifndef CLSIZE
9826# define CLSIZE 1
9827# endif /* no CLSIZE */
9828# else /* no NBPG */
9829# ifdef NBPC
9830# define getpagesize() NBPC
9831# else /* no NBPC */
9832# ifdef PAGESIZE
9833# define getpagesize() PAGESIZE
9834# endif /* PAGESIZE */
9835# endif /* no NBPC */
9836# endif /* no NBPG */
9837# endif /* no EXEC_PAGESIZE */
9838# else /* no HAVE_SYS_PARAM_H */
9839# define getpagesize() 8192 /* punt totally */
9840# endif /* no HAVE_SYS_PARAM_H */
9841# endif /* no _SC_PAGESIZE */
9842
9843#endif /* no HAVE_GETPAGESIZE */
9844
9845int
9846main ()
9847{
9848 char *data, *data2, *data3;
1ef6de05 9849 const char *cdata2;
067d23c9
KY
9850 int i, pagesize;
9851 int fd, fd2;
9852
9853 pagesize = getpagesize ();
9854
9855 /* First, make a file with some known garbage in it. */
9856 data = (char *) malloc (pagesize);
9857 if (!data)
9858 return 1;
9859 for (i = 0; i < pagesize; ++i)
9860 *(data + i) = rand ();
9861 umask (0);
9862 fd = creat ("conftest.mmap", 0600);
9863 if (fd < 0)
9864 return 2;
9865 if (write (fd, data, pagesize) != pagesize)
9866 return 3;
9867 close (fd);
9868
9869 /* Next, check that the tail of a page is zero-filled. File must have
9870 non-zero length, otherwise we risk SIGBUS for entire page. */
9871 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
9872 if (fd2 < 0)
9873 return 4;
1ef6de05
PE
9874 cdata2 = "";
9875 if (write (fd2, cdata2, 1) != 1)
067d23c9 9876 return 5;
1ef6de05 9877 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
067d23c9
KY
9878 if (data2 == MAP_FAILED)
9879 return 6;
9880 for (i = 0; i < pagesize; ++i)
9881 if (*(data2 + i))
9882 return 7;
9883 close (fd2);
9884 if (munmap (data2, pagesize))
9885 return 8;
9886
9887 /* Next, try to mmap the file at a fixed address which already has
9888 something else allocated at it. If we can, also make sure that
9889 we see the same garbage. */
9890 fd = open ("conftest.mmap", O_RDWR);
9891 if (fd < 0)
9892 return 9;
9893 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9894 MAP_PRIVATE | MAP_FIXED, fd, 0L))
9895 return 10;
9896 for (i = 0; i < pagesize; ++i)
9897 if (*(data + i) != *(data2 + i))
9898 return 11;
9899
9900 /* Finally, make sure that changes to the mapped area do not
9901 percolate back to the file as seen by read(). (This is a bug on
9902 some variants of i386 svr4.0.) */
9903 for (i = 0; i < pagesize; ++i)
9904 *(data2 + i) = *(data2 + i) + 1;
9905 data3 = (char *) malloc (pagesize);
9906 if (!data3)
9907 return 12;
9908 if (read (fd, data3, pagesize) != pagesize)
9909 return 13;
9910 for (i = 0; i < pagesize; ++i)
9911 if (*(data + i) != *(data3 + i))
9912 return 14;
9913 close (fd);
9914 return 0;
9915}
9916_ACEOF
9917if ac_fn_c_try_run "$LINENO"; then :
9918 ac_cv_func_mmap_fixed_mapped=yes
9919else
9920 ac_cv_func_mmap_fixed_mapped=no
9921fi
9922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9923 conftest.$ac_objext conftest.beam conftest.$ac_ext
9924fi
9925
9926fi
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9928$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9929if test $ac_cv_func_mmap_fixed_mapped = yes; then
9930
9931$as_echo "#define HAVE_MMAP 1" >>confdefs.h
9932
9933fi
9934rm -f conftest.mmap conftest.txt
9935
9936if test $use_mmap_for_buffers = yes; then
9937
9938$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
9939
9940 REL_ALLOC=no
9941fi
9942
9943LIBS="$LIBS_SYSTEM $LIBS"
9944
9945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
9946$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
5f64f7bd 9947if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
067d23c9
KY
9948 $as_echo_n "(cached) " >&6
9949else
9950 ac_check_lib_save_LIBS=$LIBS
9951LIBS="-ldnet $LIBS"
9952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9953/* end confdefs.h. */
9954
9955/* Override any GCC internal prototype to avoid an error.
9956 Use char because int might match the return type of a GCC
9957 builtin and then its argument prototype would still apply. */
9958#ifdef __cplusplus
9959extern "C"
9960#endif
9961char dnet_ntoa ();
9962int
9963main ()
9964{
9965return dnet_ntoa ();
9966 ;
9967 return 0;
9968}
9969_ACEOF
9970if ac_fn_c_try_link "$LINENO"; then :
9971 ac_cv_lib_dnet_dnet_ntoa=yes
9972else
9973 ac_cv_lib_dnet_dnet_ntoa=no
9974fi
9975rm -f core conftest.err conftest.$ac_objext \
9976 conftest$ac_exeext conftest.$ac_ext
9977LIBS=$ac_check_lib_save_LIBS
9978fi
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
9980$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
5f64f7bd 9981if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
067d23c9
KY
9982 cat >>confdefs.h <<_ACEOF
9983#define HAVE_LIBDNET 1
9984_ACEOF
9985
9986 LIBS="-ldnet $LIBS"
9987
9988fi
9989
9990
9991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
9992$as_echo_n "checking for main in -lXbsd... " >&6; }
5f64f7bd 9993if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
067d23c9
KY
9994 $as_echo_n "(cached) " >&6
9995else
9996 ac_check_lib_save_LIBS=$LIBS
9997LIBS="-lXbsd $LIBS"
9998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9999/* end confdefs.h. */
10000
10001
10002int
10003main ()
10004{
10005return main ();
10006 ;
10007 return 0;
10008}
10009_ACEOF
10010if ac_fn_c_try_link "$LINENO"; then :
10011 ac_cv_lib_Xbsd_main=yes
10012else
10013 ac_cv_lib_Xbsd_main=no
10014fi
10015rm -f core conftest.err conftest.$ac_objext \
10016 conftest$ac_exeext conftest.$ac_ext
10017LIBS=$ac_check_lib_save_LIBS
10018fi
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
10020$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
5f64f7bd 10021if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
067d23c9
KY
10022 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10023fi
10024
10025
1abfdc54
GM
10026LIB_PTHREAD=
10027for ac_header in pthread.h
10028do :
10029 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
10030if test "x$ac_cv_header_pthread_h" = x""yes; then :
10031 cat >>confdefs.h <<_ACEOF
10032#define HAVE_PTHREAD_H 1
10033_ACEOF
10034
10035fi
10036
10037done
10038
10039if test "$ac_cv_header_pthread_h"; then
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
10041$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
10042if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
10043 $as_echo_n "(cached) " >&6
10044else
10045 ac_check_lib_save_LIBS=$LIBS
10046LIBS="-lpthread $LIBS"
10047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10048/* end confdefs.h. */
10049
10050/* Override any GCC internal prototype to avoid an error.
10051 Use char because int might match the return type of a GCC
10052 builtin and then its argument prototype would still apply. */
10053#ifdef __cplusplus
10054extern "C"
10055#endif
10056char pthread_self ();
10057int
10058main ()
10059{
10060return pthread_self ();
10061 ;
10062 return 0;
10063}
10064_ACEOF
10065if ac_fn_c_try_link "$LINENO"; then :
10066 ac_cv_lib_pthread_pthread_self=yes
10067else
10068 ac_cv_lib_pthread_pthread_self=no
10069fi
10070rm -f core conftest.err conftest.$ac_objext \
10071 conftest$ac_exeext conftest.$ac_ext
10072LIBS=$ac_check_lib_save_LIBS
10073fi
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
10075$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
10076if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
10077 HAVE_PTHREAD=yes
10078fi
10079
10080fi
10081if test "$HAVE_PTHREAD" = yes; then
10082 case "${canonical}" in
10083 *-hpux*) ;;
10084 *) LIB_PTHREAD="-lpthread" ;;
10085 esac
10086
10087$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
10088
10089fi
10090
10091
067d23c9
KY
10092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
10093$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
5f64f7bd 10094if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
067d23c9
KY
10095 $as_echo_n "(cached) " >&6
10096else
10097 ac_check_lib_save_LIBS=$LIBS
10098LIBS="-lpthreads $LIBS"
10099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10100/* end confdefs.h. */
10101
10102/* Override any GCC internal prototype to avoid an error.
10103 Use char because int might match the return type of a GCC
10104 builtin and then its argument prototype would still apply. */
10105#ifdef __cplusplus
10106extern "C"
10107#endif
10108char cma_open ();
10109int
10110main ()
10111{
10112return cma_open ();
10113 ;
10114 return 0;
10115}
10116_ACEOF
10117if ac_fn_c_try_link "$LINENO"; then :
10118 ac_cv_lib_pthreads_cma_open=yes
10119else
10120 ac_cv_lib_pthreads_cma_open=no
10121fi
10122rm -f core conftest.err conftest.$ac_objext \
10123 conftest$ac_exeext conftest.$ac_ext
10124LIBS=$ac_check_lib_save_LIBS
10125fi
10126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
10127$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
5f64f7bd 10128if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
067d23c9
KY
10129 cat >>confdefs.h <<_ACEOF
10130#define HAVE_LIBPTHREADS 1
10131_ACEOF
10132
10133 LIBS="-lpthreads $LIBS"
10134
10135fi
10136
10137
10138## Note: when using cpp in s/aix4.2.h, this definition depended on
10139## HAVE_LIBPTHREADS. That was not defined earlier in configure when
10140## the system file was sourced. Hence the value of LIBS_SYSTEM
10141## added to LIBS in configure would never contain the pthreads part,
10142## but the value used in Makefiles might. FIXME?
10143##
10144## -lpthreads seems to be necessary for Xlib in X11R6, and should
10145## be harmless on older versions of X where it happens to exist.
10146test "$opsys" = "aix4-2" && \
10147 test $ac_cv_lib_pthreads_cma_open = yes && \
10148 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
10149
10150
10151case ${host_os} in
10152aix*)
10153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
10154$as_echo_n "checking for -bbigtoc option... " >&6; }
5f64f7bd 10155if test "${gdb_cv_bigtoc+set}" = set; then :
067d23c9
KY
10156 $as_echo_n "(cached) " >&6
10157else
10158
10159 case $GCC in
10160 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10161 *) gdb_cv_bigtoc=-bbigtoc ;;
10162 esac
10163
10164 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10166/* end confdefs.h. */
10167
10168int
10169main ()
10170{
10171int i;
10172 ;
10173 return 0;
10174}
10175_ACEOF
10176if ac_fn_c_try_link "$LINENO"; then :
10177
10178else
10179 gdb_cv_bigtoc=
10180fi
10181rm -f core conftest.err conftest.$ac_objext \
10182 conftest$ac_exeext conftest.$ac_ext
10183
10184fi
10185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
10186$as_echo "$gdb_cv_bigtoc" >&6; }
10187 ;;
10188esac
10189
10190# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10191# used for the tests that follow. We set them back to REAL_CFLAGS and
10192# REAL_CPPFLAGS later on.
10193
10194REAL_CFLAGS="$CFLAGS"
10195REAL_CPPFLAGS="$CPPFLAGS"
10196
10197if test "${HAVE_X11}" = "yes"; then
10198 DEFS="$C_SWITCH_X_SITE $DEFS"
10199 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10200 LIBS="-lX11 $LIBS"
10201 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10202 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10203
10204 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10205 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10206 # but it's more convenient here to set LD_RUN_PATH
10207 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10208 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10209 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10210 export LD_RUN_PATH
10211 fi
10212
10213 if test "${opsys}" = "gnu-linux"; then
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
10215$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
10216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10217/* end confdefs.h. */
10218
10219int
10220main ()
10221{
10222XOpenDisplay ("foo");
10223 ;
10224 return 0;
10225}
10226_ACEOF
10227if ac_fn_c_try_link "$LINENO"; then :
10228 xlinux_first_failure=no
10229else
10230 xlinux_first_failure=yes
10231fi
10232rm -f core conftest.err conftest.$ac_objext \
10233 conftest$ac_exeext conftest.$ac_ext
10234 if test "${xlinux_first_failure}" = "yes"; then
10235 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10236 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10237 OLD_CPPFLAGS="$CPPFLAGS"
10238 OLD_LIBS="$LIBS"
10239 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10240 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10241 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10242 LIBS="$LIBS -b i486-linuxaout"
10243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10244/* end confdefs.h. */
10245
10246int
10247main ()
10248{
10249XOpenDisplay ("foo");
10250 ;
10251 return 0;
10252}
10253_ACEOF
10254if ac_fn_c_try_link "$LINENO"; then :
10255 xlinux_second_failure=no
10256else
10257 xlinux_second_failure=yes
10258fi
10259rm -f core conftest.err conftest.$ac_objext \
10260 conftest$ac_exeext conftest.$ac_ext
10261 if test "${xlinux_second_failure}" = "yes"; then
10262 # If we get the same failure with -b, there is no use adding -b.
10263 # So take it out. This plays safe.
10264 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10265 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10266 CPPFLAGS="$OLD_CPPFLAGS"
10267 LIBS="$OLD_LIBS"
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269$as_echo "no" >&6; }
10270 else
10271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10272$as_echo "yes" >&6; }
10273 fi
10274 else
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276$as_echo "no" >&6; }
10277 fi
10278 fi
10279
10280 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10281 # header files included from there.
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
10283$as_echo_n "checking for Xkb... " >&6; }
10284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10285/* end confdefs.h. */
10286#include <X11/Xlib.h>
10287#include <X11/XKBlib.h>
10288int
10289main ()
10290{
10291XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10292 ;
10293 return 0;
10294}
10295_ACEOF
10296if ac_fn_c_try_link "$LINENO"; then :
10297 emacs_xkb=yes
10298else
10299 emacs_xkb=no
10300fi
10301rm -f core conftest.err conftest.$ac_objext \
10302 conftest$ac_exeext conftest.$ac_ext
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
10304$as_echo "$emacs_xkb" >&6; }
10305 if test $emacs_xkb = yes; then
10306
10307$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
10308
10309 fi
10310
10311 for ac_func in XrmSetDatabase XScreenResourceString \
10312XScreenNumberOfScreen XSetWMProtocols
10313do :
10314 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10315ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5f64f7bd
GM
10316eval as_val=\$$as_ac_var
10317 if test "x$as_val" = x""yes; then :
067d23c9
KY
10318 cat >>confdefs.h <<_ACEOF
10319#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10320_ACEOF
10321
10322fi
10323done
10324
10325fi
10326
10327if test "${window_system}" = "x11"; then
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
10329$as_echo_n "checking X11 version 6... " >&6; }
5f64f7bd 10330 if test "${emacs_cv_x11_version_6+set}" = set; then :
067d23c9
KY
10331 $as_echo_n "(cached) " >&6
10332else
10333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10334/* end confdefs.h. */
10335#include <X11/Xlib.h>
10336int
10337main ()
10338{
10339#if XlibSpecificationRelease < 6
10340fail;
10341#endif
10342
10343 ;
10344 return 0;
10345}
10346_ACEOF
10347if ac_fn_c_try_link "$LINENO"; then :
10348 emacs_cv_x11_version_6=yes
10349else
10350 emacs_cv_x11_version_6=no
10351fi
10352rm -f core conftest.err conftest.$ac_objext \
10353 conftest$ac_exeext conftest.$ac_ext
10354fi
10355
10356 if test $emacs_cv_x11_version_6 = yes; then
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
10358$as_echo "6 or newer" >&6; }
10359
10360$as_echo "#define HAVE_X11R6 1" >>confdefs.h
10361
10362
10363$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
10364
10365 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
10366 ## XIM support.
10367 case "$opsys" in
10368 sol2-*) : ;;
10369 *)
10370$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
10371
10372 ;;
10373 esac
10374 else
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
10376$as_echo "before 6" >&6; }
10377 fi
10378fi
10379
10380
10381### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10382HAVE_RSVG=no
096a6052 10383if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
067d23c9
KY
10384 if test "${with_rsvg}" != "no"; then
10385 RSVG_REQUIRED=2.11.0
10386 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10387
10388
10389 succeeded=no
10390
10391 # Extract the first word of "pkg-config", so it can be a program name with args.
10392set dummy pkg-config; ac_word=$2
10393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10394$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 10395if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
10396 $as_echo_n "(cached) " >&6
10397else
10398 case $PKG_CONFIG in
10399 [\\/]* | ?:[\\/]*)
10400 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10401 ;;
10402 *)
10403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404for as_dir in $PATH
10405do
10406 IFS=$as_save_IFS
10407 test -z "$as_dir" && as_dir=.
10408 for ac_exec_ext in '' $ac_executable_extensions; do
10409 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10410 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10412 break 2
10413 fi
10414done
10415 done
10416IFS=$as_save_IFS
10417
10418 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10419 ;;
10420esac
10421fi
10422PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10423if test -n "$PKG_CONFIG"; then
10424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10425$as_echo "$PKG_CONFIG" >&6; }
10426else
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428$as_echo "no" >&6; }
10429fi
10430
10431
10432
10433 if test "$PKG_CONFIG" = "no" ; then
10434 :
10435 else
10436 PKG_CONFIG_MIN_VERSION=0.9.0
10437 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
10439$as_echo_n "checking for $RSVG_MODULE... " >&6; }
10440
10441 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10443$as_echo "yes" >&6; }
10444 succeeded=yes
10445
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
10447$as_echo_n "checking RSVG_CFLAGS... " >&6; }
10448 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
10450$as_echo "$RSVG_CFLAGS" >&6; }
10451
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
10453$as_echo_n "checking RSVG_LIBS... " >&6; }
10454 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
10456$as_echo "$RSVG_LIBS" >&6; }
10457 else
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
10460 RSVG_CFLAGS=""
10461 RSVG_LIBS=""
10462 ## If we have a custom action on failure, don't print errors, but
10463 ## do set a variable so people can do so.
10464 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10465
10466 fi
10467
10468
10469
10470 else
10471 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10472 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10473 fi
10474 fi
10475
10476 if test $succeeded = yes; then
10477 HAVE_RSVG=yes
10478 else
10479 :
10480 fi
10481
10482
10483
10484
10485 if test $HAVE_RSVG = yes; then
10486
10487$as_echo "#define HAVE_RSVG 1" >>confdefs.h
10488
10489 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10490 LIBS="$RSVG_LIBS $LIBS"
10491 fi
10492 fi
10493fi
10494
10495HAVE_IMAGEMAGICK=no
10496if test "${HAVE_X11}" = "yes"; then
10497 if test "${with_imagemagick}" != "no"; then
718ad21a
GM
10498 ## 6.2.8 is the earliest version known to work, but earlier versions
10499 ## might work - let us know if you find one.
10500 ## 6.0.7 does not work. See bug#7955.
10501 IMAGEMAGICK_MODULE="Wand >= 6.2.8"
067d23c9
KY
10502
10503 succeeded=no
10504
10505 # Extract the first word of "pkg-config", so it can be a program name with args.
10506set dummy pkg-config; ac_word=$2
10507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10508$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 10509if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
10510 $as_echo_n "(cached) " >&6
10511else
10512 case $PKG_CONFIG in
10513 [\\/]* | ?:[\\/]*)
10514 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10515 ;;
10516 *)
10517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10518for as_dir in $PATH
10519do
10520 IFS=$as_save_IFS
10521 test -z "$as_dir" && as_dir=.
10522 for ac_exec_ext in '' $ac_executable_extensions; do
10523 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10524 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10526 break 2
10527 fi
10528done
10529 done
10530IFS=$as_save_IFS
10531
10532 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10533 ;;
10534esac
10535fi
10536PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10537if test -n "$PKG_CONFIG"; then
10538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10539$as_echo "$PKG_CONFIG" >&6; }
10540else
10541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10542$as_echo "no" >&6; }
10543fi
10544
10545
10546
10547 if test "$PKG_CONFIG" = "no" ; then
10548 :
10549 else
10550 PKG_CONFIG_MIN_VERSION=0.9.0
10551 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
10553$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
10554
10555 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10557$as_echo "yes" >&6; }
10558 succeeded=yes
10559
10560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5
10561$as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; }
10562 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'`
10563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5
10564$as_echo "$IMAGEMAGICK_CFLAGS" >&6; }
10565
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5
10567$as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; }
10568 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'`
10569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5
10570$as_echo "$IMAGEMAGICK_LIBS" >&6; }
10571 else
10572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10573$as_echo "no" >&6; }
10574 IMAGEMAGICK_CFLAGS=""
10575 IMAGEMAGICK_LIBS=""
10576 ## If we have a custom action on failure, don't print errors, but
10577 ## do set a variable so people can do so.
10578 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
10579
10580 fi
10581
10582
10583
10584 else
10585 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10586 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10587 fi
10588 fi
10589
10590 if test $succeeded = yes; then
10591 HAVE_IMAGEMAGICK=yes
10592 else
10593 :
10594 fi
10595
10596
10597
10598
10599 if test $HAVE_IMAGEMAGICK = yes; then
10600
10601$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
10602
10603 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
10604 LIBS="$IMAGEMAGICK_LIBS $LIBS"
10605 for ac_func in MagickExportImagePixels
10606do :
10607 ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels"
5f64f7bd 10608if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then :
067d23c9
KY
10609 cat >>confdefs.h <<_ACEOF
10610#define HAVE_MAGICKEXPORTIMAGEPIXELS 1
10611_ACEOF
10612
10613fi
10614done
10615
10616 fi
10617 fi
10618fi
10619
10620
10621HAVE_GTK=no
571e1872 10622GTK_OBJ=
067d23c9 10623if test "${with_gtk3}" = "yes"; then
0afb4571
J
10624 GLIB_REQUIRED=2.28
10625 GTK_REQUIRED=3.0
067d23c9
KY
10626 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10627
10628
10629 succeeded=no
10630
10631 # Extract the first word of "pkg-config", so it can be a program name with args.
10632set dummy pkg-config; ac_word=$2
10633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10634$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 10635if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
10636 $as_echo_n "(cached) " >&6
10637else
10638 case $PKG_CONFIG in
10639 [\\/]* | ?:[\\/]*)
10640 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10641 ;;
10642 *)
10643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10644for as_dir in $PATH
10645do
10646 IFS=$as_save_IFS
10647 test -z "$as_dir" && as_dir=.
10648 for ac_exec_ext in '' $ac_executable_extensions; do
10649 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10650 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10651 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10652 break 2
10653 fi
10654done
10655 done
10656IFS=$as_save_IFS
10657
10658 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10659 ;;
10660esac
10661fi
10662PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10663if test -n "$PKG_CONFIG"; then
10664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10665$as_echo "$PKG_CONFIG" >&6; }
10666else
10667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10668$as_echo "no" >&6; }
10669fi
10670
10671
10672
10673 if test "$PKG_CONFIG" = "no" ; then
10674 pkg_check_gtk=no
10675 else
10676 PKG_CONFIG_MIN_VERSION=0.9.0
10677 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10679$as_echo_n "checking for $GTK_MODULES... " >&6; }
10680
10681 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10683$as_echo "yes" >&6; }
10684 succeeded=yes
10685
10686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
10687$as_echo_n "checking GTK_CFLAGS... " >&6; }
10688 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
10689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
10690$as_echo "$GTK_CFLAGS" >&6; }
10691
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
10693$as_echo_n "checking GTK_LIBS... " >&6; }
10694 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
10696$as_echo "$GTK_LIBS" >&6; }
10697 else
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699$as_echo "no" >&6; }
10700 GTK_CFLAGS=""
10701 GTK_LIBS=""
10702 ## If we have a custom action on failure, don't print errors, but
10703 ## do set a variable so people can do so.
10704 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10705
10706 fi
10707
10708
10709
10710 else
10711 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10712 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10713 fi
10714 fi
10715
10716 if test $succeeded = yes; then
10717 pkg_check_gtk=yes
10718 else
10719 pkg_check_gtk=no
10720 fi
10721
10722 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
5f64f7bd 10723 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9 10724 fi
0afb4571
J
10725
10726$as_echo "#define HAVE_GTK3 1" >>confdefs.h
10727
571e1872 10728 GTK_OBJ=emacsgtkfixed.o
067d23c9
KY
10729fi
10730
10731if test "$pkg_check_gtk" != "yes"; then
10732 HAVE_GTK=no
10733if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
10734 GLIB_REQUIRED=2.6
10735 GTK_REQUIRED=2.6
10736 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10737
10738
10739 succeeded=no
10740
10741 # Extract the first word of "pkg-config", so it can be a program name with args.
10742set dummy pkg-config; ac_word=$2
10743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10744$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 10745if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
10746 $as_echo_n "(cached) " >&6
10747else
10748 case $PKG_CONFIG in
10749 [\\/]* | ?:[\\/]*)
10750 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10751 ;;
10752 *)
10753 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10754for as_dir in $PATH
10755do
10756 IFS=$as_save_IFS
10757 test -z "$as_dir" && as_dir=.
10758 for ac_exec_ext in '' $ac_executable_extensions; do
10759 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10760 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10761 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10762 break 2
10763 fi
10764done
10765 done
10766IFS=$as_save_IFS
10767
10768 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10769 ;;
10770esac
10771fi
10772PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10773if test -n "$PKG_CONFIG"; then
10774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10775$as_echo "$PKG_CONFIG" >&6; }
10776else
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10778$as_echo "no" >&6; }
10779fi
10780
10781
10782
10783 if test "$PKG_CONFIG" = "no" ; then
10784 pkg_check_gtk=no
10785 else
10786 PKG_CONFIG_MIN_VERSION=0.9.0
10787 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
10789$as_echo_n "checking for $GTK_MODULES... " >&6; }
10790
10791 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10793$as_echo "yes" >&6; }
10794 succeeded=yes
10795
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
10797$as_echo_n "checking GTK_CFLAGS... " >&6; }
10798 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
10799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
10800$as_echo "$GTK_CFLAGS" >&6; }
10801
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
10803$as_echo_n "checking GTK_LIBS... " >&6; }
10804 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
10805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
10806$as_echo "$GTK_LIBS" >&6; }
10807 else
10808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10809$as_echo "no" >&6; }
10810 GTK_CFLAGS=""
10811 GTK_LIBS=""
10812 ## If we have a custom action on failure, don't print errors, but
10813 ## do set a variable so people can do so.
10814 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10815
10816 fi
10817
10818
10819
10820 else
10821 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10822 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10823 fi
10824 fi
10825
10826 if test $succeeded = yes; then
10827 pkg_check_gtk=yes
10828 else
10829 pkg_check_gtk=no
10830 fi
10831
10832 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
5f64f7bd 10833 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
067d23c9
KY
10834 fi
10835fi
10836fi
10837
067d23c9
KY
10838if test x"$pkg_check_gtk" = xyes; then
10839
10840
10841
10842 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
10843 CFLAGS="$CFLAGS $GTK_CFLAGS"
10844 LIBS="$GTK_LIBS $LIBS"
10845 GTK_COMPILES=no
10846 for ac_func in gtk_main
10847do :
10848 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
5f64f7bd 10849if test "x$ac_cv_func_gtk_main" = x""yes; then :
067d23c9
KY
10850 cat >>confdefs.h <<_ACEOF
10851#define HAVE_GTK_MAIN 1
10852_ACEOF
10853 GTK_COMPILES=yes
10854fi
10855done
10856
10857 if test "${GTK_COMPILES}" != "yes"; then
10858 if test "$USE_X_TOOLKIT" != "maybe"; then
5f64f7bd 10859 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
067d23c9
KY
10860 fi
10861 else
10862 HAVE_GTK=yes
10863
10864$as_echo "#define USE_GTK 1" >>confdefs.h
10865
571e1872 10866 GTK_OBJ="gtkutil.o $GTK_OBJ"
067d23c9
KY
10867 USE_X_TOOLKIT=none
10868 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
10869 :
10870 else
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
10872 closing open displays. This is no problem if you just use
10873 one display, but if you use more than one and close one of them
10874 Emacs may crash." >&5
10875$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
10876 closing open displays. This is no problem if you just use
10877 one display, but if you use more than one and close one of them
10878 Emacs may crash." >&2;}
10879 sleep 3
10880 fi
10881 fi
10882
10883fi
10884
10885
10886
10887if test "${HAVE_GTK}" = "yes"; then
10888
10889 if test "$with_toolkit_scroll_bars" != no; then
10890 with_toolkit_scroll_bars=yes
10891 fi
10892
10893 HAVE_GTK_FILE_SELECTION=no
10894 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
10895#include <gtk/gtk.h>
10896"
5f64f7bd 10897if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
067d23c9
KY
10898 HAVE_GTK_FILE_SELECTION=yes
10899else
10900 HAVE_GTK_FILE_SELECTION=no
10901fi
10902
10903 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
10904 for ac_func in gtk_file_selection_new
10905do :
10906 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
5f64f7bd 10907if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
067d23c9
KY
10908 cat >>confdefs.h <<_ACEOF
10909#define HAVE_GTK_FILE_SELECTION_NEW 1
10910_ACEOF
10911
10912fi
10913done
10914
10915 fi
10916
067d23c9
KY
10917
10918 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
10919 gtk_dialog_get_action_area gtk_widget_get_sensitive \
10920 gtk_widget_get_mapped gtk_adjustment_get_page_size \
10921 gtk_orientable_set_orientation
10922do :
10923 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10924ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5f64f7bd
GM
10925eval as_val=\$$as_ac_var
10926 if test "x$as_val" = x""yes; then :
067d23c9
KY
10927 cat >>confdefs.h <<_ACEOF
10928#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10929_ACEOF
10930
10931fi
10932done
10933
10934
10935fi
10936
10937HAVE_DBUS=no
10938DBUS_OBJ=
10939if test "${with_dbus}" = "yes"; then
10940
10941 succeeded=no
10942
10943 # Extract the first word of "pkg-config", so it can be a program name with args.
10944set dummy pkg-config; ac_word=$2
10945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10946$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 10947if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
10948 $as_echo_n "(cached) " >&6
10949else
10950 case $PKG_CONFIG in
10951 [\\/]* | ?:[\\/]*)
10952 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10953 ;;
10954 *)
10955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10956for as_dir in $PATH
10957do
10958 IFS=$as_save_IFS
10959 test -z "$as_dir" && as_dir=.
10960 for ac_exec_ext in '' $ac_executable_extensions; do
10961 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10962 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10964 break 2
10965 fi
10966done
10967 done
10968IFS=$as_save_IFS
10969
10970 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10971 ;;
10972esac
10973fi
10974PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10975if test -n "$PKG_CONFIG"; then
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10977$as_echo "$PKG_CONFIG" >&6; }
10978else
10979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
10981fi
10982
10983
10984
10985 if test "$PKG_CONFIG" = "no" ; then
10986 HAVE_DBUS=no
10987 else
10988 PKG_CONFIG_MIN_VERSION=0.9.0
10989 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
10991$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
10992
10993 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10995$as_echo "yes" >&6; }
10996 succeeded=yes
10997
10998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
10999$as_echo_n "checking DBUS_CFLAGS... " >&6; }
11000 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
11002$as_echo "$DBUS_CFLAGS" >&6; }
11003
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
11005$as_echo_n "checking DBUS_LIBS... " >&6; }
11006 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
11008$as_echo "$DBUS_LIBS" >&6; }
11009 else
11010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11011$as_echo "no" >&6; }
11012 DBUS_CFLAGS=""
11013 DBUS_LIBS=""
11014 ## If we have a custom action on failure, don't print errors, but
11015 ## do set a variable so people can do so.
11016 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11017
11018 fi
11019
11020
11021
11022 else
11023 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11024 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11025 fi
11026 fi
11027
11028 if test $succeeded = yes; then
11029 HAVE_DBUS=yes
11030 else
11031 HAVE_DBUS=no
11032 fi
11033
11034 if test "$HAVE_DBUS" = yes; then
11035 LIBS="$LIBS $DBUS_LIBS"
11036
11037$as_echo "#define HAVE_DBUS 1" >>confdefs.h
11038
11039 for ac_func in dbus_watch_get_unix_fd
11040do :
11041 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
5f64f7bd 11042if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
067d23c9
KY
11043 cat >>confdefs.h <<_ACEOF
11044#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
11045_ACEOF
11046
11047fi
11048done
11049
11050 DBUS_OBJ=dbusbind.o
11051 fi
11052fi
11053
11054
f527bd02
GM
11055HAVE_GSETTINGS=no
11056if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
11057
11058 succeeded=no
11059
11060 # Extract the first word of "pkg-config", so it can be a program name with args.
11061set dummy pkg-config; ac_word=$2
11062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11063$as_echo_n "checking for $ac_word... " >&6; }
11064if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11065 $as_echo_n "(cached) " >&6
11066else
11067 case $PKG_CONFIG in
11068 [\\/]* | ?:[\\/]*)
11069 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11070 ;;
11071 *)
11072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11073for as_dir in $PATH
11074do
11075 IFS=$as_save_IFS
11076 test -z "$as_dir" && as_dir=.
11077 for ac_exec_ext in '' $ac_executable_extensions; do
11078 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11079 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11081 break 2
11082 fi
11083done
11084 done
11085IFS=$as_save_IFS
11086
11087 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11088 ;;
11089esac
11090fi
11091PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11092if test -n "$PKG_CONFIG"; then
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11094$as_echo "$PKG_CONFIG" >&6; }
11095else
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11097$as_echo "no" >&6; }
11098fi
11099
11100
11101
11102 if test "$PKG_CONFIG" = "no" ; then
11103 HAVE_GSETTINGS=no
11104 else
11105 PKG_CONFIG_MIN_VERSION=0.9.0
11106 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
85c1ab0b
GM
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gio-2.0 >= 2.26" >&5
11108$as_echo_n "checking for gio-2.0 >= 2.26... " >&6; }
f527bd02 11109
85c1ab0b 11110 if $PKG_CONFIG --exists "gio-2.0 >= 2.26" 2>&5; then
f527bd02
GM
11111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11112$as_echo "yes" >&6; }
11113 succeeded=yes
11114
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_CFLAGS" >&5
11116$as_echo_n "checking GSETTINGS_CFLAGS... " >&6; }
85c1ab0b 11117 GSETTINGS_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26"|sed -e 's,///*,/,g'`
f527bd02
GM
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_CFLAGS" >&5
11119$as_echo "$GSETTINGS_CFLAGS" >&6; }
11120
11121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSETTINGS_LIBS" >&5
11122$as_echo_n "checking GSETTINGS_LIBS... " >&6; }
85c1ab0b 11123 GSETTINGS_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26"|sed -e 's,///*,/,g'`
f527bd02
GM
11124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSETTINGS_LIBS" >&5
11125$as_echo "$GSETTINGS_LIBS" >&6; }
11126 else
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11128$as_echo "no" >&6; }
11129 GSETTINGS_CFLAGS=""
11130 GSETTINGS_LIBS=""
11131 ## If we have a custom action on failure, don't print errors, but
11132 ## do set a variable so people can do so.
85c1ab0b 11133 GSETTINGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gio-2.0 >= 2.26"`
f527bd02
GM
11134
11135 fi
11136
11137
11138
11139 else
11140 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11141 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11142 fi
11143 fi
11144
11145 if test $succeeded = yes; then
11146 HAVE_GSETTINGS=yes
11147 else
11148 HAVE_GSETTINGS=no
11149 fi
11150
11151 if test "$HAVE_GSETTINGS" = "yes"; then
11152
11153$as_echo "#define HAVE_GSETTINGS 1" >>confdefs.h
11154
11155 SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
11156 SETTINGS_LIBS="$GSETTINGS_LIBS"
11157 fi
11158fi
11159
067d23c9 11160HAVE_GCONF=no
17410582 11161if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
067d23c9
KY
11162
11163 succeeded=no
11164
11165 # Extract the first word of "pkg-config", so it can be a program name with args.
11166set dummy pkg-config; ac_word=$2
11167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11168$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 11169if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
11170 $as_echo_n "(cached) " >&6
11171else
11172 case $PKG_CONFIG in
11173 [\\/]* | ?:[\\/]*)
11174 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11175 ;;
11176 *)
11177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11178for as_dir in $PATH
11179do
11180 IFS=$as_save_IFS
11181 test -z "$as_dir" && as_dir=.
11182 for ac_exec_ext in '' $ac_executable_extensions; do
11183 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11184 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11186 break 2
11187 fi
11188done
11189 done
11190IFS=$as_save_IFS
11191
11192 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11193 ;;
11194esac
11195fi
11196PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11197if test -n "$PKG_CONFIG"; then
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11199$as_echo "$PKG_CONFIG" >&6; }
11200else
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202$as_echo "no" >&6; }
11203fi
11204
11205
11206
11207 if test "$PKG_CONFIG" = "no" ; then
11208 HAVE_GCONF=no
11209 else
11210 PKG_CONFIG_MIN_VERSION=0.9.0
11211 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
11213$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
11214
11215 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
11216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11217$as_echo "yes" >&6; }
11218 succeeded=yes
11219
11220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
11221$as_echo_n "checking GCONF_CFLAGS... " >&6; }
11222 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
11224$as_echo "$GCONF_CFLAGS" >&6; }
11225
11226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
11227$as_echo_n "checking GCONF_LIBS... " >&6; }
11228 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
11229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
11230$as_echo "$GCONF_LIBS" >&6; }
11231 else
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11233$as_echo "no" >&6; }
11234 GCONF_CFLAGS=""
11235 GCONF_LIBS=""
11236 ## If we have a custom action on failure, don't print errors, but
11237 ## do set a variable so people can do so.
11238 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
11239
11240 fi
11241
11242
11243
11244 else
11245 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11246 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11247 fi
11248 fi
11249
11250 if test $succeeded = yes; then
11251 HAVE_GCONF=yes
11252 else
11253 HAVE_GCONF=no
11254 fi
11255
11256 if test "$HAVE_GCONF" = yes; then
11257
11258$as_echo "#define HAVE_GCONF 1" >>confdefs.h
11259
17410582
GM
11260 SETTINGS_CFLAGS="$SETTINGS_CFLAGS $GCONF_CFLAGS"
11261 SETTINGS_LIBS="$SETTINGS_LIBS $GCONF_LIBS"
f527bd02
GM
11262 fi
11263fi
11264
11265if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
11266 SAVE_CFLAGS="$CFLAGS"
11267 SAVE_LDFLAGS="$LDFLAGS"
11268 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
11269 LDFLAGS="$SETTINGS_LIBS $LDFLAGS"
11270 for ac_func in g_type_init
067d23c9
KY
11271do :
11272 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
5f64f7bd 11273if test "x$ac_cv_func_g_type_init" = x""yes; then :
067d23c9
KY
11274 cat >>confdefs.h <<_ACEOF
11275#define HAVE_G_TYPE_INIT 1
11276_ACEOF
11277
11278fi
11279done
11280
f527bd02
GM
11281 CFLAGS="$SAVE_CFLAGS"
11282 LDFLAGS="$SAVE_LDFLAGS"
067d23c9
KY
11283fi
11284
f527bd02
GM
11285
11286
11287
067d23c9
KY
11288HAVE_LIBSELINUX=no
11289LIBSELINUX_LIBS=
11290if test "${with_selinux}" = "yes"; then
11291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
11292$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
5f64f7bd 11293if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
067d23c9
KY
11294 $as_echo_n "(cached) " >&6
11295else
11296 ac_check_lib_save_LIBS=$LIBS
11297LIBS="-lselinux $LIBS"
11298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11299/* end confdefs.h. */
11300
11301/* Override any GCC internal prototype to avoid an error.
11302 Use char because int might match the return type of a GCC
11303 builtin and then its argument prototype would still apply. */
11304#ifdef __cplusplus
11305extern "C"
11306#endif
11307char lgetfilecon ();
11308int
11309main ()
11310{
11311return lgetfilecon ();
11312 ;
11313 return 0;
11314}
11315_ACEOF
11316if ac_fn_c_try_link "$LINENO"; then :
11317 ac_cv_lib_selinux_lgetfilecon=yes
11318else
11319 ac_cv_lib_selinux_lgetfilecon=no
11320fi
11321rm -f core conftest.err conftest.$ac_objext \
11322 conftest$ac_exeext conftest.$ac_ext
11323LIBS=$ac_check_lib_save_LIBS
11324fi
11325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
11326$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
5f64f7bd 11327if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
067d23c9
KY
11328 HAVE_LIBSELINUX=yes
11329else
11330 HAVE_LIBSELINUX=no
11331fi
11332
11333 if test "$HAVE_LIBSELINUX" = yes; then
11334
11335$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
11336
11337 LIBSELINUX_LIBS=-lselinux
11338 fi
11339fi
11340
11341
11342HAVE_GNUTLS=no
e7d4e61f 11343HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=no
067d23c9
KY
11344if test "${with_gnutls}" = "yes" ; then
11345
11346 succeeded=no
11347
11348 # Extract the first word of "pkg-config", so it can be a program name with args.
11349set dummy pkg-config; ac_word=$2
11350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11351$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 11352if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
11353 $as_echo_n "(cached) " >&6
11354else
11355 case $PKG_CONFIG in
11356 [\\/]* | ?:[\\/]*)
11357 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11358 ;;
11359 *)
11360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11361for as_dir in $PATH
11362do
11363 IFS=$as_save_IFS
11364 test -z "$as_dir" && as_dir=.
11365 for ac_exec_ext in '' $ac_executable_extensions; do
11366 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11367 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11368 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11369 break 2
11370 fi
11371done
11372 done
11373IFS=$as_save_IFS
11374
11375 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11376 ;;
11377esac
11378fi
11379PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11380if test -n "$PKG_CONFIG"; then
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11382$as_echo "$PKG_CONFIG" >&6; }
11383else
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
11386fi
11387
11388
11389
11390 if test "$PKG_CONFIG" = "no" ; then
11391 HAVE_GNUTLS=no
11392 else
11393 PKG_CONFIG_MIN_VERSION=0.9.0
11394 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
b8bd6c8d
GM
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.6.0" >&5
11396$as_echo_n "checking for gnutls >= 2.6.0... " >&6; }
067d23c9 11397
b8bd6c8d 11398 if $PKG_CONFIG --exists "gnutls >= 2.6.0" 2>&5; then
067d23c9
KY
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11400$as_echo "yes" >&6; }
11401 succeeded=yes
11402
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5
11404$as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; }
b8bd6c8d 11405 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.6.0"|sed -e 's,///*,/,g'`
067d23c9
KY
11406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5
11407$as_echo "$LIBGNUTLS_CFLAGS" >&6; }
11408
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5
11410$as_echo_n "checking LIBGNUTLS_LIBS... " >&6; }
b8bd6c8d 11411 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.6.0"|sed -e 's,///*,/,g'`
067d23c9
KY
11412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5
11413$as_echo "$LIBGNUTLS_LIBS" >&6; }
11414 else
11415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11416$as_echo "no" >&6; }
11417 LIBGNUTLS_CFLAGS=""
11418 LIBGNUTLS_LIBS=""
11419 ## If we have a custom action on failure, don't print errors, but
11420 ## do set a variable so people can do so.
b8bd6c8d 11421 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.6.0"`
067d23c9
KY
11422
11423 fi
11424
11425
11426
11427 else
11428 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11429 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11430 fi
11431 fi
11432
11433 if test $succeeded = yes; then
11434 HAVE_GNUTLS=yes
11435 else
11436 HAVE_GNUTLS=no
11437 fi
11438
11439 if test "${HAVE_GNUTLS}" = "yes"; then
11440
11441$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
11442
11443 fi
e7d4e61f
GM
11444
11445 CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
11446 LIBS="$LIBGNUTLS_LIBS $LIBS"
11447 for ac_func in gnutls_certificate_set_verify_function
11448do :
11449 ac_fn_c_check_func "$LINENO" "gnutls_certificate_set_verify_function" "ac_cv_func_gnutls_certificate_set_verify_function"
11450if test "x$ac_cv_func_gnutls_certificate_set_verify_function" = x""yes; then :
11451 cat >>confdefs.h <<_ACEOF
11452#define HAVE_GNUTLS_CERTIFICATE_SET_VERIFY_FUNCTION 1
11453_ACEOF
11454 HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY=yes
11455fi
11456done
11457
11458
11459 if test "${HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY}" = "yes"; then
11460
11461$as_echo "#define HAVE_GNUTLS_CALLBACK_CERTIFICATE_VERIFY 1" >>confdefs.h
11462
11463 fi
067d23c9
KY
11464fi
11465
11466
11467
e7d4e61f 11468
067d23c9
KY
11469HAVE_XAW3D=no
11470LUCID_LIBW=
11471if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
11472 if test "$with_xaw3d" != no; then
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
11474$as_echo_n "checking for xaw3d... " >&6; }
5f64f7bd 11475 if test "${emacs_cv_xaw3d+set}" = set; then :
067d23c9
KY
11476 $as_echo_n "(cached) " >&6
11477else
11478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11479/* end confdefs.h. */
11480
11481#include <X11/Intrinsic.h>
11482#include <X11/Xaw3d/Simple.h>
11483int
11484main ()
11485{
11486
11487 ;
11488 return 0;
11489}
11490_ACEOF
11491if ac_fn_c_try_link "$LINENO"; then :
14beddf4
CY
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
11493$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
5f64f7bd 11494if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
ae1362a3
AS
11495 $as_echo_n "(cached) " >&6
11496else
11497 ac_check_lib_save_LIBS=$LIBS
14beddf4 11498LIBS="-lXaw3d $LIBS"
ae1362a3
AS
11499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11500/* end confdefs.h. */
bf89cb4d 11501
ae1362a3
AS
11502/* Override any GCC internal prototype to avoid an error.
11503 Use char because int might match the return type of a GCC
11504 builtin and then its argument prototype would still apply. */
11505#ifdef __cplusplus
11506extern "C"
11507#endif
14beddf4 11508char XawScrollbarSetThumb ();
ae1362a3
AS
11509int
11510main ()
11511{
14beddf4 11512return XawScrollbarSetThumb ();
ae1362a3
AS
11513 ;
11514 return 0;
11515}
11516_ACEOF
11517if ac_fn_c_try_link "$LINENO"; then :
14beddf4 11518 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ae1362a3 11519else
14beddf4 11520 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ae1362a3
AS
11521fi
11522rm -f core conftest.err conftest.$ac_objext \
11523 conftest$ac_exeext conftest.$ac_ext
11524LIBS=$ac_check_lib_save_LIBS
11525fi
14beddf4
CY
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
11527$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
5f64f7bd 11528if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
067d23c9
KY
11529 emacs_cv_xaw3d=yes
11530else
11531 emacs_cv_xaw3d=no
11532fi
14beddf4
CY
11533
11534else
11535 emacs_cv_xaw3d=no
11536fi
067d23c9
KY
11537rm -f core conftest.err conftest.$ac_objext \
11538 conftest$ac_exeext conftest.$ac_ext
11539fi
11540
11541 else
11542 emacs_cv_xaw3d=no
11543 fi
11544 if test $emacs_cv_xaw3d = yes; then
11545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11546$as_echo "yes; using Lucid toolkit" >&6; }
11547 USE_X_TOOLKIT=LUCID
11548 HAVE_XAW3D=yes
11549 LUCID_LIBW=-lXaw3d
11550
11551$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
11552
11553 else
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11555$as_echo "no" >&6; }
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
11557$as_echo_n "checking for libXaw... " >&6; }
5f64f7bd 11558 if test "${emacs_cv_xaw+set}" = set; then :
067d23c9
KY
11559 $as_echo_n "(cached) " >&6
11560else
11561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11562/* end confdefs.h. */
11563
11564#include <X11/Intrinsic.h>
11565#include <X11/Xaw/Simple.h>
11566int
11567main ()
11568{
11569
11570 ;
11571 return 0;
11572}
11573_ACEOF
11574if ac_fn_c_try_link "$LINENO"; then :
11575 emacs_cv_xaw=yes
11576else
11577 emacs_cv_xaw=no
11578fi
11579rm -f core conftest.err conftest.$ac_objext \
11580 conftest$ac_exeext conftest.$ac_ext
11581fi
11582
11583 if test $emacs_cv_xaw = yes; then
11584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
11585$as_echo "yes; using Lucid toolkit" >&6; }
11586 USE_X_TOOLKIT=LUCID
11587 LUCID_LIBW=-lXaw
11588 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
5f64f7bd 11589 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
067d23c9 11590 else
cf6f3ed8
GM
11591 as_fn_error "No X toolkit could be found.
11592If you are sure you want Emacs compiled without an X toolkit, pass
11593 --with-x-toolkit=no
11594to configure. Otherwise, install the development libraries for the toolkit
11595that you want to use (e.g. Gtk+) and re-run configure." "$LINENO" 5
067d23c9
KY
11596 fi
11597 fi
11598fi
11599
11600X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11601
11602LIBXTR6=
11603if test "${USE_X_TOOLKIT}" != "none"; then
11604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
11605$as_echo_n "checking X11 toolkit version... " >&6; }
5f64f7bd 11606 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
067d23c9
KY
11607 $as_echo_n "(cached) " >&6
11608else
11609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11610/* end confdefs.h. */
11611#include <X11/Intrinsic.h>
11612int
11613main ()
11614{
11615#if XtSpecificationRelease < 6
11616fail;
11617#endif
11618
11619 ;
11620 return 0;
11621}
11622_ACEOF
11623if ac_fn_c_try_link "$LINENO"; then :
11624 emacs_cv_x11_toolkit_version_6=yes
11625else
11626 emacs_cv_x11_toolkit_version_6=no
11627fi
11628rm -f core conftest.err conftest.$ac_objext \
11629 conftest$ac_exeext conftest.$ac_ext
11630fi
11631
11632 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11633 if test $emacs_cv_x11_toolkit_version_6 = yes; then
11634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
11635$as_echo "6 or newer" >&6; }
11636
11637$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
11638
11639 LIBXTR6="-lSM -lICE"
11640 case "$opsys" in
11641 ## Use libw.a along with X11R6 Xt.
11642 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
11643 esac
11644 else
11645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
11646$as_echo "before 6" >&6; }
11647 fi
11648
11649 OLDLIBS="$LIBS"
11650 if test x$HAVE_X11XTR6 = xyes; then
11651 LIBS="-lXt -lSM -lICE $LIBS"
11652 else
11653 LIBS="-lXt $LIBS"
11654 fi
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
11656$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
5f64f7bd 11657if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
067d23c9
KY
11658 $as_echo_n "(cached) " >&6
11659else
11660 ac_check_lib_save_LIBS=$LIBS
11661LIBS="-lXmu $LIBS"
11662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11663/* end confdefs.h. */
11664
11665/* Override any GCC internal prototype to avoid an error.
11666 Use char because int might match the return type of a GCC
11667 builtin and then its argument prototype would still apply. */
11668#ifdef __cplusplus
11669extern "C"
11670#endif
11671char XmuConvertStandardSelection ();
11672int
11673main ()
11674{
11675return XmuConvertStandardSelection ();
11676 ;
11677 return 0;
11678}
11679_ACEOF
11680if ac_fn_c_try_link "$LINENO"; then :
11681 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11682else
11683 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
11684fi
11685rm -f core conftest.err conftest.$ac_objext \
11686 conftest$ac_exeext conftest.$ac_ext
11687LIBS=$ac_check_lib_save_LIBS
11688fi
11689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11690$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
5f64f7bd 11691if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
067d23c9
KY
11692 cat >>confdefs.h <<_ACEOF
11693#define HAVE_LIBXMU 1
11694_ACEOF
11695
11696 LIBS="-lXmu $LIBS"
11697
11698fi
11699
11700 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11701fi
11702
11703
11704LIBXMU=-lXmu
d6a003a8
AS
11705case $opsys in
11706 ## These systems don't supply Xmu.
067d23c9
KY
11707 hpux* | aix4-2 )
11708 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
11709 ;;
11710esac
11711
11712
11713# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11714if test "${HAVE_X11}" = "yes"; then
11715 if test "${USE_X_TOOLKIT}" != "none"; then
11716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
11717$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
5f64f7bd 11718if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
067d23c9
KY
11719 $as_echo_n "(cached) " >&6
11720else
11721 ac_check_lib_save_LIBS=$LIBS
11722LIBS="-lXext $LIBS"
11723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11724/* end confdefs.h. */
11725
11726/* Override any GCC internal prototype to avoid an error.
11727 Use char because int might match the return type of a GCC
11728 builtin and then its argument prototype would still apply. */
11729#ifdef __cplusplus
11730extern "C"
11731#endif
11732char XShapeQueryExtension ();
11733int
11734main ()
11735{
11736return XShapeQueryExtension ();
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741if ac_fn_c_try_link "$LINENO"; then :
11742 ac_cv_lib_Xext_XShapeQueryExtension=yes
11743else
11744 ac_cv_lib_Xext_XShapeQueryExtension=no
11745fi
11746rm -f core conftest.err conftest.$ac_objext \
11747 conftest$ac_exeext conftest.$ac_ext
11748LIBS=$ac_check_lib_save_LIBS
11749fi
11750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11751$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
5f64f7bd 11752if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
067d23c9
KY
11753 cat >>confdefs.h <<_ACEOF
11754#define HAVE_LIBXEXT 1
11755_ACEOF
11756
11757 LIBS="-lXext $LIBS"
11758
11759fi
11760
11761 fi
11762fi
11763
11764LIBXP=
11765if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
11767$as_echo_n "checking for Motif version 2.1... " >&6; }
5f64f7bd 11768if test "${emacs_cv_motif_version_2_1+set}" = set; then :
067d23c9
KY
11769 $as_echo_n "(cached) " >&6
11770else
11771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11772/* end confdefs.h. */
11773#include <Xm/Xm.h>
11774int
11775main ()
11776{
11777#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11778int x = 5;
11779#else
11780Motif version prior to 2.1.
11781#endif
11782 ;
11783 return 0;
11784}
11785_ACEOF
11786if ac_fn_c_try_compile "$LINENO"; then :
11787 emacs_cv_motif_version_2_1=yes
11788else
11789 emacs_cv_motif_version_2_1=no
11790fi
11791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11792fi
11793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
11794$as_echo "$emacs_cv_motif_version_2_1" >&6; }
11795 if test $emacs_cv_motif_version_2_1 = yes; then
11796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
11797$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
5f64f7bd 11798if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
067d23c9
KY
11799 $as_echo_n "(cached) " >&6
11800else
11801 ac_check_lib_save_LIBS=$LIBS
11802LIBS="-lXp $LIBS"
11803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11804/* end confdefs.h. */
11805
11806/* Override any GCC internal prototype to avoid an error.
11807 Use char because int might match the return type of a GCC
11808 builtin and then its argument prototype would still apply. */
11809#ifdef __cplusplus
11810extern "C"
11811#endif
11812char XpCreateContext ();
11813int
11814main ()
11815{
11816return XpCreateContext ();
11817 ;
11818 return 0;
11819}
11820_ACEOF
11821if ac_fn_c_try_link "$LINENO"; then :
11822 ac_cv_lib_Xp_XpCreateContext=yes
11823else
11824 ac_cv_lib_Xp_XpCreateContext=no
11825fi
11826rm -f core conftest.err conftest.$ac_objext \
11827 conftest$ac_exeext conftest.$ac_ext
11828LIBS=$ac_check_lib_save_LIBS
11829fi
11830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
11831$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
5f64f7bd 11832if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
067d23c9
KY
11833 LIBXP=-lXp
11834fi
11835
11836 else
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
11838$as_echo_n "checking for LessTif where some systems put it... " >&6; }
5f64f7bd 11839if test "${emacs_cv_lesstif+set}" = set; then :
067d23c9
KY
11840 $as_echo_n "(cached) " >&6
11841else
11842 # We put this in CFLAGS temporarily to precede other -I options
11843 # that might be in CFLAGS temporarily.
11844 # We put this in CPPFLAGS where it precedes the other -I options.
11845 OLD_CPPFLAGS=$CPPFLAGS
11846 OLD_CFLAGS=$CFLAGS
11847 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
11848 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
11849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11850/* end confdefs.h. */
11851#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
11852int
11853main ()
11854{
11855int x = 5;
11856 ;
11857 return 0;
11858}
11859_ACEOF
11860if ac_fn_c_try_compile "$LINENO"; then :
11861 emacs_cv_lesstif=yes
11862else
11863 emacs_cv_lesstif=no
11864fi
11865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11866fi
11867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
11868$as_echo "$emacs_cv_lesstif" >&6; }
11869 if test $emacs_cv_lesstif = yes; then
11870 # Make sure this -I option remains in CPPFLAGS after it is set
11871 # back to REAL_CPPFLAGS.
11872 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
11873 # have those other -I options anyway. Ultimately, having this
11874 # directory ultimately in CPPFLAGS will be enough.
11875 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
11876 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
11877 else
11878 CFLAGS=$OLD_CFLAGS
11879 CPPFLAGS=$OLD_CPPFLAGS
11880 fi
11881 fi
11882fi
11883
11884
11885USE_TOOLKIT_SCROLL_BARS=no
11886if test "${with_toolkit_scroll_bars}" != "no"; then
11887 if test "${USE_X_TOOLKIT}" != "none"; then
11888 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
11889 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11890
11891 HAVE_XAW3D=no
11892 USE_TOOLKIT_SCROLL_BARS=yes
11893 elif test "${HAVE_XAW3D}" = "yes"; then
11894 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11895
11896 USE_TOOLKIT_SCROLL_BARS=yes
11897 fi
11898 elif test "${HAVE_GTK}" = "yes"; then
11899 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11900
11901 USE_TOOLKIT_SCROLL_BARS=yes
11902 elif test "${HAVE_NS}" = "yes"; then
11903 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
11904
11905 USE_TOOLKIT_SCROLL_BARS=yes
11906 fi
11907fi
11908
11909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910/* end confdefs.h. */
11911
11912 #include <X11/Xlib.h>
11913 #include <X11/Xresource.h>
11914int
11915main ()
11916{
11917XIMProc callback;
11918 ;
11919 return 0;
11920}
11921_ACEOF
11922if ac_fn_c_try_compile "$LINENO"; then :
11923 HAVE_XIM=yes
11924
11925$as_echo "#define HAVE_XIM 1" >>confdefs.h
11926
11927else
11928 HAVE_XIM=no
11929fi
11930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931
11932
11933if test "${with_xim}" != "no"; then
11934
11935$as_echo "#define USE_XIM 1" >>confdefs.h
11936
11937fi
11938
11939
11940if test "${HAVE_XIM}" != "no"; then
11941 late_CFLAGS=$CFLAGS
11942 if test "$GCC" = yes; then
11943 CFLAGS="$CFLAGS --pedantic-errors"
11944 fi
11945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11946/* end confdefs.h. */
11947
11948#include <X11/Xlib.h>
11949#include <X11/Xresource.h>
11950int
11951main ()
11952{
11953Display *display;
11954XrmDatabase db;
11955char *res_name;
11956char *res_class;
11957XIMProc callback;
11958XPointer *client_data;
11959#ifndef __GNUC__
11960/* If we're not using GCC, it's probably not XFree86, and this is
11961 probably right, but we can't use something like --pedantic-errors. */
11962extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
11963 char*, XIMProc, XPointer*);
11964#endif
11965(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
11966 client_data);
11967 ;
11968 return 0;
11969}
11970_ACEOF
11971if ac_fn_c_try_compile "$LINENO"; then :
11972 emacs_cv_arg6_star=yes
11973fi
11974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11975 if test "$emacs_cv_arg6_star" = yes; then
11976 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
11977
11978 else
11979 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
11980
11981 fi
11982 CFLAGS=$late_CFLAGS
11983fi
11984
11985### Start of font-backend (under any platform) section.
11986# (nothing here yet -- this is a placeholder)
11987### End of font-backend (under any platform) section.
11988
11989### Start of font-backend (under X11) section.
11990if test "${HAVE_X11}" = "yes"; then
11991
11992 succeeded=no
11993
11994 # Extract the first word of "pkg-config", so it can be a program name with args.
11995set dummy pkg-config; ac_word=$2
11996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11997$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 11998if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
11999 $as_echo_n "(cached) " >&6
12000else
12001 case $PKG_CONFIG in
12002 [\\/]* | ?:[\\/]*)
12003 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12004 ;;
12005 *)
12006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12007for as_dir in $PATH
12008do
12009 IFS=$as_save_IFS
12010 test -z "$as_dir" && as_dir=.
12011 for ac_exec_ext in '' $ac_executable_extensions; do
12012 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12013 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12015 break 2
12016 fi
12017done
12018 done
12019IFS=$as_save_IFS
12020
12021 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12022 ;;
12023esac
12024fi
12025PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12026if test -n "$PKG_CONFIG"; then
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12028$as_echo "$PKG_CONFIG" >&6; }
12029else
12030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12031$as_echo "no" >&6; }
12032fi
12033
12034
12035
12036 if test "$PKG_CONFIG" = "no" ; then
12037 HAVE_FC=no
12038 else
12039 PKG_CONFIG_MIN_VERSION=0.9.0
12040 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
12042$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
12043
12044 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
12045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12046$as_echo "yes" >&6; }
12047 succeeded=yes
12048
12049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
12050$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
12051 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
12052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
12053$as_echo "$FONTCONFIG_CFLAGS" >&6; }
12054
12055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
12056$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
12057 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
12058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
12059$as_echo "$FONTCONFIG_LIBS" >&6; }
12060 else
12061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12062$as_echo "no" >&6; }
12063 FONTCONFIG_CFLAGS=""
12064 FONTCONFIG_LIBS=""
12065 ## If we have a custom action on failure, don't print errors, but
12066 ## do set a variable so people can do so.
12067 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
12068
12069 fi
12070
12071
12072
12073 else
12074 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12075 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12076 fi
12077 fi
12078
12079 if test $succeeded = yes; then
12080 HAVE_FC=yes
12081 else
12082 HAVE_FC=no
12083 fi
12084
12085
12086 ## Use -lXft if available, unless `--with-xft=no'.
12087 HAVE_XFT=maybe
12088 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
12089 with_xft="no";
12090 fi
12091 if test "x${with_xft}" != "xno"; then
12092
12093
12094 succeeded=no
12095
12096 # Extract the first word of "pkg-config", so it can be a program name with args.
12097set dummy pkg-config; ac_word=$2
12098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12099$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 12100if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
12101 $as_echo_n "(cached) " >&6
12102else
12103 case $PKG_CONFIG in
12104 [\\/]* | ?:[\\/]*)
12105 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12106 ;;
12107 *)
12108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12109for as_dir in $PATH
12110do
12111 IFS=$as_save_IFS
12112 test -z "$as_dir" && as_dir=.
12113 for ac_exec_ext in '' $ac_executable_extensions; do
12114 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12115 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12117 break 2
12118 fi
12119done
12120 done
12121IFS=$as_save_IFS
12122
12123 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12124 ;;
12125esac
12126fi
12127PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12128if test -n "$PKG_CONFIG"; then
12129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12130$as_echo "$PKG_CONFIG" >&6; }
12131else
12132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12133$as_echo "no" >&6; }
12134fi
12135
12136
12137
12138 if test "$PKG_CONFIG" = "no" ; then
12139 HAVE_XFT=no
12140 else
12141 PKG_CONFIG_MIN_VERSION=0.9.0
12142 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
12144$as_echo_n "checking for xft >= 0.13.0... " >&6; }
12145
12146 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12148$as_echo "yes" >&6; }
12149 succeeded=yes
12150
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
12152$as_echo_n "checking XFT_CFLAGS... " >&6; }
12153 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
12155$as_echo "$XFT_CFLAGS" >&6; }
12156
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
12158$as_echo_n "checking XFT_LIBS... " >&6; }
12159 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
12161$as_echo "$XFT_LIBS" >&6; }
12162 else
12163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12164$as_echo "no" >&6; }
12165 XFT_CFLAGS=""
12166 XFT_LIBS=""
12167 ## If we have a custom action on failure, don't print errors, but
12168 ## do set a variable so people can do so.
12169 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12170
12171 fi
12172
12173
12174
12175 else
12176 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12177 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12178 fi
12179 fi
12180
12181 if test $succeeded = yes; then
12182 :
12183 else
12184 HAVE_XFT=no
12185 fi
12186
12187 ## Because xftfont.c uses XRenderQueryExtension, we also
12188 ## need to link to -lXrender.
12189 HAVE_XRENDER=no
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
12191$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
5f64f7bd 12192if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
067d23c9
KY
12193 $as_echo_n "(cached) " >&6
12194else
12195 ac_check_lib_save_LIBS=$LIBS
12196LIBS="-lXrender $LIBS"
12197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12198/* end confdefs.h. */
12199
12200/* Override any GCC internal prototype to avoid an error.
12201 Use char because int might match the return type of a GCC
12202 builtin and then its argument prototype would still apply. */
12203#ifdef __cplusplus
12204extern "C"
12205#endif
12206char XRenderQueryExtension ();
12207int
12208main ()
12209{
12210return XRenderQueryExtension ();
12211 ;
12212 return 0;
12213}
12214_ACEOF
12215if ac_fn_c_try_link "$LINENO"; then :
12216 ac_cv_lib_Xrender_XRenderQueryExtension=yes
12217else
12218 ac_cv_lib_Xrender_XRenderQueryExtension=no
12219fi
12220rm -f core conftest.err conftest.$ac_objext \
12221 conftest$ac_exeext conftest.$ac_ext
12222LIBS=$ac_check_lib_save_LIBS
12223fi
12224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
12225$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
5f64f7bd 12226if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
067d23c9
KY
12227 HAVE_XRENDER=yes
12228fi
12229
12230 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
12231 OLD_CPPFLAGS="$CPPFLAGS"
12232 OLD_CFLAGS="$CFLAGS"
12233 OLD_LIBS="$LIBS"
12234 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12235 CFLAGS="$CFLAGS $XFT_CFLAGS"
12236 XFT_LIBS="-lXrender $XFT_LIBS"
12237 LIBS="$XFT_LIBS $LIBS"
12238 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
5f64f7bd 12239if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
067d23c9
KY
12240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
12241$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
5f64f7bd 12242if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
067d23c9
KY
12243 $as_echo_n "(cached) " >&6
12244else
12245 ac_check_lib_save_LIBS=$LIBS
12246LIBS="-lXft $XFT_LIBS $LIBS"
12247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12248/* end confdefs.h. */
12249
12250/* Override any GCC internal prototype to avoid an error.
12251 Use char because int might match the return type of a GCC
12252 builtin and then its argument prototype would still apply. */
12253#ifdef __cplusplus
12254extern "C"
12255#endif
12256char XftFontOpen ();
12257int
12258main ()
12259{
12260return XftFontOpen ();
12261 ;
12262 return 0;
12263}
12264_ACEOF
12265if ac_fn_c_try_link "$LINENO"; then :
12266 ac_cv_lib_Xft_XftFontOpen=yes
12267else
12268 ac_cv_lib_Xft_XftFontOpen=no
12269fi
12270rm -f core conftest.err conftest.$ac_objext \
12271 conftest$ac_exeext conftest.$ac_ext
12272LIBS=$ac_check_lib_save_LIBS
12273fi
12274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12275$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
5f64f7bd 12276if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
067d23c9
KY
12277 HAVE_XFT=yes
12278fi
12279
12280fi
12281
12282
12283
12284 if test "${HAVE_XFT}" = "yes"; then
12285
12286$as_echo "#define HAVE_XFT 1" >>confdefs.h
12287
12288
12289 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12290 else
12291 CPPFLAGS="$OLD_CPPFLAGS"
12292 CFLAGS="$OLD_CFLAGS"
12293 LIBS="$OLD_LIBS"
12294 fi # "${HAVE_XFT}" = "yes"
12295 fi # "$HAVE_XFT" != no
12296 fi # "x${with_xft}" != "xno"
12297
067d23c9
KY
12298 ## We used to allow building with FreeType and without Xft.
12299 ## However, the ftx font backend driver is not in good shape.
7834125e
GM
12300 if test "$HAVE_XFT" != "yes"; then
12301 HAVE_XFT=no
12302 HAVE_FREETYPE=no
12303 else
12304
12305 succeeded=no
12306
12307 # Extract the first word of "pkg-config", so it can be a program name with args.
12308set dummy pkg-config; ac_word=$2
12309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12310$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 12311if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
7834125e
GM
12312 $as_echo_n "(cached) " >&6
12313else
12314 case $PKG_CONFIG in
12315 [\\/]* | ?:[\\/]*)
12316 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12317 ;;
12318 *)
12319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12320for as_dir in $PATH
12321do
12322 IFS=$as_save_IFS
12323 test -z "$as_dir" && as_dir=.
12324 for ac_exec_ext in '' $ac_executable_extensions; do
12325 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12326 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12328 break 2
12329 fi
12330done
12331 done
12332IFS=$as_save_IFS
12333
12334 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12335 ;;
12336esac
12337fi
12338PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12339if test -n "$PKG_CONFIG"; then
12340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12341$as_echo "$PKG_CONFIG" >&6; }
12342else
12343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12344$as_echo "no" >&6; }
12345fi
12346
12347
12348
12349 if test "$PKG_CONFIG" = "no" ; then
12350 HAVE_FREETYPE=no
12351 else
12352 PKG_CONFIG_MIN_VERSION=0.9.0
12353 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype2" >&5
12355$as_echo_n "checking for freetype2... " >&6; }
12356
12357 if $PKG_CONFIG --exists "freetype2" 2>&5; then
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12359$as_echo "yes" >&6; }
12360 succeeded=yes
12361
12362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_CFLAGS" >&5
12363$as_echo_n "checking FREETYPE_CFLAGS... " >&6; }
12364 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_CFLAGS" >&5
12366$as_echo "$FREETYPE_CFLAGS" >&6; }
12367
12368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FREETYPE_LIBS" >&5
12369$as_echo_n "checking FREETYPE_LIBS... " >&6; }
12370 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
12371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIBS" >&5
12372$as_echo "$FREETYPE_LIBS" >&6; }
12373 else
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
12376 FREETYPE_CFLAGS=""
12377 FREETYPE_LIBS=""
12378 ## If we have a custom action on failure, don't print errors, but
12379 ## do set a variable so people can do so.
12380 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
12381
12382 fi
12383
12384
12385
12386 else
12387 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12388 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12389 fi
12390 fi
12391
12392 if test $succeeded = yes; then
12393 HAVE_FREETYPE=yes
12394 else
12395 HAVE_FREETYPE=no
12396 fi
12397
12398
5f64f7bd 12399 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
7834125e 12400 fi
067d23c9
KY
12401
12402 HAVE_LIBOTF=no
12403 if test "${HAVE_FREETYPE}" = "yes"; then
12404
12405$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
12406
12407 if test "${with_libotf}" != "no"; then
12408
12409 succeeded=no
12410
12411 # Extract the first word of "pkg-config", so it can be a program name with args.
12412set dummy pkg-config; ac_word=$2
12413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12414$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 12415if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
12416 $as_echo_n "(cached) " >&6
12417else
12418 case $PKG_CONFIG in
12419 [\\/]* | ?:[\\/]*)
12420 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12421 ;;
12422 *)
12423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12424for as_dir in $PATH
12425do
12426 IFS=$as_save_IFS
12427 test -z "$as_dir" && as_dir=.
12428 for ac_exec_ext in '' $ac_executable_extensions; do
12429 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12430 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12431 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12432 break 2
12433 fi
12434done
12435 done
12436IFS=$as_save_IFS
12437
12438 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12439 ;;
12440esac
12441fi
12442PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12443if test -n "$PKG_CONFIG"; then
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12445$as_echo "$PKG_CONFIG" >&6; }
12446else
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12448$as_echo "no" >&6; }
12449fi
12450
12451
12452
12453 if test "$PKG_CONFIG" = "no" ; then
12454 HAVE_LIBOTF=no
12455 else
12456 PKG_CONFIG_MIN_VERSION=0.9.0
12457 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
12459$as_echo_n "checking for libotf... " >&6; }
12460
12461 if $PKG_CONFIG --exists "libotf" 2>&5; then
12462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12463$as_echo "yes" >&6; }
12464 succeeded=yes
12465
12466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
12467$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
12468 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
12469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
12470$as_echo "$LIBOTF_CFLAGS" >&6; }
12471
12472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
12473$as_echo_n "checking LIBOTF_LIBS... " >&6; }
12474 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
12475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
12476$as_echo "$LIBOTF_LIBS" >&6; }
12477 else
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12479$as_echo "no" >&6; }
12480 LIBOTF_CFLAGS=""
12481 LIBOTF_LIBS=""
12482 ## If we have a custom action on failure, don't print errors, but
12483 ## do set a variable so people can do so.
12484 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
12485
12486 fi
12487
12488
12489
12490 else
12491 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12492 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12493 fi
12494 fi
12495
12496 if test $succeeded = yes; then
12497 HAVE_LIBOTF=yes
12498 else
12499 HAVE_LIBOTF=no
12500 fi
12501
12502 if test "$HAVE_LIBOTF" = "yes"; then
12503
12504$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
12505
12506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
12507$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
5f64f7bd 12508if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
067d23c9
KY
12509 $as_echo_n "(cached) " >&6
12510else
12511 ac_check_lib_save_LIBS=$LIBS
12512LIBS="-lotf $LIBS"
12513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12514/* end confdefs.h. */
12515
12516/* Override any GCC internal prototype to avoid an error.
12517 Use char because int might match the return type of a GCC
12518 builtin and then its argument prototype would still apply. */
12519#ifdef __cplusplus
12520extern "C"
12521#endif
12522char OTF_get_variation_glyphs ();
12523int
12524main ()
12525{
12526return OTF_get_variation_glyphs ();
12527 ;
12528 return 0;
12529}
12530_ACEOF
12531if ac_fn_c_try_link "$LINENO"; then :
12532 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
12533else
12534 ac_cv_lib_otf_OTF_get_variation_glyphs=no
12535fi
12536rm -f core conftest.err conftest.$ac_objext \
12537 conftest$ac_exeext conftest.$ac_ext
12538LIBS=$ac_check_lib_save_LIBS
12539fi
12540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
12541$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
5f64f7bd 12542if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
067d23c9
KY
12543 HAVE_OTF_GET_VARIATION_GLYPHS=yes
12544else
12545 HAVE_OTF_GET_VARIATION_GLYPHS=no
12546fi
12547
12548 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
12549
12550$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
12551
12552 fi
12553 fi
12554 fi
12555 fi
12556
12557 HAVE_M17N_FLT=no
12558 if test "${HAVE_LIBOTF}" = yes; then
12559 if test "${with_m17n_flt}" != "no"; then
12560
12561 succeeded=no
12562
12563 # Extract the first word of "pkg-config", so it can be a program name with args.
12564set dummy pkg-config; ac_word=$2
12565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 12567if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
12568 $as_echo_n "(cached) " >&6
12569else
12570 case $PKG_CONFIG in
12571 [\\/]* | ?:[\\/]*)
12572 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12573 ;;
12574 *)
12575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12576for as_dir in $PATH
12577do
12578 IFS=$as_save_IFS
12579 test -z "$as_dir" && as_dir=.
12580 for ac_exec_ext in '' $ac_executable_extensions; do
12581 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12582 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12584 break 2
12585 fi
12586done
12587 done
12588IFS=$as_save_IFS
12589
12590 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12591 ;;
12592esac
12593fi
12594PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12595if test -n "$PKG_CONFIG"; then
12596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
12597$as_echo "$PKG_CONFIG" >&6; }
12598else
12599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12600$as_echo "no" >&6; }
12601fi
12602
12603
12604
12605 if test "$PKG_CONFIG" = "no" ; then
12606 HAVE_M17N_FLT=no
12607 else
12608 PKG_CONFIG_MIN_VERSION=0.9.0
12609 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
12611$as_echo_n "checking for m17n-flt... " >&6; }
12612
12613 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12615$as_echo "yes" >&6; }
12616 succeeded=yes
12617
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
12619$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
12620 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
12621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
12622$as_echo "$M17N_FLT_CFLAGS" >&6; }
12623
12624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
12625$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
12626 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
12627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
12628$as_echo "$M17N_FLT_LIBS" >&6; }
12629 else
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12631$as_echo "no" >&6; }
12632 M17N_FLT_CFLAGS=""
12633 M17N_FLT_LIBS=""
12634 ## If we have a custom action on failure, don't print errors, but
12635 ## do set a variable so people can do so.
12636 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
12637
12638 fi
12639
12640
12641
12642 else
12643 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12644 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12645 fi
12646 fi
12647
12648 if test $succeeded = yes; then
12649 HAVE_M17N_FLT=yes
12650 else
12651 HAVE_M17N_FLT=no
12652 fi
12653
12654 if test "$HAVE_M17N_FLT" = "yes"; then
12655
12656$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
12657
12658 fi
12659 fi
12660 fi
12661else
12662 HAVE_XFT=no
12663 HAVE_FREETYPE=no
12664 HAVE_LIBOTF=no
12665 HAVE_M17N_FLT=no
12666fi
12667
12668### End of font-backend (under X11) section.
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679### Use -lXpm if available, unless `--with-xpm=no'.
12680HAVE_XPM=no
12681LIBXPM=
12682if test "${HAVE_X11}" = "yes"; then
12683 if test "${with_xpm}" != "no"; then
12684 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
5f64f7bd 12685if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
067d23c9
KY
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
12687$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
5f64f7bd 12688if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
067d23c9
KY
12689 $as_echo_n "(cached) " >&6
12690else
12691 ac_check_lib_save_LIBS=$LIBS
12692LIBS="-lXpm -lX11 $LIBS"
12693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12694/* end confdefs.h. */
12695
12696/* Override any GCC internal prototype to avoid an error.
12697 Use char because int might match the return type of a GCC
12698 builtin and then its argument prototype would still apply. */
12699#ifdef __cplusplus
12700extern "C"
12701#endif
12702char XpmReadFileToPixmap ();
12703int
12704main ()
12705{
12706return XpmReadFileToPixmap ();
12707 ;
12708 return 0;
12709}
12710_ACEOF
12711if ac_fn_c_try_link "$LINENO"; then :
12712 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
12713else
12714 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
12715fi
12716rm -f core conftest.err conftest.$ac_objext \
12717 conftest$ac_exeext conftest.$ac_ext
12718LIBS=$ac_check_lib_save_LIBS
12719fi
12720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12721$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
5f64f7bd 12722if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
067d23c9
KY
12723 HAVE_XPM=yes
12724fi
12725
12726fi
12727
12728
12729 if test "${HAVE_XPM}" = "yes"; then
12730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
12731$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
12732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12733/* end confdefs.h. */
12734#include "X11/xpm.h"
12735#ifndef XpmReturnAllocPixels
12736no_return_alloc_pixels
12737#endif
12738
12739_ACEOF
12740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12741 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
12742 HAVE_XPM=no
12743else
12744 HAVE_XPM=yes
12745fi
12746rm -f conftest*
12747
12748
12749 if test "${HAVE_XPM}" = "yes"; then
12750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12751$as_echo "yes" >&6; }
12752 else
12753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12754$as_echo "no" >&6; }
12755 fi
12756 fi
12757 fi
12758
12759 if test "${HAVE_XPM}" = "yes"; then
12760
12761$as_echo "#define HAVE_XPM 1" >>confdefs.h
12762
12763 LIBXPM=-lXpm
12764 fi
12765fi
12766
12767
12768### Use -ljpeg if available, unless `--with-jpeg=no'.
12769HAVE_JPEG=no
12770LIBJPEG=
12771if test "${HAVE_X11}" = "yes"; then
12772 if test "${with_jpeg}" != "no"; then
12773 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
5f64f7bd 12774if test "x$ac_cv_header_jerror_h" = x""yes; then :
067d23c9
KY
12775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
12776$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
5f64f7bd 12777if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
067d23c9
KY
12778 $as_echo_n "(cached) " >&6
12779else
12780 ac_check_lib_save_LIBS=$LIBS
12781LIBS="-ljpeg $LIBS"
12782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12783/* end confdefs.h. */
12784
12785/* Override any GCC internal prototype to avoid an error.
12786 Use char because int might match the return type of a GCC
12787 builtin and then its argument prototype would still apply. */
12788#ifdef __cplusplus
12789extern "C"
12790#endif
12791char jpeg_destroy_compress ();
12792int
12793main ()
12794{
12795return jpeg_destroy_compress ();
12796 ;
12797 return 0;
12798}
12799_ACEOF
12800if ac_fn_c_try_link "$LINENO"; then :
12801 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
12802else
12803 ac_cv_lib_jpeg_jpeg_destroy_compress=no
12804fi
12805rm -f core conftest.err conftest.$ac_objext \
12806 conftest$ac_exeext conftest.$ac_ext
12807LIBS=$ac_check_lib_save_LIBS
12808fi
12809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12810$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
5f64f7bd 12811if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
067d23c9
KY
12812 HAVE_JPEG=yes
12813fi
12814
12815fi
12816
12817
12818 fi
12819
12820 if test "${HAVE_JPEG}" = "yes"; then
12821 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12822
12823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12824/* end confdefs.h. */
12825#include <jpeglib.h>
12826 version=JPEG_LIB_VERSION
12827
12828_ACEOF
12829if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12830 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
12831 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
12832
12833else
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
12835$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12836 HAVE_JPEG=no
12837fi
12838rm -f conftest*
12839
12840 fi
12841 if test "${HAVE_JPEG}" = "yes"; then
12842 LIBJPEG=-ljpeg
12843 fi
12844fi
12845
12846
12847### Use -lpng if available, unless `--with-png=no'.
12848HAVE_PNG=no
12849LIBPNG=
12850if test "${HAVE_X11}" = "yes"; then
12851 if test "${with_png}" != "no"; then
12852 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12853 # in /usr/include/libpng.
12854 for ac_header in png.h libpng/png.h
12855do :
12856 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12857ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5f64f7bd
GM
12858eval as_val=\$$as_ac_Header
12859 if test "x$as_val" = x""yes; then :
067d23c9
KY
12860 cat >>confdefs.h <<_ACEOF
12861#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12862_ACEOF
12863
12864fi
12865
12866done
12867
12868 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
12870$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
5f64f7bd 12871if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
067d23c9
KY
12872 $as_echo_n "(cached) " >&6
12873else
12874 ac_check_lib_save_LIBS=$LIBS
12875LIBS="-lpng -lz -lm $LIBS"
12876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877/* end confdefs.h. */
12878
12879/* Override any GCC internal prototype to avoid an error.
12880 Use char because int might match the return type of a GCC
12881 builtin and then its argument prototype would still apply. */
12882#ifdef __cplusplus
12883extern "C"
12884#endif
12885char png_get_channels ();
12886int
12887main ()
12888{
12889return png_get_channels ();
12890 ;
12891 return 0;
12892}
12893_ACEOF
12894if ac_fn_c_try_link "$LINENO"; then :
12895 ac_cv_lib_png_png_get_channels=yes
12896else
12897 ac_cv_lib_png_png_get_channels=no
12898fi
12899rm -f core conftest.err conftest.$ac_objext \
12900 conftest$ac_exeext conftest.$ac_ext
12901LIBS=$ac_check_lib_save_LIBS
12902fi
12903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
12904$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
5f64f7bd 12905if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
067d23c9
KY
12906 HAVE_PNG=yes
12907fi
12908
12909 fi
12910 fi
12911
12912 if test "${HAVE_PNG}" = "yes"; then
12913
12914$as_echo "#define HAVE_PNG 1" >>confdefs.h
12915
12916 LIBPNG="-lpng -lz -lm"
12917 fi
12918fi
12919
12920
12921### Use -ltiff if available, unless `--with-tiff=no'.
12922HAVE_TIFF=no
12923LIBTIFF=
12924if test "${HAVE_X11}" = "yes"; then
12925 if test "${with_tiff}" != "no"; then
12926 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
5f64f7bd 12927if test "x$ac_cv_header_tiffio_h" = x""yes; then :
067d23c9
KY
12928 tifflibs="-lz -lm"
12929 # At least one tiff package requires the jpeg library.
12930 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
12931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
12932$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
5f64f7bd 12933if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
067d23c9
KY
12934 $as_echo_n "(cached) " >&6
12935else
12936 ac_check_lib_save_LIBS=$LIBS
12937LIBS="-ltiff $tifflibs $LIBS"
12938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12939/* end confdefs.h. */
12940
12941/* Override any GCC internal prototype to avoid an error.
12942 Use char because int might match the return type of a GCC
12943 builtin and then its argument prototype would still apply. */
12944#ifdef __cplusplus
12945extern "C"
12946#endif
12947char TIFFGetVersion ();
12948int
12949main ()
12950{
12951return TIFFGetVersion ();
12952 ;
12953 return 0;
12954}
12955_ACEOF
12956if ac_fn_c_try_link "$LINENO"; then :
12957 ac_cv_lib_tiff_TIFFGetVersion=yes
12958else
12959 ac_cv_lib_tiff_TIFFGetVersion=no
12960fi
12961rm -f core conftest.err conftest.$ac_objext \
12962 conftest$ac_exeext conftest.$ac_ext
12963LIBS=$ac_check_lib_save_LIBS
12964fi
12965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
12966$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
5f64f7bd 12967if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
067d23c9
KY
12968 HAVE_TIFF=yes
12969fi
12970
12971fi
12972
12973
12974 fi
12975
12976 if test "${HAVE_TIFF}" = "yes"; then
12977
12978$as_echo "#define HAVE_TIFF 1" >>confdefs.h
12979
12980 LIBTIFF=-ltiff
12981 fi
12982fi
12983
12984
12985### Use -lgif or -lungif if available, unless `--with-gif=no'.
12986HAVE_GIF=no
12987LIBGIF=
12988if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
12989 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
5f64f7bd 12990if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
067d23c9
KY
12991 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
12992# Earlier versions can crash Emacs.
12993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
12994$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
5f64f7bd 12995if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
067d23c9
KY
12996 $as_echo_n "(cached) " >&6
12997else
12998 ac_check_lib_save_LIBS=$LIBS
12999LIBS="-lgif $LIBS"
13000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13001/* end confdefs.h. */
13002
13003/* Override any GCC internal prototype to avoid an error.
13004 Use char because int might match the return type of a GCC
13005 builtin and then its argument prototype would still apply. */
13006#ifdef __cplusplus
13007extern "C"
13008#endif
13009char EGifPutExtensionLast ();
13010int
13011main ()
13012{
13013return EGifPutExtensionLast ();
13014 ;
13015 return 0;
13016}
13017_ACEOF
13018if ac_fn_c_try_link "$LINENO"; then :
13019 ac_cv_lib_gif_EGifPutExtensionLast=yes
13020else
13021 ac_cv_lib_gif_EGifPutExtensionLast=no
13022fi
13023rm -f core conftest.err conftest.$ac_objext \
13024 conftest$ac_exeext conftest.$ac_ext
13025LIBS=$ac_check_lib_save_LIBS
13026fi
13027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13028$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
5f64f7bd 13029if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
067d23c9
KY
13030 HAVE_GIF=yes
13031else
13032 HAVE_GIF=maybe
13033fi
13034
13035fi
13036
13037
13038
13039 if test "$HAVE_GIF" = yes; then
13040 LIBGIF=-lgif
13041 elif test "$HAVE_GIF" = maybe; then
13042# If gif_lib.h but no libgif, try libungif.
13043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
13044$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
5f64f7bd 13045if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
067d23c9
KY
13046 $as_echo_n "(cached) " >&6
13047else
13048 ac_check_lib_save_LIBS=$LIBS
13049LIBS="-lungif $LIBS"
13050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13051/* end confdefs.h. */
13052
13053/* Override any GCC internal prototype to avoid an error.
13054 Use char because int might match the return type of a GCC
13055 builtin and then its argument prototype would still apply. */
13056#ifdef __cplusplus
13057extern "C"
13058#endif
13059char EGifPutExtensionLast ();
13060int
13061main ()
13062{
13063return EGifPutExtensionLast ();
13064 ;
13065 return 0;
13066}
13067_ACEOF
13068if ac_fn_c_try_link "$LINENO"; then :
13069 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13070else
13071 ac_cv_lib_ungif_EGifPutExtensionLast=no
13072fi
13073rm -f core conftest.err conftest.$ac_objext \
13074 conftest$ac_exeext conftest.$ac_ext
13075LIBS=$ac_check_lib_save_LIBS
13076fi
13077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13078$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
5f64f7bd 13079if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
067d23c9
KY
13080 HAVE_GIF=yes
13081else
13082 HAVE_GIF=no
13083fi
13084
13085 test "$HAVE_GIF" = yes && LIBGIF=-lungif
13086 fi
13087
13088 if test "${HAVE_GIF}" = "yes"; then
13089
13090$as_echo "#define HAVE_GIF 1" >>confdefs.h
13091
13092 fi
13093fi
13094
13095
13096if test "${HAVE_X11}" = "yes"; then
13097 MISSING=""
13098 WITH_NO=""
13099 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13100 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13101 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13102 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13103 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13104 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13105 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13106 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13107 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13108 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13109
13110 if test "X${MISSING}" != X; then
5f64f7bd 13111 as_fn_error "The following required libraries were not found:
067d23c9
KY
13112 $MISSING
13113Maybe some development libraries/packages are missing?
13114If you don't want to link with them give
13115 $WITH_NO
13116as options to configure" "$LINENO" 5
13117 fi
13118fi
13119
13120### Use -lgpm if available, unless `--with-gpm=no'.
13121HAVE_GPM=no
13122LIBGPM=
067d23c9
KY
13123if test "${with_gpm}" != "no"; then
13124 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
5f64f7bd 13125if test "x$ac_cv_header_gpm_h" = x""yes; then :
067d23c9
KY
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
13127$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
5f64f7bd 13128if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
067d23c9
KY
13129 $as_echo_n "(cached) " >&6
13130else
13131 ac_check_lib_save_LIBS=$LIBS
13132LIBS="-lgpm $LIBS"
13133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13134/* end confdefs.h. */
13135
13136/* Override any GCC internal prototype to avoid an error.
13137 Use char because int might match the return type of a GCC
13138 builtin and then its argument prototype would still apply. */
13139#ifdef __cplusplus
13140extern "C"
13141#endif
13142char Gpm_Open ();
13143int
13144main ()
13145{
13146return Gpm_Open ();
13147 ;
13148 return 0;
13149}
13150_ACEOF
13151if ac_fn_c_try_link "$LINENO"; then :
13152 ac_cv_lib_gpm_Gpm_Open=yes
13153else
13154 ac_cv_lib_gpm_Gpm_Open=no
13155fi
13156rm -f core conftest.err conftest.$ac_objext \
13157 conftest$ac_exeext conftest.$ac_ext
13158LIBS=$ac_check_lib_save_LIBS
13159fi
13160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13161$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
5f64f7bd 13162if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
067d23c9
KY
13163 HAVE_GPM=yes
13164fi
13165
13166fi
13167
13168
13169
13170 if test "${HAVE_GPM}" = "yes"; then
13171
13172$as_echo "#define HAVE_GPM 1" >>confdefs.h
13173
13174 LIBGPM=-lgpm
067d23c9
KY
13175 fi
13176fi
13177
13178
13179ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
5f64f7bd 13180if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
067d23c9
KY
13181
13182$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
13183
13184fi
13185
13186
13187
13188C_SWITCH_X_SYSTEM=
13189### Use NeXTstep API to implement GUI.
13190if test "${HAVE_NS}" = "yes"; then
13191
13192$as_echo "#define HAVE_NS 1" >>confdefs.h
13193
13194 if test "${NS_IMPL_COCOA}" = "yes"; then
13195
13196$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
13197
13198 GNU_OBJC_CFLAGS=
13199 fi
13200 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
13201
13202$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
13203
13204 # See also .m.o rule in Makefile.in */
13205 # FIXME: are all these flags really needed? Document here why. */
13206 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
13207 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
13208 fi
13209 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
13210
13211$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
13212
13213 fi
13214 # We also have mouse menus.
13215 HAVE_MENUS=yes
13216 OTHER_FILES=ns-app
13217fi
13218
13219
13220### Use session management (-lSM -lICE) if available
13221HAVE_X_SM=no
13222LIBXSM=
13223if test "${HAVE_X11}" = "yes"; then
13224 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
5f64f7bd 13225if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
067d23c9
KY
13226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
13227$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
5f64f7bd 13228if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
067d23c9
KY
13229 $as_echo_n "(cached) " >&6
13230else
13231 ac_check_lib_save_LIBS=$LIBS
13232LIBS="-lSM -lICE $LIBS"
13233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13234/* end confdefs.h. */
13235
13236/* Override any GCC internal prototype to avoid an error.
13237 Use char because int might match the return type of a GCC
13238 builtin and then its argument prototype would still apply. */
13239#ifdef __cplusplus
13240extern "C"
13241#endif
13242char SmcOpenConnection ();
13243int
13244main ()
13245{
13246return SmcOpenConnection ();
13247 ;
13248 return 0;
13249}
13250_ACEOF
13251if ac_fn_c_try_link "$LINENO"; then :
13252 ac_cv_lib_SM_SmcOpenConnection=yes
13253else
13254 ac_cv_lib_SM_SmcOpenConnection=no
13255fi
13256rm -f core conftest.err conftest.$ac_objext \
13257 conftest$ac_exeext conftest.$ac_ext
13258LIBS=$ac_check_lib_save_LIBS
13259fi
13260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13261$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
5f64f7bd 13262if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
067d23c9
KY
13263 HAVE_X_SM=yes
13264fi
13265
13266fi
13267
13268
13269
13270 if test "${HAVE_X_SM}" = "yes"; then
13271
13272$as_echo "#define HAVE_X_SM 1" >>confdefs.h
13273
13274 LIBXSM="-lSM -lICE"
13275 case "$LIBS" in
13276 *-lSM*) ;;
13277 *) LIBS="$LIBXSM $LIBS" ;;
13278 esac
13279 fi
13280fi
13281
13282
13283### Use libxml (-lxml2) if available
13284if test "${with_xml2}" != "no"; then
13285 ### I'm not sure what the version number should be, so I just guessed.
13286
13287 succeeded=no
13288
13289 # Extract the first word of "pkg-config", so it can be a program name with args.
13290set dummy pkg-config; ac_word=$2
13291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13292$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 13293if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
067d23c9
KY
13294 $as_echo_n "(cached) " >&6
13295else
13296 case $PKG_CONFIG in
13297 [\\/]* | ?:[\\/]*)
13298 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13299 ;;
13300 *)
13301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13302for as_dir in $PATH
13303do
13304 IFS=$as_save_IFS
13305 test -z "$as_dir" && as_dir=.
13306 for ac_exec_ext in '' $ac_executable_extensions; do
13307 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13308 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13309 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13310 break 2
13311 fi
13312done
13313 done
13314IFS=$as_save_IFS
13315
13316 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13317 ;;
13318esac
13319fi
13320PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13321if test -n "$PKG_CONFIG"; then
13322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
13323$as_echo "$PKG_CONFIG" >&6; }
13324else
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13326$as_echo "no" >&6; }
13327fi
13328
13329
13330
13331 if test "$PKG_CONFIG" = "no" ; then
13332 HAVE_LIBXML2=no
13333 else
13334 PKG_CONFIG_MIN_VERSION=0.9.0
13335 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
dab73760
CY
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.6.17" >&5
13337$as_echo_n "checking for libxml-2.0 > 2.6.17... " >&6; }
067d23c9 13338
dab73760 13339 if $PKG_CONFIG --exists "libxml-2.0 > 2.6.17" 2>&5; then
067d23c9
KY
13340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13341$as_echo "yes" >&6; }
13342 succeeded=yes
13343
13344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5
13345$as_echo_n "checking LIBXML2_CFLAGS... " >&6; }
dab73760 13346 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'`
067d23c9
KY
13347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5
13348$as_echo "$LIBXML2_CFLAGS" >&6; }
13349
13350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5
13351$as_echo_n "checking LIBXML2_LIBS... " >&6; }
dab73760 13352 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.6.17"|sed -e 's,///*,/,g'`
067d23c9
KY
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5
13354$as_echo "$LIBXML2_LIBS" >&6; }
13355 else
13356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13357$as_echo "no" >&6; }
13358 LIBXML2_CFLAGS=""
13359 LIBXML2_LIBS=""
13360 ## If we have a custom action on failure, don't print errors, but
13361 ## do set a variable so people can do so.
dab73760 13362 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.6.17"`
067d23c9
KY
13363
13364 fi
13365
13366
13367
13368 else
13369 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13370 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13371 fi
13372 fi
13373
13374 if test $succeeded = yes; then
13375 HAVE_LIBXML2=yes
13376 else
13377 HAVE_LIBXML2=no
13378 fi
13379
13380 if test "${HAVE_LIBXML2}" = "yes"; then
13381 LIBS="$LIBXML2_LIBS $LIBS"
13382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
13383$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
5f64f7bd 13384if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
067d23c9
KY
13385 $as_echo_n "(cached) " >&6
13386else
13387 ac_check_lib_save_LIBS=$LIBS
13388LIBS="-lxml2 $LIBS"
13389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13390/* end confdefs.h. */
13391
13392/* Override any GCC internal prototype to avoid an error.
13393 Use char because int might match the return type of a GCC
13394 builtin and then its argument prototype would still apply. */
13395#ifdef __cplusplus
13396extern "C"
13397#endif
13398char htmlReadMemory ();
13399int
13400main ()
13401{
13402return htmlReadMemory ();
13403 ;
13404 return 0;
13405}
13406_ACEOF
13407if ac_fn_c_try_link "$LINENO"; then :
13408 ac_cv_lib_xml2_htmlReadMemory=yes
13409else
13410 ac_cv_lib_xml2_htmlReadMemory=no
13411fi
13412rm -f core conftest.err conftest.$ac_objext \
13413 conftest$ac_exeext conftest.$ac_ext
13414LIBS=$ac_check_lib_save_LIBS
13415fi
13416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
13417$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
5f64f7bd 13418if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
067d23c9
KY
13419 HAVE_LIBXML2=yes
13420else
13421 HAVE_LIBXML2=no
13422fi
13423
13424 if test "${HAVE_LIBXML2}" = "yes"; then
13425
13426$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
13427
13428 else
13429 LIBXML2_LIBS=""
13430 LIBXML2_CFLAGS=""
13431 fi
13432 fi
13433fi
13434
13435
13436
13437# If netdb.h doesn't declare h_errno, we must declare it by hand.
13438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
13439$as_echo_n "checking whether netdb declares h_errno... " >&6; }
5f64f7bd 13440if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
067d23c9
KY
13441 $as_echo_n "(cached) " >&6
13442else
13443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13444/* end confdefs.h. */
13445#include <netdb.h>
13446int
13447main ()
13448{
13449return h_errno;
13450 ;
13451 return 0;
13452}
13453_ACEOF
13454if ac_fn_c_try_link "$LINENO"; then :
13455 emacs_cv_netdb_declares_h_errno=yes
13456else
13457 emacs_cv_netdb_declares_h_errno=no
13458fi
13459rm -f core conftest.err conftest.$ac_objext \
13460 conftest$ac_exeext conftest.$ac_ext
13461fi
13462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
13463$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
13464if test $emacs_cv_netdb_declares_h_errno = yes; then
13465
13466$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
13467
13468fi
13469
067d23c9
KY
13470# fmod, logb, and frexp are found in -lm on most systems.
13471# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
13472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
13473$as_echo_n "checking for sqrt in -lm... " >&6; }
5f64f7bd 13474if test "${ac_cv_lib_m_sqrt+set}" = set; then :
067d23c9
KY
13475 $as_echo_n "(cached) " >&6
13476else
13477 ac_check_lib_save_LIBS=$LIBS
13478LIBS="-lm $LIBS"
13479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13480/* end confdefs.h. */
13481
13482/* Override any GCC internal prototype to avoid an error.
13483 Use char because int might match the return type of a GCC
13484 builtin and then its argument prototype would still apply. */
13485#ifdef __cplusplus
13486extern "C"
13487#endif
13488char sqrt ();
13489int
13490main ()
13491{
13492return sqrt ();
13493 ;
13494 return 0;
13495}
13496_ACEOF
13497if ac_fn_c_try_link "$LINENO"; then :
13498 ac_cv_lib_m_sqrt=yes
13499else
13500 ac_cv_lib_m_sqrt=no
13501fi
13502rm -f core conftest.err conftest.$ac_objext \
13503 conftest$ac_exeext conftest.$ac_ext
13504LIBS=$ac_check_lib_save_LIBS
13505fi
13506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
13507$as_echo "$ac_cv_lib_m_sqrt" >&6; }
5f64f7bd 13508if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
067d23c9
KY
13509 cat >>confdefs.h <<_ACEOF
13510#define HAVE_LIBM 1
13511_ACEOF
13512
13513 LIBS="-lm $LIBS"
13514
13515fi
13516
13517
13518# Check for mail-locking functions in a "mail" library. Probably this should
13519# have the same check as for liblockfile below.
13520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
13521$as_echo_n "checking for maillock in -lmail... " >&6; }
5f64f7bd 13522if test "${ac_cv_lib_mail_maillock+set}" = set; then :
067d23c9
KY
13523 $as_echo_n "(cached) " >&6
13524else
13525 ac_check_lib_save_LIBS=$LIBS
13526LIBS="-lmail $LIBS"
13527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13528/* end confdefs.h. */
13529
13530/* Override any GCC internal prototype to avoid an error.
13531 Use char because int might match the return type of a GCC
13532 builtin and then its argument prototype would still apply. */
13533#ifdef __cplusplus
13534extern "C"
13535#endif
13536char maillock ();
13537int
13538main ()
13539{
13540return maillock ();
13541 ;
13542 return 0;
13543}
13544_ACEOF
13545if ac_fn_c_try_link "$LINENO"; then :
13546 ac_cv_lib_mail_maillock=yes
13547else
13548 ac_cv_lib_mail_maillock=no
13549fi
13550rm -f core conftest.err conftest.$ac_objext \
13551 conftest$ac_exeext conftest.$ac_ext
13552LIBS=$ac_check_lib_save_LIBS
13553fi
13554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
13555$as_echo "$ac_cv_lib_mail_maillock" >&6; }
5f64f7bd 13556if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
067d23c9
KY
13557 have_mail=yes
13558else
13559 have_mail=no
13560fi
13561
13562if test $have_mail = yes; then
13563 LIBS_MAIL=-lmail
13564 LIBS="$LIBS_MAIL $LIBS"
13565
13566$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
13567
13568else
13569 LIBS_MAIL=
13570fi
13571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
13572$as_echo_n "checking for maillock in -llockfile... " >&6; }
5f64f7bd 13573if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
067d23c9
KY
13574 $as_echo_n "(cached) " >&6
13575else
13576 ac_check_lib_save_LIBS=$LIBS
13577LIBS="-llockfile $LIBS"
13578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13579/* end confdefs.h. */
13580
13581/* Override any GCC internal prototype to avoid an error.
13582 Use char because int might match the return type of a GCC
13583 builtin and then its argument prototype would still apply. */
13584#ifdef __cplusplus
13585extern "C"
13586#endif
13587char maillock ();
13588int
13589main ()
13590{
13591return maillock ();
13592 ;
13593 return 0;
13594}
13595_ACEOF
13596if ac_fn_c_try_link "$LINENO"; then :
13597 ac_cv_lib_lockfile_maillock=yes
13598else
13599 ac_cv_lib_lockfile_maillock=no
13600fi
13601rm -f core conftest.err conftest.$ac_objext \
13602 conftest$ac_exeext conftest.$ac_ext
13603LIBS=$ac_check_lib_save_LIBS
13604fi
13605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
13606$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
5f64f7bd 13607if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
067d23c9
KY
13608 have_lockfile=yes
13609else
13610 have_lockfile=no
13611fi
13612
13613if test $have_lockfile = yes; then
13614 LIBS_MAIL=-llockfile
13615 LIBS="$LIBS_MAIL $LIBS"
13616
13617$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
13618
13619else
13620# If we have the shared liblockfile, assume we must use it for mail
13621# locking (e.g. Debian). If we couldn't link against liblockfile
13622# (no liblockfile.a installed), ensure that we don't need to.
13623 # Extract the first word of "liblockfile.so", so it can be a program name with args.
13624set dummy liblockfile.so; ac_word=$2
13625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13626$as_echo_n "checking for $ac_word... " >&6; }
5f64f7bd 13627if test "${ac_cv_prog_liblockfile+set}" = set; then :
067d23c9
KY
13628 $as_echo_n "(cached) " >&6
13629else
13630 if test -n "$liblockfile"; then
13631 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
13632else
13633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13634as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
13635for as_dir in $as_dummy
13636do
13637 IFS=$as_save_IFS
13638 test -z "$as_dir" && as_dir=.
13639 for ac_exec_ext in '' $ac_executable_extensions; do
13640 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13641 ac_cv_prog_liblockfile="yes"
13642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13643 break 2
13644 fi
13645done
13646 done
13647IFS=$as_save_IFS
13648
13649 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
13650fi
13651fi
13652liblockfile=$ac_cv_prog_liblockfile
13653if test -n "$liblockfile"; then
13654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
13655$as_echo "$liblockfile" >&6; }
13656else
13657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13658$as_echo "no" >&6; }
13659fi
13660
13661
13662 if test $ac_cv_prog_liblockfile = yes; then
5f64f7bd 13663 as_fn_error "Shared liblockfile found but can't link against it.
067d23c9
KY
13664This probably means that movemail could lose mail.
13665There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13666 fi
13667fi
13668for ac_func in touchlock
13669do :
13670 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
5f64f7bd 13671if test "x$ac_cv_func_touchlock" = x""yes; then :
067d23c9
KY
13672 cat >>confdefs.h <<_ACEOF
13673#define HAVE_TOUCHLOCK 1
13674_ACEOF
13675
13676fi
13677done
13678
13679for ac_header in maillock.h
13680do :
13681 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
5f64f7bd 13682if test "x$ac_cv_header_maillock_h" = x""yes; then :
067d23c9
KY
13683 cat >>confdefs.h <<_ACEOF
13684#define HAVE_MAILLOCK_H 1
13685_ACEOF
13686
13687fi
13688
13689done
13690
13691
13692
13693## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
13694## interlock access to the mail spool. The alternative is a lock file named
13695## /usr/spool/mail/$USER.lock.
13696mail_lock=no
13697case "$opsys" in
13698 aix4-2) mail_lock="lockf" ;;
13699
13700 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
13701
13702 ## On GNU/Linux systems, both methods are used by various mail programs.
13703 ## I assume most people are using newer mailers that have heard of flock.
13704 ## Change this if you need to.
13705 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
13706 ## configure gets the right answers, and that means *NOT* using flock.
13707 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
13708 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
13709 ## Debian maintainer hasn't provided a clean fix for Emacs.
13710 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
13711 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
13712 ## correct logic. -- fx
13713 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
13714 ## liblockfile is a Free Software replacement for libmail, used on
13715 ## Debian systems and elsewhere. -rfr.
13716 gnu-*)
13717 mail_lock="flock"
13718 if test $have_mail = yes || test $have_lockfile = yes; then
13719 test $ac_cv_header_maillock_h = yes && mail_lock=no
13720 fi
13721 ;;
13722esac
13723
13724BLESSMAIL_TARGET=
13725case "$mail_lock" in
13726 flock)
13727$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
13728 ;;
13729
13730 lockf)
13731$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
13732 ;;
13733
13734 *) BLESSMAIL_TARGET="need-blessmail" ;;
13735esac
13736
13737
13738
7d2a1c5e 13739for ac_func in gethostname getdomainname \
067d23c9
KY
13740rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
13741random lrand48 logb frexp fmod rint cbrt ftime setsid \
1fd182f0 13742strerror fpathconf select euidaccess getpagesize tzset setlocale \
067d23c9 13743utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
1fb8351b 13744__fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
067d23c9 13745sendto recvfrom getsockopt setsockopt getsockname getpeername \
1fb8351b
GM
13746gai_strerror mkstemp getline getdelim mremap fsync sync \
13747difftime mempcpy mblen mbrlen posix_memalign \
067d23c9
KY
13748cfmakeraw cfsetspeed isnan copysign __executable_start
13749do :
13750 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13751ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5f64f7bd
GM
13752eval as_val=\$$as_ac_var
13753 if test "x$as_val" = x""yes; then :
067d23c9
KY
13754 cat >>confdefs.h <<_ACEOF
13755#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13756_ACEOF
13757
13758fi
13759done
13760
13761
2018939f
AS
13762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unwind_init" >&5
13763$as_echo_n "checking for __builtin_unwind_init... " >&6; }
5f64f7bd 13764if test "${emacs_cv_func___builtin_unwind_init+set}" = set; then :
2018939f
AS
13765 $as_echo_n "(cached) " >&6
13766else
13767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13768/* end confdefs.h. */
13769
13770int
13771main ()
13772{
13773__builtin_unwind_init ();
13774 ;
13775 return 0;
13776}
13777_ACEOF
13778if ac_fn_c_try_link "$LINENO"; then :
13779 emacs_cv_func___builtin_unwind_init=yes
13780else
13781 emacs_cv_func___builtin_unwind_init=no
13782fi
13783rm -f core conftest.err conftest.$ac_objext \
13784 conftest$ac_exeext conftest.$ac_ext
13785fi
13786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_func___builtin_unwind_init" >&5
13787$as_echo "$emacs_cv_func___builtin_unwind_init" >&6; }
13788if test $emacs_cv_func___builtin_unwind_init = yes; then
13789
13790$as_echo "#define HAVE___BUILTIN_UNWIND_INIT 1" >>confdefs.h
13791
13792fi
13793
067d23c9
KY
13794for ac_header in sys/un.h
13795do :
13796 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
5f64f7bd 13797if test "x$ac_cv_header_sys_un_h" = x""yes; then :
067d23c9
KY
13798 cat >>confdefs.h <<_ACEOF
13799#define HAVE_SYS_UN_H 1
13800_ACEOF
13801
13802fi
13803
13804done
13805
13806
1f5d53eb
PE
13807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13808$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
5f64f7bd 13809if test "${ac_cv_sys_largefile_source+set}" = set; then :
067d23c9
KY
13810 $as_echo_n "(cached) " >&6
13811else
1f5d53eb
PE
13812 while :; do
13813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13814/* end confdefs.h. */
1f5d53eb
PE
13815#include <sys/types.h> /* for off_t */
13816 #include <stdio.h>
067d23c9
KY
13817int
13818main ()
13819{
1f5d53eb
PE
13820int (*fp) (FILE *, off_t, int) = fseeko;
13821 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
067d23c9
KY
13822 ;
13823 return 0;
13824}
13825_ACEOF
13826if ac_fn_c_try_link "$LINENO"; then :
1f5d53eb 13827 ac_cv_sys_largefile_source=no; break
067d23c9
KY
13828fi
13829rm -f core conftest.err conftest.$ac_objext \
13830 conftest$ac_exeext conftest.$ac_ext
1f5d53eb 13831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 13832/* end confdefs.h. */
1f5d53eb
PE
13833#define _LARGEFILE_SOURCE 1
13834#include <sys/types.h> /* for off_t */
13835 #include <stdio.h>
067d23c9
KY
13836int
13837main ()
13838{
1f5d53eb
PE
13839int (*fp) (FILE *, off_t, int) = fseeko;
13840 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
067d23c9
KY
13841 ;
13842 return 0;
13843}
13844_ACEOF
13845if ac_fn_c_try_link "$LINENO"; then :
1f5d53eb 13846 ac_cv_sys_largefile_source=1; break
067d23c9
KY
13847fi
13848rm -f core conftest.err conftest.$ac_objext \
13849 conftest$ac_exeext conftest.$ac_ext
1f5d53eb
PE
13850 ac_cv_sys_largefile_source=unknown
13851 break
13852done
067d23c9 13853fi
1f5d53eb
PE
13854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
13855$as_echo "$ac_cv_sys_largefile_source" >&6; }
13856case $ac_cv_sys_largefile_source in #(
13857 no | unknown) ;;
13858 *)
13859cat >>confdefs.h <<_ACEOF
13860#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13861_ACEOF
13862;;
13863esac
13864rm -rf conftest*
067d23c9 13865
1f5d53eb
PE
13866# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13867# in glibc 2.1.3, but that breaks too many other things.
13868# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13869if test $ac_cv_sys_largefile_source != unknown; then
13870
13871$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
067d23c9 13872
067d23c9
KY
13873fi
13874
1f5d53eb
PE
13875
13876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
13877$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
5f64f7bd 13878if test "${ac_cv_func_getpgrp_void+set}" = set; then :
067d23c9
KY
13879 $as_echo_n "(cached) " >&6
13880else
1f5d53eb 13881 # Use it with a single arg.
067d23c9
KY
13882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13883/* end confdefs.h. */
1f5d53eb 13884$ac_includes_default
067d23c9
KY
13885int
13886main ()
13887{
1f5d53eb 13888getpgrp (0);
067d23c9
KY
13889 ;
13890 return 0;
13891}
13892_ACEOF
1f5d53eb
PE
13893if ac_fn_c_try_compile "$LINENO"; then :
13894 ac_cv_func_getpgrp_void=no
067d23c9 13895else
1f5d53eb 13896 ac_cv_func_getpgrp_void=yes
067d23c9 13897fi
1f5d53eb
PE
13898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13899
067d23c9 13900fi
1f5d53eb
PE
13901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
13902$as_echo "$ac_cv_func_getpgrp_void" >&6; }
13903if test $ac_cv_func_getpgrp_void = yes; then
13904
13905$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
067d23c9
KY
13906
13907fi
13908
1f5d53eb 13909
3e0be4ab
GM
13910# UNIX98 PTYs.
13911for ac_func in grantpt
13912do :
13913 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
13914if test "x$ac_cv_func_grantpt" = x""yes; then :
13915 cat >>confdefs.h <<_ACEOF
13916#define HAVE_GRANTPT 1
13917_ACEOF
1f5d53eb 13918
3e0be4ab
GM
13919fi
13920done
1f5d53eb
PE
13921
13922
3e0be4ab
GM
13923# PTY-related GNU extensions.
13924for ac_func in getpt
13925do :
13926 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
13927if test "x$ac_cv_func_getpt" = x""yes; then :
13928 cat >>confdefs.h <<_ACEOF
13929#define HAVE_GETPT 1
13930_ACEOF
1f5d53eb 13931
3e0be4ab
GM
13932fi
13933done
1f5d53eb 13934
1f5d53eb 13935
3e0be4ab
GM
13936# Check this now, so that we will NOT find the above functions in ncurses.
13937# That is because we have not set up to link ncurses in lib-src.
13938# It's better to believe a function is not available
13939# than to expect to find it in ncurses.
13940# Also we need tputs and friends to be able to build at all.
13941have_tputs_et_al=true
13942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
13943$as_echo_n "checking for library containing tputs... " >&6; }
13944if test "${ac_cv_search_tputs+set}" = set; then :
4fc2b746
GM
13945 $as_echo_n "(cached) " >&6
13946else
3e0be4ab
GM
13947 ac_func_search_save_LIBS=$LIBS
13948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fc2b746 13949/* end confdefs.h. */
3e0be4ab
GM
13950
13951/* Override any GCC internal prototype to avoid an error.
13952 Use char because int might match the return type of a GCC
13953 builtin and then its argument prototype would still apply. */
13954#ifdef __cplusplus
13955extern "C"
13956#endif
13957char tputs ();
13958int
13959main ()
13960{
13961return tputs ();
4fc2b746
GM
13962 ;
13963 return 0;
13964}
13965_ACEOF
3e0be4ab
GM
13966for ac_lib in '' ncurses terminfo termcap; do
13967 if test -z "$ac_lib"; then
13968 ac_res="none required"
13969 else
13970 ac_res=-l$ac_lib
13971 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13972 fi
13973 if ac_fn_c_try_link "$LINENO"; then :
13974 ac_cv_search_tputs=$ac_res
4fc2b746
GM
13975fi
13976rm -f core conftest.err conftest.$ac_objext \
3e0be4ab
GM
13977 conftest$ac_exeext
13978 if test "${ac_cv_search_tputs+set}" = set; then :
13979 break
4fc2b746 13980fi
3e0be4ab
GM
13981done
13982if test "${ac_cv_search_tputs+set}" = set; then :
4fc2b746 13983
3e0be4ab
GM
13984else
13985 ac_cv_search_tputs=no
13986fi
13987rm conftest.$ac_ext
13988LIBS=$ac_func_search_save_LIBS
13989fi
13990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
13991$as_echo "$ac_cv_search_tputs" >&6; }
13992ac_res=$ac_cv_search_tputs
13993if test "$ac_res" != no; then :
13994 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13995
13996else
13997 have_tputs_et_al=false
13998fi
4fc2b746 13999
3e0be4ab
GM
14000if test "$have_tputs_et_al" != true; then
14001 as_fn_error "I couldn't find termcap functions (tputs and friends).
14002Maybe some development libraries/packages are missing? Try installing
14003libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
4fc2b746 14004fi
3e0be4ab 14005# Must define this when any termcap library is found.
4fc2b746 14006
3e0be4ab
GM
14007$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
14008
14009## FIXME This was the cpp logic, but I am not sure it is right.
14010## The above test has not necessarily found libncurses.
14011HAVE_LIBNCURSES=yes
14012
14013## Use terminfo instead of termcap?
14014## Note only system files NOT using terminfo are:
14015## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
14016## darwin|gnu without ncurses.
14017TERMINFO=no
14018LIBS_TERMCAP=
14019case "$opsys" in
14020 ## cygwin: Fewer environment variables to go wrong, more terminal types.
14021 ## hpux10-20: Use the system provided termcap(3) library.
14022 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
14023 ## is necessary. Otherwise Emacs dumps core when run -nw.
14024 aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
14025
14026 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
14027 ## The ncurses library has been moved out of the System framework in
14028 ## Mac OS X 10.2. So if configure detects it, set the command-line
14029 ## option to use it.
14030 darwin|gnu*)
14031 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
14032 if test "x$HAVE_LIBNCURSES" = "xyes"; then
14033 TERMINFO=yes
14034 LIBS_TERMCAP="-lncurses"
14035 fi
14036 ;;
14037
14038 freebsd)
14039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
14040$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
14041 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
4fc2b746
GM
14042 $as_echo_n "(cached) " >&6
14043else
14044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14045/* end confdefs.h. */
3e0be4ab 14046#include <osreldate.h>
4fc2b746
GM
14047int
14048main ()
14049{
3e0be4ab
GM
14050#if __FreeBSD_version < 400000
14051fail;
14052#endif
14053
4fc2b746
GM
14054 ;
14055 return 0;
14056}
14057_ACEOF
14058if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 14059 emacs_cv_freebsd_terminfo=yes
4fc2b746 14060else
3e0be4ab 14061 emacs_cv_freebsd_terminfo=no
4fc2b746
GM
14062fi
14063rm -f core conftest.err conftest.$ac_objext \
14064 conftest$ac_exeext conftest.$ac_ext
14065fi
4fc2b746 14066
4fc2b746 14067
3e0be4ab
GM
14068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
14069$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
4fc2b746 14070
3e0be4ab
GM
14071 if test $emacs_cv_freebsd_terminfo = yes; then
14072 TERMINFO=yes
14073 LIBS_TERMCAP="-lncurses"
14074 else
14075 LIBS_TERMCAP="-ltermcap"
14076 fi
14077 ;;
4fc2b746 14078
3e0be4ab
GM
14079 netbsd)
14080 if test $ac_cv_search_tputs = -lterminfo; then
14081 TERMINFO=yes
14082 LIBS_TERMCAP="-lterminfo"
14083 else
14084 LIBS_TERMCAP="-ltermcap"
14085 fi
14086 ;;
4fc2b746 14087
3e0be4ab 14088esac
4fc2b746 14089
3e0be4ab
GM
14090case "$opsys" in
14091 ## hpux: Make sure we get select from libc rather than from libcurses
14092 ## because libcurses on HPUX 10.10 has a broken version of select.
14093 ## We used to use -lc -lcurses, but this may be cleaner.
14094 hpux*) LIBS_TERMCAP="-ltermcap" ;;
4fc2b746 14095
3e0be4ab 14096 openbsd) LIBS_TERMCAP="-lncurses" ;;
4fc2b746 14097
3e0be4ab
GM
14098 ## Must use system termcap, if we use any termcap. It does special things.
14099 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
14100esac
4fc2b746 14101
3e0be4ab
GM
14102TERMCAP_OBJ=tparam.o
14103if test $TERMINFO = yes; then
4fc2b746 14104
3e0be4ab 14105$as_echo "#define TERMINFO 1" >>confdefs.h
4fc2b746 14106
4fc2b746 14107
3e0be4ab
GM
14108 ## Default used to be -ltermcap. Add a case above if need something else.
14109 test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
4fc2b746 14110
3e0be4ab 14111 TERMCAP_OBJ=terminfo.o
4fc2b746 14112fi
4fc2b746 14113
4fc2b746 14114
4fc2b746 14115
4fc2b746 14116
3e0be4ab
GM
14117# Do we have res_init, for detecting changes in /etc/resolv.conf?
14118resolv=no
14119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fc2b746 14120/* end confdefs.h. */
3e0be4ab
GM
14121#include <netinet/in.h>
14122#include <arpa/nameser.h>
14123#include <resolv.h>
4fc2b746 14124int
3e0be4ab 14125main ()
4fc2b746 14126{
3e0be4ab
GM
14127return res_init();
14128 ;
14129 return 0;
4fc2b746
GM
14130}
14131_ACEOF
3e0be4ab
GM
14132if ac_fn_c_try_link "$LINENO"; then :
14133 have_res_init=yes
4fc2b746 14134else
3e0be4ab 14135 have_res_init=no
4fc2b746 14136fi
3e0be4ab
GM
14137rm -f core conftest.err conftest.$ac_objext \
14138 conftest$ac_exeext conftest.$ac_ext
14139if test "$have_res_init" = no; then
14140 OLIBS="$LIBS"
14141 LIBS="$LIBS -lresolv"
14142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
14143$as_echo_n "checking for res_init with -lresolv... " >&6; }
14144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14145/* end confdefs.h. */
14146#include <netinet/in.h>
14147#include <arpa/nameser.h>
14148#include <resolv.h>
14149int
14150main ()
14151{
14152return res_init();
14153 ;
14154 return 0;
14155}
14156_ACEOF
14157if ac_fn_c_try_link "$LINENO"; then :
14158 have_res_init=yes
14159else
14160 have_res_init=no
14161fi
14162rm -f core conftest.err conftest.$ac_objext \
14163 conftest$ac_exeext conftest.$ac_ext
14164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
14165$as_echo "$have_res_init" >&6; }
14166 if test "$have_res_init" = yes ; then
14167 resolv=yes
14168 fi
14169 LIBS="$OLIBS"
4fc2b746
GM
14170fi
14171
3e0be4ab 14172if test "$have_res_init" = yes; then
1f5d53eb 14173
3e0be4ab 14174$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
6c051bab
GM
14175
14176fi
6c051bab 14177
3e0be4ab
GM
14178# Do we need the Hesiod library to provide the support routines?
14179LIBHESIOD=
14180if test "$with_hesiod" != no ; then
14181 # Don't set $LIBS here -- see comments above. FIXME which comments?
14182 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
14183if test "x$ac_cv_func_res_send" = x""yes; then :
6c051bab 14184
3e0be4ab
GM
14185else
14186 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
14187if test "x$ac_cv_func___res_send" = x""yes; then :
6c051bab 14188
3e0be4ab
GM
14189else
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
14191$as_echo_n "checking for res_send in -lresolv... " >&6; }
14192if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
942f733f
PE
14193 $as_echo_n "(cached) " >&6
14194else
3e0be4ab
GM
14195 ac_check_lib_save_LIBS=$LIBS
14196LIBS="-lresolv $LIBS"
14197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14198/* end confdefs.h. */
942f733f 14199
3e0be4ab
GM
14200/* Override any GCC internal prototype to avoid an error.
14201 Use char because int might match the return type of a GCC
14202 builtin and then its argument prototype would still apply. */
14203#ifdef __cplusplus
14204extern "C"
14205#endif
14206char res_send ();
942f733f
PE
14207int
14208main ()
14209{
3e0be4ab 14210return res_send ();
942f733f
PE
14211 ;
14212 return 0;
14213}
14214_ACEOF
3e0be4ab
GM
14215if ac_fn_c_try_link "$LINENO"; then :
14216 ac_cv_lib_resolv_res_send=yes
14217else
14218 ac_cv_lib_resolv_res_send=no
14219fi
14220rm -f core conftest.err conftest.$ac_objext \
14221 conftest$ac_exeext conftest.$ac_ext
14222LIBS=$ac_check_lib_save_LIBS
14223fi
14224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
14225$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
14226if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
14227 resolv=yes
14228else
14229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
14230$as_echo_n "checking for __res_send in -lresolv... " >&6; }
14231if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
14232 $as_echo_n "(cached) " >&6
14233else
14234 ac_check_lib_save_LIBS=$LIBS
14235LIBS="-lresolv $LIBS"
14236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14237/* end confdefs.h. */
942f733f 14238
3e0be4ab
GM
14239/* Override any GCC internal prototype to avoid an error.
14240 Use char because int might match the return type of a GCC
14241 builtin and then its argument prototype would still apply. */
14242#ifdef __cplusplus
14243extern "C"
14244#endif
14245char __res_send ();
942f733f
PE
14246int
14247main ()
14248{
3e0be4ab 14249return __res_send ();
942f733f
PE
14250 ;
14251 return 0;
14252}
14253_ACEOF
3e0be4ab
GM
14254if ac_fn_c_try_link "$LINENO"; then :
14255 ac_cv_lib_resolv___res_send=yes
942f733f 14256else
3e0be4ab 14257 ac_cv_lib_resolv___res_send=no
942f733f 14258fi
3e0be4ab
GM
14259rm -f core conftest.err conftest.$ac_objext \
14260 conftest$ac_exeext conftest.$ac_ext
14261LIBS=$ac_check_lib_save_LIBS
14262fi
14263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
14264$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
14265if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
14266 resolv=yes
942f733f 14267fi
942f733f 14268
3e0be4ab 14269fi
942f733f 14270
3e0be4ab
GM
14271fi
14272
14273fi
14274
14275 if test "$resolv" = yes ; then
14276 RESOLVLIB=-lresolv
14277 else
14278 RESOLVLIB=
14279 fi
14280 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
14281if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
14282
14283else
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
14285$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
14286if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
14287 $as_echo_n "(cached) " >&6
14288else
14289 ac_check_lib_save_LIBS=$LIBS
14290LIBS="-lhesiod $RESOLVLIB $LIBS"
14291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14292/* end confdefs.h. */
942f733f 14293
3e0be4ab
GM
14294/* Override any GCC internal prototype to avoid an error.
14295 Use char because int might match the return type of a GCC
14296 builtin and then its argument prototype would still apply. */
14297#ifdef __cplusplus
14298extern "C"
14299#endif
14300char hes_getmailhost ();
942f733f
PE
14301int
14302main ()
14303{
3e0be4ab 14304return hes_getmailhost ();
942f733f
PE
14305 ;
14306 return 0;
14307}
14308_ACEOF
3e0be4ab
GM
14309if ac_fn_c_try_link "$LINENO"; then :
14310 ac_cv_lib_hesiod_hes_getmailhost=yes
942f733f 14311else
3e0be4ab 14312 ac_cv_lib_hesiod_hes_getmailhost=no
942f733f 14313fi
3e0be4ab
GM
14314rm -f core conftest.err conftest.$ac_objext \
14315 conftest$ac_exeext conftest.$ac_ext
14316LIBS=$ac_check_lib_save_LIBS
14317fi
14318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
14319$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
14320if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
14321 hesiod=yes
14322else
14323 :
942f733f 14324fi
942f733f 14325
942f733f 14326fi
3e0be4ab
GM
14327
14328
14329 if test x"$hesiod" = xyes; then
14330
14331$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
14332
14333 LIBHESIOD=-lhesiod
14334 fi
14335fi
14336
14337
14338# Do we need libresolv (due to res_init or Hesiod)?
14339if test "$resolv" = yes ; then
14340
14341$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
14342
14343 LIBRESOLV=-lresolv
942f733f 14344else
3e0be4ab
GM
14345 LIBRESOLV=
14346fi
14347
14348
14349# These tell us which Kerberos-related libraries to use.
14350COM_ERRLIB=
14351CRYPTOLIB=
14352KRB5LIB=
14353DESLIB=
14354KRB4LIB=
14355
14356if test "${with_kerberos}" != no; then
14357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
14358$as_echo_n "checking for com_err in -lcom_err... " >&6; }
14359if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
14360 $as_echo_n "(cached) " >&6
14361else
14362 ac_check_lib_save_LIBS=$LIBS
14363LIBS="-lcom_err $LIBS"
14364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14365/* end confdefs.h. */
3e0be4ab
GM
14366
14367/* Override any GCC internal prototype to avoid an error.
14368 Use char because int might match the return type of a GCC
14369 builtin and then its argument prototype would still apply. */
14370#ifdef __cplusplus
14371extern "C"
14372#endif
14373char com_err ();
942f733f
PE
14374int
14375main ()
14376{
3e0be4ab 14377return com_err ();
942f733f
PE
14378 ;
14379 return 0;
14380}
14381_ACEOF
3e0be4ab
GM
14382if ac_fn_c_try_link "$LINENO"; then :
14383 ac_cv_lib_com_err_com_err=yes
942f733f 14384else
3e0be4ab 14385 ac_cv_lib_com_err_com_err=no
942f733f 14386fi
3e0be4ab
GM
14387rm -f core conftest.err conftest.$ac_objext \
14388 conftest$ac_exeext conftest.$ac_ext
14389LIBS=$ac_check_lib_save_LIBS
942f733f 14390fi
3e0be4ab
GM
14391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
14392$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
14393if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
14394 have_com_err=yes
14395else
14396 have_com_err=no
942f733f 14397fi
942f733f 14398
3e0be4ab
GM
14399 if test $have_com_err = yes; then
14400 COM_ERRLIB=-lcom_err
14401 LIBS="$COM_ERRLIB $LIBS"
942f733f 14402
3e0be4ab 14403$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
942f733f 14404
3e0be4ab
GM
14405 fi
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
14407$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
14408if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
942f733f
PE
14409 $as_echo_n "(cached) " >&6
14410else
3e0be4ab
GM
14411 ac_check_lib_save_LIBS=$LIBS
14412LIBS="-lcrypto $LIBS"
14413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
942f733f 14414/* end confdefs.h. */
942f733f 14415
3e0be4ab
GM
14416/* Override any GCC internal prototype to avoid an error.
14417 Use char because int might match the return type of a GCC
14418 builtin and then its argument prototype would still apply. */
14419#ifdef __cplusplus
14420extern "C"
14421#endif
14422char mit_des_cbc_encrypt ();
14423int
14424main ()
14425{
14426return mit_des_cbc_encrypt ();
14427 ;
14428 return 0;
14429}
942f733f 14430_ACEOF
3e0be4ab
GM
14431if ac_fn_c_try_link "$LINENO"; then :
14432 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
14433else
14434 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
942f733f 14435fi
3e0be4ab
GM
14436rm -f core conftest.err conftest.$ac_objext \
14437 conftest$ac_exeext conftest.$ac_ext
14438LIBS=$ac_check_lib_save_LIBS
14439fi
14440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
14441$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
14442if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
14443 have_crypto=yes
14444else
14445 have_crypto=no
942f733f 14446fi
942f733f 14447
3e0be4ab
GM
14448 if test $have_crypto = yes; then
14449 CRYPTOLIB=-lcrypto
14450 LIBS="$CRYPTOLIB $LIBS"
942f733f 14451
3e0be4ab 14452$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
942f733f 14453
3e0be4ab
GM
14454 fi
14455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
14456$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
14457if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
067d23c9
KY
14458 $as_echo_n "(cached) " >&6
14459else
3e0be4ab
GM
14460 ac_check_lib_save_LIBS=$LIBS
14461LIBS="-lk5crypto $LIBS"
14462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14463/* end confdefs.h. */
3e0be4ab
GM
14464
14465/* Override any GCC internal prototype to avoid an error.
14466 Use char because int might match the return type of a GCC
14467 builtin and then its argument prototype would still apply. */
14468#ifdef __cplusplus
14469extern "C"
14470#endif
14471char mit_des_cbc_encrypt ();
067d23c9
KY
14472int
14473main ()
14474{
3e0be4ab 14475return mit_des_cbc_encrypt ();
067d23c9
KY
14476 ;
14477 return 0;
14478}
14479_ACEOF
14480if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab 14481 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
067d23c9 14482else
3e0be4ab 14483 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
067d23c9
KY
14484fi
14485rm -f core conftest.err conftest.$ac_objext \
14486 conftest$ac_exeext conftest.$ac_ext
3e0be4ab
GM
14487LIBS=$ac_check_lib_save_LIBS
14488fi
14489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
14490$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
14491if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
14492 have_k5crypto=yes
14493else
14494 have_k5crypto=no
067d23c9
KY
14495fi
14496
3e0be4ab
GM
14497 if test $have_k5crypto = yes; then
14498 CRYPTOLIB=-lk5crypto
14499 LIBS="$CRYPTOLIB $LIBS"
067d23c9 14500
3e0be4ab 14501$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
067d23c9 14502
3e0be4ab
GM
14503 fi
14504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
14505$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
14506if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
14507 $as_echo_n "(cached) " >&6
14508else
14509 ac_check_lib_save_LIBS=$LIBS
14510LIBS="-lkrb5 $LIBS"
14511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14512/* end confdefs.h. */
067d23c9 14513
3e0be4ab
GM
14514/* Override any GCC internal prototype to avoid an error.
14515 Use char because int might match the return type of a GCC
14516 builtin and then its argument prototype would still apply. */
14517#ifdef __cplusplus
14518extern "C"
14519#endif
14520char krb5_init_context ();
14521int
14522main ()
14523{
14524return krb5_init_context ();
14525 ;
14526 return 0;
14527}
14528_ACEOF
14529if ac_fn_c_try_link "$LINENO"; then :
14530 ac_cv_lib_krb5_krb5_init_context=yes
14531else
14532 ac_cv_lib_krb5_krb5_init_context=no
14533fi
14534rm -f core conftest.err conftest.$ac_objext \
14535 conftest$ac_exeext conftest.$ac_ext
14536LIBS=$ac_check_lib_save_LIBS
14537fi
14538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
14539$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
14540if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
14541 have_krb5=yes
14542else
14543 have_krb5=no
14544fi
067d23c9 14545
3e0be4ab
GM
14546 if test $have_krb5=yes; then
14547 KRB5LIB=-lkrb5
14548 LIBS="$KRB5LIB $LIBS"
1f5d53eb 14549
3e0be4ab 14550$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
1f5d53eb 14551
3e0be4ab
GM
14552 fi
14553 if test "${with_kerberos5}" = no; then
14554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
14555$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
14556if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
7d2a1c5e
GM
14557 $as_echo_n "(cached) " >&6
14558else
3e0be4ab
GM
14559 ac_check_lib_save_LIBS=$LIBS
14560LIBS="-ldes425 $LIBS"
14561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7d2a1c5e
GM
14562/* end confdefs.h. */
14563
3e0be4ab
GM
14564/* Override any GCC internal prototype to avoid an error.
14565 Use char because int might match the return type of a GCC
14566 builtin and then its argument prototype would still apply. */
14567#ifdef __cplusplus
14568extern "C"
14569#endif
14570char des_cbc_encrypt ();
7d2a1c5e
GM
14571int
14572main ()
14573{
3e0be4ab 14574return des_cbc_encrypt ();
7d2a1c5e
GM
14575 ;
14576 return 0;
14577}
14578_ACEOF
3e0be4ab
GM
14579if ac_fn_c_try_link "$LINENO"; then :
14580 ac_cv_lib_des425_des_cbc_encrypt=yes
7d2a1c5e 14581else
3e0be4ab 14582 ac_cv_lib_des425_des_cbc_encrypt=no
7d2a1c5e 14583fi
3e0be4ab
GM
14584rm -f core conftest.err conftest.$ac_objext \
14585 conftest$ac_exeext conftest.$ac_ext
14586LIBS=$ac_check_lib_save_LIBS
14587fi
14588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
14589$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
14590if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
14591 have_des425=yes
14592else
14593 have_des425=no
7d2a1c5e 14594fi
7d2a1c5e 14595
3e0be4ab
GM
14596 if test $have_des425 = yes; then
14597 DESLIB=-ldes425
14598 LIBS="$DESLIB $LIBS"
7d2a1c5e 14599
3e0be4ab 14600$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
7d2a1c5e 14601
3e0be4ab
GM
14602 else
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
14604$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
14605if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
14606 $as_echo_n "(cached) " >&6
7d2a1c5e 14607else
3e0be4ab
GM
14608 ac_check_lib_save_LIBS=$LIBS
14609LIBS="-ldes $LIBS"
14610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14611/* end confdefs.h. */
7d2a1c5e 14612
3e0be4ab
GM
14613/* Override any GCC internal prototype to avoid an error.
14614 Use char because int might match the return type of a GCC
14615 builtin and then its argument prototype would still apply. */
14616#ifdef __cplusplus
14617extern "C"
14618#endif
14619char des_cbc_encrypt ();
14620int
14621main ()
14622{
14623return des_cbc_encrypt ();
14624 ;
14625 return 0;
14626}
7d2a1c5e 14627_ACEOF
3e0be4ab
GM
14628if ac_fn_c_try_link "$LINENO"; then :
14629 ac_cv_lib_des_des_cbc_encrypt=yes
14630else
14631 ac_cv_lib_des_des_cbc_encrypt=no
14632fi
14633rm -f core conftest.err conftest.$ac_objext \
14634 conftest$ac_exeext conftest.$ac_ext
14635LIBS=$ac_check_lib_save_LIBS
14636fi
14637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
14638$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
14639if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
14640 have_des=yes
14641else
14642 have_des=no
14643fi
7d2a1c5e 14644
3e0be4ab
GM
14645 if test $have_des = yes; then
14646 DESLIB=-ldes
14647 LIBS="$DESLIB $LIBS"
7d2a1c5e 14648
3e0be4ab 14649$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
7d2a1c5e 14650
3e0be4ab
GM
14651 fi
14652 fi
14653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
14654$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
14655if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
067d23c9
KY
14656 $as_echo_n "(cached) " >&6
14657else
3e0be4ab
GM
14658 ac_check_lib_save_LIBS=$LIBS
14659LIBS="-lkrb4 $LIBS"
14660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 14661/* end confdefs.h. */
3e0be4ab
GM
14662
14663/* Override any GCC internal prototype to avoid an error.
14664 Use char because int might match the return type of a GCC
14665 builtin and then its argument prototype would still apply. */
14666#ifdef __cplusplus
14667extern "C"
14668#endif
14669char krb_get_cred ();
14670int
14671main ()
14672{
14673return krb_get_cred ();
14674 ;
14675 return 0;
14676}
067d23c9 14677_ACEOF
3e0be4ab
GM
14678if ac_fn_c_try_link "$LINENO"; then :
14679 ac_cv_lib_krb4_krb_get_cred=yes
1f5d53eb 14680else
3e0be4ab 14681 ac_cv_lib_krb4_krb_get_cred=no
067d23c9 14682fi
3e0be4ab
GM
14683rm -f core conftest.err conftest.$ac_objext \
14684 conftest$ac_exeext conftest.$ac_ext
14685LIBS=$ac_check_lib_save_LIBS
067d23c9 14686fi
3e0be4ab
GM
14687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
14688$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
14689if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
14690 have_krb4=yes
14691else
14692 have_krb4=no
1f5d53eb 14693fi
067d23c9 14694
3e0be4ab
GM
14695 if test $have_krb4 = yes; then
14696 KRB4LIB=-lkrb4
14697 LIBS="$KRB4LIB $LIBS"
067d23c9 14698
3e0be4ab 14699$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
067d23c9 14700
3e0be4ab
GM
14701 else
14702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
14703$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
14704if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
1f5d53eb
PE
14705 $as_echo_n "(cached) " >&6
14706else
3e0be4ab
GM
14707 ac_check_lib_save_LIBS=$LIBS
14708LIBS="-lkrb $LIBS"
14709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 14710/* end confdefs.h. */
067d23c9 14711
3e0be4ab
GM
14712/* Override any GCC internal prototype to avoid an error.
14713 Use char because int might match the return type of a GCC
14714 builtin and then its argument prototype would still apply. */
14715#ifdef __cplusplus
14716extern "C"
1f5d53eb 14717#endif
3e0be4ab
GM
14718char krb_get_cred ();
14719int
14720main ()
14721{
14722return krb_get_cred ();
14723 ;
14724 return 0;
14725}
067d23c9 14726_ACEOF
3e0be4ab
GM
14727if ac_fn_c_try_link "$LINENO"; then :
14728 ac_cv_lib_krb_krb_get_cred=yes
1f5d53eb 14729else
3e0be4ab 14730 ac_cv_lib_krb_krb_get_cred=no
067d23c9 14731fi
3e0be4ab
GM
14732rm -f core conftest.err conftest.$ac_objext \
14733 conftest$ac_exeext conftest.$ac_ext
14734LIBS=$ac_check_lib_save_LIBS
14735fi
14736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
14737$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
14738if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
14739 have_krb=yes
14740else
14741 have_krb=no
067d23c9 14742fi
067d23c9 14743
3e0be4ab
GM
14744 if test $have_krb = yes; then
14745 KRB4LIB=-lkrb
14746 LIBS="$KRB4LIB $LIBS"
067d23c9 14747
3e0be4ab 14748$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
067d23c9 14749
3e0be4ab
GM
14750 fi
14751 fi
14752 fi
067d23c9 14753
3e0be4ab
GM
14754 if test "${with_kerberos5}" != no; then
14755 for ac_header in krb5.h
14756do :
14757 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
14758if test "x$ac_cv_header_krb5_h" = x""yes; then :
14759 cat >>confdefs.h <<_ACEOF
14760#define HAVE_KRB5_H 1
14761_ACEOF
14762 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
14763"
14764if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
067d23c9 14765
3e0be4ab
GM
14766cat >>confdefs.h <<_ACEOF
14767#define HAVE_KRB5_ERROR_TEXT 1
14768_ACEOF
067d23c9 14769
067d23c9 14770
3e0be4ab
GM
14771fi
14772ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
14773"
14774if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
067d23c9 14775
3e0be4ab
GM
14776cat >>confdefs.h <<_ACEOF
14777#define HAVE_KRB5_ERROR_E_TEXT 1
14778_ACEOF
067d23c9 14779
067d23c9 14780
3e0be4ab 14781fi
067d23c9 14782
3e0be4ab 14783fi
067d23c9 14784
3e0be4ab 14785done
067d23c9 14786
3e0be4ab
GM
14787 else
14788 for ac_header in des.h
14789do :
14790 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
14791if test "x$ac_cv_header_des_h" = x""yes; then :
14792 cat >>confdefs.h <<_ACEOF
14793#define HAVE_DES_H 1
14794_ACEOF
067d23c9 14795
1f5d53eb 14796else
3e0be4ab
GM
14797 for ac_header in kerberosIV/des.h
14798do :
14799 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
14800if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
14801 cat >>confdefs.h <<_ACEOF
14802#define HAVE_KERBEROSIV_DES_H 1
1f5d53eb 14803_ACEOF
067d23c9 14804
3e0be4ab
GM
14805else
14806 for ac_header in kerberos/des.h
14807do :
14808 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
14809if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
14810 cat >>confdefs.h <<_ACEOF
14811#define HAVE_KERBEROS_DES_H 1
14812_ACEOF
067d23c9
KY
14813
14814fi
067d23c9 14815
3e0be4ab 14816done
067d23c9 14817
3e0be4ab 14818fi
067d23c9 14819
3e0be4ab 14820done
067d23c9 14821
3e0be4ab 14822fi
067d23c9 14823
3e0be4ab 14824done
1f5d53eb 14825
3e0be4ab
GM
14826 for ac_header in krb.h
14827do :
14828 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
14829if test "x$ac_cv_header_krb_h" = x""yes; then :
14830 cat >>confdefs.h <<_ACEOF
14831#define HAVE_KRB_H 1
14832_ACEOF
1f5d53eb 14833
3e0be4ab
GM
14834else
14835 for ac_header in kerberosIV/krb.h
1f5d53eb 14836do :
3e0be4ab
GM
14837 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
14838if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
1f5d53eb 14839 cat >>confdefs.h <<_ACEOF
3e0be4ab 14840#define HAVE_KERBEROSIV_KRB_H 1
1f5d53eb 14841_ACEOF
067d23c9
KY
14842
14843else
3e0be4ab
GM
14844 for ac_header in kerberos/krb.h
14845do :
14846 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
14847if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
14848 cat >>confdefs.h <<_ACEOF
14849#define HAVE_KERBEROS_KRB_H 1
14850_ACEOF
14851
067d23c9
KY
14852fi
14853
1f5d53eb
PE
14854done
14855
3e0be4ab 14856fi
1f5d53eb 14857
3e0be4ab
GM
14858done
14859
14860fi
14861
14862done
14863
14864 fi
14865 for ac_header in com_err.h
1f5d53eb 14866do :
3e0be4ab
GM
14867 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
14868if test "x$ac_cv_header_com_err_h" = x""yes; then :
1f5d53eb 14869 cat >>confdefs.h <<_ACEOF
3e0be4ab 14870#define HAVE_COM_ERR_H 1
1f5d53eb 14871_ACEOF
067d23c9 14872
067d23c9 14873fi
3e0be4ab 14874
1f5d53eb 14875done
067d23c9 14876
3e0be4ab 14877fi
067d23c9 14878
3e0be4ab
GM
14879
14880
14881
14882
14883
14884
14885# Solaris requires -lintl if you want strerror (which calls dgettext)
14886# to return localized messages.
14887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
14888$as_echo_n "checking for dgettext in -lintl... " >&6; }
14889if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
067d23c9
KY
14890 $as_echo_n "(cached) " >&6
14891else
3e0be4ab
GM
14892 ac_check_lib_save_LIBS=$LIBS
14893LIBS="-lintl $LIBS"
14894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 14895/* end confdefs.h. */
3e0be4ab
GM
14896
14897/* Override any GCC internal prototype to avoid an error.
14898 Use char because int might match the return type of a GCC
14899 builtin and then its argument prototype would still apply. */
14900#ifdef __cplusplus
14901extern "C"
14902#endif
14903char dgettext ();
067d23c9
KY
14904int
14905main ()
14906{
3e0be4ab 14907return dgettext ();
067d23c9
KY
14908 ;
14909 return 0;
14910}
14911_ACEOF
2b7f7d99 14912if ac_fn_c_try_link "$LINENO"; then :
3e0be4ab
GM
14913 ac_cv_lib_intl_dgettext=yes
14914else
14915 ac_cv_lib_intl_dgettext=no
14916fi
14917rm -f core conftest.err conftest.$ac_objext \
14918 conftest$ac_exeext conftest.$ac_ext
14919LIBS=$ac_check_lib_save_LIBS
14920fi
14921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
14922$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
14923if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
14924 cat >>confdefs.h <<_ACEOF
14925#define HAVE_LIBINTL 1
14926_ACEOF
14927
14928 LIBS="-lintl $LIBS"
14929
14930fi
14931
14932
14933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
14934$as_echo_n "checking whether localtime caches TZ... " >&6; }
14935if test "${emacs_cv_localtime_cache+set}" = set; then :
14936 $as_echo_n "(cached) " >&6
14937else
14938 if test x$ac_cv_func_tzset = xyes; then
14939if test "$cross_compiling" = yes; then :
14940 # If we have tzset, assume the worst when cross-compiling.
14941emacs_cv_localtime_cache=yes
1fd182f0 14942else
1f5d53eb 14943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 14944/* end confdefs.h. */
3e0be4ab
GM
14945#include <time.h>
14946char TZ_GMT0[] = "TZ=GMT0";
14947char TZ_PST8[] = "TZ=PST8";
14948main()
1fd182f0 14949{
3e0be4ab
GM
14950 time_t now = time ((time_t *) 0);
14951 int hour_GMT0, hour_unset;
14952 if (putenv (TZ_GMT0) != 0)
14953 exit (1);
14954 hour_GMT0 = localtime (&now)->tm_hour;
14955 unsetenv("TZ");
14956 hour_unset = localtime (&now)->tm_hour;
14957 if (putenv (TZ_PST8) != 0)
14958 exit (1);
14959 if (localtime (&now)->tm_hour == hour_GMT0)
14960 exit (1);
14961 unsetenv("TZ");
14962 if (localtime (&now)->tm_hour != hour_unset)
14963 exit (1);
14964 exit (0);
1fd182f0
PE
14965}
14966_ACEOF
3e0be4ab
GM
14967if ac_fn_c_try_run "$LINENO"; then :
14968 emacs_cv_localtime_cache=no
1fd182f0 14969else
3e0be4ab 14970 emacs_cv_localtime_cache=yes
1fd182f0 14971fi
3e0be4ab
GM
14972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14973 conftest.$ac_objext conftest.beam conftest.$ac_ext
1fd182f0 14974fi
1fd182f0 14975
1f5d53eb 14976else
3e0be4ab
GM
14977 # If we lack tzset, report that localtime does not cache TZ,
14978 # since we can't invalidate the cache if we don't have tzset.
14979 emacs_cv_localtime_cache=no
14980fi
14981fi
14982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14983$as_echo "$emacs_cv_localtime_cache" >&6; }
14984if test $emacs_cv_localtime_cache = yes; then
1fd182f0 14985
3e0be4ab 14986$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
1fd182f0 14987
1f5d53eb 14988fi
d6974efa 14989
3e0be4ab
GM
14990if test "x$HAVE_TIMEVAL" = xyes; then
14991 for ac_func in gettimeofday
14992do :
14993 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
14994if test "x$ac_cv_func_gettimeofday" = x""yes; then :
14995 cat >>confdefs.h <<_ACEOF
14996#define HAVE_GETTIMEOFDAY 1
14997_ACEOF
1fd182f0 14998
1f5d53eb 14999fi
3e0be4ab 15000done
1fd182f0 15001
3e0be4ab
GM
15002 if test $ac_cv_func_gettimeofday = yes; then
15003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
15004$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
15005if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
1fd182f0
PE
15006 $as_echo_n "(cached) " >&6
15007else
15008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15009/* end confdefs.h. */
1f5d53eb 15010
3e0be4ab
GM
15011#ifdef TIME_WITH_SYS_TIME
15012#include <sys/time.h>
15013#include <time.h>
15014#else
15015#ifdef HAVE_SYS_TIME_H
15016#include <sys/time.h>
15017#else
15018#include <time.h>
15019#endif
15020#endif
1fd182f0
PE
15021int
15022main ()
15023{
3e0be4ab
GM
15024struct timeval time;
15025 gettimeofday (&time, 0);
1fd182f0
PE
15026 ;
15027 return 0;
15028}
15029_ACEOF
3e0be4ab
GM
15030if ac_fn_c_try_compile "$LINENO"; then :
15031 emacs_cv_gettimeofday_two_arguments=yes
1fd182f0 15032else
3e0be4ab 15033 emacs_cv_gettimeofday_two_arguments=no
1fd182f0 15034fi
3e0be4ab 15035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1fd182f0 15036fi
3e0be4ab
GM
15037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
15038$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
15039 if test $emacs_cv_gettimeofday_two_arguments = no; then
1fd182f0 15040
3e0be4ab 15041$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
1fd182f0 15042
1f5d53eb 15043 fi
1fd182f0 15044 fi
3e0be4ab 15045fi
1fd182f0 15046
3e0be4ab
GM
15047ok_so_far=yes
15048ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
15049if test "x$ac_cv_func_socket" = x""yes; then :
1fd182f0 15050
3e0be4ab
GM
15051else
15052 ok_so_far=no
15053fi
1fd182f0 15054
3e0be4ab
GM
15055if test $ok_so_far = yes; then
15056 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15057if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
1fd182f0 15058
3e0be4ab
GM
15059else
15060 ok_so_far=no
15061fi
1fd182f0 15062
1f5d53eb 15063
52724a05 15064fi
3e0be4ab
GM
15065if test $ok_so_far = yes; then
15066 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
15067if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
1f5d53eb 15068
3e0be4ab
GM
15069else
15070 ok_so_far=no
15071fi
1f5d53eb 15072
1f5d53eb 15073
3e0be4ab
GM
15074fi
15075if test $ok_so_far = yes; then
1f5d53eb 15076
3e0be4ab 15077$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
1f5d53eb 15078
3e0be4ab 15079fi
1f5d53eb 15080
3e0be4ab 15081if test -f /usr/lpp/X11/bin/smt.exp; then
1f5d53eb 15082
3e0be4ab 15083$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
1f5d53eb
PE
15084
15085fi
15086
3e0be4ab
GM
15087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
15088$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
15089if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
15090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15091$as_echo "yes" >&6; }
1f5d53eb 15092
3e0be4ab 15093$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
1f5d53eb 15094
ae0d7250 15095else
3e0be4ab
GM
15096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15097$as_echo "no" >&6; }
15098fi
4fda9c95 15099
3e0be4ab
GM
15100ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15101if test "x$ac_cv_type_pid_t" = x""yes; then :
15102
15103else
4fda9c95 15104
3e0be4ab
GM
15105cat >>confdefs.h <<_ACEOF
15106#define pid_t int
ae0d7250 15107_ACEOF
4fda9c95 15108
4fda9c95 15109fi
4fda9c95 15110
3e0be4ab
GM
15111for ac_header in vfork.h
15112do :
15113 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
15114if test "x$ac_cv_header_vfork_h" = x""yes; then :
15115 cat >>confdefs.h <<_ACEOF
15116#define HAVE_VFORK_H 1
15117_ACEOF
4fda9c95 15118
3e0be4ab
GM
15119fi
15120
15121done
4fda9c95 15122
3e0be4ab
GM
15123for ac_func in fork vfork
15124do :
15125 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15126ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15127eval as_val=\$$as_ac_var
15128 if test "x$as_val" = x""yes; then :
15129 cat >>confdefs.h <<_ACEOF
15130#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15131_ACEOF
4fda9c95 15132
3e0be4ab
GM
15133fi
15134done
4fda9c95 15135
3e0be4ab
GM
15136if test "x$ac_cv_func_fork" = xyes; then
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15138$as_echo_n "checking for working fork... " >&6; }
15139if test "${ac_cv_func_fork_works+set}" = set; then :
4fda9c95
GM
15140 $as_echo_n "(cached) " >&6
15141else
3e0be4ab
GM
15142 if test "$cross_compiling" = yes; then :
15143 ac_cv_func_fork_works=cross
4fda9c95
GM
15144else
15145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15146/* end confdefs.h. */
3e0be4ab 15147$ac_includes_default
4fda9c95
GM
15148int
15149main ()
15150{
3e0be4ab
GM
15151
15152 /* By Ruediger Kuhlmann. */
15153 return fork () < 0;
15154
4fda9c95
GM
15155 ;
15156 return 0;
15157}
15158_ACEOF
15159if ac_fn_c_try_run "$LINENO"; then :
3e0be4ab 15160 ac_cv_func_fork_works=yes
4fda9c95 15161else
3e0be4ab 15162 ac_cv_func_fork_works=no
4fda9c95
GM
15163fi
15164rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15165 conftest.$ac_objext conftest.beam conftest.$ac_ext
15166fi
15167
4fda9c95 15168fi
3e0be4ab
GM
15169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15170$as_echo "$ac_cv_func_fork_works" >&6; }
4fda9c95 15171
3e0be4ab
GM
15172else
15173 ac_cv_func_fork_works=$ac_cv_func_fork
15174fi
15175if test "x$ac_cv_func_fork_works" = xcross; then
15176 case $host in
15177 *-*-amigaos* | *-*-msdosdjgpp*)
15178 # Override, as these systems have only a dummy fork() stub
15179 ac_cv_func_fork_works=no
15180 ;;
15181 *)
15182 ac_cv_func_fork_works=yes
15183 ;;
15184 esac
15185 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15186$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15187fi
15188ac_cv_func_vfork_works=$ac_cv_func_vfork
15189if test "x$ac_cv_func_vfork" = xyes; then
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15191$as_echo_n "checking for working vfork... " >&6; }
15192if test "${ac_cv_func_vfork_works+set}" = set; then :
15193 $as_echo_n "(cached) " >&6
15194else
15195 if test "$cross_compiling" = yes; then :
15196 ac_cv_func_vfork_works=cross
15197else
15198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15199/* end confdefs.h. */
15200/* Thanks to Paul Eggert for this test. */
15201$ac_includes_default
15202#include <sys/wait.h>
15203#ifdef HAVE_VFORK_H
15204# include <vfork.h>
15205#endif
15206/* On some sparc systems, changes by the child to local and incoming
15207 argument registers are propagated back to the parent. The compiler
15208 is told about this with #include <vfork.h>, but some compilers
15209 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
15210 static variable whose address is put into a register that is
15211 clobbered by the vfork. */
15212static void
15213#ifdef __cplusplus
15214sparc_address_test (int arg)
15215# else
15216sparc_address_test (arg) int arg;
15217#endif
15218{
15219 static pid_t child;
15220 if (!child) {
15221 child = vfork ();
15222 if (child < 0) {
15223 perror ("vfork");
15224 _exit(2);
15225 }
15226 if (!child) {
15227 arg = getpid();
15228 write(-1, "", 0);
15229 _exit (arg);
15230 }
15231 }
15232}
4fda9c95 15233
3e0be4ab
GM
15234int
15235main ()
15236{
15237 pid_t parent = getpid ();
15238 pid_t child;
4fda9c95 15239
3e0be4ab 15240 sparc_address_test (0);
4fda9c95 15241
3e0be4ab 15242 child = vfork ();
4fda9c95 15243
3e0be4ab
GM
15244 if (child == 0) {
15245 /* Here is another test for sparc vfork register problems. This
15246 test uses lots of local variables, at least as many local
15247 variables as main has allocated so far including compiler
15248 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
15249 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
15250 reuse the register of parent for one of the local variables,
15251 since it will think that parent can't possibly be used any more
15252 in this routine. Assigning to the local variable will thus
15253 munge parent in the parent process. */
15254 pid_t
15255 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15256 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15257 /* Convince the compiler that p..p7 are live; otherwise, it might
15258 use the same hardware register for all 8 local variables. */
15259 if (p != p1 || p != p2 || p != p3 || p != p4
15260 || p != p5 || p != p6 || p != p7)
15261 _exit(1);
4fda9c95 15262
3e0be4ab
GM
15263 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15264 from child file descriptors. If the child closes a descriptor
15265 before it execs or exits, this munges the parent's descriptor
15266 as well. Test for this by closing stdout in the child. */
15267 _exit(close(fileno(stdout)) != 0);
15268 } else {
15269 int status;
15270 struct stat st;
4fda9c95 15271
3e0be4ab
GM
15272 while (wait(&status) != child)
15273 ;
15274 return (
15275 /* Was there some problem with vforking? */
15276 child < 0
15277
15278 /* Did the child fail? (This shouldn't happen.) */
15279 || status
4fda9c95 15280
3e0be4ab
GM
15281 /* Did the vfork/compiler bug occur? */
15282 || parent != getpid()
15283
15284 /* Did the file descriptor bug occur? */
15285 || fstat(fileno(stdout), &st) != 0
15286 );
15287 }
15288}
4fda9c95 15289_ACEOF
3e0be4ab
GM
15290if ac_fn_c_try_run "$LINENO"; then :
15291 ac_cv_func_vfork_works=yes
15292else
15293 ac_cv_func_vfork_works=no
15294fi
15295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15296 conftest.$ac_objext conftest.beam conftest.$ac_ext
15297fi
4fda9c95 15298
3e0be4ab
GM
15299fi
15300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15301$as_echo "$ac_cv_func_vfork_works" >&6; }
4fda9c95 15302
3e0be4ab
GM
15303fi;
15304if test "x$ac_cv_func_fork_works" = xcross; then
15305 ac_cv_func_vfork_works=$ac_cv_func_vfork
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15307$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
4fda9c95 15308fi
4fda9c95 15309
3e0be4ab 15310if test "x$ac_cv_func_vfork_works" = xyes; then
4fda9c95 15311
3e0be4ab 15312$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
4fda9c95 15313
3e0be4ab 15314else
4fda9c95 15315
3e0be4ab 15316$as_echo "#define vfork fork" >>confdefs.h
4fda9c95 15317
3e0be4ab
GM
15318fi
15319if test "x$ac_cv_func_fork_works" = xyes; then
4fda9c95 15320
3e0be4ab 15321$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
4fda9c95 15322
3e0be4ab 15323fi
4fda9c95
GM
15324
15325
3e0be4ab
GM
15326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
15327$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
15328if test "${emacs_cv_langinfo_codeset+set}" = set; then :
15329 $as_echo_n "(cached) " >&6
15330else
15331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15332/* end confdefs.h. */
15333#include <langinfo.h>
15334int
15335main ()
15336{
15337char* cs = nl_langinfo(CODESET);
15338 ;
15339 return 0;
15340}
15341_ACEOF
15342if ac_fn_c_try_link "$LINENO"; then :
15343 emacs_cv_langinfo_codeset=yes
15344else
15345 emacs_cv_langinfo_codeset=no
15346fi
15347rm -f core conftest.err conftest.$ac_objext \
15348 conftest$ac_exeext conftest.$ac_ext
4fda9c95 15349
3e0be4ab
GM
15350fi
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
15352$as_echo "$emacs_cv_langinfo_codeset" >&6; }
15353if test $emacs_cv_langinfo_codeset = yes; then
4fda9c95 15354
3e0be4ab 15355$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
4fda9c95 15356
3e0be4ab 15357fi
4fda9c95 15358
3e0be4ab
GM
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
15360$as_echo_n "checking for mbstate_t... " >&6; }
15361if test "${ac_cv_type_mbstate_t+set}" = set; then :
15362 $as_echo_n "(cached) " >&6
15363else
15364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365/* end confdefs.h. */
15366$ac_includes_default
15367# include <wchar.h>
15368int
15369main ()
15370{
15371mbstate_t x; return sizeof x;
15372 ;
15373 return 0;
15374}
15375_ACEOF
15376if ac_fn_c_try_compile "$LINENO"; then :
15377 ac_cv_type_mbstate_t=yes
15378else
15379 ac_cv_type_mbstate_t=no
15380fi
15381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15382fi
15383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
15384$as_echo "$ac_cv_type_mbstate_t" >&6; }
15385 if test $ac_cv_type_mbstate_t = yes; then
4fda9c95 15386
3e0be4ab 15387$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
4fda9c95 15388
3e0be4ab 15389 else
4fda9c95 15390
3e0be4ab 15391$as_echo "#define mbstate_t int" >>confdefs.h
4fda9c95 15392
3e0be4ab 15393 fi
4fda9c95 15394
3e0be4ab
GM
15395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
15396$as_echo_n "checking for C restricted array declarations... " >&6; }
15397if test "${emacs_cv_c_restrict_arr+set}" = set; then :
15398 $as_echo_n "(cached) " >&6
15399else
15400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15401/* end confdefs.h. */
15402void fred (int x[__restrict]);
15403int
15404main ()
15405{
4fda9c95 15406
3e0be4ab
GM
15407 ;
15408 return 0;
15409}
15410_ACEOF
15411if ac_fn_c_try_compile "$LINENO"; then :
15412 emacs_cv_c_restrict_arr=yes
15413else
15414 emacs_cv_c_restrict_arr=no
15415fi
15416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15417fi
15418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
15419$as_echo "$emacs_cv_c_restrict_arr" >&6; }
15420if test "$emacs_cv_c_restrict_arr" = yes; then
4fda9c95 15421
3e0be4ab 15422$as_echo "#define __restrict_arr __restrict" >>confdefs.h
4fda9c95 15423
3e0be4ab 15424fi
4fda9c95
GM
15425
15426
3e0be4ab
GM
15427# Set up the CFLAGS for real compilation, so we can substitute it.
15428CFLAGS="$REAL_CFLAGS"
15429CPPFLAGS="$REAL_CPPFLAGS"
4fda9c95 15430
3e0be4ab
GM
15431## Hack to detect a buggy GCC version.
15432if test "x$GCC" = xyes \
15433 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
15434 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
15435 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
15436 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
15437fi
4fda9c95 15438
3e0be4ab 15439version=$PACKAGE_VERSION
4fda9c95 15440
3e0be4ab
GM
15441### Specify what sort of things we'll be editing into Makefile and config.h.
15442### Use configuration here uncanonicalized to avoid exceeding size limits.
4fda9c95 15443
4fda9c95 15444
3e0be4ab 15445## Unused?
4fda9c95
GM
15446
15447
4fda9c95 15448
4fda9c95
GM
15449
15450
15451
15452
4fda9c95
GM
15453
15454
4fda9c95
GM
15455
15456
4fda9c95
GM
15457
15458
4fda9c95
GM
15459
15460
4fda9c95 15461
4fda9c95 15462
4fda9c95 15463
4fda9c95 15464
4fda9c95 15465
3e0be4ab
GM
15466## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
15467## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
15468## end of LIBX_BASE, but nothing ever set it.
15469
15470
15471
4fda9c95 15472
3e0be4ab
GM
15473## Used in lwlib/Makefile.in.
15474
15475if test -n "${machfile}"; then
15476 M_FILE="\$(srcdir)/${machfile}"
4fda9c95 15477else
3e0be4ab
GM
15478 M_FILE=
15479fi
15480S_FILE="\$(srcdir)/${opsysfile}"
4fda9c95
GM
15481
15482
4fda9c95
GM
15483
15484
4fda9c95
GM
15485
15486
4fda9c95 15487
4fda9c95 15488
4fda9c95 15489
3e0be4ab
GM
15490
15491cat >>confdefs.h <<_ACEOF
15492#define EMACS_CONFIGURATION "${canonical}"
4fda9c95 15493_ACEOF
4fda9c95
GM
15494
15495
3e0be4ab
GM
15496cat >>confdefs.h <<_ACEOF
15497#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
15498_ACEOF
15499
15500if test -n "$machfile"; then
15501
15502cat >>confdefs.h <<_ACEOF
15503#define config_machfile "${machfile}"
15504_ACEOF
4fda9c95
GM
15505
15506fi
3e0be4ab
GM
15507
15508cat >>confdefs.h <<_ACEOF
15509#define config_opsysfile "${opsysfile}"
4fda9c95
GM
15510_ACEOF
15511
3e0be4ab
GM
15512
15513XMENU_OBJ=
15514XOBJ=
15515FONT_OBJ=
15516if test "${HAVE_X_WINDOWS}" = "yes" ; then
15517
15518$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
15519
15520 XMENU_OBJ=xmenu.o
15521 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
15522 FONT_OBJ=xfont.o
15523 if test "$HAVE_XFT" = "yes"; then
15524 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
15525 elif test "$HAVE_FREETYPE" = "yes"; then
15526 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
15527 fi
15528
4fda9c95
GM
15529fi
15530
4fda9c95 15531
4fda9c95 15532
4fda9c95 15533
3e0be4ab
GM
15534WIDGET_OBJ=
15535MOTIF_LIBW=
15536if test "${USE_X_TOOLKIT}" != "none" ; then
15537 WIDGET_OBJ=widget.o
15538
15539$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
4fda9c95 15540
3e0be4ab 15541 if test "${USE_X_TOOLKIT}" = "LUCID"; then
4fda9c95 15542
3e0be4ab 15543$as_echo "#define USE_LUCID 1" >>confdefs.h
4fda9c95 15544
3e0be4ab 15545 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
4fda9c95 15546
3e0be4ab 15547$as_echo "#define USE_MOTIF 1" >>confdefs.h
4fda9c95 15548
3e0be4ab
GM
15549 MOTIF_LIBW=-lXm
15550 case "$opsys" in
15551 gnu-linux)
15552 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
15553 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
15554 ;;
15555
15556 unixware)
15557 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
15558 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
15559 MOTIF_LIBW="MOTIF_LIBW -lXimp"
15560 ;;
15561
15562 aix4-2)
15563 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
15564 MOTIF_LIBW="$MOTIF_LIBW -li18n"
15565 ;;
15566 esac
15567 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
15568 fi
15569fi
15570
15571
15572TOOLKIT_LIBW=
15573case "$USE_X_TOOLKIT" in
15574 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
15575 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
15576 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
15577esac
15578
15579
15580if test "$USE_X_TOOLKIT" = "none"; then
15581 LIBXT_OTHER="\$(LIBXSM)"
15582 OLDXMENU_TARGET="really-oldXMenu"
4fda9c95 15583else
3e0be4ab
GM
15584 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
15585 OLDXMENU_TARGET="really-lwlib"
15586fi
4fda9c95 15587
4fda9c95 15588
3e0be4ab
GM
15589## The X Menu stuff is present in the X10 distribution, but missing
15590## from X11. If we have X10, just use the installed library;
15591## otherwise, use our own copy.
15592if test "${HAVE_X11}" = "yes" ; then
15593
15594$as_echo "#define HAVE_X11 1" >>confdefs.h
15595
15596
15597 if test "$USE_X_TOOLKIT" = "none"; then
15598 OLDXMENU="\${oldXMenudir}/libXMenu11.a"
15599 else
15600 OLDXMENU="\${lwlibdir}/liblw.a"
15601 fi
15602 LIBXMENU="\$(OLDXMENU)"
15603 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
15604 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
4fda9c95 15605else
3e0be4ab
GM
15606 ## For a syntactically valid Makefile; not actually used for anything.
15607 ## See comments in src/Makefile.in.
15608 OLDXMENU=nothing
15609 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
15610 if test "${HAVE_X_WINDOWS}" = "yes"; then
15611 LIBXMENU="-lXMenu"
15612 else
15613 LIBXMENU=
15614 fi
15615 LIBX_OTHER=
15616 OLDXMENU_DEPS=
4fda9c95
GM
15617fi
15618
3e0be4ab
GM
15619if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
15620 OLDXMENU_TARGET=
15621 OLDXMENU=nothing
15622 LIBXMENU=
15623 OLDXMENU_DEPS=
15624fi
15625
15626
15627
15628
15629
15630
15631
15632if test "${HAVE_MENUS}" = "yes" ; then
15633
15634$as_echo "#define HAVE_MENUS 1" >>confdefs.h
4fda9c95
GM
15635
15636fi
4fda9c95 15637
3e0be4ab 15638if test "${GNU_MALLOC}" = "yes" ; then
4fda9c95 15639
3e0be4ab 15640$as_echo "#define GNU_MALLOC 1" >>confdefs.h
4fda9c95 15641
3e0be4ab 15642fi
4fda9c95 15643
3e0be4ab
GM
15644RALLOC_OBJ=
15645if test "${REL_ALLOC}" = "yes" ; then
4fda9c95 15646
3e0be4ab 15647$as_echo "#define REL_ALLOC 1" >>confdefs.h
4fda9c95 15648
4fda9c95 15649
3e0be4ab 15650 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
4fda9c95
GM
15651fi
15652
4fda9c95 15653
3e0be4ab
GM
15654if test "$opsys" = "cygwin"; then
15655 CYGWIN_OBJ="sheap.o"
15656 ## Cygwin differs because of its unexec().
15657 PRE_ALLOC_OBJ=
15658 POST_ALLOC_OBJ=lastfile.o
15659else
15660 CYGWIN_OBJ=
15661 PRE_ALLOC_OBJ=lastfile.o
15662 POST_ALLOC_OBJ=
4fda9c95 15663fi
4fda9c95 15664
4fda9c95
GM
15665
15666
15667
3e0be4ab 15668# Configure gnulib here, now that we know LIBS.
4fda9c95 15669
3e0be4ab
GM
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679 LIBC_FATAL_STDERR_=1
15680 export LIBC_FATAL_STDERR_
15681
15682# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15683# for constant arguments. Useless!
15684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
15685$as_echo_n "checking for working alloca.h... " >&6; }
15686if test "${ac_cv_working_alloca_h+set}" = set; then :
4fda9c95
GM
15687 $as_echo_n "(cached) " >&6
15688else
15689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15690/* end confdefs.h. */
3e0be4ab 15691#include <alloca.h>
4fda9c95
GM
15692int
15693main ()
15694{
3e0be4ab
GM
15695char *p = (char *) alloca (2 * sizeof (int));
15696 if (p) return 0;
4fda9c95
GM
15697 ;
15698 return 0;
15699}
15700_ACEOF
3e0be4ab
GM
15701if ac_fn_c_try_link "$LINENO"; then :
15702 ac_cv_working_alloca_h=yes
4fda9c95 15703else
3e0be4ab 15704 ac_cv_working_alloca_h=no
4fda9c95 15705fi
3e0be4ab
GM
15706rm -f core conftest.err conftest.$ac_objext \
15707 conftest$ac_exeext conftest.$ac_ext
4fda9c95 15708fi
3e0be4ab
GM
15709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
15710$as_echo "$ac_cv_working_alloca_h" >&6; }
15711if test $ac_cv_working_alloca_h = yes; then
4fda9c95 15712
3e0be4ab 15713$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
4fda9c95 15714
3e0be4ab 15715fi
4fda9c95 15716
3e0be4ab
GM
15717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
15718$as_echo_n "checking for alloca... " >&6; }
15719if test "${ac_cv_func_alloca_works+set}" = set; then :
4fda9c95
GM
15720 $as_echo_n "(cached) " >&6
15721else
3e0be4ab 15722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 15723/* end confdefs.h. */
3e0be4ab
GM
15724#ifdef __GNUC__
15725# define alloca __builtin_alloca
15726#else
15727# ifdef _MSC_VER
15728# include <malloc.h>
15729# define alloca _alloca
15730# else
15731# ifdef HAVE_ALLOCA_H
15732# include <alloca.h>
15733# else
15734# ifdef _AIX
15735 #pragma alloca
15736# else
15737# ifndef alloca /* predefined by HP cc +Olibcalls */
15738char *alloca ();
15739# endif
15740# endif
15741# endif
15742# endif
15743#endif
4fda9c95 15744
4fda9c95
GM
15745int
15746main ()
15747{
3e0be4ab
GM
15748char *p = (char *) alloca (1);
15749 if (p) return 0;
4fda9c95
GM
15750 ;
15751 return 0;
15752}
15753_ACEOF
3e0be4ab
GM
15754if ac_fn_c_try_link "$LINENO"; then :
15755 ac_cv_func_alloca_works=yes
15756else
15757 ac_cv_func_alloca_works=no
4fda9c95 15758fi
3e0be4ab
GM
15759rm -f core conftest.err conftest.$ac_objext \
15760 conftest$ac_exeext conftest.$ac_ext
4fda9c95 15761fi
3e0be4ab
GM
15762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
15763$as_echo "$ac_cv_func_alloca_works" >&6; }
4fda9c95 15764
3e0be4ab 15765if test $ac_cv_func_alloca_works = yes; then
4fda9c95 15766
3e0be4ab 15767$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
4fda9c95 15768
3e0be4ab
GM
15769else
15770 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15771# that cause trouble. Some versions do not even contain alloca or
15772# contain a buggy version. If you still want to use their alloca,
15773# use ar to extract alloca.o from them instead of compiling alloca.c.
4fda9c95
GM
15774
15775
3e0be4ab
GM
15776
15777
15778
15779ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
15780
15781$as_echo "#define C_ALLOCA 1" >>confdefs.h
15782
15783
15784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
15785$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
15786if test "${ac_cv_os_cray+set}" = set; then :
4fda9c95
GM
15787 $as_echo_n "(cached) " >&6
15788else
3e0be4ab 15789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 15790/* end confdefs.h. */
3e0be4ab
GM
15791#if defined CRAY && ! defined CRAY2
15792webecray
15793#else
15794wenotbecray
15795#endif
4fda9c95 15796
3e0be4ab
GM
15797_ACEOF
15798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15799 $EGREP "webecray" >/dev/null 2>&1; then :
15800 ac_cv_os_cray=yes
15801else
15802 ac_cv_os_cray=no
15803fi
15804rm -f conftest*
4fda9c95 15805
3e0be4ab
GM
15806fi
15807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
15808$as_echo "$ac_cv_os_cray" >&6; }
15809if test $ac_cv_os_cray = yes; then
15810 for ac_func in _getb67 GETB67 getb67; do
15811 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15812ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15813eval as_val=\$$as_ac_var
15814 if test "x$as_val" = x""yes; then :
15815
15816cat >>confdefs.h <<_ACEOF
15817#define CRAY_STACKSEG_END $ac_func
15818_ACEOF
15819
15820 break
15821fi
15822
15823 done
15824fi
15825
15826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
15827$as_echo_n "checking stack direction for C alloca... " >&6; }
15828if test "${ac_cv_c_stack_direction+set}" = set; then :
15829 $as_echo_n "(cached) " >&6
15830else
15831 if test "$cross_compiling" = yes; then :
15832 ac_cv_c_stack_direction=0
15833else
15834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15835/* end confdefs.h. */
15836$ac_includes_default
4fda9c95 15837int
3e0be4ab 15838find_stack_direction (int *addr, int depth)
4fda9c95 15839{
3e0be4ab
GM
15840 int dir, dummy = 0;
15841 if (! addr)
15842 addr = &dummy;
15843 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
15844 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
15845 return dir + dummy;
15846}
4fda9c95 15847
3e0be4ab
GM
15848int
15849main (int argc, char **argv)
15850{
15851 return find_stack_direction (0, argc + !argv + 20) < 0;
4fda9c95
GM
15852}
15853_ACEOF
3e0be4ab
GM
15854if ac_fn_c_try_run "$LINENO"; then :
15855 ac_cv_c_stack_direction=1
15856else
15857 ac_cv_c_stack_direction=-1
4fda9c95 15858fi
3e0be4ab
GM
15859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15860 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 15861fi
3e0be4ab
GM
15862
15863fi
15864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
15865$as_echo "$ac_cv_c_stack_direction" >&6; }
15866cat >>confdefs.h <<_ACEOF
15867#define STACK_DIRECTION $ac_cv_c_stack_direction
4fda9c95
GM
15868_ACEOF
15869
da6c8463 15870
3e0be4ab 15871fi
da6c8463
GM
15872
15873
15874
15875
3e0be4ab
GM
15876 for ac_func in $ac_func_list
15877do :
15878 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15880eval as_val=\$$as_ac_var
15881 if test "x$as_val" = x""yes; then :
15882 cat >>confdefs.h <<_ACEOF
15883#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15884_ACEOF
da6c8463 15885
3e0be4ab
GM
15886fi
15887done
da6c8463
GM
15888
15889
15890
15891
3e0be4ab
GM
15892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
15893$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
15894if test "${ac_cv_c_bigendian+set}" = set; then :
da6c8463
GM
15895 $as_echo_n "(cached) " >&6
15896else
3e0be4ab
GM
15897 ac_cv_c_bigendian=unknown
15898 # See if we're dealing with a universal compiler.
15899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
da6c8463 15900/* end confdefs.h. */
3e0be4ab
GM
15901#ifndef __APPLE_CC__
15902 not a universal capable compiler
15903 #endif
15904 typedef int dummy;
da6c8463
GM
15905
15906_ACEOF
3e0be4ab 15907if ac_fn_c_try_compile "$LINENO"; then :
da6c8463 15908
3e0be4ab
GM
15909 # Check for potential -arch flags. It is not universal unless
15910 # there are at least two -arch flags with different values.
15911 ac_arch=
15912 ac_prev=
15913 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
15914 if test -n "$ac_prev"; then
15915 case $ac_word in
15916 i?86 | x86_64 | ppc | ppc64)
15917 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
15918 ac_arch=$ac_word
15919 else
15920 ac_cv_c_bigendian=universal
15921 break
15922 fi
15923 ;;
15924 esac
15925 ac_prev=
15926 elif test "x$ac_word" = "x-arch"; then
15927 ac_prev=arch
15928 fi
15929 done
da6c8463 15930fi
3e0be4ab
GM
15931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15932 if test $ac_cv_c_bigendian = unknown; then
15933 # See if sys/param.h defines the BYTE_ORDER macro.
15934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15935/* end confdefs.h. */
15936#include <sys/types.h>
15937 #include <sys/param.h>
ce4331ef 15938
3e0be4ab
GM
15939int
15940main ()
15941{
15942#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
15943 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
15944 && LITTLE_ENDIAN)
15945 bogus endian macros
15946 #endif
ce4331ef 15947
3e0be4ab
GM
15948 ;
15949 return 0;
15950}
15951_ACEOF
15952if ac_fn_c_try_compile "$LINENO"; then :
15953 # It does; now see whether it defined to BIG_ENDIAN or not.
15954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4fda9c95 15955/* end confdefs.h. */
3e0be4ab
GM
15956#include <sys/types.h>
15957 #include <sys/param.h>
15958
4fda9c95
GM
15959int
15960main ()
15961{
3e0be4ab
GM
15962#if BYTE_ORDER != BIG_ENDIAN
15963 not big endian
15964 #endif
ce4331ef 15965
4fda9c95
GM
15966 ;
15967 return 0;
15968}
15969_ACEOF
3e0be4ab
GM
15970if ac_fn_c_try_compile "$LINENO"; then :
15971 ac_cv_c_bigendian=yes
ae0d7250 15972else
3e0be4ab 15973 ac_cv_c_bigendian=no
ae0d7250 15974fi
3e0be4ab 15975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae0d7250 15976fi
3e0be4ab
GM
15977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15978 fi
15979 if test $ac_cv_c_bigendian = unknown; then
15980 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
15981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982/* end confdefs.h. */
15983#include <limits.h>
ae0d7250 15984
3e0be4ab
GM
15985int
15986main ()
15987{
15988#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
15989 bogus endian macros
15990 #endif
ae0d7250 15991
3e0be4ab
GM
15992 ;
15993 return 0;
15994}
6ad6792b 15995_ACEOF
3e0be4ab
GM
15996if ac_fn_c_try_compile "$LINENO"; then :
15997 # It does; now see whether it defined to _BIG_ENDIAN or not.
15998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 15999/* end confdefs.h. */
3e0be4ab 16000#include <limits.h>
4fda9c95 16001
5f90be1b
PE
16002int
16003main ()
16004{
3e0be4ab
GM
16005#ifndef _BIG_ENDIAN
16006 not big endian
16007 #endif
4fda9c95 16008
5f90be1b
PE
16009 ;
16010 return 0;
16011}
5f90be1b 16012_ACEOF
4fda9c95 16013if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 16014 ac_cv_c_bigendian=yes
5f90be1b 16015else
3e0be4ab 16016 ac_cv_c_bigendian=no
5f90be1b 16017fi
4fda9c95 16018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5f90be1b 16019fi
3e0be4ab
GM
16020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16021 fi
16022 if test $ac_cv_c_bigendian = unknown; then
16023 # Compile a test program.
16024 if test "$cross_compiling" = yes; then :
16025 # Try to guess by grepping values from an object file.
16026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16027/* end confdefs.h. */
16028short int ascii_mm[] =
16029 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16030 short int ascii_ii[] =
16031 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16032 int use_ascii (int i) {
16033 return ascii_mm[i] + ascii_ii[i];
16034 }
16035 short int ebcdic_ii[] =
16036 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16037 short int ebcdic_mm[] =
16038 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16039 int use_ebcdic (int i) {
16040 return ebcdic_mm[i] + ebcdic_ii[i];
16041 }
16042 extern int foo;
5f90be1b 16043
3e0be4ab
GM
16044int
16045main ()
16046{
16047return use_ascii (foo) == use_ebcdic (foo);
16048 ;
16049 return 0;
16050}
4fda9c95 16051_ACEOF
3e0be4ab
GM
16052if ac_fn_c_try_compile "$LINENO"; then :
16053 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16054 ac_cv_c_bigendian=yes
16055 fi
16056 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16057 if test "$ac_cv_c_bigendian" = unknown; then
16058 ac_cv_c_bigendian=no
16059 else
16060 # finding both strings is unlikely to happen, but who knows?
16061 ac_cv_c_bigendian=unknown
16062 fi
16063 fi
16064fi
16065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16066else
16067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16068/* end confdefs.h. */
16069$ac_includes_default
16070int
16071main ()
16072{
5f90be1b 16073
3e0be4ab
GM
16074 /* Are we little or big endian? From Harbison&Steele. */
16075 union
16076 {
16077 long int l;
16078 char c[sizeof (long int)];
16079 } u;
16080 u.l = 1;
16081 return u.c[sizeof (long int) - 1] == 1;
4fda9c95 16082
3e0be4ab
GM
16083 ;
16084 return 0;
16085}
16086_ACEOF
16087if ac_fn_c_try_run "$LINENO"; then :
16088 ac_cv_c_bigendian=no
16089else
16090 ac_cv_c_bigendian=yes
16091fi
16092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16093 conftest.$ac_objext conftest.beam conftest.$ac_ext
4fda9c95 16094fi
5f90be1b 16095
3e0be4ab
GM
16096 fi
16097fi
16098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
16099$as_echo "$ac_cv_c_bigendian" >&6; }
16100 case $ac_cv_c_bigendian in #(
16101 yes)
16102 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
16103;; #(
16104 no)
16105 ;; #(
16106 universal)
5f90be1b 16107
3e0be4ab 16108$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5f90be1b 16109
3e0be4ab
GM
16110 ;; #(
16111 *)
16112 as_fn_error "unknown endianness
16113 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
16114 esac
4fda9c95
GM
16115
16116
3e0be4ab
GM
16117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
16118$as_echo_n "checking for inline... " >&6; }
16119if test "${ac_cv_c_inline+set}" = set; then :
5f90be1b 16120 $as_echo_n "(cached) " >&6
5f90be1b 16121else
3e0be4ab
GM
16122 ac_cv_c_inline=no
16123for ac_kw in inline __inline__ __inline; do
5f90be1b
PE
16124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16125/* end confdefs.h. */
3e0be4ab
GM
16126#ifndef __cplusplus
16127typedef int foo_t;
16128static $ac_kw foo_t static_foo () {return 0; }
16129$ac_kw foo_t foo () {return 0; }
16130#endif
4fda9c95 16131
5f90be1b 16132_ACEOF
4fda9c95 16133if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 16134 ac_cv_c_inline=$ac_kw
5f90be1b 16135fi
4fda9c95 16136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab
GM
16137 test "$ac_cv_c_inline" != no && break
16138done
5f90be1b 16139
3e0be4ab
GM
16140fi
16141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
16142$as_echo "$ac_cv_c_inline" >&6; }
5f90be1b 16143
3e0be4ab
GM
16144case $ac_cv_c_inline in
16145 inline | yes) ;;
16146 *)
16147 case $ac_cv_c_inline in
16148 no) ac_val=;;
16149 *) ac_val=$ac_cv_c_inline;;
16150 esac
16151 cat >>confdefs.h <<_ACEOF
16152#ifndef __cplusplus
16153#define inline $ac_val
16154#endif
16155_ACEOF
16156 ;;
16157esac
5f90be1b
PE
16158
16159
3e0be4ab
GM
16160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtold conforms to C99" >&5
16161$as_echo_n "checking whether strtold conforms to C99... " >&6; }
16162if test "${gl_cv_func_c99_strtold+set}" = set; then :
16163 $as_echo_n "(cached) " >&6
16164else
16165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16166/* end confdefs.h. */
16167/* On HP-UX before 11.23, strtold returns a struct instead of
16168 long double. Reject implementations like that, by requiring
16169 compatibility with the C99 prototype. */
16170 #include <stdlib.h>
16171 static long double (*p) (char const *, char **) = strtold;
16172 static long double
16173 test (char const *nptr, char **endptr)
16174 {
16175 long double r;
16176 r = strtold (nptr, endptr);
16177 return r;
16178 }
16179int
16180main ()
16181{
16182return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
16183 ;
16184 return 0;
16185}
16186_ACEOF
16187if ac_fn_c_try_link "$LINENO"; then :
16188 gl_cv_func_c99_strtold=yes
16189else
16190 gl_cv_func_c99_strtold=no
16191fi
16192rm -f core conftest.err conftest.$ac_objext \
16193 conftest$ac_exeext conftest.$ac_ext
16194fi
16195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_c99_strtold" >&5
16196$as_echo "$gl_cv_func_c99_strtold" >&6; }
16197 if test $gl_cv_func_c99_strtold = yes; then
16198
16199$as_echo "#define HAVE_C99_STRTOLD 1" >>confdefs.h
16200
16201 fi
16202
16203
16204 GNULIB_CHOWN=0;
16205 GNULIB_CLOSE=0;
16206 GNULIB_DUP2=0;
16207 GNULIB_DUP3=0;
16208 GNULIB_ENVIRON=0;
16209 GNULIB_EUIDACCESS=0;
16210 GNULIB_FACCESSAT=0;
16211 GNULIB_FCHDIR=0;
16212 GNULIB_FCHOWNAT=0;
16213 GNULIB_FSYNC=0;
16214 GNULIB_FTRUNCATE=0;
16215 GNULIB_GETCWD=0;
16216 GNULIB_GETDOMAINNAME=0;
16217 GNULIB_GETDTABLESIZE=0;
16218 GNULIB_GETGROUPS=0;
16219 GNULIB_GETHOSTNAME=0;
16220 GNULIB_GETLOGIN=0;
16221 GNULIB_GETLOGIN_R=0;
16222 GNULIB_GETPAGESIZE=0;
16223 GNULIB_GETUSERSHELL=0;
16224 GNULIB_GROUP_MEMBER=0;
16225 GNULIB_LCHOWN=0;
16226 GNULIB_LINK=0;
16227 GNULIB_LINKAT=0;
16228 GNULIB_LSEEK=0;
16229 GNULIB_PIPE=0;
16230 GNULIB_PIPE2=0;
16231 GNULIB_PREAD=0;
16232 GNULIB_PWRITE=0;
16233 GNULIB_READ=0;
16234 GNULIB_READLINK=0;
16235 GNULIB_READLINKAT=0;
16236 GNULIB_RMDIR=0;
16237 GNULIB_SLEEP=0;
16238 GNULIB_SYMLINK=0;
16239 GNULIB_SYMLINKAT=0;
16240 GNULIB_TTYNAME_R=0;
16241 GNULIB_UNISTD_H_GETOPT=0;
16242 GNULIB_UNISTD_H_NONBLOCKING=0;
16243 GNULIB_UNISTD_H_SIGPIPE=0;
16244 GNULIB_UNLINK=0;
16245 GNULIB_UNLINKAT=0;
16246 GNULIB_USLEEP=0;
16247 GNULIB_WRITE=0;
16248 HAVE_CHOWN=1;
16249 HAVE_DUP2=1;
16250 HAVE_DUP3=1;
16251 HAVE_EUIDACCESS=1;
16252 HAVE_FACCESSAT=1;
16253 HAVE_FCHDIR=1;
16254 HAVE_FCHOWNAT=1;
16255 HAVE_FSYNC=1;
16256 HAVE_FTRUNCATE=1;
16257 HAVE_GETDTABLESIZE=1;
16258 HAVE_GETGROUPS=1;
16259 HAVE_GETHOSTNAME=1;
16260 HAVE_GETLOGIN=1;
16261 HAVE_GETPAGESIZE=1;
16262 HAVE_GROUP_MEMBER=1;
16263 HAVE_LCHOWN=1;
16264 HAVE_LINK=1;
16265 HAVE_LINKAT=1;
16266 HAVE_PIPE=1;
16267 HAVE_PIPE2=1;
16268 HAVE_PREAD=1;
16269 HAVE_PWRITE=1;
16270 HAVE_READLINK=1;
16271 HAVE_READLINKAT=1;
16272 HAVE_SLEEP=1;
16273 HAVE_SYMLINK=1;
16274 HAVE_SYMLINKAT=1;
16275 HAVE_UNLINKAT=1;
16276 HAVE_USLEEP=1;
16277 HAVE_DECL_ENVIRON=1;
16278 HAVE_DECL_FCHDIR=1;
16279 HAVE_DECL_GETDOMAINNAME=1;
16280 HAVE_DECL_GETLOGIN_R=1;
16281 HAVE_DECL_GETPAGESIZE=1;
16282 HAVE_DECL_GETUSERSHELL=1;
16283 HAVE_DECL_TTYNAME_R=1;
16284 HAVE_OS_H=0;
16285 HAVE_SYS_PARAM_H=0;
16286 REPLACE_CHOWN=0;
16287 REPLACE_CLOSE=0;
16288 REPLACE_DUP=0;
16289 REPLACE_DUP2=0;
16290 REPLACE_FCHOWNAT=0;
16291 REPLACE_GETCWD=0;
16292 REPLACE_GETDOMAINNAME=0;
16293 REPLACE_GETLOGIN_R=0;
16294 REPLACE_GETGROUPS=0;
16295 REPLACE_GETPAGESIZE=0;
16296 REPLACE_LCHOWN=0;
16297 REPLACE_LINK=0;
16298 REPLACE_LINKAT=0;
16299 REPLACE_LSEEK=0;
16300 REPLACE_PREAD=0;
16301 REPLACE_PWRITE=0;
16302 REPLACE_READ=0;
16303 REPLACE_READLINK=0;
16304 REPLACE_RMDIR=0;
16305 REPLACE_SLEEP=0;
16306 REPLACE_SYMLINK=0;
16307 REPLACE_TTYNAME_R=0;
16308 REPLACE_UNLINK=0;
16309 REPLACE_UNLINKAT=0;
16310 REPLACE_USLEEP=0;
16311 REPLACE_WRITE=0;
16312 UNISTD_H_HAVE_WINSOCK2_H=0;
16313 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
16314
16315
16316
16317
16318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
16319$as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
16320if test "${ac_cv_struct_st_dm_mode+set}" = set; then :
16321 $as_echo_n "(cached) " >&6
16322else
16323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16324/* end confdefs.h. */
16325
16326#include <sys/types.h>
16327#include <sys/stat.h>
16328int
16329main ()
16330{
16331struct stat s; s.st_dm_mode;
16332 ;
16333 return 0;
16334}
16335_ACEOF
16336if ac_fn_c_try_compile "$LINENO"; then :
16337 ac_cv_struct_st_dm_mode=yes
16338else
16339 ac_cv_struct_st_dm_mode=no
16340fi
16341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16342fi
16343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
16344$as_echo "$ac_cv_struct_st_dm_mode" >&6; }
16345
16346 if test $ac_cv_struct_st_dm_mode = yes; then
16347
16348$as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
16349
16350 fi
16351
16352
16353ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
16354if test "x$ac_cv_have_decl_strmode" = x""yes; then :
16355 ac_have_decl=1
16356else
16357 ac_have_decl=0
16358fi
16359
16360cat >>confdefs.h <<_ACEOF
16361#define HAVE_DECL_STRMODE $ac_have_decl
16362_ACEOF
16363
16364
16365 GNULIB__EXIT=0;
16366 GNULIB_ATOLL=0;
16367 GNULIB_CALLOC_POSIX=0;
16368 GNULIB_CANONICALIZE_FILE_NAME=0;
16369 GNULIB_GETLOADAVG=0;
16370 GNULIB_GETSUBOPT=0;
16371 GNULIB_GRANTPT=0;
16372 GNULIB_MALLOC_POSIX=0;
16373 GNULIB_MBTOWC=0;
16374 GNULIB_MKDTEMP=0;
16375 GNULIB_MKOSTEMP=0;
16376 GNULIB_MKOSTEMPS=0;
16377 GNULIB_MKSTEMP=0;
16378 GNULIB_MKSTEMPS=0;
16379 GNULIB_PTSNAME=0;
16380 GNULIB_PUTENV=0;
16381 GNULIB_RANDOM_R=0;
16382 GNULIB_REALLOC_POSIX=0;
16383 GNULIB_REALPATH=0;
16384 GNULIB_RPMATCH=0;
16385 GNULIB_SETENV=0;
16386 GNULIB_STRTOD=0;
16387 GNULIB_STRTOLL=0;
16388 GNULIB_STRTOULL=0;
16389 GNULIB_SYSTEM_POSIX=0;
16390 GNULIB_UNLOCKPT=0;
16391 GNULIB_UNSETENV=0;
16392 GNULIB_WCTOMB=0;
16393 HAVE__EXIT=1;
16394 HAVE_ATOLL=1;
16395 HAVE_CANONICALIZE_FILE_NAME=1;
16396 HAVE_DECL_GETLOADAVG=1;
16397 HAVE_GETSUBOPT=1;
16398 HAVE_GRANTPT=1;
16399 HAVE_MKDTEMP=1;
16400 HAVE_MKOSTEMP=1;
16401 HAVE_MKOSTEMPS=1;
16402 HAVE_MKSTEMP=1;
16403 HAVE_MKSTEMPS=1;
16404 HAVE_PTSNAME=1;
16405 HAVE_RANDOM_H=1;
16406 HAVE_RANDOM_R=1;
16407 HAVE_REALPATH=1;
16408 HAVE_RPMATCH=1;
16409 HAVE_SETENV=1;
16410 HAVE_DECL_SETENV=1;
16411 HAVE_STRTOD=1;
16412 HAVE_STRTOLL=1;
16413 HAVE_STRTOULL=1;
16414 HAVE_STRUCT_RANDOM_DATA=1;
16415 HAVE_SYS_LOADAVG_H=0;
16416 HAVE_UNLOCKPT=1;
16417 HAVE_DECL_UNSETENV=1;
16418 REPLACE_CALLOC=0;
16419 REPLACE_CANONICALIZE_FILE_NAME=0;
16420 REPLACE_MALLOC=0;
16421 REPLACE_MBTOWC=0;
16422 REPLACE_MKSTEMP=0;
16423 REPLACE_PUTENV=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;
16430
16431
16432
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 :
16436 $as_echo_n "(cached) " >&6
16437else
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
16468/* end confdefs.h. */
16469#include <conftest.h>
16470_ACEOF
16471if ac_fn_c_try_compile "$LINENO"; then :
16472 gl_cv_have_include_next=yes
16473else
16474 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
16475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16476/* end confdefs.h. */
16477#include <conftest.h>
16478_ACEOF
16479if ac_fn_c_try_compile "$LINENO"; then :
16480 gl_cv_have_include_next=buggy
16481else
16482 gl_cv_have_include_next=no
16483fi
16484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16485
16486fi
16487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16488 CPPFLAGS="$gl_save_CPPFLAGS"
16489 rm -rf conftestd1a conftestd1b conftestd2
16490
16491fi
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
16510
16511
16512
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 :
16516 $as_echo_n "(cached) " >&6
16517else
16518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16519/* end confdefs.h. */
16520
16521#ifdef __TANDEM
16522choke me
16523#endif
16524
16525_ACEOF
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
16531fi
16532rm -f conftest*
16533
16534
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"
16540 else
16541 PRAGMA_COLUMNS=
16542 fi
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560 if test $gl_cv_have_include_next = yes; then
16561 gl_cv_next_getopt_h='<'getopt.h'>'
16562 else
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 :
16566 $as_echo_n "(cached) " >&6
16567else
16568
16569 if test $ac_cv_header_getopt_h = yes; then
16570
16571
16572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573/* end confdefs.h. */
16574#include <getopt.h>
16575
16576_ACEOF
16577 case "$host_os" in
16578 aix*) gl_absname_cpp="$ac_cpp -C" ;;
16579 *) gl_absname_cpp="$ac_cpp" ;;
16580 esac
16581 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
16582 sed -n '\#/getopt.h#{
16583 s#.*"\(.*/getopt.h\)".*#\1#
16584 s#^/[^/]#//&#
16585 p
16586 q
16587 }'`'"'
16588 else
16589 gl_cv_next_getopt_h='<'getopt.h'>'
16590 fi
16591
16592
16593fi
16594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
16595$as_echo "$gl_cv_next_getopt_h" >&6; }
16596 fi
16597 NEXT_GETOPT_H=$gl_cv_next_getopt_h
16598
16599 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
16600 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
16601 gl_next_as_first_directive='<'getopt.h'>'
16602 else
16603 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
16604 gl_next_as_first_directive=$gl_cv_next_getopt_h
16605 fi
16606 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
16607
16608
16609
16610
16611 if test $ac_cv_header_getopt_h = yes; then
16612 HAVE_GETOPT_H=1
16613 else
16614 HAVE_GETOPT_H=0
16615 fi
16616
16617
16618 gl_replace_getopt=
16619
16620 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16621 for ac_header in getopt.h
16622do :
16623 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
16624if test "x$ac_cv_header_getopt_h" = x""yes; then :
16625 cat >>confdefs.h <<_ACEOF
16626#define HAVE_GETOPT_H 1
16627_ACEOF
16628
16629else
16630 gl_replace_getopt=yes
16631fi
16632
16633done
16634
16635 fi
16636
16637 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16638 for ac_func in getopt_long_only
16639do :
16640 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
16641if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
16642 cat >>confdefs.h <<_ACEOF
16643#define HAVE_GETOPT_LONG_ONLY 1
16644_ACEOF
16645
16646else
16647 gl_replace_getopt=yes
16648fi
16649done
16650
16651 fi
16652
16653 if test -z "$gl_replace_getopt"; then
16654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
16655$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
16656if test "${gl_cv_func_getopt_posix+set}" = set; then :
16657 $as_echo_n "(cached) " >&6
16658else
16659
16660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16661/* end confdefs.h. */
16662#include <unistd.h>
16663int
16664main ()
16665{
16666int *p = &optreset; return optreset;
16667 ;
16668 return 0;
16669}
16670_ACEOF
16671if ac_fn_c_try_link "$LINENO"; then :
16672 gl_optind_min=1
16673else
16674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16675/* end confdefs.h. */
16676#include <getopt.h>
16677int
16678main ()
16679{
16680return !getopt_clip;
16681 ;
16682 return 0;
16683}
16684_ACEOF
16685if ac_fn_c_try_compile "$LINENO"; then :
16686 gl_optind_min=1
16687else
16688 gl_optind_min=0
16689fi
16690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16691fi
16692rm -f core conftest.err conftest.$ac_objext \
16693 conftest$ac_exeext conftest.$ac_ext
16694
16695 gl_save_CPPFLAGS=$CPPFLAGS
16696 CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
16697 if test "$cross_compiling" = yes; then :
16698 case "$host_os" in
16699 mingw*) gl_cv_func_getopt_posix="guessing no";;
16700 darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
16701 *) gl_cv_func_getopt_posix="guessing yes";;
16702 esac
16703
16704else
16705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16706/* end confdefs.h. */
16707
16708#include <unistd.h>
16709#include <stdlib.h>
16710#include <string.h>
16711
16712int
16713main ()
16714{
16715 {
16716 static char program[] = "program";
16717 static char a[] = "-a";
16718 static char foo[] = "foo";
16719 static char bar[] = "bar";
16720 char *argv[] = { program, a, foo, bar, NULL };
16721 int c;
16722
16723 optind = OPTIND_MIN;
16724 opterr = 0;
16725
16726 c = getopt (4, argv, "ab");
16727 if (!(c == 'a'))
16728 return 1;
16729 c = getopt (4, argv, "ab");
16730 if (!(c == -1))
16731 return 2;
16732 if (!(optind == 2))
16733 return 3;
16734 }
16735 /* Some internal state exists at this point. */
16736 {
16737 static char program[] = "program";
16738 static char donald[] = "donald";
16739 static char p[] = "-p";
16740 static char billy[] = "billy";
16741 static char duck[] = "duck";
16742 static char a[] = "-a";
16743 static char bar[] = "bar";
16744 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
16745 int c;
16746
16747 optind = OPTIND_MIN;
16748 opterr = 0;
16749
16750 c = getopt (7, argv, "+abp:q:");
16751 if (!(c == -1))
16752 return 4;
16753 if (!(strcmp (argv[0], "program") == 0))
16754 return 5;
16755 if (!(strcmp (argv[1], "donald") == 0))
16756 return 6;
16757 if (!(strcmp (argv[2], "-p") == 0))
16758 return 7;
16759 if (!(strcmp (argv[3], "billy") == 0))
16760 return 8;
16761 if (!(strcmp (argv[4], "duck") == 0))
16762 return 9;
16763 if (!(strcmp (argv[5], "-a") == 0))
16764 return 10;
16765 if (!(strcmp (argv[6], "bar") == 0))
16766 return 11;
16767 if (!(optind == 1))
16768 return 12;
16769 }
16770 /* Detect MacOS 10.5, AIX 7.1 bug. */
16771 {
16772 static char program[] = "program";
16773 static char ab[] = "-ab";
16774 char *argv[3] = { program, ab, NULL };
16775 optind = OPTIND_MIN;
16776 opterr = 0;
16777 if (getopt (2, argv, "ab:") != 'a')
16778 return 13;
16779 if (getopt (2, argv, "ab:") != '?')
16780 return 14;
16781 if (optopt != 'b')
16782 return 15;
16783 if (optind != 2)
16784 return 16;
16785 }
16786
16787 return 0;
16788}
16789
16790_ACEOF
16791if ac_fn_c_try_run "$LINENO"; then :
16792 gl_cv_func_getopt_posix=yes
16793else
16794 gl_cv_func_getopt_posix=no
16795fi
16796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16797 conftest.$ac_objext conftest.beam conftest.$ac_ext
16798fi
16799
16800 CPPFLAGS=$gl_save_CPPFLAGS
16801
16802fi
16803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
16804$as_echo "$gl_cv_func_getopt_posix" >&6; }
16805 case "$gl_cv_func_getopt_posix" in
16806 *no) gl_replace_getopt=yes ;;
16807 esac
16808 fi
16809
16810 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
16811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
16812$as_echo_n "checking for working GNU getopt function... " >&6; }
16813if test "${gl_cv_func_getopt_gnu+set}" = set; then :
16814 $as_echo_n "(cached) " >&6
16815else
16816 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
16817 # optstring is necessary for programs like m4 that have POSIX-mandated
16818 # semantics for supporting options interspersed with files.
16819 # Also, since getopt_long is a GNU extension, we require optind=0.
16820 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
16821 # so take care to revert to the correct (non-)export state.
16822 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
16823 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
16824 xx) gl_had_POSIXLY_CORRECT=exported ;;
16825 x) gl_had_POSIXLY_CORRECT=yes ;;
16826 *) gl_had_POSIXLY_CORRECT= ;;
16827 esac
16828 POSIXLY_CORRECT=1
16829 export POSIXLY_CORRECT
16830 if test "$cross_compiling" = yes; then :
16831 case $host_os:$ac_cv_have_decl_optreset in
16832 *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
16833 *:yes) gl_cv_func_getopt_gnu=no;;
16834 *) gl_cv_func_getopt_gnu=yes;;
16835 esac
16836
16837else
16838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16839/* end confdefs.h. */
16840#include <getopt.h>
16841 #include <stddef.h>
16842 #include <string.h>
16843
16844int
16845main ()
16846{
16847
16848 int result = 0;
16849 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
16850 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
16851 OSF/1 5.1, Solaris 10. */
16852 {
16853 static char conftest[] = "conftest";
16854 static char plus[] = "-+";
16855 char *argv[3] = { conftest, plus, NULL };
16856 opterr = 0;
16857 if (getopt (2, argv, "+a") != '?')
16858 result |= 1;
16859 }
16860 /* This code succeeds on glibc 2.8, mingw,
16861 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
16862 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
16863 {
16864 static char program[] = "program";
16865 static char p[] = "-p";
16866 static char foo[] = "foo";
16867 static char bar[] = "bar";
16868 char *argv[] = { program, p, foo, bar, NULL };
6ad6792b 16869
3e0be4ab
GM
16870 optind = 1;
16871 if (getopt (4, argv, "p::") != 'p')
16872 result |= 2;
16873 else if (optarg != NULL)
16874 result |= 4;
16875 else if (getopt (4, argv, "p::") != -1)
16876 result |= 6;
16877 else if (optind != 2)
16878 result |= 8;
16879 }
16880 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
16881 {
16882 static char program[] = "program";
16883 static char foo[] = "foo";
16884 static char p[] = "-p";
16885 char *argv[] = { program, foo, p, NULL };
16886 optind = 0;
16887 if (getopt (3, argv, "-p") != 1)
16888 result |= 16;
16889 else if (getopt (3, argv, "-p") != 'p')
16890 result |= 32;
16891 }
16892 /* This code fails on glibc 2.11. */
16893 {
16894 static char program[] = "program";
16895 static char b[] = "-b";
16896 static char a[] = "-a";
16897 char *argv[] = { program, b, a, NULL };
16898 optind = opterr = 0;
16899 if (getopt (3, argv, "+:a:b") != 'b')
16900 result |= 64;
16901 else if (getopt (3, argv, "+:a:b") != ':')
16902 result |= 64;
16903 }
16904 /* This code dumps core on glibc 2.14. */
16905 {
16906 static char program[] = "program";
16907 static char w[] = "-W";
16908 static char dummy[] = "dummy";
16909 char *argv[] = { program, w, dummy, NULL };
16910 optind = opterr = 1;
16911 if (getopt (3, argv, "W;") != 'W')
16912 result |= 128;
16913 }
16914 return result;
6ad6792b 16915
3e0be4ab
GM
16916 ;
16917 return 0;
16918}
16919_ACEOF
16920if ac_fn_c_try_run "$LINENO"; then :
16921 gl_cv_func_getopt_gnu=yes
16922else
16923 gl_cv_func_getopt_gnu=no
16924fi
16925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16926 conftest.$ac_objext conftest.beam conftest.$ac_ext
16927fi
e275c824 16928
3e0be4ab
GM
16929 case $gl_had_POSIXLY_CORRECT in
16930 exported) ;;
16931 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
16932 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
16933 esac
e275c824 16934
e275c824 16935fi
3e0be4ab
GM
16936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
16937$as_echo "$gl_cv_func_getopt_gnu" >&6; }
16938 if test "$gl_cv_func_getopt_gnu" = "no"; then
16939 gl_replace_getopt=yes
16940 fi
16941 fi
e275c824 16942
e275c824 16943
e275c824 16944
e275c824 16945
4fda9c95 16946
3e0be4ab 16947 REPLACE_GETOPT=0
5fa4ac76 16948
5fa4ac76 16949
3e0be4ab 16950 if test -n "$gl_replace_getopt"; then :
5fa4ac76 16951
3e0be4ab 16952 REPLACE_GETOPT=1
5fa4ac76 16953
3e0be4ab 16954fi
5fa4ac76 16955
5fa4ac76 16956
3e0be4ab 16957 if test $REPLACE_GETOPT = 1; then
5fa4ac76 16958
3e0be4ab 16959 GETOPT_H=getopt.h
5fa4ac76 16960
3e0be4ab 16961$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
5fa4ac76 16962
5fa4ac76
PE
16963
16964
3e0be4ab
GM
16965 GNULIB_UNISTD_H_GETOPT=1
16966 fi
5fa4ac76 16967
3e0be4ab
GM
16968ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
16969if test "x$ac_cv_have_decl_getenv" = x""yes; then :
16970 ac_have_decl=1
e275c824 16971else
3e0be4ab 16972 ac_have_decl=0
1f5d53eb 16973fi
1f5d53eb 16974
3e0be4ab
GM
16975cat >>confdefs.h <<_ACEOF
16976#define HAVE_DECL_GETENV $ac_have_decl
1f5d53eb 16977_ACEOF
1f5d53eb
PE
16978
16979
3e0be4ab
GM
16980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
16981$as_echo_n "checking for unsigned long long int... " >&6; }
16982if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
1f5d53eb 16983 $as_echo_n "(cached) " >&6
e275c824 16984else
3e0be4ab
GM
16985 ac_cv_type_unsigned_long_long_int=yes
16986 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
16987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d6974efa 16988/* end confdefs.h. */
1f5d53eb 16989
3e0be4ab
GM
16990 /* For now, do not test the preprocessor; as of 2007 there are too many
16991 implementations with broken preprocessors. Perhaps this can
16992 be revisited in 2012. In the meantime, code should not expect
16993 #if to work with literals wider than 32 bits. */
16994 /* Test literals. */
16995 long long int ll = 9223372036854775807ll;
16996 long long int nll = -9223372036854775807LL;
16997 unsigned long long int ull = 18446744073709551615ULL;
16998 /* Test constant expressions. */
16999 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17000 ? 1 : -1)];
17001 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17002 ? 1 : -1)];
17003 int i = 63;
d6974efa
PE
17004int
17005main ()
17006{
3e0be4ab
GM
17007/* Test availability of runtime routines for shift and division. */
17008 long long int llmax = 9223372036854775807ll;
17009 unsigned long long int ullmax = 18446744073709551615ull;
17010 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17011 | (llmax / ll) | (llmax % ll)
17012 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17013 | (ullmax / ull) | (ullmax % ull));
d6974efa
PE
17014 ;
17015 return 0;
17016}
3e0be4ab 17017
d6974efa 17018_ACEOF
3e0be4ab
GM
17019if ac_fn_c_try_link "$LINENO"; then :
17020
e275c824 17021else
3e0be4ab 17022 ac_cv_type_unsigned_long_long_int=no
e275c824 17023fi
3e0be4ab
GM
17024rm -f core conftest.err conftest.$ac_objext \
17025 conftest$ac_exeext conftest.$ac_ext
17026 fi
e275c824 17027fi
3e0be4ab
GM
17028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17029$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
17030 if test $ac_cv_type_unsigned_long_long_int = yes; then
e275c824 17031
3e0be4ab 17032$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
e275c824 17033
3e0be4ab
GM
17034 fi
17035
17036
17037
17038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
17039$as_echo_n "checking for long long int... " >&6; }
17040if test "${ac_cv_type_long_long_int+set}" = set; then :
e275c824 17041 $as_echo_n "(cached) " >&6
3e0be4ab
GM
17042else
17043 ac_cv_type_long_long_int=yes
17044 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
17045 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
17046 if test $ac_cv_type_long_long_int = yes; then
17047 if test "$cross_compiling" = yes; then :
17048 :
e275c824
PE
17049else
17050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17051/* end confdefs.h. */
3e0be4ab
GM
17052#include <limits.h>
17053 #ifndef LLONG_MAX
17054 # define HALF \
17055 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17056 # define LLONG_MAX (HALF - 1 + HALF)
17057 #endif
e275c824
PE
17058int
17059main ()
17060{
3e0be4ab
GM
17061long long int n = 1;
17062 int i;
17063 for (i = 0; ; i++)
17064 {
17065 long long int m = n << i;
17066 if (m >> i != n)
17067 return 1;
17068 if (LLONG_MAX / 2 < m)
17069 break;
17070 }
17071 return 0;
e275c824
PE
17072 ;
17073 return 0;
17074}
17075_ACEOF
3e0be4ab
GM
17076if ac_fn_c_try_run "$LINENO"; then :
17077
e275c824 17078else
3e0be4ab 17079 ac_cv_type_long_long_int=no
e275c824 17080fi
3e0be4ab
GM
17081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17082 conftest.$ac_objext conftest.beam conftest.$ac_ext
e275c824 17083fi
e275c824 17084
3e0be4ab
GM
17085 fi
17086 fi
17087fi
17088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17089$as_echo "$ac_cv_type_long_long_int" >&6; }
17090 if test $ac_cv_type_long_long_int = yes; then
e275c824 17091
3e0be4ab 17092$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
e275c824 17093
3e0be4ab 17094 fi
e275c824
PE
17095
17096
17097
17098
e275c824
PE
17099
17100
3e0be4ab
GM
17101 gl_cv_c_multiarch=no
17102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 17103/* end confdefs.h. */
3e0be4ab
GM
17104#ifndef __APPLE_CC__
17105 not a universal capable compiler
17106 #endif
17107 typedef int dummy;
e275c824 17108
1f5d53eb 17109_ACEOF
3e0be4ab 17110if ac_fn_c_try_compile "$LINENO"; then :
e275c824 17111
3e0be4ab
GM
17112 arch=
17113 prev=
17114 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
17115 if test -n "$prev"; then
17116 case $word in
17117 i?86 | x86_64 | ppc | ppc64)
17118 if test -z "$arch" || test "$arch" = "$word"; then
17119 arch="$word"
17120 else
17121 gl_cv_c_multiarch=yes
17122 fi
17123 ;;
17124 esac
17125 prev=
17126 else
17127 if test "x$word" = "x-arch"; then
17128 prev=arch
17129 fi
17130 fi
17131 done
e275c824 17132
1f5d53eb 17133fi
3e0be4ab
GM
17134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17135 if test $gl_cv_c_multiarch = yes; then
17136 APPLE_UNIVERSAL_BUILD=1
17137 else
17138 APPLE_UNIVERSAL_BUILD=0
17139 fi
e275c824
PE
17140
17141
17142
17143
e275c824 17144
3e0be4ab
GM
17145 if test $ac_cv_type_long_long_int = yes; then
17146 HAVE_LONG_LONG_INT=1
17147 else
17148 HAVE_LONG_LONG_INT=0
17149 fi
e275c824
PE
17150
17151
3e0be4ab
GM
17152 if test $ac_cv_type_unsigned_long_long_int = yes; then
17153 HAVE_UNSIGNED_LONG_LONG_INT=1
17154 else
17155 HAVE_UNSIGNED_LONG_LONG_INT=0
17156 fi
e275c824
PE
17157
17158
17159
3e0be4ab
GM
17160 if test $ac_cv_header_wchar_h = yes; then
17161 HAVE_WCHAR_H=1
17162 else
17163 HAVE_WCHAR_H=0
17164 fi
e275c824
PE
17165
17166
3e0be4ab
GM
17167 if test $ac_cv_header_inttypes_h = yes; then
17168 HAVE_INTTYPES_H=1
17169 else
17170 HAVE_INTTYPES_H=0
17171 fi
67342916 17172
67342916 17173
3e0be4ab
GM
17174 if test $ac_cv_header_sys_types_h = yes; then
17175 HAVE_SYS_TYPES_H=1
17176 else
17177 HAVE_SYS_TYPES_H=0
17178 fi
67342916 17179
e275c824 17180
e275c824
PE
17181
17182
17183
17184
e275c824 17185
e275c824 17186
6c051bab 17187
942f733f 17188
4fc2b746 17189
3e0be4ab
GM
17190 if test $gl_cv_have_include_next = yes; then
17191 gl_cv_next_stdint_h='<'stdint.h'>'
17192 else
17193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
17194$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
17195if test "${gl_cv_next_stdint_h+set}" = set; then :
4fc2b746
GM
17196 $as_echo_n "(cached) " >&6
17197else
17198
3e0be4ab 17199 if test $ac_cv_header_stdint_h = yes; then
4fc2b746
GM
17200
17201
3e0be4ab
GM
17202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17203/* end confdefs.h. */
17204#include <stdint.h>
4fc2b746 17205
3e0be4ab
GM
17206_ACEOF
17207 case "$host_os" in
17208 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17209 *) gl_absname_cpp="$ac_cpp" ;;
17210 esac
17211 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17212 sed -n '\#/stdint.h#{
17213 s#.*"\(.*/stdint.h\)".*#\1#
17214 s#^/[^/]#//&#
17215 p
17216 q
17217 }'`'"'
17218 else
17219 gl_cv_next_stdint_h='<'stdint.h'>'
17220 fi
4fc2b746 17221
4fc2b746 17222
4fc2b746 17223fi
3e0be4ab
GM
17224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
17225$as_echo "$gl_cv_next_stdint_h" >&6; }
17226 fi
17227 NEXT_STDINT_H=$gl_cv_next_stdint_h
4fc2b746 17228
3e0be4ab
GM
17229 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17230 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17231 gl_next_as_first_directive='<'stdint.h'>'
17232 else
17233 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17234 gl_next_as_first_directive=$gl_cv_next_stdint_h
17235 fi
17236 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
4fc2b746
GM
17237
17238
17239
942f733f 17240
3e0be4ab
GM
17241 if test $ac_cv_header_stdint_h = yes; then
17242 HAVE_STDINT_H=1
17243 else
17244 HAVE_STDINT_H=0
17245 fi
e275c824 17246
5fa4ac76 17247
3e0be4ab
GM
17248 if test $ac_cv_header_stdint_h = yes; then
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
17250$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
17251if test "${gl_cv_header_working_stdint_h+set}" = set; then :
17252 $as_echo_n "(cached) " >&6
17253else
17254 gl_cv_header_working_stdint_h=no
17255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17256/* end confdefs.h. */
5fa4ac76 17257
40e27e7f 17258
3e0be4ab
GM
17259#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
17260#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
17261#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17262#include <stdint.h>
17263/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
17264#if !(defined WCHAR_MIN && defined WCHAR_MAX)
17265#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
17266#endif
40e27e7f
GM
17267
17268
3e0be4ab
GM
17269 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17270 included before <wchar.h>. */
17271 #include <stddef.h>
17272 #include <signal.h>
17273 #if HAVE_WCHAR_H
17274 # include <stdio.h>
17275 # include <time.h>
17276 # include <wchar.h>
17277 #endif
40e27e7f
GM
17278
17279
3e0be4ab
GM
17280#ifdef INT8_MAX
17281int8_t a1 = INT8_MAX;
17282int8_t a1min = INT8_MIN;
17283#endif
17284#ifdef INT16_MAX
17285int16_t a2 = INT16_MAX;
17286int16_t a2min = INT16_MIN;
17287#endif
17288#ifdef INT32_MAX
17289int32_t a3 = INT32_MAX;
17290int32_t a3min = INT32_MIN;
17291#endif
17292#ifdef INT64_MAX
17293int64_t a4 = INT64_MAX;
17294int64_t a4min = INT64_MIN;
17295#endif
17296#ifdef UINT8_MAX
17297uint8_t b1 = UINT8_MAX;
17298#else
17299typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
17300#endif
17301#ifdef UINT16_MAX
17302uint16_t b2 = UINT16_MAX;
17303#endif
17304#ifdef UINT32_MAX
17305uint32_t b3 = UINT32_MAX;
17306#endif
17307#ifdef UINT64_MAX
17308uint64_t b4 = UINT64_MAX;
17309#endif
17310int_least8_t c1 = INT8_C (0x7f);
17311int_least8_t c1max = INT_LEAST8_MAX;
17312int_least8_t c1min = INT_LEAST8_MIN;
17313int_least16_t c2 = INT16_C (0x7fff);
17314int_least16_t c2max = INT_LEAST16_MAX;
17315int_least16_t c2min = INT_LEAST16_MIN;
17316int_least32_t c3 = INT32_C (0x7fffffff);
17317int_least32_t c3max = INT_LEAST32_MAX;
17318int_least32_t c3min = INT_LEAST32_MIN;
17319int_least64_t c4 = INT64_C (0x7fffffffffffffff);
17320int_least64_t c4max = INT_LEAST64_MAX;
17321int_least64_t c4min = INT_LEAST64_MIN;
17322uint_least8_t d1 = UINT8_C (0xff);
17323uint_least8_t d1max = UINT_LEAST8_MAX;
17324uint_least16_t d2 = UINT16_C (0xffff);
17325uint_least16_t d2max = UINT_LEAST16_MAX;
17326uint_least32_t d3 = UINT32_C (0xffffffff);
17327uint_least32_t d3max = UINT_LEAST32_MAX;
17328uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
17329uint_least64_t d4max = UINT_LEAST64_MAX;
17330int_fast8_t e1 = INT_FAST8_MAX;
17331int_fast8_t e1min = INT_FAST8_MIN;
17332int_fast16_t e2 = INT_FAST16_MAX;
17333int_fast16_t e2min = INT_FAST16_MIN;
17334int_fast32_t e3 = INT_FAST32_MAX;
17335int_fast32_t e3min = INT_FAST32_MIN;
17336int_fast64_t e4 = INT_FAST64_MAX;
17337int_fast64_t e4min = INT_FAST64_MIN;
17338uint_fast8_t f1 = UINT_FAST8_MAX;
17339uint_fast16_t f2 = UINT_FAST16_MAX;
17340uint_fast32_t f3 = UINT_FAST32_MAX;
17341uint_fast64_t f4 = UINT_FAST64_MAX;
17342#ifdef INTPTR_MAX
17343intptr_t g = INTPTR_MAX;
17344intptr_t gmin = INTPTR_MIN;
17345#endif
17346#ifdef UINTPTR_MAX
17347uintptr_t h = UINTPTR_MAX;
17348#endif
17349intmax_t i = INTMAX_MAX;
17350uintmax_t j = UINTMAX_MAX;
40e27e7f 17351
3e0be4ab
GM
17352#include <limits.h> /* for CHAR_BIT */
17353#define TYPE_MINIMUM(t) \
17354 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
17355#define TYPE_MAXIMUM(t) \
17356 ((t) ((t) 0 < (t) -1 \
17357 ? (t) -1 \
17358 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
17359struct s {
17360 int check_PTRDIFF:
17361 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
17362 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
17363 ? 1 : -1;
17364 /* Detect bug in FreeBSD 6.0 / ia64. */
17365 int check_SIG_ATOMIC:
17366 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
17367 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
17368 ? 1 : -1;
17369 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
17370 int check_WCHAR:
17371 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
17372 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
17373 ? 1 : -1;
17374 /* Detect bug in mingw. */
17375 int check_WINT:
17376 WINT_MIN == TYPE_MINIMUM (wint_t)
17377 && WINT_MAX == TYPE_MAXIMUM (wint_t)
17378 ? 1 : -1;
40e27e7f 17379
3e0be4ab
GM
17380 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
17381 int check_UINT8_C:
17382 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
17383 int check_UINT16_C:
17384 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
40e27e7f 17385
3e0be4ab
GM
17386 /* Detect bugs in OpenBSD 3.9 stdint.h. */
17387#ifdef UINT8_MAX
17388 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
17389#endif
17390#ifdef UINT16_MAX
17391 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
17392#endif
17393#ifdef UINT32_MAX
17394 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
17395#endif
17396#ifdef UINT64_MAX
17397 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
17398#endif
17399 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
17400 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
17401 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
17402 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
17403 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
17404 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
17405 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
17406 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
17407 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
17408 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
17409 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
17410};
d87ffdb7 17411
3e0be4ab
GM
17412int
17413main ()
17414{
d87ffdb7 17415
3e0be4ab
GM
17416 ;
17417 return 0;
17418}
17419_ACEOF
17420if ac_fn_c_try_compile "$LINENO"; then :
17421 if test "$cross_compiling" = yes; then :
17422 gl_cv_header_working_stdint_h=yes
d87ffdb7 17423
3e0be4ab
GM
17424else
17425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17426/* end confdefs.h. */
d87ffdb7
GM
17427
17428
3e0be4ab
GM
17429#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
17430#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
17431#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
17432#include <stdint.h>
d87ffdb7
GM
17433
17434
3e0be4ab
GM
17435 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17436 included before <wchar.h>. */
17437 #include <stddef.h>
17438 #include <signal.h>
17439 #if HAVE_WCHAR_H
17440 # include <stdio.h>
17441 # include <time.h>
17442 # include <wchar.h>
17443 #endif
7d2a1c5e
GM
17444
17445
3e0be4ab
GM
17446#include <stdio.h>
17447#include <string.h>
17448#define MVAL(macro) MVAL1(macro)
17449#define MVAL1(expression) #expression
17450static const char *macro_values[] =
17451 {
17452#ifdef INT8_MAX
17453 MVAL (INT8_MAX),
17454#endif
17455#ifdef INT16_MAX
17456 MVAL (INT16_MAX),
17457#endif
17458#ifdef INT32_MAX
17459 MVAL (INT32_MAX),
17460#endif
17461#ifdef INT64_MAX
17462 MVAL (INT64_MAX),
17463#endif
17464#ifdef UINT8_MAX
17465 MVAL (UINT8_MAX),
17466#endif
17467#ifdef UINT16_MAX
17468 MVAL (UINT16_MAX),
17469#endif
17470#ifdef UINT32_MAX
17471 MVAL (UINT32_MAX),
17472#endif
17473#ifdef UINT64_MAX
17474 MVAL (UINT64_MAX),
17475#endif
17476 NULL
17477 };
7d2a1c5e 17478
7d2a1c5e
GM
17479int
17480main ()
17481{
3e0be4ab
GM
17482
17483 const char **mv;
17484 for (mv = macro_values; *mv != NULL; mv++)
17485 {
17486 const char *value = *mv;
17487 /* Test whether it looks like a cast expression. */
17488 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
17489 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
17490 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
17491 || strncmp (value, "((int)"/*)*/, 6) == 0
17492 || strncmp (value, "((signed short)"/*)*/, 15) == 0
17493 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
17494 return mv - macro_values + 1;
17495 }
17496 return 0;
7d2a1c5e
GM
17497
17498 ;
17499 return 0;
17500}
7d2a1c5e
GM
17501_ACEOF
17502if ac_fn_c_try_run "$LINENO"; then :
3e0be4ab 17503 gl_cv_header_working_stdint_h=yes
7d2a1c5e
GM
17504fi
17505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17506 conftest.$ac_objext conftest.beam conftest.$ac_ext
17507fi
17508
17509
17510fi
3e0be4ab 17511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7d2a1c5e 17512
3e0be4ab
GM
17513fi
17514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
17515$as_echo "$gl_cv_header_working_stdint_h" >&6; }
7d2a1c5e 17516 fi
3e0be4ab
GM
17517 if test "$gl_cv_header_working_stdint_h" = yes; then
17518 STDINT_H=
17519 else
17520 for ac_header in sys/inttypes.h sys/bitypes.h
17521do :
17522 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17523ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17524eval as_val=\$$as_ac_Header
17525 if test "x$as_val" = x""yes; then :
17526 cat >>confdefs.h <<_ACEOF
17527#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17528_ACEOF
7d2a1c5e 17529
3e0be4ab 17530fi
7d2a1c5e 17531
3e0be4ab 17532done
7d2a1c5e 17533
3e0be4ab
GM
17534 if test $ac_cv_header_sys_inttypes_h = yes; then
17535 HAVE_SYS_INTTYPES_H=1
17536 else
17537 HAVE_SYS_INTTYPES_H=0
7d2a1c5e 17538 fi
7d2a1c5e 17539
3e0be4ab
GM
17540 if test $ac_cv_header_sys_bitypes_h = yes; then
17541 HAVE_SYS_BITYPES_H=1
17542 else
17543 HAVE_SYS_BITYPES_H=0
17544 fi
7d2a1c5e
GM
17545
17546
17547
17548
3e0be4ab 17549 if test $APPLE_UNIVERSAL_BUILD = 0; then
7d2a1c5e
GM
17550
17551
3e0be4ab
GM
17552 for gltype in ptrdiff_t size_t ; do
17553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17554$as_echo_n "checking for bit size of $gltype... " >&6; }
17555if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
17556 $as_echo_n "(cached) " >&6
17557else
17558 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17559 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17560 included before <wchar.h>. */
17561 #include <stddef.h>
17562 #include <signal.h>
17563 #if HAVE_WCHAR_H
17564 # include <stdio.h>
17565 # include <time.h>
17566 # include <wchar.h>
17567 #endif
7d2a1c5e 17568
3e0be4ab 17569#include <limits.h>"; then :
7d2a1c5e 17570
3e0be4ab
GM
17571else
17572 result=unknown
17573fi
7d2a1c5e 17574
3e0be4ab 17575 eval gl_cv_bitsizeof_${gltype}=\$result
d87ffdb7 17576
3e0be4ab
GM
17577fi
17578eval ac_res=\$gl_cv_bitsizeof_${gltype}
17579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17580$as_echo "$ac_res" >&6; }
17581 eval result=\$gl_cv_bitsizeof_${gltype}
17582 if test $result = unknown; then
17583 result=0
17584 fi
17585 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17586 cat >>confdefs.h <<_ACEOF
17587#define BITSIZEOF_${GLTYPE} $result
17588_ACEOF
e275c824 17589
3e0be4ab
GM
17590 eval BITSIZEOF_${GLTYPE}=\$result
17591 done
e275c824 17592
e275c824 17593
3e0be4ab 17594 fi
e275c824 17595
1f5d53eb 17596
3e0be4ab
GM
17597 for gltype in sig_atomic_t wchar_t wint_t ; do
17598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17599$as_echo_n "checking for bit size of $gltype... " >&6; }
17600if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
16c3e636
PE
17601 $as_echo_n "(cached) " >&6
17602else
3e0be4ab
GM
17603 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
17604 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17605 included before <wchar.h>. */
17606 #include <stddef.h>
17607 #include <signal.h>
17608 #if HAVE_WCHAR_H
17609 # include <stdio.h>
17610 # include <time.h>
17611 # include <wchar.h>
17612 #endif
17613
17614#include <limits.h>"; then :
16c3e636 17615
1f5d53eb 17616else
3e0be4ab 17617 result=unknown
1f5d53eb
PE
17618fi
17619
3e0be4ab 17620 eval gl_cv_bitsizeof_${gltype}=\$result
16c3e636 17621
16c3e636 17622fi
3e0be4ab
GM
17623eval ac_res=\$gl_cv_bitsizeof_${gltype}
17624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17625$as_echo "$ac_res" >&6; }
17626 eval result=\$gl_cv_bitsizeof_${gltype}
17627 if test $result = unknown; then
17628 result=0
17629 fi
17630 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17631 cat >>confdefs.h <<_ACEOF
17632#define BITSIZEOF_${GLTYPE} $result
17633_ACEOF
16c3e636 17634
3e0be4ab
GM
17635 eval BITSIZEOF_${GLTYPE}=\$result
17636 done
1f5d53eb 17637
16c3e636
PE
17638
17639
3e0be4ab
GM
17640
17641 for gltype in sig_atomic_t wchar_t wint_t ; do
17642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17643$as_echo_n "checking whether $gltype is signed... " >&6; }
17644if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
17645 $as_echo_n "(cached) " >&6
17646else
3e0be4ab 17647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 17648/* end confdefs.h. */
1f5d53eb 17649
3e0be4ab
GM
17650 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17651 included before <wchar.h>. */
17652 #include <stddef.h>
17653 #include <signal.h>
17654 #if HAVE_WCHAR_H
17655 # include <stdio.h>
17656 # include <time.h>
17657 # include <wchar.h>
17658 #endif
17659
17660 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
1fd182f0
PE
17661int
17662main ()
17663{
3e0be4ab 17664
1fd182f0
PE
17665 ;
17666 return 0;
17667}
17668_ACEOF
3e0be4ab
GM
17669if ac_fn_c_try_compile "$LINENO"; then :
17670 result=yes
1f5d53eb 17671else
3e0be4ab 17672 result=no
1f5d53eb 17673fi
3e0be4ab
GM
17674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17675 eval gl_cv_type_${gltype}_signed=\$result
17676
1fd182f0 17677fi
3e0be4ab
GM
17678eval ac_res=\$gl_cv_type_${gltype}_signed
17679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17680$as_echo "$ac_res" >&6; }
17681 eval result=\$gl_cv_type_${gltype}_signed
17682 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17683 if test "$result" = yes; then
17684 cat >>confdefs.h <<_ACEOF
17685#define HAVE_SIGNED_${GLTYPE} 1
17686_ACEOF
1fd182f0 17687
3e0be4ab
GM
17688 eval HAVE_SIGNED_${GLTYPE}=1
17689 else
17690 eval HAVE_SIGNED_${GLTYPE}=0
17691 fi
17692 done
1fd182f0 17693
1f5d53eb 17694
3e0be4ab
GM
17695 gl_cv_type_ptrdiff_t_signed=yes
17696 gl_cv_type_size_t_signed=no
17697 if test $APPLE_UNIVERSAL_BUILD = 0; then
17698
17699
17700 for gltype in ptrdiff_t size_t ; do
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17702$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
17703if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
17704 $as_echo_n "(cached) " >&6
17705else
3e0be4ab
GM
17706 eval gl_cv_type_${gltype}_suffix=no
17707 eval result=\$gl_cv_type_${gltype}_signed
17708 if test "$result" = yes; then
17709 glsufu=
17710 else
17711 glsufu=u
17712 fi
17713 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17714 case $glsuf in
17715 '') gltype1='int';;
17716 l) gltype1='long int';;
17717 ll) gltype1='long long int';;
17718 i64) gltype1='__int64';;
17719 u) gltype1='unsigned int';;
17720 ul) gltype1='unsigned long int';;
17721 ull) gltype1='unsigned long long int';;
17722 ui64)gltype1='unsigned __int64';;
17723 esac
17724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 17725/* end confdefs.h. */
1fd182f0 17726
3e0be4ab
GM
17727 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17728 included before <wchar.h>. */
17729 #include <stddef.h>
17730 #include <signal.h>
17731 #if HAVE_WCHAR_H
17732 # include <stdio.h>
17733 # include <time.h>
17734 # include <wchar.h>
17735 #endif
17736
17737 extern $gltype foo;
17738 extern $gltype1 foo;
1fd182f0
PE
17739int
17740main ()
17741{
3e0be4ab 17742
1fd182f0
PE
17743 ;
17744 return 0;
17745}
17746_ACEOF
3e0be4ab
GM
17747if ac_fn_c_try_compile "$LINENO"; then :
17748 eval gl_cv_type_${gltype}_suffix=\$glsuf
1fd182f0 17749fi
3e0be4ab
GM
17750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17751 eval result=\$gl_cv_type_${gltype}_suffix
17752 test "$result" != no && break
17753 done
1fd182f0 17754fi
3e0be4ab
GM
17755eval ac_res=\$gl_cv_type_${gltype}_suffix
17756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17757$as_echo "$ac_res" >&6; }
17758 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17759 eval result=\$gl_cv_type_${gltype}_suffix
17760 test "$result" = no && result=
17761 eval ${GLTYPE}_SUFFIX=\$result
17762 cat >>confdefs.h <<_ACEOF
17763#define ${GLTYPE}_SUFFIX $result
1f5d53eb 17764_ACEOF
1fd182f0 17765
3e0be4ab 17766 done
1f5d53eb 17767
1f5d53eb 17768
3e0be4ab 17769 fi
1f5d53eb 17770
3e0be4ab
GM
17771
17772 for gltype in sig_atomic_t wchar_t wint_t ; do
17773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17774$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
17775if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
1fd182f0
PE
17776 $as_echo_n "(cached) " >&6
17777else
3e0be4ab
GM
17778 eval gl_cv_type_${gltype}_suffix=no
17779 eval result=\$gl_cv_type_${gltype}_signed
17780 if test "$result" = yes; then
17781 glsufu=
17782 else
17783 glsufu=u
17784 fi
17785 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
17786 case $glsuf in
17787 '') gltype1='int';;
17788 l) gltype1='long int';;
17789 ll) gltype1='long long int';;
17790 i64) gltype1='__int64';;
17791 u) gltype1='unsigned int';;
17792 ul) gltype1='unsigned long int';;
17793 ull) gltype1='unsigned long long int';;
17794 ui64)gltype1='unsigned __int64';;
17795 esac
17796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1fd182f0 17797/* end confdefs.h. */
1fd182f0 17798
3e0be4ab
GM
17799 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
17800 included before <wchar.h>. */
17801 #include <stddef.h>
17802 #include <signal.h>
17803 #if HAVE_WCHAR_H
17804 # include <stdio.h>
17805 # include <time.h>
17806 # include <wchar.h>
17807 #endif
17808
17809 extern $gltype foo;
17810 extern $gltype1 foo;
1fd182f0
PE
17811int
17812main ()
17813{
3e0be4ab 17814
1fd182f0
PE
17815 ;
17816 return 0;
17817}
17818_ACEOF
3e0be4ab
GM
17819if ac_fn_c_try_compile "$LINENO"; then :
17820 eval gl_cv_type_${gltype}_suffix=\$glsuf
1fd182f0 17821fi
3e0be4ab
GM
17822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17823 eval result=\$gl_cv_type_${gltype}_suffix
17824 test "$result" != no && break
17825 done
1fd182f0 17826fi
3e0be4ab
GM
17827eval ac_res=\$gl_cv_type_${gltype}_suffix
17828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17829$as_echo "$ac_res" >&6; }
17830 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
17831 eval result=\$gl_cv_type_${gltype}_suffix
17832 test "$result" = no && result=
17833 eval ${GLTYPE}_SUFFIX=\$result
17834 cat >>confdefs.h <<_ACEOF
17835#define ${GLTYPE}_SUFFIX $result
1f5d53eb
PE
17836_ACEOF
17837
3e0be4ab
GM
17838 done
17839
17840
17841
17842 STDINT_H=stdint.h
17843 fi
17844
17845 if test -n "$STDINT_H"; then
17846 GL_GENERATE_STDINT_H_TRUE=
17847 GL_GENERATE_STDINT_H_FALSE='#'
17848else
17849 GL_GENERATE_STDINT_H_TRUE='#'
17850 GL_GENERATE_STDINT_H_FALSE=
17851fi
17852
17853
17854
17855
17856
17857 GNULIB_IMAXABS=0;
17858 GNULIB_IMAXDIV=0;
17859 GNULIB_STRTOIMAX=0;
17860 GNULIB_STRTOUMAX=0;
17861 HAVE_DECL_IMAXABS=1;
17862 HAVE_DECL_IMAXDIV=1;
17863 HAVE_DECL_STRTOIMAX=1;
17864 HAVE_DECL_STRTOUMAX=1;
17865 INT32_MAX_LT_INTMAX_MAX=1;
17866 INT64_MAX_EQ_LONG_MAX='defined _LP64';
17867 PRI_MACROS_BROKEN=0;
17868 PRIPTR_PREFIX=__PRIPTR_PREFIX;
17869 UINT32_MAX_LT_UINTMAX_MAX=1;
17870 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
17871
1f5d53eb 17872
1f5d53eb 17873
1f5d53eb 17874
1f5d53eb 17875
1f5d53eb 17876
1fd182f0 17877
1fd182f0
PE
17878
17879
17880
17881
17882
34119902
GM
17883
17884
3e0be4ab
GM
17885
17886 if test $gl_cv_have_include_next = yes; then
17887 gl_cv_next_inttypes_h='<'inttypes.h'>'
17888 else
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
17890$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
17891if test "${gl_cv_next_inttypes_h+set}" = set; then :
17892 $as_echo_n "(cached) " >&6
34119902 17893else
34119902 17894
3e0be4ab
GM
17895 if test $ac_cv_header_inttypes_h = yes; then
17896
17897
17898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17899/* end confdefs.h. */
17900#include <inttypes.h>
34119902 17901
34119902 17902_ACEOF
3e0be4ab
GM
17903 case "$host_os" in
17904 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17905 *) gl_absname_cpp="$ac_cpp" ;;
17906 esac
17907 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17908 sed -n '\#/inttypes.h#{
17909 s#.*"\(.*/inttypes.h\)".*#\1#
17910 s#^/[^/]#//&#
17911 p
17912 q
17913 }'`'"'
17914 else
17915 gl_cv_next_inttypes_h='<'inttypes.h'>'
17916 fi
17917
34119902
GM
17918
17919fi
3e0be4ab
GM
17920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
17921$as_echo "$gl_cv_next_inttypes_h" >&6; }
17922 fi
17923 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
34119902 17924
3e0be4ab
GM
17925 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17926 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17927 gl_next_as_first_directive='<'inttypes.h'>'
17928 else
17929 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17930 gl_next_as_first_directive=$gl_cv_next_inttypes_h
17931 fi
17932 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
34119902 17933
34119902 17934
34119902
GM
17935
17936
34119902
GM
17937
17938
17939
17940
3e0be4ab 17941$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
34119902
GM
17942
17943
17944
17945
34119902
GM
17946
17947
3e0be4ab
GM
17948 GNULIB_FCHMODAT=0;
17949 GNULIB_FSTATAT=0;
17950 GNULIB_FUTIMENS=0;
17951 GNULIB_LCHMOD=0;
17952 GNULIB_LSTAT=0;
17953 GNULIB_MKDIRAT=0;
17954 GNULIB_MKFIFO=0;
17955 GNULIB_MKFIFOAT=0;
17956 GNULIB_MKNOD=0;
17957 GNULIB_MKNODAT=0;
17958 GNULIB_STAT=0;
17959 GNULIB_UTIMENSAT=0;
17960 HAVE_FCHMODAT=1;
17961 HAVE_FSTATAT=1;
17962 HAVE_FUTIMENS=1;
17963 HAVE_LCHMOD=1;
17964 HAVE_LSTAT=1;
17965 HAVE_MKDIRAT=1;
17966 HAVE_MKFIFO=1;
17967 HAVE_MKFIFOAT=1;
17968 HAVE_MKNOD=1;
17969 HAVE_MKNODAT=1;
17970 HAVE_UTIMENSAT=1;
17971 REPLACE_FSTAT=0;
17972 REPLACE_FSTATAT=0;
17973 REPLACE_FUTIMENS=0;
17974 REPLACE_LSTAT=0;
17975 REPLACE_MKDIR=0;
17976 REPLACE_MKFIFO=0;
17977 REPLACE_MKNOD=0;
17978 REPLACE_STAT=0;
17979 REPLACE_UTIMENSAT=0;
34119902 17980
3e0be4ab
GM
17981
17982
17983
17984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
17985$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
17986if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
17987 $as_echo_n "(cached) " >&6
17988else
17989 rm -f conftest.sym conftest.file
17990 echo >conftest.file
17991 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
17992 if test "$cross_compiling" = yes; then :
17993 # When cross-compiling, be pessimistic so we will end up using the
17994 # replacement version of lstat that checks for trailing slashes and
17995 # calls lstat a second time when necessary.
17996 gl_cv_func_lstat_dereferences_slashed_symlink=no
17997
17998else
17999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18000/* end confdefs.h. */
18001$ac_includes_default
18002int
18003main ()
18004{
18005struct stat sbuf;
18006 /* Linux will dereference the symlink and fail, as required by
18007 POSIX. That is better in the sense that it means we will not
18008 have to compile and use the lstat wrapper. */
18009 return lstat ("conftest.sym/", &sbuf) == 0;
18010
18011 ;
18012 return 0;
18013}
34119902 18014_ACEOF
3e0be4ab
GM
18015if ac_fn_c_try_run "$LINENO"; then :
18016 gl_cv_func_lstat_dereferences_slashed_symlink=yes
18017else
18018 gl_cv_func_lstat_dereferences_slashed_symlink=no
34119902 18019fi
3e0be4ab
GM
18020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18021 conftest.$ac_objext conftest.beam conftest.$ac_ext
18022fi
18023
18024 else
18025 # If the 'ln -s' command failed, then we probably don't even
18026 # have an lstat function.
18027 gl_cv_func_lstat_dereferences_slashed_symlink=no
18028 fi
18029 rm -f conftest.sym conftest.file
34119902 18030
1f5d53eb 18031fi
3e0be4ab
GM
18032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
18033$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
18034 test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
18035
18036cat >>confdefs.h <<_ACEOF
18037#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
18038_ACEOF
18039
18040
18041
18042 GNULIB_MKTIME=0;
18043 GNULIB_NANOSLEEP=0;
18044 GNULIB_STRPTIME=0;
18045 GNULIB_TIMEGM=0;
18046 GNULIB_TIME_R=0;
18047 HAVE_DECL_LOCALTIME_R=1;
18048 HAVE_NANOSLEEP=1;
18049 HAVE_STRPTIME=1;
18050 HAVE_TIMEGM=1;
18051 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
18052 REPLACE_MKTIME=GNULIB_PORTCHECK;
18053 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
18054 REPLACE_TIMEGM=GNULIB_PORTCHECK;
18055
18056
18057
1fd182f0
PE
18058
18059
18060
3e0be4ab
GM
18061 GNULIB_PTHREAD_SIGMASK=0;
18062 GNULIB_SIGNAL_H_SIGPIPE=0;
18063 GNULIB_SIGPROCMASK=0;
18064 GNULIB_SIGACTION=0;
18065 HAVE_POSIX_SIGNALBLOCKING=1;
18066 HAVE_PTHREAD_SIGMASK=1;
18067 HAVE_SIGSET_T=1;
18068 HAVE_SIGINFO_T=1;
18069 HAVE_SIGACTION=1;
18070 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
1fd182f0 18071
3e0be4ab 18072 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
1fd182f0 18073
3e0be4ab
GM
18074 HAVE_SIGHANDLER_T=1;
18075 REPLACE_PTHREAD_SIGMASK=0;
1fd182f0
PE
18076
18077
18078
b06b1098 18079
3e0be4ab
GM
18080 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
18081 #include <signal.h>
18082 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
18083 #include <sys/types.h>
b06b1098 18084
3e0be4ab
GM
18085"
18086if test "x$ac_cv_type_sigset_t" = x""yes; then :
1fd182f0 18087
3e0be4ab
GM
18088cat >>confdefs.h <<_ACEOF
18089#define HAVE_SIGSET_T 1
18090_ACEOF
1fd182f0 18091
3e0be4ab
GM
18092gl_cv_type_sigset_t=yes
18093else
18094 gl_cv_type_sigset_t=no
1f5d53eb 18095fi
b06b1098 18096
3e0be4ab
GM
18097 if test $gl_cv_type_sigset_t != yes; then
18098 HAVE_SIGSET_T=0
18099 fi
1fd182f0 18100
1fd182f0 18101
3e0be4ab
GM
18102
18103
18104
18105 if test $ac_cv_header_sys_socket_h = no; then
18106 for ac_header in ws2tcpip.h
1f5d53eb 18107do :
3e0be4ab
GM
18108 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
18109if test "x$ac_cv_header_ws2tcpip_h" = x""yes; then :
1f5d53eb 18110 cat >>confdefs.h <<_ACEOF
3e0be4ab 18111#define HAVE_WS2TCPIP_H 1
1f5d53eb 18112_ACEOF
1fd182f0 18113
1f5d53eb 18114fi
1fd182f0 18115
1f5d53eb 18116done
1fd182f0 18117
3e0be4ab 18118 fi
1fd182f0 18119
3e0be4ab
GM
18120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
18121$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
18122if test "${ac_cv_header_stdbool_h+set}" = set; then :
18123 $as_echo_n "(cached) " >&6
18124else
18125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18126/* end confdefs.h. */
18127
18128 #include <stdbool.h>
18129 #ifndef bool
18130 "error: bool is not defined"
18131 #endif
18132 #ifndef false
18133 "error: false is not defined"
18134 #endif
18135 #if false
18136 "error: false is not 0"
18137 #endif
18138 #ifndef true
18139 "error: true is not defined"
18140 #endif
18141 #if true != 1
18142 "error: true is not 1"
18143 #endif
18144 #ifndef __bool_true_false_are_defined
18145 "error: __bool_true_false_are_defined is not defined"
18146 #endif
18147
18148 struct s { _Bool s: 1; _Bool t; } s;
18149
18150 char a[true == 1 ? 1 : -1];
18151 char b[false == 0 ? 1 : -1];
18152 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
18153 char d[(bool) 0.5 == true ? 1 : -1];
18154 /* See body of main program for 'e'. */
18155 char f[(_Bool) 0.0 == false ? 1 : -1];
18156 char g[true];
18157 char h[sizeof (_Bool)];
18158 char i[sizeof s.t];
18159 enum { j = false, k = true, l = false * true, m = true * 256 };
18160 /* The following fails for
18161 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
18162 _Bool n[m];
18163 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
18164 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
18165 /* Catch a bug in an HP-UX C compiler. See
18166 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
18167 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
18168 */
18169 _Bool q = true;
18170 _Bool *pq = &q;
18171
18172int
18173main ()
18174{
18175
18176 bool e = &s;
18177 *pq |= q;
18178 *pq |= ! q;
18179 /* Refer to every declared value, to avoid compiler optimizations. */
18180 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
18181 + !m + !n + !o + !p + !q + !pq);
18182
18183 ;
18184 return 0;
18185}
1f5d53eb 18186_ACEOF
3e0be4ab
GM
18187if ac_fn_c_try_compile "$LINENO"; then :
18188 ac_cv_header_stdbool_h=yes
18189else
18190 ac_cv_header_stdbool_h=no
18191fi
18192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18193fi
18194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
18195$as_echo "$ac_cv_header_stdbool_h" >&6; }
18196 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
18197if test "x$ac_cv_type__Bool" = x""yes; then :
1f5d53eb
PE
18198
18199cat >>confdefs.h <<_ACEOF
3e0be4ab 18200#define HAVE__BOOL 1
1f5d53eb 18201_ACEOF
1fd182f0 18202
b06b1098 18203
1fd182f0
PE
18204fi
18205
3e0be4ab
GM
18206
18207
18208 REPLACE_NULL=0;
18209 HAVE_WCHAR_T=1;
18210
18211
18212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
18213$as_echo_n "checking for wchar_t... " >&6; }
18214if test "${gt_cv_c_wchar_t+set}" = set; then :
18215 $as_echo_n "(cached) " >&6
18216else
18217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1f5d53eb 18218/* end confdefs.h. */
3e0be4ab
GM
18219#include <stddef.h>
18220 wchar_t foo = (wchar_t)'\0';
1f5d53eb
PE
18221int
18222main ()
18223{
3e0be4ab 18224
1f5d53eb
PE
18225 ;
18226 return 0;
18227}
1fd182f0 18228_ACEOF
3e0be4ab
GM
18229if ac_fn_c_try_compile "$LINENO"; then :
18230 gt_cv_c_wchar_t=yes
18231else
18232 gt_cv_c_wchar_t=no
18233fi
18234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18235fi
18236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
18237$as_echo "$gt_cv_c_wchar_t" >&6; }
18238 if test $gt_cv_c_wchar_t = yes; then
1f5d53eb 18239
3e0be4ab
GM
18240$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
18241
18242 fi
18243
18244
18245 GNULIB_DPRINTF=0;
18246 GNULIB_FCLOSE=0;
18247 GNULIB_FFLUSH=0;
18248 GNULIB_FGETC=0;
18249 GNULIB_FGETS=0;
18250 GNULIB_FOPEN=0;
18251 GNULIB_FPRINTF=0;
18252 GNULIB_FPRINTF_POSIX=0;
18253 GNULIB_FPURGE=0;
18254 GNULIB_FPUTC=0;
18255 GNULIB_FPUTS=0;
18256 GNULIB_FREAD=0;
18257 GNULIB_FREOPEN=0;
18258 GNULIB_FSCANF=0;
18259 GNULIB_FSEEK=0;
18260 GNULIB_FSEEKO=0;
18261 GNULIB_FTELL=0;
18262 GNULIB_FTELLO=0;
18263 GNULIB_FWRITE=0;
18264 GNULIB_GETC=0;
18265 GNULIB_GETCHAR=0;
18266 GNULIB_GETDELIM=0;
18267 GNULIB_GETLINE=0;
18268 GNULIB_GETS=0;
18269 GNULIB_OBSTACK_PRINTF=0;
18270 GNULIB_OBSTACK_PRINTF_POSIX=0;
18271 GNULIB_PERROR=0;
18272 GNULIB_POPEN=0;
18273 GNULIB_PRINTF=0;
18274 GNULIB_PRINTF_POSIX=0;
18275 GNULIB_PUTC=0;
18276 GNULIB_PUTCHAR=0;
18277 GNULIB_PUTS=0;
18278 GNULIB_REMOVE=0;
18279 GNULIB_RENAME=0;
18280 GNULIB_RENAMEAT=0;
18281 GNULIB_SCANF=0;
18282 GNULIB_SNPRINTF=0;
18283 GNULIB_SPRINTF_POSIX=0;
18284 GNULIB_STDIO_H_NONBLOCKING=0;
18285 GNULIB_STDIO_H_SIGPIPE=0;
18286 GNULIB_TMPFILE=0;
18287 GNULIB_VASPRINTF=0;
18288 GNULIB_VFSCANF=0;
18289 GNULIB_VSCANF=0;
18290 GNULIB_VDPRINTF=0;
18291 GNULIB_VFPRINTF=0;
18292 GNULIB_VFPRINTF_POSIX=0;
18293 GNULIB_VPRINTF=0;
18294 GNULIB_VPRINTF_POSIX=0;
18295 GNULIB_VSNPRINTF=0;
18296 GNULIB_VSPRINTF_POSIX=0;
18297 HAVE_DECL_FPURGE=1;
18298 HAVE_DECL_FSEEKO=1;
18299 HAVE_DECL_FTELLO=1;
18300 HAVE_DECL_GETDELIM=1;
18301 HAVE_DECL_GETLINE=1;
18302 HAVE_DECL_OBSTACK_PRINTF=1;
18303 HAVE_DECL_SNPRINTF=1;
18304 HAVE_DECL_VSNPRINTF=1;
18305 HAVE_DPRINTF=1;
18306 HAVE_FSEEKO=1;
18307 HAVE_FTELLO=1;
18308 HAVE_RENAMEAT=1;
18309 HAVE_VASPRINTF=1;
18310 HAVE_VDPRINTF=1;
18311 REPLACE_DPRINTF=0;
18312 REPLACE_FCLOSE=0;
18313 REPLACE_FFLUSH=0;
18314 REPLACE_FOPEN=0;
18315 REPLACE_FPRINTF=0;
18316 REPLACE_FPURGE=0;
18317 REPLACE_FREOPEN=0;
18318 REPLACE_FSEEK=0;
18319 REPLACE_FSEEKO=0;
18320 REPLACE_FTELL=0;
18321 REPLACE_FTELLO=0;
18322 REPLACE_GETDELIM=0;
18323 REPLACE_GETLINE=0;
18324 REPLACE_OBSTACK_PRINTF=0;
18325 REPLACE_PERROR=0;
18326 REPLACE_POPEN=0;
18327 REPLACE_PRINTF=0;
18328 REPLACE_REMOVE=0;
18329 REPLACE_RENAME=0;
18330 REPLACE_RENAMEAT=0;
18331 REPLACE_SNPRINTF=0;
18332 REPLACE_SPRINTF=0;
18333 REPLACE_STDIO_READ_FUNCS=0;
18334 REPLACE_STDIO_WRITE_FUNCS=0;
18335 REPLACE_TMPFILE=0;
18336 REPLACE_VASPRINTF=0;
18337 REPLACE_VDPRINTF=0;
18338 REPLACE_VFPRINTF=0;
18339 REPLACE_VPRINTF=0;
18340 REPLACE_VSNPRINTF=0;
18341 REPLACE_VSPRINTF=0;
1f5d53eb 18342
1fd182f0 18343
3e0be4ab
GM
18344 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
18345"
18346if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
1fd182f0 18347
3e0be4ab 18348$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
1fd182f0 18349
1f5d53eb 18350fi
1fd182f0 18351
1f5d53eb 18352
1fd182f0 18353
1fd182f0 18354
3e0be4ab
GM
18355ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
18356if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
18357 ac_have_decl=1
18358else
18359 ac_have_decl=0
18360fi
1f5d53eb 18361
3e0be4ab
GM
18362cat >>confdefs.h <<_ACEOF
18363#define HAVE_DECL_STRTOIMAX $ac_have_decl
18364_ACEOF
cc322c06 18365
3e0be4ab
GM
18366ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
18367if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
18368 ac_have_decl=1
18369else
18370 ac_have_decl=0
18371fi
cc322c06 18372
3e0be4ab
GM
18373cat >>confdefs.h <<_ACEOF
18374#define HAVE_DECL_STRTOUMAX $ac_have_decl
18375_ACEOF
cc322c06
GM
18376
18377
1f5d53eb 18378
3e0be4ab
GM
18379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
18380$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
18381if test "${ac_cv_header_stat_broken+set}" = set; then :
18382 $as_echo_n "(cached) " >&6
18383else
18384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18385/* end confdefs.h. */
18386#include <sys/types.h>
18387#include <sys/stat.h>
1f5d53eb 18388
3e0be4ab
GM
18389#if defined S_ISBLK && defined S_IFDIR
18390extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
18391#endif
1fd182f0 18392
3e0be4ab
GM
18393#if defined S_ISBLK && defined S_IFCHR
18394extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
18395#endif
e275c824 18396
3e0be4ab
GM
18397#if defined S_ISLNK && defined S_IFREG
18398extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
18399#endif
e275c824 18400
3e0be4ab
GM
18401#if defined S_ISSOCK && defined S_IFREG
18402extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
18403#endif
e275c824 18404
3e0be4ab
GM
18405_ACEOF
18406if ac_fn_c_try_compile "$LINENO"; then :
18407 ac_cv_header_stat_broken=no
18408else
18409 ac_cv_header_stat_broken=yes
18410fi
18411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18412fi
18413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
18414$as_echo "$ac_cv_header_stat_broken" >&6; }
18415if test $ac_cv_header_stat_broken = yes; then
e275c824 18416
3e0be4ab 18417$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
e275c824 18418
3e0be4ab 18419fi
e275c824 18420
e275c824
PE
18421
18422
3e0be4ab
GM
18423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
18424$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
18425if test "${ac_cv_c_restrict+set}" = set; then :
18426 $as_echo_n "(cached) " >&6
18427else
18428 ac_cv_c_restrict=no
18429 # The order here caters to the fact that C++ does not require restrict.
18430 for ac_kw in __restrict __restrict__ _Restrict restrict; do
18431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18432/* end confdefs.h. */
18433typedef int * int_ptr;
18434 int foo (int_ptr $ac_kw ip) {
18435 return ip[0];
18436 }
18437int
18438main ()
18439{
18440int s[1];
18441 int * $ac_kw t = s;
18442 t[0] = 0;
18443 return foo(t)
18444 ;
18445 return 0;
18446}
18447_ACEOF
18448if ac_fn_c_try_compile "$LINENO"; then :
18449 ac_cv_c_restrict=$ac_kw
18450fi
18451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18452 test "$ac_cv_c_restrict" != no && break
18453 done
e275c824 18454
3e0be4ab
GM
18455fi
18456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
18457$as_echo "$ac_cv_c_restrict" >&6; }
e275c824 18458
3e0be4ab
GM
18459 case $ac_cv_c_restrict in
18460 restrict) ;;
18461 no) $as_echo "#define restrict /**/" >>confdefs.h
18462 ;;
18463 *) cat >>confdefs.h <<_ACEOF
18464#define restrict $ac_cv_c_restrict
18465_ACEOF
18466 ;;
18467 esac
e275c824 18468
52724a05 18469
52724a05
GM
18470
18471
18472
3e0be4ab
GM
18473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
18474$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
18475if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
18476 $as_echo_n "(cached) " >&6
18477else
18478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18479/* end confdefs.h. */
18480#include <time.h>
52724a05 18481
3e0be4ab
GM
18482int
18483main ()
18484{
18485static struct timespec x; x.tv_sec = x.tv_nsec;
18486 ;
18487 return 0;
18488}
18489_ACEOF
18490if ac_fn_c_try_compile "$LINENO"; then :
18491 gl_cv_sys_struct_timespec_in_time_h=yes
18492else
18493 gl_cv_sys_struct_timespec_in_time_h=no
52724a05 18494fi
3e0be4ab
GM
18495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18496fi
18497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
18498$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
52724a05 18499
3e0be4ab
GM
18500 TIME_H_DEFINES_STRUCT_TIMESPEC=0
18501 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
18502 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
18503 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
18504 TIME_H_DEFINES_STRUCT_TIMESPEC=1
18505 else
18506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
18507$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
18508if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
18509 $as_echo_n "(cached) " >&6
18510else
18511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18512/* end confdefs.h. */
18513#include <sys/time.h>
52724a05 18514
3e0be4ab
GM
18515int
18516main ()
18517{
18518static struct timespec x; x.tv_sec = x.tv_nsec;
18519 ;
18520 return 0;
18521}
18522_ACEOF
18523if ac_fn_c_try_compile "$LINENO"; then :
18524 gl_cv_sys_struct_timespec_in_sys_time_h=yes
18525else
18526 gl_cv_sys_struct_timespec_in_sys_time_h=no
18527fi
18528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18529fi
18530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
18531$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
18532 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
18533 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
18534 else
18535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
18536$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
18537if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
18538 $as_echo_n "(cached) " >&6
18539else
18540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18541/* end confdefs.h. */
18542#include <pthread.h>
52724a05 18543
3e0be4ab
GM
18544int
18545main ()
18546{
18547static struct timespec x; x.tv_sec = x.tv_nsec;
18548 ;
18549 return 0;
18550}
18551_ACEOF
18552if ac_fn_c_try_compile "$LINENO"; then :
18553 gl_cv_sys_struct_timespec_in_pthread_h=yes
18554else
18555 gl_cv_sys_struct_timespec_in_pthread_h=no
18556fi
18557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18558fi
18559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
18560$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
18561 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
18562 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
18563 fi
18564 fi
18565 fi
52724a05
GM
18566
18567
52724a05 18568
e275c824
PE
18569
18570
e275c824 18571
e275c824
PE
18572
18573
18574
52724a05 18575
e275c824
PE
18576
18577
18578
18579
18580
3e0be4ab
GM
18581 if test $gl_cv_have_include_next = yes; then
18582 gl_cv_next_time_h='<'time.h'>'
18583 else
18584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
18585$as_echo_n "checking absolute name of <time.h>... " >&6; }
18586if test "${gl_cv_next_time_h+set}" = set; then :
18587 $as_echo_n "(cached) " >&6
18588else
e275c824 18589
3e0be4ab
GM
18590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18591/* end confdefs.h. */
18592#include <time.h>
e275c824 18593
3e0be4ab
GM
18594_ACEOF
18595 case "$host_os" in
18596 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18597 *) gl_absname_cpp="$ac_cpp" ;;
18598 esac
18599 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18600 sed -n '\#/time.h#{
18601 s#.*"\(.*/time.h\)".*#\1#
18602 s#^/[^/]#//&#
18603 p
18604 q
18605 }'`'"'
e275c824 18606
e275c824 18607
3e0be4ab
GM
18608fi
18609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
18610$as_echo "$gl_cv_next_time_h" >&6; }
18611 fi
18612 NEXT_TIME_H=$gl_cv_next_time_h
e275c824 18613
3e0be4ab
GM
18614 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18615 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18616 gl_next_as_first_directive='<'time.h'>'
18617 else
18618 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18619 gl_next_as_first_directive=$gl_cv_next_time_h
18620 fi
18621 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
e275c824
PE
18622
18623
18624
18625
18626
18627
3e0be4ab
GM
18628ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
18629if test "x$ac_cv_have_decl_localtime_r" = x""yes; then :
18630 ac_have_decl=1
18631else
18632 ac_have_decl=0
18633fi
e275c824 18634
3e0be4ab
GM
18635cat >>confdefs.h <<_ACEOF
18636#define HAVE_DECL_LOCALTIME_R $ac_have_decl
18637_ACEOF
e275c824
PE
18638
18639
18640
18641
3e0be4ab
GM
18642 if false; then
18643 GL_COND_LIBTOOL_TRUE=
18644 GL_COND_LIBTOOL_FALSE='#'
18645else
18646 GL_COND_LIBTOOL_TRUE='#'
18647 GL_COND_LIBTOOL_FALSE=
e275c824
PE
18648fi
18649
3e0be4ab
GM
18650 gl_cond_libtool=false
18651 gl_libdeps=
18652 gl_ltlibdeps=
18653 gl_m4_base='m4'
e275c824 18654
67342916 18655
4fda9c95
GM
18656
18657
52724a05
GM
18658
18659
18660
18661
18662
3e0be4ab 18663 gl_source_base='lib'
52724a05
GM
18664
18665
3e0be4ab
GM
18666 if test $ac_cv_func_alloca_works = no; then
18667 :
18668 fi
52724a05 18669
3e0be4ab
GM
18670 # Define an additional variable used in the Makefile substitution.
18671 if test $ac_cv_working_alloca_h = yes; then
18672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
18673$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
18674if test "${gl_cv_rpl_alloca+set}" = set; then :
18675 $as_echo_n "(cached) " >&6
18676else
52724a05 18677
3e0be4ab
GM
18678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18679/* end confdefs.h. */
52724a05 18680
3e0be4ab
GM
18681#if defined __GNUC__ || defined _AIX || defined _MSC_VER
18682 Need own alloca
18683#endif
52724a05 18684
3e0be4ab
GM
18685_ACEOF
18686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18687 $EGREP "Need own alloca" >/dev/null 2>&1; then :
18688 gl_cv_rpl_alloca=yes
18689else
18690 gl_cv_rpl_alloca=no
52724a05 18691fi
3e0be4ab 18692rm -f conftest*
ae0d7250
PE
18693
18694
3e0be4ab
GM
18695fi
18696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
18697$as_echo "$gl_cv_rpl_alloca" >&6; }
18698 if test $gl_cv_rpl_alloca = yes; then
ae0d7250 18699
3e0be4ab 18700$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
cc322c06 18701
3e0be4ab
GM
18702 ALLOCA_H=alloca.h
18703 else
18704 ALLOCA_H=
18705 fi
18706 else
18707 ALLOCA_H=alloca.h
18708 fi
cc322c06 18709
3e0be4ab
GM
18710 if test -n "$ALLOCA_H"; then
18711 GL_GENERATE_ALLOCA_H_TRUE=
18712 GL_GENERATE_ALLOCA_H_FALSE='#'
18713else
18714 GL_GENERATE_ALLOCA_H_TRUE='#'
18715 GL_GENERATE_ALLOCA_H_FALSE=
18716fi
1fd182f0
PE
18717
18718
18719
18720
18721
52724a05 18722
3e0be4ab 18723 :
1fd182f0 18724
1fd182f0 18725
1fd182f0 18726
1fd182f0 18727
3e0be4ab 18728 :
1fd182f0 18729
1fd182f0 18730
1fd182f0 18731
1fd182f0 18732
1fd182f0 18733
1fd182f0 18734
1fd182f0 18735
1fd182f0 18736
1fd182f0 18737
1fd182f0 18738
1fd182f0 18739
1fd182f0 18740
1fd182f0 18741
1fd182f0 18742
1fd182f0 18743
3e0be4ab 18744$as_echo "#define HAVE_DUP2 1" >>confdefs.h
1fd182f0 18745
1fd182f0 18746
3e0be4ab
GM
18747 if test $HAVE_DUP2 = 1; then
18748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
18749$as_echo_n "checking whether dup2 works... " >&6; }
18750if test "${gl_cv_func_dup2_works+set}" = set; then :
18751 $as_echo_n "(cached) " >&6
18752else
18753 if test "$cross_compiling" = yes; then :
18754 case "$host_os" in
18755 mingw*) # on this platform, dup2 always returns 0 for success
18756 gl_cv_func_dup2_works=no;;
18757 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
18758 gl_cv_func_dup2_works=no;;
18759 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
18760 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
18761 gl_cv_func_dup2_works=no;;
18762 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
18763 gl_cv_func_dup2_works=no;;
18764 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
18765 gl_cv_func_dup2_works=no;;
18766 *) gl_cv_func_dup2_works=yes;;
18767 esac
18768else
18769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18770/* end confdefs.h. */
1fd182f0 18771
3e0be4ab
GM
18772 #include <unistd.h>
18773#include <fcntl.h>
18774#include <errno.h>
18775int
18776main ()
18777{
18778int result = 0;
18779#ifdef FD_CLOEXEC
18780 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
18781 result |= 1;
18782#endif
18783 if (dup2 (1, 1) == 0)
18784 result |= 2;
18785#ifdef FD_CLOEXEC
18786 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
18787 result |= 4;
18788#endif
18789 close (0);
18790 if (dup2 (0, 0) != -1)
18791 result |= 8;
18792 /* Many gnulib modules require POSIX conformance of EBADF. */
18793 if (dup2 (2, 1000000) == -1 && errno != EBADF)
18794 result |= 16;
18795 return result;
1fd182f0 18796
3e0be4ab
GM
18797 ;
18798 return 0;
1fd182f0 18799}
3e0be4ab 18800
1fd182f0
PE
18801_ACEOF
18802if ac_fn_c_try_run "$LINENO"; then :
3e0be4ab 18803 gl_cv_func_dup2_works=yes
1fd182f0 18804else
3e0be4ab 18805 gl_cv_func_dup2_works=no
1fd182f0
PE
18806fi
18807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18808 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 18809fi
067d23c9 18810
067d23c9 18811
1fd182f0 18812fi
3e0be4ab
GM
18813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18814$as_echo "$gl_cv_func_dup2_works" >&6; }
18815 if test "$gl_cv_func_dup2_works" = no; then
067d23c9 18816
3e0be4ab
GM
18817
18818
18819 if test $ac_cv_func_dup2 = yes; then
18820 REPLACE_DUP2=1
1fd182f0 18821 fi
067d23c9
KY
18822
18823
18824
067d23c9 18825
cc322c06
GM
18826
18827
cc322c06
GM
18828
18829
3e0be4ab 18830 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
067d23c9
KY
18831
18832
3e0be4ab
GM
18833 fi
18834 fi
067d23c9 18835
067d23c9 18836
ae0d7250 18837
52724a05 18838
ae0d7250
PE
18839
18840
3e0be4ab 18841 GNULIB_DUP2=1
ae0d7250
PE
18842
18843
18844
18845
18846
18847
18848
18849
ae0d7250
PE
18850
18851
ae0d7250 18852
3e0be4ab
GM
18853# Persuade glibc <stdlib.h> to declare getloadavg().
18854
18855
18856gl_save_LIBS=$LIBS
18857
18858# getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,
18859# NetBSD >= 0.9, OpenBSD >= 2.0, Solaris >= 7.
18860HAVE_GETLOADAVG=1
18861ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
18862if test "x$ac_cv_func_getloadavg" = x""yes; then :
18863
18864else
18865 gl_func_getloadavg_done=no
18866
18867 # Some systems with -lutil have (and need) -lkvm as well, some do not.
18868 # On Solaris, -lkvm requires nlist from -lelf, so check that first
18869 # to get the right answer into the cache.
18870 # For kstat on solaris, we need to test for libelf and libkvm to force the
18871 # definition of SVR4 below.
18872 if test $gl_func_getloadavg_done = no; then
18873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
18874$as_echo_n "checking for elf_begin in -lelf... " >&6; }
18875if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
ae0d7250
PE
18876 $as_echo_n "(cached) " >&6
18877else
3e0be4ab
GM
18878 ac_check_lib_save_LIBS=$LIBS
18879LIBS="-lelf $LIBS"
18880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ae0d7250 18881/* end confdefs.h. */
3e0be4ab
GM
18882
18883/* Override any GCC internal prototype to avoid an error.
18884 Use char because int might match the return type of a GCC
18885 builtin and then its argument prototype would still apply. */
18886#ifdef __cplusplus
18887extern "C"
18888#endif
18889char elf_begin ();
ae0d7250
PE
18890int
18891main ()
18892{
3e0be4ab
GM
18893return elf_begin ();
18894 ;
18895 return 0;
18896}
18897_ACEOF
18898if ac_fn_c_try_link "$LINENO"; then :
18899 ac_cv_lib_elf_elf_begin=yes
18900else
18901 ac_cv_lib_elf_elf_begin=no
18902fi
18903rm -f core conftest.err conftest.$ac_objext \
18904 conftest$ac_exeext conftest.$ac_ext
18905LIBS=$ac_check_lib_save_LIBS
18906fi
18907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
18908$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
18909if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
18910 LIBS="-lelf $LIBS"
18911fi
18912
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
18914$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
18915if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
18916 $as_echo_n "(cached) " >&6
18917else
18918 ac_check_lib_save_LIBS=$LIBS
18919LIBS="-lkvm $LIBS"
18920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18921/* end confdefs.h. */
ae0d7250 18922
3e0be4ab
GM
18923/* Override any GCC internal prototype to avoid an error.
18924 Use char because int might match the return type of a GCC
18925 builtin and then its argument prototype would still apply. */
18926#ifdef __cplusplus
18927extern "C"
18928#endif
18929char kvm_open ();
18930int
18931main ()
18932{
18933return kvm_open ();
ae0d7250
PE
18934 ;
18935 return 0;
18936}
18937_ACEOF
3e0be4ab
GM
18938if ac_fn_c_try_link "$LINENO"; then :
18939 ac_cv_lib_kvm_kvm_open=yes
ae0d7250 18940else
3e0be4ab 18941 ac_cv_lib_kvm_kvm_open=no
ae0d7250 18942fi
3e0be4ab
GM
18943rm -f core conftest.err conftest.$ac_objext \
18944 conftest$ac_exeext conftest.$ac_ext
18945LIBS=$ac_check_lib_save_LIBS
ae0d7250 18946fi
3e0be4ab
GM
18947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
18948$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
18949if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
18950 LIBS="-lkvm $LIBS"
18951fi
18952
18953 # Check for the 4.4BSD definition of getloadavg.
18954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
18955$as_echo_n "checking for getloadavg in -lutil... " >&6; }
18956if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
ae0d7250
PE
18957 $as_echo_n "(cached) " >&6
18958else
3e0be4ab
GM
18959 ac_check_lib_save_LIBS=$LIBS
18960LIBS="-lutil $LIBS"
18961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18962/* end confdefs.h. */
18963
18964/* Override any GCC internal prototype to avoid an error.
18965 Use char because int might match the return type of a GCC
18966 builtin and then its argument prototype would still apply. */
18967#ifdef __cplusplus
18968extern "C"
18969#endif
18970char getloadavg ();
18971int
18972main ()
18973{
18974return getloadavg ();
18975 ;
18976 return 0;
18977}
18978_ACEOF
18979if ac_fn_c_try_link "$LINENO"; then :
18980 ac_cv_lib_util_getloadavg=yes
ae0d7250 18981else
3e0be4ab
GM
18982 ac_cv_lib_util_getloadavg=no
18983fi
18984rm -f core conftest.err conftest.$ac_objext \
18985 conftest$ac_exeext conftest.$ac_ext
18986LIBS=$ac_check_lib_save_LIBS
18987fi
18988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
18989$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
18990if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
18991 LIBS="-lutil $LIBS" gl_func_getloadavg_done=yes
18992fi
18993
18994 fi
18995
18996 if test $gl_func_getloadavg_done = no; then
18997 # There is a commonly available library for RS/6000 AIX.
18998 # Since it is not a standard part of AIX, it might be installed locally.
18999 gl_getloadavg_LIBS=$LIBS
19000 LIBS="-L/usr/local/lib $LIBS"
19001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
19002$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
19003if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
19004 $as_echo_n "(cached) " >&6
19005else
19006 ac_check_lib_save_LIBS=$LIBS
19007LIBS="-lgetloadavg $LIBS"
19008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ae0d7250 19009/* end confdefs.h. */
ae0d7250 19010
3e0be4ab
GM
19011/* Override any GCC internal prototype to avoid an error.
19012 Use char because int might match the return type of a GCC
19013 builtin and then its argument prototype would still apply. */
19014#ifdef __cplusplus
19015extern "C"
19016#endif
19017char getloadavg ();
ae0d7250
PE
19018int
19019main ()
19020{
3e0be4ab 19021return getloadavg ();
ae0d7250
PE
19022 ;
19023 return 0;
19024}
19025_ACEOF
3e0be4ab
GM
19026if ac_fn_c_try_link "$LINENO"; then :
19027 ac_cv_lib_getloadavg_getloadavg=yes
ae0d7250 19028else
3e0be4ab 19029 ac_cv_lib_getloadavg_getloadavg=no
ae0d7250 19030fi
3e0be4ab
GM
19031rm -f core conftest.err conftest.$ac_objext \
19032 conftest$ac_exeext conftest.$ac_ext
19033LIBS=$ac_check_lib_save_LIBS
ae0d7250 19034fi
3e0be4ab
GM
19035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
19036$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
19037if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
19038 LIBS="-lgetloadavg $LIBS" gl_func_getloadavg_done=yes
19039else
19040 LIBS=$gl_getloadavg_LIBS
52724a05 19041fi
ae0d7250 19042
3e0be4ab 19043 fi
ae0d7250 19044
3e0be4ab
GM
19045 # Set up the replacement function if necessary.
19046 if test $gl_func_getloadavg_done = no; then
19047 HAVE_GETLOADAVG=0
ae0d7250 19048
3e0be4ab
GM
19049 # Solaris has libkstat which does not require root.
19050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
19051$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
19052if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
6ad6792b
GM
19053 $as_echo_n "(cached) " >&6
19054else
3e0be4ab
GM
19055 ac_check_lib_save_LIBS=$LIBS
19056LIBS="-lkstat $LIBS"
19057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ad6792b 19058/* end confdefs.h. */
6ad6792b 19059
3e0be4ab
GM
19060/* Override any GCC internal prototype to avoid an error.
19061 Use char because int might match the return type of a GCC
19062 builtin and then its argument prototype would still apply. */
19063#ifdef __cplusplus
19064extern "C"
19065#endif
19066char kstat_open ();
6ad6792b
GM
19067int
19068main ()
19069{
3e0be4ab 19070return kstat_open ();
6ad6792b
GM
19071 ;
19072 return 0;
19073}
19074_ACEOF
3e0be4ab
GM
19075if ac_fn_c_try_link "$LINENO"; then :
19076 ac_cv_lib_kstat_kstat_open=yes
19077else
19078 ac_cv_lib_kstat_kstat_open=no
6ad6792b 19079fi
3e0be4ab
GM
19080rm -f core conftest.err conftest.$ac_objext \
19081 conftest$ac_exeext conftest.$ac_ext
19082LIBS=$ac_check_lib_save_LIBS
6ad6792b 19083fi
3e0be4ab
GM
19084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
19085$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
19086if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
19087 cat >>confdefs.h <<_ACEOF
19088#define HAVE_LIBKSTAT 1
6ad6792b
GM
19089_ACEOF
19090
3e0be4ab
GM
19091 LIBS="-lkstat $LIBS"
19092
6ad6792b
GM
19093fi
19094
3e0be4ab 19095 test $ac_cv_lib_kstat_kstat_open = yes && gl_func_getloadavg_done=yes
6c051bab 19096
3e0be4ab
GM
19097 # AIX has libperfstat which does not require root
19098 if test $gl_func_getloadavg_done = no; then
19099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perfstat_cpu_total in -lperfstat" >&5
19100$as_echo_n "checking for perfstat_cpu_total in -lperfstat... " >&6; }
19101if test "${ac_cv_lib_perfstat_perfstat_cpu_total+set}" = set; then :
6c051bab
GM
19102 $as_echo_n "(cached) " >&6
19103else
3e0be4ab
GM
19104 ac_check_lib_save_LIBS=$LIBS
19105LIBS="-lperfstat $LIBS"
19106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6c051bab 19107/* end confdefs.h. */
3e0be4ab
GM
19108
19109/* Override any GCC internal prototype to avoid an error.
19110 Use char because int might match the return type of a GCC
19111 builtin and then its argument prototype would still apply. */
19112#ifdef __cplusplus
19113extern "C"
19114#endif
19115char perfstat_cpu_total ();
6c051bab
GM
19116int
19117main ()
19118{
3e0be4ab 19119return perfstat_cpu_total ();
6c051bab
GM
19120 ;
19121 return 0;
19122}
19123_ACEOF
3e0be4ab
GM
19124if ac_fn_c_try_link "$LINENO"; then :
19125 ac_cv_lib_perfstat_perfstat_cpu_total=yes
6c051bab 19126else
3e0be4ab 19127 ac_cv_lib_perfstat_perfstat_cpu_total=no
6c051bab 19128fi
3e0be4ab
GM
19129rm -f core conftest.err conftest.$ac_objext \
19130 conftest$ac_exeext conftest.$ac_ext
19131LIBS=$ac_check_lib_save_LIBS
6c051bab 19132fi
3e0be4ab
GM
19133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_perfstat_cpu_total" >&5
19134$as_echo "$ac_cv_lib_perfstat_perfstat_cpu_total" >&6; }
19135if test "x$ac_cv_lib_perfstat_perfstat_cpu_total" = x""yes; then :
19136 cat >>confdefs.h <<_ACEOF
19137#define HAVE_LIBPERFSTAT 1
19138_ACEOF
6c051bab 19139
3e0be4ab 19140 LIBS="-lperfstat $LIBS"
6c051bab 19141
3e0be4ab 19142fi
6c051bab 19143
3e0be4ab
GM
19144 test $ac_cv_lib_perfstat_perfstat_cpu_total = yes && gl_func_getloadavg_done=yes
19145 fi
ae0d7250 19146
3e0be4ab
GM
19147 if test $gl_func_getloadavg_done = no; then
19148 ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
19149if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
19150 gl_func_getloadavg_done=yes
19151
19152$as_echo "#define DGUX 1" >>confdefs.h
19153
19154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
19155$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
19156if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
ae0d7250
PE
19157 $as_echo_n "(cached) " >&6
19158else
3e0be4ab
GM
19159 ac_check_lib_save_LIBS=$LIBS
19160LIBS="-ldgc $LIBS"
19161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6d153f56 19162/* end confdefs.h. */
3e0be4ab
GM
19163
19164/* Override any GCC internal prototype to avoid an error.
19165 Use char because int might match the return type of a GCC
19166 builtin and then its argument prototype would still apply. */
19167#ifdef __cplusplus
19168extern "C"
19169#endif
19170char dg_sys_info ();
ae0d7250
PE
19171int
19172main ()
19173{
3e0be4ab 19174return dg_sys_info ();
ae0d7250
PE
19175 ;
19176 return 0;
19177}
19178_ACEOF
3e0be4ab
GM
19179if ac_fn_c_try_link "$LINENO"; then :
19180 ac_cv_lib_dgc_dg_sys_info=yes
ae0d7250 19181else
3e0be4ab 19182 ac_cv_lib_dgc_dg_sys_info=no
ae0d7250 19183fi
3e0be4ab
GM
19184rm -f core conftest.err conftest.$ac_objext \
19185 conftest$ac_exeext conftest.$ac_ext
19186LIBS=$ac_check_lib_save_LIBS
ae0d7250 19187fi
3e0be4ab
GM
19188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
19189$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
19190if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
19191 cat >>confdefs.h <<_ACEOF
19192#define HAVE_LIBDGC 1
19193_ACEOF
ae0d7250 19194
3e0be4ab
GM
19195 LIBS="-ldgc $LIBS"
19196
19197fi
6d153f56 19198
ae0d7250 19199fi
6d153f56 19200
6d153f56 19201
3e0be4ab
GM
19202 fi
19203 fi
19204fi
6d153f56
GM
19205
19206
3e0be4ab
GM
19207if test "x$gl_save_LIBS" = x; then
19208 GETLOADAVG_LIBS=$LIBS
19209else
19210 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$gl_save_LIBS!!"`
19211fi
19212LIBS=$gl_save_LIBS
6d153f56
GM
19213
19214
3e0be4ab
GM
19215# Test whether the system declares getloadavg. Solaris has the function
19216# but declares it in <sys/loadavg.h>, not <stdlib.h>.
19217for ac_header in sys/loadavg.h
19218do :
19219 ac_fn_c_check_header_mongrel "$LINENO" "sys/loadavg.h" "ac_cv_header_sys_loadavg_h" "$ac_includes_default"
19220if test "x$ac_cv_header_sys_loadavg_h" = x""yes; then :
19221 cat >>confdefs.h <<_ACEOF
19222#define HAVE_SYS_LOADAVG_H 1
19223_ACEOF
6d153f56 19224
3e0be4ab 19225fi
6d153f56 19226
3e0be4ab 19227done
6d153f56 19228
3e0be4ab
GM
19229if test $ac_cv_header_sys_loadavg_h = yes; then
19230 HAVE_SYS_LOADAVG_H=1
ae0d7250 19231else
3e0be4ab
GM
19232 HAVE_SYS_LOADAVG_H=0
19233fi
19234ac_fn_c_check_decl "$LINENO" "getloadavg" "ac_cv_have_decl_getloadavg" "#if HAVE_SYS_LOADAVG_H
19235 # include <sys/loadavg.h>
19236 #endif
19237 #include <stdlib.h>
19238"
19239if test "x$ac_cv_have_decl_getloadavg" = x""yes; then :
6d153f56 19240
3e0be4ab
GM
19241else
19242 HAVE_DECL_GETLOADAVG=0
19243fi
ae0d7250 19244
6d153f56 19245
3e0be4ab 19246if test $HAVE_GETLOADAVG = 0; then
6d153f56 19247
6d153f56 19248
6d153f56
GM
19249
19250
19251
19252
6d153f56 19253
6d153f56 19254
3e0be4ab 19255 gl_LIBOBJS="$gl_LIBOBJS getloadavg.$ac_objext"
6d153f56 19256
ae0d7250 19257
3e0be4ab
GM
19258# Figure out what our getloadavg.c needs.
19259
19260# On HPUX9, an unprivileged user can get load averages this way.
19261if test $gl_func_getloadavg_done = no; then
19262 for ac_func in pstat_getdynamic
19263do :
19264 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
19265if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
19266 cat >>confdefs.h <<_ACEOF
19267#define HAVE_PSTAT_GETDYNAMIC 1
ae0d7250 19268_ACEOF
3e0be4ab 19269 gl_func_getloadavg_done=yes
ae0d7250 19270fi
3e0be4ab
GM
19271done
19272
ae0d7250
PE
19273fi
19274
3e0be4ab
GM
19275# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
19276# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
19277# Irix 4.0.5F has the header but not the library.
19278if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
19279 && test "$ac_cv_lib_kvm_kvm_open" = yes; then
19280 gl_func_getloadavg_done=yes
ae0d7250 19281
3e0be4ab 19282$as_echo "#define SVR4 1" >>confdefs.h
ae0d7250 19283
3e0be4ab 19284fi
ae0d7250 19285
3e0be4ab
GM
19286if test $gl_func_getloadavg_done = no; then
19287 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
19288if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
19289 gl_func_getloadavg_done=yes
ae0d7250 19290
3e0be4ab 19291$as_echo "#define UMAX 1" >>confdefs.h
ae0d7250
PE
19292
19293
3e0be4ab 19294$as_echo "#define UMAX4_3 1" >>confdefs.h
ae0d7250 19295
6d153f56 19296fi
ae0d7250
PE
19297
19298
3e0be4ab 19299fi
ae0d7250 19300
3e0be4ab
GM
19301if test $gl_func_getloadavg_done = no; then
19302 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
19303if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
19304 gl_func_getloadavg_done=yes; $as_echo "#define UMAX 1" >>confdefs.h
16c3e636 19305
3e0be4ab 19306fi
16c3e636
PE
19307
19308
3e0be4ab 19309fi
5f90be1b 19310
3e0be4ab
GM
19311if test $gl_func_getloadavg_done = no; then
19312 for ac_header in mach/mach.h
19313do :
19314 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
19315if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
19316 cat >>confdefs.h <<_ACEOF
19317#define HAVE_MACH_MACH_H 1
19318_ACEOF
da6c8463 19319
5f90be1b 19320fi
5f90be1b 19321
3e0be4ab 19322done
5f90be1b 19323
3e0be4ab 19324fi
5f90be1b 19325
3e0be4ab
GM
19326for ac_header in nlist.h
19327do :
19328 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
19329if test "x$ac_cv_header_nlist_h" = x""yes; then :
19330 cat >>confdefs.h <<_ACEOF
19331#define HAVE_NLIST_H 1
19332_ACEOF
19333 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
19334"
19335if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
5f90be1b 19336
3e0be4ab
GM
19337cat >>confdefs.h <<_ACEOF
19338#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
19339_ACEOF
5f90be1b
PE
19340
19341
3e0be4ab 19342fi
da6c8463 19343
3e0be4ab 19344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5f90be1b 19345/* end confdefs.h. */
3e0be4ab 19346#include <nlist.h>
5f90be1b
PE
19347int
19348main ()
19349{
3e0be4ab
GM
19350struct nlist x;
19351 #ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
19352 x.n_un.n_name = "";
19353 #else
19354 x.n_name = "";
19355 #endif
5f90be1b
PE
19356 ;
19357 return 0;
19358}
19359_ACEOF
3e0be4ab
GM
19360if ac_fn_c_try_link "$LINENO"; then :
19361
19362$as_echo "#define N_NAME_POINTER 1" >>confdefs.h
19363
5f90be1b 19364fi
3e0be4ab
GM
19365rm -f core conftest.err conftest.$ac_objext \
19366 conftest$ac_exeext conftest.$ac_ext
19367
5f90be1b 19368fi
5f90be1b 19369
3e0be4ab
GM
19370done
19371
da6c8463
GM
19372fi
19373
5f90be1b
PE
19374
19375
5f90be1b
PE
19376
19377
3e0be4ab 19378 GNULIB_GETLOADAVG=1
da6c8463
GM
19379
19380
19381
19382
da6c8463 19383
5f90be1b 19384
5f90be1b 19385
5f90be1b 19386
5f90be1b 19387
3e0be4ab
GM
19388
19389if test $REPLACE_GETOPT = 1; then
19390
19391
19392
19393
19394
5f90be1b
PE
19395
19396
19397
3e0be4ab
GM
19398 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
19399
19400
5f90be1b 19401
6c051bab 19402
5f90be1b 19403
6ad6792b
GM
19404
19405
19406
19407
3e0be4ab 19408 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
6ad6792b
GM
19409
19410
19411
19412
3e0be4ab 19413fi
6ad6792b
GM
19414
19415
19416
6ad6792b 19417
6ad6792b 19418
3e0be4ab
GM
19419 REPLACE_GETOPT=0
19420
19421
19422 if test -n "$gl_replace_getopt"; then :
6ad6792b 19423
3e0be4ab 19424 REPLACE_GETOPT=1
6ad6792b
GM
19425
19426fi
6ad6792b 19427
6ad6792b 19428
3e0be4ab 19429 if test $REPLACE_GETOPT = 1; then
6ad6792b 19430
3e0be4ab 19431 GETOPT_H=getopt.h
6ad6792b 19432
3e0be4ab 19433$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
6ad6792b 19434
ca36e0ff 19435
ca36e0ff 19436
3e0be4ab
GM
19437 GNULIB_UNISTD_H_GETOPT=1
19438 fi
ca36e0ff 19439
3e0be4ab 19440if test $REPLACE_GETOPT = 1; then
6ad6792b
GM
19441
19442
19443
19444
ca36e0ff 19445
1f5d53eb
PE
19446
19447
19448
3e0be4ab 19449 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
1f5d53eb
PE
19450
19451
19452
19453
19454
19455
19456
1f5d53eb 19457
1f5d53eb 19458
3e0be4ab
GM
19459 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
19460
19461
1f5d53eb
PE
19462
19463
19464fi
1f5d53eb 19465
1f5d53eb
PE
19466
19467
19468
19469
3e0be4ab 19470 if test $ac_cv_func_lstat = yes; then
1f5d53eb 19471
3e0be4ab
GM
19472 if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
19473 REPLACE_LSTAT=1
19474 fi
19475 else
19476 HAVE_LSTAT=0
19477 fi
1f5d53eb 19478
3e0be4ab 19479if test $REPLACE_LSTAT = 1; then
1f5d53eb 19480
16c3e636
PE
19481
19482
16c3e636
PE
19483
19484
19485
19486
19487
3e0be4ab 19488 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
16c3e636
PE
19489
19490
16c3e636 19491
3e0be4ab 19492 :
16c3e636 19493
3e0be4ab 19494fi
16c3e636 19495
4fda9c95
GM
19496
19497
19498
19499
3e0be4ab 19500 GNULIB_LSTAT=1
4fda9c95
GM
19501
19502
19503
19504
19505
19506
19507
19508
19509
4fda9c95 19510
4fda9c95 19511
3e0be4ab
GM
19512 if test $APPLE_UNIVERSAL_BUILD = 1; then
19513 # A universal build on Apple MacOS X platforms.
19514 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
19515 # But we need a configuration result that is valid in both modes.
19516 gl_cv_func_working_mktime=no
19517 fi
19518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
19519$as_echo_n "checking for working mktime... " >&6; }
19520if test "${gl_cv_func_working_mktime+set}" = set; then :
19521 $as_echo_n "(cached) " >&6
19522else
19523 if test "$cross_compiling" = yes; then :
19524 gl_cv_func_working_mktime=no
19525else
19526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19527/* end confdefs.h. */
19528/* Test program from Paul Eggert and Tony Leneis. */
19529#include <limits.h>
19530#include <stdlib.h>
19531#include <time.h>
4fda9c95 19532
3e0be4ab
GM
19533#ifdef HAVE_UNISTD_H
19534# include <unistd.h>
19535#endif
4fda9c95 19536
3e0be4ab
GM
19537#ifndef HAVE_ALARM
19538# define alarm(X) /* empty */
19539#endif
4fda9c95 19540
3e0be4ab
GM
19541/* Work around redefinition to rpl_putenv by other config tests. */
19542#undef putenv
4fda9c95 19543
3e0be4ab
GM
19544static time_t time_t_max;
19545static time_t time_t_min;
19546
19547/* Values we'll use to set the TZ environment variable. */
19548static char *tz_strings[] = {
19549 (char *) 0, "TZ=GMT0", "TZ=JST-9",
19550 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
19551};
19552#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
4fda9c95 19553
3e0be4ab
GM
19554/* Return 0 if mktime fails to convert a date in the spring-forward gap.
19555 Based on a problem report from Andreas Jaeger. */
19556static int
19557spring_forward_gap ()
19558{
19559 /* glibc (up to about 1998-10-07) failed this test. */
19560 struct tm tm;
4fda9c95 19561
3e0be4ab
GM
19562 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
19563 instead of "TZ=America/Vancouver" in order to detect the bug even
19564 on systems that don't support the Olson extension, or don't have the
19565 full zoneinfo tables installed. */
19566 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
4fda9c95 19567
3e0be4ab
GM
19568 tm.tm_year = 98;
19569 tm.tm_mon = 3;
19570 tm.tm_mday = 5;
19571 tm.tm_hour = 2;
19572 tm.tm_min = 0;
19573 tm.tm_sec = 0;
19574 tm.tm_isdst = -1;
19575 return mktime (&tm) != (time_t) -1;
19576}
19577
19578static int
19579mktime_test1 (time_t now)
19580{
19581 struct tm *lt;
19582 return ! (lt = localtime (&now)) || mktime (lt) == now;
19583}
4fda9c95 19584
3e0be4ab
GM
19585static int
19586mktime_test (time_t now)
19587{
19588 return (mktime_test1 (now)
19589 && mktime_test1 ((time_t) (time_t_max - now))
19590 && mktime_test1 ((time_t) (time_t_min + now)));
19591}
4fda9c95 19592
3e0be4ab
GM
19593static int
19594irix_6_4_bug ()
19595{
19596 /* Based on code from Ariel Faigon. */
19597 struct tm tm;
19598 tm.tm_year = 96;
19599 tm.tm_mon = 3;
19600 tm.tm_mday = 0;
19601 tm.tm_hour = 0;
19602 tm.tm_min = 0;
19603 tm.tm_sec = 0;
19604 tm.tm_isdst = -1;
19605 mktime (&tm);
19606 return tm.tm_mon == 2 && tm.tm_mday == 31;
19607}
4fda9c95 19608
3e0be4ab
GM
19609static int
19610bigtime_test (int j)
19611{
19612 struct tm tm;
19613 time_t now;
19614 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
19615 now = mktime (&tm);
19616 if (now != (time_t) -1)
19617 {
19618 struct tm *lt = localtime (&now);
19619 if (! (lt
19620 && lt->tm_year == tm.tm_year
19621 && lt->tm_mon == tm.tm_mon
19622 && lt->tm_mday == tm.tm_mday
19623 && lt->tm_hour == tm.tm_hour
19624 && lt->tm_min == tm.tm_min
19625 && lt->tm_sec == tm.tm_sec
19626 && lt->tm_yday == tm.tm_yday
19627 && lt->tm_wday == tm.tm_wday
19628 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
19629 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
19630 return 0;
19631 }
19632 return 1;
19633}
cc322c06 19634
3e0be4ab
GM
19635static int
19636year_2050_test ()
19637{
19638 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
19639 ignoring leap seconds. */
19640 unsigned long int answer = 2527315200UL;
cc322c06 19641
3e0be4ab
GM
19642 struct tm tm;
19643 time_t t;
19644 tm.tm_year = 2050 - 1900;
19645 tm.tm_mon = 2 - 1;
19646 tm.tm_mday = 1;
19647 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
19648 tm.tm_isdst = -1;
cc322c06 19649
3e0be4ab
GM
19650 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
19651 instead of "TZ=America/Vancouver" in order to detect the bug even
19652 on systems that don't support the Olson extension, or don't have the
19653 full zoneinfo tables installed. */
19654 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
cc322c06 19655
3e0be4ab 19656 t = mktime (&tm);
4fda9c95 19657
3e0be4ab
GM
19658 /* Check that the result is either a failure, or close enough
19659 to the correct answer that we can assume the discrepancy is
19660 due to leap seconds. */
19661 return (t == (time_t) -1
19662 || (0 < t && answer - 120 <= t && t <= answer + 120));
19663}
4fda9c95 19664
3e0be4ab
GM
19665int
19666main ()
19667{
19668 int result = 0;
19669 time_t t, delta;
19670 int i, j;
19671 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
19672 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
ae0d7250 19673
3e0be4ab
GM
19674 /* This test makes some buggy mktime implementations loop.
19675 Give up after 60 seconds; a mktime slower than that
19676 isn't worth using anyway. */
19677 alarm (60);
ae0d7250 19678
3e0be4ab
GM
19679 time_t_max = (! time_t_signed
19680 ? (time_t) -1
19681 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
19682 * 2 + 1));
19683 time_t_min = (! time_t_signed
19684 ? (time_t) 0
19685 : time_t_signed_magnitude
19686 ? ~ (time_t) 0
19687 : ~ time_t_max);
ae0d7250 19688
3e0be4ab
GM
19689 delta = time_t_max / 997; /* a suitable prime number */
19690 for (i = 0; i < N_STRINGS; i++)
19691 {
19692 if (tz_strings[i])
19693 putenv (tz_strings[i]);
ae0d7250 19694
3e0be4ab
GM
19695 for (t = 0; t <= time_t_max - delta; t += delta)
19696 if (! mktime_test (t))
19697 result |= 1;
19698 if (! (mktime_test ((time_t) 1)
19699 && mktime_test ((time_t) (60 * 60))
19700 && mktime_test ((time_t) (60 * 60 * 24))))
19701 result |= 2;
ae0d7250 19702
3e0be4ab
GM
19703 for (j = 1; ; j <<= 1)
19704 if (! bigtime_test (j))
19705 result |= 4;
19706 else if (INT_MAX / 2 < j)
19707 break;
19708 if (! bigtime_test (INT_MAX))
19709 result |= 8;
19710 }
19711 if (! irix_6_4_bug ())
19712 result |= 16;
19713 if (! spring_forward_gap ())
19714 result |= 32;
19715 if (! year_2050_test ())
19716 result |= 64;
19717 return result;
ae0d7250
PE
19718}
19719_ACEOF
19720if ac_fn_c_try_run "$LINENO"; then :
3e0be4ab 19721 gl_cv_func_working_mktime=yes
ae0d7250 19722else
3e0be4ab 19723 gl_cv_func_working_mktime=no
ae0d7250
PE
19724fi
19725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19726 conftest.$ac_objext conftest.beam conftest.$ac_ext
19727fi
19728
ae0d7250 19729
52724a05 19730fi
3e0be4ab
GM
19731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
19732$as_echo "$gl_cv_func_working_mktime" >&6; }
19733
19734 if test $gl_cv_func_working_mktime = no; then
19735 REPLACE_MKTIME=1
19736 else
19737 REPLACE_MKTIME=0
19738 fi
ae0d7250 19739
3e0be4ab 19740if test $REPLACE_MKTIME = 1; then
ae0d7250
PE
19741
19742
cc322c06
GM
19743
19744
cc322c06
GM
19745
19746
ae0d7250
PE
19747
19748
3e0be4ab 19749 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
ae0d7250 19750
5fa4ac76
PE
19751
19752
19753
3e0be4ab 19754fi
5fa4ac76
PE
19755
19756
19757
19758
19759
3e0be4ab 19760 GNULIB_MKTIME=1
5fa4ac76
PE
19761
19762
19763
19764
19765
19766
19767
19768
3e0be4ab
GM
19769 LIB_PTHREAD_SIGMASK=
19770 if test $ac_cv_func_pthread_sigmask != yes; then
19771 gl_save_LIBS=$LIBS
19772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5
19773$as_echo_n "checking for library containing pthread_sigmask... " >&6; }
19774if test "${ac_cv_search_pthread_sigmask+set}" = set; then :
5fa4ac76
PE
19775 $as_echo_n "(cached) " >&6
19776else
3e0be4ab
GM
19777 ac_func_search_save_LIBS=$LIBS
19778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5fa4ac76 19779/* end confdefs.h. */
5fa4ac76 19780
3e0be4ab
GM
19781/* Override any GCC internal prototype to avoid an error.
19782 Use char because int might match the return type of a GCC
19783 builtin and then its argument prototype would still apply. */
19784#ifdef __cplusplus
19785extern "C"
19786#endif
19787char pthread_sigmask ();
19788int
19789main ()
19790{
19791return pthread_sigmask ();
19792 ;
19793 return 0;
19794}
5fa4ac76 19795_ACEOF
3e0be4ab
GM
19796for ac_lib in '' pthread c_r; do
19797 if test -z "$ac_lib"; then
19798 ac_res="none required"
19799 else
19800 ac_res=-l$ac_lib
19801 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19802 fi
19803 if ac_fn_c_try_link "$LINENO"; then :
19804 ac_cv_search_pthread_sigmask=$ac_res
5fa4ac76 19805fi
3e0be4ab
GM
19806rm -f core conftest.err conftest.$ac_objext \
19807 conftest$ac_exeext
19808 if test "${ac_cv_search_pthread_sigmask+set}" = set; then :
19809 break
19810fi
19811done
19812if test "${ac_cv_search_pthread_sigmask+set}" = set; then :
5fa4ac76 19813
3e0be4ab
GM
19814else
19815 ac_cv_search_pthread_sigmask=no
19816fi
19817rm conftest.$ac_ext
19818LIBS=$ac_func_search_save_LIBS
19819fi
19820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5
19821$as_echo "$ac_cv_search_pthread_sigmask" >&6; }
19822ac_res=$ac_cv_search_pthread_sigmask
19823if test "$ac_res" != no; then :
19824 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5fa4ac76 19825
3e0be4ab 19826fi
5fa4ac76 19827
3e0be4ab
GM
19828 LIBS=$gl_save_LIBS
19829 if test "$ac_cv_search_pthread_sigmask" = no; then
19830 HAVE_PTHREAD_SIGMASK=0
19831 elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then
19832 LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask
19833 fi
19834 fi
5fa4ac76
PE
19835
19836
3e0be4ab 19837if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
5fa4ac76 19838
5fa4ac76 19839
5fa4ac76 19840
5fa4ac76
PE
19841
19842
19843
19844
19845
3e0be4ab 19846 gl_LIBOBJS="$gl_LIBOBJS pthread_sigmask.$ac_objext"
067d23c9 19847
3e0be4ab 19848fi
067d23c9 19849
067d23c9
KY
19850
19851
067d23c9 19852
067d23c9 19853
3e0be4ab 19854 GNULIB_PTHREAD_SIGMASK=1
067d23c9
KY
19855
19856
067d23c9 19857
067d23c9
KY
19858
19859
19860
3e0be4ab
GM
19861
19862
19863 if test $ac_cv_func_readlink = no; then
19864 HAVE_READLINK=0
19865 else
19866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
19867$as_echo_n "checking whether readlink signature is correct... " >&6; }
19868if test "${gl_cv_decl_readlink_works+set}" = set; then :
067d23c9
KY
19869 $as_echo_n "(cached) " >&6
19870else
1fd182f0 19871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 19872/* end confdefs.h. */
3e0be4ab
GM
19873#include <unistd.h>
19874 /* Cause compilation failure if original declaration has wrong type. */
19875 ssize_t readlink (const char *, char *, size_t);
067d23c9
KY
19876int
19877main ()
19878{
3e0be4ab 19879
067d23c9
KY
19880 ;
19881 return 0;
19882}
19883_ACEOF
19884if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 19885 gl_cv_decl_readlink_works=yes
067d23c9 19886else
3e0be4ab 19887 gl_cv_decl_readlink_works=no
067d23c9
KY
19888fi
19889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3e0be4ab
GM
19890fi
19891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
19892$as_echo "$gl_cv_decl_readlink_works" >&6; }
19893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
19894$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
19895if test "${gl_cv_func_readlink_works+set}" = set; then :
19896 $as_echo_n "(cached) " >&6
19897else
19898 # We have readlink, so assume ln -s works.
19899 ln -s conftest.no-such conftest.link
19900 ln -s conftest.link conftest.lnk2
19901 if test "$cross_compiling" = yes; then :
19902 gl_cv_func_readlink_works="guessing no"
19903else
19904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19905/* end confdefs.h. */
19906#include <unistd.h>
067d23c9 19907
3e0be4ab
GM
19908int
19909main ()
19910{
19911char buf[20];
19912 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
19913 ;
19914 return 0;
19915}
19916_ACEOF
19917if ac_fn_c_try_run "$LINENO"; then :
19918 gl_cv_func_readlink_works=yes
19919else
19920 gl_cv_func_readlink_works=no
067d23c9 19921fi
3e0be4ab
GM
19922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19923 conftest.$ac_objext conftest.beam conftest.$ac_ext
19924fi
19925
19926 rm -f conftest.link conftest.lnk2
19927fi
19928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
19929$as_echo "$gl_cv_func_readlink_works" >&6; }
19930 if test "$gl_cv_func_readlink_works" != yes; then
19931
19932$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
19933
19934 REPLACE_READLINK=1
19935 elif test "$gl_cv_decl_readlink_works" != yes; then
19936 REPLACE_READLINK=1
1fd182f0 19937 fi
1fd182f0 19938 fi
52724a05 19939
3e0be4ab 19940if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
067d23c9 19941
067d23c9
KY
19942
19943
743c80a7 19944
a451f14b
PE
19945
19946
19947
a451f14b 19948
3e0be4ab 19949 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
a451f14b 19950
a451f14b 19951
1fd182f0 19952 :
a451f14b 19953
52724a05 19954fi
a451f14b 19955
743c80a7
PE
19956
19957
cc322c06
GM
19958
19959
3e0be4ab 19960 GNULIB_READLINK=1
743c80a7
PE
19961
19962
a451f14b
PE
19963
19964
19965
e275c824
PE
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
d87ffdb7 19976
e275c824 19977 if test $gl_cv_have_include_next = yes; then
3e0be4ab 19978 gl_cv_next_signal_h='<'signal.h'>'
e275c824 19979 else
3e0be4ab
GM
19980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
19981$as_echo_n "checking absolute name of <signal.h>... " >&6; }
19982if test "${gl_cv_next_signal_h+set}" = set; then :
e275c824
PE
19983 $as_echo_n "(cached) " >&6
19984else
19985
b06b1098 19986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e275c824 19987/* end confdefs.h. */
3e0be4ab 19988#include <signal.h>
e275c824
PE
19989
19990_ACEOF
b06b1098
PE
19991 case "$host_os" in
19992 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19993 *) gl_absname_cpp="$ac_cpp" ;;
19994 esac
3e0be4ab
GM
19995 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19996 sed -n '\#/signal.h#{
19997 s#.*"\(.*/signal.h\)".*#\1#
b06b1098
PE
19998 s#^/[^/]#//&#
19999 p
20000 q
20001 }'`'"'
b06b1098 20002
e275c824
PE
20003
20004fi
3e0be4ab
GM
20005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
20006$as_echo "$gl_cv_next_signal_h" >&6; }
e275c824 20007 fi
3e0be4ab 20008 NEXT_SIGNAL_H=$gl_cv_next_signal_h
e275c824
PE
20009
20010 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20011 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
3e0be4ab 20012 gl_next_as_first_directive='<'signal.h'>'
e275c824
PE
20013 else
20014 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
3e0be4ab 20015 gl_next_as_first_directive=$gl_cv_next_signal_h
e275c824 20016 fi
3e0be4ab 20017 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
e275c824
PE
20018
20019
20020
20021
e275c824 20022
3e0be4ab
GM
20023# AIX declares sig_atomic_t to already include volatile, and C89 compilers
20024# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
20025 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
20026#include <signal.h>
e275c824 20027
3e0be4ab
GM
20028"
20029if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
e275c824 20030
3e0be4ab
GM
20031else
20032 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
20033fi
e275c824 20034
6d153f56
GM
20035
20036
6d153f56
GM
20037
20038
3e0be4ab
GM
20039 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
20040#include <signal.h>
6d153f56 20041
3e0be4ab
GM
20042"
20043if test "x$ac_cv_type_sighandler_t" = x""yes; then :
20044
20045else
20046 HAVE_SIGHANDLER_T=0
20047fi
20048
20049
20050
20051
20052 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
20053/* <sys/types.h> is not needed according to POSIX, but the
20054 <sys/socket.h> in i386-unknown-freebsd4.10 and
20055 powerpc-apple-darwin5.5 required it. */
20056#include <sys/types.h>
20057#if HAVE_SYS_SOCKET_H
20058# include <sys/socket.h>
20059#elif HAVE_WS2TCPIP_H
20060# include <ws2tcpip.h>
20061#endif
20062
20063"
20064if test "x$ac_cv_type_socklen_t" = x""yes; then :
20065
20066else
20067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
20068$as_echo_n "checking for socklen_t equivalent... " >&6; }
20069 if test "${gl_cv_socklen_t_equiv+set}" = set; then :
6d153f56
GM
20070 $as_echo_n "(cached) " >&6
20071else
3e0be4ab
GM
20072 # Systems have either "struct sockaddr *" or
20073 # "void *" as the second argument to getpeername
20074 gl_cv_socklen_t_equiv=
20075 for arg2 in "struct sockaddr" void; do
20076 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
20077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20078/* end confdefs.h. */
20079#include <sys/types.h>
20080 #include <sys/socket.h>
20081
20082 int getpeername (int, $arg2 *, $t *);
20083int
20084main ()
20085{
20086$t len;
20087 getpeername (0, 0, &len);
20088 ;
20089 return 0;
20090}
20091_ACEOF
20092if ac_fn_c_try_compile "$LINENO"; then :
20093 gl_cv_socklen_t_equiv="$t"
20094fi
20095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20096 test "$gl_cv_socklen_t_equiv" != "" && break
20097 done
20098 test "$gl_cv_socklen_t_equiv" != "" && break
20099 done
20100
20101fi
20102
20103 if test "$gl_cv_socklen_t_equiv" = ""; then
20104 as_fn_error "Cannot find a type to use in place of socklen_t" "$LINENO" 5
20105 fi
20106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
20107$as_echo "$gl_cv_socklen_t_equiv" >&6; }
20108
20109cat >>confdefs.h <<_ACEOF
20110#define socklen_t $gl_cv_socklen_t_equiv
20111_ACEOF
20112
20113fi
20114
20115
20116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
20117$as_echo_n "checking for ssize_t... " >&6; }
20118if test "${gt_cv_ssize_t+set}" = set; then :
20119 $as_echo_n "(cached) " >&6
6d153f56
GM
20120else
20121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20122/* end confdefs.h. */
3e0be4ab 20123#include <sys/types.h>
6d153f56
GM
20124int
20125main ()
20126{
3e0be4ab
GM
20127int x = sizeof (ssize_t *) + sizeof (ssize_t);
20128 return !x;
6d153f56
GM
20129 ;
20130 return 0;
20131}
20132_ACEOF
3e0be4ab
GM
20133if ac_fn_c_try_compile "$LINENO"; then :
20134 gt_cv_ssize_t=yes
6d153f56 20135else
3e0be4ab 20136 gt_cv_ssize_t=no
6d153f56 20137fi
3e0be4ab 20138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6d153f56 20139fi
3e0be4ab
GM
20140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
20141$as_echo "$gt_cv_ssize_t" >&6; }
20142 if test $gt_cv_ssize_t = no; then
6d153f56 20143
3e0be4ab
GM
20144$as_echo "#define ssize_t int" >>confdefs.h
20145
20146 fi
20147
20148
20149 STDARG_H=''
20150 NEXT_STDARG_H='<stdarg.h>'
20151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
20152$as_echo_n "checking for va_copy... " >&6; }
20153 if test "${gl_cv_func_va_copy+set}" = set; then :
6d153f56
GM
20154 $as_echo_n "(cached) " >&6
20155else
6d153f56 20156
3e0be4ab
GM
20157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20158/* end confdefs.h. */
20159#include <stdarg.h>
6d153f56
GM
20160int
20161main ()
20162{
3e0be4ab
GM
20163
20164#ifndef va_copy
20165void (*func) (va_list, va_list) = va_copy;
6d153f56 20166#endif
6d153f56
GM
20167
20168 ;
20169 return 0;
20170}
20171_ACEOF
3e0be4ab
GM
20172if ac_fn_c_try_compile "$LINENO"; then :
20173 gl_cv_func_va_copy=yes
6d153f56 20174else
3e0be4ab 20175 gl_cv_func_va_copy=no
6d153f56 20176fi
3e0be4ab 20177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6d153f56 20178fi
6d153f56 20179
3e0be4ab
GM
20180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
20181$as_echo "$gl_cv_func_va_copy" >&6; }
20182 if test $gl_cv_func_va_copy = no; then
20183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20184/* end confdefs.h. */
20185#if defined _AIX && !defined __GNUC__
20186 AIX vaccine
20187 #endif
6d153f56 20188
3e0be4ab
GM
20189_ACEOF
20190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20191 $EGREP "vaccine" >/dev/null 2>&1; then :
20192 gl_aixcc=yes
20193else
20194 gl_aixcc=no
20195fi
20196rm -f conftest*
52724a05 20197
3e0be4ab
GM
20198 if test $gl_aixcc = yes; then
20199 STDARG_H=stdarg.h
6d153f56
GM
20200
20201
20202
20203
20204
20205
20206
20207
3e0be4ab
GM
20208 if test $gl_cv_have_include_next = yes; then
20209 gl_cv_next_stdarg_h='<'stdarg.h'>'
20210 else
20211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
20212$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
20213if test "${gl_cv_next_stdarg_h+set}" = set; then :
20214 $as_echo_n "(cached) " >&6
20215else
6d153f56 20216
3e0be4ab
GM
20217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20218/* end confdefs.h. */
20219#include <stdarg.h>
6d153f56 20220
3e0be4ab
GM
20221_ACEOF
20222 case "$host_os" in
20223 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20224 *) gl_absname_cpp="$ac_cpp" ;;
20225 esac
20226 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20227 sed -n '\#/stdarg.h#{
20228 s#.*"\(.*/stdarg.h\)".*#\1#
20229 s#^/[^/]#//&#
20230 p
20231 q
20232 }'`'"'
6d153f56 20233
52724a05
GM
20234
20235fi
3e0be4ab
GM
20236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
20237$as_echo "$gl_cv_next_stdarg_h" >&6; }
20238 fi
20239 NEXT_STDARG_H=$gl_cv_next_stdarg_h
6d153f56 20240
3e0be4ab
GM
20241 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20242 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20243 gl_next_as_first_directive='<'stdarg.h'>'
20244 else
20245 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20246 gl_next_as_first_directive=$gl_cv_next_stdarg_h
20247 fi
20248 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
6d153f56
GM
20249
20250
cc322c06
GM
20251
20252
3e0be4ab
GM
20253 if test "$gl_cv_next_stdarg_h" = '""'; then
20254 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
20255 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
4fc2b746 20256 fi
3e0be4ab
GM
20257 else
20258
20259 saved_as_echo_n="$as_echo_n"
20260 as_echo_n=':'
20261 if test "${gl_cv_func___va_copy+set}" = set; then :
20262 $as_echo_n "(cached) " >&6
20263else
6d153f56 20264
3e0be4ab
GM
20265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20266/* end confdefs.h. */
20267#include <stdarg.h>
20268int
20269main ()
20270{
6d153f56 20271
3e0be4ab
GM
20272#ifndef __va_copy
20273error, bail out
20274#endif
6d153f56 20275
3e0be4ab
GM
20276 ;
20277 return 0;
20278}
6d153f56 20279_ACEOF
3e0be4ab
GM
20280if ac_fn_c_try_compile "$LINENO"; then :
20281 gl_cv_func___va_copy=yes
20282else
20283 gl_cv_func___va_copy=no
6d153f56 20284fi
3e0be4ab 20285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52724a05 20286fi
6d153f56 20287
3e0be4ab 20288 as_echo_n="$saved_as_echo_n"
6d153f56 20289
3e0be4ab 20290 if test $gl_cv_func___va_copy = yes; then
6d153f56 20291
3e0be4ab 20292$as_echo "#define va_copy __va_copy" >>confdefs.h
cc322c06 20293
3e0be4ab 20294 else
6d153f56
GM
20295
20296
3e0be4ab 20297$as_echo "#define va_copy gl_va_copy" >>confdefs.h
6d153f56 20298
3e0be4ab 20299 fi
6d153f56 20300 fi
6d153f56 20301 fi
6d153f56 20302
3e0be4ab
GM
20303 if test -n "$STDARG_H"; then
20304 GL_GENERATE_STDARG_H_TRUE=
20305 GL_GENERATE_STDARG_H_FALSE='#'
6d153f56 20306else
3e0be4ab
GM
20307 GL_GENERATE_STDARG_H_TRUE='#'
20308 GL_GENERATE_STDARG_H_FALSE=
6d153f56
GM
20309fi
20310
a451f14b 20311
a451f14b 20312
743c80a7
PE
20313
20314
20315
3e0be4ab 20316 # Define two additional variables used in the Makefile substitution.
743c80a7 20317
3e0be4ab
GM
20318 if test "$ac_cv_header_stdbool_h" = yes; then
20319 STDBOOL_H=''
20320 else
20321 STDBOOL_H='stdbool.h'
20322 fi
743c80a7 20323
3e0be4ab
GM
20324 if test -n "$STDBOOL_H"; then
20325 GL_GENERATE_STDBOOL_H_TRUE=
20326 GL_GENERATE_STDBOOL_H_FALSE='#'
20327else
20328 GL_GENERATE_STDBOOL_H_TRUE='#'
20329 GL_GENERATE_STDBOOL_H_FALSE=
20330fi
743c80a7
PE
20331
20332
3e0be4ab
GM
20333 if test "$ac_cv_type__Bool" = yes; then
20334 HAVE__BOOL=1
20335 else
20336 HAVE__BOOL=0
20337 fi
743c80a7
PE
20338
20339
20340
20341
20342
3e0be4ab
GM
20343 STDDEF_H=
20344 if test $gt_cv_c_wchar_t = no; then
20345 HAVE_WCHAR_T=0
20346 STDDEF_H=stddef.h
20347 fi
20348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
20349$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
20350if test "${gl_cv_decl_null_works+set}" = set; then :
20351 $as_echo_n "(cached) " >&6
20352else
20353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20354/* end confdefs.h. */
20355#include <stddef.h>
20356 int test[2 * (sizeof NULL == sizeof (void *)) -1];
a451f14b 20357
3e0be4ab
GM
20358int
20359main ()
20360{
a451f14b 20361
3e0be4ab
GM
20362 ;
20363 return 0;
20364}
20365_ACEOF
20366if ac_fn_c_try_compile "$LINENO"; then :
20367 gl_cv_decl_null_works=yes
20368else
20369 gl_cv_decl_null_works=no
20370fi
20371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20372fi
20373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
20374$as_echo "$gl_cv_decl_null_works" >&6; }
20375 if test $gl_cv_decl_null_works = no; then
20376 REPLACE_NULL=1
20377 STDDEF_H=stddef.h
20378 fi
a451f14b 20379
3e0be4ab
GM
20380 if test -n "$STDDEF_H"; then
20381 GL_GENERATE_STDDEF_H_TRUE=
20382 GL_GENERATE_STDDEF_H_FALSE='#'
20383else
20384 GL_GENERATE_STDDEF_H_TRUE='#'
20385 GL_GENERATE_STDDEF_H_FALSE=
20386fi
a451f14b 20387
3e0be4ab 20388 if test -n "$STDDEF_H"; then
743c80a7 20389
743c80a7
PE
20390
20391
20392
20393
20394
20395
20396
3e0be4ab
GM
20397 if test $gl_cv_have_include_next = yes; then
20398 gl_cv_next_stddef_h='<'stddef.h'>'
20399 else
20400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
20401$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
20402if test "${gl_cv_next_stddef_h+set}" = set; then :
20403 $as_echo_n "(cached) " >&6
20404else
743c80a7 20405
3e0be4ab
GM
20406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20407/* end confdefs.h. */
20408#include <stddef.h>
743c80a7 20409
3e0be4ab
GM
20410_ACEOF
20411 case "$host_os" in
20412 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20413 *) gl_absname_cpp="$ac_cpp" ;;
20414 esac
20415 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20416 sed -n '\#/stddef.h#{
20417 s#.*"\(.*/stddef.h\)".*#\1#
20418 s#^/[^/]#//&#
20419 p
20420 q
20421 }'`'"'
6d153f56 20422
743c80a7 20423
3e0be4ab
GM
20424fi
20425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
20426$as_echo "$gl_cv_next_stddef_h" >&6; }
20427 fi
20428 NEXT_STDDEF_H=$gl_cv_next_stddef_h
743c80a7 20429
3e0be4ab
GM
20430 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20431 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20432 gl_next_as_first_directive='<'stddef.h'>'
20433 else
20434 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20435 gl_next_as_first_directive=$gl_cv_next_stddef_h
20436 fi
20437 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
743c80a7
PE
20438
20439
067d23c9 20440
067d23c9 20441
3e0be4ab 20442 fi
067d23c9 20443
067d23c9 20444
067d23c9
KY
20445
20446
067d23c9 20447
067d23c9 20448
067d23c9 20449
067d23c9 20450
067d23c9 20451
067d23c9 20452
067d23c9 20453
067d23c9 20454
067d23c9 20455
3e0be4ab
GM
20456 if test $gl_cv_have_include_next = yes; then
20457 gl_cv_next_stdio_h='<'stdio.h'>'
20458 else
20459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
20460$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
20461if test "${gl_cv_next_stdio_h+set}" = set; then :
067d23c9
KY
20462 $as_echo_n "(cached) " >&6
20463else
3e0be4ab
GM
20464
20465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 20466/* end confdefs.h. */
3e0be4ab 20467#include <stdio.h>
067d23c9 20468
067d23c9 20469_ACEOF
3e0be4ab
GM
20470 case "$host_os" in
20471 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20472 *) gl_absname_cpp="$ac_cpp" ;;
20473 esac
20474 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20475 sed -n '\#/stdio.h#{
20476 s#.*"\(.*/stdio.h\)".*#\1#
20477 s#^/[^/]#//&#
20478 p
20479 q
20480 }'`'"'
20481
20482
067d23c9 20483fi
3e0be4ab
GM
20484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
20485$as_echo "$gl_cv_next_stdio_h" >&6; }
20486 fi
20487 NEXT_STDIO_H=$gl_cv_next_stdio_h
067d23c9 20488
3e0be4ab
GM
20489 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20490 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20491 gl_next_as_first_directive='<'stdio.h'>'
20492 else
20493 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20494 gl_next_as_first_directive=$gl_cv_next_stdio_h
20495 fi
20496 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
067d23c9 20497
067d23c9 20498
067d23c9 20499
067d23c9 20500
067d23c9 20501
3e0be4ab
GM
20502 GNULIB_FSCANF=1
20503 GNULIB_SCANF=1
20504 GNULIB_FGETC=1
20505 GNULIB_GETC=1
20506 GNULIB_GETCHAR=1
20507 GNULIB_FGETS=1
20508 GNULIB_GETS=1
20509 GNULIB_FREAD=1
067d23c9 20510
067d23c9 20511
3e0be4ab
GM
20512 GNULIB_FPRINTF=1
20513 GNULIB_PRINTF=1
20514 GNULIB_VFPRINTF=1
20515 GNULIB_VPRINTF=1
20516 GNULIB_FPUTC=1
20517 GNULIB_PUTC=1
20518 GNULIB_PUTCHAR=1
20519 GNULIB_FPUTS=1
20520 GNULIB_PUTS=1
20521 GNULIB_FWRITE=1
067d23c9 20522
067d23c9 20523
067d23c9
KY
20524
20525
067d23c9 20526
067d23c9
KY
20527
20528
20529
20530
067d23c9 20531
067d23c9 20532
067d23c9 20533
067d23c9 20534
067d23c9 20535
067d23c9 20536
3e0be4ab
GM
20537 if test $gl_cv_have_include_next = yes; then
20538 gl_cv_next_stdlib_h='<'stdlib.h'>'
20539 else
20540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
20541$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
20542if test "${gl_cv_next_stdlib_h+set}" = set; then :
067d23c9
KY
20543 $as_echo_n "(cached) " >&6
20544else
067d23c9 20545
3e0be4ab 20546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 20547/* end confdefs.h. */
3e0be4ab 20548#include <stdlib.h>
067d23c9 20549
067d23c9 20550_ACEOF
3e0be4ab
GM
20551 case "$host_os" in
20552 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20553 *) gl_absname_cpp="$ac_cpp" ;;
20554 esac
20555 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20556 sed -n '\#/stdlib.h#{
20557 s#.*"\(.*/stdlib.h\)".*#\1#
20558 s#^/[^/]#//&#
20559 p
20560 q
20561 }'`'"'
20562
20563
067d23c9 20564fi
3e0be4ab
GM
20565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
20566$as_echo "$gl_cv_next_stdlib_h" >&6; }
20567 fi
20568 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
20569
20570 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20571 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20572 gl_next_as_first_directive='<'stdlib.h'>'
20573 else
20574 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20575 gl_next_as_first_directive=$gl_cv_next_stdlib_h
20576 fi
20577 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
20588
20589
20590
20591
067d23c9 20592
067d23c9 20593
067d23c9 20594
3e0be4ab 20595$as_echo "#define my_strftime nstrftime" >>confdefs.h
067d23c9 20596
067d23c9 20597
067d23c9 20598
067d23c9 20599
067d23c9
KY
20600
20601
067d23c9 20602
3e0be4ab
GM
20603 if test "$ac_cv_have_decl_strtoimax" != yes; then
20604 HAVE_DECL_STRTOIMAX=0
20605
20606 for ac_func in strtoimax
20607do :
20608 ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax"
20609if test "x$ac_cv_func_strtoimax" = x""yes; then :
20610 cat >>confdefs.h <<_ACEOF
20611#define HAVE_STRTOIMAX 1
20612_ACEOF
067d23c9 20613
067d23c9 20614fi
3e0be4ab 20615done
067d23c9 20616
3e0be4ab 20617 fi
067d23c9 20618
3e0be4ab 20619if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then
067d23c9 20620
067d23c9 20621
067d23c9
KY
20622
20623
067d23c9 20624
067d23c9 20625
067d23c9 20626
067d23c9 20627
3e0be4ab 20628 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
067d23c9 20629
067d23c9 20630
3e0be4ab
GM
20631 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
20632if test "x$ac_cv_have_decl_strtoll" = x""yes; then :
20633 ac_have_decl=1
067d23c9 20634else
3e0be4ab 20635 ac_have_decl=0
067d23c9
KY
20636fi
20637
3e0be4ab
GM
20638cat >>confdefs.h <<_ACEOF
20639#define HAVE_DECL_STRTOLL $ac_have_decl
20640_ACEOF
067d23c9 20641
067d23c9 20642
067d23c9 20643
067d23c9
KY
20644fi
20645
067d23c9 20646
067d23c9 20647
067d23c9 20648
067d23c9 20649
3e0be4ab
GM
20650 GNULIB_STRTOIMAX=1
20651
20652
20653
067d23c9 20654
067d23c9 20655
067d23c9 20656
3e0be4ab
GM
20657
20658
20659 if test "$ac_cv_have_decl_strtoumax" != yes; then
20660 HAVE_DECL_STRTOUMAX=0
20661
20662 for ac_func in strtoumax
20663do :
20664 ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax"
20665if test "x$ac_cv_func_strtoumax" = x""yes; then :
20666 cat >>confdefs.h <<_ACEOF
20667#define HAVE_STRTOUMAX 1
067d23c9 20668_ACEOF
3e0be4ab 20669
067d23c9 20670fi
3e0be4ab 20671done
067d23c9 20672
3e0be4ab 20673 fi
067d23c9 20674
3e0be4ab 20675if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
067d23c9 20676
067d23c9 20677
067d23c9 20678
067d23c9 20679
067d23c9 20680
067d23c9 20681
3e0be4ab
GM
20682
20683
20684 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
20685
20686
20687 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
20688if test "x$ac_cv_have_decl_strtoull" = x""yes; then :
20689 ac_have_decl=1
067d23c9 20690else
3e0be4ab 20691 ac_have_decl=0
067d23c9 20692fi
3e0be4ab
GM
20693
20694cat >>confdefs.h <<_ACEOF
20695#define HAVE_DECL_STRTOULL $ac_have_decl
20696_ACEOF
20697
20698
20699
067d23c9
KY
20700fi
20701
067d23c9 20702
067d23c9 20703
3e0be4ab
GM
20704
20705
20706 GNULIB_STRTOUMAX=1
20707
20708
20709
20710
20711
20712
20713
20714 if test $ac_cv_func_symlink = no; then
20715 HAVE_SYMLINK=0
20716 else
20717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
20718$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
20719if test "${gl_cv_func_symlink_works+set}" = set; then :
067d23c9
KY
20720 $as_echo_n "(cached) " >&6
20721else
3e0be4ab
GM
20722 if test "$cross_compiling" = yes; then :
20723 gl_cv_func_symlink_works="guessing no"
20724else
20725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 20726/* end confdefs.h. */
3e0be4ab 20727#include <unistd.h>
067d23c9 20728
067d23c9
KY
20729int
20730main ()
20731{
3e0be4ab
GM
20732int result = 0;
20733 if (!symlink ("a", "conftest.link/"))
20734 result |= 1;
20735 if (symlink ("conftest.f", "conftest.lnk2"))
20736 result |= 2;
20737 else if (!symlink ("a", "conftest.lnk2/"))
20738 result |= 4;
20739 return result;
20740
067d23c9
KY
20741 ;
20742 return 0;
20743}
20744_ACEOF
3e0be4ab
GM
20745if ac_fn_c_try_run "$LINENO"; then :
20746 gl_cv_func_symlink_works=yes
067d23c9 20747else
3e0be4ab
GM
20748 gl_cv_func_symlink_works=no
20749fi
20750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20751 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9
KY
20752fi
20753
3e0be4ab 20754 rm -f conftest.f conftest.link conftest.lnk2
067d23c9 20755fi
3e0be4ab
GM
20756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
20757$as_echo "$gl_cv_func_symlink_works" >&6; }
20758 if test "$gl_cv_func_symlink_works" != yes; then
20759 REPLACE_SYMLINK=1
20760 fi
20761 fi
067d23c9 20762
3e0be4ab 20763if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
067d23c9
KY
20764
20765
067d23c9 20766
067d23c9 20767
067d23c9 20768
067d23c9 20769
067d23c9 20770
3e0be4ab
GM
20771
20772 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
067d23c9
KY
20773
20774fi
20775
067d23c9 20776
067d23c9 20777
067d23c9 20778
067d23c9 20779
3e0be4ab 20780 GNULIB_SYMLINK=1
067d23c9 20781
067d23c9 20782
067d23c9 20783
067d23c9 20784
067d23c9 20785
067d23c9 20786
067d23c9 20787
067d23c9 20788
067d23c9 20789
067d23c9 20790
067d23c9 20791
067d23c9 20792
067d23c9 20793
067d23c9
KY
20794
20795
20796
20797
20798
20799
20800
3e0be4ab
GM
20801
20802 if test $gl_cv_have_include_next = yes; then
20803 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
20804 else
20805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
20806$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
20807if test "${gl_cv_next_sys_stat_h+set}" = set; then :
067d23c9
KY
20808 $as_echo_n "(cached) " >&6
20809else
3e0be4ab
GM
20810
20811 if test $ac_cv_header_sys_stat_h = yes; then
20812
20813
20814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
067d23c9 20815/* end confdefs.h. */
3e0be4ab 20816#include <sys/stat.h>
067d23c9 20817
067d23c9 20818_ACEOF
3e0be4ab
GM
20819 case "$host_os" in
20820 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20821 *) gl_absname_cpp="$ac_cpp" ;;
20822 esac
20823 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20824 sed -n '\#/sys/stat.h#{
20825 s#.*"\(.*/sys/stat.h\)".*#\1#
20826 s#^/[^/]#//&#
20827 p
20828 q
20829 }'`'"'
20830 else
20831 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
20832 fi
067d23c9 20833
067d23c9
KY
20834
20835fi
3e0be4ab
GM
20836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
20837$as_echo "$gl_cv_next_sys_stat_h" >&6; }
20838 fi
20839 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
067d23c9 20840
3e0be4ab
GM
20841 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20842 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20843 gl_next_as_first_directive='<'sys/stat.h'>'
20844 else
20845 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20846 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
20847 fi
20848 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
067d23c9 20849
3e0be4ab
GM
20850
20851
20852
20853
20854 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
20855 #include <sys/stat.h>
20856"
20857if test "x$ac_cv_type_nlink_t" = x""yes; then :
067d23c9
KY
20858
20859else
067d23c9 20860
3e0be4ab 20861$as_echo "#define nlink_t int" >>confdefs.h
067d23c9
KY
20862
20863fi
20864
067d23c9 20865
067d23c9 20866
3e0be4ab
GM
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879 if test $ac_cv_have_decl_localtime_r = no; then
20880 HAVE_DECL_LOCALTIME_R=0
20881 fi
20882
20883
20884 if test $ac_cv_func_localtime_r = yes; then
20885 HAVE_LOCALTIME_R=1
20886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
20887$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
20888if test "${gl_cv_time_r_posix+set}" = set; then :
067d23c9
KY
20889 $as_echo_n "(cached) " >&6
20890else
20891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20892/* end confdefs.h. */
067d23c9 20893#include <time.h>
067d23c9
KY
20894int
20895main ()
20896{
3e0be4ab
GM
20897/* We don't need to append 'restrict's to the argument types,
20898 even though the POSIX signature has the 'restrict's,
20899 since C99 says they can't affect type compatibility. */
20900 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
20901 if (ptr) return 0;
20902 /* Check the return type is a pointer.
20903 On HP-UX 10 it is 'int'. */
20904 *localtime_r (0, 0);
067d23c9
KY
20905 ;
20906 return 0;
20907}
3e0be4ab 20908
067d23c9
KY
20909_ACEOF
20910if ac_fn_c_try_compile "$LINENO"; then :
3e0be4ab 20911 gl_cv_time_r_posix=yes
067d23c9 20912else
3e0be4ab 20913 gl_cv_time_r_posix=no
067d23c9
KY
20914fi
20915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
067d23c9 20916
3e0be4ab
GM
20917fi
20918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
20919$as_echo "$gl_cv_time_r_posix" >&6; }
20920 if test $gl_cv_time_r_posix = yes; then
20921 REPLACE_LOCALTIME_R=0
20922 else
20923 REPLACE_LOCALTIME_R=1
067d23c9 20924 fi
3e0be4ab
GM
20925 else
20926 HAVE_LOCALTIME_R=0
067d23c9 20927 fi
067d23c9 20928
3e0be4ab 20929if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
067d23c9 20930
067d23c9 20931
067d23c9 20932
067d23c9
KY
20933
20934
067d23c9 20935
067d23c9
KY
20936
20937
3e0be4ab 20938 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
067d23c9 20939
3e0be4ab
GM
20940
20941 :
067d23c9
KY
20942
20943fi
20944
067d23c9 20945
067d23c9 20946
067d23c9 20947
067d23c9 20948
3e0be4ab 20949 GNULIB_TIME_R=1
067d23c9 20950
067d23c9 20951
067d23c9 20952
067d23c9 20953
067d23c9 20954
067d23c9 20955
067d23c9 20956
067d23c9 20957
067d23c9 20958
067d23c9 20959
067d23c9 20960
3e0be4ab
GM
20961
20962
20963
20964
20965
20966
20967
20968
20969 if test $gl_cv_have_include_next = yes; then
20970 gl_cv_next_unistd_h='<'unistd.h'>'
20971 else
20972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
20973$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
20974if test "${gl_cv_next_unistd_h+set}" = set; then :
067d23c9
KY
20975 $as_echo_n "(cached) " >&6
20976else
067d23c9 20977
3e0be4ab
GM
20978 if test $ac_cv_header_unistd_h = yes; then
20979
20980
20981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20982/* end confdefs.h. */
20983#include <unistd.h>
067d23c9 20984
067d23c9 20985_ACEOF
3e0be4ab
GM
20986 case "$host_os" in
20987 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20988 *) gl_absname_cpp="$ac_cpp" ;;
20989 esac
20990 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20991 sed -n '\#/unistd.h#{
20992 s#.*"\(.*/unistd.h\)".*#\1#
20993 s#^/[^/]#//&#
20994 p
20995 q
20996 }'`'"'
20997 else
20998 gl_cv_next_unistd_h='<'unistd.h'>'
20999 fi
067d23c9 21000
067d23c9 21001
067d23c9 21002fi
3e0be4ab
GM
21003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
21004$as_echo "$gl_cv_next_unistd_h" >&6; }
21005 fi
21006 NEXT_UNISTD_H=$gl_cv_next_unistd_h
067d23c9 21007
3e0be4ab
GM
21008 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21009 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21010 gl_next_as_first_directive='<'unistd.h'>'
21011 else
21012 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21013 gl_next_as_first_directive=$gl_cv_next_unistd_h
21014 fi
21015 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
067d23c9 21016
067d23c9 21017
067d23c9 21018
067d23c9 21019
3e0be4ab
GM
21020 if test $ac_cv_header_unistd_h = yes; then
21021 HAVE_UNISTD_H=1
21022 else
21023 HAVE_UNISTD_H=0
21024 fi
067d23c9 21025
067d23c9 21026
067d23c9 21027
067d23c9 21028
3e0be4ab
GM
21029 gl_gnulib_enabled_dosname=false
21030 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
21031 gl_gnulib_enabled_sigprocmask=false
21032 gl_gnulib_enabled_stat=false
21033 gl_gnulib_enabled_strtoll=false
21034 gl_gnulib_enabled_strtoull=false
21035 gl_gnulib_enabled_verify=false
21036 func_gl_gnulib_m4code_dosname ()
21037 {
21038 if ! $gl_gnulib_enabled_dosname; then
21039 gl_gnulib_enabled_dosname=true
21040 fi
067d23c9 21041 }
3e0be4ab
GM
21042 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 ()
21043 {
21044 if ! $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
067d23c9 21045
067d23c9 21046
3e0be4ab
GM
21047 gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
21048 fi
21049 }
21050 func_gl_gnulib_m4code_sigprocmask ()
21051 {
21052 if ! $gl_gnulib_enabled_sigprocmask; then
21053
21054
21055
21056 if test $gl_cv_type_sigset_t = yes; then
21057 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
21058if test "x$ac_cv_func_sigprocmask" = x""yes; then :
21059 gl_cv_func_sigprocmask=1
067d23c9
KY
21060fi
21061
3e0be4ab
GM
21062 fi
21063 if test -z "$gl_cv_func_sigprocmask"; then
21064 HAVE_POSIX_SIGNALBLOCKING=0
21065 fi
21066
21067if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
21068
21069
067d23c9 21070
067d23c9 21071
067d23c9 21072
067d23c9 21073
067d23c9 21074
067d23c9 21075
3e0be4ab
GM
21076 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
21077
21078 :
067d23c9
KY
21079fi
21080
21081
3e0be4ab
GM
21082
21083
21084
21085 GNULIB_SIGPROCMASK=1
21086
21087
21088
21089
21090
21091 gl_gnulib_enabled_sigprocmask=true
21092 fi
21093 }
21094 func_gl_gnulib_m4code_stat ()
21095 {
21096 if ! $gl_gnulib_enabled_stat; then
21097
21098
21099
21100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
21101$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
21102if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
067d23c9 21103 $as_echo_n "(cached) " >&6
3e0be4ab
GM
21104else
21105 if test "$cross_compiling" = yes; then :
21106 case $host_os in
21107 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
21108 *) gl_cv_func_stat_dir_slash="guessing yes";;
21109 esac
067d23c9
KY
21110else
21111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21112/* end confdefs.h. */
3e0be4ab
GM
21113#include <sys/stat.h>
21114
067d23c9
KY
21115int
21116main ()
21117{
3e0be4ab 21118struct stat st; return stat (".", &st) != stat ("./", &st);
067d23c9
KY
21119 ;
21120 return 0;
21121}
21122_ACEOF
3e0be4ab
GM
21123if ac_fn_c_try_run "$LINENO"; then :
21124 gl_cv_func_stat_dir_slash=yes
067d23c9 21125else
3e0be4ab 21126 gl_cv_func_stat_dir_slash=no
067d23c9 21127fi
3e0be4ab
GM
21128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21129 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 21130fi
067d23c9
KY
21131
21132fi
3e0be4ab
GM
21133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
21134$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
21135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
21136$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
21137if test "${gl_cv_func_stat_file_slash+set}" = set; then :
067d23c9 21138 $as_echo_n "(cached) " >&6
3e0be4ab
GM
21139else
21140 touch conftest.tmp
21141 # Assume that if we have lstat, we can also check symlinks.
21142 if test $ac_cv_func_lstat = yes; then
21143 ln -s conftest.tmp conftest.lnk
21144 fi
21145 if test "$cross_compiling" = yes; then :
21146 gl_cv_func_stat_file_slash="guessing no"
067d23c9
KY
21147else
21148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21149/* end confdefs.h. */
3e0be4ab
GM
21150#include <sys/stat.h>
21151
067d23c9
KY
21152int
21153main ()
21154{
3e0be4ab
GM
21155int result = 0;
21156 struct stat st;
21157 if (!stat ("conftest.tmp/", &st))
21158 result |= 1;
21159#if HAVE_LSTAT
21160 if (!stat ("conftest.lnk/", &st))
21161 result |= 2;
21162#endif
21163 return result;
21164
067d23c9
KY
21165 ;
21166 return 0;
21167}
21168_ACEOF
3e0be4ab
GM
21169if ac_fn_c_try_run "$LINENO"; then :
21170 gl_cv_func_stat_file_slash=yes
067d23c9 21171else
3e0be4ab 21172 gl_cv_func_stat_file_slash=no
067d23c9 21173fi
3e0be4ab
GM
21174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21175 conftest.$ac_objext conftest.beam conftest.$ac_ext
067d23c9 21176fi
067d23c9 21177
3e0be4ab
GM
21178 rm -f conftest.tmp conftest.lnk
21179fi
21180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
21181$as_echo "$gl_cv_func_stat_file_slash" >&6; }
21182 case $gl_cv_func_stat_dir_slash in
21183 *no) REPLACE_STAT=1
067d23c9 21184
3e0be4ab
GM
21185$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
21186;;
21187 esac
21188 case $gl_cv_func_stat_file_slash in
21189 *no) REPLACE_STAT=1
067d23c9 21190
3e0be4ab
GM
21191$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
21192;;
21193 esac
067d23c9 21194
3e0be4ab 21195if test $REPLACE_STAT = 1; then
067d23c9 21196
067d23c9 21197
067d23c9 21198
067d23c9 21199
067d23c9
KY
21200
21201
21202
067d23c9 21203
3e0be4ab 21204 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
067d23c9 21205
067d23c9 21206
3e0be4ab
GM
21207
21208 :
21209
21210fi
067d23c9
KY
21211
21212
067d23c9
KY
21213
21214
21215
3e0be4ab 21216 GNULIB_STAT=1
067d23c9
KY
21217
21218
21219
21220
21221
3e0be4ab
GM
21222 gl_gnulib_enabled_stat=true
21223 if $condition; then
21224 func_gl_gnulib_m4code_dosname
21225 fi
21226 if $condition; then
21227 func_gl_gnulib_m4code_verify
21228 fi
21229 fi
21230 }
21231 func_gl_gnulib_m4code_strtoll ()
21232 {
21233 if ! $gl_gnulib_enabled_strtoll; then
067d23c9
KY
21234
21235
21236
3e0be4ab
GM
21237 if test "$ac_cv_type_long_long_int" = yes; then
21238 for ac_func in strtoll
21239do :
21240 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
21241if test "x$ac_cv_func_strtoll" = x""yes; then :
21242 cat >>confdefs.h <<_ACEOF
21243#define HAVE_STRTOLL 1
21244_ACEOF
067d23c9 21245
3e0be4ab
GM
21246fi
21247done
067d23c9 21248
3e0be4ab
GM
21249 if test $ac_cv_func_strtoll = no; then
21250 HAVE_STRTOLL=0
21251 fi
21252 fi
067d23c9 21253
3e0be4ab 21254if test $HAVE_STRTOLL = 0; then
067d23c9
KY
21255
21256
21257
21258
21259
21260
067d23c9
KY
21261
21262
3e0be4ab 21263 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
067d23c9
KY
21264
21265
3e0be4ab 21266 :
067d23c9 21267
d6a003a8 21268fi
067d23c9
KY
21269
21270
21271
21272
21273
3e0be4ab 21274 GNULIB_STRTOLL=1
067d23c9
KY
21275
21276
21277
21278
21279
3e0be4ab
GM
21280 gl_gnulib_enabled_strtoll=true
21281 fi
21282 }
21283 func_gl_gnulib_m4code_strtoull ()
21284 {
21285 if ! $gl_gnulib_enabled_strtoull; then
067d23c9 21286
067d23c9
KY
21287
21288
3e0be4ab
GM
21289 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
21290 for ac_func in strtoull
21291do :
21292 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
21293if test "x$ac_cv_func_strtoull" = x""yes; then :
21294 cat >>confdefs.h <<_ACEOF
21295#define HAVE_STRTOULL 1
067d23c9
KY
21296_ACEOF
21297
d6a003a8 21298fi
3e0be4ab 21299done
067d23c9 21300
3e0be4ab
GM
21301 if test $ac_cv_func_strtoull = no; then
21302 HAVE_STRTOULL=0
21303 fi
21304 fi
067d23c9 21305
3e0be4ab 21306if test $HAVE_STRTOULL = 0; then
067d23c9 21307
067d23c9 21308
067d23c9 21309
067d23c9 21310
067d23c9
KY
21311
21312
21313
21314
3e0be4ab 21315 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
067d23c9 21316
067d23c9 21317
3e0be4ab 21318 :
067d23c9 21319
3e0be4ab 21320fi
067d23c9 21321
067d23c9 21322
067d23c9 21323
067d23c9 21324
067d23c9 21325
3e0be4ab 21326 GNULIB_STRTOULL=1
067d23c9
KY
21327
21328
067d23c9
KY
21329
21330
3e0be4ab
GM
21331
21332 gl_gnulib_enabled_strtoull=true
21333 fi
21334 }
21335 func_gl_gnulib_m4code_verify ()
21336 {
21337 if ! $gl_gnulib_enabled_verify; then
21338 gl_gnulib_enabled_verify=true
21339 fi
21340 }
21341 if test $REPLACE_GETOPT = 1; then
21342 func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36
21343 fi
21344 if test $REPLACE_LSTAT = 1; then
21345 func_gl_gnulib_m4code_dosname
21346 fi
21347 if test $REPLACE_LSTAT = 1; then
21348 func_gl_gnulib_m4code_stat
21349 fi
21350 if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
21351 func_gl_gnulib_m4code_sigprocmask
21352 fi
21353 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
21354 func_gl_gnulib_m4code_stat
21355 fi
21356 if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then
21357 func_gl_gnulib_m4code_verify
21358 fi
21359 if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then
21360 func_gl_gnulib_m4code_strtoll
21361 fi
21362 if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
21363 func_gl_gnulib_m4code_verify
21364 fi
21365 if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no && test $ac_cv_type_unsigned_long_long_int = yes; then
21366 func_gl_gnulib_m4code_strtoull
21367 fi
21368
21369 if $gl_gnulib_enabled_dosname; then
21370 gl_GNULIB_ENABLED_dosname_TRUE=
21371 gl_GNULIB_ENABLED_dosname_FALSE='#'
067d23c9 21372else
3e0be4ab
GM
21373 gl_GNULIB_ENABLED_dosname_TRUE='#'
21374 gl_GNULIB_ENABLED_dosname_FALSE=
067d23c9
KY
21375fi
21376
3e0be4ab
GM
21377 if $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36; then
21378 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE=
21379 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE='#'
21380else
21381 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE='#'
21382 gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE=
21383fi
067d23c9 21384
3e0be4ab
GM
21385 if $gl_gnulib_enabled_sigprocmask; then
21386 gl_GNULIB_ENABLED_sigprocmask_TRUE=
21387 gl_GNULIB_ENABLED_sigprocmask_FALSE='#'
21388else
21389 gl_GNULIB_ENABLED_sigprocmask_TRUE='#'
21390 gl_GNULIB_ENABLED_sigprocmask_FALSE=
21391fi
067d23c9 21392
3e0be4ab
GM
21393 if $gl_gnulib_enabled_stat; then
21394 gl_GNULIB_ENABLED_stat_TRUE=
21395 gl_GNULIB_ENABLED_stat_FALSE='#'
21396else
21397 gl_GNULIB_ENABLED_stat_TRUE='#'
21398 gl_GNULIB_ENABLED_stat_FALSE=
21399fi
067d23c9 21400
3e0be4ab
GM
21401 if $gl_gnulib_enabled_strtoll; then
21402 gl_GNULIB_ENABLED_strtoll_TRUE=
21403 gl_GNULIB_ENABLED_strtoll_FALSE='#'
21404else
21405 gl_GNULIB_ENABLED_strtoll_TRUE='#'
21406 gl_GNULIB_ENABLED_strtoll_FALSE=
21407fi
067d23c9 21408
3e0be4ab
GM
21409 if $gl_gnulib_enabled_strtoull; then
21410 gl_GNULIB_ENABLED_strtoull_TRUE=
21411 gl_GNULIB_ENABLED_strtoull_FALSE='#'
067d23c9 21412else
3e0be4ab
GM
21413 gl_GNULIB_ENABLED_strtoull_TRUE='#'
21414 gl_GNULIB_ENABLED_strtoull_FALSE=
067d23c9
KY
21415fi
21416
3e0be4ab
GM
21417 if $gl_gnulib_enabled_verify; then
21418 gl_GNULIB_ENABLED_verify_TRUE=
21419 gl_GNULIB_ENABLED_verify_FALSE='#'
21420else
21421 gl_GNULIB_ENABLED_verify_TRUE='#'
21422 gl_GNULIB_ENABLED_verify_FALSE=
067d23c9
KY
21423fi
21424
3e0be4ab 21425 # End of code from modules
067d23c9
KY
21426
21427
21428
21429
21430
21431
067d23c9 21432
067d23c9 21433
067d23c9 21434
3e0be4ab
GM
21435 gltests_libdeps=
21436 gltests_ltlibdeps=
067d23c9 21437
067d23c9 21438
067d23c9 21439
067d23c9 21440
067d23c9
KY
21441
21442
067d23c9
KY
21443
21444
3e0be4ab
GM
21445
21446 gl_source_base='tests'
21447 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
21448
21449 gl_module_indicator_condition=$gltests_WITNESS
21450
21451
21452
21453
21454
21455
21456
067d23c9
KY
21457
21458
21459
3e0be4ab
GM
21460 LIBGNU_LIBDEPS="$gl_libdeps"
21461
21462 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
21463
067d23c9
KY
21464
21465
21466case "$opsys" in
21467 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
21468
21469 darwin)
21470 ## The -headerpad option tells ld (see man page) to leave room at the
21471 ## end of the header for adding load commands. Needed for dumping.
21472 ## 0x690 is the total size of 30 segment load commands (at 56
21473 ## each); under Cocoa 31 commands are required.
21474 if test "$HAVE_NS" = "yes"; then
21475 libs_nsgui="-framework AppKit"
21476 headerpad_extra=6C8
21477 else
21478 libs_nsgui=
21479 headerpad_extra=690
21480 fi
85cf5029 21481 LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
067d23c9
KY
21482
21483 ## This is here because src/Makefile.in did some extra fiddling around
21484 ## with LD_SWITCH_SYSTEM. The cpp logic was:
21485 ## #ifndef LD_SWITCH_SYSTEM
21486 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
21487 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
21488 ## not using gcc, darwin system not on an alpha (ie darwin, since
21489 ## darwin + alpha does not occur).
21490 ## Because this was done in src/Makefile.in, the resulting part of
21491 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
21492 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
21493 ## rather than LD_SWITCH_SYSTEM.
21494 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
21495 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
21496 ;;
21497
21498 ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
21499 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
21500 ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
21501 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
21502 ## had different values in configure (in ac_link) and src/Makefile.in.
21503 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
21504 gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
21505
21506 *) LD_SWITCH_SYSTEM_TEMACS= ;;
21507esac
21508
21509if test "$NS_IMPL_GNUSTEP" = "yes"; then
21510 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
21511fi
21512
21513
21514
21515
21516LD_FIRSTFLAG=
21517ORDINARY_LINK=
21518case "$opsys" in
21519 ## gnu: GNU needs its own crt0.
21520 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
21521
21522 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
21523 ## library search parth, i.e. it won't search /usr/lib for libc and
21524 ## friends. Using -nostartfiles instead avoids this problem, and
21525 ## will also work on earlier NetBSD releases.
21526 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
21527
21528 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
21529 ## MkLinux/LinuxPPC needs this.
21530 ## ibms390x only supports opsys = gnu-linux so it can be added here.
21531 gnu-*)
21532 case "$machine" in
21533 macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;;
21534 esac
21535 ;;
21536esac
21537
21538
21539if test "x$ORDINARY_LINK" = "xyes"; then
21540
21541 LD_FIRSTFLAG=""
21542
21543$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
21544
21545
21546## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
21547## freebsd, gnu-* not on macppc|ibms390x.
21548elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
21549
21550 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
21551 ## places that are difficult to figure out at make time. Fortunately,
21552 ## these same versions allow you to pass arbitrary flags on to the
21553 ## linker, so there is no reason not to use it as a linker.
21554 ##
21555 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
21556 ## searching for libraries in its internal directories, so we have to
21557 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
21558 LD_FIRSTFLAG="-nostdlib"
21559fi
21560
21561## FIXME? What setting of EDIT_LDFLAGS should this have?
21562test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
21563
21564
21565
21566
21567## FIXME? The logic here is not precisely the same as that above.
21568## There is no check here for a pre-defined LD_FIRSTFLAG.
21569## Should we only be setting LIB_GCC if LD ~ -nostdlib?
21570LIB_GCC=
21571if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
21572
21573 case "$opsys" in
21574 freebsd|netbsd|openbsd) LIB_GCC= ;;
21575
21576 gnu-*)
21577 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
21578 ## build on ARM EABI under GNU/Linux. (Bug#5518)
d6a003a8
AS
21579 case $host_cpu in
21580 arm*)
067d23c9 21581 LIB_GCC="-lgcc_s"
d6a003a8
AS
21582 ;;
21583 *)
067d23c9
KY
21584 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
21585 ## immediately undefine it again and redefine it to empty.
21586 ## Was the C_SWITCH_X_SITE part really necessary?
21587## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
21588 LIB_GCC=
d6a003a8
AS
21589 ;;
21590 esac
067d23c9
KY
21591 ;;
21592
21593 ## Ask GCC where to find libgcc.a.
21594 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
21595 esac
21596fi
21597
21598
067d23c9
KY
21599## If we're using X11/GNUstep, define some consequences.
21600if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
21601
21602$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
21603
21604
21605$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
21606
067d23c9
KY
21607fi
21608
21609
21610
21611
067d23c9
KY
21612#### Report on what we decided to do.
21613#### Report GTK as a toolkit, even if it doesn't use Xt.
21614#### It makes printing result more understandable as using GTK sets
21615#### toolkit_scroll_bars to yes by default.
21616if test "${HAVE_GTK}" = "yes"; then
21617 USE_X_TOOLKIT=GTK
21618fi
21619
2b7f50d8
AS
21620and_machfile=
21621if test -n "$machfile"; then
21622 and_machfile=" and \`${machfile}'"
21623fi
21624
067d23c9
KY
21625echo "
21626Configured for \`${canonical}'.
21627
21628 Where should the build process find the source code? ${srcdir}
21629 What operating system and machine description files should Emacs use?
2b7f50d8 21630 \`${opsysfile}'${and_machfile}
067d23c9
KY
21631 What compiler should emacs be built with? ${CC} ${CFLAGS}
21632 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
21633 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
21634 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
21635 What window system should Emacs use? ${window_system}
21636 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
21637
21638if test -n "${x_includes}"; then
21639echo " Where do we find X Windows header files? ${x_includes}"
21640else
21641echo " Where do we find X Windows header files? Standard dirs"
21642fi
21643if test -n "${x_libraries}"; then
21644echo " Where do we find X Windows libraries? ${x_libraries}"
21645else
21646echo " Where do we find X Windows libraries? Standard dirs"
21647fi
21648
21649echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
21650echo " Does Emacs use -lXpm? ${HAVE_XPM}"
21651echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
21652echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
21653echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
21654echo " Does Emacs use -lpng? ${HAVE_PNG}"
21655echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
21656echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
21657
21658echo " Does Emacs use -lgpm? ${HAVE_GPM}"
21659echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
21660echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
f527bd02 21661echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}"
067d23c9 21662echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
b8bd6c8d 21663echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}"
067d23c9
KY
21664echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
21665
21666echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
21667echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
21668echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
21669echo " Does Emacs use -lxft? ${HAVE_XFT}"
21670
21671echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
21672echo
21673
21674if test $USE_XASSERTS = yes; then
21675 echo " Compiling with asserts turned on."
21676 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
21677fi
21678
21679echo
21680
21681if test "$HAVE_NS" = "yes"; then
21682 echo
21683 echo "You must run \"make install\" in order to test the built application.
21684The installed application will go to nextstep/Emacs.app and can be
21685run or moved from there."
21686 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
21687 echo "The application will be fully self-contained."
21688 else
21689 echo "The lisp resources for the application will be installed under ${prefix}.
21690You may need to run \"make install\" with sudo. The application will fail
21691to run if these resources are not installed."
21692 fi
21693 echo
21694fi
21695
21696
21697# Remove any trailing slashes in these variables.
21698test "${prefix}" != NONE &&
21699 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
21700test "${exec_prefix}" != NONE &&
21701 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
21702
56ade35c
GM
21703SUBDIR_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"
21704
21705ac_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"
21706
a877df06 21707
73b78882 21708opt_makefile=test/automated/Makefile
a877df06 21709
56ade35c 21710if test -f $srcdir/${opt_makefile}.in; then
73b78882 21711 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
56ade35c 21712 ac_config_files="$ac_config_files test/automated/Makefile"
a877df06 21713
56ade35c 21714fi
73b78882 21715
56ade35c 21716SUBDIR_MAKEFILES_IN=`echo " ${SUBDIR_MAKEFILES}" | sed -e 's| | $(srcdir)/|g' -e 's|Makefile|Makefile.in|g'`
73b78882 21717
067d23c9 21718
9411886d
PE
21719
21720ac_config_commands="$ac_config_commands mkdirs"
21721
21722
21723ac_config_commands="$ac_config_commands epaths"
21724
21725
21726ac_config_commands="$ac_config_commands gdbinit"
21727
067d23c9
KY
21728
21729cat >confcache <<\_ACEOF
21730# This file is a shell script that caches the results of configure
21731# tests run on this system so they can be shared between configure
21732# scripts and configure runs, see configure's option --config-cache.
21733# It is not useful on other systems. If it contains results you don't
21734# want to keep, you may remove or edit it.
21735#
21736# config.status only pays attention to the cache file if you give it
21737# the --recheck option to rerun configure.
21738#
21739# `ac_cv_env_foo' variables (set or unset) will be overridden when
21740# loading this file, other *unset* `ac_cv_foo' will be assigned the
21741# following values.
21742
21743_ACEOF
21744
21745# The following way of writing the cache mishandles newlines in values,
21746# but we know of no workaround that is simple, portable, and efficient.
21747# So, we kill variables containing newlines.
21748# Ultrix sh set writes to stderr and can't be redirected directly,
21749# and sets the high bit in the cache file unless we assign to the vars.
21750(
21751 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21752 eval ac_val=\$$ac_var
21753 case $ac_val in #(
21754 *${as_nl}*)
21755 case $ac_var in #(
21756 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21757$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21758 esac
21759 case $ac_var in #(
21760 _ | IFS | as_nl) ;; #(
21761 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21762 *) { eval $ac_var=; unset $ac_var;} ;;
21763 esac ;;
21764 esac
21765 done
21766
21767 (set) 2>&1 |
21768 case $as_nl`(ac_space=' '; set) 2>&1` in #(
21769 *${as_nl}ac_space=\ *)
21770 # `set' does not quote correctly, so add quotes: double-quote
21771 # substitution turns \\\\ into \\, and sed turns \\ into \.
21772 sed -n \
21773 "s/'/'\\\\''/g;
21774 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21775 ;; #(
21776 *)
21777 # `set' quotes correctly as required by POSIX, so do not add quotes.
21778 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21779 ;;
21780 esac |
21781 sort
21782) |
21783 sed '
21784 /^ac_cv_env_/b end
21785 t clear
21786 :clear
21787 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21788 t end
21789 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21790 :end' >>confcache
21791if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21792 if test -w "$cache_file"; then
5f64f7bd 21793 test "x$cache_file" != "x/dev/null" &&
067d23c9
KY
21794 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21795$as_echo "$as_me: updating cache $cache_file" >&6;}
5f64f7bd 21796 cat confcache >$cache_file
067d23c9
KY
21797 else
21798 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21799$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21800 fi
21801fi
21802rm -f confcache
21803
21804test "x$prefix" = xNONE && prefix=$ac_default_prefix
21805# Let make expand exec_prefix.
21806test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21807
21808DEFS=-DHAVE_CONFIG_H
21809
21810ac_libobjs=
21811ac_ltlibobjs=
21812for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21813 # 1. Remove the extension, and $U if already installed.
21814 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21815 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21816 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
21817 # will be set to the directory where LIBOBJS objects are built.
21818 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21819 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21820done
21821LIBOBJS=$ac_libobjs
21822
21823LTLIBOBJS=$ac_ltlibobjs
21824
21825
743c80a7
PE
21826 if test -n "$EXEEXT"; then
21827 am__EXEEXT_TRUE=
21828 am__EXEEXT_FALSE='#'
21829else
21830 am__EXEEXT_TRUE='#'
21831 am__EXEEXT_FALSE=
21832fi
21833
21834if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
5f64f7bd 21835 as_fn_error "conditional \"AMDEP\" was never defined.
743c80a7
PE
21836Usually this means the macro was only invoked conditionally." "$LINENO" 5
21837fi
21838if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
5f64f7bd 21839 as_fn_error "conditional \"am__fastdepCC\" was never defined.
743c80a7
PE
21840Usually this means the macro was only invoked conditionally." "$LINENO" 5
21841fi
21842
21843if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
5f64f7bd 21844 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
743c80a7
PE
21845Usually this means the macro was only invoked conditionally." "$LINENO" 5
21846fi
4fc2b746
GM
21847if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
21848 as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
21849Usually this means the macro was only invoked conditionally." "$LINENO" 5
21850fi
743c80a7 21851
4fda9c95
GM
21852if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
21853 as_fn_error "conditional \"GL_GENERATE_STDINT_H\" was never defined.
21854Usually this means the macro was only invoked conditionally." "$LINENO" 5
21855fi
6d153f56
GM
21856if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
21857 as_fn_error "conditional \"GL_GENERATE_STDARG_H\" was never defined.
21858Usually this means the macro was only invoked conditionally." "$LINENO" 5
21859fi
6c051bab 21860if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
5f64f7bd 21861 as_fn_error "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
6c051bab
GM
21862Usually this means the macro was only invoked conditionally." "$LINENO" 5
21863fi
21864if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
5f64f7bd 21865 as_fn_error "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
6c051bab
GM
21866Usually this means the macro was only invoked conditionally." "$LINENO" 5
21867fi
6d153f56
GM
21868if test -z "${gl_GNULIB_ENABLED_dosname_TRUE}" && test -z "${gl_GNULIB_ENABLED_dosname_FALSE}"; then
21869 as_fn_error "conditional \"gl_GNULIB_ENABLED_dosname\" was never defined.
21870Usually this means the macro was only invoked conditionally." "$LINENO" 5
21871fi
21872if test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE}" && test -z "${gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_FALSE}"; then
21873 as_fn_error "conditional \"gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36\" was never defined.
21874Usually this means the macro was only invoked conditionally." "$LINENO" 5
21875fi
3e0be4ab
GM
21876if test -z "${gl_GNULIB_ENABLED_sigprocmask_TRUE}" && test -z "${gl_GNULIB_ENABLED_sigprocmask_FALSE}"; then
21877 as_fn_error "conditional \"gl_GNULIB_ENABLED_sigprocmask\" was never defined.
21878Usually this means the macro was only invoked conditionally." "$LINENO" 5
21879fi
6d153f56
GM
21880if test -z "${gl_GNULIB_ENABLED_stat_TRUE}" && test -z "${gl_GNULIB_ENABLED_stat_FALSE}"; then
21881 as_fn_error "conditional \"gl_GNULIB_ENABLED_stat\" was never defined.
21882Usually this means the macro was only invoked conditionally." "$LINENO" 5
21883fi
3e0be4ab
GM
21884if test -z "${gl_GNULIB_ENABLED_strtoll_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoll_FALSE}"; then
21885 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoll\" was never defined.
21886Usually this means the macro was only invoked conditionally." "$LINENO" 5
21887fi
6d153f56
GM
21888if test -z "${gl_GNULIB_ENABLED_strtoull_TRUE}" && test -z "${gl_GNULIB_ENABLED_strtoull_FALSE}"; then
21889 as_fn_error "conditional \"gl_GNULIB_ENABLED_strtoull\" was never defined.
21890Usually this means the macro was only invoked conditionally." "$LINENO" 5
21891fi
21892if test -z "${gl_GNULIB_ENABLED_verify_TRUE}" && test -z "${gl_GNULIB_ENABLED_verify_FALSE}"; then
21893 as_fn_error "conditional \"gl_GNULIB_ENABLED_verify\" was never defined.
21894Usually this means the macro was only invoked conditionally." "$LINENO" 5
6c051bab 21895fi
942f733f 21896
743c80a7
PE
21897 gl_libobjs=
21898 gl_ltlibobjs=
21899 if test -n "$gl_LIBOBJS"; then
21900 # Remove the extension.
21901 sed_drop_objext='s/\.o$//;s/\.obj$//'
21902 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
21903 gl_libobjs="$gl_libobjs $i.$ac_objext"
21904 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21905 done
21906 fi
21907 gl_LIBOBJS=$gl_libobjs
21908
21909 gl_LTLIBOBJS=$gl_ltlibobjs
21910
21911
21912
21913 gltests_libobjs=
21914 gltests_ltlibobjs=
21915 if test -n "$gltests_LIBOBJS"; then
21916 # Remove the extension.
21917 sed_drop_objext='s/\.o$//;s/\.obj$//'
21918 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
21919 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21920 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21921 done
21922 fi
21923 gltests_LIBOBJS=$gltests_libobjs
21924
21925 gltests_LTLIBOBJS=$gltests_ltlibobjs
21926
067d23c9
KY
21927
21928
5f64f7bd 21929: ${CONFIG_STATUS=./config.status}
067d23c9
KY
21930ac_write_fail=0
21931ac_clean_files_save=$ac_clean_files
21932ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21933{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21934$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21935as_write_fail=0
21936cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21937#! $SHELL
21938# Generated by $as_me.
21939# Run this file to recreate the current configuration.
21940# Compiler output produced by configure, useful for debugging
21941# configure, is in config.log if it exists.
21942
21943debug=false
21944ac_cs_recheck=false
21945ac_cs_silent=false
21946
21947SHELL=\${CONFIG_SHELL-$SHELL}
21948export SHELL
21949_ASEOF
21950cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21951## -------------------- ##
21952## M4sh Initialization. ##
21953## -------------------- ##
21954
21955# Be more Bourne compatible
21956DUALCASE=1; export DUALCASE # for MKS sh
21957if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21958 emulate sh
21959 NULLCMD=:
21960 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21961 # is contrary to our usage. Disable this feature.
21962 alias -g '${1+"$@"}'='"$@"'
21963 setopt NO_GLOB_SUBST
21964else
21965 case `(set -o) 2>/dev/null` in #(
21966 *posix*) :
21967 set -o posix ;; #(
21968 *) :
21969 ;;
21970esac
21971fi
21972
21973
21974as_nl='
21975'
21976export as_nl
21977# Printing a long string crashes Solaris 7 /usr/bin/printf.
21978as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21979as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21980as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21981# Prefer a ksh shell builtin over an external printf program on Solaris,
21982# but without wasting forks for bash or zsh.
21983if test -z "$BASH_VERSION$ZSH_VERSION" \
21984 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21985 as_echo='print -r --'
21986 as_echo_n='print -rn --'
21987elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21988 as_echo='printf %s\n'
21989 as_echo_n='printf %s'
21990else
21991 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21992 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21993 as_echo_n='/usr/ucb/echo -n'
21994 else
21995 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21996 as_echo_n_body='eval
21997 arg=$1;
21998 case $arg in #(
21999 *"$as_nl"*)
22000 expr "X$arg" : "X\\(.*\\)$as_nl";
22001 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
22002 esac;
22003 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
22004 '
22005 export as_echo_n_body
22006 as_echo_n='sh -c $as_echo_n_body as_echo'
22007 fi
22008 export as_echo_body
22009 as_echo='sh -c $as_echo_body as_echo'
22010fi
22011
22012# The user is always right.
22013if test "${PATH_SEPARATOR+set}" != set; then
22014 PATH_SEPARATOR=:
22015 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
22016 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
22017 PATH_SEPARATOR=';'
22018 }
22019fi
22020
22021
22022# IFS
22023# We need space, tab and new line, in precisely that order. Quoting is
22024# there to prevent editors from complaining about space-tab.
22025# (If _AS_PATH_WALK were called with IFS unset, it would disable word
22026# splitting by setting IFS to empty value.)
22027IFS=" "" $as_nl"
22028
22029# Find who we are. Look in the path if we contain no directory separator.
22030case $0 in #((
22031 *[\\/]* ) as_myself=$0 ;;
22032 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22033for as_dir in $PATH
22034do
22035 IFS=$as_save_IFS
22036 test -z "$as_dir" && as_dir=.
22037 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22038 done
22039IFS=$as_save_IFS
22040
22041 ;;
22042esac
22043# We did not find ourselves, most probably we were run as `sh COMMAND'
22044# in which case we are not to be found in the path.
22045if test "x$as_myself" = x; then
22046 as_myself=$0
22047fi
22048if test ! -f "$as_myself"; then
22049 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
22050 exit 1
22051fi
22052
22053# Unset variables that we do not need and which cause bugs (e.g. in
22054# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
22055# suppresses any "Segmentation fault" message there. '((' could
22056# trigger a bug in pdksh 5.2.14.
22057for as_var in BASH_ENV ENV MAIL MAILPATH
22058do eval test x\${$as_var+set} = xset \
22059 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
22060done
22061PS1='$ '
22062PS2='> '
22063PS4='+ '
22064
22065# NLS nuisances.
22066LC_ALL=C
22067export LC_ALL
22068LANGUAGE=C
22069export LANGUAGE
22070
22071# CDPATH.
22072(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
22073
22074
5f64f7bd
GM
22075# as_fn_error ERROR [LINENO LOG_FD]
22076# ---------------------------------
067d23c9
KY
22077# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
22078# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
5f64f7bd 22079# script with status $?, using 1 if that was 0.
067d23c9
KY
22080as_fn_error ()
22081{
5f64f7bd
GM
22082 as_status=$?; test $as_status -eq 0 && as_status=1
22083 if test "$3"; then
22084 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
22085 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
067d23c9 22086 fi
5f64f7bd 22087 $as_echo "$as_me: error: $1" >&2
067d23c9
KY
22088 as_fn_exit $as_status
22089} # as_fn_error
22090
22091
22092# as_fn_set_status STATUS
22093# -----------------------
22094# Set $? to STATUS, without forking.
22095as_fn_set_status ()
22096{
22097 return $1
22098} # as_fn_set_status
22099
22100# as_fn_exit STATUS
22101# -----------------
22102# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
22103as_fn_exit ()
22104{
22105 set +e
22106 as_fn_set_status $1
22107 exit $1
22108} # as_fn_exit
22109
22110# as_fn_unset VAR
22111# ---------------
22112# Portably unset VAR.
22113as_fn_unset ()
22114{
22115 { eval $1=; unset $1;}
22116}
22117as_unset=as_fn_unset
22118# as_fn_append VAR VALUE
22119# ----------------------
22120# Append the text in VALUE to the end of the definition contained in VAR. Take
22121# advantage of any shell optimizations that allow amortized linear growth over
22122# repeated appends, instead of the typical quadratic growth present in naive
22123# implementations.
22124if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
22125 eval 'as_fn_append ()
22126 {
22127 eval $1+=\$2
22128 }'
22129else
22130 as_fn_append ()
22131 {
22132 eval $1=\$$1\$2
22133 }
22134fi # as_fn_append
22135
22136# as_fn_arith ARG...
22137# ------------------
22138# Perform arithmetic evaluation on the ARGs, and store the result in the
22139# global $as_val. Take advantage of shells that can avoid forks. The arguments
22140# must be portable across $(()) and expr.
22141if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
22142 eval 'as_fn_arith ()
22143 {
22144 as_val=$(( $* ))
22145 }'
22146else
22147 as_fn_arith ()
22148 {
22149 as_val=`expr "$@" || test $? -eq 1`
22150 }
22151fi # as_fn_arith
22152
22153
22154if expr a : '\(a\)' >/dev/null 2>&1 &&
22155 test "X`expr 00001 : '.*\(...\)'`" = X001; then
22156 as_expr=expr
22157else
22158 as_expr=false
22159fi
22160
22161if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22162 as_basename=basename
22163else
22164 as_basename=false
22165fi
22166
22167if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22168 as_dirname=dirname
22169else
22170 as_dirname=false
22171fi
22172
22173as_me=`$as_basename -- "$0" ||
22174$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22175 X"$0" : 'X\(//\)$' \| \
22176 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
22177$as_echo X/"$0" |
22178 sed '/^.*\/\([^/][^/]*\)\/*$/{
22179 s//\1/
22180 q
22181 }
22182 /^X\/\(\/\/\)$/{
22183 s//\1/
22184 q
22185 }
22186 /^X\/\(\/\).*/{
22187 s//\1/
22188 q
22189 }
22190 s/.*/./; q'`
22191
22192# Avoid depending upon Character Ranges.
22193as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22194as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22195as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22196as_cr_digits='0123456789'
22197as_cr_alnum=$as_cr_Letters$as_cr_digits
22198
22199ECHO_C= ECHO_N= ECHO_T=
22200case `echo -n x` in #(((((
22201-n*)
22202 case `echo 'xy\c'` in
22203 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
22204 xy) ECHO_C='\c';;
22205 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
22206 ECHO_T=' ';;
22207 esac;;
22208*)
22209 ECHO_N='-n';;
22210esac
22211
22212rm -f conf$$ conf$$.exe conf$$.file
22213if test -d conf$$.dir; then
22214 rm -f conf$$.dir/conf$$.file
22215else
22216 rm -f conf$$.dir
22217 mkdir conf$$.dir 2>/dev/null
22218fi
22219if (echo >conf$$.file) 2>/dev/null; then
22220 if ln -s conf$$.file conf$$ 2>/dev/null; then
22221 as_ln_s='ln -s'
22222 # ... but there are two gotchas:
22223 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22224 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22225 # In both cases, we have to default to `cp -p'.
22226 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22227 as_ln_s='cp -p'
22228 elif ln conf$$.file conf$$ 2>/dev/null; then
22229 as_ln_s=ln
22230 else
22231 as_ln_s='cp -p'
22232 fi
22233else
22234 as_ln_s='cp -p'
22235fi
22236rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22237rmdir conf$$.dir 2>/dev/null
22238
22239
22240# as_fn_mkdir_p
22241# -------------
22242# Create "$as_dir" as a directory, including parents if necessary.
22243as_fn_mkdir_p ()
22244{
22245
22246 case $as_dir in #(
22247 -*) as_dir=./$as_dir;;
22248 esac
22249 test -d "$as_dir" || eval $as_mkdir_p || {
22250 as_dirs=
22251 while :; do
22252 case $as_dir in #(
22253 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
22254 *) as_qdir=$as_dir;;
22255 esac
22256 as_dirs="'$as_qdir' $as_dirs"
22257 as_dir=`$as_dirname -- "$as_dir" ||
22258$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22259 X"$as_dir" : 'X\(//\)[^/]' \| \
22260 X"$as_dir" : 'X\(//\)$' \| \
22261 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
22262$as_echo X"$as_dir" |
22263 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22264 s//\1/
22265 q
22266 }
22267 /^X\(\/\/\)[^/].*/{
22268 s//\1/
22269 q
22270 }
22271 /^X\(\/\/\)$/{
22272 s//\1/
22273 q
22274 }
22275 /^X\(\/\).*/{
22276 s//\1/
22277 q
22278 }
22279 s/.*/./; q'`
22280 test -d "$as_dir" && break
22281 done
22282 test -z "$as_dirs" || eval "mkdir $as_dirs"
5f64f7bd 22283 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
067d23c9
KY
22284
22285
22286} # as_fn_mkdir_p
22287if mkdir -p . 2>/dev/null; then
22288 as_mkdir_p='mkdir -p "$as_dir"'
22289else
22290 test -d ./-p && rmdir ./-p
22291 as_mkdir_p=false
22292fi
22293
22294if test -x / >/dev/null 2>&1; then
22295 as_test_x='test -x'
22296else
22297 if ls -dL / >/dev/null 2>&1; then
22298 as_ls_L_option=L
22299 else
22300 as_ls_L_option=
22301 fi
22302 as_test_x='
22303 eval sh -c '\''
22304 if test -d "$1"; then
22305 test -d "$1/.";
22306 else
22307 case $1 in #(
22308 -*)set "./$1";;
22309 esac;
22310 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
22311 ???[sx]*):;;*)false;;esac;fi
22312 '\'' sh
22313 '
22314fi
22315as_executable_p=$as_test_x
22316
22317# Sed expression to map a string onto a valid CPP name.
22318as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22319
22320# Sed expression to map a string onto a valid variable name.
22321as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22322
22323
22324exec 6>&1
22325## ----------------------------------- ##
22326## Main body of $CONFIG_STATUS script. ##
22327## ----------------------------------- ##
22328_ASEOF
22329test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
22330
22331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22332# Save the log message, to keep $0 and so on meaningful, and to
22333# report actual input values of CONFIG_FILES etc. instead of their
22334# values after options handling.
22335ac_log="
22336This file was extended by emacs $as_me 24.0.50, which was
5f64f7bd 22337generated by GNU Autoconf 2.65. Invocation command line was
067d23c9
KY
22338
22339 CONFIG_FILES = $CONFIG_FILES
22340 CONFIG_HEADERS = $CONFIG_HEADERS
22341 CONFIG_LINKS = $CONFIG_LINKS
22342 CONFIG_COMMANDS = $CONFIG_COMMANDS
22343 $ $0 $@
22344
22345on `(hostname || uname -n) 2>/dev/null | sed 1q`
22346"
22347
22348_ACEOF
22349
22350case $ac_config_files in *"
22351"*) set x $ac_config_files; shift; ac_config_files=$*;;
22352esac
22353
22354case $ac_config_headers in *"
22355"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
22356esac
22357
22358
22359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22360# Files that config.status was made for.
22361config_files="$ac_config_files"
22362config_headers="$ac_config_headers"
22363config_commands="$ac_config_commands"
22364
22365_ACEOF
22366
22367cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22368ac_cs_usage="\
22369\`$as_me' instantiates files and other configuration actions
22370from templates according to the current configuration. Unless the files
22371and actions are specified as TAGs, all are instantiated by default.
22372
22373Usage: $0 [OPTION]... [TAG]...
22374
22375 -h, --help print this help, then exit
22376 -V, --version print version number and configuration settings, then exit
22377 --config print configuration, then exit
22378 -q, --quiet, --silent
22379 do not print progress messages
22380 -d, --debug don't remove temporary files
22381 --recheck update $as_me by reconfiguring in the same conditions
22382 --file=FILE[:TEMPLATE]
22383 instantiate the configuration file FILE
22384 --header=FILE[:TEMPLATE]
22385 instantiate the configuration header FILE
22386
22387Configuration files:
22388$config_files
22389
22390Configuration headers:
22391$config_headers
22392
22393Configuration commands:
22394$config_commands
22395
22396Report bugs to the package provider."
22397
22398_ACEOF
22399cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22400ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
22401ac_cs_version="\\
22402emacs config.status 24.0.50
5f64f7bd 22403configured by $0, generated by GNU Autoconf 2.65,
067d23c9
KY
22404 with options \\"\$ac_cs_config\\"
22405
5f64f7bd 22406Copyright (C) 2009 Free Software Foundation, Inc.
067d23c9
KY
22407This config.status script is free software; the Free Software Foundation
22408gives unlimited permission to copy, distribute and modify it."
22409
22410ac_pwd='$ac_pwd'
22411srcdir='$srcdir'
22412INSTALL='$INSTALL'
743c80a7
PE
22413MKDIR_P='$MKDIR_P'
22414AWK='$AWK'
067d23c9
KY
22415test -n "\$AWK" || AWK=awk
22416_ACEOF
22417
22418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22419# The default lists apply if the user does not specify any file.
22420ac_need_defaults=:
22421while test $# != 0
22422do
22423 case $1 in
5f64f7bd 22424 --*=*)
067d23c9
KY
22425 ac_option=`expr "X$1" : 'X\([^=]*\)='`
22426 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22427 ac_shift=:
22428 ;;
22429 *)
22430 ac_option=$1
22431 ac_optarg=$2
22432 ac_shift=shift
22433 ;;
22434 esac
22435
22436 case $ac_option in
22437 # Handling of the options.
22438 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22439 ac_cs_recheck=: ;;
22440 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22441 $as_echo "$ac_cs_version"; exit ;;
22442 --config | --confi | --conf | --con | --co | --c )
22443 $as_echo "$ac_cs_config"; exit ;;
22444 --debug | --debu | --deb | --de | --d | -d )
22445 debug=: ;;
22446 --file | --fil | --fi | --f )
22447 $ac_shift
22448 case $ac_optarg in
22449 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22450 esac
22451 as_fn_append CONFIG_FILES " '$ac_optarg'"
22452 ac_need_defaults=false;;
22453 --header | --heade | --head | --hea )
22454 $ac_shift
22455 case $ac_optarg in
22456 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
22457 esac
22458 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
22459 ac_need_defaults=false;;
22460 --he | --h)
22461 # Conflict between --help and --header
5f64f7bd 22462 as_fn_error "ambiguous option: \`$1'
067d23c9
KY
22463Try \`$0 --help' for more information.";;
22464 --help | --hel | -h )
22465 $as_echo "$ac_cs_usage"; exit ;;
22466 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22467 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22468 ac_cs_silent=: ;;
22469
22470 # This is an error.
5f64f7bd 22471 -*) as_fn_error "unrecognized option: \`$1'
067d23c9
KY
22472Try \`$0 --help' for more information." ;;
22473
22474 *) as_fn_append ac_config_targets " $1"
22475 ac_need_defaults=false ;;
22476
22477 esac
22478 shift
22479done
22480
22481ac_configure_extra_args=
22482
22483if $ac_cs_silent; then
22484 exec 6>/dev/null
22485 ac_configure_extra_args="$ac_configure_extra_args --silent"
22486fi
22487
22488_ACEOF
22489cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22490if \$ac_cs_recheck; then
22491 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22492 shift
22493 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
22494 CONFIG_SHELL='$SHELL'
22495 export CONFIG_SHELL
22496 exec "\$@"
22497fi
22498
22499_ACEOF
22500cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22501exec 5>>config.log
22502{
22503 echo
22504 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22505## Running $as_me. ##
22506_ASBOX
22507 $as_echo "$ac_log"
22508} >&5
22509
22510_ACEOF
22511cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22512#
22513# INIT-COMMANDS
22514#
743c80a7 22515AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
067d23c9
KY
22516GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
22517
22518_ACEOF
22519
22520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22521
22522# Handling of arguments.
22523for ac_config_target in $ac_config_targets
22524do
22525 case $ac_config_target in
22526 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
743c80a7 22527 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
067d23c9 22528 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
743c80a7 22529 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
56ade35c
GM
22530 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
22531 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
22532 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
22533 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
22534 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
22535 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
22536 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
22537 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
22538 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
22539 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
22540 "test/automated/Makefile") CONFIG_FILES="$CONFIG_FILES test/automated/Makefile" ;;
9411886d
PE
22541 "mkdirs") CONFIG_COMMANDS="$CONFIG_COMMANDS mkdirs" ;;
22542 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
22543 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
067d23c9 22544
5f64f7bd 22545 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
067d23c9
KY
22546 esac
22547done
22548
22549
22550# If the user did not use the arguments to specify the items to instantiate,
22551# then the envvar interface is used. Set only those that are not.
22552# We use the long form for the default assignment because of an extremely
22553# bizarre bug on SunOS 4.1.3.
22554if $ac_need_defaults; then
22555 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22556 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22557 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22558fi
22559
22560# Have a temporary directory for convenience. Make it in the build tree
22561# simply because there is no reason against having it here, and in addition,
22562# creating and moving files from /tmp can sometimes cause problems.
22563# Hook for its removal unless debugging.
22564# Note that there is a small window in which the directory will not be cleaned:
22565# after its creation but before its name has been assigned to `$tmp'.
22566$debug ||
22567{
5f64f7bd 22568 tmp=
067d23c9 22569 trap 'exit_status=$?
5f64f7bd 22570 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
067d23c9
KY
22571' 0
22572 trap 'as_fn_exit 1' 1 2 13 15
22573}
22574# Create a (secure) tmp directory for tmp files.
22575
22576{
22577 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
5f64f7bd 22578 test -n "$tmp" && test -d "$tmp"
067d23c9
KY
22579} ||
22580{
22581 tmp=./conf$$-$RANDOM
22582 (umask 077 && mkdir "$tmp")
5f64f7bd 22583} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
067d23c9
KY
22584
22585# Set up the scripts for CONFIG_FILES section.
22586# No need to generate them if there are no CONFIG_FILES.
22587# This happens for instance with `./config.status config.h'.
22588if test -n "$CONFIG_FILES"; then
22589
22590if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
22591 ac_cs_awk_getline=:
22592 ac_cs_awk_pipe_init=
22593 ac_cs_awk_read_file='
22594 while ((getline aline < (F[key])) > 0)
22595 print(aline)
22596 close(F[key])'
22597 ac_cs_awk_pipe_fini=
22598else
22599 ac_cs_awk_getline=false
22600 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
22601 ac_cs_awk_read_file='
22602 print "|#_!!_#|"
22603 print "cat " F[key] " &&"
22604 '$ac_cs_awk_pipe_init
22605 # The final `:' finishes the AND list.
22606 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
22607fi
22608ac_cr=`echo X | tr X '\015'`
22609# On cygwin, bash can eat \r inside `` if the user requested igncr.
22610# But we know of no other shell where ac_cr would be empty at this
22611# point, so we can use a bashism as a fallback.
22612if test "x$ac_cr" = x; then
22613 eval ac_cr=\$\'\\r\'
22614fi
22615ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
22616if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
5f64f7bd 22617 ac_cs_awk_cr='\r'
067d23c9
KY
22618else
22619 ac_cs_awk_cr=$ac_cr
22620fi
22621
5f64f7bd 22622echo 'BEGIN {' >"$tmp/subs1.awk" &&
067d23c9
KY
22623_ACEOF
22624
22625# Create commands to substitute file output variables.
22626{
22627 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
5f64f7bd 22628 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
067d23c9
KY
22629 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
22630 echo "_ACAWK" &&
22631 echo "_ACEOF"
22632} >conf$$files.sh &&
22633. ./conf$$files.sh ||
5f64f7bd 22634 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
22635rm -f conf$$files.sh
22636
22637{
22638 echo "cat >conf$$subs.awk <<_ACEOF" &&
22639 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
22640 echo "_ACEOF"
22641} >conf$$subs.sh ||
5f64f7bd
GM
22642 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
22643ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
067d23c9
KY
22644ac_delim='%!_!# '
22645for ac_last_try in false false false false false :; do
22646 . ./conf$$subs.sh ||
5f64f7bd 22647 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
22648
22649 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22650 if test $ac_delim_n = $ac_delim_num; then
22651 break
22652 elif $ac_last_try; then
5f64f7bd 22653 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
22654 else
22655 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22656 fi
22657done
22658rm -f conf$$subs.sh
22659
22660cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5f64f7bd 22661cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
067d23c9
KY
22662_ACEOF
22663sed -n '
22664h
22665s/^/S["/; s/!.*/"]=/
22666p
22667g
22668s/^[^!]*!//
22669:repl
22670t repl
22671s/'"$ac_delim"'$//
22672t delim
22673:nl
22674h
22675s/\(.\{148\}\)..*/\1/
22676t more1
22677s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22678p
22679n
22680b repl
22681:more1
22682s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22683p
22684g
22685s/.\{148\}//
22686t nl
22687:delim
22688h
22689s/\(.\{148\}\)..*/\1/
22690t more2
22691s/["\\]/\\&/g; s/^/"/; s/$/"/
22692p
22693b
22694:more2
22695s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22696p
22697g
22698s/.\{148\}//
22699t delim
22700' <conf$$subs.awk | sed '
22701/^[^""]/{
22702 N
22703 s/\n//
22704}
22705' >>$CONFIG_STATUS || ac_write_fail=1
22706rm -f conf$$subs.awk
22707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22708_ACAWK
5f64f7bd 22709cat >>"\$tmp/subs1.awk" <<_ACAWK &&
067d23c9
KY
22710 for (key in S) S_is_set[key] = 1
22711 FS = "\a"
22712 \$ac_cs_awk_pipe_init
22713}
22714{
22715 line = $ 0
22716 nfields = split(line, field, "@")
22717 substed = 0
22718 len = length(field[1])
22719 for (i = 2; i < nfields; i++) {
22720 key = field[i]
22721 keylen = length(key)
22722 if (S_is_set[key]) {
22723 value = S[key]
22724 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22725 len += length(value) + length(field[++i])
22726 substed = 1
22727 } else
22728 len += 1 + keylen
22729 }
22730 if (nfields == 3 && !substed) {
22731 key = field[2]
22732 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
22733 \$ac_cs_awk_read_file
22734 next
22735 }
22736 }
22737 print line
22738}
22739\$ac_cs_awk_pipe_fini
22740_ACAWK
22741_ACEOF
22742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22743if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22744 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22745else
22746 cat
5f64f7bd
GM
22747fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
22748 || as_fn_error "could not setup config files machinery" "$LINENO" 5
067d23c9
KY
22749_ACEOF
22750
5f64f7bd
GM
22751# VPATH may cause trouble with some makes, so we remove $(srcdir),
22752# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
067d23c9
KY
22753# trailing colons and then remove the whole line if VPATH becomes empty
22754# (actually we leave an empty line to preserve line numbers).
22755if test "x$srcdir" = x.; then
5f64f7bd
GM
22756 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22757s/:*\$(srcdir):*/:/
22758s/:*\${srcdir}:*/:/
22759s/:*@srcdir@:*/:/
22760s/^\([^=]*=[ ]*\):*/\1/
067d23c9
KY
22761s/:*$//
22762s/^[^=]*=[ ]*$//
22763}'
22764fi
22765
22766cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22767fi # test -n "$CONFIG_FILES"
22768
22769# Set up the scripts for CONFIG_HEADERS section.
22770# No need to generate them if there are no CONFIG_HEADERS.
22771# This happens for instance with `./config.status Makefile'.
22772if test -n "$CONFIG_HEADERS"; then
5f64f7bd 22773cat >"$tmp/defines.awk" <<\_ACAWK ||
067d23c9
KY
22774BEGIN {
22775_ACEOF
22776
22777# Transform confdefs.h into an awk script `defines.awk', embedded as
22778# here-document in config.status, that substitutes the proper values into
22779# config.h.in to produce config.h.
22780
22781# Create a delimiter string that does not exist in confdefs.h, to ease
22782# handling of long lines.
22783ac_delim='%!_!# '
22784for ac_last_try in false false :; do
5f64f7bd
GM
22785 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
22786 if test -z "$ac_t"; then
067d23c9
KY
22787 break
22788 elif $ac_last_try; then
5f64f7bd 22789 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
067d23c9
KY
22790 else
22791 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22792 fi
22793done
22794
22795# For the awk script, D is an array of macro values keyed by name,
22796# likewise P contains macro parameters if any. Preserve backslash
22797# newline sequences.
22798
22799ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22800sed -n '
22801s/.\{148\}/&'"$ac_delim"'/g
22802t rset
22803:rset
22804s/^[ ]*#[ ]*define[ ][ ]*/ /
22805t def
22806d
22807:def
22808s/\\$//
22809t bsnl
22810s/["\\]/\\&/g
22811s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
22812D["\1"]=" \3"/p
22813s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
22814d
22815:bsnl
22816s/["\\]/\\&/g
22817s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
22818D["\1"]=" \3\\\\\\n"\\/p
22819t cont
22820s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22821t cont
22822d
22823:cont
22824n
22825s/.\{148\}/&'"$ac_delim"'/g
22826t clear
22827:clear
22828s/\\$//
22829t bsnlc
22830s/["\\]/\\&/g; s/^/"/; s/$/"/p
22831d
22832:bsnlc
22833s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22834b cont
22835' <confdefs.h | sed '
22836s/'"$ac_delim"'/"\\\
22837"/g' >>$CONFIG_STATUS || ac_write_fail=1
22838
22839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22840 for (key in D) D_is_set[key] = 1
22841 FS = "\a"
22842}
22843/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22844 line = \$ 0
22845 split(line, arg, " ")
22846 if (arg[1] == "#") {
22847 defundef = arg[2]
22848 mac1 = arg[3]
22849 } else {
22850 defundef = substr(arg[1], 2)
22851 mac1 = arg[2]
22852 }
22853 split(mac1, mac2, "(") #)
22854 macro = mac2[1]
22855 prefix = substr(line, 1, index(line, defundef) - 1)
22856 if (D_is_set[macro]) {
22857 # Preserve the white space surrounding the "#".
22858 print prefix "define", macro P[macro] D[macro]
22859 next
22860 } else {
22861 # Replace #undef with comments. This is necessary, for example,
22862 # in the case of _POSIX_SOURCE, which is predefined and required
22863 # on some systems where configure will not decide to define it.
22864 if (defundef == "undef") {
22865 print "/*", prefix defundef, macro, "*/"
22866 next
22867 }
22868 }
22869}
22870{ print }
22871_ACAWK
22872_ACEOF
22873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5f64f7bd 22874 as_fn_error "could not setup config headers machinery" "$LINENO" 5
067d23c9
KY
22875fi # test -n "$CONFIG_HEADERS"
22876
22877
22878eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
22879shift
22880for ac_tag
22881do
22882 case $ac_tag in
22883 :[FHLC]) ac_mode=$ac_tag; continue;;
22884 esac
22885 case $ac_mode$ac_tag in
22886 :[FHL]*:*);;
5f64f7bd 22887 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
067d23c9
KY
22888 :[FH]-) ac_tag=-:-;;
22889 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22890 esac
22891 ac_save_IFS=$IFS
22892 IFS=:
22893 set x $ac_tag
22894 IFS=$ac_save_IFS
22895 shift
22896 ac_file=$1
22897 shift
22898
22899 case $ac_mode in
22900 :L) ac_source=$1;;
22901 :[FH])
22902 ac_file_inputs=
22903 for ac_f
22904 do
22905 case $ac_f in
5f64f7bd 22906 -) ac_f="$tmp/stdin";;
067d23c9
KY
22907 *) # Look for the file first in the build tree, then in the source tree
22908 # (if the path is not absolute). The absolute path cannot be DOS-style,
22909 # because $ac_f cannot contain `:'.
22910 test -f "$ac_f" ||
22911 case $ac_f in
22912 [\\/$]*) false;;
22913 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22914 esac ||
5f64f7bd 22915 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
067d23c9
KY
22916 esac
22917 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22918 as_fn_append ac_file_inputs " '$ac_f'"
22919 done
22920
22921 # Let's still pretend it is `configure' which instantiates (i.e., don't
22922 # use $as_me), people would be surprised to read:
22923 # /* config.h. Generated by config.status. */
22924 configure_input='Generated from '`
22925 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22926 `' by configure.'
22927 if test x"$ac_file" != x-; then
22928 configure_input="$ac_file. $configure_input"
22929 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22930$as_echo "$as_me: creating $ac_file" >&6;}
22931 fi
22932 # Neutralize special characters interpreted by sed in replacement strings.
22933 case $configure_input in #(
22934 *\&* | *\|* | *\\* )
22935 ac_sed_conf_input=`$as_echo "$configure_input" |
22936 sed 's/[\\\\&|]/\\\\&/g'`;; #(
22937 *) ac_sed_conf_input=$configure_input;;
22938 esac
22939
22940 case $ac_tag in
5f64f7bd
GM
22941 *:-:* | *:-) cat >"$tmp/stdin" \
22942 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
067d23c9
KY
22943 esac
22944 ;;
22945 esac
22946
22947 ac_dir=`$as_dirname -- "$ac_file" ||
22948$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22949 X"$ac_file" : 'X\(//\)[^/]' \| \
22950 X"$ac_file" : 'X\(//\)$' \| \
22951 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22952$as_echo X"$ac_file" |
22953 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22954 s//\1/
22955 q
22956 }
22957 /^X\(\/\/\)[^/].*/{
22958 s//\1/
22959 q
22960 }
22961 /^X\(\/\/\)$/{
22962 s//\1/
22963 q
22964 }
22965 /^X\(\/\).*/{
22966 s//\1/
22967 q
22968 }
22969 s/.*/./; q'`
22970 as_dir="$ac_dir"; as_fn_mkdir_p
22971 ac_builddir=.
22972
22973case "$ac_dir" in
22974.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22975*)
22976 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22977 # A ".." for each directory in $ac_dir_suffix.
22978 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22979 case $ac_top_builddir_sub in
22980 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22981 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22982 esac ;;
22983esac
22984ac_abs_top_builddir=$ac_pwd
22985ac_abs_builddir=$ac_pwd$ac_dir_suffix
22986# for backward compatibility:
22987ac_top_builddir=$ac_top_build_prefix
22988
22989case $srcdir in
22990 .) # We are building in place.
22991 ac_srcdir=.
22992 ac_top_srcdir=$ac_top_builddir_sub
22993 ac_abs_top_srcdir=$ac_pwd ;;
22994 [\\/]* | ?:[\\/]* ) # Absolute name.
22995 ac_srcdir=$srcdir$ac_dir_suffix;
22996 ac_top_srcdir=$srcdir
22997 ac_abs_top_srcdir=$srcdir ;;
22998 *) # Relative name.
22999 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23000 ac_top_srcdir=$ac_top_build_prefix$srcdir
23001 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23002esac
23003ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23004
23005
23006 case $ac_mode in
23007 :F)
23008 #
23009 # CONFIG_FILE
23010 #
23011
23012 case $INSTALL in
23013 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23014 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
23015 esac
743c80a7
PE
23016 ac_MKDIR_P=$MKDIR_P
23017 case $MKDIR_P in
23018 [\\/$]* | ?:[\\/]* ) ;;
23019 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
23020 esac
067d23c9
KY
23021_ACEOF
23022
23023cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23024# If the template does not know about datarootdir, expand it.
23025# FIXME: This hack should be removed a few years after 2.60.
23026ac_datarootdir_hack=; ac_datarootdir_seen=
23027ac_sed_dataroot='
23028/datarootdir/ {
23029 p
23030 q
23031}
23032/@datadir@/p
23033/@docdir@/p
23034/@infodir@/p
23035/@localedir@/p
23036/@mandir@/p'
23037case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
23038*datarootdir*) ac_datarootdir_seen=yes;;
23039*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23040 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23041$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23042_ACEOF
23043cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23044 ac_datarootdir_hack='
23045 s&@datadir@&$datadir&g
23046 s&@docdir@&$docdir&g
23047 s&@infodir@&$infodir&g
23048 s&@localedir@&$localedir&g
23049 s&@mandir@&$mandir&g
23050 s&\\\${datarootdir}&$datarootdir&g' ;;
23051esac
23052_ACEOF
23053
23054# Neutralize VPATH when `$srcdir' = `.'.
23055# Shell code in configure.ac might set extrasub.
23056# FIXME: do we really want to maintain this feature?
23057cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
23058ac_sed_extra="$ac_vpsub
23059$extrasub
23060_ACEOF
23061cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
23062:t
23063/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23064s|@configure_input@|$ac_sed_conf_input|;t t
23065s&@top_builddir@&$ac_top_builddir_sub&;t t
23066s&@top_build_prefix@&$ac_top_build_prefix&;t t
23067s&@srcdir@&$ac_srcdir&;t t
23068s&@abs_srcdir@&$ac_abs_srcdir&;t t
23069s&@top_srcdir@&$ac_top_srcdir&;t t
23070s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23071s&@builddir@&$ac_builddir&;t t
23072s&@abs_builddir@&$ac_abs_builddir&;t t
23073s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23074s&@INSTALL@&$ac_INSTALL&;t t
743c80a7 23075s&@MKDIR_P@&$ac_MKDIR_P&;t t
067d23c9
KY
23076$ac_datarootdir_hack
23077"
23078eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
23079if $ac_cs_awk_getline; then
5f64f7bd 23080 $AWK -f "$tmp/subs.awk"
067d23c9 23081else
5f64f7bd
GM
23082 $AWK -f "$tmp/subs.awk" | $SHELL
23083fi >$tmp/out \
23084 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
23085
23086test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
5f64f7bd
GM
23087 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
23088 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
067d23c9 23089 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5f64f7bd 23090which seems to be undefined. Please make sure it is defined." >&5
067d23c9 23091$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5f64f7bd 23092which seems to be undefined. Please make sure it is defined." >&2;}
067d23c9 23093
5f64f7bd 23094 rm -f "$tmp/stdin"
067d23c9 23095 case $ac_file in
5f64f7bd
GM
23096 -) cat "$tmp/out" && rm -f "$tmp/out";;
23097 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
067d23c9 23098 esac \
5f64f7bd 23099 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
23100 ;;
23101 :H)
23102 #
23103 # CONFIG_HEADER
23104 #
23105 if test x"$ac_file" != x-; then
23106 {
23107 $as_echo "/* $configure_input */" \
5f64f7bd
GM
23108 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
23109 } >"$tmp/config.h" \
23110 || as_fn_error "could not create $ac_file" "$LINENO" 5
23111 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
067d23c9
KY
23112 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
23113$as_echo "$as_me: $ac_file is unchanged" >&6;}
23114 else
23115 rm -f "$ac_file"
5f64f7bd
GM
23116 mv "$tmp/config.h" "$ac_file" \
23117 || as_fn_error "could not create $ac_file" "$LINENO" 5
067d23c9
KY
23118 fi
23119 else
23120 $as_echo "/* $configure_input */" \
5f64f7bd
GM
23121 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
23122 || as_fn_error "could not create -" "$LINENO" 5
067d23c9 23123 fi
743c80a7
PE
23124# Compute "$ac_file"'s index in $config_headers.
23125_am_arg="$ac_file"
23126_am_stamp_count=1
23127for _am_header in $config_headers :; do
23128 case $_am_header in
23129 $_am_arg | $_am_arg:* )
23130 break ;;
23131 * )
23132 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
23133 esac
23134done
23135echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
23136$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23137 X"$_am_arg" : 'X\(//\)[^/]' \| \
23138 X"$_am_arg" : 'X\(//\)$' \| \
23139 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
23140$as_echo X"$_am_arg" |
23141 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23142 s//\1/
23143 q
23144 }
23145 /^X\(\/\/\)[^/].*/{
23146 s//\1/
23147 q
23148 }
23149 /^X\(\/\/\)$/{
23150 s//\1/
23151 q
23152 }
23153 /^X\(\/\).*/{
23154 s//\1/
23155 q
23156 }
23157 s/.*/./; q'`/stamp-h$_am_stamp_count
067d23c9
KY
23158 ;;
23159
23160 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
23161$as_echo "$as_me: executing $ac_file commands" >&6;}
23162 ;;
23163 esac
23164
23165
23166 case $ac_file$ac_mode in
743c80a7
PE
23167 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
23168 # Autoconf 2.62 quotes --file arguments for eval, but not when files
23169 # are listed without --file. Let's play safe and only enable the eval
23170 # if we detect the quoting.
23171 case $CONFIG_FILES in
23172 *\'*) eval set x "$CONFIG_FILES" ;;
23173 *) set x $CONFIG_FILES ;;
23174 esac
23175 shift
23176 for mf
23177 do
23178 # Strip MF so we end up with the name of the file.
23179 mf=`echo "$mf" | sed -e 's/:.*$//'`
23180 # Check whether this is an Automake generated Makefile or not.
23181 # We used to match only the files named `Makefile.in', but
23182 # some people rename them; so instead we look at the file content.
23183 # Grep'ing the first line is not enough: some people post-process
23184 # each Makefile.in and add a new line on top of each file to say so.
23185 # Grep'ing the whole file is not good either: AIX grep has a line
23186 # limit of 2048, but all sed's we know have understand at least 4000.
23187 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
23188 dirpart=`$as_dirname -- "$mf" ||
23189$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23190 X"$mf" : 'X\(//\)[^/]' \| \
23191 X"$mf" : 'X\(//\)$' \| \
23192 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
23193$as_echo X"$mf" |
23194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23195 s//\1/
23196 q
23197 }
23198 /^X\(\/\/\)[^/].*/{
23199 s//\1/
23200 q
23201 }
23202 /^X\(\/\/\)$/{
23203 s//\1/
23204 q
23205 }
23206 /^X\(\/\).*/{
23207 s//\1/
23208 q
23209 }
23210 s/.*/./; q'`
23211 else
23212 continue
23213 fi
23214 # Extract the definition of DEPDIR, am__include, and am__quote
23215 # from the Makefile without running `make'.
23216 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
23217 test -z "$DEPDIR" && continue
23218 am__include=`sed -n 's/^am__include = //p' < "$mf"`
23219 test -z "am__include" && continue
23220 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
23221 # When using ansi2knr, U may be empty or an underscore; expand it
23222 U=`sed -n 's/^U = //p' < "$mf"`
23223 # Find all dependency output files, they are included files with
23224 # $(DEPDIR) in their names. We invoke sed twice because it is the
23225 # simplest approach to changing $(DEPDIR) to its actual value in the
23226 # expansion.
23227 for file in `sed -n "
23228 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
23229 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
23230 # Make sure the directory exists.
23231 test -f "$dirpart/$file" && continue
23232 fdir=`$as_dirname -- "$file" ||
23233$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23234 X"$file" : 'X\(//\)[^/]' \| \
23235 X"$file" : 'X\(//\)$' \| \
23236 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
23237$as_echo X"$file" |
23238 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23239 s//\1/
23240 q
23241 }
23242 /^X\(\/\/\)[^/].*/{
23243 s//\1/
23244 q
23245 }
23246 /^X\(\/\/\)$/{
23247 s//\1/
23248 q
23249 }
23250 /^X\(\/\).*/{
23251 s//\1/
23252 q
23253 }
23254 s/.*/./; q'`
23255 as_dir=$dirpart/$fdir; as_fn_mkdir_p
23256 # echo "creating $dirpart/$file"
23257 echo '# dummy' > "$dirpart/$file"
23258 done
23259 done
23260}
23261 ;;
9411886d 23262 "mkdirs":C)
067d23c9
KY
23263for dir in etc lisp ; do
23264 test -d ${dir} || mkdir ${dir}
23265done
9411886d
PE
23266 ;;
23267 "epaths":C)
067d23c9
KY
23268echo creating src/epaths.h
23269${MAKE-make} epaths-force
9411886d
PE
23270 ;;
23271 "gdbinit":C)
067d23c9
KY
23272if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
23273 echo creating src/.gdbinit
23274 echo source $srcdir/src/.gdbinit > src/.gdbinit
23275fi
067d23c9
KY
23276 ;;
23277
23278 esac
23279done # for ac_tag
23280
23281
23282as_fn_exit 0
23283_ACEOF
23284ac_clean_files=$ac_clean_files_save
23285
23286test $ac_write_fail = 0 ||
5f64f7bd 23287 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
067d23c9
KY
23288
23289
23290# configure is writing to config.log, and then calls config.status.
23291# config.status does its own redirection, appending to config.log.
23292# Unfortunately, on DOS this fails, as config.log is still kept open
23293# by configure, so config.status won't be able to write to it; its
23294# output is simply discarded. So we exec the FD to /dev/null,
23295# effectively closing config.log, so it can be properly (re)opened and
23296# appended to by config.status. When coming back to configure, we
23297# need to make the FD available again.
23298if test "$no_create" != yes; then
23299 ac_cs_success=:
23300 ac_config_status_args=
23301 test "$silent" = yes &&
23302 ac_config_status_args="$ac_config_status_args --quiet"
23303 exec 5>/dev/null
23304 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23305 exec 5>>config.log
23306 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23307 # would make configure fail if this is the last instruction.
5f64f7bd 23308 $ac_cs_success || as_fn_exit $?
067d23c9
KY
23309fi
23310if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
23311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
23312$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
23313fi
23314
9411886d 23315