Handle --version reasonably in CANNOT_DUMP configuration.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
8c5ff6dd
KR
3# Generated by GNU Autoconf 2.65 for emacs 24.0.50.
4#
ba4481b5 5#
ca81d7a0 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8c5ff6dd
KR
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
9#
10#
ba4481b5
DL
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
8c5ff6dd
KR
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
503d2be0 16
f053c89f
CY
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
8c5ff6dd 19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
20 emulate sh
21 NULLCMD=:
e9a63f04 22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
25 setopt NO_GLOB_SUBST
26else
8c5ff6dd
KR
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
f053c89f 32esac
503d2be0 33fi
f053c89f
CY
34
35
e9a63f04
GM
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
8c5ff6dd
KR
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
e9a63f04
GM
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'
7bbec45b 56 else
e9a63f04
GM
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
8c5ff6dd 60 case $arg in #(
e9a63f04
GM
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'
7bbec45b 69 fi
e9a63f04
GM
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 }
503d2be0
AS
81fi
82
6bae0ccf 83
ca81d7a0
JD
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.)
ca81d7a0
JD
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
8c5ff6dd 92case $0 in #((
ca81d7a0
JD
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=.
8c5ff6dd
KR
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
ca81d7a0
JD
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
e9a63f04 111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
8c5ff6dd 112 exit 1
ca81d7a0
JD
113fi
114
8c5ff6dd
KR
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 || :
ca81d7a0 122done
6bae0ccf
DL
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
e9a63f04
GM
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
6bae0ccf 132
8c5ff6dd
KR
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
221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
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"
319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
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
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
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
363# script with status $?, using 1 if that was 0.
364as_fn_error ()
365{
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
370 fi
371 $as_echo "$as_me: error: $1" >&2
372 as_fn_exit $as_status
373} # as_fn_error
374
ca81d7a0
JD
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
377 as_expr=expr
378else
379 as_expr=false
380fi
381
ca81d7a0 382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
383 as_basename=basename
384else
385 as_basename=false
386fi
c0d27fcc 387
8c5ff6dd
KR
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390else
391 as_dirname=false
392fi
c0d27fcc 393
ca81d7a0 394as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
ca81d7a0 397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 398$as_echo X/"$0" |
ca81d7a0
JD
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'`
c0d27fcc 412
8c5ff6dd
KR
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
6bae0ccf 419
c0d27fcc 420
8c5ff6dd
KR
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; }
c0d27fcc 443
8c5ff6dd
KR
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
ca81d7a0 450}
c0d27fcc 451
8c5ff6dd
KR
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
7186fb09 464
8c5ff6dd
KR
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
e6df49e4 471fi
8c5ff6dd
KR
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
e6df49e4 486else
8c5ff6dd 487 as_ln_s='cp -p'
e6df49e4 488fi
8c5ff6dd
KR
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
08b47d3d 491
8c5ff6dd
KR
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
a4f64981 497fi
a5edbe4a 498
8c5ff6dd
KR
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
a4f64981 501else
8c5ff6dd
KR
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 '
a4f64981 519fi
8c5ff6dd 520as_executable_p=$as_test_x
a5edbe4a 521
8c5ff6dd
KR
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'"
e6df49e4 524
8c5ff6dd
KR
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
e6df49e4 527
a4f64981 528
8c5ff6dd
KR
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
a4f64981
GM
531
532# Name of the host.
533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
503d2be0 536
503d2be0
AS
537#
538# Initializations.
539#
ba4481b5 540ac_default_prefix=/usr/local
ca81d7a0 541ac_clean_files=
6bae0ccf 542ac_config_libobj_dir=.
ca81d7a0 543LIBOBJS=
503d2be0
AS
544cross_compiling=no
545subdirs=
c0d27fcc
MR
546MFLAGS=
547MAKEFLAGS=
503d2be0 548
c0d27fcc 549# Identity of this package.
9cf8f393
JD
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
49a62e8a
GM
552PACKAGE_VERSION='24.0.50'
553PACKAGE_STRING='emacs 24.0.50'
9cf8f393 554PACKAGE_BUGREPORT=''
8c5ff6dd 555PACKAGE_URL=''
c0d27fcc 556
503d2be0
AS
557ac_unique_file="src/lisp.h"
558# Factoring default headers for most tests.
559ac_includes_default="\
560#include <stdio.h>
f053c89f 561#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
562# include <sys/types.h>
563#endif
f053c89f 564#ifdef HAVE_SYS_STAT_H
503d2be0
AS
565# include <sys/stat.h>
566#endif
f053c89f 567#ifdef STDC_HEADERS
503d2be0
AS
568# include <stdlib.h>
569# include <stddef.h>
570#else
f053c89f 571# ifdef HAVE_STDLIB_H
503d2be0
AS
572# include <stdlib.h>
573# endif
574#endif
f053c89f
CY
575#ifdef HAVE_STRING_H
576# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
577# include <memory.h>
578# endif
579# include <string.h>
580#endif
f053c89f 581#ifdef HAVE_STRINGS_H
503d2be0
AS
582# include <strings.h>
583#endif
f053c89f 584#ifdef HAVE_INTTYPES_H
503d2be0 585# include <inttypes.h>
503d2be0 586#endif
f053c89f 587#ifdef HAVE_STDINT_H
ca81d7a0 588# include <stdint.h>
503d2be0 589#endif
f053c89f 590#ifdef HAVE_UNISTD_H
503d2be0
AS
591# include <unistd.h>
592#endif"
ba4481b5 593
a51f4969 594ac_config_libobj_dir=src
c24fa7dc
MB
595ac_header_list=
596ac_func_list=
8c5ff6dd 597ac_subst_vars='LTLIBOBJS
372b4090 598WINDOW_SUPPORT
8c5ff6dd
KR
599TOOLTIP_SUPPORT
600MOUSE_SUPPORT
601LIB_GCC
602LD_SWITCH_SYSTEM_EXTRA
603LD_SWITCH_SYSTEM_TEMACS
604POST_ALLOC_OBJ
605PRE_ALLOC_OBJ
606CYGWIN_OBJ
607LIBX_OTHER
608LIBXMENU
609OLDXMENU
610OLDXMENU_TARGET
611LIBXT_OTHER
612TOOLKIT_LIBW
613WIDGET_OBJ
614XOBJ
615XMENU_OBJ
616OTHER_FILES
617GNU_OBJC_CFLAGS
618GNUSTEP_SYSTEM_LIBRARIES
619GNUSTEP_SYSTEM_HEADERS
620ns_appsrc
621ns_appresdir
622ns_appbindir
623ns_appdir
624opsysfile
625machfile
626X_TOOLKIT_TYPE
627C_SWITCH_X_SYSTEM
628C_SWITCH_X_SITE
629LD_SWITCH_X_SITE
630unexec
631gameuser
632gamedir
633bitmapdir
634archlibdir
635etcdir
636x_default_search_path
637lisppath
638locallisppath
639lispdir
640srcdir
641canonical
642configuration
643version
644KRB4LIB
645DESLIB
646KRB5LIB
647CRYPTOLIB
648COM_ERRLIB
649LIBRESOLV
650LIBHESIOD
651TERMCAP_OBJ
652LIBS_TERMCAP
653GETOPTOBJS
654GETOPT_H
655GETLOADAVG_LIBS
656KMEM_GROUP
657NEED_SETGID
658LIBOBJS
659BLESSMAIL_TARGET
660LIBS_MAIL
661liblockfile
662ALLOCA
663LIBXSM
664LIBGPM
665LIBGIF
666LIBTIFF
667LIBPNG
668LIBJPEG
669LIBXPM
670FREETYPE_LIBS
671FREETYPE_CFLAGS
672FONT_OBJ
673M17N_FLT_LIBS
674M17N_FLT_CFLAGS
675LIBOTF_LIBS
676LIBOTF_CFLAGS
677XFT_LIBS
678XFT_CFLAGS
679FONTCONFIG_LIBS
680FONTCONFIG_CFLAGS
681LIBXMU
682LIBXTR6
683LIBSELINUX_LIBS
684GCONF_LIBS
685GCONF_CFLAGS
686DBUS_OBJ
687DBUS_LIBS
688DBUS_CFLAGS
689GTK_OBJ
690GTK_LIBS
691GTK_CFLAGS
692RSVG_LIBS
693RSVG_CFLAGS
694HAVE_XSERVER
695LIB_STANDARD
696NS_SUPPORT
697NS_OBJ
698NS_IMPL_GNUSTEP_INC
699LD_SWITCH_X_SITE_AUX_RPATH
700LD_SWITCH_X_SITE_AUX
701XMKMF
702SET_MAKE
703CFLAGS_SOUND
704ALSA_LIBS
705ALSA_CFLAGS
706PKG_CONFIG
707LIBSOUND
708START_FILES
709LIB_MATH
710CRT_DIR
711LIBS_SYSTEM
712C_SWITCH_SYSTEM
713C_SWITCH_MACHINE
714LD_SWITCH_SYSTEM
715MAKEINFO
716GZIP_PROG
717INSTALL_INFO
718RANLIB
719INSTALL_DATA
720INSTALL_SCRIPT
721INSTALL_PROGRAM
722EGREP
723GREP
724CPP
725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732host_os
733host_vendor
734host_cpu
735host
736build_os
737build_vendor
738build_cpu
739build
740MAINT
741target_alias
742host_alias
743build_alias
744LIBS
745ECHO_T
746ECHO_N
747ECHO_C
748DEFS
749mandir
750localedir
751libdir
752psdir
753pdfdir
754dvidir
755htmldir
756infodir
757docdir
758oldincludedir
759includedir
760localstatedir
761sharedstatedir
762sysconfdir
763datadir
764datarootdir
765libexecdir
766sbindir
767bindir
768program_transform_name
769prefix
770exec_prefix
771PACKAGE_URL
772PACKAGE_BUGREPORT
773PACKAGE_STRING
774PACKAGE_VERSION
775PACKAGE_TARNAME
776PACKAGE_NAME
777PATH_SEPARATOR
778SHELL'
779ac_subst_files=''
780ac_user_opts='
781enable_option_checking
782with_pop
783with_kerberos
784with_kerberos5
785with_hesiod
786with_mmdf
787with_mail_unlink
788with_mailhost
789with_sound
790with_sync_input
791with_x_toolkit
792with_xpm
793with_jpeg
794with_tiff
795with_gif
796with_png
797with_rsvg
798with_xft
799with_libotf
800with_m17n_flt
801with_toolkit_scroll_bars
802with_xaw3d
803with_xim
804with_ns
805with_gpm
806with_dbus
807with_gconf
808with_selinux
809with_makeinfo
810with_gtk
811with_gcc
812with_pkg_config_prog
813with_crt_dir
814with_gnustep_conf
815enable_ns_self_contained
816enable_asserts
817enable_maintainer_mode
818enable_locallisppath
819enable_checking
820enable_profiling
821enable_autodepend
822enable_largefile
823with_x
824'
825 ac_precious_vars='build_alias
826host_alias
827target_alias
828CC
829CFLAGS
830LDFLAGS
831LIBS
832CPPFLAGS
833CPP
834XMKMF'
a5edbe4a 835
08b47d3d 836
8c5ff6dd
KR
837# Initialize some variables set by options.
838ac_init_help=
839ac_init_version=false
840ac_unrecognized_opts=
841ac_unrecognized_sep=
842# The variables have the same names as the options, with
843# dashes changed to underlines.
844cache_file=/dev/null
845exec_prefix=NONE
846no_create=
847no_recursion=
848prefix=NONE
849program_prefix=NONE
850program_suffix=NONE
851program_transform_name=s,x,x,
852silent=
853site=
854srcdir=
855verbose=
856x_includes=NONE
857x_libraries=NONE
7186fb09 858
8c5ff6dd
KR
859# Installation directory options.
860# These are left unexpanded so users can "make install exec_prefix=/foo"
861# and all the variables that are supposed to be based on exec_prefix
862# by default will actually change.
863# Use braces instead of parens because sh, perl, etc. also accept them.
864# (The list follows the same order as the GNU Coding Standards.)
865bindir='${exec_prefix}/bin'
866sbindir='${exec_prefix}/sbin'
867libexecdir='${exec_prefix}/libexec'
868datarootdir='${prefix}/share'
869datadir='${datarootdir}'
870sysconfdir='${prefix}/etc'
871sharedstatedir='${prefix}/com'
872localstatedir='${prefix}/var'
873includedir='${prefix}/include'
874oldincludedir='/usr/include'
875docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
876infodir='${datarootdir}/info'
877htmldir='${docdir}'
878dvidir='${docdir}'
879pdfdir='${docdir}'
880psdir='${docdir}'
881libdir='${exec_prefix}/lib'
882localedir='${datarootdir}/locale'
883mandir='${datarootdir}/man'
a4f64981 884
8c5ff6dd
KR
885ac_prev=
886ac_dashdash=
887for ac_option
a4f64981 888do
8c5ff6dd
KR
889 # If the previous option needs an argument, assign it.
890 if test -n "$ac_prev"; then
891 eval $ac_prev=\$ac_option
892 ac_prev=
893 continue
894 fi
cd03c74a 895
8c5ff6dd
KR
896 case $ac_option in
897 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
898 *) ac_optarg=yes ;;
899 esac
cd03c74a 900
8c5ff6dd 901 # Accept the important Cygnus configure options, so we can diagnose typos.
e6df49e4 902
8c5ff6dd
KR
903 case $ac_dashdash$ac_option in
904 --)
905 ac_dashdash=yes ;;
a4f64981 906
8c5ff6dd
KR
907 -bindir | --bindir | --bindi | --bind | --bin | --bi)
908 ac_prev=bindir ;;
909 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
910 bindir=$ac_optarg ;;
a4f64981 911
8c5ff6dd
KR
912 -build | --build | --buil | --bui | --bu)
913 ac_prev=build_alias ;;
914 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
915 build_alias=$ac_optarg ;;
15e12598 916
8c5ff6dd
KR
917 -cache-file | --cache-file | --cache-fil | --cache-fi \
918 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
919 ac_prev=cache_file ;;
920 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
921 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
922 cache_file=$ac_optarg ;;
08b47d3d 923
8c5ff6dd
KR
924 --config-cache | -C)
925 cache_file=config.cache ;;
a5edbe4a 926
8c5ff6dd
KR
927 -datadir | --datadir | --datadi | --datad)
928 ac_prev=datadir ;;
929 -datadir=* | --datadir=* | --datadi=* | --datad=*)
930 datadir=$ac_optarg ;;
a5edbe4a 931
8c5ff6dd
KR
932 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
933 | --dataroo | --dataro | --datar)
934 ac_prev=datarootdir ;;
935 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
936 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
937 datarootdir=$ac_optarg ;;
08b47d3d 938
8c5ff6dd
KR
939 -disable-* | --disable-*)
940 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
941 # Reject names that are not valid shell variable names.
942 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
943 as_fn_error "invalid feature name: $ac_useropt"
944 ac_useropt_orig=$ac_useropt
945 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
946 case $ac_user_opts in
947 *"
948"enable_$ac_useropt"
949"*) ;;
950 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
951 ac_unrecognized_sep=', ';;
952 esac
953 eval enable_$ac_useropt=no ;;
e6df49e4 954
8c5ff6dd
KR
955 -docdir | --docdir | --docdi | --doc | --do)
956 ac_prev=docdir ;;
957 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
958 docdir=$ac_optarg ;;
e6df49e4 959
8c5ff6dd
KR
960 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
961 ac_prev=dvidir ;;
962 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
963 dvidir=$ac_optarg ;;
e6df49e4 964
8c5ff6dd
KR
965 -enable-* | --enable-*)
966 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
967 # Reject names that are not valid shell variable names.
968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
969 as_fn_error "invalid feature name: $ac_useropt"
970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=\$ac_optarg ;;
e6df49e4 980
8c5ff6dd
KR
981 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
982 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
983 | --exec | --exe | --ex)
984 ac_prev=exec_prefix ;;
985 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
986 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
987 | --exec=* | --exe=* | --ex=*)
988 exec_prefix=$ac_optarg ;;
e6df49e4 989
8c5ff6dd
KR
990 -gas | --gas | --ga | --g)
991 # Obsolete; use --with-gas.
992 with_gas=yes ;;
08b47d3d 993
8c5ff6dd
KR
994 -help | --help | --hel | --he | -h)
995 ac_init_help=long ;;
996 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
997 ac_init_help=recursive ;;
998 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
999 ac_init_help=short ;;
08b47d3d 1000
8c5ff6dd
KR
1001 -host | --host | --hos | --ho)
1002 ac_prev=host_alias ;;
1003 -host=* | --host=* | --hos=* | --ho=*)
1004 host_alias=$ac_optarg ;;
a4f64981 1005
8c5ff6dd
KR
1006 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1007 ac_prev=htmldir ;;
1008 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1009 | --ht=*)
1010 htmldir=$ac_optarg ;;
15e12598 1011
8c5ff6dd
KR
1012 -includedir | --includedir | --includedi | --included | --include \
1013 | --includ | --inclu | --incl | --inc)
1014 ac_prev=includedir ;;
1015 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1016 | --includ=* | --inclu=* | --incl=* | --inc=*)
1017 includedir=$ac_optarg ;;
15e12598 1018
8c5ff6dd
KR
1019 -infodir | --infodir | --infodi | --infod | --info | --inf)
1020 ac_prev=infodir ;;
1021 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1022 infodir=$ac_optarg ;;
a4f64981 1023
8c5ff6dd
KR
1024 -libdir | --libdir | --libdi | --libd)
1025 ac_prev=libdir ;;
1026 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1027 libdir=$ac_optarg ;;
0c309b80 1028
8c5ff6dd
KR
1029 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1030 | --libexe | --libex | --libe)
1031 ac_prev=libexecdir ;;
1032 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1033 | --libexe=* | --libex=* | --libe=*)
1034 libexecdir=$ac_optarg ;;
1035
1036 -localedir | --localedir | --localedi | --localed | --locale)
1037 ac_prev=localedir ;;
1038 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1039 localedir=$ac_optarg ;;
aaa36002 1040
8c5ff6dd
KR
1041 -localstatedir | --localstatedir | --localstatedi | --localstated \
1042 | --localstate | --localstat | --localsta | --localst | --locals)
1043 ac_prev=localstatedir ;;
1044 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1045 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1046 localstatedir=$ac_optarg ;;
7186fb09 1047
8c5ff6dd
KR
1048 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1049 ac_prev=mandir ;;
1050 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1051 mandir=$ac_optarg ;;
cd03c74a 1052
8c5ff6dd
KR
1053 -nfp | --nfp | --nf)
1054 # Obsolete; use --without-fp.
1055 with_fp=no ;;
a5edbe4a 1056
8c5ff6dd
KR
1057 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1058 | --no-cr | --no-c | -n)
1059 no_create=yes ;;
a5edbe4a 1060
8c5ff6dd
KR
1061 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1062 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1063 no_recursion=yes ;;
cd03c74a 1064
8c5ff6dd
KR
1065 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1066 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1067 | --oldin | --oldi | --old | --ol | --o)
1068 ac_prev=oldincludedir ;;
1069 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1070 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1071 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1072 oldincludedir=$ac_optarg ;;
a4f64981 1073
8c5ff6dd
KR
1074 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1075 ac_prev=prefix ;;
1076 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1077 prefix=$ac_optarg ;;
49ebbd65 1078
8c5ff6dd
KR
1079 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1080 | --program-pre | --program-pr | --program-p)
1081 ac_prev=program_prefix ;;
1082 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1083 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1084 program_prefix=$ac_optarg ;;
a5edbe4a 1085
8c5ff6dd
KR
1086 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1087 | --program-suf | --program-su | --program-s)
1088 ac_prev=program_suffix ;;
1089 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1090 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1091 program_suffix=$ac_optarg ;;
a5edbe4a 1092
8c5ff6dd
KR
1093 -program-transform-name | --program-transform-name \
1094 | --program-transform-nam | --program-transform-na \
1095 | --program-transform-n | --program-transform- \
1096 | --program-transform | --program-transfor \
1097 | --program-transfo | --program-transf \
1098 | --program-trans | --program-tran \
1099 | --progr-tra | --program-tr | --program-t)
1100 ac_prev=program_transform_name ;;
1101 -program-transform-name=* | --program-transform-name=* \
1102 | --program-transform-nam=* | --program-transform-na=* \
1103 | --program-transform-n=* | --program-transform-=* \
1104 | --program-transform=* | --program-transfor=* \
1105 | --program-transfo=* | --program-transf=* \
1106 | --program-trans=* | --program-tran=* \
1107 | --progr-tra=* | --program-tr=* | --program-t=*)
1108 program_transform_name=$ac_optarg ;;
08b47d3d 1109
8c5ff6dd
KR
1110 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1111 ac_prev=pdfdir ;;
1112 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1113 pdfdir=$ac_optarg ;;
a5edbe4a 1114
8c5ff6dd
KR
1115 -psdir | --psdir | --psdi | --psd | --ps)
1116 ac_prev=psdir ;;
1117 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1118 psdir=$ac_optarg ;;
a5edbe4a 1119
8c5ff6dd
KR
1120 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1121 | -silent | --silent | --silen | --sile | --sil)
1122 silent=yes ;;
a5edbe4a 1123
8c5ff6dd
KR
1124 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1125 ac_prev=sbindir ;;
1126 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1127 | --sbi=* | --sb=*)
1128 sbindir=$ac_optarg ;;
e6df49e4 1129
8c5ff6dd
KR
1130 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1131 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1132 | --sharedst | --shareds | --shared | --share | --shar \
1133 | --sha | --sh)
1134 ac_prev=sharedstatedir ;;
1135 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1136 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1137 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1138 | --sha=* | --sh=*)
1139 sharedstatedir=$ac_optarg ;;
e6df49e4 1140
8c5ff6dd
KR
1141 -site | --site | --sit)
1142 ac_prev=site ;;
1143 -site=* | --site=* | --sit=*)
1144 site=$ac_optarg ;;
e6df49e4 1145
8c5ff6dd
KR
1146 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1147 ac_prev=srcdir ;;
1148 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1149 srcdir=$ac_optarg ;;
e6df49e4 1150
8c5ff6dd
KR
1151 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1152 | --syscon | --sysco | --sysc | --sys | --sy)
1153 ac_prev=sysconfdir ;;
1154 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1155 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1156 sysconfdir=$ac_optarg ;;
e6df49e4 1157
8c5ff6dd
KR
1158 -target | --target | --targe | --targ | --tar | --ta | --t)
1159 ac_prev=target_alias ;;
1160 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1161 target_alias=$ac_optarg ;;
e6df49e4 1162
8c5ff6dd
KR
1163 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1164 verbose=yes ;;
e6df49e4 1165
8c5ff6dd
KR
1166 -version | --version | --versio | --versi | --vers | -V)
1167 ac_init_version=: ;;
e6df49e4 1168
8c5ff6dd
KR
1169 -with-* | --with-*)
1170 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1171 # Reject names that are not valid shell variable names.
1172 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1173 as_fn_error "invalid package name: $ac_useropt"
1174 ac_useropt_orig=$ac_useropt
1175 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1176 case $ac_user_opts in
1177 *"
1178"with_$ac_useropt"
1179"*) ;;
1180 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1181 ac_unrecognized_sep=', ';;
1182 esac
1183 eval with_$ac_useropt=\$ac_optarg ;;
15e12598 1184
8c5ff6dd
KR
1185 -without-* | --without-*)
1186 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1187 # Reject names that are not valid shell variable names.
1188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1189 as_fn_error "invalid package name: $ac_useropt"
1190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=no ;;
0c309b80 1200
8c5ff6dd
KR
1201 --x)
1202 # Obsolete; use --with-x.
1203 with_x=yes ;;
e6df49e4 1204
8c5ff6dd
KR
1205 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1206 | --x-incl | --x-inc | --x-in | --x-i)
1207 ac_prev=x_includes ;;
1208 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1209 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1210 x_includes=$ac_optarg ;;
e6df49e4 1211
8c5ff6dd
KR
1212 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1213 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1214 ac_prev=x_libraries ;;
1215 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1216 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1217 x_libraries=$ac_optarg ;;
e6df49e4 1218
8c5ff6dd
KR
1219 -*) as_fn_error "unrecognized option: \`$ac_option'
1220Try \`$0 --help' for more information."
1221 ;;
e6df49e4 1222
8c5ff6dd
KR
1223 *=*)
1224 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1225 # Reject names that are not valid shell variable names.
1226 case $ac_envvar in #(
1227 '' | [0-9]* | *[!_$as_cr_alnum]* )
1228 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1229 esac
1230 eval $ac_envvar=\$ac_optarg
1231 export $ac_envvar ;;
e6df49e4 1232
8c5ff6dd
KR
1233 *)
1234 # FIXME: should be removed in autoconf 3.0.
1235 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1236 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1237 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1238 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1239 ;;
e6df49e4 1240
8c5ff6dd
KR
1241 esac
1242done
e6df49e4 1243
8c5ff6dd
KR
1244if test -n "$ac_prev"; then
1245 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1246 as_fn_error "missing argument to $ac_option"
15e12598 1247fi
15e12598 1248
8c5ff6dd
KR
1249if test -n "$ac_unrecognized_opts"; then
1250 case $enable_option_checking in
1251 no) ;;
1252 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1253 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1254 esac
0c309b80 1255fi
e6df49e4 1256
8c5ff6dd
KR
1257# Check all directory arguments for consistency.
1258for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1259 datadir sysconfdir sharedstatedir localstatedir includedir \
1260 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1261 libdir localedir mandir
1262do
1263 eval ac_val=\$$ac_var
1264 # Remove trailing slashes.
1265 case $ac_val in
1266 */ )
1267 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1268 eval $ac_var=\$ac_val;;
1269 esac
1270 # Be sure to have absolute directory names.
1271 case $ac_val in
1272 [\\/$]* | ?:[\\/]* ) continue;;
1273 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1274 esac
1275 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1276done
e6df49e4 1277
8c5ff6dd
KR
1278# There might be people who depend on the old broken behavior: `$host'
1279# used to hold the argument of --host etc.
1280# FIXME: To remove some day.
1281build=$build_alias
1282host=$host_alias
1283target=$target_alias
e6df49e4 1284
8c5ff6dd
KR
1285# FIXME: To remove some day.
1286if test "x$host_alias" != x; then
1287 if test "x$build_alias" = x; then
1288 cross_compiling=maybe
1289 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1290 If a cross compiler is detected then cross compile mode will be used." >&2
1291 elif test "x$build_alias" != "x$host_alias"; then
1292 cross_compiling=yes
1293 fi
1294fi
e6df49e4 1295
8c5ff6dd
KR
1296ac_tool_prefix=
1297test -n "$host_alias" && ac_tool_prefix=$host_alias-
0c309b80 1298
8c5ff6dd 1299test "$silent" = yes && exec 6>/dev/null
aaa36002 1300
e6df49e4 1301
8c5ff6dd
KR
1302ac_pwd=`pwd` && test -n "$ac_pwd" &&
1303ac_ls_di=`ls -di .` &&
1304ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1305 as_fn_error "working directory cannot be determined"
1306test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1307 as_fn_error "pwd does not report name of working directory"
15e12598 1308
0c309b80 1309
8c5ff6dd
KR
1310# Find the source files, if location was not specified.
1311if test -z "$srcdir"; then
1312 ac_srcdir_defaulted=yes
1313 # Try the directory containing this script, then the parent directory.
1314 ac_confdir=`$as_dirname -- "$as_myself" ||
1315$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1316 X"$as_myself" : 'X\(//\)[^/]' \| \
1317 X"$as_myself" : 'X\(//\)$' \| \
1318 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1319$as_echo X"$as_myself" |
1320 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1321 s//\1/
1322 q
1323 }
1324 /^X\(\/\/\)[^/].*/{
1325 s//\1/
1326 q
1327 }
1328 /^X\(\/\/\)$/{
1329 s//\1/
1330 q
1331 }
1332 /^X\(\/\).*/{
1333 s//\1/
1334 q
1335 }
1336 s/.*/./; q'`
1337 srcdir=$ac_confdir
1338 if test ! -r "$srcdir/$ac_unique_file"; then
1339 srcdir=..
1340 fi
1341else
1342 ac_srcdir_defaulted=no
1343fi
1344if test ! -r "$srcdir/$ac_unique_file"; then
1345 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1346 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1347fi
1348ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1349ac_abs_confdir=`(
1350 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1351 pwd)`
1352# When building in place, set srcdir=.
1353if test "$ac_abs_confdir" = "$ac_pwd"; then
1354 srcdir=.
49ebbd65 1355fi
8c5ff6dd
KR
1356# Remove unnecessary trailing slashes from srcdir.
1357# Double slashes in file names in object file debugging info
1358# mess up M-x gdb in Emacs.
1359case $srcdir in
1360*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1361esac
1362for ac_var in $ac_precious_vars; do
1363 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1364 eval ac_env_${ac_var}_value=\$${ac_var}
1365 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1366 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1367done
15e12598 1368
8c5ff6dd
KR
1369#
1370# Report the --help message.
1371#
1372if test "$ac_init_help" = "long"; then
1373 # Omit some internal or obsolete options to make the list less imposing.
1374 # This message is too long to be a string in the A/UX 3.1 sh.
1375 cat <<_ACEOF
1376\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
15e12598 1377
8c5ff6dd 1378Usage: $0 [OPTION]... [VAR=VALUE]...
e6df49e4 1379
8c5ff6dd
KR
1380To assign environment variables (e.g., CC, CFLAGS...), specify them as
1381VAR=VALUE. See below for descriptions of some of the useful variables.
e6df49e4 1382
8c5ff6dd 1383Defaults for the options are specified in brackets.
e6df49e4 1384
8c5ff6dd
KR
1385Configuration:
1386 -h, --help display this help and exit
1387 --help=short display options specific to this package
1388 --help=recursive display the short help of all the included packages
1389 -V, --version display version information and exit
1390 -q, --quiet, --silent do not print \`checking...' messages
1391 --cache-file=FILE cache test results in FILE [disabled]
1392 -C, --config-cache alias for \`--cache-file=config.cache'
1393 -n, --no-create do not create output files
1394 --srcdir=DIR find the sources in DIR [configure dir or \`..']
0c309b80 1395
8c5ff6dd
KR
1396Installation directories:
1397 --prefix=PREFIX install architecture-independent files in PREFIX
1398 [$ac_default_prefix]
1399 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1400 [PREFIX]
15e12598 1401
8c5ff6dd
KR
1402By default, \`make install' will install all the files in
1403\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1404an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1405for instance \`--prefix=\$HOME'.
15e12598 1406
8c5ff6dd 1407For better control, use the options below.
a4f64981 1408
8c5ff6dd
KR
1409Fine tuning of the installation directories:
1410 --bindir=DIR user executables [EPREFIX/bin]
1411 --sbindir=DIR system admin executables [EPREFIX/sbin]
1412 --libexecdir=DIR program executables [EPREFIX/libexec]
1413 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1414 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1415 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1416 --libdir=DIR object code libraries [EPREFIX/lib]
1417 --includedir=DIR C header files [PREFIX/include]
1418 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1419 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1420 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1421 --infodir=DIR info documentation [DATAROOTDIR/info]
1422 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1423 --mandir=DIR man documentation [DATAROOTDIR/man]
1424 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1425 --htmldir=DIR html documentation [DOCDIR]
1426 --dvidir=DIR dvi documentation [DOCDIR]
1427 --pdfdir=DIR pdf documentation [DOCDIR]
1428 --psdir=DIR ps documentation [DOCDIR]
a4f64981 1429_ACEOF
08b47d3d 1430
8c5ff6dd 1431 cat <<\_ACEOF
a5edbe4a 1432
8c5ff6dd
KR
1433Program names:
1434 --program-prefix=PREFIX prepend PREFIX to installed program names
1435 --program-suffix=SUFFIX append SUFFIX to installed program names
1436 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
15e12598 1437
8c5ff6dd
KR
1438X features:
1439 --x-includes=DIR X include files are in DIR
1440 --x-libraries=DIR X library files are in DIR
15e12598 1441
8c5ff6dd
KR
1442System types:
1443 --build=BUILD configure for building on BUILD [guessed]
1444 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1445_ACEOF
15e12598 1446fi
e6df49e4 1447
8c5ff6dd
KR
1448if test -n "$ac_init_help"; then
1449 case $ac_init_help in
1450 short | recursive ) echo "Configuration of emacs 24.0.50:";;
1451 esac
1452 cat <<\_ACEOF
0c309b80 1453
8c5ff6dd
KR
1454Optional Features:
1455 --disable-option-checking ignore unrecognized --enable/--with options
1456 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1457 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1458 --disable-ns-self-contained
1459 disable self contained build under NeXTstep
1460 --enable-asserts compile code with asserts enabled
1461 --enable-maintainer-mode
1462 enable make rules and dependencies not useful (and
1463 sometimes confusing) to the casual installer
1464 --enable-locallisppath=PATH
1465 directories Emacs should search for lisp files
1466 specific to this site
1467 --enable-checking[=LIST]
1468 enable expensive run-time checks. With LIST, enable
1469 only specific categories of checks. Categories are:
1470 all,yes,no. Flags are: stringbytes, stringoverrun,
1471 stringfreelist, xmallocoverrun, conslist
1472 --enable-profiling build emacs with profiling support. This might not
1473 work on all platforms
1474 --enable-autodepend automatically generate dependencies to .h-files.
1475 Requires GNU Make and Gcc. Enabled if GNU Make and
1476 Gcc is found
1477 --disable-largefile omit support for large files
1f8162fe 1478
8c5ff6dd
KR
1479Optional Packages:
1480 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1481 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1482 --without-pop don't support POP mail retrieval with movemail
1483 --with-kerberos support Kerberos-authenticated POP
1484 --with-kerberos5 support Kerberos version 5 authenticated POP
1485 --with-hesiod support Hesiod to get the POP server host
1486 --with-mmdf support MMDF mailboxes
1487 --with-mail-unlink unlink, rather than empty, mail spool after reading
1488 --with-mailhost=HOSTNAME
1489 string giving default POP mail host
1490 --without-sound don't compile with sound support
1491 --without-sync-input process async input synchronously
1492 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, lucid or
1493 athena, motif, no)
1494 --without-xpm don't compile with XPM image support
1495 --without-jpeg don't compile with JPEG image support
1496 --without-tiff don't compile with TIFF image support
1497 --without-gif don't compile with GIF image support
1498 --without-png don't compile with PNG image support
1499 --without-rsvg don't compile with SVG image support
1500 --without-xft don't use XFT for anti aliased fonts
1501 --without-libotf don't use libotf for OpenType font support
1502 --without-m17n-flt don't use m17n-flt for text shaping
1503 --without-toolkit-scroll-bars
1504 don't use Motif or Xaw3d scroll bars
1505 --without-xaw3d don't use Xaw3d
1506 --without-xim don't use X11 XIM
1507 --with-ns use nextstep (Cocoa or GNUstep) windowing system
1508 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1509 console
1510 --without-dbus don't compile with D-Bus support
1511 --without-gconf don't compile with GConf support
1512 --without-selinux don't compile with SELinux support
1513 --without-makeinfo don't require makeinfo for building manuals
0c309b80 1514
8c5ff6dd
KR
1515 --with-pkg-config-prog=PATH
1516 path to pkg-config for finding GTK and librsvg
1517 --with-crt-dir=DIR directory containing crtn.o etc. The default is
1518 /usr/lib, or /usr/lib64 on some platforms.
1519 --with-gnustep-conf=PATH
1520 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1521 or /etc/GNUstep/GNUstep.conf
1522 --with-x use the X Window System
e6df49e4 1523
8c5ff6dd
KR
1524Some influential environment variables:
1525 CC C compiler command
1526 CFLAGS C compiler flags
1527 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1528 nonstandard directory <lib dir>
1529 LIBS libraries to pass to the linker, e.g. -l<library>
1530 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1531 you have headers in a nonstandard directory <include dir>
1532 CPP C preprocessor
1533 XMKMF Path to xmkmf, Makefile generator for X Window System
15e12598 1534
8c5ff6dd
KR
1535Use these variables to override the choices made by `configure' or to help
1536it to find libraries and programs with nonstandard names/locations.
e6df49e4 1537
8c5ff6dd 1538Report bugs to the package provider.
a4f64981 1539_ACEOF
8c5ff6dd 1540ac_status=$?
a4f64981 1541fi
0c309b80 1542
8c5ff6dd
KR
1543if test "$ac_init_help" = "recursive"; then
1544 # If there are subdirs, report their specific --help.
1545 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1546 test -d "$ac_dir" ||
1547 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1548 continue
1549 ac_builddir=.
49ebbd65 1550
8c5ff6dd
KR
1551case "$ac_dir" in
1552.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1553*)
1554 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1555 # A ".." for each directory in $ac_dir_suffix.
1556 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1557 case $ac_top_builddir_sub in
1558 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1559 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1560 esac ;;
a4f64981 1561esac
8c5ff6dd
KR
1562ac_abs_top_builddir=$ac_pwd
1563ac_abs_builddir=$ac_pwd$ac_dir_suffix
1564# for backward compatibility:
1565ac_top_builddir=$ac_top_build_prefix
e6df49e4 1566
8c5ff6dd
KR
1567case $srcdir in
1568 .) # We are building in place.
1569 ac_srcdir=.
1570 ac_top_srcdir=$ac_top_builddir_sub
1571 ac_abs_top_srcdir=$ac_pwd ;;
1572 [\\/]* | ?:[\\/]* ) # Absolute name.
1573 ac_srcdir=$srcdir$ac_dir_suffix;
1574 ac_top_srcdir=$srcdir
1575 ac_abs_top_srcdir=$srcdir ;;
1576 *) # Relative name.
1577 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1578 ac_top_srcdir=$ac_top_build_prefix$srcdir
1579 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1580esac
1581ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49ebbd65 1582
8c5ff6dd
KR
1583 cd "$ac_dir" || { ac_status=$?; continue; }
1584 # Check for guested configure.
1585 if test -f "$ac_srcdir/configure.gnu"; then
1586 echo &&
1587 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1588 elif test -f "$ac_srcdir/configure"; then
1589 echo &&
1590 $SHELL "$ac_srcdir/configure" --help=recursive
1591 else
1592 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1593 fi || ac_status=$?
1594 cd "$ac_pwd" || { ac_status=$?; break; }
1595 done
1596fi
e6df49e4 1597
8c5ff6dd
KR
1598test -n "$ac_init_help" && exit $ac_status
1599if $ac_init_version; then
1600 cat <<\_ACEOF
1601emacs configure 24.0.50
1602generated by GNU Autoconf 2.65
e6df49e4 1603
8c5ff6dd
KR
1604Copyright (C) 2009 Free Software Foundation, Inc.
1605This configure script is free software; the Free Software Foundation
1606gives unlimited permission to copy, distribute and modify it.
a4f64981 1607_ACEOF
8c5ff6dd
KR
1608 exit
1609fi
0c309b80 1610
8c5ff6dd
KR
1611## ------------------------ ##
1612## Autoconf initialization. ##
1613## ------------------------ ##
1614
1615# ac_fn_c_try_compile LINENO
1616# --------------------------
1617# Try to compile conftest.$ac_ext, and return whether this succeeded.
1618ac_fn_c_try_compile ()
a4f64981 1619{
8c5ff6dd
KR
1620 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1621 rm -f conftest.$ac_objext
1622 if { { ac_try="$ac_compile"
a4f64981
GM
1623case "(($ac_try" in
1624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1625 *) ac_try_echo=$ac_try;;
1626esac
8c5ff6dd
KR
1627eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1628$as_echo "$ac_try_echo"; } >&5
1629 (eval "$ac_compile") 2>conftest.err
a4f64981 1630 ac_status=$?
8c5ff6dd
KR
1631 if test -s conftest.err; then
1632 grep -v '^ *+' conftest.err >conftest.er1
1633 cat conftest.er1 >&5
1634 mv -f conftest.er1 conftest.err
1635 fi
1636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1637 test $ac_status = 0; } && {
a4f64981
GM
1638 test -z "$ac_c_werror_flag" ||
1639 test ! -s conftest.err
8c5ff6dd
KR
1640 } && test -s conftest.$ac_objext; then :
1641 ac_retval=0
a4f64981
GM
1642else
1643 $as_echo "$as_me: failed program was:" >&5
1644sed 's/^/| /' conftest.$ac_ext >&5
e6df49e4 1645
8c5ff6dd 1646 ac_retval=1
a4f64981 1647fi
8c5ff6dd
KR
1648 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1649 as_fn_set_status $ac_retval
15e12598 1650
8c5ff6dd 1651} # ac_fn_c_try_compile
e6df49e4 1652
8c5ff6dd
KR
1653# ac_fn_c_try_link LINENO
1654# -----------------------
1655# Try to link conftest.$ac_ext, and return whether this succeeded.
1656ac_fn_c_try_link ()
a4f64981 1657{
8c5ff6dd
KR
1658 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1659 rm -f conftest.$ac_objext conftest$ac_exeext
1660 if { { ac_try="$ac_link"
a4f64981
GM
1661case "(($ac_try" in
1662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1663 *) ac_try_echo=$ac_try;;
1664esac
8c5ff6dd
KR
1665eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1666$as_echo "$ac_try_echo"; } >&5
1667 (eval "$ac_link") 2>conftest.err
a4f64981 1668 ac_status=$?
8c5ff6dd
KR
1669 if test -s conftest.err; then
1670 grep -v '^ *+' conftest.err >conftest.er1
1671 cat conftest.er1 >&5
1672 mv -f conftest.er1 conftest.err
1673 fi
1674 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1675 test $ac_status = 0; } && {
a4f64981
GM
1676 test -z "$ac_c_werror_flag" ||
1677 test ! -s conftest.err
1678 } && test -s conftest$ac_exeext && {
1679 test "$cross_compiling" = yes ||
1680 $as_test_x conftest$ac_exeext
8c5ff6dd
KR
1681 }; then :
1682 ac_retval=0
a4f64981
GM
1683else
1684 $as_echo "$as_me: failed program was:" >&5
1685sed 's/^/| /' conftest.$ac_ext >&5
e6df49e4 1686
8c5ff6dd 1687 ac_retval=1
a4f64981 1688fi
8c5ff6dd
KR
1689 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1690 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1691 # interfere with the next link command; also delete a directory that is
1692 # left behind by Apple's compiler. We do this before executing the actions.
1693 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1694 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1695 as_fn_set_status $ac_retval
e6df49e4 1696
8c5ff6dd 1697} # ac_fn_c_try_link
e6df49e4 1698
8c5ff6dd
KR
1699# ac_fn_c_try_cpp LINENO
1700# ----------------------
1701# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1702ac_fn_c_try_cpp ()
a4f64981 1703{
8c5ff6dd
KR
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1705 if { { ac_try="$ac_cpp conftest.$ac_ext"
a4f64981
GM
1706case "(($ac_try" in
1707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1708 *) ac_try_echo=$ac_try;;
1709esac
8c5ff6dd
KR
1710eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1711$as_echo "$ac_try_echo"; } >&5
1712 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
a4f64981 1713 ac_status=$?
8c5ff6dd
KR
1714 if test -s conftest.err; then
1715 grep -v '^ *+' conftest.err >conftest.er1
1716 cat conftest.er1 >&5
1717 mv -f conftest.er1 conftest.err
1718 fi
1719 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1720 test $ac_status = 0; } >/dev/null && {
1721 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
a4f64981 1722 test ! -s conftest.err
8c5ff6dd
KR
1723 }; then :
1724 ac_retval=0
a4f64981
GM
1725else
1726 $as_echo "$as_me: failed program was:" >&5
1727sed 's/^/| /' conftest.$ac_ext >&5
1728
8c5ff6dd 1729 ac_retval=1
a4f64981 1730fi
8c5ff6dd
KR
1731 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1732 as_fn_set_status $ac_retval
a4f64981 1733
8c5ff6dd 1734} # ac_fn_c_try_cpp
e6df49e4 1735
8c5ff6dd
KR
1736# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1737# -------------------------------------------------------
1738# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1739# the include files in INCLUDES and setting the cache variable VAR
1740# accordingly.
1741ac_fn_c_check_header_mongrel ()
1742{
1743 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1746$as_echo_n "checking for $2... " >&6; }
1747if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
a4f64981 1748 $as_echo_n "(cached) " >&6
8c5ff6dd
KR
1749fi
1750eval ac_res=\$$3
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752$as_echo "$ac_res" >&6; }
a4f64981 1753else
8c5ff6dd
KR
1754 # Is the header compilable?
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1756$as_echo_n "checking $2 usability... " >&6; }
1757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 1758/* end confdefs.h. */
8c5ff6dd
KR
1759$4
1760#include <$2>
1761_ACEOF
1762if ac_fn_c_try_compile "$LINENO"; then :
1763 ac_header_compiler=yes
1764else
1765 ac_header_compiler=no
1766fi
1767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1769$as_echo "$ac_header_compiler" >&6; }
e6df49e4 1770
8c5ff6dd
KR
1771# Is the header present?
1772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1773$as_echo_n "checking $2 presence... " >&6; }
1774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1775/* end confdefs.h. */
1776#include <$2>
1777_ACEOF
1778if ac_fn_c_try_cpp "$LINENO"; then :
1779 ac_header_preproc=yes
1780else
1781 ac_header_preproc=no
1782fi
1783rm -f conftest.err conftest.$ac_ext
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1785$as_echo "$ac_header_preproc" >&6; }
e6df49e4 1786
8c5ff6dd
KR
1787# So? What about this header?
1788case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1789 yes:no: )
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1791$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1793$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1794 ;;
1795 no:yes:* )
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1797$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1799$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1801$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1803$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1805$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1806 ;;
1807esac
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809$as_echo_n "checking for $2... " >&6; }
1810if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1811 $as_echo_n "(cached) " >&6
1812else
1813 eval "$3=\$ac_header_compiler"
1814fi
1815eval ac_res=\$$3
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1817$as_echo "$ac_res" >&6; }
1818fi
1819 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
e6df49e4 1820
8c5ff6dd 1821} # ac_fn_c_check_header_mongrel
49ebbd65 1822
8c5ff6dd
KR
1823# ac_fn_c_try_run LINENO
1824# ----------------------
1825# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1826# that executables *can* be run.
1827ac_fn_c_try_run ()
a4f64981 1828{
8c5ff6dd
KR
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 if { { ac_try="$ac_link"
a4f64981
GM
1831case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
8c5ff6dd
KR
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_link") 2>&5
1838 ac_status=$?
1839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1841 { { case "(($ac_try" in
1842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1843 *) ac_try_echo=$ac_try;;
1844esac
1845eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1846$as_echo "$ac_try_echo"; } >&5
1847 (eval "$ac_try") 2>&5
a4f64981 1848 ac_status=$?
8c5ff6dd
KR
1849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850 test $ac_status = 0; }; }; then :
1851 ac_retval=0
a4f64981 1852else
8c5ff6dd
KR
1853 $as_echo "$as_me: program exited with status $ac_status" >&5
1854 $as_echo "$as_me: failed program was:" >&5
a4f64981 1855sed 's/^/| /' conftest.$ac_ext >&5
106c6f74 1856
8c5ff6dd 1857 ac_retval=$ac_status
a4f64981 1858fi
8c5ff6dd
KR
1859 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1860 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1861 as_fn_set_status $ac_retval
08b47d3d 1862
8c5ff6dd 1863} # ac_fn_c_try_run
a4f64981 1864
8c5ff6dd
KR
1865# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1866# -------------------------------------------------------
1867# Tests whether HEADER exists and can be compiled using the include files in
1868# INCLUDES, setting the cache variable VAR accordingly.
1869ac_fn_c_check_header_compile ()
1870{
1871 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873$as_echo_n "checking for $2... " >&6; }
1874if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1875 $as_echo_n "(cached) " >&6
1876else
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$4
1880#include <$2>
1881_ACEOF
1882if ac_fn_c_try_compile "$LINENO"; then :
1883 eval "$3=yes"
1884else
1885 eval "$3=no"
a4f64981 1886fi
8c5ff6dd 1887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 1888fi
8c5ff6dd
KR
1889eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891$as_echo "$ac_res" >&6; }
1892 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a4f64981 1893
8c5ff6dd
KR
1894} # ac_fn_c_check_header_compile
1895
1896# ac_fn_c_check_decl LINENO SYMBOL VAR
1897# ------------------------------------
1898# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
1899ac_fn_c_check_decl ()
1900{
1901 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
1903$as_echo_n "checking whether $2 is declared... " >&6; }
1904if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
a4f64981
GM
1905 $as_echo_n "(cached) " >&6
1906else
8c5ff6dd 1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 1908/* end confdefs.h. */
8c5ff6dd 1909$4
a4f64981
GM
1910int
1911main ()
1912{
8c5ff6dd
KR
1913#ifndef $2
1914 (void) $2;
a4f64981
GM
1915#endif
1916
1917 ;
1918 return 0;
1919}
1920_ACEOF
8c5ff6dd
KR
1921if ac_fn_c_try_compile "$LINENO"; then :
1922 eval "$3=yes"
a4f64981 1923else
8c5ff6dd 1924 eval "$3=no"
49ebbd65 1925fi
8c5ff6dd 1926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a5edbe4a 1927fi
8c5ff6dd
KR
1928eval ac_res=\$$3
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930$as_echo "$ac_res" >&6; }
1931 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
e6df49e4 1932
8c5ff6dd 1933} # ac_fn_c_check_decl
e6df49e4 1934
8c5ff6dd
KR
1935# ac_fn_c_check_header_preproc LINENO HEADER VAR
1936# ----------------------------------------------
1937# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1938ac_fn_c_check_header_preproc ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
1943if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
49ebbd65
DN
1944 $as_echo_n "(cached) " >&6
1945else
8c5ff6dd
KR
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948#include <$2>
1949_ACEOF
1950if ac_fn_c_try_cpp "$LINENO"; then :
1951 eval "$3=yes"
49ebbd65 1952else
8c5ff6dd 1953 eval "$3=no"
08b47d3d 1954fi
8c5ff6dd 1955rm -f conftest.err conftest.$ac_ext
15e12598 1956fi
8c5ff6dd
KR
1957eval ac_res=\$$3
1958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1959$as_echo "$ac_res" >&6; }
1960 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a4f64981 1961
8c5ff6dd 1962} # ac_fn_c_check_header_preproc
a4f64981 1963
8c5ff6dd
KR
1964# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1965# ----------------------------------------------------
1966# Tries to find if the field MEMBER exists in type AGGR, after including
1967# INCLUDES, setting cache variable VAR accordingly.
1968ac_fn_c_check_member ()
1969{
1970 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1972$as_echo_n "checking for $2.$3... " >&6; }
1973if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
15e12598
VB
1974 $as_echo_n "(cached) " >&6
1975else
8c5ff6dd
KR
1976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1977/* end confdefs.h. */
1978$5
1979int
1980main ()
1981{
1982static $2 ac_aggr;
1983if (ac_aggr.$3)
1984return 0;
1985 ;
1986 return 0;
1987}
1988_ACEOF
1989if ac_fn_c_try_compile "$LINENO"; then :
1990 eval "$4=yes"
1991else
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$5
1995int
1996main ()
1997{
1998static $2 ac_aggr;
1999if (sizeof ac_aggr.$3)
2000return 0;
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 eval "$4=yes"
2007else
2008 eval "$4=no"
15e12598 2009fi
8c5ff6dd
KR
2010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2011fi
2012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2013fi
2014eval ac_res=\$$4
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016$as_echo "$ac_res" >&6; }
2017 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
e6df49e4 2018
8c5ff6dd 2019} # ac_fn_c_check_member
a4f64981 2020
8c5ff6dd
KR
2021# ac_fn_c_check_func LINENO FUNC VAR
2022# ----------------------------------
2023# Tests whether FUNC exists, setting the cache variable VAR accordingly
2024ac_fn_c_check_func ()
2025{
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2028$as_echo_n "checking for $2... " >&6; }
2029if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
e6df49e4
GM
2030 $as_echo_n "(cached) " >&6
2031else
8c5ff6dd 2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 2033/* end confdefs.h. */
8c5ff6dd 2034/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
a4f64981 2035 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8c5ff6dd 2036#define $2 innocuous_$2
a4f64981
GM
2037
2038/* System header to define __stub macros and hopefully few prototypes,
8c5ff6dd 2039 which can conflict with char $2 (); below.
a4f64981
GM
2040 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2041 <limits.h> exists even on freestanding compilers. */
2042
2043#ifdef __STDC__
2044# include <limits.h>
2045#else
2046# include <assert.h>
2047#endif
2048
8c5ff6dd 2049#undef $2
a4f64981
GM
2050
2051/* Override any GCC internal prototype to avoid an error.
2052 Use char because int might match the return type of a GCC
2053 builtin and then its argument prototype would still apply. */
2054#ifdef __cplusplus
2055extern "C"
2056#endif
8c5ff6dd 2057char $2 ();
a4f64981
GM
2058/* The GNU C library defines this for functions which it implements
2059 to always fail with ENOSYS. Some functions are actually named
2060 something starting with __ and the normal name is an alias. */
8c5ff6dd 2061#if defined __stub_$2 || defined __stub___$2
a4f64981
GM
2062choke me
2063#endif
2064
2065int
2066main ()
2067{
8c5ff6dd 2068return $2 ();
a4f64981
GM
2069 ;
2070 return 0;
2071}
2072_ACEOF
8c5ff6dd
KR
2073if ac_fn_c_try_link "$LINENO"; then :
2074 eval "$3=yes"
e6df49e4 2075else
8c5ff6dd 2076 eval "$3=no"
15e12598 2077fi
8c5ff6dd
KR
2078rm -f core conftest.err conftest.$ac_objext \
2079 conftest$ac_exeext conftest.$ac_ext
15e12598 2080fi
8c5ff6dd
KR
2081eval ac_res=\$$3
2082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
a4f64981 2083$as_echo "$ac_res" >&6; }
8c5ff6dd
KR
2084 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2085
2086} # ac_fn_c_check_func
2087
2088# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2089# -------------------------------------------
2090# Tests whether TYPE exists after having included INCLUDES, setting cache
2091# variable VAR accordingly.
2092ac_fn_c_check_type ()
2093{
2094 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2096$as_echo_n "checking for $2... " >&6; }
2097if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2098 $as_echo_n "(cached) " >&6
2099else
2100 eval "$3=no"
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107if (sizeof ($2))
2108 return 0;
2109 ;
2110 return 0;
2111}
a4f64981 2112_ACEOF
8c5ff6dd
KR
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
2118main ()
2119{
2120if (sizeof (($2)))
2121 return 0;
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127
2128else
2129 eval "$3=yes"
aaa36002 2130fi
8c5ff6dd
KR
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134fi
2135eval ac_res=\$$3
2136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137$as_echo "$ac_res" >&6; }
2138 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a4f64981 2139
8c5ff6dd
KR
2140} # ac_fn_c_check_type
2141cat >config.log <<_ACEOF
2142This file contains any messages produced by compilers while
2143running configure, to aid debugging if configure makes a mistake.
2144
2145It was created by emacs $as_me 24.0.50, which was
2146generated by GNU Autoconf 2.65. Invocation command line was
2147
2148 $ $0 $@
7186fb09 2149
a4f64981 2150_ACEOF
8c5ff6dd
KR
2151exec 5>>config.log
2152{
2153cat <<_ASUNAME
2154## --------- ##
2155## Platform. ##
2156## --------- ##
cd03c74a 2157
8c5ff6dd
KR
2158hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2159uname -m = `(uname -m) 2>/dev/null || echo unknown`
2160uname -r = `(uname -r) 2>/dev/null || echo unknown`
2161uname -s = `(uname -s) 2>/dev/null || echo unknown`
2162uname -v = `(uname -v) 2>/dev/null || echo unknown`
2163
2164/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2165/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2166
2167/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2168/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2169/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2170/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2171/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2172/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2173/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2174
2175_ASUNAME
2176
2177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2178for as_dir in $PATH
2179do
2180 IFS=$as_save_IFS
2181 test -z "$as_dir" && as_dir=.
2182 $as_echo "PATH: $as_dir"
2183 done
2184IFS=$as_save_IFS
2185
2186} >&5
2187
2188cat >&5 <<_ACEOF
2189
2190
2191## ----------- ##
2192## Core tests. ##
2193## ----------- ##
2194
2195_ACEOF
2196
2197
2198# Keep a trace of the command line.
2199# Strip out --no-create and --no-recursion so they do not pile up.
2200# Strip out --silent because we don't want to record it for future runs.
2201# Also quote any args containing shell meta-characters.
2202# Make two passes to allow for proper duplicate-argument suppression.
2203ac_configure_args=
2204ac_configure_args0=
2205ac_configure_args1=
2206ac_must_keep_next=false
2207for ac_pass in 1 2
2208do
2209 for ac_arg
2210 do
2211 case $ac_arg in
2212 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2213 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2214 | -silent | --silent | --silen | --sile | --sil)
2215 continue ;;
2216 *\'*)
2217 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2218 esac
2219 case $ac_pass in
2220 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2221 2)
2222 as_fn_append ac_configure_args1 " '$ac_arg'"
2223 if test $ac_must_keep_next = true; then
2224 ac_must_keep_next=false # Got value, back to normal.
2225 else
2226 case $ac_arg in
2227 *=* | --config-cache | -C | -disable-* | --disable-* \
2228 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2229 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2230 | -with-* | --with-* | -without-* | --without-* | --x)
2231 case "$ac_configure_args0 " in
2232 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2233 esac
2234 ;;
2235 -* ) ac_must_keep_next=true ;;
2236 esac
2237 fi
2238 as_fn_append ac_configure_args " '$ac_arg'"
2239 ;;
2240 esac
2241 done
2242done
2243{ ac_configure_args0=; unset ac_configure_args0;}
2244{ ac_configure_args1=; unset ac_configure_args1;}
2245
2246# When interrupted or exit'd, cleanup temporary files, and complete
2247# config.log. We remove comments because anyway the quotes in there
2248# would cause problems or look ugly.
2249# WARNING: Use '\'' to represent an apostrophe within the trap.
2250# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2251trap 'exit_status=$?
2252 # Save into config.log some information that might help in debugging.
2253 {
2254 echo
2255
2256 cat <<\_ASBOX
2257## ---------------- ##
2258## Cache variables. ##
2259## ---------------- ##
2260_ASBOX
2261 echo
2262 # The following way of writing the cache mishandles newlines in values,
2263(
2264 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2265 eval ac_val=\$$ac_var
2266 case $ac_val in #(
2267 *${as_nl}*)
2268 case $ac_var in #(
2269 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2270$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2271 esac
2272 case $ac_var in #(
2273 _ | IFS | as_nl) ;; #(
2274 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2275 *) { eval $ac_var=; unset $ac_var;} ;;
2276 esac ;;
2277 esac
2278 done
2279 (set) 2>&1 |
2280 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2281 *${as_nl}ac_space=\ *)
2282 sed -n \
2283 "s/'\''/'\''\\\\'\'''\''/g;
2284 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2285 ;; #(
2286 *)
2287 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2288 ;;
2289 esac |
2290 sort
2291)
2292 echo
2293
2294 cat <<\_ASBOX
2295## ----------------- ##
2296## Output variables. ##
2297## ----------------- ##
2298_ASBOX
2299 echo
2300 for ac_var in $ac_subst_vars
2301 do
2302 eval ac_val=\$$ac_var
2303 case $ac_val in
2304 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2305 esac
2306 $as_echo "$ac_var='\''$ac_val'\''"
2307 done | sort
2308 echo
2309
2310 if test -n "$ac_subst_files"; then
2311 cat <<\_ASBOX
2312## ------------------- ##
2313## File substitutions. ##
2314## ------------------- ##
2315_ASBOX
2316 echo
2317 for ac_var in $ac_subst_files
2318 do
2319 eval ac_val=\$$ac_var
2320 case $ac_val in
2321 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2322 esac
2323 $as_echo "$ac_var='\''$ac_val'\''"
2324 done | sort
2325 echo
a4f64981 2326 fi
a4f64981 2327
8c5ff6dd
KR
2328 if test -s confdefs.h; then
2329 cat <<\_ASBOX
2330## ----------- ##
2331## confdefs.h. ##
2332## ----------- ##
2333_ASBOX
2334 echo
2335 cat confdefs.h
2336 echo
2337 fi
2338 test "$ac_signal" != 0 &&
2339 $as_echo "$as_me: caught signal $ac_signal"
2340 $as_echo "$as_me: exit $exit_status"
2341 } >&5
2342 rm -f core *.core core.conftest.* &&
2343 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2344 exit $exit_status
2345' 0
2346for ac_signal in 1 2 13 15; do
2347 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2348done
2349ac_signal=0
a4f64981 2350
8c5ff6dd
KR
2351# confdefs.h avoids OS command line length limits that DEFS can exceed.
2352rm -f -r conftest* confdefs.h
a4f64981 2353
8c5ff6dd 2354$as_echo "/* confdefs.h */" > confdefs.h
7186fb09 2355
8c5ff6dd 2356# Predefined preprocessor variables.
e6df49e4 2357
8c5ff6dd
KR
2358cat >>confdefs.h <<_ACEOF
2359#define PACKAGE_NAME "$PACKAGE_NAME"
a4f64981 2360_ACEOF
a4f64981 2361
8c5ff6dd
KR
2362cat >>confdefs.h <<_ACEOF
2363#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
a4f64981 2364_ACEOF
a4f64981 2365
8c5ff6dd
KR
2366cat >>confdefs.h <<_ACEOF
2367#define PACKAGE_VERSION "$PACKAGE_VERSION"
a4f64981 2368_ACEOF
49ebbd65 2369
8c5ff6dd
KR
2370cat >>confdefs.h <<_ACEOF
2371#define PACKAGE_STRING "$PACKAGE_STRING"
a4f64981
GM
2372_ACEOF
2373
8c5ff6dd
KR
2374cat >>confdefs.h <<_ACEOF
2375#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
a4f64981 2376_ACEOF
a4f64981 2377
8c5ff6dd
KR
2378cat >>confdefs.h <<_ACEOF
2379#define PACKAGE_URL "$PACKAGE_URL"
a4f64981 2380_ACEOF
e6df49e4 2381
a4f64981 2382
8c5ff6dd
KR
2383# Let the site file select an alternate cache file if it wants to.
2384# Prefer an explicitly selected file to automatically selected ones.
2385ac_site_file1=NONE
2386ac_site_file2=NONE
2387if test -n "$CONFIG_SITE"; then
2388 ac_site_file1=$CONFIG_SITE
2389elif test "x$prefix" != xNONE; then
2390 ac_site_file1=$prefix/share/config.site
2391 ac_site_file2=$prefix/etc/config.site
15e12598 2392else
8c5ff6dd
KR
2393 ac_site_file1=$ac_default_prefix/share/config.site
2394 ac_site_file2=$ac_default_prefix/etc/config.site
15e12598 2395fi
8c5ff6dd 2396for ac_site_file in "$ac_site_file1" "$ac_site_file2"
a4f64981 2397do
8c5ff6dd
KR
2398 test "x$ac_site_file" = xNONE && continue
2399 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2401$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2402 sed 's/^/| /' "$ac_site_file" >&5
2403 . "$ac_site_file"
a4f64981 2404 fi
8c5ff6dd 2405done
a4f64981 2406
8c5ff6dd
KR
2407if test -r "$cache_file"; then
2408 # Some versions of bash will fail to source /dev/null (special files
2409 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2410 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2412$as_echo "$as_me: loading cache $cache_file" >&6;}
2413 case $cache_file in
2414 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2415 *) . "./$cache_file";;
2416 esac
2417 fi
49ebbd65 2418else
8c5ff6dd
KR
2419 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2420$as_echo "$as_me: creating cache $cache_file" >&6;}
2421 >$cache_file
49ebbd65 2422fi
0c309b80 2423
8c5ff6dd
KR
2424as_fn_append ac_header_list " stdlib.h"
2425as_fn_append ac_header_list " unistd.h"
2426as_fn_append ac_header_list " sys/param.h"
2427as_fn_append ac_header_list " sys/time.h"
2428as_fn_append ac_func_list " alarm"
2429# Check that the precious variables saved in the cache have kept the same
2430# value.
2431ac_cache_corrupted=false
2432for ac_var in $ac_precious_vars; do
2433 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2434 eval ac_new_set=\$ac_env_${ac_var}_set
2435 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2436 eval ac_new_val=\$ac_env_${ac_var}_value
2437 case $ac_old_set,$ac_new_set in
2438 set,)
2439 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2440$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2441 ac_cache_corrupted=: ;;
2442 ,set)
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2444$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2445 ac_cache_corrupted=: ;;
2446 ,);;
2447 *)
2448 if test "x$ac_old_val" != "x$ac_new_val"; then
2449 # differences in whitespace do not lead to failure.
2450 ac_old_val_w=`echo x $ac_old_val`
2451 ac_new_val_w=`echo x $ac_new_val`
2452 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2454$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2455 ac_cache_corrupted=:
2456 else
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2458$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2459 eval $ac_var=\$ac_old_val
2460 fi
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2462$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2463 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2464$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2465 fi;;
2466 esac
2467 # Pass precious variables to config.status.
2468 if test "$ac_new_set" = set; then
2469 case $ac_new_val in
2470 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2471 *) ac_arg=$ac_var=$ac_new_val ;;
2472 esac
2473 case " $ac_configure_args " in
2474 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2475 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2476 esac
2477 fi
2478done
2479if $ac_cache_corrupted; then
2480 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2481$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2483$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2484 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
cd03c74a 2485fi
8c5ff6dd
KR
2486## -------------------- ##
2487## Main body of script. ##
2488## -------------------- ##
aaa36002 2489
8c5ff6dd
KR
2490ac_ext=c
2491ac_cpp='$CPP $CPPFLAGS'
2492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494ac_compiler_gnu=$ac_cv_c_compiler_gnu
a4f64981 2495
a4f64981 2496
8c5ff6dd 2497ac_config_headers="$ac_config_headers src/config.h:src/config.in"
a4f64981 2498
a4f64981 2499
a4f64981 2500
8c5ff6dd
KR
2501test "$program_prefix" != NONE &&
2502 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2503# Use a double $ so make ignores it.
2504test "$program_suffix" != NONE &&
2505 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2506# Double any \ or $.
2507# By default was `s,x,x', remove it if useless.
2508ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2509program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
e6df49e4 2510
a4f64981 2511
8c5ff6dd
KR
2512lispdir='${datadir}/emacs/${version}/lisp'
2513locallisppath='${datadir}/emacs/${version}/site-lisp:'\
2514'${datadir}/emacs/site-lisp'
2515lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
2516etcdir='${datadir}/emacs/${version}/etc'
2517archlibdir='${libexecdir}/emacs/${version}/${configuration}'
2518docdir='${datadir}/emacs/${version}/etc'
2519gamedir='${localstatedir}/games/emacs'
a4f64981 2520
8c5ff6dd 2521gameuser=games
a4f64981 2522
a4f64981 2523
a4f64981 2524
a4f64981 2525
8c5ff6dd
KR
2526# Check whether --with-pop was given.
2527if test "${with_pop+set}" = set; then :
2528 withval=$with_pop;
a4f64981 2529else
8c5ff6dd 2530 with_pop=yes
a4f64981 2531fi
15e12598 2532
8c5ff6dd
KR
2533if test "$with_pop" = yes; then
2534 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
e6df49e4 2535
e6df49e4 2536fi
15e12598 2537
a4f64981 2538
8c5ff6dd
KR
2539# Check whether --with-kerberos was given.
2540if test "${with_kerberos+set}" = set; then :
2541 withval=$with_kerberos;
49ebbd65 2542else
8c5ff6dd 2543 with_kerberos=no
49ebbd65 2544fi
15e12598 2545
8c5ff6dd
KR
2546if test "$with_kerberos" != no; then
2547 $as_echo "#define KERBEROS 1" >>confdefs.h
a4f64981 2548
15e12598 2549fi
a5edbe4a 2550
15e12598 2551
8c5ff6dd
KR
2552# Check whether --with-kerberos5 was given.
2553if test "${with_kerberos5+set}" = set; then :
2554 withval=$with_kerberos5;
49ebbd65 2555else
8c5ff6dd
KR
2556 with_kerberos5=no
2557fi
e6df49e4 2558
8c5ff6dd
KR
2559if test "${with_kerberos5}" != no; then
2560 if test "${with_kerberos}" = no; then
2561 with_kerberos=yes
2562 $as_echo "#define KERBEROS 1" >>confdefs.h
2563
2564 fi
2565
2566$as_echo "#define KERBEROS5 1" >>confdefs.h
15e12598 2567
49ebbd65 2568fi
a4f64981 2569
8c5ff6dd
KR
2570
2571# Check whether --with-hesiod was given.
2572if test "${with_hesiod+set}" = set; then :
2573 withval=$with_hesiod;
2574else
2575 with_hesiod=no
15e12598 2576fi
a4f64981 2577
8c5ff6dd 2578if test "$with_hesiod" != no; then
a4f64981 2579
8c5ff6dd 2580$as_echo "#define HESIOD 1" >>confdefs.h
a4f64981 2581
a4f64981
GM
2582fi
2583
a4f64981 2584
8c5ff6dd
KR
2585# Check whether --with-mmdf was given.
2586if test "${with_mmdf+set}" = set; then :
2587 withval=$with_mmdf;
15e12598 2588else
8c5ff6dd
KR
2589 with_mmdf=no
2590fi
2591
2592if test "$with_mmdf" != no; then
2593
2594$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
a4f64981 2595
49ebbd65 2596fi
8c5ff6dd
KR
2597
2598
2599# Check whether --with-mail-unlink was given.
2600if test "${with_mail_unlink+set}" = set; then :
2601 withval=$with_mail_unlink;
15e12598 2602else
8c5ff6dd 2603 with_mail_unlink=no
a4f64981 2604fi
15e12598 2605
8c5ff6dd 2606if test "$with_mail_unlink" != no; then
15e12598 2607
8c5ff6dd 2608$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
e6df49e4 2609
8c5ff6dd 2610fi
a4f64981 2611
a4f64981 2612
8c5ff6dd
KR
2613# Check whether --with-mailhost was given.
2614if test "${with_mailhost+set}" = set; then :
2615 withval=$with_mailhost;
2616cat >>confdefs.h <<_ACEOF
2617#define MAILHOST "$withval"
2618_ACEOF
a4f64981 2619
8c5ff6dd 2620fi
a4f64981 2621
cd03c74a 2622
e6df49e4 2623
8c5ff6dd
KR
2624# Check whether --with-sound was given.
2625if test "${with_sound+set}" = set; then :
2626 withval=$with_sound;
2627else
2628 with_sound=yes
2629fi
e6df49e4 2630
e6df49e4 2631
49ebbd65 2632
8c5ff6dd
KR
2633# Check whether --with-sync-input was given.
2634if test "${with_sync_input+set}" = set; then :
2635 withval=$with_sync_input;
2636else
2637 with_sync_input=yes
2638fi
a4f64981 2639
8c5ff6dd 2640if test "$with_sync_input" = yes; then
a5edbe4a 2641
8c5ff6dd 2642$as_echo "#define SYNC_INPUT 1" >>confdefs.h
49ebbd65 2643
8c5ff6dd 2644fi
a4f64981 2645
a4f64981 2646
8c5ff6dd
KR
2647# Check whether --with-x-toolkit was given.
2648if test "${with_x_toolkit+set}" = set; then :
2649 withval=$with_x_toolkit; case "${withval}" in
2650 y | ye | yes ) val=gtk ;;
2651 n | no ) val=no ;;
2652 l | lu | luc | luci | lucid ) val=lucid ;;
2653 a | at | ath | athe | athen | athena ) val=athena ;;
2654 m | mo | mot | moti | motif ) val=motif ;;
2655 g | gt | gtk ) val=gtk ;;
2656 * )
2657as_fn_error "\`--with-x-toolkit=$withval' is invalid;
2658this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
2659\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
2660 ;;
2661 esac
2662 with_x_toolkit=$val
a4f64981 2663
8c5ff6dd 2664fi
a4f64981 2665
e6df49e4 2666
cd03c74a 2667
8c5ff6dd
KR
2668# Check whether --with-xpm was given.
2669if test "${with_xpm+set}" = set; then :
2670 withval=$with_xpm;
2671else
2672 with_xpm=yes
08b47d3d
JD
2673fi
2674
8c5ff6dd
KR
2675
2676# Check whether --with-jpeg was given.
2677if test "${with_jpeg+set}" = set; then :
2678 withval=$with_jpeg;
2679else
2680 with_jpeg=yes
15e12598 2681fi
49ebbd65 2682
8c5ff6dd
KR
2683
2684# Check whether --with-tiff was given.
2685if test "${with_tiff+set}" = set; then :
2686 withval=$with_tiff;
2687else
2688 with_tiff=yes
15e12598 2689fi
e6df49e4 2690
8c5ff6dd
KR
2691
2692# Check whether --with-gif was given.
2693if test "${with_gif+set}" = set; then :
2694 withval=$with_gif;
2695else
2696 with_gif=yes
15e12598 2697fi
e6df49e4 2698
15e12598 2699
8c5ff6dd
KR
2700# Check whether --with-png was given.
2701if test "${with_png+set}" = set; then :
2702 withval=$with_png;
2703else
2704 with_png=yes
2705fi
a4f64981 2706
a4f64981 2707
8c5ff6dd
KR
2708# Check whether --with-rsvg was given.
2709if test "${with_rsvg+set}" = set; then :
2710 withval=$with_rsvg;
a5edbe4a 2711else
8c5ff6dd
KR
2712 with_rsvg=yes
2713fi
e6df49e4 2714
8c5ff6dd
KR
2715
2716
2717# Check whether --with-xft was given.
2718if test "${with_xft+set}" = set; then :
2719 withval=$with_xft;
2720else
2721 with_xft=yes
a4f64981 2722fi
8c5ff6dd
KR
2723
2724
2725# Check whether --with-libotf was given.
2726if test "${with_libotf+set}" = set; then :
2727 withval=$with_libotf;
e6df49e4 2728else
8c5ff6dd 2729 with_libotf=yes
e6df49e4 2730fi
a5edbe4a 2731
a4f64981 2732
8c5ff6dd
KR
2733# Check whether --with-m17n-flt was given.
2734if test "${with_m17n_flt+set}" = set; then :
2735 withval=$with_m17n_flt;
2736else
2737 with_m17n_flt=yes
2738fi
a4f64981 2739
a4f64981 2740
a4f64981 2741
8c5ff6dd
KR
2742# Check whether --with-toolkit-scroll-bars was given.
2743if test "${with_toolkit_scroll_bars+set}" = set; then :
2744 withval=$with_toolkit_scroll_bars;
2745else
2746 with_toolkit_scroll_bars=yes
2747fi
a4f64981 2748
a4f64981 2749
8c5ff6dd
KR
2750# Check whether --with-xaw3d was given.
2751if test "${with_xaw3d+set}" = set; then :
2752 withval=$with_xaw3d;
2753else
2754 with_xaw3d=yes
2755fi
a4f64981
GM
2756
2757
8c5ff6dd
KR
2758# Check whether --with-xim was given.
2759if test "${with_xim+set}" = set; then :
2760 withval=$with_xim;
2761else
2762 with_xim=yes
2763fi
a4f64981 2764
a4f64981 2765
8c5ff6dd
KR
2766# Check whether --with-ns was given.
2767if test "${with_ns+set}" = set; then :
2768 withval=$with_ns;
2769else
2770 with_ns=no
2771fi
a4f64981 2772
a4f64981 2773
49ebbd65 2774
8c5ff6dd
KR
2775# Check whether --with-gpm was given.
2776if test "${with_gpm+set}" = set; then :
2777 withval=$with_gpm;
2778else
2779 with_gpm=yes
15e12598 2780fi
49ebbd65 2781
a4f64981 2782
8c5ff6dd
KR
2783# Check whether --with-dbus was given.
2784if test "${with_dbus+set}" = set; then :
2785 withval=$with_dbus;
15e12598 2786else
8c5ff6dd 2787 with_dbus=yes
15e12598 2788fi
49ebbd65 2789
8c5ff6dd
KR
2790
2791# Check whether --with-gconf was given.
2792if test "${with_gconf+set}" = set; then :
2793 withval=$with_gconf;
15e12598 2794else
8c5ff6dd 2795 with_gconf=yes
15e12598 2796fi
e6df49e4 2797
49ebbd65 2798
8c5ff6dd
KR
2799# Check whether --with-selinux was given.
2800if test "${with_selinux+set}" = set; then :
2801 withval=$with_selinux;
2802else
2803 with_selinux=yes
a4f64981 2804fi
49ebbd65 2805
49ebbd65 2806
8c5ff6dd
KR
2807## For the times when you want to build Emacs but don't have
2808## a suitable makeinfo, and can live without the manuals.
2809
2810# Check whether --with-makeinfo was given.
2811if test "${with_makeinfo+set}" = set; then :
2812 withval=$with_makeinfo;
49ebbd65 2813else
8c5ff6dd
KR
2814 with_makeinfo=yes
2815fi
15e12598 2816
a4f64981 2817
a4f64981 2818
8c5ff6dd
KR
2819# Check whether --with-gtk was given.
2820if test "${with_gtk+set}" = set; then :
2821 withval=$with_gtk; as_fn_error "--with-gtk has been removed. Use --with-x-toolkit to
2822specify a toolkit." "$LINENO" 5
cd03c74a 2823fi
08b47d3d 2824
08b47d3d 2825
a4f64981 2826
8c5ff6dd
KR
2827# Check whether --with-gcc was given.
2828if test "${with_gcc+set}" = set; then :
2829 withval=$with_gcc; as_fn_error "--with-gcc has been removed. Set the \`CC' environment
2830variable to specify a compiler." "$LINENO" 5
2831fi
e6df49e4 2832
a4f64981 2833
a4f64981 2834
8c5ff6dd
KR
2835# Check whether --with-pkg-config-prog was given.
2836if test "${with_pkg_config_prog+set}" = set; then :
2837 withval=$with_pkg_config_prog;
2838fi
a4f64981 2839
8c5ff6dd
KR
2840if test "X${with_pkg_config_prog}" != X; then
2841 if test "${with_pkg_config_prog}" != yes; then
2842 PKG_CONFIG="${with_pkg_config_prog}"
2843 fi
49ebbd65 2844fi
e6df49e4 2845
8c5ff6dd
KR
2846CRT_DIR=
2847
2848# Check whether --with-crt-dir was given.
2849if test "${with_crt_dir+set}" = set; then :
2850 withval=$with_crt_dir;
a4f64981
GM
2851fi
2852
8c5ff6dd
KR
2853CRT_DIR="${with_crt_dir}"
2854
2855
2856# Check whether --with-gnustep-conf was given.
2857if test "${with_gnustep_conf+set}" = set; then :
2858 withval=$with_gnustep_conf;
e6df49e4
GM
2859fi
2860
8c5ff6dd
KR
2861test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2862 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2863test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2864 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
15e12598 2865
8c5ff6dd
KR
2866# Check whether --enable-ns-self-contained was given.
2867if test "${enable_ns_self_contained+set}" = set; then :
2868 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
49ebbd65 2869else
8c5ff6dd
KR
2870 EN_NS_SELF_CONTAINED=yes
2871fi
2872
2873
2874# Check whether --enable-asserts was given.
2875if test "${enable_asserts+set}" = set; then :
2876 enableval=$enable_asserts; USE_XASSERTS=$enableval
2877else
2878 USE_XASSERTS=no
2879fi
15e12598 2880
8c5ff6dd
KR
2881
2882# Check whether --enable-maintainer-mode was given.
2883if test "${enable_maintainer_mode+set}" = set; then :
2884 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
49ebbd65 2885else
8c5ff6dd
KR
2886 USE_MAINTAINER_MODE=no
2887fi
15e12598 2888
8c5ff6dd
KR
2889if test $USE_MAINTAINER_MODE = yes; then
2890 MAINT=
2891else
2892 MAINT=#
15e12598 2893fi
e6df49e4 2894
8c5ff6dd
KR
2895
2896# Check whether --enable-locallisppath was given.
2897if test "${enable_locallisppath+set}" = set; then :
2898 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
2899 locallisppath=
2900elif test "${enableval}" != "yes"; then
2901 locallisppath=${enableval}
2902fi
49ebbd65 2903fi
e6df49e4 2904
e6df49e4 2905
8c5ff6dd
KR
2906# Check whether --enable-checking was given.
2907if test "${enable_checking+set}" = set; then :
2908 enableval=$enable_checking; ac_checking_flags="${enableval}"
2909fi
e6df49e4 2910
8c5ff6dd
KR
2911IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2912for check in $ac_checking_flags
2913do
2914 case $check in
2915 # these set all the flags to specific states
2916 yes) ac_enable_checking=1 ;;
2917 no) ac_enable_checking= ;
2918 ac_gc_check_stringbytes= ;
2919 ac_gc_check_string_overrun= ;
2920 ac_gc_check_string_free_list= ;
2921 ac_xmalloc_overrun= ;
2922 ac_gc_check_cons_list= ;;
2923 all) ac_enable_checking=1 ;
2924 ac_gc_check_stringbytes=1 ;
2925 ac_gc_check_string_overrun=1 ;
2926 ac_gc_check_string_free_list=1 ;
2927 ac_xmalloc_overrun=1 ;
2928 ac_gc_check_cons_list=1 ;;
2929 # these enable particular checks
2930 stringbytes) ac_gc_check_stringbytes=1 ;;
2931 stringoverrun) ac_gc_check_string_overrun=1 ;;
2932 stringfreelist) ac_gc_check_string_free_list=1 ;;
2933 xmallocoverrun) ac_xmalloc_overrun=1 ;;
2934 conslist) ac_gc_check_cons_list=1 ;;
2935 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
2936 esac
2937done
2938IFS="$ac_save_IFS"
cd03c74a 2939
8c5ff6dd 2940if test x$ac_enable_checking != x ; then
15e12598 2941
8c5ff6dd 2942$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
15e12598 2943
8c5ff6dd
KR
2944fi
2945if test x$ac_gc_check_stringbytes != x ; then
2946
2947$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
08b47d3d 2948
49ebbd65 2949fi
8c5ff6dd
KR
2950if test x$ac_gc_check_stringoverrun != x ; then
2951
2952$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
08b47d3d 2953
15e12598 2954fi
8c5ff6dd 2955if test x$ac_gc_check_string_free_list != x ; then
e6df49e4 2956
8c5ff6dd 2957$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
0c309b80 2958
0c309b80 2959fi
8c5ff6dd
KR
2960if test x$ac_xmalloc_overrun != x ; then
2961
2962$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
0c309b80 2963
a4f64981 2964fi
8c5ff6dd 2965if test x$ac_gc_check_cons_list != x ; then
e6df49e4 2966
8c5ff6dd 2967$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
a5edbe4a 2968
8c5ff6dd 2969fi
a5edbe4a 2970
8c5ff6dd
KR
2971# Check whether --enable-profiling was given.
2972if test "${enable_profiling+set}" = set; then :
2973 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
2974fi
a5edbe4a 2975
8c5ff6dd
KR
2976if test x$ac_enable_profiling != x ; then
2977 PROFILING_CFLAGS="-DPROFILING=1 -pg"
2978 PROFILING_LDFLAGS="-pg"
2979else
2980 PROFILING_CFLAGS=
2981 PROFILING_LDFLAGS=
2982fi
e6df49e4 2983
8c5ff6dd
KR
2984# Check whether --enable-autodepend was given.
2985if test "${enable_autodepend+set}" = set; then :
2986 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
08b47d3d 2987else
8c5ff6dd
KR
2988 ac_enable_autodepend=yes
2989fi
106c6f74 2990
8c5ff6dd
KR
2991
2992#### Make srcdir absolute, if it isn't already. It's important to
2993#### avoid running the path through pwd unnecessarily, since pwd can
2994#### give you automounter prefixes, which can go away. We do all this
2995#### so Emacs can find its files when run uninstalled.
2996## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2997unset CDPATH
2998case "${srcdir}" in
2999 /* ) ;;
3000 . )
3001 ## We may be able to use the $PWD environment variable to make this
3002 ## absolute. But sometimes PWD is inaccurate.
3003 ## Note: we used to use ${PWD} at the end instead of `pwd`,
3004 ## but that tested only for a well-formed and valid PWD,
3005 ## it did not object when PWD was well-formed and valid but just wrong.
3006 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
3007 then
3008 srcdir="$PWD"
3009 else
3010 srcdir="`(cd ${srcdir}; pwd)`"
3011 fi
3012 ;;
3013 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
a4f64981 3014esac
e6df49e4 3015
8c5ff6dd
KR
3016#### Check if the source directory already has a configured system in it.
3017if test `pwd` != `(cd ${srcdir} && pwd)` \
3018 && test -f "${srcdir}/src/config.h" ; then
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
3020 as a build directory right now; it has been configured in its own
3021 right. To configure in another directory as well, you MUST
3022 use GNU make. If you do not have GNU make, then you must
3023 now do \`make distclean' in ${srcdir},
3024 and then run $0 again." >&5
3025$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
3026 as a build directory right now; it has been configured in its own
3027 right. To configure in another directory as well, you MUST
3028 use GNU make. If you do not have GNU make, then you must
3029 now do \`make distclean' in ${srcdir},
3030 and then run $0 again." >&2;}
a4f64981 3031fi
08b47d3d 3032
8c5ff6dd
KR
3033#### Given the configuration name, set machfile and opsysfile to the
3034#### names of the m/*.h and s/*.h files we should use.
3035
3036### Canonicalize the configuration name.
3037
3038ac_aux_dir=
3039for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3040 for ac_t in install-sh install.sh shtool; do
3041 if test -f "$ac_dir/$ac_t"; then
3042 ac_aux_dir=$ac_dir
3043 ac_install_sh="$ac_aux_dir/$ac_t -c"
3044 break 2
3045 fi
3046 done
3047done
3048if test -z "$ac_aux_dir"; then
3049 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
a4f64981 3050fi
a5edbe4a 3051
8c5ff6dd
KR
3052# These three variables are undocumented and unsupported,
3053# and are intended to be withdrawn in a future Autoconf release.
3054# They can cause serious problems if a builder's source tree is in a directory
3055# whose full name contains unusual characters.
3056ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3057ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3058ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
a5edbe4a 3059
cd03c74a 3060
8c5ff6dd
KR
3061# Make sure we can run config.sub.
3062$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3063 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
a5edbe4a 3064
8c5ff6dd
KR
3065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3066$as_echo_n "checking build system type... " >&6; }
3067if test "${ac_cv_build+set}" = set; then :
a4f64981
GM
3068 $as_echo_n "(cached) " >&6
3069else
8c5ff6dd
KR
3070 ac_build_alias=$build_alias
3071test "x$ac_build_alias" = x &&
3072 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3073test "x$ac_build_alias" = x &&
3074 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3075ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3076 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
a4f64981 3077
15e12598 3078fi
8c5ff6dd
KR
3079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3080$as_echo "$ac_cv_build" >&6; }
3081case $ac_cv_build in
3082*-*-*) ;;
3083*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3084esac
3085build=$ac_cv_build
3086ac_save_IFS=$IFS; IFS='-'
3087set x $ac_cv_build
3088shift
3089build_cpu=$1
3090build_vendor=$2
3091shift; shift
3092# Remember, the first character of IFS is used to create $*,
3093# except with old shells:
3094build_os=$*
3095IFS=$ac_save_IFS
3096case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
a4f64981 3097
8c5ff6dd
KR
3098
3099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3100$as_echo_n "checking host system type... " >&6; }
3101if test "${ac_cv_host+set}" = set; then :
a4f64981
GM
3102 $as_echo_n "(cached) " >&6
3103else
8c5ff6dd
KR
3104 if test "x$host_alias" = x; then
3105 ac_cv_host=$ac_cv_build
15e12598 3106else
8c5ff6dd
KR
3107 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3108 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15e12598 3109fi
e6df49e4 3110
15e12598 3111fi
8c5ff6dd
KR
3112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3113$as_echo "$ac_cv_host" >&6; }
3114case $ac_cv_host in
3115*-*-*) ;;
3116*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
15e12598 3117esac
8c5ff6dd
KR
3118host=$ac_cv_host
3119ac_save_IFS=$IFS; IFS='-'
3120set x $ac_cv_host
3121shift
3122host_cpu=$1
3123host_vendor=$2
3124shift; shift
3125# Remember, the first character of IFS is used to create $*,
3126# except with old shells:
3127host_os=$*
3128IFS=$ac_save_IFS
3129case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
a5edbe4a 3130
49ebbd65 3131
8c5ff6dd
KR
3132canonical=$host
3133configuration=${host_alias-${build_alias-$host}}
3134
3135
3136
3137### If you add support for a new configuration, add code to this
3138### switch statement to recognize your configuration name and select
3139### the appropriate operating system and machine description files.
3140
3141### You would hope that you could choose an m/*.h file pretty much
3142### based on the machine portion of the configuration name, and an s-
3143### file based on the operating system portion. However, it turns out
3144### that each m/*.h file is pretty manufacturer-specific - for
3145### example mips.h is MIPS
3146### So we basically have to have a special case for each
3147### configuration name.
3148###
3149### As far as handling version numbers on operating systems is
3150### concerned, make sure things will fail in a fixable way. If
3151### /etc/MACHINES doesn't say anything about version numbers, be
3152### prepared to handle anything reasonably. If version numbers
3153### matter, be sure /etc/MACHINES says something about it.
3154###
3155### Eric Raymond says we should accept strings like "sysvr4" to mean
3156### "System V Release 4"; he writes, "The old convention encouraged
3157### confusion between `system' and `release' levels'."
3158
3159machine='' opsys='' unported=no
3160case "${canonical}" in
3161
3162 ## FreeBSD ports
3163 *-*-freebsd* )
3164 opsys=freebsd
3165 case "${canonical}" in
3166 alpha*-*-freebsd*) machine=alpha ;;
3167 arm*-*-freebsd*) machine=arm ;;
3168 ia64-*-freebsd*) machine=ia64 ;;
3169 sparc-*-freebsd*) machine=sparc ;;
3170 sparc64-*-freebsd*) machine=sparc ;;
3171 powerpc-*-freebsd*) machine=macppc ;;
3172 i[3456]86-*-freebsd*) machine=intel386 ;;
3173 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
3174 esac
3175 ;;
3176
3177 ## FreeBSD kernel + glibc based userland
3178 *-*-kfreebsd*gnu* )
3179 opsys=gnu-kfreebsd
3180 case "${canonical}" in
3181 alpha*-*-kfreebsd*) machine=alpha ;;
3182 ia64-*-kfreebsd*) machine=ia64 ;;
3183 sparc-*-kfreebsd*) machine=sparc ;;
3184 sparc64-*-kfreebsd*) machine=sparc ;;
3185 powerpc-*-kfreebsd*) machine=macppc ;;
3186 i[3456]86-*-kfreebsd*) machine=intel386 ;;
3187 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
3188 esac
3189 ;;
49ebbd65 3190
8c5ff6dd
KR
3191 ## NetBSD ports
3192 *-*-netbsd* )
3193 opsys=netbsd
3194 case "${canonical}" in
3195 alpha*-*-netbsd*) machine=alpha ;;
3196 i[3456]86-*-netbsd*) machine=intel386 ;;
3197 mips-*-netbsd*) machine=mips ;;
3198 mipsel-*-netbsd*) machine=mips ;;
3199 mipseb-*-netbsd*) machine=mips ;;
3200 powerpc-*-netbsd*) machine=macppc ;;
3201 sparc*-*-netbsd*) machine=sparc ;;
3202 vax-*-netbsd*) machine=vax ;;
3203 arm-*-netbsd*) machine=arm ;;
3204 x86_64-*-netbsd*) machine=amdx86-64 ;;
3205 hppa-*-netbsd*) machine=hp800 ;;
3206 m68k-*-netbsd*) machine=m68k ;;
3207 esac
3208 ;;
49ebbd65 3209
8c5ff6dd
KR
3210 ## OpenBSD ports
3211 *-*-openbsd* )
3212 opsys=openbsd
3213 case "${canonical}" in
3214 alpha*-*-openbsd*) machine=alpha ;;
3215 arm-*-openbsd*) machine=arm ;;
3216 i386-*-openbsd*) machine=intel386 ;;
3217 powerpc-*-openbsd*) machine=macppc ;;
3218 sparc*-*-openbsd*) machine=sparc ;;
3219 vax-*-openbsd*) machine=vax ;;
3220 x86_64-*-openbsd*) machine=amdx86-64 ;;
3221 hppa-*-openbsd*) machine=hp800 ;;
3222 esac
3223 ;;
49ebbd65 3224
8c5ff6dd
KR
3225 alpha*-*-linux-gnu* )
3226 machine=alpha opsys=gnu-linux
3227 ;;
49ebbd65 3228
8c5ff6dd
KR
3229 arm*-*-linux-gnu* )
3230 machine=arm opsys=gnu-linux
3231 ;;
49ebbd65 3232
8c5ff6dd
KR
3233 ## Apple Darwin / Mac OS X
3234 *-apple-darwin* )
3235 case "${canonical}" in
3236 i[3456]86-* ) machine=intel386 ;;
3237 powerpc-* ) machine=macppc ;;
3238 x86_64-* ) machine=amdx86-64 ;;
3239 * ) unported=yes ;;
3240 esac
3241 opsys=darwin
3242 # Define CPP as follows to make autoconf work correctly.
3243 CPP="${CC-cc} -E -no-cpp-precomp"
3244 # Use fink packages if available.
3245 if test -d /sw/include && test -d /sw/lib; then
3246 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3247 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3248 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
a4f64981 3249 fi
8c5ff6dd 3250 ;;
15e12598 3251
8c5ff6dd
KR
3252 ## HP 9000 series 700 and 800, running HP/UX
3253 hppa*-hp-hpux10.2* )
3254 machine=hp800 opsys=hpux10-20
3255 ;;
3256 hppa*-hp-hpux1[1-9]* )
3257 machine=hp800 opsys=hpux11
3258 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
3259 ;;
e6df49e4 3260
8c5ff6dd
KR
3261 hppa*-*-linux-gnu* )
3262 machine=hp800 opsys=gnu-linux
3263 ;;
49ebbd65 3264
8c5ff6dd
KR
3265 ## IBM machines
3266 s390-*-linux-gnu* )
3267 machine=ibms390 opsys=gnu-linux
3268 ;;
3269 s390x-*-linux-gnu* )
3270 machine=ibms390x opsys=gnu-linux
3271 ;;
3272 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
3273 machine=ibmrs6000 opsys=aix4-2
3274 ;;
3275 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
3276 machine=ibmrs6000 opsys=aix4-2
3277 ;;
3278 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
3279 machine=ibmrs6000 opsys=aix4-2
3280 ;;
3281 rs6000-ibm-aix6* | powerpc-ibm-aix6* )
3282 machine=ibmrs6000 opsys=aix4-2
3283 ;;
a4f64981 3284
8c5ff6dd
KR
3285 ## Macintosh PowerPC
3286 powerpc*-*-linux-gnu* )
3287 machine=macppc opsys=gnu-linux
3288 ;;
a4f64981 3289
8c5ff6dd
KR
3290 ## Silicon Graphics machines
3291 ## Iris 4D
3292 mips-sgi-irix6.5 )
3293 machine=iris4d opsys=irix6-5
3294 # Without defining _LANGUAGE_C, things get masked out in the headers
3295 # so that, for instance, grepping for `free' in stdlib.h fails and
3296 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3297 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
3298 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
3299 ;;
a4f64981 3300
8c5ff6dd
KR
3301 ## Suns
3302 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3303 machine=sparc opsys=gnu-linux
3304 ;;
49ebbd65 3305
8c5ff6dd
KR
3306 *-sun-solaris* \
3307 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3308 | x86_64-*-solaris2* | x86_64-*-sunos5*)
3309 case "${canonical}" in
3310 i[3456]86-*-* ) machine=intel386 ;;
3311 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
3312 sparc* ) machine=sparc ;;
3313 * ) unported=yes ;;
3314 esac
3315 case "${canonical}" in
3316 *-sunos5.6* | *-solaris2.6* )
3317 opsys=sol2-6
3318 NON_GNU_CPP=/usr/ccs/lib/cpp
3319 RANLIB="ar -ts"
3320 ;;
3321 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
3322 opsys=sol2-6
3323 emacs_check_sunpro_c=yes
3324 NON_GNU_CPP=/usr/ccs/lib/cpp
3325 ;;
3326 *-sunos5* | *-solaris* )
3327 opsys=sol2-10
3328 emacs_check_sunpro_c=yes
3329 NON_GNU_CPP=/usr/ccs/lib/cpp
3330 ;;
3331 esac
3332 ## Watch out for a compiler that we know will not work.
3333 case "${canonical}" in
3334 *-solaris* | *-sunos5* )
3335 if [ "x$CC" = x/usr/ucb/cc ]; then
3336 ## /usr/ucb/cc doesn't work;
3337 ## we should find some other compiler that does work.
3338 unset CC
3339 fi
3340 ;;
3341 *) ;;
3342 esac
3343 ;;
49ebbd65 3344
8c5ff6dd
KR
3345 ## IA-64
3346 ia64*-*-linux* )
3347 machine=ia64 opsys=gnu-linux
3348 ;;
49ebbd65 3349
8c5ff6dd
KR
3350 ## Intel 386 machines where we don't care about the manufacturer
3351 i[3456]86-*-* )
3352 machine=intel386
3353 case "${canonical}" in
3354 *-cygwin ) opsys=cygwin ;;
3355 *-darwin* ) opsys=darwin
3356 CPP="${CC-cc} -E -no-cpp-precomp"
3357 ;;
3358 *-linux-gnu* ) opsys=gnu-linux ;;
3359 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3360 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3361 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3362 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3363 esac
3364 ;;
49ebbd65 3365
8c5ff6dd
KR
3366 ## m68k Linux-based GNU system
3367 m68k-*-linux-gnu* )
3368 machine=m68k opsys=gnu-linux
3369 ;;
a4f64981 3370
8c5ff6dd
KR
3371 ## Mips Linux-based GNU system
3372 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3373 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
3374 machine=mips opsys=gnu-linux
3375 ;;
a4f64981 3376
8c5ff6dd
KR
3377 ## AMD x86-64 Linux-based GNU system
3378 x86_64-*-linux-gnu* )
3379 machine=amdx86-64 opsys=gnu-linux
3380 ;;
9452ded1 3381
8c5ff6dd
KR
3382 ## Tensilica Xtensa Linux-based GNU system
3383 xtensa*-*-linux-gnu* )
3384 machine=xtensa opsys=gnu-linux
3385 ;;
a4f64981 3386
8c5ff6dd
KR
3387 ## SuperH Linux-based GNU system
3388 sh[34]*-*-linux-gnu* )
3389 machine=sh3 opsys=gnu-linux
3390 ;;
15e12598 3391
8c5ff6dd
KR
3392 * )
3393 unported=yes
3394 ;;
e6df49e4 3395esac
a4f64981 3396
8c5ff6dd
KR
3397### If the code above didn't choose an operating system, just choose
3398### an operating system based on the configuration name. You really
3399### only want to use this when you have no idea what the right
3400### operating system is; if you know what operating systems a machine
3401### runs, it's cleaner to make it explicit in the case statement
3402### above.
3403if test x"${opsys}" = x; then
3404 case "${canonical}" in
3405 *-gnu* ) opsys=gnu ;;
3406 * )
3407 unported=yes
3408 ;;
3409 esac
a4f64981
GM
3410fi
3411
a4f64981 3412
a4f64981 3413
8c5ff6dd
KR
3414if test $unported = yes; then
3415 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
3416Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
e6df49e4 3417fi
a5edbe4a 3418
8c5ff6dd
KR
3419machfile="m/${machine}.h"
3420opsysfile="s/${opsys}.h"
a4f64981 3421
a4f64981 3422
8c5ff6dd
KR
3423#### Choose a compiler.
3424test -n "$CC" && cc_specified=yes
a5edbe4a 3425
8c5ff6dd
KR
3426# Save the value of CFLAGS that the user specified.
3427SPECIFIED_CFLAGS="$CFLAGS"
3428
3429ac_ext=c
3430ac_cpp='$CPP $CPPFLAGS'
3431ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3432ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3433ac_compiler_gnu=$ac_cv_c_compiler_gnu
3434if test -n "$ac_tool_prefix"; then
3435 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3436set dummy ${ac_tool_prefix}gcc; ac_word=$2
3437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15e12598 3438$as_echo_n "checking for $ac_word... " >&6; }
8c5ff6dd 3439if test "${ac_cv_prog_CC+set}" = set; then :
15e12598 3440 $as_echo_n "(cached) " >&6
49ebbd65 3441else
8c5ff6dd
KR
3442 if test -n "$CC"; then
3443 ac_cv_prog_CC="$CC" # Let the user override the test.
3444else
3445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
a4f64981 3446for as_dir in $PATH
15e12598
VB
3447do
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
8c5ff6dd 3450 for ac_exec_ext in '' $ac_executable_extensions; do
15e12598 3451 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8c5ff6dd
KR
3452 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15e12598
VB
3454 break 2
3455 fi
3456done
8c5ff6dd 3457 done
15e12598 3458IFS=$as_save_IFS
e6df49e4 3459
15e12598 3460fi
8c5ff6dd
KR
3461fi
3462CC=$ac_cv_prog_CC
3463if test -n "$CC"; then
3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3465$as_echo "$CC" >&6; }
15e12598 3466else
8c5ff6dd 3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15e12598 3468$as_echo "no" >&6; }
49ebbd65 3469fi
a5edbe4a
GM
3470
3471
8c5ff6dd
KR
3472fi
3473if test -z "$ac_cv_prog_CC"; then
3474 ac_ct_CC=$CC
3475 # Extract the first word of "gcc", so it can be a program name with args.
3476set dummy gcc; ac_word=$2
3477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3478$as_echo_n "checking for $ac_word... " >&6; }
3479if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
3480 $as_echo_n "(cached) " >&6
3481else
3482 if test -n "$ac_ct_CC"; then
3483 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3484else
3485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3486for as_dir in $PATH
3487do
3488 IFS=$as_save_IFS
3489 test -z "$as_dir" && as_dir=.
3490 for ac_exec_ext in '' $ac_executable_extensions; do
3491 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3492 ac_cv_prog_ac_ct_CC="gcc"
3493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3494 break 2
3495 fi
3496done
3497 done
3498IFS=$as_save_IFS
3499
3500fi
3501fi
3502ac_ct_CC=$ac_cv_prog_ac_ct_CC
3503if test -n "$ac_ct_CC"; then
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3505$as_echo "$ac_ct_CC" >&6; }
3506else
3507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3508$as_echo "no" >&6; }
3509fi
a5edbe4a 3510
8c5ff6dd
KR
3511 if test "x$ac_ct_CC" = x; then
3512 CC=""
a4f64981 3513 else
8c5ff6dd
KR
3514 case $cross_compiling:$ac_tool_warned in
3515yes:)
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3518ac_tool_warned=yes ;;
3519esac
3520 CC=$ac_ct_CC
3521 fi
3522else
3523 CC="$ac_cv_prog_CC"
3524fi
a4f64981 3525
8c5ff6dd
KR
3526if test -z "$CC"; then
3527 if test -n "$ac_tool_prefix"; then
3528 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3529set dummy ${ac_tool_prefix}cc; ac_word=$2
3530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3531$as_echo_n "checking for $ac_word... " >&6; }
3532if test "${ac_cv_prog_CC+set}" = set; then :
3533 $as_echo_n "(cached) " >&6
3534else
3535 if test -n "$CC"; then
3536 ac_cv_prog_CC="$CC" # Let the user override the test.
3537else
3538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3539for as_dir in $PATH
3540do
3541 IFS=$as_save_IFS
3542 test -z "$as_dir" && as_dir=.
3543 for ac_exec_ext in '' $ac_executable_extensions; do
3544 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3545 ac_cv_prog_CC="${ac_tool_prefix}cc"
3546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3547 break 2
3548 fi
3549done
3550 done
3551IFS=$as_save_IFS
a4f64981 3552
8c5ff6dd
KR
3553fi
3554fi
3555CC=$ac_cv_prog_CC
3556if test -n "$CC"; then
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3558$as_echo "$CC" >&6; }
3559else
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15e12598 3561$as_echo "no" >&6; }
8c5ff6dd 3562fi
a4f64981
GM
3563
3564
8c5ff6dd
KR
3565 fi
3566fi
3567if test -z "$CC"; then
3568 # Extract the first word of "cc", so it can be a program name with args.
3569set dummy cc; ac_word=$2
3570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571$as_echo_n "checking for $ac_word... " >&6; }
3572if test "${ac_cv_prog_CC+set}" = set; then :
3573 $as_echo_n "(cached) " >&6
3574else
3575 if test -n "$CC"; then
3576 ac_cv_prog_CC="$CC" # Let the user override the test.
3577else
3578 ac_prog_rejected=no
3579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3580for as_dir in $PATH
3581do
3582 IFS=$as_save_IFS
3583 test -z "$as_dir" && as_dir=.
3584 for ac_exec_ext in '' $ac_executable_extensions; do
3585 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3586 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3587 ac_prog_rejected=yes
3588 continue
a4f64981 3589 fi
8c5ff6dd
KR
3590 ac_cv_prog_CC="cc"
3591 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3592 break 2
15e12598 3593 fi
8c5ff6dd
KR
3594done
3595 done
3596IFS=$as_save_IFS
e6df49e4 3597
8c5ff6dd
KR
3598if test $ac_prog_rejected = yes; then
3599 # We found a bogon in the path, so make sure we never use it.
3600 set dummy $ac_cv_prog_CC
3601 shift
3602 if test $# != 0; then
3603 # We chose a different compiler from the bogus one.
3604 # However, it has the same basename, so the bogon will be chosen
3605 # first if we set CC to just the basename; use the full file name.
3606 shift
3607 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
a4f64981 3608 fi
8c5ff6dd
KR
3609fi
3610fi
3611fi
3612CC=$ac_cv_prog_CC
3613if test -n "$CC"; then
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3615$as_echo "$CC" >&6; }
3616else
3617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3618$as_echo "no" >&6; }
3619fi
e6df49e4
GM
3620
3621
8c5ff6dd
KR
3622fi
3623if test -z "$CC"; then
3624 if test -n "$ac_tool_prefix"; then
3625 for ac_prog in cl.exe
3626 do
3627 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3628set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
3631if test "${ac_cv_prog_CC+set}" = set; then :
3632 $as_echo_n "(cached) " >&6
3633else
3634 if test -n "$CC"; then
3635 ac_cv_prog_CC="$CC" # Let the user override the test.
3636else
3637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
3642 for ac_exec_ext in '' $ac_executable_extensions; do
3643 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3644 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3646 break 2
3647 fi
3648done
3649 done
3650IFS=$as_save_IFS
0c309b80 3651
8c5ff6dd
KR
3652fi
3653fi
3654CC=$ac_cv_prog_CC
3655if test -n "$CC"; then
3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3657$as_echo "$CC" >&6; }
3658else
3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
3661fi
e6df49e4 3662
a4f64981 3663
8c5ff6dd
KR
3664 test -n "$CC" && break
3665 done
3666fi
3667if test -z "$CC"; then
3668 ac_ct_CC=$CC
3669 for ac_prog in cl.exe
3670do
3671 # Extract the first word of "$ac_prog", so it can be a program name with args.
3672set dummy $ac_prog; ac_word=$2
3673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15e12598 3674$as_echo_n "checking for $ac_word... " >&6; }
8c5ff6dd 3675if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
15e12598
VB
3676 $as_echo_n "(cached) " >&6
3677else
8c5ff6dd
KR
3678 if test -n "$ac_ct_CC"; then
3679 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3680else
3681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15e12598
VB
3682for as_dir in $PATH
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
8c5ff6dd 3686 for ac_exec_ext in '' $ac_executable_extensions; do
15e12598 3687 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8c5ff6dd
KR
3688 ac_cv_prog_ac_ct_CC="$ac_prog"
3689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15e12598
VB
3690 break 2
3691 fi
3692done
8c5ff6dd 3693 done
15e12598 3694IFS=$as_save_IFS
e6df49e4 3695
15e12598 3696fi
8c5ff6dd
KR
3697fi
3698ac_ct_CC=$ac_cv_prog_ac_ct_CC
3699if test -n "$ac_ct_CC"; then
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3701$as_echo "$ac_ct_CC" >&6; }
15e12598 3702else
8c5ff6dd 3703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15e12598
VB
3704$as_echo "no" >&6; }
3705fi
e6df49e4 3706
e6df49e4 3707
8c5ff6dd
KR
3708 test -n "$ac_ct_CC" && break
3709done
e6df49e4 3710
8c5ff6dd
KR
3711 if test "x$ac_ct_CC" = x; then
3712 CC=""
a4f64981 3713 else
8c5ff6dd
KR
3714 case $cross_compiling:$ac_tool_warned in
3715yes:)
3716{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3717$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3718ac_tool_warned=yes ;;
3719esac
3720 CC=$ac_ct_CC
3721 fi
3722fi
a4f64981 3723
8c5ff6dd 3724fi
a4f64981
GM
3725
3726
8c5ff6dd
KR
3727test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3729as_fn_error "no acceptable C compiler found in \$PATH
3730See \`config.log' for more details." "$LINENO" 5; }
e6df49e4 3731
8c5ff6dd
KR
3732# Provide some information about the compiler.
3733$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3734set X $ac_compile
3735ac_compiler=$2
3736for ac_option in --version -v -V -qversion; do
3737 { { ac_try="$ac_compiler $ac_option >&5"
3738case "(($ac_try" in
3739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3740 *) ac_try_echo=$ac_try;;
3741esac
3742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3743$as_echo "$ac_try_echo"; } >&5
3744 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3745 ac_status=$?
3746 if test -s conftest.err; then
3747 sed '10a\
3748... rest of stderr output deleted ...
3749 10q' conftest.err >conftest.er1
3750 cat conftest.er1 >&5
a4f64981 3751 fi
8c5ff6dd
KR
3752 rm -f conftest.er1 conftest.err
3753 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3754 test $ac_status = 0; }
3755done
a4f64981 3756
8c5ff6dd 3757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981
GM
3758/* end confdefs.h. */
3759
a4f64981
GM
3760int
3761main ()
3762{
8c5ff6dd 3763
a4f64981
GM
3764 ;
3765 return 0;
3766}
3767_ACEOF
8c5ff6dd
KR
3768ac_clean_files_save=$ac_clean_files
3769ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3770# Try to create an executable without -o first, disregard a.out.
3771# It will help us diagnose broken compilers, and finding out an intuition
3772# of exeext.
3773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3774$as_echo_n "checking whether the C compiler works... " >&6; }
3775ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3776
3777# The possible output files:
3778ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3779
3780ac_rmfiles=
3781for ac_file in $ac_files
3782do
3783 case $ac_file in
3784 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3785 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3786 esac
3787done
3788rm -f $ac_rmfiles
3789
3790if { { ac_try="$ac_link_default"
a4f64981
GM
3791case "(($ac_try" in
3792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3793 *) ac_try_echo=$ac_try;;
3794esac
8c5ff6dd
KR
3795eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3796$as_echo "$ac_try_echo"; } >&5
3797 (eval "$ac_link_default") 2>&5
a4f64981 3798 ac_status=$?
8c5ff6dd
KR
3799 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3800 test $ac_status = 0; }; then :
3801 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3802# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3803# in a Makefile. We should not override ac_cv_exeext if it was cached,
3804# so that the user can short-circuit this test for compilers unknown to
3805# Autoconf.
3806for ac_file in $ac_files ''
3807do
3808 test -f "$ac_file" || continue
3809 case $ac_file in
3810 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3811 ;;
3812 [ab].out )
3813 # We found the default executable, but exeext='' is most
3814 # certainly right.
3815 break;;
3816 *.* )
3817 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3818 then :; else
3819 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3820 fi
3821 # We set ac_cv_exeext here because the later test for it is not
3822 # safe: cross compilers may not add the suffix if given an `-o'
3823 # argument, so we may need to know it at that point already.
3824 # Even if this section looks crufty: it has the advantage of
3825 # actually working.
3826 break;;
3827 * )
3828 break;;
3829 esac
3830done
3831test "$ac_cv_exeext" = no && ac_cv_exeext=
3832
a4f64981 3833else
8c5ff6dd
KR
3834 ac_file=''
3835fi
3836if test -z "$ac_file"; then :
3837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3838$as_echo "no" >&6; }
3839$as_echo "$as_me: failed program was:" >&5
a4f64981 3840sed 's/^/| /' conftest.$ac_ext >&5
e6df49e4 3841
8c5ff6dd
KR
3842{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3844{ as_fn_set_status 77
3845as_fn_error "C compiler cannot create executables
3846See \`config.log' for more details." "$LINENO" 5; }; }
3847else
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3849$as_echo "yes" >&6; }
15e12598 3850fi
8c5ff6dd
KR
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3852$as_echo_n "checking for C compiler default output file name... " >&6; }
3853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3854$as_echo "$ac_file" >&6; }
3855ac_exeext=$ac_cv_exeext
0c309b80 3856
8c5ff6dd
KR
3857rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3858ac_clean_files=$ac_clean_files_save
3859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3860$as_echo_n "checking for suffix of executables... " >&6; }
3861if { { ac_try="$ac_link"
3862case "(($ac_try" in
3863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3864 *) ac_try_echo=$ac_try;;
3865esac
3866eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3867$as_echo "$ac_try_echo"; } >&5
3868 (eval "$ac_link") 2>&5
3869 ac_status=$?
3870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3871 test $ac_status = 0; }; then :
3872 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3873# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3874# work properly (i.e., refer to `conftest.exe'), while it won't with
3875# `rm'.
3876for ac_file in conftest.exe conftest conftest.*; do
3877 test -f "$ac_file" || continue
3878 case $ac_file in
3879 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3880 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3881 break;;
3882 * ) break;;
3883 esac
3884done
3885else
3886 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3887$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3888as_fn_error "cannot compute suffix of executables: cannot compile and link
3889See \`config.log' for more details." "$LINENO" 5; }
15e12598 3890fi
8c5ff6dd
KR
3891rm -f conftest conftest$ac_cv_exeext
3892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3893$as_echo "$ac_cv_exeext" >&6; }
15e12598 3894
8c5ff6dd
KR
3895rm -f conftest.$ac_ext
3896EXEEXT=$ac_cv_exeext
3897ac_exeext=$EXEEXT
3898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a5edbe4a 3899/* end confdefs.h. */
8c5ff6dd
KR
3900#include <stdio.h>
3901int
3902main ()
3903{
3904FILE *f = fopen ("conftest.out", "w");
3905 return ferror (f) || fclose (f) != 0;
3906
3907 ;
3908 return 0;
3909}
49ebbd65 3910_ACEOF
8c5ff6dd
KR
3911ac_clean_files="$ac_clean_files conftest.out"
3912# Check that the compiler produces executables we can run. If not, either
3913# the compiler is broken, or we cross compile.
3914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3915$as_echo_n "checking whether we are cross compiling... " >&6; }
3916if test "$cross_compiling" != yes; then
3917 { { ac_try="$ac_link"
a4f64981
GM
3918case "(($ac_try" in
3919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3920 *) ac_try_echo=$ac_try;;
3921esac
8c5ff6dd
KR
3922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3923$as_echo "$ac_try_echo"; } >&5
3924 (eval "$ac_link") 2>&5
a4f64981 3925 ac_status=$?
8c5ff6dd
KR
3926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3927 test $ac_status = 0; }
3928 if { ac_try='./conftest$ac_cv_exeext'
3929 { { case "(($ac_try" in
3930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3931 *) ac_try_echo=$ac_try;;
3932esac
3933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3934$as_echo "$ac_try_echo"; } >&5
3935 (eval "$ac_try") 2>&5
3936 ac_status=$?
3937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3938 test $ac_status = 0; }; }; then
3939 cross_compiling=no
3940 else
3941 if test "$cross_compiling" = maybe; then
3942 cross_compiling=yes
3943 else
3944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3946as_fn_error "cannot run C compiled programs.
3947If you meant to cross compile, use \`--host'.
3948See \`config.log' for more details." "$LINENO" 5; }
3949 fi
3950 fi
3951fi
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3953$as_echo "$cross_compiling" >&6; }
3954
3955rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3956ac_clean_files=$ac_clean_files_save
3957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3958$as_echo_n "checking for suffix of object files... " >&6; }
3959if test "${ac_cv_objext+set}" = set; then :
3960 $as_echo_n "(cached) " >&6
e6df49e4 3961else
8c5ff6dd
KR
3962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3963/* end confdefs.h. */
e6df49e4 3964
8c5ff6dd
KR
3965int
3966main ()
3967{
e6df49e4 3968
8c5ff6dd
KR
3969 ;
3970 return 0;
3971}
a4f64981 3972_ACEOF
8c5ff6dd
KR
3973rm -f conftest.o conftest.obj
3974if { { ac_try="$ac_compile"
a4f64981
GM
3975case "(($ac_try" in
3976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3977 *) ac_try_echo=$ac_try;;
3978esac
8c5ff6dd
KR
3979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3980$as_echo "$ac_try_echo"; } >&5
3981 (eval "$ac_compile") 2>&5
a4f64981 3982 ac_status=$?
8c5ff6dd
KR
3983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3984 test $ac_status = 0; }; then :
3985 for ac_file in conftest.o conftest.obj conftest.*; do
3986 test -f "$ac_file" || continue;
3987 case $ac_file in
3988 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3989 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3990 break;;
3991 esac
3992done
a4f64981
GM
3993else
3994 $as_echo "$as_me: failed program was:" >&5
3995sed 's/^/| /' conftest.$ac_ext >&5
e6df49e4 3996
8c5ff6dd
KR
3997{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3999as_fn_error "cannot compute suffix of object files: cannot compile
4000See \`config.log' for more details." "$LINENO" 5; }
a4f64981 4001fi
8c5ff6dd 4002rm -f conftest.$ac_cv_objext conftest.$ac_ext
a4f64981 4003fi
8c5ff6dd
KR
4004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4005$as_echo "$ac_cv_objext" >&6; }
4006OBJEXT=$ac_cv_objext
4007ac_objext=$OBJEXT
4008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4009$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4010if test "${ac_cv_c_compiler_gnu+set}" = set; then :
a4f64981
GM
4011 $as_echo_n "(cached) " >&6
4012else
8c5ff6dd 4013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 4014/* end confdefs.h. */
15e12598 4015
a4f64981
GM
4016int
4017main ()
4018{
8c5ff6dd
KR
4019#ifndef __GNUC__
4020 choke me
4021#endif
4022
a4f64981
GM
4023 ;
4024 return 0;
4025}
4026_ACEOF
8c5ff6dd
KR
4027if ac_fn_c_try_compile "$LINENO"; then :
4028 ac_compiler_gnu=yes
a4f64981 4029else
8c5ff6dd 4030 ac_compiler_gnu=no
a4f64981 4031fi
8c5ff6dd
KR
4032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4033ac_cv_c_compiler_gnu=$ac_compiler_gnu
aaa36002 4034
a4f64981 4035fi
8c5ff6dd
KR
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4037$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4038if test $ac_compiler_gnu = yes; then
4039 GCC=yes
4040else
4041 GCC=
08b47d3d 4042fi
8c5ff6dd
KR
4043ac_test_CFLAGS=${CFLAGS+set}
4044ac_save_CFLAGS=$CFLAGS
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4046$as_echo_n "checking whether $CC accepts -g... " >&6; }
4047if test "${ac_cv_prog_cc_g+set}" = set; then :
4048 $as_echo_n "(cached) " >&6
4049else
4050 ac_save_c_werror_flag=$ac_c_werror_flag
4051 ac_c_werror_flag=yes
4052 ac_cv_prog_cc_g=no
4053 CFLAGS="-g"
4054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4055/* end confdefs.h. */
aaa36002 4056
8c5ff6dd
KR
4057int
4058main ()
4059{
aaa36002 4060
8c5ff6dd
KR
4061 ;
4062 return 0;
4063}
a4f64981 4064_ACEOF
8c5ff6dd
KR
4065if ac_fn_c_try_compile "$LINENO"; then :
4066 ac_cv_prog_cc_g=yes
4067else
4068 CFLAGS=""
4069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4070/* end confdefs.h. */
aaa36002 4071
8c5ff6dd
KR
4072int
4073main ()
4074{
7186fb09 4075
8c5ff6dd
KR
4076 ;
4077 return 0;
4078}
4079_ACEOF
4080if ac_fn_c_try_compile "$LINENO"; then :
08b47d3d 4081
8c5ff6dd
KR
4082else
4083 ac_c_werror_flag=$ac_save_c_werror_flag
4084 CFLAGS="-g"
4085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4086/* end confdefs.h. */
a4f64981 4087
8c5ff6dd
KR
4088int
4089main ()
4090{
0c309b80 4091
8c5ff6dd
KR
4092 ;
4093 return 0;
4094}
a4f64981 4095_ACEOF
8c5ff6dd
KR
4096if ac_fn_c_try_compile "$LINENO"; then :
4097 ac_cv_prog_cc_g=yes
4098fi
4099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4100fi
4101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4102fi
4103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4104 ac_c_werror_flag=$ac_save_c_werror_flag
4105fi
4106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4107$as_echo "$ac_cv_prog_cc_g" >&6; }
4108if test "$ac_test_CFLAGS" = set; then
4109 CFLAGS=$ac_save_CFLAGS
4110elif test $ac_cv_prog_cc_g = yes; then
4111 if test "$GCC" = yes; then
4112 CFLAGS="-g -O2"
4113 else
4114 CFLAGS="-g"
4115 fi
4116else
4117 if test "$GCC" = yes; then
4118 CFLAGS="-O2"
4119 else
4120 CFLAGS=
4121 fi
4122fi
4123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4124$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4125if test "${ac_cv_prog_cc_c89+set}" = set; then :
4126 $as_echo_n "(cached) " >&6
4127else
4128 ac_cv_prog_cc_c89=no
4129ac_save_CC=$CC
4130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4131/* end confdefs.h. */
4132#include <stdarg.h>
4133#include <stdio.h>
4134#include <sys/types.h>
4135#include <sys/stat.h>
4136/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4137struct buf { int x; };
4138FILE * (*rcsopen) (struct buf *, struct stat *, int);
4139static char *e (p, i)
4140 char **p;
4141 int i;
4142{
4143 return p[i];
4144}
4145static char *f (char * (*g) (char **, int), char **p, ...)
4146{
4147 char *s;
4148 va_list v;
4149 va_start (v,p);
4150 s = g (p, va_arg (v,int));
4151 va_end (v);
4152 return s;
4153}
e6df49e4 4154
8c5ff6dd
KR
4155/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4156 function prototypes and stuff, but not '\xHH' hex character constants.
4157 These don't provoke an error unfortunately, instead are silently treated
4158 as 'x'. The following induces an error, until -std is added to get
4159 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4160 array size at least. It's necessary to write '\x00'==0 to get something
4161 that's true only with -std. */
4162int osf4_cc_array ['\x00' == 0 ? 1 : -1];
e6df49e4 4163
8c5ff6dd
KR
4164/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4165 inside strings and character constants. */
4166#define FOO(x) 'x'
4167int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
08b47d3d 4168
8c5ff6dd
KR
4169int test (int i, double x);
4170struct s1 {int (*f) (int a);};
4171struct s2 {int (*f) (double a);};
4172int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4173int argc;
4174char **argv;
4175int
4176main ()
4177{
4178return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4179 ;
4180 return 0;
4181}
4182_ACEOF
4183for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4184 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
a4f64981 4185do
8c5ff6dd
KR
4186 CC="$ac_save_CC $ac_arg"
4187 if ac_fn_c_try_compile "$LINENO"; then :
4188 ac_cv_prog_cc_c89=$ac_arg
4189fi
4190rm -f core conftest.err conftest.$ac_objext
4191 test "x$ac_cv_prog_cc_c89" != "xno" && break
a4f64981 4192done
8c5ff6dd
KR
4193rm -f conftest.$ac_ext
4194CC=$ac_save_CC
9452ded1 4195
a4f64981 4196fi
8c5ff6dd
KR
4197# AC_CACHE_VAL
4198case "x$ac_cv_prog_cc_c89" in
4199 x)
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4201$as_echo "none needed" >&6; } ;;
4202 xno)
4203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4204$as_echo "unsupported" >&6; } ;;
4205 *)
4206 CC="$CC $ac_cv_prog_cc_c89"
4207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4208$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4209esac
4210if test "x$ac_cv_prog_cc_c89" != xno; then :
0c309b80 4211
8c5ff6dd 4212fi
cd03c74a 4213
8c5ff6dd
KR
4214ac_ext=c
4215ac_cpp='$CPP $CPPFLAGS'
4216ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4217ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4218ac_compiler_gnu=$ac_cv_c_compiler_gnu
9452ded1 4219
49ebbd65 4220
8c5ff6dd
KR
4221# On Suns, sometimes $CPP names a directory.
4222if test -n "$CPP" && test -d "$CPP"; then
4223 CPP=
4224fi
49ebbd65 4225
8c5ff6dd
KR
4226## If not using gcc, and on Solaris, and no CPP specified, see if
4227## using a Sun compiler, which needs -Xs to prevent whitespace.
4228if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4229 test x"$CPP" = x; then
4230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
4231$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
49ebbd65 4232
8c5ff6dd
KR
4233if test "${emacs_cv_sunpro_c+set}" = set; then :
4234 $as_echo_n "(cached) " >&6
4235else
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4237/* end confdefs.h. */
e6df49e4 4238
8c5ff6dd
KR
4239int
4240main ()
4241{
4242#ifndef __SUNPRO_C
4243fail;
4244#endif
a5edbe4a 4245
8c5ff6dd
KR
4246 ;
4247 return 0;
4248}
4249_ACEOF
4250if ac_fn_c_try_link "$LINENO"; then :
4251 emacs_cv_sunpro_c=yes
4252else
4253 emacs_cv_sunpro_c=no
4254fi
4255rm -f core conftest.err conftest.$ac_objext \
4256 conftest$ac_exeext conftest.$ac_ext
4257fi
aaa36002 4258
8c5ff6dd
KR
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
4260$as_echo "$emacs_cv_sunpro_c" >&6; }
e6df49e4 4261
8c5ff6dd
KR
4262 if test x"$emacs_cv_sunpro_c" = xyes; then
4263 NON_GNU_CPP="$CC -E -Xs"
a4f64981 4264 fi
8c5ff6dd 4265fi
a5edbe4a 4266
8c5ff6dd
KR
4267#### Some systems specify a CPP to use unless we are using GCC.
4268#### Now that we know whether we are using GCC, we can decide whether
4269#### to use that one.
4270if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4271then
4272 CPP="$NON_GNU_CPP"
4273fi
15e12598 4274
8c5ff6dd
KR
4275#### Some systems specify a CC to use unless we are using GCC.
4276#### Now that we know whether we are using GCC, we can decide whether
4277#### to use that one.
4278if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4279 test x$cc_specified != xyes
4280then
4281 CC="$NON_GNU_CC"
4282fi
15e12598 4283
8c5ff6dd
KR
4284if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4285then
4286 CC="$CC $GCC_TEST_OPTIONS"
4287fi
cd03c74a 4288
8c5ff6dd
KR
4289if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4290then
4291 CC="$CC $NON_GCC_TEST_OPTIONS"
4292fi
4293
4294ac_ext=c
4295ac_cpp='$CPP $CPPFLAGS'
4296ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4297ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4298ac_compiler_gnu=$ac_cv_c_compiler_gnu
4299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4300$as_echo_n "checking how to run the C preprocessor... " >&6; }
4301# On Suns, sometimes $CPP names a directory.
4302if test -n "$CPP" && test -d "$CPP"; then
4303 CPP=
4304fi
4305if test -z "$CPP"; then
4306 if test "${ac_cv_prog_CPP+set}" = set; then :
a5edbe4a 4307 $as_echo_n "(cached) " >&6
a5edbe4a 4308else
8c5ff6dd
KR
4309 # Double quotes because CPP needs to be expanded
4310 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4311 do
4312 ac_preproc_ok=false
4313for ac_c_preproc_warn_flag in '' yes
4314do
4315 # Use a header file that comes with gcc, so configuring glibc
4316 # with a fresh cross-compiler works.
4317 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4318 # <limits.h> exists even on freestanding compilers.
4319 # On the NeXT, cc -E runs the code through the compiler's parser,
4320 # not just through cpp. "Syntax error" is here to catch this case.
4321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 4322/* end confdefs.h. */
8c5ff6dd
KR
4323#ifdef __STDC__
4324# include <limits.h>
4325#else
4326# include <assert.h>
a4f64981 4327#endif
8c5ff6dd 4328 Syntax error
15e12598 4329_ACEOF
8c5ff6dd
KR
4330if ac_fn_c_try_cpp "$LINENO"; then :
4331
a4f64981 4332else
8c5ff6dd
KR
4333 # Broken: fails on valid input.
4334continue
4335fi
4336rm -f conftest.err conftest.$ac_ext
4337
4338 # OK, works on sane cases. Now check whether nonexistent headers
4339 # can be detected and how.
4340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4341/* end confdefs.h. */
4342#include <ac_nonexistent.h>
4343_ACEOF
4344if ac_fn_c_try_cpp "$LINENO"; then :
4345 # Broken: success on invalid input.
4346continue
4347else
4348 # Passes both tests.
4349ac_preproc_ok=:
4350break
4351fi
4352rm -f conftest.err conftest.$ac_ext
a4f64981 4353
8c5ff6dd
KR
4354done
4355# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4356rm -f conftest.err conftest.$ac_ext
4357if $ac_preproc_ok; then :
4358 break
e6df49e4 4359fi
a4f64981 4360
8c5ff6dd
KR
4361 done
4362 ac_cv_prog_CPP=$CPP
4363
49ebbd65 4364fi
8c5ff6dd 4365 CPP=$ac_cv_prog_CPP
a4f64981 4366else
8c5ff6dd 4367 ac_cv_prog_CPP=$CPP
a4f64981 4368fi
8c5ff6dd
KR
4369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4370$as_echo "$CPP" >&6; }
4371ac_preproc_ok=false
4372for ac_c_preproc_warn_flag in '' yes
4373do
4374 # Use a header file that comes with gcc, so configuring glibc
4375 # with a fresh cross-compiler works.
4376 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4377 # <limits.h> exists even on freestanding compilers.
4378 # On the NeXT, cc -E runs the code through the compiler's parser,
4379 # not just through cpp. "Syntax error" is here to catch this case.
4380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4381/* end confdefs.h. */
4382#ifdef __STDC__
4383# include <limits.h>
4384#else
4385# include <assert.h>
4386#endif
4387 Syntax error
4388_ACEOF
4389if ac_fn_c_try_cpp "$LINENO"; then :
a4f64981 4390
8c5ff6dd
KR
4391else
4392 # Broken: fails on valid input.
4393continue
4394fi
4395rm -f conftest.err conftest.$ac_ext
a4f64981 4396
8c5ff6dd
KR
4397 # OK, works on sane cases. Now check whether nonexistent headers
4398 # can be detected and how.
4399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4400/* end confdefs.h. */
4401#include <ac_nonexistent.h>
49ebbd65 4402_ACEOF
8c5ff6dd
KR
4403if ac_fn_c_try_cpp "$LINENO"; then :
4404 # Broken: success on invalid input.
4405continue
4406else
4407 # Passes both tests.
4408ac_preproc_ok=:
4409break
4410fi
4411rm -f conftest.err conftest.$ac_ext
a4f64981 4412
8c5ff6dd
KR
4413done
4414# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4415rm -f conftest.err conftest.$ac_ext
4416if $ac_preproc_ok; then :
4417
4418else
4419 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4420$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4421as_fn_error "C preprocessor \"$CPP\" fails sanity check
4422See \`config.log' for more details." "$LINENO" 5; }
4423fi
a4f64981 4424
8c5ff6dd
KR
4425ac_ext=c
4426ac_cpp='$CPP $CPPFLAGS'
4427ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4428ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4429ac_compiler_gnu=$ac_cv_c_compiler_gnu
a4f64981 4430
a4f64981 4431
8c5ff6dd
KR
4432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4433$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4434if test "${ac_cv_path_GREP+set}" = set; then :
a4f64981
GM
4435 $as_echo_n "(cached) " >&6
4436else
8c5ff6dd
KR
4437 if test -z "$GREP"; then
4438 ac_path_GREP_found=false
4439 # Loop through the user's path and test for each of PROGNAME-LIST
a4f64981 4440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8c5ff6dd 4441for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
a4f64981
GM
4442do
4443 IFS=$as_save_IFS
4444 test -z "$as_dir" && as_dir=.
8c5ff6dd
KR
4445 for ac_prog in grep ggrep; do
4446 for ac_exec_ext in '' $ac_executable_extensions; do
4447 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4448 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4449# Check for GNU ac_path_GREP and select it if it is found.
4450 # Check for GNU $ac_path_GREP
4451case `"$ac_path_GREP" --version 2>&1` in
4452*GNU*)
4453 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4454*)
4455 ac_count=0
4456 $as_echo_n 0123456789 >"conftest.in"
4457 while :
4458 do
4459 cat "conftest.in" "conftest.in" >"conftest.tmp"
4460 mv "conftest.tmp" "conftest.in"
4461 cp "conftest.in" "conftest.nl"
4462 $as_echo 'GREP' >> "conftest.nl"
4463 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4464 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4465 as_fn_arith $ac_count + 1 && ac_count=$as_val
4466 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4467 # Best one so far, save it but keep looking for a better one
4468 ac_cv_path_GREP="$ac_path_GREP"
4469 ac_path_GREP_max=$ac_count
4470 fi
4471 # 10*(2^10) chars as input seems more than enough
4472 test $ac_count -gt 10 && break
4473 done
4474 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
a4f64981 4475esac
8c5ff6dd
KR
4476
4477 $ac_path_GREP_found && break 3
4478 done
4479 done
4480 done
4481IFS=$as_save_IFS
4482 if test -z "$ac_cv_path_GREP"; then
4483 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4484 fi
a4f64981 4485else
8c5ff6dd 4486 ac_cv_path_GREP=$GREP
49ebbd65 4487fi
49ebbd65 4488
8c5ff6dd
KR
4489fi
4490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4491$as_echo "$ac_cv_path_GREP" >&6; }
4492 GREP="$ac_cv_path_GREP"
e6df49e4 4493
49ebbd65 4494
8c5ff6dd
KR
4495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4496$as_echo_n "checking for egrep... " >&6; }
4497if test "${ac_cv_path_EGREP+set}" = set; then :
4498 $as_echo_n "(cached) " >&6
4499else
4500 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4501 then ac_cv_path_EGREP="$GREP -E"
4502 else
4503 if test -z "$EGREP"; then
4504 ac_path_EGREP_found=false
4505 # Loop through the user's path and test for each of PROGNAME-LIST
4506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4507for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4508do
4509 IFS=$as_save_IFS
4510 test -z "$as_dir" && as_dir=.
4511 for ac_prog in egrep; do
4512 for ac_exec_ext in '' $ac_executable_extensions; do
4513 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4514 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4515# Check for GNU ac_path_EGREP and select it if it is found.
4516 # Check for GNU $ac_path_EGREP
4517case `"$ac_path_EGREP" --version 2>&1` in
4518*GNU*)
4519 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4520*)
4521 ac_count=0
4522 $as_echo_n 0123456789 >"conftest.in"
4523 while :
4524 do
4525 cat "conftest.in" "conftest.in" >"conftest.tmp"
4526 mv "conftest.tmp" "conftest.in"
4527 cp "conftest.in" "conftest.nl"
4528 $as_echo 'EGREP' >> "conftest.nl"
4529 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4530 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4531 as_fn_arith $ac_count + 1 && ac_count=$as_val
4532 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4533 # Best one so far, save it but keep looking for a better one
4534 ac_cv_path_EGREP="$ac_path_EGREP"
4535 ac_path_EGREP_max=$ac_count
4536 fi
4537 # 10*(2^10) chars as input seems more than enough
4538 test $ac_count -gt 10 && break
4539 done
4540 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4541esac
49ebbd65 4542
8c5ff6dd
KR
4543 $ac_path_EGREP_found && break 3
4544 done
4545 done
4546 done
4547IFS=$as_save_IFS
4548 if test -z "$ac_cv_path_EGREP"; then
4549 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
a4f64981 4550 fi
a4f64981 4551else
8c5ff6dd 4552 ac_cv_path_EGREP=$EGREP
a4f64981
GM
4553fi
4554
8c5ff6dd 4555 fi
a4f64981 4556fi
8c5ff6dd
KR
4557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4558$as_echo "$ac_cv_path_EGREP" >&6; }
4559 EGREP="$ac_cv_path_EGREP"
15e12598
VB
4560
4561
8c5ff6dd
KR
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4563$as_echo_n "checking for ANSI C header files... " >&6; }
4564if test "${ac_cv_header_stdc+set}" = set; then :
a4f64981 4565 $as_echo_n "(cached) " >&6
a4f64981 4566else
8c5ff6dd 4567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 4568/* end confdefs.h. */
8c5ff6dd
KR
4569#include <stdlib.h>
4570#include <stdarg.h>
4571#include <string.h>
4572#include <float.h>
4573
4574int
4575main ()
4576{
4577
4578 ;
4579 return 0;
4580}
a4f64981 4581_ACEOF
8c5ff6dd
KR
4582if ac_fn_c_try_compile "$LINENO"; then :
4583 ac_cv_header_stdc=yes
a4f64981 4584else
8c5ff6dd 4585 ac_cv_header_stdc=no
a4f64981 4586fi
a4f64981 4587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 4588
8c5ff6dd
KR
4589if test $ac_cv_header_stdc = yes; then
4590 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 4592/* end confdefs.h. */
8c5ff6dd
KR
4593#include <string.h>
4594
15e12598 4595_ACEOF
8c5ff6dd
KR
4596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4597 $EGREP "memchr" >/dev/null 2>&1; then :
4598
4599else
4600 ac_cv_header_stdc=no
4601fi
4602rm -f conftest*
a4f64981 4603
a4f64981
GM
4604fi
4605
8c5ff6dd
KR
4606if test $ac_cv_header_stdc = yes; then
4607 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4609/* end confdefs.h. */
4610#include <stdlib.h>
a4f64981 4611
8c5ff6dd
KR
4612_ACEOF
4613if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4614 $EGREP "free" >/dev/null 2>&1; then :
49ebbd65 4615
a4f64981 4616else
8c5ff6dd 4617 ac_cv_header_stdc=no
e6df49e4 4618fi
8c5ff6dd 4619rm -f conftest*
15e12598 4620
a4f64981 4621fi
8c5ff6dd
KR
4622
4623if test $ac_cv_header_stdc = yes; then
4624 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4625 if test "$cross_compiling" = yes; then :
4626 :
08b47d3d 4627else
8c5ff6dd 4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0c309b80 4629/* end confdefs.h. */
8c5ff6dd
KR
4630#include <ctype.h>
4631#include <stdlib.h>
4632#if ((' ' & 0x0FF) == 0x020)
4633# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4634# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4635#else
4636# define ISLOWER(c) \
4637 (('a' <= (c) && (c) <= 'i') \
4638 || ('j' <= (c) && (c) <= 'r') \
4639 || ('s' <= (c) && (c) <= 'z'))
4640# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
e6df49e4 4641#endif
8c5ff6dd
KR
4642
4643#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9452ded1
DN
4644int
4645main ()
4646{
8c5ff6dd
KR
4647 int i;
4648 for (i = 0; i < 256; i++)
4649 if (XOR (islower (i), ISLOWER (i))
4650 || toupper (i) != TOUPPER (i))
4651 return 2;
9452ded1
DN
4652 return 0;
4653}
0c309b80 4654_ACEOF
8c5ff6dd 4655if ac_fn_c_try_run "$LINENO"; then :
a4f64981 4656
8c5ff6dd
KR
4657else
4658 ac_cv_header_stdc=no
4659fi
4660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4661 conftest.$ac_objext conftest.beam conftest.$ac_ext
cd03c74a 4662fi
a4f64981 4663
e6df49e4 4664fi
49ebbd65 4665fi
8c5ff6dd
KR
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4667$as_echo "$ac_cv_header_stdc" >&6; }
4668if test $ac_cv_header_stdc = yes; then
cd03c74a 4669
8c5ff6dd 4670$as_echo "#define STDC_HEADERS 1" >>confdefs.h
cd03c74a 4671
8c5ff6dd 4672fi
0c309b80 4673
8c5ff6dd
KR
4674# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4675for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4676 inttypes.h stdint.h unistd.h
4677do :
4678 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4679ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4680"
4681eval as_val=\$$as_ac_Header
4682 if test "x$as_val" = x""yes; then :
4683 cat >>confdefs.h <<_ACEOF
4684#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
a4f64981 4685_ACEOF
e6df49e4 4686
cd03c74a 4687fi
a4f64981 4688
8c5ff6dd 4689done
aaa36002 4690
cd03c74a 4691
a5edbe4a 4692
8c5ff6dd
KR
4693 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4694if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4695 MINIX=yes
4696else
4697 MINIX=
a4f64981 4698fi
e6df49e4 4699
e6df49e4 4700
8c5ff6dd 4701 if test "$MINIX" = yes; then
49ebbd65 4702
8c5ff6dd 4703$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
e6df49e4 4704
e6df49e4 4705
8c5ff6dd 4706$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
e6df49e4 4707
49ebbd65 4708
8c5ff6dd 4709$as_echo "#define _MINIX 1" >>confdefs.h
49ebbd65 4710
8c5ff6dd 4711 fi
e6df49e4 4712
a4f64981 4713
8c5ff6dd
KR
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4715$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4716if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
a4f64981
GM
4717 $as_echo_n "(cached) " >&6
4718else
8c5ff6dd 4719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd03c74a 4720/* end confdefs.h. */
a4f64981 4721
8c5ff6dd
KR
4722# define __EXTENSIONS__ 1
4723 $ac_includes_default
15e12598
VB
4724int
4725main ()
4726{
8c5ff6dd 4727
15e12598
VB
4728 ;
4729 return 0;
4730}
0c309b80 4731_ACEOF
8c5ff6dd
KR
4732if ac_fn_c_try_compile "$LINENO"; then :
4733 ac_cv_safe_to_define___extensions__=yes
aaa36002 4734else
8c5ff6dd 4735 ac_cv_safe_to_define___extensions__=no
a4f64981 4736fi
8c5ff6dd 4737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 4738fi
8c5ff6dd
KR
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4740$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4741 test $ac_cv_safe_to_define___extensions__ = yes &&
4742 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
a4f64981 4743
8c5ff6dd 4744 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
a4f64981 4745
8c5ff6dd 4746 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
a4f64981 4747
8c5ff6dd 4748 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
a4f64981 4749
8c5ff6dd 4750 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
a4f64981 4751
a4f64981 4752
8c5ff6dd
KR
4753
4754### Use -Wno-pointer-sign if the compiler supports it
4755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
4756$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
4757SAVE_CFLAGS="$CFLAGS"
4758CFLAGS="$CFLAGS -Wno-pointer-sign"
4759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 4760/* end confdefs.h. */
a4f64981 4761
8c5ff6dd
KR
4762int
4763main ()
4764{
4765
4766 ;
4767 return 0;
4768}
49ebbd65 4769_ACEOF
8c5ff6dd
KR
4770if ac_fn_c_try_compile "$LINENO"; then :
4771 has_option=yes
4772else
4773 has_option=no
4774fi
4775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4776if test $has_option = yes; then
4777 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4778fi
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4780$as_echo "$has_option" >&6; }
4781CFLAGS="$SAVE_CFLAGS"
4782unset has_option
4783unset SAVE_CFLAGS
4784
4785### Use -Wdeclaration-after-statement if the compiler supports it
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
4787$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4788SAVE_CFLAGS="$CFLAGS"
4789CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4791/* end confdefs.h. */
4792
4793int
4794main ()
4795{
a4f64981 4796
8c5ff6dd
KR
4797 ;
4798 return 0;
4799}
4800_ACEOF
4801if ac_fn_c_try_compile "$LINENO"; then :
4802 has_option=yes
a5edbe4a 4803else
8c5ff6dd 4804 has_option=no
cd03c74a 4805fi
8c5ff6dd
KR
4806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4807if test $has_option = yes; then
4808 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
a4f64981 4809fi
8c5ff6dd
KR
4810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4811$as_echo "$has_option" >&6; }
4812CFLAGS="$SAVE_CFLAGS"
4813unset has_option
4814unset SAVE_CFLAGS
e6df49e4 4815
8c5ff6dd 4816#### Some other nice autoconf tests.
cd03c74a 4817
8c5ff6dd
KR
4818ac_ext=c
4819ac_cpp='$CPP $CPPFLAGS'
4820ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4821ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4822ac_compiler_gnu=$ac_cv_c_compiler_gnu
4823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4824$as_echo_n "checking how to run the C preprocessor... " >&6; }
4825# On Suns, sometimes $CPP names a directory.
4826if test -n "$CPP" && test -d "$CPP"; then
4827 CPP=
a4f64981 4828fi
8c5ff6dd
KR
4829if test -z "$CPP"; then
4830 if test "${ac_cv_prog_CPP+set}" = set; then :
4831 $as_echo_n "(cached) " >&6
a4f64981 4832else
8c5ff6dd
KR
4833 # Double quotes because CPP needs to be expanded
4834 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4835 do
4836 ac_preproc_ok=false
4837for ac_c_preproc_warn_flag in '' yes
4838do
4839 # Use a header file that comes with gcc, so configuring glibc
4840 # with a fresh cross-compiler works.
4841 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4842 # <limits.h> exists even on freestanding compilers.
4843 # On the NeXT, cc -E runs the code through the compiler's parser,
4844 # not just through cpp. "Syntax error" is here to catch this case.
4845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 4846/* end confdefs.h. */
8c5ff6dd
KR
4847#ifdef __STDC__
4848# include <limits.h>
4849#else
4850# include <assert.h>
4851#endif
4852 Syntax error
e6df49e4 4853_ACEOF
8c5ff6dd 4854if ac_fn_c_try_cpp "$LINENO"; then :
e6df49e4 4855
8c5ff6dd
KR
4856else
4857 # Broken: fails on valid input.
4858continue
15e12598 4859fi
8c5ff6dd 4860rm -f conftest.err conftest.$ac_ext
15e12598 4861
8c5ff6dd
KR
4862 # OK, works on sane cases. Now check whether nonexistent headers
4863 # can be detected and how.
4864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 4865/* end confdefs.h. */
8c5ff6dd 4866#include <ac_nonexistent.h>
9452ded1 4867_ACEOF
8c5ff6dd
KR
4868if ac_fn_c_try_cpp "$LINENO"; then :
4869 # Broken: success on invalid input.
4870continue
cd03c74a 4871else
8c5ff6dd
KR
4872 # Passes both tests.
4873ac_preproc_ok=:
4874break
cd03c74a 4875fi
8c5ff6dd 4876rm -f conftest.err conftest.$ac_ext
08b47d3d 4877
8c5ff6dd
KR
4878done
4879# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
a4f64981 4880rm -f conftest.err conftest.$ac_ext
8c5ff6dd
KR
4881if $ac_preproc_ok; then :
4882 break
4883fi
0c309b80 4884
8c5ff6dd
KR
4885 done
4886 ac_cv_prog_CPP=$CPP
a5edbe4a 4887
8c5ff6dd
KR
4888fi
4889 CPP=$ac_cv_prog_CPP
a4f64981 4890else
8c5ff6dd 4891 ac_cv_prog_CPP=$CPP
15e12598 4892fi
8c5ff6dd
KR
4893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4894$as_echo "$CPP" >&6; }
4895ac_preproc_ok=false
4896for ac_c_preproc_warn_flag in '' yes
4897do
4898 # Use a header file that comes with gcc, so configuring glibc
4899 # with a fresh cross-compiler works.
4900 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4901 # <limits.h> exists even on freestanding compilers.
4902 # On the NeXT, cc -E runs the code through the compiler's parser,
4903 # not just through cpp. "Syntax error" is here to catch this case.
4904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4905/* end confdefs.h. */
4906#ifdef __STDC__
4907# include <limits.h>
4908#else
4909# include <assert.h>
4910#endif
4911 Syntax error
4912_ACEOF
4913if ac_fn_c_try_cpp "$LINENO"; then :
a5edbe4a 4914
8c5ff6dd
KR
4915else
4916 # Broken: fails on valid input.
4917continue
a4f64981 4918fi
8c5ff6dd 4919rm -f conftest.err conftest.$ac_ext
a5edbe4a 4920
8c5ff6dd
KR
4921 # OK, works on sane cases. Now check whether nonexistent headers
4922 # can be detected and how.
4923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4924/* end confdefs.h. */
4925#include <ac_nonexistent.h>
4926_ACEOF
4927if ac_fn_c_try_cpp "$LINENO"; then :
4928 # Broken: success on invalid input.
4929continue
4930else
4931 # Passes both tests.
4932ac_preproc_ok=:
4933break
cd03c74a 4934fi
8c5ff6dd 4935rm -f conftest.err conftest.$ac_ext
0c309b80 4936
15e12598 4937done
8c5ff6dd
KR
4938# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4939rm -f conftest.err conftest.$ac_ext
4940if $ac_preproc_ok; then :
08b47d3d 4941
aaa36002 4942else
8c5ff6dd
KR
4943 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4945as_fn_error "C preprocessor \"$CPP\" fails sanity check
4946See \`config.log' for more details." "$LINENO" 5; }
4947fi
15e12598 4948
8c5ff6dd
KR
4949ac_ext=c
4950ac_cpp='$CPP $CPPFLAGS'
4951ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4952ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4953ac_compiler_gnu=$ac_cv_c_compiler_gnu
4954
4955# Find a good install program. We prefer a C program (faster),
4956# so one script is as good as another. But avoid the broken or
4957# incompatible versions:
4958# SysV /etc/install, /usr/sbin/install
4959# SunOS /usr/etc/install
4960# IRIX /sbin/install
4961# AIX /bin/install
4962# AmigaOS /C/install, which installs bootblocks on floppy discs
4963# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4964# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4965# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4966# OS/2's system install, which has a completely different semantic
4967# ./install, which can be erroneously created by make from ./install.sh.
4968# Reject install programs that cannot install multiple files.
4969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4970$as_echo_n "checking for a BSD-compatible install... " >&6; }
4971if test -z "$INSTALL"; then
4972if test "${ac_cv_path_install+set}" = set; then :
4973 $as_echo_n "(cached) " >&6
aaa36002 4974else
8c5ff6dd
KR
4975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in $PATH
4977do
4978 IFS=$as_save_IFS
4979 test -z "$as_dir" && as_dir=.
4980 # Account for people who put trailing slashes in PATH elements.
4981case $as_dir/ in #((
4982 ./ | .// | /[cC]/* | \
4983 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4984 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4985 /usr/ucb/* ) ;;
4986 *)
4987 # OSF1 and SCO ODT 3.0 have their own names for install.
4988 # Don't use installbsd from OSF since it installs stuff as root
4989 # by default.
4990 for ac_prog in ginstall scoinst install; do
4991 for ac_exec_ext in '' $ac_executable_extensions; do
4992 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4993 if test $ac_prog = install &&
4994 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4995 # AIX install. It has an incompatible calling convention.
4996 :
4997 elif test $ac_prog = install &&
4998 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4999 # program-specific install script used by HP pwplus--don't use.
5000 :
5001 else
5002 rm -rf conftest.one conftest.two conftest.dir
5003 echo one > conftest.one
5004 echo two > conftest.two
5005 mkdir conftest.dir
5006 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5007 test -s conftest.one && test -s conftest.two &&
5008 test -s conftest.dir/conftest.one &&
5009 test -s conftest.dir/conftest.two
5010 then
5011 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5012 break 3
5013 fi
5014 fi
5015 fi
5016 done
5017 done
5018 ;;
5019esac
a4f64981 5020
8c5ff6dd
KR
5021 done
5022IFS=$as_save_IFS
15e12598 5023
8c5ff6dd 5024rm -rf conftest.one conftest.two conftest.dir
a4f64981 5025
8c5ff6dd
KR
5026fi
5027 if test "${ac_cv_path_install+set}" = set; then
5028 INSTALL=$ac_cv_path_install
5029 else
5030 # As a last resort, use the slow shell script. Don't cache a
5031 # value for INSTALL within a source directory, because that will
5032 # break other packages using the cache if that directory is
5033 # removed, or if the value is a relative name.
5034 INSTALL=$ac_install_sh
a4f64981 5035 fi
8c5ff6dd
KR
5036fi
5037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5038$as_echo "$INSTALL" >&6; }
a4f64981 5039
8c5ff6dd
KR
5040# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5041# It thinks the first close brace ends the variable substitution.
5042test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
aaa36002 5043
8c5ff6dd 5044test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
cd03c74a 5045
8c5ff6dd 5046test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
a5edbe4a 5047
8c5ff6dd
KR
5048if test "x$RANLIB" = x; then
5049 if test -n "$ac_tool_prefix"; then
5050 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5051set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5053$as_echo_n "checking for $ac_word... " >&6; }
5054if test "${ac_cv_prog_RANLIB+set}" = set; then :
a4f64981 5055 $as_echo_n "(cached) " >&6
a4f64981 5056else
8c5ff6dd
KR
5057 if test -n "$RANLIB"; then
5058 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
15e12598 5059else
8c5ff6dd
KR
5060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5061for as_dir in $PATH
5062do
5063 IFS=$as_save_IFS
5064 test -z "$as_dir" && as_dir=.
5065 for ac_exec_ext in '' $ac_executable_extensions; do
5066 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5067 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5069 break 2
5070 fi
5071done
5072 done
5073IFS=$as_save_IFS
a5edbe4a 5074
15e12598 5075fi
e6df49e4 5076fi
8c5ff6dd
KR
5077RANLIB=$ac_cv_prog_RANLIB
5078if test -n "$RANLIB"; then
5079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5080$as_echo "$RANLIB" >&6; }
a4f64981 5081else
8c5ff6dd
KR
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5083$as_echo "no" >&6; }
9452ded1 5084fi
8c5ff6dd 5085
0c309b80 5086
a4f64981 5087fi
8c5ff6dd
KR
5088if test -z "$ac_cv_prog_RANLIB"; then
5089 ac_ct_RANLIB=$RANLIB
5090 # Extract the first word of "ranlib", so it can be a program name with args.
5091set dummy ranlib; ac_word=$2
5092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5093$as_echo_n "checking for $ac_word... " >&6; }
5094if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
cd03c74a
DN
5095 $as_echo_n "(cached) " >&6
5096else
8c5ff6dd
KR
5097 if test -n "$ac_ct_RANLIB"; then
5098 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
cd03c74a 5099else
8c5ff6dd
KR
5100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5101for as_dir in $PATH
5102do
5103 IFS=$as_save_IFS
5104 test -z "$as_dir" && as_dir=.
5105 for ac_exec_ext in '' $ac_executable_extensions; do
5106 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5107 ac_cv_prog_ac_ct_RANLIB="ranlib"
5108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5109 break 2
5110 fi
5111done
5112 done
5113IFS=$as_save_IFS
a4f64981 5114
15e12598 5115fi
a5edbe4a 5116fi
8c5ff6dd
KR
5117ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5118if test -n "$ac_ct_RANLIB"; then
5119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5120$as_echo "$ac_ct_RANLIB" >&6; }
5121else
5122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5123$as_echo "no" >&6; }
a4f64981
GM
5124fi
5125
8c5ff6dd
KR
5126 if test "x$ac_ct_RANLIB" = x; then
5127 RANLIB=":"
5128 else
5129 case $cross_compiling:$ac_tool_warned in
5130yes:)
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5133ac_tool_warned=yes ;;
5134esac
5135 RANLIB=$ac_ct_RANLIB
5136 fi
5137else
5138 RANLIB="$ac_cv_prog_RANLIB"
a4f64981
GM
5139fi
5140
8c5ff6dd 5141fi
a4f64981 5142
8c5ff6dd
KR
5143## Although we're running on an amd64 kernel, we're actually compiling for
5144## the x86 architecture. The user should probably have provided an
5145## explicit --build to `configure', but if everything else than the kernel
5146## is running in i386 mode, we can help them out.
5147if test "$machine" = "amdx86-64"; then
5148 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
5149if test "x$ac_cv_have_decl_i386" = x""yes; then :
a4f64981 5150
8c5ff6dd 5151fi
e6df49e4 5152
8c5ff6dd
KR
5153 if test "$ac_cv_have_decl_i386" = "yes"; then
5154 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
5155 machine=intel386
5156 machfile="m/${machine}.h"
a4f64981 5157 fi
cd03c74a 5158fi
08b47d3d 5159
8c5ff6dd
KR
5160# Extract the first word of "install-info", so it can be a program name with args.
5161set dummy install-info; ac_word=$2
5162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5163$as_echo_n "checking for $ac_word... " >&6; }
5164if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
a4f64981 5165 $as_echo_n "(cached) " >&6
15e12598 5166else
8c5ff6dd
KR
5167 case $INSTALL_INFO in
5168 [\\/]* | ?:[\\/]*)
5169 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5170 ;;
5171 *)
5172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5173for as_dir in $PATH
5174do
5175 IFS=$as_save_IFS
5176 test -z "$as_dir" && as_dir=.
5177 for ac_exec_ext in '' $ac_executable_extensions; do
5178 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5179 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5181 break 2
5182 fi
5183done
5184 done
5185IFS=$as_save_IFS
aaa36002 5186
8c5ff6dd 5187 ;;
a4f64981 5188esac
8c5ff6dd
KR
5189fi
5190INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5191if test -n "$INSTALL_INFO"; then
5192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5193$as_echo "$INSTALL_INFO" >&6; }
7186fb09 5194else
8c5ff6dd
KR
5195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5196$as_echo "no" >&6; }
15e12598 5197fi
aaa36002 5198
e6df49e4 5199
8c5ff6dd
KR
5200# Extract the first word of "install-info", so it can be a program name with args.
5201set dummy install-info; ac_word=$2
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5203$as_echo_n "checking for $ac_word... " >&6; }
5204if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5205 $as_echo_n "(cached) " >&6
5206else
5207 case $INSTALL_INFO in
5208 [\\/]* | ?:[\\/]*)
5209 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5210 ;;
5211 *)
5212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in /usr/sbin
5214do
5215 IFS=$as_save_IFS
5216 test -z "$as_dir" && as_dir=.
5217 for ac_exec_ext in '' $ac_executable_extensions; do
5218 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5219 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221 break 2
5222 fi
5223done
5224 done
5225IFS=$as_save_IFS
15e12598 5226
8c5ff6dd 5227 ;;
a4f64981 5228esac
8c5ff6dd
KR
5229fi
5230INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5231if test -n "$INSTALL_INFO"; then
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5233$as_echo "$INSTALL_INFO" >&6; }
a4f64981 5234else
8c5ff6dd
KR
5235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
a4f64981 5237fi
e6df49e4 5238
8c5ff6dd
KR
5239
5240# Extract the first word of "install-info", so it can be a program name with args.
5241set dummy install-info; ac_word=$2
5242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5243$as_echo_n "checking for $ac_word... " >&6; }
5244if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
e6df49e4
GM
5245 $as_echo_n "(cached) " >&6
5246else
8c5ff6dd
KR
5247 case $INSTALL_INFO in
5248 [\\/]* | ?:[\\/]*)
5249 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5250 ;;
5251 *)
5252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5253for as_dir in /sbin
5254do
5255 IFS=$as_save_IFS
5256 test -z "$as_dir" && as_dir=.
5257 for ac_exec_ext in '' $ac_executable_extensions; do
5258 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5259 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5261 break 2
5262 fi
5263done
5264 done
5265IFS=$as_save_IFS
aaa36002 5266
8c5ff6dd
KR
5267 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5268 ;;
a4f64981 5269esac
8c5ff6dd
KR
5270fi
5271INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5272if test -n "$INSTALL_INFO"; then
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5274$as_echo "$INSTALL_INFO" >&6; }
0c309b80 5275else
8c5ff6dd
KR
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5277$as_echo "no" >&6; }
15e12598 5278fi
15e12598 5279
8c5ff6dd
KR
5280
5281# Extract the first word of "gzip", so it can be a program name with args.
5282set dummy gzip; ac_word=$2
5283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5284$as_echo_n "checking for $ac_word... " >&6; }
5285if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
5286 $as_echo_n "(cached) " >&6
5287else
5288 case $GZIP_PROG in
5289 [\\/]* | ?:[\\/]*)
5290 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
5291 ;;
5292 *)
5293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5294for as_dir in $PATH
5295do
5296 IFS=$as_save_IFS
5297 test -z "$as_dir" && as_dir=.
5298 for ac_exec_ext in '' $ac_executable_extensions; do
5299 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5300 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
5301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5302 break 2
5303 fi
5304done
5305 done
5306IFS=$as_save_IFS
5307
5308 ;;
5309esac
a4f64981 5310fi
8c5ff6dd
KR
5311GZIP_PROG=$ac_cv_path_GZIP_PROG
5312if test -n "$GZIP_PROG"; then
5313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
5314$as_echo "$GZIP_PROG" >&6; }
a4f64981 5315else
8c5ff6dd
KR
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5317$as_echo "no" >&6; }
a4f64981 5318fi
cd03c74a 5319
15e12598
VB
5320
5321
a4f64981 5322
8c5ff6dd
KR
5323## Need makeinfo >= 4.6 (?) to build the manuals.
5324# Extract the first word of "makeinfo", so it can be a program name with args.
5325set dummy makeinfo; ac_word=$2
5326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5327$as_echo_n "checking for $ac_word... " >&6; }
5328if test "${ac_cv_path_MAKEINFO+set}" = set; then :
7186fb09
GM
5329 $as_echo_n "(cached) " >&6
5330else
8c5ff6dd
KR
5331 case $MAKEINFO in
5332 [\\/]* | ?:[\\/]*)
5333 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5334 ;;
5335 *)
5336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5337for as_dir in $PATH
5338do
5339 IFS=$as_save_IFS
5340 test -z "$as_dir" && as_dir=.
5341 for ac_exec_ext in '' $ac_executable_extensions; do
5342 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5343 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5345 break 2
5346 fi
5347done
5348 done
5349IFS=$as_save_IFS
a4f64981 5350
8c5ff6dd
KR
5351 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5352 ;;
a4f64981 5353esac
e6df49e4 5354fi
8c5ff6dd
KR
5355MAKEINFO=$ac_cv_path_MAKEINFO
5356if test -n "$MAKEINFO"; then
5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
5358$as_echo "$MAKEINFO" >&6; }
a4f64981 5359else
8c5ff6dd
KR
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361$as_echo "no" >&6; }
a4f64981
GM
5362fi
5363
a4f64981 5364
8c5ff6dd
KR
5365if test "$MAKEINFO" != "no" && \
5366 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
5367 MAKEINFO=no
5368fi
a4f64981 5369
8c5ff6dd
KR
5370## Makeinfo is unusual. For a released Emacs, the manuals are
5371## pre-built, and not deleted by the normal clean rules. makeinfo is
5372## therefore in the category of "special tools" not normally required, which
5373## configure does not have to check for (eg autoconf itself).
5374## In a Bazaar checkout on the other hand, the manuals are not included.
5375## So makeinfo is a requirement to build from Bazaar, and configure
5376## should test for it as it does for any other build requirement.
5377## We use the presence of $srcdir/info/emacs to distinguish a release,
5378## with pre-built manuals, from a Bazaar checkout.
5379if test "$MAKEINFO" = "no"; then
5380 if test "x${with_makeinfo}" = "xno"; then
5381 MAKEINFO=off
5382 elif test ! -e $srcdir/info/emacs; then
5383 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
5384source tree does not seem to have pre-built manuals in the \`info' directory.
5385Either install a suitable version of makeinfo, or re-run configure
5386with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
a4f64981 5387 fi
49ebbd65 5388fi
a5edbe4a
GM
5389
5390
8c5ff6dd
KR
5391if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5392then
5393 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
e6df49e4 5394fi
49ebbd65 5395
8c5ff6dd
KR
5396if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5397then
5398 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
a4f64981 5399fi
8c5ff6dd
KR
5400
5401
5402late_LDFLAGS=$LDFLAGS
5403if test "$GCC" = yes; then
5404 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
a5edbe4a 5405else
8c5ff6dd
KR
5406 LDFLAGS="$LDFLAGS -znocombreloc"
5407fi
5408
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
5410$as_echo_n "checking for -znocombreloc... " >&6; }
5411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 5412/* end confdefs.h. */
8c5ff6dd 5413main(){return 0;}
0c309b80 5414_ACEOF
8c5ff6dd
KR
5415if ac_fn_c_try_link "$LINENO"; then :
5416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5417$as_echo "yes" >&6; }
aaa36002 5418else
8c5ff6dd
KR
5419 LDFLAGS=$late_LDFLAGS
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421$as_echo "no" >&6; }
49ebbd65 5422fi
8c5ff6dd
KR
5423rm -f core conftest.err conftest.$ac_objext \
5424 conftest$ac_exeext conftest.$ac_ext
a4f64981 5425
8c5ff6dd 5426#### Extract some information from the operating system and machine files.
15e12598 5427
8c5ff6dd
KR
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine- and system-dependent files to find out
5429 - which libraries the lib-src programs will want, and
5430 - whether the GNU malloc routines are usable..." >&5
5431$as_echo "$as_me: checking the machine- and system-dependent files to find out
5432 - which libraries the lib-src programs will want, and
5433 - whether the GNU malloc routines are usable..." >&6;}
a4f64981 5434
8c5ff6dd
KR
5435### First figure out CFLAGS (which we use for running the compiler here)
5436### and REAL_CFLAGS (which we use for real compilation).
5437### The two are the same except on a few systems, where they are made
5438### different to work around various lossages. For example,
5439### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5440### as implying static linking.
49ebbd65 5441
8c5ff6dd
KR
5442### If the CFLAGS env var is specified, we use that value
5443### instead of the default.
49ebbd65 5444
8c5ff6dd
KR
5445### It's not important that this name contain the PID; you can't run
5446### two configures in the same directory and have anything work
5447### anyway.
5448tempcname="conftest.c"
cd03c74a 5449
8c5ff6dd
KR
5450echo '
5451#include "'${srcdir}'/src/'${opsysfile}'"
5452#include "'${srcdir}'/src/'${machfile}'"
a5edbe4a 5453
8c5ff6dd 5454configure___ LIBX=-lX11
a4f64981 5455
8c5ff6dd
KR
5456configure___ unexec=UNEXEC
5457
5458#ifdef SYSTEM_MALLOC
5459configure___ system_malloc=yes
5460#else
5461configure___ system_malloc=no
a4f64981 5462#endif
a4f64981 5463
8c5ff6dd
KR
5464#ifdef USE_MMAP_FOR_BUFFERS
5465configure___ use_mmap_for_buffers=yes
5466#else
5467configure___ use_mmap_for_buffers=no
5468#endif
15e12598 5469
8c5ff6dd
KR
5470#ifndef C_OPTIMIZE_SWITCH
5471#ifdef __GNUC__
5472#define C_OPTIMIZE_SWITCH -O2
5473#else
5474#define C_OPTIMIZE_SWITCH -O
5475#endif
5476#endif
a5edbe4a 5477
8c5ff6dd
KR
5478#ifndef C_WARNINGS_SWITCH
5479#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5480#endif
15e12598 5481
8c5ff6dd 5482#ifdef THIS_IS_CONFIGURE
15e12598 5483
8c5ff6dd
KR
5484/* Get the CFLAGS for tests in configure. */
5485#ifdef __GNUC__
5486configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5487#else
5488configure___ CFLAGS='${SPECIFIED_CFLAGS}'
5489#endif
08b47d3d 5490
8c5ff6dd 5491#else /* not THIS_IS_CONFIGURE */
e6df49e4 5492
8c5ff6dd
KR
5493/* Get the CFLAGS for real compilation. */
5494#ifdef __GNUC__
5495configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
5496#else
5497configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}'
5498#endif
a5edbe4a 5499
8c5ff6dd
KR
5500#endif /* not THIS_IS_CONFIGURE */
5501' > ${tempcname}
15e12598 5502
8c5ff6dd 5503LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
15e12598 5504
8c5ff6dd
KR
5505# The value of CPP is a quoted variable reference, so we need to do this
5506# to get its actual value...
5507CPP=`eval "echo $CPP"`
5508eval `${CPP} -Isrc ${tempcname} \
5509 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5510if test "x$SPECIFIED_CFLAGS" = x; then
5511 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5512 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
0c309b80 5513else
8c5ff6dd 5514 REAL_CFLAGS="$CFLAGS"
e6df49e4 5515fi
8c5ff6dd 5516rm ${tempcname}
cd03c74a 5517
49ebbd65 5518
8c5ff6dd
KR
5519LD_SWITCH_SYSTEM=
5520case "$opsys" in
5521 freebsd)
5522 ## Let `ld' find image libs and similar things in /usr/local/lib.
5523 ## The system compiler, GCC, has apparently been modified to not
5524 ## look there, contrary to what a stock GCC would do.
5525 LD_SWITCH_SYSTEM=-L/usr/local/lib
5526 ;;
5527
5528 gnu-linux)
5529 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
5530 test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0"
5531 ;;
5532
5533 netbsd)
5534 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
5535 ;;
5536
5537 openbsd)
5538 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
5539 ## otherwise Emacs dumps core on elf systems.
5540 LD_SWITCH_SYSTEM="-Z"
5541 ;;
a4f64981 5542esac
49ebbd65 5543
49ebbd65 5544
8c5ff6dd 5545ac_link="$ac_link $LD_SWITCH_SYSTEM"
49ebbd65 5546
8c5ff6dd
KR
5547## This is fun. Some settings of LD_SWITCH_SYSTEM reference
5548## LD_SWITCH_X_SITE_AUX, which has not been defined yet. When using
5549## cpp, it was expanded to null. Thus LD_SWITCH_SYSTEM had different
5550## values in configure and the Makefiles. How helpful.
5551## FIXME why not use LD_SWITCH_SYSTEM_TEMACS (or somesuch) instead?
5552case "$opsys" in
5553 gnu-linux)
5554 ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
5555 LD_SWITCH_SYSTEM="$LD_SWITCH_SYSTEM \$(LD_SWITCH_X_SITE_AUX)" ;;
15e12598 5556
8c5ff6dd
KR
5557 netbsd|openbsd)
5558 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
5559 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
a4f64981 5560esac
a4f64981 5561
15e12598 5562
8c5ff6dd
KR
5563C_SWITCH_MACHINE=
5564if test "$machine" = "alpha"; then
5565 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
5566if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
e6df49e4 5567
49ebbd65 5568fi
08b47d3d 5569
8c5ff6dd
KR
5570 if test "$ac_cv_have_decl___ELF__" = "yes"; then
5571 ## With ELF, make sure that all common symbols get allocated to in the
5572 ## data section. Otherwise, the dump of temacs may miss variables in
5573 ## the shared library that have been initialized. For example, with
5574 ## GNU libc, __malloc_initialized would normally be resolved to the
5575 ## shared library's .bss section, which is fatal.
5576 if test "x$GCC" = "xyes"; then
5577 C_SWITCH_MACHINE="-fno-common"
5578 else
5579 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
5580 fi
5581 fi
5582fi
08b47d3d 5583
08b47d3d 5584
7186fb09 5585
8c5ff6dd
KR
5586C_SWITCH_SYSTEM=
5587## Some programs in src produce warnings saying certain subprograms
5588## are too complex and need a MAXMEM value greater than 2000 for
5589## additional optimization. --nils@exp-math.uni-essen.de
5590test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
5591 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
5592## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
5593## It is redundant in glibc2, since we define _GNU_SOURCE.
7186fb09 5594
08b47d3d 5595
08b47d3d 5596
8c5ff6dd
KR
5597LIBS_SYSTEM=
5598case "$opsys" in
5599 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
5600 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
08b47d3d 5601
8c5ff6dd 5602 freebsd) LIBS_SYSTEM="-lutil" ;;
08b47d3d 5603
8c5ff6dd 5604 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
08b47d3d 5605
8c5ff6dd 5606 sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;;
08b47d3d 5607
8c5ff6dd
KR
5608 ## Motif needs -lgen.
5609 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
a4f64981 5610esac
08b47d3d
JD
5611
5612
5613
8c5ff6dd 5614### Make sure subsequent tests use flags consistent with the build flags.
08b47d3d 5615
8c5ff6dd
KR
5616if test x"${OVERRIDE_CPPFLAGS}" != x; then
5617 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5618else
5619 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
a4f64981 5620fi
08b47d3d
JD
5621
5622
5623
8c5ff6dd
KR
5624# Check whether --enable-largefile was given.
5625if test "${enable_largefile+set}" = set; then :
5626 enableval=$enable_largefile;
15e12598 5627fi
08b47d3d 5628
8c5ff6dd
KR
5629if test "$enable_largefile" != no; then
5630
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5632$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5633if test "${ac_cv_sys_largefile_CC+set}" = set; then :
15e12598
VB
5634 $as_echo_n "(cached) " >&6
5635else
8c5ff6dd
KR
5636 ac_cv_sys_largefile_CC=no
5637 if test "$GCC" != yes; then
5638 ac_save_CC=$CC
5639 while :; do
5640 # IRIX 6.2 and later do not support large files by default,
5641 # so use the C compiler's -n32 option if that helps.
5642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5643/* end confdefs.h. */
8c5ff6dd
KR
5644#include <sys/types.h>
5645 /* Check that off_t can represent 2**63 - 1 correctly.
5646 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5647 since some C++ compilers masquerading as C compilers
5648 incorrectly reject 9223372036854775807. */
5649#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5650 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5651 && LARGE_OFF_T % 2147483647 == 1)
5652 ? 1 : -1];
15e12598
VB
5653int
5654main ()
5655{
8c5ff6dd 5656
15e12598
VB
5657 ;
5658 return 0;
5659}
5660_ACEOF
8c5ff6dd
KR
5661 if ac_fn_c_try_compile "$LINENO"; then :
5662 break
15e12598 5663fi
8c5ff6dd
KR
5664rm -f core conftest.err conftest.$ac_objext
5665 CC="$CC -n32"
5666 if ac_fn_c_try_compile "$LINENO"; then :
5667 ac_cv_sys_largefile_CC=' -n32'; break
a4f64981 5668fi
8c5ff6dd
KR
5669rm -f core conftest.err conftest.$ac_objext
5670 break
5671 done
5672 CC=$ac_save_CC
5673 rm -f conftest.$ac_ext
5674 fi
a4f64981 5675fi
8c5ff6dd
KR
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5677$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5678 if test "$ac_cv_sys_largefile_CC" != no; then
5679 CC=$CC$ac_cv_sys_largefile_CC
a4f64981 5680 fi
08b47d3d 5681
8c5ff6dd
KR
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5683$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5684if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
15e12598
VB
5685 $as_echo_n "(cached) " >&6
5686else
8c5ff6dd
KR
5687 while :; do
5688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5689/* end confdefs.h. */
5690#include <sys/types.h>
5691 /* Check that off_t can represent 2**63 - 1 correctly.
5692 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5693 since some C++ compilers masquerading as C compilers
5694 incorrectly reject 9223372036854775807. */
5695#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5696 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5697 && LARGE_OFF_T % 2147483647 == 1)
5698 ? 1 : -1];
5699int
5700main ()
5701{
5702
5703 ;
5704 return 0;
5705}
a4f64981 5706_ACEOF
8c5ff6dd
KR
5707if ac_fn_c_try_compile "$LINENO"; then :
5708 ac_cv_sys_file_offset_bits=no; break
5709fi
5710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5712/* end confdefs.h. */
8c5ff6dd
KR
5713#define _FILE_OFFSET_BITS 64
5714#include <sys/types.h>
5715 /* Check that off_t can represent 2**63 - 1 correctly.
5716 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5717 since some C++ compilers masquerading as C compilers
5718 incorrectly reject 9223372036854775807. */
5719#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5721 && LARGE_OFF_T % 2147483647 == 1)
5722 ? 1 : -1];
15e12598
VB
5723int
5724main ()
5725{
8c5ff6dd 5726
15e12598
VB
5727 ;
5728 return 0;
5729}
5730_ACEOF
8c5ff6dd
KR
5731if ac_fn_c_try_compile "$LINENO"; then :
5732 ac_cv_sys_file_offset_bits=64; break
15e12598 5733fi
8c5ff6dd
KR
5734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735 ac_cv_sys_file_offset_bits=unknown
5736 break
5737done
15e12598 5738fi
8c5ff6dd
KR
5739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5740$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5741case $ac_cv_sys_file_offset_bits in #(
5742 no | unknown) ;;
5743 *)
5744cat >>confdefs.h <<_ACEOF
5745#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
a4f64981 5746_ACEOF
8c5ff6dd
KR
5747;;
5748esac
5749rm -rf conftest*
5750 if test $ac_cv_sys_file_offset_bits = unknown; then
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5752$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5753if test "${ac_cv_sys_large_files+set}" = set; then :
15e12598
VB
5754 $as_echo_n "(cached) " >&6
5755else
8c5ff6dd
KR
5756 while :; do
5757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5758/* end confdefs.h. */
8c5ff6dd
KR
5759#include <sys/types.h>
5760 /* Check that off_t can represent 2**63 - 1 correctly.
5761 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5762 since some C++ compilers masquerading as C compilers
5763 incorrectly reject 9223372036854775807. */
5764#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5765 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5766 && LARGE_OFF_T % 2147483647 == 1)
5767 ? 1 : -1];
15e12598
VB
5768int
5769main ()
5770{
8c5ff6dd 5771
15e12598
VB
5772 ;
5773 return 0;
5774}
5775_ACEOF
8c5ff6dd
KR
5776if ac_fn_c_try_compile "$LINENO"; then :
5777 ac_cv_sys_large_files=no; break
a4f64981 5778fi
8c5ff6dd
KR
5779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5781/* end confdefs.h. */
8c5ff6dd
KR
5782#define _LARGE_FILES 1
5783#include <sys/types.h>
5784 /* Check that off_t can represent 2**63 - 1 correctly.
5785 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5786 since some C++ compilers masquerading as C compilers
5787 incorrectly reject 9223372036854775807. */
5788#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5789 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5790 && LARGE_OFF_T % 2147483647 == 1)
5791 ? 1 : -1];
15e12598
VB
5792int
5793main ()
5794{
8c5ff6dd 5795
15e12598
VB
5796 ;
5797 return 0;
5798}
5799_ACEOF
8c5ff6dd
KR
5800if ac_fn_c_try_compile "$LINENO"; then :
5801 ac_cv_sys_large_files=1; break
5802fi
5803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 ac_cv_sys_large_files=unknown
5805 break
5806done
5807fi
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5809$as_echo "$ac_cv_sys_large_files" >&6; }
5810case $ac_cv_sys_large_files in #(
5811 no | unknown) ;;
5812 *)
5813cat >>confdefs.h <<_ACEOF
5814#define _LARGE_FILES $ac_cv_sys_large_files
5815_ACEOF
5816;;
a4f64981 5817esac
8c5ff6dd
KR
5818rm -rf conftest*
5819 fi
15e12598 5820fi
e6df49e4
GM
5821
5822
5823
8c5ff6dd
KR
5824## If user specified a crt-dir, use that unconditionally.
5825if test "X$CRT_DIR" = "X"; then
e6df49e4 5826
8c5ff6dd
KR
5827 case "$canonical" in
5828 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
5829 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5830 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5831 ## For anything else (eg /usr/lib32), it is up the user to specify
5832 ## the location (bug#5655).
5833 ## Test for crtn.o, not just the directory, because sometimes the
5834 ## directory exists but does not have the relevant files (bug#1287).
5835 ## FIXME better to test for binary compatibility somehow.
5836 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5837 ;;
e6df49e4 5838
8c5ff6dd
KR
5839 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
5840 esac
e6df49e4 5841
8c5ff6dd
KR
5842 case "$opsys" in
5843 hpux10-20) CRT_DIR=/lib ;;
5844 esac
e6df49e4 5845
8c5ff6dd
KR
5846 ## Default is /usr/lib.
5847 test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
e6df49e4 5848
a4f64981 5849else
e6df49e4 5850
8c5ff6dd
KR
5851 ## Some platforms don't use any of these files, so it is not
5852 ## appropriate to put this test outside the if block.
5853 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
5854 as_fn_error "crt*.o not found in specified location." "$LINENO" 5
5855
5856fi
5857
5858
5859
5860LIB_MATH=-lm
5861LIB_STANDARD=
5862START_FILES=
5863
5864case $opsys in
5865 cygwin )
5866 LIB_MATH=
5867 START_FILES='ecrt0.o'
5868 ;;
5869 darwin )
5870 ## Adding -lm confuses the dynamic linker, so omit it.
5871 LIB_MATH=
5872 START_FILES='pre-crt0.o'
5873 ;;
5874 freebsd )
5875 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5876 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5877 ;;
5878 gnu-linux | gnu-kfreebsd )
5879 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
5880 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
5881 ;;
5882 hpux10-20 | hpux11 )
5883 LIB_STANDARD=-lc
5884 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
5885 ;;
5886 netbsd | openbsd )
5887 if test -f $CRT_DIR/crti.o; then
5888 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5889 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5890 else
5891 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
5892 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
5893 fi
5894 ;;
5895esac
5896
5897
5898
5899
5900
5901
5902
5903if test "${with_sound}" != "no"; then
5904 # Sound support for GNU/Linux and the free BSDs.
5905 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5906do :
5907 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5908ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5909eval as_val=\$$as_ac_Header
5910 if test "x$as_val" = x""yes; then :
5911 cat >>confdefs.h <<_ACEOF
5912#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
a4f64981 5913_ACEOF
a4f64981
GM
5914
5915fi
8c5ff6dd
KR
5916
5917done
5918
5919 # Emulation library used on NetBSD.
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5921$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
5922if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
15e12598
VB
5923 $as_echo_n "(cached) " >&6
5924else
8c5ff6dd
KR
5925 ac_check_lib_save_LIBS=$LIBS
5926LIBS="-lossaudio $LIBS"
5927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5928/* end confdefs.h. */
e6df49e4 5929
a4f64981
GM
5930/* Override any GCC internal prototype to avoid an error.
5931 Use char because int might match the return type of a GCC
5932 builtin and then its argument prototype would still apply. */
5933#ifdef __cplusplus
5934extern "C"
5935#endif
8c5ff6dd 5936char _oss_ioctl ();
a4f64981
GM
5937int
5938main ()
5939{
8c5ff6dd 5940return _oss_ioctl ();
a4f64981
GM
5941 ;
5942 return 0;
5943}
5944_ACEOF
8c5ff6dd
KR
5945if ac_fn_c_try_link "$LINENO"; then :
5946 ac_cv_lib_ossaudio__oss_ioctl=yes
a4f64981 5947else
8c5ff6dd 5948 ac_cv_lib_ossaudio__oss_ioctl=no
a4f64981 5949fi
8c5ff6dd
KR
5950rm -f core conftest.err conftest.$ac_objext \
5951 conftest$ac_exeext conftest.$ac_ext
5952LIBS=$ac_check_lib_save_LIBS
5953fi
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
5955$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
5956if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
5957 LIBSOUND=-lossaudio
5958else
5959 LIBSOUND=
a4f64981 5960fi
e6df49e4 5961
a4f64981 5962
e6df49e4 5963
8c5ff6dd
KR
5964 ALSA_REQUIRED=1.0.0
5965 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
a4f64981 5966
8c5ff6dd
KR
5967 succeeded=no
5968
5969 # Extract the first word of "pkg-config", so it can be a program name with args.
5970set dummy pkg-config; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981
GM
5974 $as_echo_n "(cached) " >&6
5975else
8c5ff6dd
KR
5976 case $PKG_CONFIG in
5977 [\\/]* | ?:[\\/]*)
5978 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5979 ;;
5980 *)
5981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984 IFS=$as_save_IFS
5985 test -z "$as_dir" && as_dir=.
5986 for ac_exec_ext in '' $ac_executable_extensions; do
5987 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5988 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990 break 2
5991 fi
5992done
5993 done
5994IFS=$as_save_IFS
5995
5996 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
5997 ;;
5998esac
5999fi
6000PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6001if test -n "$PKG_CONFIG"; then
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6003$as_echo "$PKG_CONFIG" >&6; }
a4f64981 6004else
8c5ff6dd
KR
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010
6011 if test "$PKG_CONFIG" = "no" ; then
6012 HAVE_ALSA=no
6013 else
6014 PKG_CONFIG_MIN_VERSION=0.9.0
6015 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
6017$as_echo_n "checking for $ALSA_MODULES... " >&6; }
6018
6019 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6021$as_echo "yes" >&6; }
6022 succeeded=yes
6023
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
6025$as_echo_n "checking ALSA_CFLAGS... " >&6; }
6026 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
6028$as_echo "$ALSA_CFLAGS" >&6; }
6029
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
6031$as_echo_n "checking ALSA_LIBS... " >&6; }
6032 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
6034$as_echo "$ALSA_LIBS" >&6; }
6035 else
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038 ALSA_CFLAGS=""
6039 ALSA_LIBS=""
6040 ## If we have a custom action on failure, don't print errors, but
6041 ## do set a variable so people can do so.
6042 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6043
6044 fi
6045
6046
6047
6048 else
6049 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6050 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6051 fi
6052 fi
6053
6054 if test $succeeded = yes; then
6055 HAVE_ALSA=yes
6056 else
6057 HAVE_ALSA=no
6058 fi
6059
6060 if test $HAVE_ALSA = yes; then
6061 SAVE_CFLAGS="$CFLAGS"
6062 SAVE_LDFLAGS="$LDFLAGS"
6063 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6064 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 6066/* end confdefs.h. */
8c5ff6dd 6067#include <asoundlib.h>
a4f64981 6068int
8c5ff6dd 6069main ()
a4f64981 6070{
8c5ff6dd
KR
6071snd_lib_error_set_handler (0);
6072 ;
6073 return 0;
a4f64981 6074}
8c5ff6dd
KR
6075_ACEOF
6076if ac_fn_c_try_compile "$LINENO"; then :
6077 emacs_alsa_normal=yes
6078else
6079 emacs_alsa_normal=no
6080fi
6081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6082 if test "$emacs_alsa_normal" != yes; then
6083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6084/* end confdefs.h. */
6085#include <alsa/asoundlib.h>
15e12598
VB
6086int
6087main ()
6088{
8c5ff6dd
KR
6089snd_lib_error_set_handler (0);
6090 ;
6091 return 0;
15e12598
VB
6092}
6093_ACEOF
8c5ff6dd
KR
6094if ac_fn_c_try_compile "$LINENO"; then :
6095 emacs_alsa_subdir=yes
15e12598 6096else
8c5ff6dd 6097 emacs_alsa_subdir=no
15e12598 6098fi
8c5ff6dd
KR
6099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6100 if test "$emacs_alsa_subdir" != yes; then
6101 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
6102 fi
6103 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6104 fi
6105
6106 CFLAGS="$SAVE_CFLAGS"
6107 LDFLAGS="$SAVE_LDFLAGS"
6108 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6109 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6110
6111$as_echo "#define HAVE_ALSA 1" >>confdefs.h
6112
6113 fi
6114
15e12598 6115fi
e6df49e4 6116
8c5ff6dd
KR
6117for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6118 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
6119 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
6120 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
6121 sys/utsname.h pwd.h utmp.h
6122do :
6123 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6124ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6125eval as_val=\$$as_ac_Header
6126 if test "x$as_val" = x""yes; then :
6127 cat >>confdefs.h <<_ACEOF
6128#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6129_ACEOF
a4f64981 6130
15e12598 6131fi
e6df49e4 6132
8c5ff6dd
KR
6133done
6134
6135
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
6137$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
6138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6139/* end confdefs.h. */
6140#include <sys/personality.h>
6141int
6142main ()
6143{
6144personality (PER_LINUX32)
6145 ;
6146 return 0;
6147}
a4f64981 6148_ACEOF
8c5ff6dd
KR
6149if ac_fn_c_try_compile "$LINENO"; then :
6150 emacs_cv_personality_linux32=yes
6151else
6152 emacs_cv_personality_linux32=no
6153fi
6154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
6156$as_echo "$emacs_cv_personality_linux32" >&6; }
e6df49e4 6157
8c5ff6dd
KR
6158if test $emacs_cv_personality_linux32 = yes; then
6159
6160$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
e6df49e4 6161
15e12598 6162fi
e6df49e4 6163
8c5ff6dd
KR
6164for ac_header in term.h
6165do :
6166 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6167if test "x$ac_cv_header_term_h" = x""yes; then :
6168 cat >>confdefs.h <<_ACEOF
6169#define HAVE_TERM_H 1
6170_ACEOF
a4f64981 6171
a4f64981
GM
6172fi
6173
8c5ff6dd 6174done
a4f64981 6175
8c5ff6dd
KR
6176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6177$as_echo_n "checking for ANSI C header files... " >&6; }
6178if test "${ac_cv_header_stdc+set}" = set; then :
a4f64981
GM
6179 $as_echo_n "(cached) " >&6
6180else
8c5ff6dd 6181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 6182/* end confdefs.h. */
8c5ff6dd
KR
6183#include <stdlib.h>
6184#include <stdarg.h>
6185#include <string.h>
6186#include <float.h>
a4f64981 6187
a4f64981
GM
6188int
6189main ()
6190{
8c5ff6dd 6191
a4f64981
GM
6192 ;
6193 return 0;
6194}
6195_ACEOF
8c5ff6dd
KR
6196if ac_fn_c_try_compile "$LINENO"; then :
6197 ac_cv_header_stdc=yes
a4f64981 6198else
8c5ff6dd
KR
6199 ac_cv_header_stdc=no
6200fi
6201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6202
6203if test $ac_cv_header_stdc = yes; then
6204 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6206/* end confdefs.h. */
6207#include <string.h>
6208
6209_ACEOF
6210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6211 $EGREP "memchr" >/dev/null 2>&1; then :
a4f64981 6212
8c5ff6dd
KR
6213else
6214 ac_cv_header_stdc=no
15e12598 6215fi
8c5ff6dd 6216rm -f conftest*
e6df49e4 6217
a4f64981 6218fi
e6df49e4 6219
8c5ff6dd
KR
6220if test $ac_cv_header_stdc = yes; then
6221 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6223/* end confdefs.h. */
6224#include <stdlib.h>
6225
6226_ACEOF
6227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6228 $EGREP "free" >/dev/null 2>&1; then :
e6df49e4 6229
8c5ff6dd
KR
6230else
6231 ac_cv_header_stdc=no
15e12598 6232fi
8c5ff6dd 6233rm -f conftest*
e6df49e4 6234
8c5ff6dd 6235fi
a4f64981 6236
8c5ff6dd
KR
6237if test $ac_cv_header_stdc = yes; then
6238 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6239 if test "$cross_compiling" = yes; then :
6240 :
91e84f96 6241else
8c5ff6dd 6242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 6243/* end confdefs.h. */
8c5ff6dd
KR
6244#include <ctype.h>
6245#include <stdlib.h>
6246#if ((' ' & 0x0FF) == 0x020)
6247# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6248# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6249#else
6250# define ISLOWER(c) \
6251 (('a' <= (c) && (c) <= 'i') \
6252 || ('j' <= (c) && (c) <= 'r') \
6253 || ('s' <= (c) && (c) <= 'z'))
6254# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
a4f64981 6255#endif
8c5ff6dd
KR
6256
6257#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
a4f64981
GM
6258int
6259main ()
6260{
8c5ff6dd
KR
6261 int i;
6262 for (i = 0; i < 256; i++)
6263 if (XOR (islower (i), ISLOWER (i))
6264 || toupper (i) != TOUPPER (i))
6265 return 2;
a4f64981
GM
6266 return 0;
6267}
6268_ACEOF
8c5ff6dd 6269if ac_fn_c_try_run "$LINENO"; then :
a4f64981 6270
8c5ff6dd
KR
6271else
6272 ac_cv_header_stdc=no
6273fi
6274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6275 conftest.$ac_objext conftest.beam conftest.$ac_ext
15e12598 6276fi
e6df49e4 6277
a4f64981 6278fi
15e12598 6279fi
8c5ff6dd
KR
6280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6281$as_echo "$ac_cv_header_stdc" >&6; }
6282if test $ac_cv_header_stdc = yes; then
91e84f96 6283
8c5ff6dd 6284$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a4f64981 6285
a4f64981 6286fi
8c5ff6dd
KR
6287
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
6289$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
6290if test "${ac_cv_header_time+set}" = set; then :
a4f64981
GM
6291 $as_echo_n "(cached) " >&6
6292else
8c5ff6dd 6293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 6294/* end confdefs.h. */
8c5ff6dd
KR
6295#include <sys/types.h>
6296#include <sys/time.h>
6297#include <time.h>
a4f64981 6298
91e84f96
GM
6299int
6300main ()
6301{
8c5ff6dd
KR
6302if ((struct tm *) 0)
6303return 0;
91e84f96
GM
6304 ;
6305 return 0;
6306}
6307_ACEOF
8c5ff6dd
KR
6308if ac_fn_c_try_compile "$LINENO"; then :
6309 ac_cv_header_time=yes
91e84f96 6310else
8c5ff6dd
KR
6311 ac_cv_header_time=no
6312fi
6313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49ebbd65 6314fi
8c5ff6dd
KR
6315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
6316$as_echo "$ac_cv_header_time" >&6; }
6317if test $ac_cv_header_time = yes; then
6318
6319$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
a5edbe4a 6320
a4f64981 6321fi
8c5ff6dd
KR
6322
6323ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6324if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6325 ac_have_decl=1
a4f64981 6326else
8c5ff6dd 6327 ac_have_decl=0
a4f64981 6328fi
e6df49e4 6329
8c5ff6dd
KR
6330cat >>confdefs.h <<_ACEOF
6331#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
a4f64981 6332_ACEOF
15e12598 6333
8c5ff6dd
KR
6334if test $ac_cv_have_decl_sys_siglist != yes; then
6335 # For Tru64, at least:
6336 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6337if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6338 ac_have_decl=1
a4f64981 6339else
8c5ff6dd
KR
6340 ac_have_decl=0
6341fi
6342
6343cat >>confdefs.h <<_ACEOF
6344#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
6345_ACEOF
6346
6347 if test $ac_cv_have_decl___sys_siglist = yes; then
6348
6349$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
6350
6351 fi
6352fi
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
6354$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
6355if test "${ac_cv_header_sys_wait_h+set}" = set; then :
8732a4e9 6356 $as_echo_n "(cached) " >&6
15e12598 6357else
8c5ff6dd
KR
6358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6359/* end confdefs.h. */
6360#include <sys/types.h>
6361#include <sys/wait.h>
6362#ifndef WEXITSTATUS
6363# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6364#endif
6365#ifndef WIFEXITED
6366# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6367#endif
15e12598 6368
8c5ff6dd
KR
6369int
6370main ()
6371{
6372 int s;
6373 wait (&s);
6374 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6375 ;
6376 return 0;
6377}
6378_ACEOF
6379if ac_fn_c_try_compile "$LINENO"; then :
6380 ac_cv_header_sys_wait_h=yes
15e12598 6381else
8c5ff6dd
KR
6382 ac_cv_header_sys_wait_h=no
6383fi
6384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e6df49e4 6385fi
8c5ff6dd
KR
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
6387$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6388if test $ac_cv_header_sys_wait_h = yes; then
a5edbe4a 6389
8c5ff6dd 6390$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
e6df49e4 6391
15e12598
VB
6392fi
6393
8c5ff6dd
KR
6394
6395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
6396$as_echo_n "checking for struct utimbuf... " >&6; }
6397if test "${emacs_cv_struct_utimbuf+set}" = set; then :
15e12598
VB
6398 $as_echo_n "(cached) " >&6
6399else
8c5ff6dd 6400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 6401/* end confdefs.h. */
8c5ff6dd
KR
6402#ifdef TIME_WITH_SYS_TIME
6403#include <sys/time.h>
6404#include <time.h>
a4f64981 6405#else
8c5ff6dd
KR
6406#ifdef HAVE_SYS_TIME_H
6407#include <sys/time.h>
6408#else
6409#include <time.h>
a4f64981 6410#endif
a4f64981 6411#endif
8c5ff6dd
KR
6412#ifdef HAVE_UTIME_H
6413#include <utime.h>
a4f64981 6414#endif
15e12598
VB
6415int
6416main ()
6417{
8c5ff6dd 6418static struct utimbuf x; x.actime = x.modtime;
15e12598
VB
6419 ;
6420 return 0;
6421}
e6df49e4 6422_ACEOF
8c5ff6dd
KR
6423if ac_fn_c_try_compile "$LINENO"; then :
6424 emacs_cv_struct_utimbuf=yes
a5edbe4a 6425else
8c5ff6dd 6426 emacs_cv_struct_utimbuf=no
15e12598 6427fi
8c5ff6dd 6428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15e12598 6429fi
8c5ff6dd
KR
6430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
6431$as_echo "$emacs_cv_struct_utimbuf" >&6; }
6432if test $emacs_cv_struct_utimbuf = yes; then
a4f64981 6433
8c5ff6dd 6434$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
e6df49e4 6435
8c5ff6dd 6436fi
e6df49e4 6437
8c5ff6dd
KR
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6439$as_echo_n "checking return type of signal handlers... " >&6; }
6440if test "${ac_cv_type_signal+set}" = set; then :
a4f64981 6441 $as_echo_n "(cached) " >&6
a4f64981 6442else
8c5ff6dd 6443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 6444/* end confdefs.h. */
8c5ff6dd
KR
6445#include <sys/types.h>
6446#include <signal.h>
6447
6448int
6449main ()
6450{
6451return *(signal (0, 0)) (0) == 1;
6452 ;
6453 return 0;
6454}
a4f64981 6455_ACEOF
8c5ff6dd
KR
6456if ac_fn_c_try_compile "$LINENO"; then :
6457 ac_cv_type_signal=int
a4f64981 6458else
8c5ff6dd 6459 ac_cv_type_signal=void
a5edbe4a 6460fi
a4f64981 6461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd
KR
6462fi
6463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6464$as_echo "$ac_cv_type_signal" >&6; }
a4f64981 6465
8c5ff6dd
KR
6466cat >>confdefs.h <<_ACEOF
6467#define RETSIGTYPE $ac_cv_type_signal
a4f64981 6468_ACEOF
8c5ff6dd
KR
6469
6470
6471
6472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
6473$as_echo_n "checking for speed_t... " >&6; }
6474if test "${emacs_cv_speed_t+set}" = set; then :
6475 $as_echo_n "(cached) " >&6
6476else
6477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 6478/* end confdefs.h. */
8c5ff6dd
KR
6479#include <termios.h>
6480int
6481main ()
6482{
6483speed_t x = 1;
6484 ;
6485 return 0;
6486}
a4f64981 6487_ACEOF
8c5ff6dd
KR
6488if ac_fn_c_try_compile "$LINENO"; then :
6489 emacs_cv_speed_t=yes
a4f64981 6490else
8c5ff6dd 6491 emacs_cv_speed_t=no
a4f64981 6492fi
8c5ff6dd
KR
6493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6494fi
6495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
6496$as_echo "$emacs_cv_speed_t" >&6; }
6497if test $emacs_cv_speed_t = yes; then
15e12598 6498
8c5ff6dd 6499$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
15e12598 6500
8c5ff6dd 6501fi
15e12598 6502
8c5ff6dd
KR
6503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
6504$as_echo_n "checking for struct timeval... " >&6; }
6505if test "${emacs_cv_struct_timeval+set}" = set; then :
a4f64981
GM
6506 $as_echo_n "(cached) " >&6
6507else
8c5ff6dd
KR
6508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6509/* end confdefs.h. */
6510#ifdef TIME_WITH_SYS_TIME
6511#include <sys/time.h>
6512#include <time.h>
6513#else
6514#ifdef HAVE_SYS_TIME_H
6515#include <sys/time.h>
6516#else
6517#include <time.h>
6518#endif
6519#endif
6520int
6521main ()
6522{
6523static struct timeval x; x.tv_sec = x.tv_usec;
6524 ;
6525 return 0;
6526}
e6df49e4 6527_ACEOF
8c5ff6dd
KR
6528if ac_fn_c_try_compile "$LINENO"; then :
6529 emacs_cv_struct_timeval=yes
6530else
6531 emacs_cv_struct_timeval=no
e6df49e4 6532fi
8c5ff6dd
KR
6533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6534fi
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
6536$as_echo "$emacs_cv_struct_timeval" >&6; }
6537HAVE_TIMEVAL=$emacs_cv_struct_timeval
6538if test $emacs_cv_struct_timeval = yes; then
e6df49e4 6539
8c5ff6dd 6540$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
4e569696 6541
8c5ff6dd 6542fi
4e569696 6543
8c5ff6dd
KR
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
6545$as_echo_n "checking for struct exception... " >&6; }
6546if test "${emacs_cv_struct_exception+set}" = set; then :
6547 $as_echo_n "(cached) " >&6
6548else
6549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6550/* end confdefs.h. */
6551#include <math.h>
6552int
6553main ()
6554{
6555static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
6556 ;
6557 return 0;
6558}
4e569696 6559_ACEOF
8c5ff6dd
KR
6560if ac_fn_c_try_compile "$LINENO"; then :
6561 emacs_cv_struct_exception=yes
6562else
6563 emacs_cv_struct_exception=no
6564fi
6565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6566fi
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
6568$as_echo "$emacs_cv_struct_exception" >&6; }
6569HAVE_EXCEPTION=$emacs_cv_struct_exception
6570if test $emacs_cv_struct_exception != yes; then
15e12598 6571
8c5ff6dd 6572$as_echo "#define NO_MATHERR 1" >>confdefs.h
15e12598 6573
8c5ff6dd 6574fi
15e12598 6575
8c5ff6dd
KR
6576for ac_header in sys/socket.h
6577do :
6578 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6579if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
6580 cat >>confdefs.h <<_ACEOF
6581#define HAVE_SYS_SOCKET_H 1
6582_ACEOF
15e12598 6583
8c5ff6dd 6584fi
e6df49e4 6585
8c5ff6dd 6586done
e6df49e4 6587
8c5ff6dd
KR
6588for ac_header in net/if.h
6589do :
6590 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
6591#if HAVE_SYS_SOCKET_H
6592#include <sys/socket.h>
6593#endif
6594"
6595if test "x$ac_cv_header_net_if_h" = x""yes; then :
6596 cat >>confdefs.h <<_ACEOF
6597#define HAVE_NET_IF_H 1
6598_ACEOF
e6df49e4 6599
8c5ff6dd 6600fi
e6df49e4 6601
8c5ff6dd 6602done
15e12598 6603
15e12598 6604
8c5ff6dd
KR
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
6606$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
6607if test "${ac_cv_struct_tm+set}" = set; then :
6608 $as_echo_n "(cached) " >&6
6609else
6610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6611/* end confdefs.h. */
6612#include <sys/types.h>
6613#include <time.h>
15e12598 6614
8c5ff6dd
KR
6615int
6616main ()
6617{
6618struct tm tm;
6619 int *p = &tm.tm_sec;
6620 return !p;
6621 ;
6622 return 0;
6623}
6624_ACEOF
6625if ac_fn_c_try_compile "$LINENO"; then :
6626 ac_cv_struct_tm=time.h
6627else
6628 ac_cv_struct_tm=sys/time.h
6629fi
6630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6631fi
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
6633$as_echo "$ac_cv_struct_tm" >&6; }
6634if test $ac_cv_struct_tm = sys/time.h; then
91e84f96 6635
8c5ff6dd 6636$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
08b47d3d 6637
8c5ff6dd 6638fi
08b47d3d 6639
8c5ff6dd
KR
6640ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
6641#include <$ac_cv_struct_tm>
08b47d3d 6642
8c5ff6dd
KR
6643"
6644if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
08b47d3d 6645
8c5ff6dd
KR
6646cat >>confdefs.h <<_ACEOF
6647#define HAVE_STRUCT_TM_TM_ZONE 1
6648_ACEOF
08b47d3d 6649
08b47d3d 6650
8c5ff6dd 6651fi
08b47d3d 6652
8c5ff6dd 6653if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
a4f64981 6654
8c5ff6dd 6655$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
a4f64981 6656
8c5ff6dd
KR
6657else
6658 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6659"
6660if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6661 ac_have_decl=1
6662else
6663 ac_have_decl=0
6664fi
a4f64981 6665
8c5ff6dd
KR
6666cat >>confdefs.h <<_ACEOF
6667#define HAVE_DECL_TZNAME $ac_have_decl
6668_ACEOF
a4f64981 6669
8c5ff6dd
KR
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6671$as_echo_n "checking for tzname... " >&6; }
6672if test "${ac_cv_var_tzname+set}" = set; then :
6673 $as_echo_n "(cached) " >&6
6674else
6675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6676/* end confdefs.h. */
6677#include <time.h>
6678#if !HAVE_DECL_TZNAME
6679extern char *tzname[];
6680#endif
a4f64981 6681
8c5ff6dd
KR
6682int
6683main ()
6684{
6685return tzname[0][0];
6686 ;
6687 return 0;
6688}
6689_ACEOF
6690if ac_fn_c_try_link "$LINENO"; then :
6691 ac_cv_var_tzname=yes
6692else
6693 ac_cv_var_tzname=no
6694fi
6695rm -f core conftest.err conftest.$ac_objext \
6696 conftest$ac_exeext conftest.$ac_ext
6697fi
6698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6699$as_echo "$ac_cv_var_tzname" >&6; }
6700 if test $ac_cv_var_tzname = yes; then
a4f64981 6701
8c5ff6dd 6702$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
a4f64981 6703
8c5ff6dd
KR
6704 fi
6705fi
a4f64981 6706
8c5ff6dd
KR
6707ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6708"
6709if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
a4f64981 6710
8c5ff6dd 6711$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
a4f64981 6712
8c5ff6dd 6713fi
a4f64981 6714
8c5ff6dd
KR
6715ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6716#if HAVE_SYS_SOCKET_H
6717#include <sys/socket.h>
6718#endif
6719#if HAVE_NET_IF_H
6720#include <net/if.h>
6721#endif
6722"
6723if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
a4f64981 6724
8c5ff6dd
KR
6725cat >>confdefs.h <<_ACEOF
6726#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
6727_ACEOF
a4f64981
GM
6728
6729
8c5ff6dd
KR
6730fi
6731ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6732#if HAVE_SYS_SOCKET_H
6733#include <sys/socket.h>
6734#endif
6735#if HAVE_NET_IF_H
6736#include <net/if.h>
6737#endif
6738"
6739if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
a4f64981 6740
8c5ff6dd
KR
6741cat >>confdefs.h <<_ACEOF
6742#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
6743_ACEOF
a4f64981
GM
6744
6745
8c5ff6dd
KR
6746fi
6747ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6748#if HAVE_SYS_SOCKET_H
6749#include <sys/socket.h>
6750#endif
6751#if HAVE_NET_IF_H
6752#include <net/if.h>
6753#endif
6754"
6755if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
a4f64981 6756
8c5ff6dd
KR
6757cat >>confdefs.h <<_ACEOF
6758#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
6759_ACEOF
a4f64981
GM
6760
6761
8c5ff6dd
KR
6762fi
6763ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6764#if HAVE_SYS_SOCKET_H
6765#include <sys/socket.h>
6766#endif
6767#if HAVE_NET_IF_H
6768#include <net/if.h>
6769#endif
6770"
6771if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
a4f64981 6772
8c5ff6dd
KR
6773cat >>confdefs.h <<_ACEOF
6774#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
6775_ACEOF
a4f64981
GM
6776
6777
8c5ff6dd
KR
6778fi
6779ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6780#if HAVE_SYS_SOCKET_H
6781#include <sys/socket.h>
6782#endif
6783#if HAVE_NET_IF_H
6784#include <net/if.h>
6785#endif
6786"
6787if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
a4f64981 6788
8c5ff6dd
KR
6789cat >>confdefs.h <<_ACEOF
6790#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
6791_ACEOF
a4f64981
GM
6792
6793
8c5ff6dd 6794fi
a4f64981
GM
6795
6796
6797
8c5ff6dd
KR
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6799$as_echo_n "checking for function prototypes... " >&6; }
6800if test "$ac_cv_prog_cc_c89" != no; then
6801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6802$as_echo "yes" >&6; }
a4f64981 6803
8c5ff6dd 6804$as_echo "#define PROTOTYPES 1" >>confdefs.h
a4f64981
GM
6805
6806
8c5ff6dd 6807$as_echo "#define __PROTOTYPES 1" >>confdefs.h
a4f64981 6808
8c5ff6dd
KR
6809else
6810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6811$as_echo "no" >&6; }
6812fi
a4f64981 6813
8c5ff6dd
KR
6814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6815$as_echo_n "checking for working volatile... " >&6; }
6816if test "${ac_cv_c_volatile+set}" = set; then :
6817 $as_echo_n "(cached) " >&6
6818else
6819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6820/* end confdefs.h. */
a4f64981 6821
8c5ff6dd
KR
6822int
6823main ()
6824{
a4f64981 6825
8c5ff6dd
KR
6826volatile int x;
6827int * volatile y = (int *) 0;
6828return !x && !y;
6829 ;
6830 return 0;
6831}
6832_ACEOF
6833if ac_fn_c_try_compile "$LINENO"; then :
6834 ac_cv_c_volatile=yes
6835else
6836 ac_cv_c_volatile=no
6837fi
6838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6839fi
6840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6841$as_echo "$ac_cv_c_volatile" >&6; }
6842if test $ac_cv_c_volatile = no; then
a4f64981 6843
8c5ff6dd 6844$as_echo "#define volatile /**/" >>confdefs.h
a4f64981 6845
8c5ff6dd 6846fi
a4f64981 6847
8c5ff6dd
KR
6848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6849$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6850if test "${ac_cv_c_const+set}" = set; then :
e6df49e4
GM
6851 $as_echo_n "(cached) " >&6
6852else
8c5ff6dd 6853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 6854/* end confdefs.h. */
a4f64981 6855
8c5ff6dd
KR
6856int
6857main ()
6858{
6859/* FIXME: Include the comments suggested by Paul. */
6860#ifndef __cplusplus
6861 /* Ultrix mips cc rejects this. */
6862 typedef int charset[2];
6863 const charset cs;
6864 /* SunOS 4.1.1 cc rejects this. */
6865 char const *const *pcpcc;
6866 char **ppc;
6867 /* NEC SVR4.0.2 mips cc rejects this. */
6868 struct point {int x, y;};
6869 static struct point const zero = {0,0};
6870 /* AIX XL C 1.02.0.0 rejects this.
6871 It does not let you subtract one const X* pointer from another in
6872 an arm of an if-expression whose if-part is not a constant
6873 expression */
6874 const char *g = "string";
6875 pcpcc = &g + (g ? g-g : 0);
6876 /* HPUX 7.0 cc rejects these. */
6877 ++pcpcc;
6878 ppc = (char**) pcpcc;
6879 pcpcc = (char const *const *) ppc;
6880 { /* SCO 3.2v4 cc rejects this. */
6881 char *t;
6882 char const *s = 0 ? (char *) 0 : (char const *) 0;
a4f64981 6883
8c5ff6dd
KR
6884 *t++ = 0;
6885 if (s) return 0;
6886 }
6887 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6888 int x[] = {25, 17};
6889 const int *foo = &x[0];
6890 ++foo;
6891 }
6892 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6893 typedef const int *iptr;
6894 iptr p = 0;
6895 ++p;
6896 }
6897 { /* AIX XL C 1.02.0.0 rejects this saying
6898 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6899 struct s { int j; const int *ap[3]; };
6900 struct s *b; b->j = 5;
6901 }
6902 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6903 const int foo = 10;
6904 if (!foo) return 0;
6905 }
6906 return !cs[0] && !zero.x;
a4f64981
GM
6907#endif
6908
8c5ff6dd
KR
6909 ;
6910 return 0;
6911}
6912_ACEOF
6913if ac_fn_c_try_compile "$LINENO"; then :
6914 ac_cv_c_const=yes
6915else
6916 ac_cv_c_const=no
6917fi
6918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6919fi
6920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6921$as_echo "$ac_cv_c_const" >&6; }
6922if test $ac_cv_c_const = no; then
6923
6924$as_echo "#define const /**/" >>confdefs.h
91e84f96 6925
8c5ff6dd
KR
6926fi
6927
6928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
6929$as_echo_n "checking for void * support... " >&6; }
6930if test "${emacs_cv_void_star+set}" = set; then :
6931 $as_echo_n "(cached) " >&6
6932else
6933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6934/* end confdefs.h. */
a4f64981 6935
49ebbd65
DN
6936int
6937main ()
6938{
8c5ff6dd 6939void * foo;
49ebbd65
DN
6940 ;
6941 return 0;
6942}
6943_ACEOF
8c5ff6dd
KR
6944if ac_fn_c_try_compile "$LINENO"; then :
6945 emacs_cv_void_star=yes
49ebbd65 6946else
8c5ff6dd 6947 emacs_cv_void_star=no
a5edbe4a 6948fi
8c5ff6dd 6949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e6df49e4 6950fi
8c5ff6dd
KR
6951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
6952$as_echo "$emacs_cv_void_star" >&6; }
6953if test $emacs_cv_void_star = yes; then
6954 $as_echo "#define POINTER_TYPE void" >>confdefs.h
6955
6956else
6957 $as_echo "#define POINTER_TYPE char" >>confdefs.h
91e84f96 6958
08b47d3d 6959fi
91e84f96 6960
91e84f96 6961
91e84f96 6962
8c5ff6dd
KR
6963
6964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6965$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6966set x ${MAKE-make}
6967ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6968if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
15e12598 6969 $as_echo_n "(cached) " >&6
15e12598 6970else
8c5ff6dd
KR
6971 cat >conftest.make <<\_ACEOF
6972SHELL = /bin/sh
6973all:
6974 @echo '@@@%%%=$(MAKE)=@@@%%%'
15e12598 6975_ACEOF
8c5ff6dd
KR
6976# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6977case `${MAKE-make} -f conftest.make 2>/dev/null` in
6978 *@@@%%%=?*=@@@%%%*)
6979 eval ac_cv_prog_make_${ac_make}_set=yes;;
6980 *)
6981 eval ac_cv_prog_make_${ac_make}_set=no;;
a4f64981 6982esac
8c5ff6dd
KR
6983rm -f conftest.make
6984fi
6985if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6987$as_echo "yes" >&6; }
6988 SET_MAKE=
a4f64981 6989else
8c5ff6dd
KR
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6991$as_echo "no" >&6; }
6992 SET_MAKE="MAKE=${MAKE-make}"
a4f64981
GM
6993fi
6994
a4f64981 6995
8c5ff6dd
KR
6996if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
6998$as_echo_n "checking whether we are using GNU Make... " >&6; }
6999 HAVE_GNU_MAKE=no
7000 testval=`make --version 2>/dev/null | grep 'GNU Make'`
7001 if test "x$testval" != x; then
7002 HAVE_GNU_MAKE=yes
7003 else
7004 ac_enable_autodepend=no
7005 fi
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
7007$as_echo "$HAVE_GNU_MAKE" >&6; }
7008 if test $HAVE_GNU_MAKE = yes; then
7009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
7010$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
7011 SAVE_CFLAGS="$CFLAGS"
7012 CFLAGS="$CFLAGS -MMD -MF deps.d"
7013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 7014/* end confdefs.h. */
a5edbe4a 7015
8c5ff6dd
KR
7016int
7017main ()
7018{
91e84f96 7019
8c5ff6dd
KR
7020 ;
7021 return 0;
7022}
7023_ACEOF
7024if ac_fn_c_try_compile "$LINENO"; then :
91e84f96 7025
a4f64981 7026else
8c5ff6dd 7027 ac_enable_autodepend=no
a4f64981 7028fi
8c5ff6dd
KR
7029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7030 CFLAGS="$SAVE_CFLAGS"
7031 test -f deps.d || ac_enable_autodepend=no
7032 rm -rf deps.d
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
7034$as_echo "$ac_enable_autodepend" >&6; }
7035 fi
7036 if test $ac_enable_autodepend = yes; then
a4f64981 7037
8c5ff6dd 7038$as_echo "#define AUTO_DEPEND 1" >>confdefs.h
91e84f96 7039
8c5ff6dd 7040 fi
15e12598 7041fi
a4f64981 7042
8c5ff6dd
KR
7043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
7044$as_echo_n "checking for long file names... " >&6; }
7045if test "${ac_cv_sys_long_file_names+set}" = set; then :
7046 $as_echo_n "(cached) " >&6
7047else
7048 ac_cv_sys_long_file_names=yes
7049# Test for long file names in all the places we know might matter:
7050# . the current directory, where building will happen
7051# $prefix/lib where we will be installing things
7052# $exec_prefix/lib likewise
7053# $TMPDIR if set, where it might want to write temporary files
7054# /tmp where it might want to write temporary files
7055# /var/tmp likewise
7056# /usr/tmp likewise
7057for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
7058 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
7059 # in the usual case where exec_prefix is '${prefix}'.
7060 case $ac_dir in #(
7061 . | /* | ?:[\\/]*) ;; #(
7062 *) continue;;
7063 esac
7064 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
7065 ac_xdir=$ac_dir/cf$$
7066 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
7067 ac_tf1=$ac_xdir/conftest9012345
7068 ac_tf2=$ac_xdir/conftest9012346
7069 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
7070 ac_cv_sys_long_file_names=no
7071 rm -f -r "$ac_xdir" 2>/dev/null
7072 test $ac_cv_sys_long_file_names = no && break
15e12598 7073done
8c5ff6dd
KR
7074fi
7075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
7076$as_echo "$ac_cv_sys_long_file_names" >&6; }
7077if test $ac_cv_sys_long_file_names = yes; then
91e84f96 7078
8c5ff6dd 7079$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
91e84f96 7080
8c5ff6dd 7081fi
a4f64981
GM
7082
7083
8c5ff6dd 7084#### Choose a window system.
a4f64981 7085
8c5ff6dd
KR
7086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
7087$as_echo_n "checking for X... " >&6; }
a4f64981 7088
a4f64981 7089
8c5ff6dd
KR
7090# Check whether --with-x was given.
7091if test "${with_x+set}" = set; then :
7092 withval=$with_x;
15e12598
VB
7093fi
7094
8c5ff6dd
KR
7095# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7096if test "x$with_x" = xno; then
7097 # The user explicitly disabled X.
7098 have_x=disabled
a4f64981 7099else
8c5ff6dd
KR
7100 case $x_includes,$x_libraries in #(
7101 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
7102 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
15e12598
VB
7103 $as_echo_n "(cached) " >&6
7104else
8c5ff6dd
KR
7105 # One or both of the vars are not set, and there is no cached value.
7106ac_x_includes=no ac_x_libraries=no
7107rm -f -r conftest.dir
7108if mkdir conftest.dir; then
7109 cd conftest.dir
7110 cat >Imakefile <<'_ACEOF'
7111incroot:
7112 @echo incroot='${INCROOT}'
7113usrlibdir:
7114 @echo usrlibdir='${USRLIBDIR}'
7115libdir:
7116 @echo libdir='${LIBDIR}'
a4f64981 7117_ACEOF
8c5ff6dd
KR
7118 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
7119 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7120 for ac_var in incroot usrlibdir libdir; do
7121 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7122 done
7123 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7124 for ac_extension in a so sl dylib la dll; do
7125 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7126 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7127 ac_im_usrlibdir=$ac_im_libdir; break
7128 fi
7129 done
7130 # Screen out bogus values from the imake configuration. They are
7131 # bogus both because they are the default anyway, and because
7132 # using them would break gcc on systems where it needs fixed includes.
7133 case $ac_im_incroot in
7134 /usr/include) ac_x_includes= ;;
7135 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7136 esac
7137 case $ac_im_usrlibdir in
7138 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
7139 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7140 esac
7141 fi
7142 cd ..
7143 rm -f -r conftest.dir
15e12598 7144fi
8732a4e9 7145
8c5ff6dd
KR
7146# Standard set of common directories for X headers.
7147# Check X11 before X11Rn because it is often a symlink to the current release.
7148ac_x_header_dirs='
7149/usr/X11/include
7150/usr/X11R7/include
7151/usr/X11R6/include
7152/usr/X11R5/include
7153/usr/X11R4/include
9452ded1 7154
8c5ff6dd
KR
7155/usr/include/X11
7156/usr/include/X11R7
7157/usr/include/X11R6
7158/usr/include/X11R5
7159/usr/include/X11R4
9452ded1 7160
8c5ff6dd
KR
7161/usr/local/X11/include
7162/usr/local/X11R7/include
7163/usr/local/X11R6/include
7164/usr/local/X11R5/include
7165/usr/local/X11R4/include
9452ded1 7166
8c5ff6dd
KR
7167/usr/local/include/X11
7168/usr/local/include/X11R7
7169/usr/local/include/X11R6
7170/usr/local/include/X11R5
7171/usr/local/include/X11R4
91e84f96 7172
8c5ff6dd
KR
7173/usr/X386/include
7174/usr/x386/include
7175/usr/XFree86/include/X11
0c309b80 7176
8c5ff6dd
KR
7177/usr/include
7178/usr/local/include
7179/usr/unsupported/include
7180/usr/athena/include
7181/usr/local/x11r5/include
7182/usr/lpp/Xamples/include
cd03c74a 7183
8c5ff6dd
KR
7184/usr/openwin/include
7185/usr/openwin/share/include'
cd03c74a 7186
8c5ff6dd
KR
7187if test "$ac_x_includes" = no; then
7188 # Guess where to find include files, by looking for Xlib.h.
7189 # First, try using that file with no special directory specified.
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 7191/* end confdefs.h. */
8c5ff6dd
KR
7192#include <X11/Xlib.h>
7193_ACEOF
7194if ac_fn_c_try_cpp "$LINENO"; then :
7195 # We can compile using X headers with no special include directory.
7196ac_x_includes=
7197else
7198 for ac_dir in $ac_x_header_dirs; do
7199 if test -r "$ac_dir/X11/Xlib.h"; then
7200 ac_x_includes=$ac_dir
7201 break
7202 fi
7203done
7204fi
7205rm -f conftest.err conftest.$ac_ext
7206fi # $ac_x_includes = no
49ebbd65 7207
8c5ff6dd
KR
7208if test "$ac_x_libraries" = no; then
7209 # Check for the libraries.
7210 # See if we find them without any special options.
7211 # Don't add to $LIBS permanently.
7212 ac_save_LIBS=$LIBS
7213 LIBS="-lX11 $LIBS"
7214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7215/* end confdefs.h. */
7216#include <X11/Xlib.h>
a4f64981
GM
7217int
7218main ()
7219{
8c5ff6dd 7220XrmInitialize ()
a4f64981
GM
7221 ;
7222 return 0;
7223}
7224_ACEOF
8c5ff6dd
KR
7225if ac_fn_c_try_link "$LINENO"; then :
7226 LIBS=$ac_save_LIBS
7227# We can link X programs with no special library path.
7228ac_x_libraries=
a4f64981 7229else
8c5ff6dd
KR
7230 LIBS=$ac_save_LIBS
7231for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7232do
7233 # Don't even attempt the hair of trying to link an X program!
7234 for ac_extension in a so sl dylib la dll; do
7235 if test -r "$ac_dir/libX11.$ac_extension"; then
7236 ac_x_libraries=$ac_dir
7237 break 2
7238 fi
7239 done
7240done
a4f64981 7241fi
8c5ff6dd
KR
7242rm -f core conftest.err conftest.$ac_objext \
7243 conftest$ac_exeext conftest.$ac_ext
7244fi # $ac_x_libraries = no
aaa36002 7245
8c5ff6dd
KR
7246case $ac_x_includes,$ac_x_libraries in #(
7247 no,* | *,no | *\'*)
7248 # Didn't find X, or a directory has "'" in its name.
7249 ac_cv_have_x="have_x=no";; #(
7250 *)
7251 # Record where we found X for the cache.
7252 ac_cv_have_x="have_x=yes\
7253 ac_x_includes='$ac_x_includes'\
7254 ac_x_libraries='$ac_x_libraries'"
7255esac
15e12598 7256fi
8c5ff6dd
KR
7257;; #(
7258 *) have_x=yes;;
7259 esac
7260 eval "$ac_cv_have_x"
7261fi # $with_x != no
aaa36002 7262
8c5ff6dd
KR
7263if test "$have_x" != yes; then
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7265$as_echo "$have_x" >&6; }
7266 no_x=yes
7267else
7268 # If each of the values was on the command line, it overrides each guess.
7269 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7270 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7271 # Update the cache value to reflect the command line values.
7272 ac_cv_have_x="have_x=yes\
7273 ac_x_includes='$x_includes'\
7274 ac_x_libraries='$x_libraries'"
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7276$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
a4f64981 7277fi
cd03c74a 7278
8c5ff6dd
KR
7279if test "$no_x" = yes; then
7280 window_system=none
7281else
7282 window_system=x11
7283fi
49ebbd65 7284
8c5ff6dd
KR
7285## Workaround for bug in autoconf <= 2.62.
7286## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7287## No need to do anything special for these standard directories.
7288if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
49ebbd65 7289
8c5ff6dd 7290 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
aaa36002 7291
8c5ff6dd 7292fi
aaa36002 7293
8c5ff6dd
KR
7294LD_SWITCH_X_SITE_AUX=
7295LD_SWITCH_X_SITE_AUX_RPATH=
7296if test "${x_libraries}" != NONE; then
7297 if test -n "${x_libraries}"; then
7298 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7299 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7300 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
7301 fi
7302 x_default_search_path=""
7303 x_search_path=${x_libraries}
7304 if test -z "${x_search_path}"; then
7305 x_search_path=/usr/lib
7306 fi
7307 for x_library in `echo ${x_search_path}: | \
7308 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7309 x_search_path="\
7310${x_library}/X11/%L/%T/%N%C%S:\
7311${x_library}/X11/%l/%T/%N%C%S:\
7312${x_library}/X11/%T/%N%C%S:\
7313${x_library}/X11/%L/%T/%N%S:\
7314${x_library}/X11/%l/%T/%N%S:\
7315${x_library}/X11/%T/%N%S"
7316 if test x"${x_default_search_path}" = x; then
7317 x_default_search_path=${x_search_path}
7318 else
7319 x_default_search_path="${x_search_path}:${x_default_search_path}"
7320 fi
7321 done
7322fi
cd03c74a 7323
49ebbd65 7324
7186fb09 7325
8c5ff6dd
KR
7326if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7327 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
7328fi
7186fb09 7329
8c5ff6dd
KR
7330if test x"${x_includes}" = x; then
7331 bitmapdir=/usr/include/X11/bitmaps
a4f64981 7332else
8c5ff6dd
KR
7333 # accumulate include directories that have X11 bitmap subdirectories
7334 bmd_acc="dummyval"
7335 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7336 if test -d "${bmd}/X11/bitmaps"; then
7337 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7338 fi
7339 if test -d "${bmd}/bitmaps"; then
7340 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7341 fi
7342 done
7343 if test ${bmd_acc} != "dummyval"; then
7344 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7345 fi
7346fi
7347
7348HAVE_NS=no
7349NS_IMPL_COCOA=no
7350NS_IMPL_GNUSTEP=no
7351NS_IMPL_GNUSTEP_INC=
7352tmp_CPPFLAGS="$CPPFLAGS"
7353tmp_CFLAGS="$CFLAGS"
7354CPPFLAGS="$CPPFLAGS -x objective-c"
7355CFLAGS="$CFLAGS -x objective-c"
7356if test "${with_ns}" != no; then
7357 if test "${opsys}" = darwin; then
7358 NS_IMPL_COCOA=yes
7359 ns_appdir=`pwd`/nextstep/Emacs.app
7360 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
7361 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
7362 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7363 elif test -f $GNUSTEP_CONFIG_FILE; then
7364 NS_IMPL_GNUSTEP=yes
7365 ns_appdir=`pwd`/nextstep/Emacs.app
7366 ns_appbindir=`pwd`/nextstep/Emacs.app
7367 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
7368 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7369 GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
7370 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7371 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7372 ## Pull in stuff from GNUstep-make.
7373 NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu
7374GUI_LIB=gnu
7375include $GNUSTEP_MAKEFILES/Additional/base.make
7376include $GNUSTEP_MAKEFILES/Additional/gui.make
7377shared=no
7378"
7379 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7380 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7381 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7382 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
7383 LIB_STANDARD=
7384 fi
7385 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7386if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7387 HAVE_NS=yes
a4f64981 7388else
8c5ff6dd
KR
7389 as_fn_error "\`--with-ns' was specified, but the include
7390 files are missing or cannot be compiled." "$LINENO" 5
7391fi
15e12598 7392
15e12598 7393
8c5ff6dd
KR
7394 NS_HAVE_NSINTEGER=yes
7395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7396/* end confdefs.h. */
7397#include <Foundation/NSObjCRuntime.h>
7398int
7399main ()
a4f64981 7400{
8c5ff6dd
KR
7401NSInteger i;
7402 ;
7403 return 0;
a4f64981 7404}
8c5ff6dd
KR
7405_ACEOF
7406if ac_fn_c_try_compile "$LINENO"; then :
7407 ns_have_nsinteger=yes
7408else
7409 ns_have_nsinteger=no
7410fi
7411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7412 if test $ns_have_nsinteger = no; then
7413 NS_HAVE_NSINTEGER=no
7414 fi
7415fi
9452ded1 7416
aaa36002 7417
8c5ff6dd
KR
7418NS_OBJ=
7419NS_SUPPORT=
7420if test "${HAVE_NS}" = yes; then
7421 window_system=nextstep
7422 with_xft=no
7423 # set up packaging dirs
7424 exec_prefix=${ns_appbindir}
7425 libexecdir=${ns_appbindir}/libexec
7426 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7427 prefix=${ns_appresdir}
7428 fi
7429 NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
7430 NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc"
7431fi
7432CFLAGS="$tmp_CFLAGS"
7433CPPFLAGS="$tmp_CPPFLAGS"
15e12598 7434
15e12598 7435
15e12598 7436
a4f64981 7437
8c5ff6dd
KR
7438case "${window_system}" in
7439 x11 )
7440 HAVE_X_WINDOWS=yes
7441 HAVE_X11=yes
7442 case "${with_x_toolkit}" in
7443 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7444 motif ) USE_X_TOOLKIT=MOTIF ;;
7445 gtk ) with_gtk=yes
7446 USE_X_TOOLKIT=none ;;
7447 no ) USE_X_TOOLKIT=none ;;
7448 * ) USE_X_TOOLKIT=maybe ;;
7449 esac
7450 ;;
7451 nextstep | none )
7452 HAVE_X_WINDOWS=no
7453 HAVE_X11=no
7454 USE_X_TOOLKIT=none
7455 ;;
7456esac
a4f64981 7457
8c5ff6dd
KR
7458if test "$window_system" = none && test "X$with_x" != "Xno"; then
7459 # Extract the first word of "X", so it can be a program name with args.
7460set dummy X; ac_word=$2
7461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7462$as_echo_n "checking for $ac_word... " >&6; }
7463if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
7464 $as_echo_n "(cached) " >&6
7465else
7466 if test -n "$HAVE_XSERVER"; then
7467 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
7468else
7469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7470for as_dir in $PATH
7471do
7472 IFS=$as_save_IFS
7473 test -z "$as_dir" && as_dir=.
7474 for ac_exec_ext in '' $ac_executable_extensions; do
7475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7476 ac_cv_prog_HAVE_XSERVER="true"
7477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7478 break 2
7479 fi
7480done
7481 done
7482IFS=$as_save_IFS
aaa36002 7483
8c5ff6dd
KR
7484 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
7485fi
7486fi
7487HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7488if test -n "$HAVE_XSERVER"; then
7489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7490$as_echo "$HAVE_XSERVER" >&6; }
7491else
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7493$as_echo "no" >&6; }
7494fi
91e84f96 7495
08b47d3d 7496
8c5ff6dd
KR
7497 if test "$HAVE_XSERVER" = true ||
7498 test -n "$DISPLAY" ||
7499 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
7500 as_fn_error "You seem to be running X, but no X development libraries
7501were found. You should install the relevant development files for X
7502and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7503sure you have development files for image handling, i.e.
7504tiff, gif, jpeg, png and xpm.
7505If you are sure you want Emacs compiled without X window support, pass
7506 --without-x
7507to configure." "$LINENO" 5
7508 fi
7509fi
91e84f96 7510
8c5ff6dd
KR
7511### If we're using X11, we should use the X menu package.
7512HAVE_MENUS=no
7513case ${HAVE_X11} in
7514 yes ) HAVE_MENUS=yes ;;
7515esac
aaa36002 7516
8c5ff6dd
KR
7517# Do the opsystem or machine files prohibit the use of the GNU malloc?
7518# Assume not, until told otherwise.
7519GNU_MALLOC=yes
7520doug_lea_malloc=yes
7521ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7522if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
15e12598 7523
8c5ff6dd
KR
7524else
7525 doug_lea_malloc=no
7526fi
cd03c74a 7527
8c5ff6dd
KR
7528ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7529if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
cd03c74a 7530
8c5ff6dd
KR
7531else
7532 doug_lea_malloc=no
7533fi
7534
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7536$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7537if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
7538 $as_echo_n "(cached) " >&6
7539else
7540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7541/* end confdefs.h. */
7542extern void (* __after_morecore_hook)();
7543int
7544main ()
7545{
7546__after_morecore_hook = 0
7547 ;
7548 return 0;
a4f64981 7549}
a5edbe4a 7550_ACEOF
8c5ff6dd
KR
7551if ac_fn_c_try_link "$LINENO"; then :
7552 emacs_cv_var___after_morecore_hook=yes
15e12598 7553else
8c5ff6dd
KR
7554 emacs_cv_var___after_morecore_hook=no
7555fi
7556rm -f core conftest.err conftest.$ac_objext \
7557 conftest$ac_exeext conftest.$ac_ext
7558fi
7559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7560$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7561if test $emacs_cv_var___after_morecore_hook = no; then
7562 doug_lea_malloc=no
a4f64981 7563fi
8c5ff6dd
KR
7564if test "${system_malloc}" = "yes"; then
7565 GNU_MALLOC=no
7566 GNU_MALLOC_reason="
7567 (The GNU allocators don't work with this system configuration.)"
a5edbe4a 7568fi
8c5ff6dd
KR
7569if test "$doug_lea_malloc" = "yes" ; then
7570 if test "$GNU_MALLOC" = yes ; then
7571 GNU_MALLOC_reason="
7572 (Using Doug Lea's new malloc from the GNU C Library.)"
7573 fi
cd03c74a 7574
8c5ff6dd 7575$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
49ebbd65 7576
a4f64981 7577fi
e6df49e4 7578
8c5ff6dd
KR
7579if test x"${REL_ALLOC}" = x; then
7580 REL_ALLOC=${GNU_MALLOC}
a4f64981 7581fi
15e12598 7582
15e12598 7583
8c5ff6dd
KR
7584
7585
7586
7587 for ac_header in $ac_header_list
7588do :
7589 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7590ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7591"
7592eval as_val=\$$as_ac_Header
7593 if test "x$as_val" = x""yes; then :
7594 cat >>confdefs.h <<_ACEOF
7595#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15e12598
VB
7596_ACEOF
7597
7598fi
7599
8c5ff6dd 7600done
15e12598 7601
a4f64981 7602
a4f64981 7603
8c5ff6dd
KR
7604
7605
7606
7607
7608
7609for ac_func in getpagesize
7610do :
7611 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7612if test "x$ac_cv_func_getpagesize" = x""yes; then :
7613 cat >>confdefs.h <<_ACEOF
7614#define HAVE_GETPAGESIZE 1
7615_ACEOF
7616
7617fi
7618done
7619
7620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7621$as_echo_n "checking for working mmap... " >&6; }
7622if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
e6df49e4
GM
7623 $as_echo_n "(cached) " >&6
7624else
8c5ff6dd
KR
7625 if test "$cross_compiling" = yes; then :
7626 ac_cv_func_mmap_fixed_mapped=no
7627else
7628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 7629/* end confdefs.h. */
8c5ff6dd
KR
7630$ac_includes_default
7631/* malloc might have been renamed as rpl_malloc. */
7632#undef malloc
a4f64981 7633
8c5ff6dd
KR
7634/* Thanks to Mike Haertel and Jim Avera for this test.
7635 Here is a matrix of mmap possibilities:
7636 mmap private not fixed
7637 mmap private fixed at somewhere currently unmapped
7638 mmap private fixed at somewhere already mapped
7639 mmap shared not fixed
7640 mmap shared fixed at somewhere currently unmapped
7641 mmap shared fixed at somewhere already mapped
7642 For private mappings, we should verify that changes cannot be read()
7643 back from the file, nor mmap's back from the file at a different
7644 address. (There have been systems where private was not correctly
7645 implemented like the infamous i386 svr4.0, and systems where the
7646 VM page cache was not coherent with the file system buffer cache
7647 like early versions of FreeBSD and possibly contemporary NetBSD.)
7648 For shared mappings, we should conversely verify that changes get
7649 propagated back to all the places they're supposed to be.
a4f64981 7650
8c5ff6dd
KR
7651 Grep wants private fixed already mapped.
7652 The main things grep needs to know about mmap are:
7653 * does it exist and is it safe to write into the mmap'd area
7654 * how to use it (BSD variants) */
a4f64981 7655
8c5ff6dd
KR
7656#include <fcntl.h>
7657#include <sys/mman.h>
49ebbd65 7658
8c5ff6dd
KR
7659#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7660char *malloc ();
a4f64981
GM
7661#endif
7662
8c5ff6dd
KR
7663/* This mess was copied from the GNU getpagesize.h. */
7664#ifndef HAVE_GETPAGESIZE
7665# ifdef _SC_PAGESIZE
7666# define getpagesize() sysconf(_SC_PAGESIZE)
7667# else /* no _SC_PAGESIZE */
7668# ifdef HAVE_SYS_PARAM_H
7669# include <sys/param.h>
7670# ifdef EXEC_PAGESIZE
7671# define getpagesize() EXEC_PAGESIZE
7672# else /* no EXEC_PAGESIZE */
7673# ifdef NBPG
7674# define getpagesize() NBPG * CLSIZE
7675# ifndef CLSIZE
7676# define CLSIZE 1
7677# endif /* no CLSIZE */
7678# else /* no NBPG */
7679# ifdef NBPC
7680# define getpagesize() NBPC
7681# else /* no NBPC */
7682# ifdef PAGESIZE
7683# define getpagesize() PAGESIZE
7684# endif /* PAGESIZE */
7685# endif /* no NBPC */
7686# endif /* no NBPG */
7687# endif /* no EXEC_PAGESIZE */
7688# else /* no HAVE_SYS_PARAM_H */
7689# define getpagesize() 8192 /* punt totally */
7690# endif /* no HAVE_SYS_PARAM_H */
7691# endif /* no _SC_PAGESIZE */
7692
7693#endif /* no HAVE_GETPAGESIZE */
7694
e6df49e4
GM
7695int
7696main ()
7697{
8c5ff6dd
KR
7698 char *data, *data2, *data3;
7699 const char *cdata2;
7700 int i, pagesize;
7701 int fd, fd2;
7702
7703 pagesize = getpagesize ();
7704
7705 /* First, make a file with some known garbage in it. */
7706 data = (char *) malloc (pagesize);
7707 if (!data)
7708 return 1;
7709 for (i = 0; i < pagesize; ++i)
7710 *(data + i) = rand ();
7711 umask (0);
7712 fd = creat ("conftest.mmap", 0600);
7713 if (fd < 0)
7714 return 2;
7715 if (write (fd, data, pagesize) != pagesize)
7716 return 3;
7717 close (fd);
7718
7719 /* Next, check that the tail of a page is zero-filled. File must have
7720 non-zero length, otherwise we risk SIGBUS for entire page. */
7721 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7722 if (fd2 < 0)
7723 return 4;
7724 cdata2 = "";
7725 if (write (fd2, cdata2, 1) != 1)
7726 return 5;
7727 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7728 if (data2 == MAP_FAILED)
7729 return 6;
7730 for (i = 0; i < pagesize; ++i)
7731 if (*(data2 + i))
7732 return 7;
7733 close (fd2);
7734 if (munmap (data2, pagesize))
7735 return 8;
7736
7737 /* Next, try to mmap the file at a fixed address which already has
7738 something else allocated at it. If we can, also make sure that
7739 we see the same garbage. */
7740 fd = open ("conftest.mmap", O_RDWR);
7741 if (fd < 0)
7742 return 9;
7743 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7744 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7745 return 10;
7746 for (i = 0; i < pagesize; ++i)
7747 if (*(data + i) != *(data2 + i))
7748 return 11;
7749
7750 /* Finally, make sure that changes to the mapped area do not
7751 percolate back to the file as seen by read(). (This is a bug on
7752 some variants of i386 svr4.0.) */
7753 for (i = 0; i < pagesize; ++i)
7754 *(data2 + i) = *(data2 + i) + 1;
7755 data3 = (char *) malloc (pagesize);
7756 if (!data3)
7757 return 12;
7758 if (read (fd, data3, pagesize) != pagesize)
7759 return 13;
7760 for (i = 0; i < pagesize; ++i)
7761 if (*(data + i) != *(data3 + i))
7762 return 14;
7763 close (fd);
e6df49e4
GM
7764 return 0;
7765}
7766_ACEOF
8c5ff6dd
KR
7767if ac_fn_c_try_run "$LINENO"; then :
7768 ac_cv_func_mmap_fixed_mapped=yes
e6df49e4 7769else
8c5ff6dd
KR
7770 ac_cv_func_mmap_fixed_mapped=no
7771fi
7772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7773 conftest.$ac_objext conftest.beam conftest.$ac_ext
7774fi
49ebbd65 7775
e6df49e4 7776fi
8c5ff6dd
KR
7777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7778$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7779if test $ac_cv_func_mmap_fixed_mapped = yes; then
7780
7781$as_echo "#define HAVE_MMAP 1" >>confdefs.h
49ebbd65 7782
e6df49e4 7783fi
8c5ff6dd
KR
7784rm -f conftest.mmap conftest.txt
7785
7786if test $use_mmap_for_buffers = yes; then
7787 REL_ALLOC=no
15e12598
VB
7788fi
7789
8c5ff6dd 7790LIBS="$LIBS_SYSTEM $LIBS"
15e12598 7791
8c5ff6dd
KR
7792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
7793$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7794if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
a4f64981
GM
7795 $as_echo_n "(cached) " >&6
7796else
8c5ff6dd
KR
7797 ac_check_lib_save_LIBS=$LIBS
7798LIBS="-ldnet $LIBS"
7799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 7800/* end confdefs.h. */
15e12598 7801
a4f64981
GM
7802/* Override any GCC internal prototype to avoid an error.
7803 Use char because int might match the return type of a GCC
7804 builtin and then its argument prototype would still apply. */
7805#ifdef __cplusplus
7806extern "C"
7807#endif
8c5ff6dd 7808char dnet_ntoa ();
a4f64981
GM
7809int
7810main ()
7811{
8c5ff6dd 7812return dnet_ntoa ();
a4f64981
GM
7813 ;
7814 return 0;
7815}
7816_ACEOF
8c5ff6dd
KR
7817if ac_fn_c_try_link "$LINENO"; then :
7818 ac_cv_lib_dnet_dnet_ntoa=yes
a4f64981 7819else
8c5ff6dd 7820 ac_cv_lib_dnet_dnet_ntoa=no
a4f64981 7821fi
8c5ff6dd
KR
7822rm -f core conftest.err conftest.$ac_objext \
7823 conftest$ac_exeext conftest.$ac_ext
7824LIBS=$ac_check_lib_save_LIBS
a4f64981 7825fi
8c5ff6dd
KR
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7827$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7828if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
08b47d3d 7829 cat >>confdefs.h <<_ACEOF
8c5ff6dd 7830#define HAVE_LIBDNET 1
08b47d3d 7831_ACEOF
91e84f96 7832
8c5ff6dd 7833 LIBS="-ldnet $LIBS"
e6df49e4 7834
8c5ff6dd 7835fi
15e12598 7836
15e12598 7837
8c5ff6dd
KR
7838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
7839$as_echo_n "checking for main in -lXbsd... " >&6; }
7840if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
15e12598
VB
7841 $as_echo_n "(cached) " >&6
7842else
a4f64981 7843 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
7844LIBS="-lXbsd $LIBS"
7845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7846/* end confdefs.h. */
7847
7848
7849int
7850main ()
7851{
7852return main ();
7853 ;
7854 return 0;
7855}
a4f64981 7856_ACEOF
8c5ff6dd
KR
7857if ac_fn_c_try_link "$LINENO"; then :
7858 ac_cv_lib_Xbsd_main=yes
7859else
7860 ac_cv_lib_Xbsd_main=no
7861fi
7862rm -f core conftest.err conftest.$ac_objext \
7863 conftest$ac_exeext conftest.$ac_ext
7864LIBS=$ac_check_lib_save_LIBS
7865fi
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
7867$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
7868if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
7869 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
7870fi
7871
7872
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
7874$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
7875if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
7876 $as_echo_n "(cached) " >&6
7877else
7878 ac_check_lib_save_LIBS=$LIBS
7879LIBS="-lpthreads $LIBS"
7880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 7881/* end confdefs.h. */
15e12598 7882
a4f64981
GM
7883/* Override any GCC internal prototype to avoid an error.
7884 Use char because int might match the return type of a GCC
7885 builtin and then its argument prototype would still apply. */
7886#ifdef __cplusplus
7887extern "C"
7888#endif
8c5ff6dd 7889char cma_open ();
a4f64981
GM
7890int
7891main ()
7892{
8c5ff6dd 7893return cma_open ();
a4f64981
GM
7894 ;
7895 return 0;
7896}
7897_ACEOF
8c5ff6dd
KR
7898if ac_fn_c_try_link "$LINENO"; then :
7899 ac_cv_lib_pthreads_cma_open=yes
15e12598 7900else
8c5ff6dd 7901 ac_cv_lib_pthreads_cma_open=no
a4f64981 7902fi
8c5ff6dd
KR
7903rm -f core conftest.err conftest.$ac_objext \
7904 conftest$ac_exeext conftest.$ac_ext
a4f64981
GM
7905LIBS=$ac_check_lib_save_LIBS
7906fi
8c5ff6dd
KR
7907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
7908$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
7909if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
a4f64981 7910 cat >>confdefs.h <<_ACEOF
8c5ff6dd 7911#define HAVE_LIBPTHREADS 1
a4f64981 7912_ACEOF
15e12598 7913
8c5ff6dd 7914 LIBS="-lpthreads $LIBS"
15e12598 7915
15e12598
VB
7916fi
7917
a4f64981 7918
8c5ff6dd
KR
7919## Note: when using cpp in s/aix4.2.h, this definition depended on
7920## HAVE_LIBPTHREADS. That was not defined earlier in configure when
7921## the system file was sourced. Hence the value of LIBS_SYSTEM
7922## added to LIBS in configure would never contain the pthreads part,
7923## but the value used in Makefiles might. FIXME?
7924##
7925## -lpthreads seems to be necessary for Xlib in X11R6, and should
7926## be harmless on older versions of X where it happens to exist.
7927test "$opsys" = "aix4-2" && \
7928 test $ac_cv_lib_pthreads_cma_open = yes && \
7929 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
7930
7931
7932case ${host_os} in
7933aix*)
7934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
7935$as_echo_n "checking for -bbigtoc option... " >&6; }
7936if test "${gdb_cv_bigtoc+set}" = set; then :
91e84f96
GM
7937 $as_echo_n "(cached) " >&6
7938else
8c5ff6dd
KR
7939
7940 case $GCC in
7941 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
7942 *) gdb_cv_bigtoc=-bbigtoc ;;
7943 esac
7944
7945 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
7946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7947/* end confdefs.h. */
7948
7949int
7950main ()
7951{
7952int i;
7953 ;
7954 return 0;
7955}
7956_ACEOF
7957if ac_fn_c_try_link "$LINENO"; then :
7958
7959else
7960 gdb_cv_bigtoc=
7961fi
7962rm -f core conftest.err conftest.$ac_objext \
7963 conftest$ac_exeext conftest.$ac_ext
7964
7965fi
7966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
7967$as_echo "$gdb_cv_bigtoc" >&6; }
7968 ;;
7969esac
7970
7971# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
7972# used for the tests that follow. We set them back to REAL_CFLAGS and
7973# REAL_CPPFLAGS later on.
7974
7975REAL_CPPFLAGS="$CPPFLAGS"
7976
7977if test "${HAVE_X11}" = "yes"; then
7978 DEFS="$C_SWITCH_X_SITE $DEFS"
7979 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
7980 LIBS="$LIBX $LIBS"
7981 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
7982 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
7983
7984 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
7985 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
7986 # but it's more convenient here to set LD_RUN_PATH
7987 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
7988 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
7989 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
7990 export LD_RUN_PATH
7991 fi
7992
7993 if test "${opsys}" = "gnu-linux"; then
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
7995$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
7996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7997/* end confdefs.h. */
7998
7999int
8000main ()
8001{
8002XOpenDisplay ("foo");
8003 ;
8004 return 0;
8005}
a4f64981 8006_ACEOF
8c5ff6dd
KR
8007if ac_fn_c_try_link "$LINENO"; then :
8008 xlinux_first_failure=no
8009else
8010 xlinux_first_failure=yes
8011fi
8012rm -f core conftest.err conftest.$ac_objext \
8013 conftest$ac_exeext conftest.$ac_ext
8014 if test "${xlinux_first_failure}" = "yes"; then
8015 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
8016 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
8017 OLD_CPPFLAGS="$CPPFLAGS"
8018 OLD_LIBS="$LIBS"
8019 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
8020 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
8021 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
8022 LIBS="$LIBS -b i486-linuxaout"
8023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8024/* end confdefs.h. */
0c309b80 8025
91e84f96
GM
8026int
8027main ()
8028{
8c5ff6dd
KR
8029XOpenDisplay ("foo");
8030 ;
8031 return 0;
8032}
8033_ACEOF
8034if ac_fn_c_try_link "$LINENO"; then :
8035 xlinux_second_failure=no
8036else
8037 xlinux_second_failure=yes
8038fi
8039rm -f core conftest.err conftest.$ac_objext \
8040 conftest$ac_exeext conftest.$ac_ext
8041 if test "${xlinux_second_failure}" = "yes"; then
8042 # If we get the same failure with -b, there is no use adding -b.
8043 # So take it out. This plays safe.
8044 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
8045 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
8046 CPPFLAGS="$OLD_CPPFLAGS"
8047 LIBS="$OLD_LIBS"
8048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8049$as_echo "no" >&6; }
8050 else
8051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8052$as_echo "yes" >&6; }
8053 fi
8054 else
8055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
8057 fi
8058 fi
8059
8060 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
8061 # header files included from there.
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
8063$as_echo_n "checking for Xkb... " >&6; }
8064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8065/* end confdefs.h. */
8066#include <X11/Xlib.h>
8067#include <X11/XKBlib.h>
8068int
8069main ()
8070{
8071XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
91e84f96
GM
8072 ;
8073 return 0;
8074}
8075_ACEOF
8c5ff6dd
KR
8076if ac_fn_c_try_link "$LINENO"; then :
8077 emacs_xkb=yes
0c309b80 8078else
8c5ff6dd 8079 emacs_xkb=no
cd03c74a 8080fi
8c5ff6dd
KR
8081rm -f core conftest.err conftest.$ac_objext \
8082 conftest$ac_exeext conftest.$ac_ext
8083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
8084$as_echo "$emacs_xkb" >&6; }
8085 if test $emacs_xkb = yes; then
8086
8087$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
8088
8089 fi
8090
8091 for ac_func in XrmSetDatabase XScreenResourceString \
8092XScreenNumberOfScreen XSetWMProtocols
8093do :
8094 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8095ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8096eval as_val=\$$as_ac_var
8097 if test "x$as_val" = x""yes; then :
8098 cat >>confdefs.h <<_ACEOF
8099#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8100_ACEOF
a4f64981 8101
49ebbd65 8102fi
8c5ff6dd 8103done
49ebbd65 8104
49ebbd65 8105fi
8c5ff6dd
KR
8106
8107if test "${window_system}" = "x11"; then
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
8109$as_echo_n "checking X11 version 6... " >&6; }
8110 if test "${emacs_cv_x11_version_6+set}" = set; then :
49ebbd65
DN
8111 $as_echo_n "(cached) " >&6
8112else
8c5ff6dd 8113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 8114/* end confdefs.h. */
8c5ff6dd 8115#include <X11/Xlib.h>
e6df49e4
GM
8116int
8117main ()
8118{
8c5ff6dd
KR
8119#if XlibSpecificationRelease < 6
8120fail;
8121#endif
8122
e6df49e4
GM
8123 ;
8124 return 0;
8125}
8126_ACEOF
8c5ff6dd
KR
8127if ac_fn_c_try_link "$LINENO"; then :
8128 emacs_cv_x11_version_6=yes
e6df49e4 8129else
8c5ff6dd
KR
8130 emacs_cv_x11_version_6=no
8131fi
8132rm -f core conftest.err conftest.$ac_objext \
8133 conftest$ac_exeext conftest.$ac_ext
8134fi
8135
8136 if test $emacs_cv_x11_version_6 = yes; then
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8138$as_echo "6 or newer" >&6; }
8139
8140$as_echo "#define HAVE_X11R6 1" >>confdefs.h
7186fb09 8141
8c5ff6dd
KR
8142 else
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8144$as_echo "before 6" >&6; }
8145 fi
a4f64981 8146fi
15e12598 8147
8c5ff6dd
KR
8148
8149### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
8150HAVE_RSVG=no
8151if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
8152 if test "${with_rsvg}" != "no"; then
8153 RSVG_REQUIRED=2.11.0
8154 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
8155
8156
8157 succeeded=no
8158
8159 # Extract the first word of "pkg-config", so it can be a program name with args.
8160set dummy pkg-config; ac_word=$2
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8162$as_echo_n "checking for $ac_word... " >&6; }
8163if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8164 $as_echo_n "(cached) " >&6
8165else
8166 case $PKG_CONFIG in
8167 [\\/]* | ?:[\\/]*)
8168 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8169 ;;
8170 *)
8171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8172for as_dir in $PATH
8173do
8174 IFS=$as_save_IFS
8175 test -z "$as_dir" && as_dir=.
8176 for ac_exec_ext in '' $ac_executable_extensions; do
8177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8178 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8180 break 2
8181 fi
8182done
8183 done
8184IFS=$as_save_IFS
8185
8186 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8187 ;;
8188esac
a4f64981 8189fi
8c5ff6dd
KR
8190PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8191if test -n "$PKG_CONFIG"; then
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8193$as_echo "$PKG_CONFIG" >&6; }
8194else
8195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8196$as_echo "no" >&6; }
a4f64981 8197fi
15e12598 8198
8c5ff6dd
KR
8199
8200
8201 if test "$PKG_CONFIG" = "no" ; then
8202 :
8203 else
8204 PKG_CONFIG_MIN_VERSION=0.9.0
8205 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8207$as_echo_n "checking for $RSVG_MODULE... " >&6; }
8208
8209 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8211$as_echo "yes" >&6; }
8212 succeeded=yes
8213
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8215$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8216 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8218$as_echo "$RSVG_CFLAGS" >&6; }
8219
8220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8221$as_echo_n "checking RSVG_LIBS... " >&6; }
8222 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8224$as_echo "$RSVG_LIBS" >&6; }
8225 else
8226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8227$as_echo "no" >&6; }
8228 RSVG_CFLAGS=""
8229 RSVG_LIBS=""
8230 ## If we have a custom action on failure, don't print errors, but
8231 ## do set a variable so people can do so.
8232 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
8233
8234 fi
8235
8236
8237
8238 else
8239 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8240 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8241 fi
8242 fi
8243
8244 if test $succeeded = yes; then
8245 :
8246 else
8247 :
8248 fi
8249
8250
8251
8252
8253 if test ".${RSVG_CFLAGS}" != "."; then
8254 HAVE_RSVG=yes
8255
8256$as_echo "#define HAVE_RSVG 1" >>confdefs.h
8257
8258 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8259 LIBS="$RSVG_LIBS $LIBS"
8260 fi
8261 fi
8262fi
8263
8264
8265HAVE_GTK=no
8266if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8267 GLIB_REQUIRED=2.6
8268 GTK_REQUIRED=2.6
8269 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8270
8271
8272 succeeded=no
8273
8274 # Extract the first word of "pkg-config", so it can be a program name with args.
8275set dummy pkg-config; ac_word=$2
8276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8277$as_echo_n "checking for $ac_word... " >&6; }
8278if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
0c309b80
GM
8279 $as_echo_n "(cached) " >&6
8280else
8c5ff6dd
KR
8281 case $PKG_CONFIG in
8282 [\\/]* | ?:[\\/]*)
8283 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8284 ;;
8285 *)
8286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8287for as_dir in $PATH
8288do
8289 IFS=$as_save_IFS
8290 test -z "$as_dir" && as_dir=.
8291 for ac_exec_ext in '' $ac_executable_extensions; do
8292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8293 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8295 break 2
8296 fi
8297done
8298 done
8299IFS=$as_save_IFS
8300
8301 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8302 ;;
8303esac
8304fi
8305PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8306if test -n "$PKG_CONFIG"; then
8307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8308$as_echo "$PKG_CONFIG" >&6; }
8309else
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8311$as_echo "no" >&6; }
8312fi
8313
8314
8315
8316 if test "$PKG_CONFIG" = "no" ; then
8317 pkg_check_gtk=no
8318 else
8319 PKG_CONFIG_MIN_VERSION=0.9.0
8320 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8322$as_echo_n "checking for $GTK_MODULES... " >&6; }
8323
8324 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8326$as_echo "yes" >&6; }
8327 succeeded=yes
8328
8329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8330$as_echo_n "checking GTK_CFLAGS... " >&6; }
8331 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8333$as_echo "$GTK_CFLAGS" >&6; }
8334
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8336$as_echo_n "checking GTK_LIBS... " >&6; }
8337 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8339$as_echo "$GTK_LIBS" >&6; }
8340 else
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8342$as_echo "no" >&6; }
8343 GTK_CFLAGS=""
8344 GTK_LIBS=""
8345 ## If we have a custom action on failure, don't print errors, but
8346 ## do set a variable so people can do so.
8347 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
7186fb09 8348
8c5ff6dd 8349 fi
a4f64981 8350
e6df49e4 8351
e6df49e4 8352
8c5ff6dd
KR
8353 else
8354 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8355 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8356 fi
8357 fi
8358
8359 if test $succeeded = yes; then
8360 pkg_check_gtk=yes
8361 else
8362 pkg_check_gtk=no
8363 fi
8364
8365 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
8366 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
8367 fi
a4f64981 8368fi
15e12598 8369
a4f64981 8370
8c5ff6dd
KR
8371GTK_OBJ=
8372if test x"$pkg_check_gtk" = xyes; then
a4f64981 8373
7186fb09 8374
aaa36002 8375
8c5ff6dd
KR
8376 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8377 CFLAGS="$CFLAGS $GTK_CFLAGS"
8378 LIBS="$GTK_LIBS $LIBS"
8379 GTK_COMPILES=no
8380 for ac_func in gtk_main
8381do :
8382 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8383if test "x$ac_cv_func_gtk_main" = x""yes; then :
8384 cat >>confdefs.h <<_ACEOF
8385#define HAVE_GTK_MAIN 1
8386_ACEOF
8387 GTK_COMPILES=yes
a4f64981 8388fi
8c5ff6dd 8389done
15e12598 8390
8c5ff6dd
KR
8391 if test "${GTK_COMPILES}" != "yes"; then
8392 if test "$USE_X_TOOLKIT" != "maybe"; then
8393 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
8394 fi
8395 else
8396 HAVE_GTK=yes
15e12598 8397
8c5ff6dd 8398$as_echo "#define USE_GTK 1" >>confdefs.h
a4f64981 8399
8c5ff6dd
KR
8400 GTK_OBJ=gtkutil.o
8401 USE_X_TOOLKIT=none
8402 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
8403 :
8404 else
8405 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
8406 closing open displays. This is no problem if you just use
8407 one display, but if you use more than one and close one of them
8408 Emacs may crash." >&5
8409$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
8410 closing open displays. This is no problem if you just use
8411 one display, but if you use more than one and close one of them
8412 Emacs may crash." >&2;}
8413 sleep 3
8414 fi
8415 fi
a4f64981 8416
8c5ff6dd 8417fi
a4f64981 8418
9452ded1 8419
a4f64981 8420
8c5ff6dd 8421if test "${HAVE_GTK}" = "yes"; then
a4f64981 8422
8c5ff6dd
KR
8423 if test "$with_toolkit_scroll_bars" != no; then
8424 with_toolkit_scroll_bars=yes
8425 fi
a4f64981 8426
8c5ff6dd
KR
8427 HAVE_GTK_MULTIDISPLAY=no
8428 for ac_func in gdk_display_open
8429do :
8430 ac_fn_c_check_func "$LINENO" "gdk_display_open" "ac_cv_func_gdk_display_open"
8431if test "x$ac_cv_func_gdk_display_open" = x""yes; then :
15e12598 8432 cat >>confdefs.h <<_ACEOF
8c5ff6dd 8433#define HAVE_GDK_DISPLAY_OPEN 1
15e12598 8434_ACEOF
8c5ff6dd
KR
8435 HAVE_GTK_MULTIDISPLAY=yes
8436fi
8437done
15e12598 8438
8c5ff6dd 8439 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
a4f64981 8440
8c5ff6dd 8441$as_echo "#define HAVE_GTK_MULTIDISPLAY 1" >>confdefs.h
a4f64981 8442
8c5ff6dd 8443 fi
91e84f96 8444
8c5ff6dd
KR
8445 HAVE_GTK_FILE_SELECTION=no
8446 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
8447#include <gtk/gtk.h>
8448"
8449if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
8450 HAVE_GTK_FILE_SELECTION=yes
a4f64981 8451else
8c5ff6dd
KR
8452 HAVE_GTK_FILE_SELECTION=no
8453fi
8454
8455 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
8456 for ac_func in gtk_file_selection_new
8457do :
8458 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
8459if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
8460 cat >>confdefs.h <<_ACEOF
8461#define HAVE_GTK_FILE_SELECTION_NEW 1
a4f64981 8462_ACEOF
8c5ff6dd 8463 HAVE_GTK_FILE_SELECTION=yes
a4f64981 8464else
8c5ff6dd 8465 HAVE_GTK_FILE_SELECTION=no
15e12598 8466fi
8c5ff6dd 8467done
08b47d3d 8468
8c5ff6dd 8469 fi
a4f64981 8470
8c5ff6dd
KR
8471 HAVE_GTK_FILE_CHOOSER=no
8472 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_CHOOSER" "ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" "$ac_includes_default
8473#include <gtk/gtk.h>
8474"
8475if test "x$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" = x""yes; then :
8476 HAVE_GTK_FILE_CHOOSER=yes
a4f64981 8477else
8c5ff6dd
KR
8478 HAVE_GTK_FILE_CHOOSER=no
8479fi
a4f64981 8480
8c5ff6dd
KR
8481 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8482 for ac_func in gtk_file_chooser_dialog_new
8483do :
8484 ac_fn_c_check_func "$LINENO" "gtk_file_chooser_dialog_new" "ac_cv_func_gtk_file_chooser_dialog_new"
8485if test "x$ac_cv_func_gtk_file_chooser_dialog_new" = x""yes; then :
8486 cat >>confdefs.h <<_ACEOF
8487#define HAVE_GTK_FILE_CHOOSER_DIALOG_NEW 1
8488_ACEOF
8489 HAVE_GTK_FILE_CHOOSER=yes
8490else
8491 HAVE_GTK_FILE_CHOOSER=no
a4f64981 8492fi
8c5ff6dd 8493done
a4f64981 8494
8c5ff6dd 8495 fi
a4f64981 8496
8c5ff6dd
KR
8497 if test "$HAVE_GTK_FILE_SELECTION" = yes \
8498 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
e6df49e4 8499
8c5ff6dd 8500$as_echo "#define HAVE_GTK_FILE_BOTH 1" >>confdefs.h
a4f64981 8501
8c5ff6dd 8502 fi
e6df49e4 8503
8c5ff6dd
KR
8504 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8505 HAVE_GTK_AND_PTHREAD=no
8506 for ac_header in pthread.h
8507do :
8508 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8509if test "x$ac_cv_header_pthread_h" = x""yes; then :
8510 cat >>confdefs.h <<_ACEOF
8511#define HAVE_PTHREAD_H 1
a4f64981 8512_ACEOF
e6df49e4 8513
8c5ff6dd 8514fi
a4f64981 8515
8c5ff6dd
KR
8516done
8517
8518 if test "$ac_cv_header_pthread_h"; then
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
8520$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
8521if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
15e12598
VB
8522 $as_echo_n "(cached) " >&6
8523else
8524 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
8525LIBS="-lpthread $LIBS"
8526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 8527/* end confdefs.h. */
e6df49e4
GM
8528
8529/* Override any GCC internal prototype to avoid an error.
8530 Use char because int might match the return type of a GCC
8531 builtin and then its argument prototype would still apply. */
8532#ifdef __cplusplus
8533extern "C"
8534#endif
8c5ff6dd 8535char pthread_self ();
aaa36002
DN
8536int
8537main ()
8538{
8c5ff6dd 8539return pthread_self ();
aaa36002
DN
8540 ;
8541 return 0;
8542}
7186fb09 8543_ACEOF
8c5ff6dd
KR
8544if ac_fn_c_try_link "$LINENO"; then :
8545 ac_cv_lib_pthread_pthread_self=yes
7186fb09 8546else
8c5ff6dd 8547 ac_cv_lib_pthread_pthread_self=no
cd03c74a 8548fi
8c5ff6dd
KR
8549rm -f core conftest.err conftest.$ac_objext \
8550 conftest$ac_exeext conftest.$ac_ext
15e12598 8551LIBS=$ac_check_lib_save_LIBS
49ebbd65 8552fi
8c5ff6dd
KR
8553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
8554$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
8555if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
8556 HAVE_GTK_AND_PTHREAD=yes
8557fi
a5edbe4a 8558
8c5ff6dd
KR
8559 fi
8560 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
8561 case "${canonical}" in
8562 *-hpux*) ;;
8563 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
8564 esac
a5edbe4a 8565
8c5ff6dd 8566$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
e6df49e4 8567
8c5ff6dd
KR
8568 fi
8569 fi
15e12598 8570fi
e6df49e4 8571
8c5ff6dd
KR
8572HAVE_DBUS=no
8573DBUS_OBJ=
8574if test "${with_dbus}" = "yes"; then
a4f64981 8575
8c5ff6dd 8576 succeeded=no
a4f64981 8577
8c5ff6dd
KR
8578 # Extract the first word of "pkg-config", so it can be a program name with args.
8579set dummy pkg-config; ac_word=$2
8580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8581$as_echo_n "checking for $ac_word... " >&6; }
8582if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
7186fb09 8583 $as_echo_n "(cached) " >&6
a5edbe4a 8584else
8c5ff6dd
KR
8585 case $PKG_CONFIG in
8586 [\\/]* | ?:[\\/]*)
8587 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8588 ;;
8589 *)
8590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8591for as_dir in $PATH
8592do
8593 IFS=$as_save_IFS
8594 test -z "$as_dir" && as_dir=.
8595 for ac_exec_ext in '' $ac_executable_extensions; do
8596 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8597 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8599 break 2
8600 fi
8601done
8602 done
8603IFS=$as_save_IFS
8604
8605 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8606 ;;
a4f64981 8607esac
8c5ff6dd
KR
8608fi
8609PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8610if test -n "$PKG_CONFIG"; then
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8612$as_echo "$PKG_CONFIG" >&6; }
e6df49e4 8613else
8c5ff6dd
KR
8614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8615$as_echo "no" >&6; }
e6df49e4 8616fi
a4f64981 8617
a4f64981 8618
8c5ff6dd
KR
8619
8620 if test "$PKG_CONFIG" = "no" ; then
8621 HAVE_DBUS=no
8622 else
8623 PKG_CONFIG_MIN_VERSION=0.9.0
8624 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
8626$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
8627
8628 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8630$as_echo "yes" >&6; }
8631 succeeded=yes
8632
8633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
8634$as_echo_n "checking DBUS_CFLAGS... " >&6; }
8635 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
8637$as_echo "$DBUS_CFLAGS" >&6; }
8638
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
8640$as_echo_n "checking DBUS_LIBS... " >&6; }
8641 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
8643$as_echo "$DBUS_LIBS" >&6; }
8644 else
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8646$as_echo "no" >&6; }
8647 DBUS_CFLAGS=""
8648 DBUS_LIBS=""
8649 ## If we have a custom action on failure, don't print errors, but
8650 ## do set a variable so people can do so.
8651 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
8652
8653 fi
8654
8655
8656
8657 else
8658 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8659 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8660 fi
8661 fi
8662
8663 if test $succeeded = yes; then
8664 HAVE_DBUS=yes
8665 else
8666 HAVE_DBUS=no
8667 fi
8668
8669 if test "$HAVE_DBUS" = yes; then
8670 LIBS="$LIBS $DBUS_LIBS"
8671
8672$as_echo "#define HAVE_DBUS 1" >>confdefs.h
8673
8674 for ac_func in dbus_watch_get_unix_fd
8675do :
8676 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
8677if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
8678 cat >>confdefs.h <<_ACEOF
8679#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
a4f64981 8680_ACEOF
8c5ff6dd
KR
8681
8682fi
8683done
8684
8685 DBUS_OBJ=dbusbind.o
8686 fi
8687fi
8688
8689
8690HAVE_GCONF=no
8691if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
8692
8693 succeeded=no
8694
8695 # Extract the first word of "pkg-config", so it can be a program name with args.
8696set dummy pkg-config; ac_word=$2
8697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8698$as_echo_n "checking for $ac_word... " >&6; }
8699if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8700 $as_echo_n "(cached) " >&6
8701else
8702 case $PKG_CONFIG in
8703 [\\/]* | ?:[\\/]*)
8704 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8705 ;;
8706 *)
8707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8708for as_dir in $PATH
8709do
8710 IFS=$as_save_IFS
8711 test -z "$as_dir" && as_dir=.
8712 for ac_exec_ext in '' $ac_executable_extensions; do
8713 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8714 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8716 break 2
8717 fi
8718done
8719 done
8720IFS=$as_save_IFS
8721
8722 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8723 ;;
a4f64981 8724esac
8c5ff6dd
KR
8725fi
8726PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8727if test -n "$PKG_CONFIG"; then
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8729$as_echo "$PKG_CONFIG" >&6; }
a4f64981 8730else
8c5ff6dd
KR
8731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8732$as_echo "no" >&6; }
8733fi
8734
8735
8736
8737 if test "$PKG_CONFIG" = "no" ; then
8738 HAVE_GCONF=no
8739 else
8740 PKG_CONFIG_MIN_VERSION=0.9.0
8741 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
8743$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
8744
8745 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
8746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8747$as_echo "yes" >&6; }
8748 succeeded=yes
8749
8750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
8751$as_echo_n "checking GCONF_CFLAGS... " >&6; }
8752 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
8754$as_echo "$GCONF_CFLAGS" >&6; }
8755
8756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
8757$as_echo_n "checking GCONF_LIBS... " >&6; }
8758 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
8760$as_echo "$GCONF_LIBS" >&6; }
8761 else
8762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8763$as_echo "no" >&6; }
8764 GCONF_CFLAGS=""
8765 GCONF_LIBS=""
8766 ## If we have a custom action on failure, don't print errors, but
8767 ## do set a variable so people can do so.
8768 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
a4f64981 8769
8c5ff6dd 8770 fi
a4f64981 8771
a4f64981 8772
a4f64981 8773
8c5ff6dd
KR
8774 else
8775 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8776 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8777 fi
8778 fi
a4f64981 8779
8c5ff6dd
KR
8780 if test $succeeded = yes; then
8781 HAVE_GCONF=yes
8782 else
8783 HAVE_GCONF=no
8784 fi
a4f64981 8785
8c5ff6dd 8786 if test "$HAVE_GCONF" = yes; then
a4f64981 8787
8c5ff6dd 8788$as_echo "#define HAVE_GCONF 1" >>confdefs.h
a4f64981 8789
8c5ff6dd
KR
8790 fi
8791fi
8792
8793HAVE_LIBSELINUX=no
8794LIBSELINUX_LIBS=
8795if test "${with_selinux}" = "yes"; then
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
8797$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
8798if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
a4f64981
GM
8799 $as_echo_n "(cached) " >&6
8800else
8c5ff6dd
KR
8801 ac_check_lib_save_LIBS=$LIBS
8802LIBS="-lselinux $LIBS"
8803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 8804/* end confdefs.h. */
7186fb09
GM
8805
8806/* Override any GCC internal prototype to avoid an error.
8807 Use char because int might match the return type of a GCC
8808 builtin and then its argument prototype would still apply. */
8809#ifdef __cplusplus
8810extern "C"
8811#endif
8c5ff6dd 8812char lgetfilecon ();
9452ded1
DN
8813int
8814main ()
8815{
8c5ff6dd 8816return lgetfilecon ();
9452ded1
DN
8817 ;
8818 return 0;
8819}
0c309b80 8820_ACEOF
8c5ff6dd
KR
8821if ac_fn_c_try_link "$LINENO"; then :
8822 ac_cv_lib_selinux_lgetfilecon=yes
7186fb09 8823else
8c5ff6dd 8824 ac_cv_lib_selinux_lgetfilecon=no
aaa36002 8825fi
8c5ff6dd
KR
8826rm -f core conftest.err conftest.$ac_objext \
8827 conftest$ac_exeext conftest.$ac_ext
8828LIBS=$ac_check_lib_save_LIBS
aaa36002 8829fi
8c5ff6dd
KR
8830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
8831$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
8832if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
8833 HAVE_LIBSELINUX=yes
8834else
8835 HAVE_LIBSELINUX=no
08b47d3d
JD
8836fi
8837
8c5ff6dd 8838 if test "$HAVE_LIBSELINUX" = yes; then
a4f64981 8839
8c5ff6dd 8840$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
a4f64981 8841
8c5ff6dd
KR
8842 LIBSELINUX_LIBS=-lselinux
8843 fi
a4f64981
GM
8844fi
8845
8c5ff6dd
KR
8846
8847HAVE_XAW3D=no
8848LUCID_LIBW=
8849if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
8850 if test "$with_xaw3d" != no; then
8851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
8852$as_echo_n "checking for xaw3d... " >&6; }
8853 if test "${emacs_cv_xaw3d+set}" = set; then :
aaa36002
DN
8854 $as_echo_n "(cached) " >&6
8855else
8c5ff6dd 8856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 8857/* end confdefs.h. */
e6df49e4 8858
8c5ff6dd
KR
8859#include <X11/Intrinsic.h>
8860#include <X11/Xaw3d/Simple.h>
8861int
8862main ()
8863{
e6df49e4 8864
8c5ff6dd
KR
8865 ;
8866 return 0;
8867}
a4f64981 8868_ACEOF
8c5ff6dd
KR
8869if ac_fn_c_try_link "$LINENO"; then :
8870 emacs_cv_xaw3d=yes
15e12598 8871else
8c5ff6dd 8872 emacs_cv_xaw3d=no
e6df49e4 8873fi
8c5ff6dd
KR
8874rm -f core conftest.err conftest.$ac_objext \
8875 conftest$ac_exeext conftest.$ac_ext
aaa36002 8876fi
7186fb09 8877
8c5ff6dd
KR
8878 else
8879 emacs_cv_xaw3d=no
8880 fi
8881 if test $emacs_cv_xaw3d = yes; then
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
8883$as_echo "yes; using Lucid toolkit" >&6; }
8884 USE_X_TOOLKIT=LUCID
8885 HAVE_XAW3D=yes
8886 LUCID_LIBW=-lXaw3d
a5edbe4a 8887
8c5ff6dd 8888$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
a5edbe4a 8889
8c5ff6dd
KR
8890 else
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8892$as_echo "no" >&6; }
8893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
8894$as_echo_n "checking for libXaw... " >&6; }
8895 if test "${emacs_cv_xaw+set}" = set; then :
49ebbd65 8896 $as_echo_n "(cached) " >&6
e6df49e4 8897else
8c5ff6dd 8898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 8899/* end confdefs.h. */
91e84f96 8900
8c5ff6dd
KR
8901#include <X11/Intrinsic.h>
8902#include <X11/Xaw/Simple.h>
8903int
8904main ()
8905{
91e84f96 8906
8c5ff6dd
KR
8907 ;
8908 return 0;
8909}
a4f64981 8910_ACEOF
8c5ff6dd
KR
8911if ac_fn_c_try_link "$LINENO"; then :
8912 emacs_cv_xaw=yes
a4f64981 8913else
8c5ff6dd
KR
8914 emacs_cv_xaw=no
8915fi
8916rm -f core conftest.err conftest.$ac_objext \
8917 conftest$ac_exeext conftest.$ac_ext
8918fi
7186fb09 8919
8c5ff6dd
KR
8920 if test $emacs_cv_xaw = yes; then
8921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
8922$as_echo "yes; using Lucid toolkit" >&6; }
8923 USE_X_TOOLKIT=LUCID
8924 LUCID_LIBW=-lXaw
8925 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
8926 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
8927 else
8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
8929$as_echo "no; do not use toolkit by default" >&6; }
8930 USE_X_TOOLKIT=none
8931 fi
8932 fi
a4f64981 8933fi
7186fb09 8934
8c5ff6dd 8935X_TOOLKIT_TYPE=$USE_X_TOOLKIT
aaa36002 8936
8c5ff6dd
KR
8937LIBXTR6=
8938if test "${USE_X_TOOLKIT}" != "none"; then
8939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
8940$as_echo_n "checking X11 toolkit version... " >&6; }
8941 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
8942 $as_echo_n "(cached) " >&6
8943else
8944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8945/* end confdefs.h. */
8946#include <X11/Intrinsic.h>
8947int
8948main ()
8949{
8950#if XtSpecificationRelease < 6
8951fail;
8952#endif
aaa36002 8953
8c5ff6dd
KR
8954 ;
8955 return 0;
8956}
8957_ACEOF
8958if ac_fn_c_try_link "$LINENO"; then :
8959 emacs_cv_x11_toolkit_version_6=yes
a4f64981 8960else
8c5ff6dd 8961 emacs_cv_x11_toolkit_version_6=no
a4f64981 8962fi
8c5ff6dd
KR
8963rm -f core conftest.err conftest.$ac_objext \
8964 conftest$ac_exeext conftest.$ac_ext
a4f64981 8965fi
08b47d3d 8966
8c5ff6dd
KR
8967 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
8968 if test $emacs_cv_x11_toolkit_version_6 = yes; then
8969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8970$as_echo "6 or newer" >&6; }
cd03c74a 8971
8c5ff6dd 8972$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
cd03c74a 8973
8c5ff6dd
KR
8974 LIBXTR6="-lSM -lICE"
8975 case "$opsys" in
8976 ## Use libw.a along with X11R6 Xt.
8977 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
8978 esac
8979 else
8980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8981$as_echo "before 6" >&6; }
8982 fi
cd03c74a 8983
8c5ff6dd
KR
8984 OLDLIBS="$LIBS"
8985 if test x$HAVE_X11XTR6 = xyes; then
8986 LIBS="-lXt -lSM -lICE $LIBS"
8987 else
8988 LIBS="-lXt $LIBS"
8989 fi
8990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
8991$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
8992if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
a4f64981 8993 $as_echo_n "(cached) " >&6
a4f64981 8994else
8c5ff6dd
KR
8995 ac_check_lib_save_LIBS=$LIBS
8996LIBS="-lXmu $LIBS"
8997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 8998/* end confdefs.h. */
8c5ff6dd
KR
8999
9000/* Override any GCC internal prototype to avoid an error.
9001 Use char because int might match the return type of a GCC
9002 builtin and then its argument prototype would still apply. */
9003#ifdef __cplusplus
9004extern "C"
9005#endif
9006char XmuConvertStandardSelection ();
9007int
9008main ()
9009{
9010return XmuConvertStandardSelection ();
9011 ;
9012 return 0;
9013}
a4f64981 9014_ACEOF
8c5ff6dd
KR
9015if ac_fn_c_try_link "$LINENO"; then :
9016 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
a4f64981 9017else
8c5ff6dd 9018 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
a4f64981 9019fi
8c5ff6dd
KR
9020rm -f core conftest.err conftest.$ac_objext \
9021 conftest$ac_exeext conftest.$ac_ext
9022LIBS=$ac_check_lib_save_LIBS
9023fi
9024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
9025$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
9026if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
9027 cat >>confdefs.h <<_ACEOF
9028#define HAVE_LIBXMU 1
a4f64981 9029_ACEOF
9452ded1 9030
8c5ff6dd
KR
9031 LIBS="-lXmu $LIBS"
9032
9452ded1 9033fi
a4f64981 9034
8c5ff6dd
KR
9035 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
9036fi
a4f64981 9037
a4f64981 9038
8c5ff6dd
KR
9039LIBXMU=-lXmu
9040case "$machine" in
9041 ## These machines don't supply Xmu.
9042 hpux* | aix4-2 )
9043 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
a4f64981
GM
9044 ;;
9045esac
8c5ff6dd
KR
9046
9047
9048# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
9049if test "${HAVE_X11}" = "yes"; then
9050 if test "${USE_X_TOOLKIT}" != "none"; then
9051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
9052$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
9053if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
a4f64981 9054 $as_echo_n "(cached) " >&6
15e12598 9055else
8c5ff6dd
KR
9056 ac_check_lib_save_LIBS=$LIBS
9057LIBS="-lXext $LIBS"
9058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9059/* end confdefs.h. */
91e84f96 9060
8c5ff6dd
KR
9061/* Override any GCC internal prototype to avoid an error.
9062 Use char because int might match the return type of a GCC
9063 builtin and then its argument prototype would still apply. */
9064#ifdef __cplusplus
9065extern "C"
9066#endif
9067char XShapeQueryExtension ();
9068int
9069main ()
9070{
9071return XShapeQueryExtension ();
9072 ;
9073 return 0;
9074}
9075_ACEOF
9076if ac_fn_c_try_link "$LINENO"; then :
9077 ac_cv_lib_Xext_XShapeQueryExtension=yes
9078else
9079 ac_cv_lib_Xext_XShapeQueryExtension=no
9080fi
9081rm -f core conftest.err conftest.$ac_objext \
9082 conftest$ac_exeext conftest.$ac_ext
9083LIBS=$ac_check_lib_save_LIBS
a4f64981 9084fi
8c5ff6dd
KR
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
9086$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
9087if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
a4f64981 9088 cat >>confdefs.h <<_ACEOF
8c5ff6dd 9089#define HAVE_LIBXEXT 1
a4f64981 9090_ACEOF
91e84f96 9091
8c5ff6dd 9092 LIBS="-lXext $LIBS"
8732a4e9 9093
a4f64981 9094fi
8732a4e9 9095
8c5ff6dd
KR
9096 fi
9097fi
8732a4e9 9098
8c5ff6dd
KR
9099LIBXP=
9100if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
9102$as_echo_n "checking for Motif version 2.1... " >&6; }
9103if test "${emacs_cv_motif_version_2_1+set}" = set; then :
a4f64981 9104 $as_echo_n "(cached) " >&6
a4f64981 9105else
8c5ff6dd 9106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 9107/* end confdefs.h. */
8c5ff6dd
KR
9108#include <Xm/Xm.h>
9109int
9110main ()
9111{
9112#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
9113int x = 5;
9114#else
9115Motif version prior to 2.1.
9116#endif
9117 ;
9118 return 0;
9119}
a4f64981 9120_ACEOF
8c5ff6dd
KR
9121if ac_fn_c_try_compile "$LINENO"; then :
9122 emacs_cv_motif_version_2_1=yes
a4f64981 9123else
8c5ff6dd 9124 emacs_cv_motif_version_2_1=no
a4f64981 9125fi
a4f64981 9126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd
KR
9127fi
9128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
9129$as_echo "$emacs_cv_motif_version_2_1" >&6; }
9130 if test $emacs_cv_motif_version_2_1 = yes; then
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
9132$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
9133if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
9134 $as_echo_n "(cached) " >&6
9135else
9136 ac_check_lib_save_LIBS=$LIBS
9137LIBS="-lXp $LIBS"
9138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9139/* end confdefs.h. */
9452ded1 9140
8c5ff6dd
KR
9141/* Override any GCC internal prototype to avoid an error.
9142 Use char because int might match the return type of a GCC
9143 builtin and then its argument prototype would still apply. */
9144#ifdef __cplusplus
9145extern "C"
9146#endif
9147char XpCreateContext ();
9148int
9149main ()
9150{
9151return XpCreateContext ();
9152 ;
9153 return 0;
9154}
a4f64981 9155_ACEOF
8c5ff6dd
KR
9156if ac_fn_c_try_link "$LINENO"; then :
9157 ac_cv_lib_Xp_XpCreateContext=yes
9158else
9159 ac_cv_lib_Xp_XpCreateContext=no
9160fi
9161rm -f core conftest.err conftest.$ac_objext \
9162 conftest$ac_exeext conftest.$ac_ext
9163LIBS=$ac_check_lib_save_LIBS
9164fi
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
9166$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
9167if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
9168 LIBXP=-lXp
9169fi
9170
9171 else
9172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
9173$as_echo_n "checking for LessTif where some systems put it... " >&6; }
9174if test "${emacs_cv_lesstif+set}" = set; then :
9175 $as_echo_n "(cached) " >&6
9176else
9177 # We put this in CFLAGS temporarily to precede other -I options
9178 # that might be in CFLAGS temporarily.
9179 # We put this in CPPFLAGS where it precedes the other -I options.
9180 OLD_CPPFLAGS=$CPPFLAGS
9181 OLD_CFLAGS=$CFLAGS
9182 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
9183 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
9184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 9185/* end confdefs.h. */
8c5ff6dd
KR
9186#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
9187int
9188main ()
9189{
9190int x = 5;
9191 ;
9192 return 0;
9193}
a4f64981 9194_ACEOF
8c5ff6dd
KR
9195if ac_fn_c_try_compile "$LINENO"; then :
9196 emacs_cv_lesstif=yes
a4f64981 9197else
8c5ff6dd
KR
9198 emacs_cv_lesstif=no
9199fi
9200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9201fi
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
9203$as_echo "$emacs_cv_lesstif" >&6; }
9204 if test $emacs_cv_lesstif = yes; then
9205 # Make sure this -I option remains in CPPFLAGS after it is set
9206 # back to REAL_CPPFLAGS.
9207 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
9208 # have those other -I options anyway. Ultimately, having this
9209 # directory ultimately in CPPFLAGS will be enough.
9210 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
9211 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
9212 else
9213 CFLAGS=$OLD_CFLAGS
9214 CPPFLAGS=$OLD_CPPFLAGS
9215 fi
9216 fi
a4f64981 9217fi
9452ded1 9218
9452ded1 9219
8c5ff6dd
KR
9220USE_TOOLKIT_SCROLL_BARS=no
9221if test "${with_toolkit_scroll_bars}" != "no"; then
9222 if test "${USE_X_TOOLKIT}" != "none"; then
9223 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9224 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9225
8c5ff6dd
KR
9226 HAVE_XAW3D=no
9227 USE_TOOLKIT_SCROLL_BARS=yes
9228 elif test "${HAVE_XAW3D}" = "yes"; then
9229 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9230
9231 USE_TOOLKIT_SCROLL_BARS=yes
9232 fi
9233 elif test "${HAVE_GTK}" = "yes"; then
9234 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9235
9236 USE_TOOLKIT_SCROLL_BARS=yes
9237 elif test "${HAVE_NS}" = "yes"; then
9238 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9239
8c5ff6dd
KR
9240 USE_TOOLKIT_SCROLL_BARS=yes
9241 fi
a4f64981 9242fi
8c5ff6dd
KR
9243
9244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9245/* end confdefs.h. */
91e84f96 9246
8c5ff6dd
KR
9247 #include <X11/Xlib.h>
9248 #include <X11/Xresource.h>
91e84f96
GM
9249int
9250main ()
9251{
8c5ff6dd 9252XIMProc callback;
91e84f96
GM
9253 ;
9254 return 0;
9255}
9256_ACEOF
8c5ff6dd
KR
9257if ac_fn_c_try_compile "$LINENO"; then :
9258 HAVE_XIM=yes
9259
9260$as_echo "#define HAVE_XIM 1" >>confdefs.h
9261
91e84f96 9262else
8c5ff6dd
KR
9263 HAVE_XIM=no
9264fi
9265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 9266
8c5ff6dd
KR
9267
9268if test "${with_xim}" != "no"; then
9269
9270$as_echo "#define USE_XIM 1" >>confdefs.h
9271
9272fi
9273
9274
9275if test "${HAVE_XIM}" != "no"; then
9276 late_CFLAGS=$CFLAGS
9277 if test "$GCC" = yes; then
9278 CFLAGS="$CFLAGS --pedantic-errors"
9279 fi
9280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9281/* end confdefs.h. */
91e84f96 9282
8c5ff6dd
KR
9283#include <X11/Xlib.h>
9284#include <X11/Xresource.h>
91e84f96
GM
9285int
9286main ()
9287{
8c5ff6dd
KR
9288Display *display;
9289XrmDatabase db;
9290char *res_name;
9291char *res_class;
9292XIMProc callback;
9293XPointer *client_data;
9294#ifndef __GNUC__
9295/* If we're not using GCC, it's probably not XFree86, and this is
9296 probably right, but we can't use something like --pedantic-errors. */
9297extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9298 char*, XIMProc, XPointer*);
9299#endif
9300(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9301 client_data);
91e84f96 9302 ;
a4f64981
GM
9303 return 0;
9304}
9305_ACEOF
8c5ff6dd
KR
9306if ac_fn_c_try_compile "$LINENO"; then :
9307 emacs_cv_arg6_star=yes
a4f64981 9308fi
a4f64981 9309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd
KR
9310 if test "$emacs_cv_arg6_star" = yes; then
9311 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
08b47d3d 9312
8c5ff6dd
KR
9313 else
9314 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
9315
9316 fi
9317 CFLAGS=$late_CFLAGS
a4f64981 9318fi
08b47d3d 9319
8c5ff6dd
KR
9320### Start of font-backend (under any platform) section.
9321# (nothing here yet -- this is a placeholder)
9322### End of font-backend (under any platform) section.
9323
9324### Start of font-backend (under X11) section.
9325if test "${HAVE_X11}" = "yes"; then
cd03c74a 9326
8c5ff6dd 9327 succeeded=no
15e12598 9328
8c5ff6dd
KR
9329 # Extract the first word of "pkg-config", so it can be a program name with args.
9330set dummy pkg-config; ac_word=$2
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9332$as_echo_n "checking for $ac_word... " >&6; }
9333if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9334 $as_echo_n "(cached) " >&6
9335else
9336 case $PKG_CONFIG in
9337 [\\/]* | ?:[\\/]*)
9338 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9339 ;;
9340 *)
9341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9342for as_dir in $PATH
9343do
9344 IFS=$as_save_IFS
9345 test -z "$as_dir" && as_dir=.
9346 for ac_exec_ext in '' $ac_executable_extensions; do
9347 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9348 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9349 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9350 break 2
9351 fi
9352done
9353 done
9354IFS=$as_save_IFS
15e12598 9355
8c5ff6dd
KR
9356 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9357 ;;
9358esac
9359fi
9360PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9361if test -n "$PKG_CONFIG"; then
9362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9363$as_echo "$PKG_CONFIG" >&6; }
9364else
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366$as_echo "no" >&6; }
a4f64981 9367fi
15e12598
VB
9368
9369
15e12598 9370
8c5ff6dd
KR
9371 if test "$PKG_CONFIG" = "no" ; then
9372 HAVE_FC=no
9373 else
9374 PKG_CONFIG_MIN_VERSION=0.9.0
9375 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
9377$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
15e12598 9378
8c5ff6dd
KR
9379 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9381$as_echo "yes" >&6; }
9382 succeeded=yes
15e12598 9383
8c5ff6dd
KR
9384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
9385$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
9386 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
9388$as_echo "$FONTCONFIG_CFLAGS" >&6; }
15e12598 9389
8c5ff6dd
KR
9390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
9391$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
9392 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
9394$as_echo "$FONTCONFIG_LIBS" >&6; }
9395 else
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9397$as_echo "no" >&6; }
9398 FONTCONFIG_CFLAGS=""
9399 FONTCONFIG_LIBS=""
9400 ## If we have a custom action on failure, don't print errors, but
9401 ## do set a variable so people can do so.
9402 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
9403
9404 fi
9405
9406
9407
9408 else
9409 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9410 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9411 fi
9412 fi
9413
9414 if test $succeeded = yes; then
9415 HAVE_FC=yes
9416 else
9417 HAVE_FC=no
9418 fi
9419
9420
9421 ## Use -lXft if available, unless `--with-xft=no'.
9422 HAVE_XFT=maybe
9423 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
9424 with_xft="no";
9425 fi
9426 if test "x${with_xft}" != "xno"; then
9427
9428
9429 succeeded=no
9430
9431 # Extract the first word of "pkg-config", so it can be a program name with args.
9432set dummy pkg-config; ac_word=$2
9433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9434$as_echo_n "checking for $ac_word... " >&6; }
9435if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
15e12598
VB
9436 $as_echo_n "(cached) " >&6
9437else
8c5ff6dd
KR
9438 case $PKG_CONFIG in
9439 [\\/]* | ?:[\\/]*)
9440 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9441 ;;
9442 *)
9443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9444for as_dir in $PATH
9445do
9446 IFS=$as_save_IFS
9447 test -z "$as_dir" && as_dir=.
9448 for ac_exec_ext in '' $ac_executable_extensions; do
9449 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9450 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9452 break 2
9453 fi
9454done
9455 done
9456IFS=$as_save_IFS
9457
9458 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9459 ;;
9460esac
9461fi
9462PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9463if test -n "$PKG_CONFIG"; then
9464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9465$as_echo "$PKG_CONFIG" >&6; }
15e12598 9466else
8c5ff6dd
KR
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9468$as_echo "no" >&6; }
15e12598 9469fi
a4f64981 9470
a4f64981 9471
a4f64981 9472
8c5ff6dd
KR
9473 if test "$PKG_CONFIG" = "no" ; then
9474 HAVE_XFT=no
9475 else
9476 PKG_CONFIG_MIN_VERSION=0.9.0
9477 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
9479$as_echo_n "checking for xft >= 0.13.0... " >&6; }
9480
9481 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9483$as_echo "yes" >&6; }
9484 succeeded=yes
9485
9486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
9487$as_echo_n "checking XFT_CFLAGS... " >&6; }
9488 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
9490$as_echo "$XFT_CFLAGS" >&6; }
9491
9492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
9493$as_echo_n "checking XFT_LIBS... " >&6; }
9494 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
9496$as_echo "$XFT_LIBS" >&6; }
9497 else
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9499$as_echo "no" >&6; }
9500 XFT_CFLAGS=""
9501 XFT_LIBS=""
9502 ## If we have a custom action on failure, don't print errors, but
9503 ## do set a variable so people can do so.
9504 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
e6df49e4 9505
8c5ff6dd 9506 fi
91e84f96
GM
9507
9508
91e84f96 9509
8c5ff6dd
KR
9510 else
9511 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9512 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9513 fi
9514 fi
91e84f96 9515
8c5ff6dd
KR
9516 if test $succeeded = yes; then
9517 :
9518 else
9519 HAVE_XFT=no
9520 fi
9521
9522 ## Because xftfont.c uses XRenderQueryExtension, we also
9523 ## need to link to -lXrender.
9524 HAVE_XRENDER=no
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
9526$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
9527if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
15e12598
VB
9528 $as_echo_n "(cached) " >&6
9529else
8c5ff6dd
KR
9530 ac_check_lib_save_LIBS=$LIBS
9531LIBS="-lXrender $LIBS"
9532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 9533/* end confdefs.h. */
8c5ff6dd
KR
9534
9535/* Override any GCC internal prototype to avoid an error.
9536 Use char because int might match the return type of a GCC
9537 builtin and then its argument prototype would still apply. */
9538#ifdef __cplusplus
9539extern "C"
9540#endif
9541char XRenderQueryExtension ();
a4f64981
GM
9542int
9543main ()
9544{
8c5ff6dd 9545return XRenderQueryExtension ();
a4f64981
GM
9546 ;
9547 return 0;
9548}
9549_ACEOF
8c5ff6dd
KR
9550if ac_fn_c_try_link "$LINENO"; then :
9551 ac_cv_lib_Xrender_XRenderQueryExtension=yes
15e12598 9552else
8c5ff6dd
KR
9553 ac_cv_lib_Xrender_XRenderQueryExtension=no
9554fi
9555rm -f core conftest.err conftest.$ac_objext \
9556 conftest$ac_exeext conftest.$ac_ext
9557LIBS=$ac_check_lib_save_LIBS
9558fi
9559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
9560$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
9561if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
9562 HAVE_XRENDER=yes
a4f64981 9563fi
91e84f96 9564
8c5ff6dd
KR
9565 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
9566 OLD_CPPFLAGS="$CPPFLAGS"
9567 OLD_CFLAGS="$CFLAGS"
9568 OLD_LIBS="$LIBS"
9569 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
9570 CFLAGS="$CFLAGS $XFT_CFLAGS"
9571 XFT_LIBS="-lXrender $XFT_LIBS"
9572 LIBS="$XFT_LIBS $LIBS"
9573 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
9574if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
9575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
9576$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
9577if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
9578 $as_echo_n "(cached) " >&6
9579else
9580 ac_check_lib_save_LIBS=$LIBS
9581LIBS="-lXft $XFT_LIBS $LIBS"
9582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 9583/* end confdefs.h. */
8c5ff6dd
KR
9584
9585/* Override any GCC internal prototype to avoid an error.
9586 Use char because int might match the return type of a GCC
9587 builtin and then its argument prototype would still apply. */
9588#ifdef __cplusplus
9589extern "C"
9590#endif
9591char XftFontOpen ();
a4f64981
GM
9592int
9593main ()
9594{
8c5ff6dd 9595return XftFontOpen ();
a4f64981
GM
9596 ;
9597 return 0;
9598}
9599_ACEOF
8c5ff6dd
KR
9600if ac_fn_c_try_link "$LINENO"; then :
9601 ac_cv_lib_Xft_XftFontOpen=yes
a4f64981 9602else
8c5ff6dd 9603 ac_cv_lib_Xft_XftFontOpen=no
a4f64981 9604fi
8c5ff6dd
KR
9605rm -f core conftest.err conftest.$ac_objext \
9606 conftest$ac_exeext conftest.$ac_ext
9607LIBS=$ac_check_lib_save_LIBS
a4f64981 9608fi
8c5ff6dd
KR
9609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
9610$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
9611if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
9612 HAVE_XFT=yes
a4f64981 9613fi
91e84f96 9614
8c5ff6dd 9615fi
08b47d3d 9616
91e84f96 9617
91e84f96 9618
8c5ff6dd 9619 if test "${HAVE_XFT}" = "yes"; then
91e84f96 9620
8c5ff6dd 9621$as_echo "#define HAVE_XFT 1" >>confdefs.h
91e84f96 9622
91e84f96 9623
8c5ff6dd
KR
9624 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
9625 else
9626 CPPFLAGS="$OLD_CPPFLAGS"
9627 CFLAGS="$OLD_CFLAGS"
9628 LIBS="$OLD_LIBS"
9629 fi # "${HAVE_XFT}" = "yes"
9630 fi # "$HAVE_XFT" != no
9631 fi # "x${with_xft}" != "xno"
8732a4e9 9632
8c5ff6dd
KR
9633 if test "$HAVE_XFT" != "yes"; then
9634 HAVE_XFT=no
9635 fi
8732a4e9 9636
9452ded1 9637
8c5ff6dd
KR
9638 HAVE_FREETYPE=no
9639 ## We used to allow building with FreeType and without Xft.
9640 ## However, the ftx font backend driver is not in good shape.
9641 if test "${HAVE_XFT}" = "yes"; then
9642 HAVE_FREETYPE=yes
9643 FONTCONFIG_CFLAGS=
9644 FONTCONFIG_LIBS=
9645 fi
9452ded1 9646
8c5ff6dd
KR
9647 HAVE_LIBOTF=no
9648 if test "${HAVE_FREETYPE}" = "yes"; then
cd03c74a 9649
8c5ff6dd 9650$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
49ebbd65 9651
8c5ff6dd 9652 if test "${with_libotf}" != "no"; then
15e12598 9653
8c5ff6dd 9654 succeeded=no
a4f64981 9655
8c5ff6dd
KR
9656 # Extract the first word of "pkg-config", so it can be a program name with args.
9657set dummy pkg-config; ac_word=$2
9658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9659$as_echo_n "checking for $ac_word... " >&6; }
9660if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
9661 $as_echo_n "(cached) " >&6
9662else
8c5ff6dd
KR
9663 case $PKG_CONFIG in
9664 [\\/]* | ?:[\\/]*)
9665 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9666 ;;
9667 *)
9668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9669for as_dir in $PATH
9670do
9671 IFS=$as_save_IFS
9672 test -z "$as_dir" && as_dir=.
9673 for ac_exec_ext in '' $ac_executable_extensions; do
9674 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9675 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9676 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9677 break 2
9678 fi
9679done
9680 done
9681IFS=$as_save_IFS
9682
9683 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9684 ;;
a4f64981 9685esac
8c5ff6dd
KR
9686fi
9687PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9688if test -n "$PKG_CONFIG"; then
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9690$as_echo "$PKG_CONFIG" >&6; }
91e84f96 9691else
8c5ff6dd
KR
9692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9693$as_echo "no" >&6; }
9694fi
9695
08b47d3d 9696
aaa36002 9697
8c5ff6dd
KR
9698 if test "$PKG_CONFIG" = "no" ; then
9699 HAVE_LIBOTF=no
9700 else
9701 PKG_CONFIG_MIN_VERSION=0.9.0
9702 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
9704$as_echo_n "checking for libotf... " >&6; }
aaa36002 9705
8c5ff6dd
KR
9706 if $PKG_CONFIG --exists "libotf" 2>&5; then
9707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9708$as_echo "yes" >&6; }
9709 succeeded=yes
a4f64981 9710
8c5ff6dd
KR
9711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
9712$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
9713 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
9715$as_echo "$LIBOTF_CFLAGS" >&6; }
49ebbd65 9716
8c5ff6dd
KR
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
9718$as_echo_n "checking LIBOTF_LIBS... " >&6; }
9719 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
9721$as_echo "$LIBOTF_LIBS" >&6; }
9722 else
9723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9724$as_echo "no" >&6; }
9725 LIBOTF_CFLAGS=""
9726 LIBOTF_LIBS=""
9727 ## If we have a custom action on failure, don't print errors, but
9728 ## do set a variable so people can do so.
9729 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
cd03c74a 9730
8c5ff6dd 9731 fi
49ebbd65 9732
e6df49e4 9733
49ebbd65 9734
8c5ff6dd
KR
9735 else
9736 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9737 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9738 fi
9739 fi
cd03c74a 9740
8c5ff6dd
KR
9741 if test $succeeded = yes; then
9742 HAVE_LIBOTF=yes
9743 else
9744 HAVE_LIBOTF=no
9745 fi
49ebbd65 9746
8c5ff6dd 9747 if test "$HAVE_LIBOTF" = "yes"; then
a4f64981 9748
8c5ff6dd
KR
9749$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
9750
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
9752$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
9753if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
15e12598 9754 $as_echo_n "(cached) " >&6
49ebbd65 9755else
8c5ff6dd
KR
9756 ac_check_lib_save_LIBS=$LIBS
9757LIBS="-lotf $LIBS"
9758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9759/* end confdefs.h. */
15e12598
VB
9760
9761/* Override any GCC internal prototype to avoid an error.
9762 Use char because int might match the return type of a GCC
9763 builtin and then its argument prototype would still apply. */
9764#ifdef __cplusplus
9765extern "C"
9766#endif
8c5ff6dd 9767char OTF_get_variation_glyphs ();
91e84f96
GM
9768int
9769main ()
9770{
8c5ff6dd 9771return OTF_get_variation_glyphs ();
91e84f96
GM
9772 ;
9773 return 0;
9774}
9775_ACEOF
8c5ff6dd
KR
9776if ac_fn_c_try_link "$LINENO"; then :
9777 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
91e84f96 9778else
8c5ff6dd 9779 ac_cv_lib_otf_OTF_get_variation_glyphs=no
15e12598 9780fi
8c5ff6dd
KR
9781rm -f core conftest.err conftest.$ac_objext \
9782 conftest$ac_exeext conftest.$ac_ext
9783LIBS=$ac_check_lib_save_LIBS
a4f64981 9784fi
8c5ff6dd
KR
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
9786$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
9787if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
9788 HAVE_OTF_GET_VARIATION_GLYPHS=yes
15e12598 9789else
8c5ff6dd 9790 HAVE_OTF_GET_VARIATION_GLYPHS=no
15e12598 9791fi
a4f64981 9792
8c5ff6dd 9793 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
91e84f96 9794
8c5ff6dd 9795$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
a4f64981 9796
8c5ff6dd
KR
9797 fi
9798 fi
9799 fi
9800 fi
15e12598 9801
8c5ff6dd
KR
9802 HAVE_M17N_FLT=no
9803 if test "${HAVE_LIBOTF}" = yes; then
9804 if test "${with_m17n_flt}" != "no"; then
e6df49e4 9805
8c5ff6dd 9806 succeeded=no
e6df49e4 9807
8c5ff6dd
KR
9808 # Extract the first word of "pkg-config", so it can be a program name with args.
9809set dummy pkg-config; ac_word=$2
9810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9811$as_echo_n "checking for $ac_word... " >&6; }
9812if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981
GM
9813 $as_echo_n "(cached) " >&6
9814else
8c5ff6dd
KR
9815 case $PKG_CONFIG in
9816 [\\/]* | ?:[\\/]*)
9817 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9818 ;;
9819 *)
9820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9821for as_dir in $PATH
9822do
9823 IFS=$as_save_IFS
9824 test -z "$as_dir" && as_dir=.
9825 for ac_exec_ext in '' $ac_executable_extensions; do
9826 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9827 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9829 break 2
9830 fi
9831done
9832 done
9833IFS=$as_save_IFS
a4f64981 9834
8c5ff6dd
KR
9835 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9836 ;;
a4f64981 9837esac
a4f64981 9838fi
8c5ff6dd
KR
9839PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9840if test -n "$PKG_CONFIG"; then
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9842$as_echo "$PKG_CONFIG" >&6; }
a4f64981 9843else
8c5ff6dd
KR
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9845$as_echo "no" >&6; }
a4f64981 9846fi
a5edbe4a 9847
a4f64981 9848
a4f64981 9849
8c5ff6dd
KR
9850 if test "$PKG_CONFIG" = "no" ; then
9851 HAVE_M17N_FLT=no
9852 else
9853 PKG_CONFIG_MIN_VERSION=0.9.0
9854 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
9856$as_echo_n "checking for m17n-flt... " >&6; }
9857
9858 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
9859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9860$as_echo "yes" >&6; }
9861 succeeded=yes
9862
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
9864$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
9865 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
9866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
9867$as_echo "$M17N_FLT_CFLAGS" >&6; }
9868
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
9870$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
9871 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
9872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
9873$as_echo "$M17N_FLT_LIBS" >&6; }
9874 else
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9876$as_echo "no" >&6; }
9877 M17N_FLT_CFLAGS=""
9878 M17N_FLT_LIBS=""
9879 ## If we have a custom action on failure, don't print errors, but
9880 ## do set a variable so people can do so.
9881 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
9882
9883 fi
9884
a4f64981 9885
aaa36002 9886
8c5ff6dd
KR
9887 else
9888 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9889 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9890 fi
9891 fi
a4f64981 9892
8c5ff6dd
KR
9893 if test $succeeded = yes; then
9894 HAVE_M17N_FLT=yes
9895 else
9896 HAVE_M17N_FLT=no
a4f64981 9897 fi
cd03c74a 9898
8c5ff6dd 9899 if test "$HAVE_M17N_FLT" = "yes"; then
15e12598 9900
8c5ff6dd 9901$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
15e12598 9902
8c5ff6dd
KR
9903 fi
9904 fi
9905 fi
9906else
9907 HAVE_XFT=no
9908 HAVE_FREETYPE=no
9909 HAVE_LIBOTF=no
9910 HAVE_M17N_FLT=no
9911fi
15e12598 9912
8c5ff6dd
KR
9913FONT_OBJ=xfont.o
9914if test "$HAVE_XFT" = "yes"; then
9915 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
9916elif test "$HAVE_FREETYPE" = "yes"; then
9917 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
9918fi
15e12598 9919
a4f64981 9920
8c5ff6dd 9921### End of font-backend (under X11) section.
a4f64981
GM
9922
9923
9924
a4f64981 9925
49ebbd65 9926
15e12598 9927
a4f64981
GM
9928
9929
8c5ff6dd
KR
9930
9931
9932### Use -lXpm if available, unless `--with-xpm=no'.
9933HAVE_XPM=no
9934LIBXPM=
9935if test "${HAVE_X11}" = "yes"; then
9936 if test "${with_xpm}" != "no"; then
9937 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
9938if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
9940$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
9941if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
91e84f96
GM
9942 $as_echo_n "(cached) " >&6
9943else
8c5ff6dd
KR
9944 ac_check_lib_save_LIBS=$LIBS
9945LIBS="-lXpm -lX11 $LIBS"
9946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9947/* end confdefs.h. */
8c5ff6dd
KR
9948
9949/* Override any GCC internal prototype to avoid an error.
9950 Use char because int might match the return type of a GCC
9951 builtin and then its argument prototype would still apply. */
9952#ifdef __cplusplus
9953extern "C"
9954#endif
9955char XpmReadFileToPixmap ();
91e84f96
GM
9956int
9957main ()
9958{
8c5ff6dd 9959return XpmReadFileToPixmap ();
91e84f96
GM
9960 ;
9961 return 0;
9962}
9963_ACEOF
8c5ff6dd
KR
9964if ac_fn_c_try_link "$LINENO"; then :
9965 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
91e84f96 9966else
8c5ff6dd
KR
9967 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
9968fi
9969rm -f core conftest.err conftest.$ac_objext \
9970 conftest$ac_exeext conftest.$ac_ext
9971LIBS=$ac_check_lib_save_LIBS
9972fi
9973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
9974$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
9975if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
9976 HAVE_XPM=yes
9977fi
a4f64981 9978
91e84f96 9979fi
a4f64981 9980
a4f64981 9981
8c5ff6dd
KR
9982 if test "${HAVE_XPM}" = "yes"; then
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
9984$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
9985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9986/* end confdefs.h. */
9987#include "X11/xpm.h"
9988#ifndef XpmReturnAllocPixels
9989no_return_alloc_pixels
9990#endif
a4f64981 9991
a4f64981 9992_ACEOF
8c5ff6dd
KR
9993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9994 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
9995 HAVE_XPM=no
9996else
9997 HAVE_XPM=yes
e6df49e4 9998fi
8c5ff6dd
KR
9999rm -f conftest*
10000
aaa36002 10001
8c5ff6dd
KR
10002 if test "${HAVE_XPM}" = "yes"; then
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10004$as_echo "yes" >&6; }
10005 else
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10007$as_echo "no" >&6; }
10008 fi
10009 fi
10010 fi
cd03c74a 10011
8c5ff6dd 10012 if test "${HAVE_XPM}" = "yes"; then
49ebbd65 10013
8c5ff6dd 10014$as_echo "#define HAVE_XPM 1" >>confdefs.h
a4f64981 10015
8c5ff6dd
KR
10016 LIBXPM=-lXpm
10017 fi
10018fi
a4f64981 10019
a4f64981 10020
8c5ff6dd
KR
10021### Use -ljpeg if available, unless `--with-jpeg=no'.
10022HAVE_JPEG=no
10023LIBJPEG=
10024if test "${HAVE_X11}" = "yes"; then
10025 if test "${with_jpeg}" != "no"; then
10026 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
10027if test "x$ac_cv_header_jerror_h" = x""yes; then :
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
10029$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
10030if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
10031 $as_echo_n "(cached) " >&6
10032else
10033 ac_check_lib_save_LIBS=$LIBS
10034LIBS="-ljpeg $LIBS"
10035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10036/* end confdefs.h. */
91e84f96
GM
10037
10038/* Override any GCC internal prototype to avoid an error.
10039 Use char because int might match the return type of a GCC
10040 builtin and then its argument prototype would still apply. */
10041#ifdef __cplusplus
10042extern "C"
10043#endif
8c5ff6dd 10044char jpeg_destroy_compress ();
91e84f96
GM
10045int
10046main ()
10047{
8c5ff6dd 10048return jpeg_destroy_compress ();
91e84f96
GM
10049 ;
10050 return 0;
10051}
10052_ACEOF
8c5ff6dd
KR
10053if ac_fn_c_try_link "$LINENO"; then :
10054 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
15e12598 10055else
8c5ff6dd
KR
10056 ac_cv_lib_jpeg_jpeg_destroy_compress=no
10057fi
10058rm -f core conftest.err conftest.$ac_objext \
10059 conftest$ac_exeext conftest.$ac_ext
10060LIBS=$ac_check_lib_save_LIBS
10061fi
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
10063$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
10064if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
10065 HAVE_JPEG=yes
10066fi
91e84f96
GM
10067
10068fi
91e84f96 10069
8c5ff6dd
KR
10070
10071 fi
10072
10073 if test "${HAVE_JPEG}" = "yes"; then
10074 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
10075
10076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10077/* end confdefs.h. */
10078#include <jpeglib.h>
10079 version=JPEG_LIB_VERSION
10080
10081_ACEOF
10082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10083 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
10084 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
10085
10086else
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
10088$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
10089 HAVE_JPEG=no
15e12598 10090fi
8c5ff6dd
KR
10091rm -f conftest*
10092
10093 fi
10094 if test "${HAVE_JPEG}" = "yes"; then
10095 LIBJPEG=-ljpeg
10096 fi
10097fi
10098
10099
10100### Use -lpng if available, unless `--with-png=no'.
10101HAVE_PNG=no
10102LIBPNG=
10103if test "${HAVE_X11}" = "yes"; then
10104 if test "${with_png}" != "no"; then
10105 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
10106 # in /usr/include/libpng.
10107 for ac_header in png.h libpng/png.h
10108do :
10109 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10110ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10111eval as_val=\$$as_ac_Header
10112 if test "x$as_val" = x""yes; then :
a4f64981 10113 cat >>confdefs.h <<_ACEOF
8c5ff6dd 10114#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
a4f64981 10115_ACEOF
15e12598 10116
8c5ff6dd
KR
10117fi
10118
10119done
10120
10121 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
10123$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
10124if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
e6df49e4
GM
10125 $as_echo_n "(cached) " >&6
10126else
15e12598 10127 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
10128LIBS="-lpng -lz -lm $LIBS"
10129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 10130/* end confdefs.h. */
6da23aaa 10131
e6df49e4
GM
10132/* Override any GCC internal prototype to avoid an error.
10133 Use char because int might match the return type of a GCC
10134 builtin and then its argument prototype would still apply. */
10135#ifdef __cplusplus
10136extern "C"
10137#endif
8c5ff6dd 10138char png_get_channels ();
e6df49e4
GM
10139int
10140main ()
8c5ff6dd
KR
10141{
10142return png_get_channels ();
10143 ;
10144 return 0;
10145}
10146_ACEOF
10147if ac_fn_c_try_link "$LINENO"; then :
10148 ac_cv_lib_png_png_get_channels=yes
e6df49e4 10149else
8c5ff6dd 10150 ac_cv_lib_png_png_get_channels=no
15e12598 10151fi
8c5ff6dd
KR
10152rm -f core conftest.err conftest.$ac_objext \
10153 conftest$ac_exeext conftest.$ac_ext
15e12598
VB
10154LIBS=$ac_check_lib_save_LIBS
10155fi
8c5ff6dd
KR
10156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
10157$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
10158if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
10159 HAVE_PNG=yes
15e12598 10160fi
91e84f96 10161
8c5ff6dd
KR
10162 fi
10163 fi
91e84f96 10164
8c5ff6dd 10165 if test "${HAVE_PNG}" = "yes"; then
15e12598 10166
8c5ff6dd 10167$as_echo "#define HAVE_PNG 1" >>confdefs.h
15e12598 10168
8c5ff6dd
KR
10169 LIBPNG="-lpng -lz -lm"
10170 fi
10171fi
10172
10173
10174### Use -ltiff if available, unless `--with-tiff=no'.
10175HAVE_TIFF=no
10176LIBTIFF=
10177if test "${HAVE_X11}" = "yes"; then
10178 if test "${with_tiff}" != "no"; then
10179 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
10180if test "x$ac_cv_header_tiffio_h" = x""yes; then :
10181 tifflibs="-lz -lm"
10182 # At least one tiff package requires the jpeg library.
10183 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
10184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
10185$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
10186if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
a4f64981
GM
10187 $as_echo_n "(cached) " >&6
10188else
8c5ff6dd
KR
10189 ac_check_lib_save_LIBS=$LIBS
10190LIBS="-ltiff $tifflibs $LIBS"
10191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 10192/* end confdefs.h. */
15e12598 10193
a4f64981
GM
10194/* Override any GCC internal prototype to avoid an error.
10195 Use char because int might match the return type of a GCC
10196 builtin and then its argument prototype would still apply. */
10197#ifdef __cplusplus
10198extern "C"
10199#endif
8c5ff6dd 10200char TIFFGetVersion ();
a4f64981
GM
10201int
10202main ()
10203{
8c5ff6dd 10204return TIFFGetVersion ();
a4f64981
GM
10205 ;
10206 return 0;
10207}
10208_ACEOF
8c5ff6dd
KR
10209if ac_fn_c_try_link "$LINENO"; then :
10210 ac_cv_lib_tiff_TIFFGetVersion=yes
a4f64981 10211else
8c5ff6dd 10212 ac_cv_lib_tiff_TIFFGetVersion=no
a4f64981 10213fi
8c5ff6dd
KR
10214rm -f core conftest.err conftest.$ac_objext \
10215 conftest$ac_exeext conftest.$ac_ext
10216LIBS=$ac_check_lib_save_LIBS
10217fi
10218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
10219$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
10220if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
10221 HAVE_TIFF=yes
a4f64981 10222fi
91e84f96
GM
10223
10224fi
91e84f96
GM
10225
10226
8c5ff6dd 10227 fi
15e12598 10228
8c5ff6dd 10229 if test "${HAVE_TIFF}" = "yes"; then
15e12598 10230
8c5ff6dd 10231$as_echo "#define HAVE_TIFF 1" >>confdefs.h
15e12598 10232
8c5ff6dd
KR
10233 LIBTIFF=-ltiff
10234 fi
10235fi
15e12598 10236
8c5ff6dd
KR
10237
10238### Use -lgif or -lungif if available, unless `--with-gif=no'.
10239HAVE_GIF=no
10240LIBGIF=
10241if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
10242 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
10243if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
10244 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10245# Earlier versions can crash Emacs.
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
10247$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
10248if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
10249 $as_echo_n "(cached) " >&6
10250else
10251 ac_check_lib_save_LIBS=$LIBS
10252LIBS="-lgif $LIBS"
10253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10254/* end confdefs.h. */
15e12598 10255
a4f64981
GM
10256/* Override any GCC internal prototype to avoid an error.
10257 Use char because int might match the return type of a GCC
10258 builtin and then its argument prototype would still apply. */
10259#ifdef __cplusplus
10260extern "C"
10261#endif
8c5ff6dd 10262char EGifPutExtensionLast ();
a4f64981
GM
10263int
10264main ()
10265{
8c5ff6dd 10266return EGifPutExtensionLast ();
a4f64981
GM
10267 ;
10268 return 0;
10269}
10270_ACEOF
8c5ff6dd
KR
10271if ac_fn_c_try_link "$LINENO"; then :
10272 ac_cv_lib_gif_EGifPutExtensionLast=yes
a4f64981 10273else
8c5ff6dd 10274 ac_cv_lib_gif_EGifPutExtensionLast=no
a4f64981 10275fi
8c5ff6dd
KR
10276rm -f core conftest.err conftest.$ac_objext \
10277 conftest$ac_exeext conftest.$ac_ext
10278LIBS=$ac_check_lib_save_LIBS
10279fi
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
10281$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
10282if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
10283 HAVE_GIF=yes
10284else
10285 HAVE_GIF=maybe
a4f64981 10286fi
15e12598 10287
15e12598
VB
10288fi
10289
10290
8c5ff6dd
KR
10291
10292 if test "$HAVE_GIF" = yes; then
10293 LIBGIF=-lgif
10294 elif test "$HAVE_GIF" = maybe; then
10295# If gif_lib.h but no libgif, try libungif.
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10297$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10298if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
91e84f96
GM
10299 $as_echo_n "(cached) " >&6
10300else
8c5ff6dd
KR
10301 ac_check_lib_save_LIBS=$LIBS
10302LIBS="-lungif $LIBS"
10303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
10304/* end confdefs.h. */
10305
10306/* Override any GCC internal prototype to avoid an error.
10307 Use char because int might match the return type of a GCC
10308 builtin and then its argument prototype would still apply. */
10309#ifdef __cplusplus
10310extern "C"
10311#endif
8c5ff6dd 10312char EGifPutExtensionLast ();
91e84f96 10313int
49ebbd65
DN
10314main ()
10315{
8c5ff6dd 10316return EGifPutExtensionLast ();
49ebbd65
DN
10317 ;
10318 return 0;
10319}
15e12598 10320_ACEOF
8c5ff6dd
KR
10321if ac_fn_c_try_link "$LINENO"; then :
10322 ac_cv_lib_ungif_EGifPutExtensionLast=yes
a5edbe4a 10323else
8c5ff6dd 10324 ac_cv_lib_ungif_EGifPutExtensionLast=no
08b47d3d 10325fi
8c5ff6dd
KR
10326rm -f core conftest.err conftest.$ac_objext \
10327 conftest$ac_exeext conftest.$ac_ext
10328LIBS=$ac_check_lib_save_LIBS
e6df49e4 10329fi
8c5ff6dd
KR
10330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10331$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10332if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10333 HAVE_GIF=yes
a4f64981 10334else
8c5ff6dd 10335 HAVE_GIF=no
cd03c74a
DN
10336fi
10337
8c5ff6dd
KR
10338 test "$HAVE_GIF" = yes && LIBGIF=-lungif
10339 fi
49ebbd65 10340
8c5ff6dd 10341 if test "${HAVE_GIF}" = "yes"; then
15e12598 10342
8c5ff6dd 10343$as_echo "#define HAVE_GIF 1" >>confdefs.h
15e12598 10344
8c5ff6dd
KR
10345 fi
10346fi
a4f64981 10347
a4f64981 10348
8c5ff6dd
KR
10349if test "${HAVE_X11}" = "yes"; then
10350 MISSING=""
10351 WITH_NO=""
10352 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
10353 MISSING="libXpm" && WITH_NO="--with-xpm=no"
10354 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
10355 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
10356 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
10357 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
10358 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
10359 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
10360 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
10361 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
10362
10363 if test "X${MISSING}" != X; then
10364 as_fn_error "The following required libraries were not found:
10365 $MISSING
10366Maybe some development libraries/packages are missing?
10367If you don't want to link with them give
10368 $WITH_NO
10369as options to configure" "$LINENO" 5
10370 fi
10371fi
a4f64981 10372
8c5ff6dd
KR
10373### Use -lgpm if available, unless `--with-gpm=no'.
10374HAVE_GPM=no
10375LIBGPM=
10376MOUSE_SUPPORT=
10377if test "${with_gpm}" != "no"; then
10378 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
10379if test "x$ac_cv_header_gpm_h" = x""yes; then :
10380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
10381$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
10382if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
15e12598
VB
10383 $as_echo_n "(cached) " >&6
10384else
8c5ff6dd
KR
10385 ac_check_lib_save_LIBS=$LIBS
10386LIBS="-lgpm $LIBS"
10387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
08b47d3d 10388/* end confdefs.h. */
8c5ff6dd
KR
10389
10390/* Override any GCC internal prototype to avoid an error.
10391 Use char because int might match the return type of a GCC
10392 builtin and then its argument prototype would still apply. */
10393#ifdef __cplusplus
10394extern "C"
10395#endif
10396char Gpm_Open ();
91e84f96
GM
10397int
10398main ()
6da23aaa 10399{
8c5ff6dd 10400return Gpm_Open ();
08b47d3d
JD
10401 ;
10402 return 0;
6da23aaa 10403}
aaa36002 10404_ACEOF
8c5ff6dd
KR
10405if ac_fn_c_try_link "$LINENO"; then :
10406 ac_cv_lib_gpm_Gpm_Open=yes
91e84f96 10407else
8c5ff6dd
KR
10408 ac_cv_lib_gpm_Gpm_Open=no
10409fi
10410rm -f core conftest.err conftest.$ac_objext \
10411 conftest$ac_exeext conftest.$ac_ext
10412LIBS=$ac_check_lib_save_LIBS
10413fi
10414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10415$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
10416if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
10417 HAVE_GPM=yes
10418fi
a4f64981 10419
15e12598 10420fi
a4f64981 10421
8c5ff6dd
KR
10422
10423
10424 if test "${HAVE_GPM}" = "yes"; then
10425
10426$as_echo "#define HAVE_GPM 1" >>confdefs.h
10427
10428 LIBGPM=-lgpm
10429 ## May be reset below.
10430 MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
10431 fi
15e12598 10432fi
15e12598 10433
cd03c74a 10434
8c5ff6dd
KR
10435ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
10436if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
a4f64981 10437
8c5ff6dd 10438$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
a4f64981 10439
8c5ff6dd 10440fi
a4f64981 10441
a4f64981 10442
a4f64981 10443
8c5ff6dd
KR
10444C_SWITCH_X_SYSTEM=
10445### Use NeXTstep API to implement GUI.
10446if test "${HAVE_NS}" = "yes"; then
a4f64981 10447
8c5ff6dd 10448$as_echo "#define HAVE_NS 1" >>confdefs.h
a4f64981 10449
8c5ff6dd 10450 if test "${NS_IMPL_COCOA}" = "yes"; then
a4f64981 10451
8c5ff6dd 10452$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
a4f64981 10453
8c5ff6dd
KR
10454 GNU_OBJC_CFLAGS=
10455 fi
10456 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
a4f64981 10457
8c5ff6dd
KR
10458$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
10459
10460 # See also .m.o rule in Makefile.in */
10461 # FIXME: are all these flags really needed? Document here why. */
10462 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
10463 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
10464 fi
10465 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
cd03c74a 10466
8c5ff6dd 10467$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
a4f64981 10468
8c5ff6dd
KR
10469 fi
10470 # We also have mouse menus.
10471 HAVE_MENUS=yes
10472 OTHER_FILES=ns-app
10473fi
a4f64981
GM
10474
10475
8c5ff6dd
KR
10476### Use session management (-lSM -lICE) if available
10477HAVE_X_SM=no
10478LIBXSM=
10479if test "${HAVE_X11}" = "yes"; then
10480 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10481if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
10483$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
10484if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
10485 $as_echo_n "(cached) " >&6
10486else
10487 ac_check_lib_save_LIBS=$LIBS
10488LIBS="-lSM -lICE $LIBS"
10489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a5edbe4a 10490/* end confdefs.h. */
8c5ff6dd
KR
10491
10492/* Override any GCC internal prototype to avoid an error.
10493 Use char because int might match the return type of a GCC
10494 builtin and then its argument prototype would still apply. */
10495#ifdef __cplusplus
10496extern "C"
10497#endif
10498char SmcOpenConnection ();
6da23aaa
EZ
10499int
10500main ()
10501{
8c5ff6dd 10502return SmcOpenConnection ();
a5edbe4a
GM
10503 ;
10504 return 0;
91e84f96
GM
10505}
10506_ACEOF
8c5ff6dd
KR
10507if ac_fn_c_try_link "$LINENO"; then :
10508 ac_cv_lib_SM_SmcOpenConnection=yes
8732a4e9 10509else
8c5ff6dd
KR
10510 ac_cv_lib_SM_SmcOpenConnection=no
10511fi
10512rm -f core conftest.err conftest.$ac_objext \
10513 conftest$ac_exeext conftest.$ac_ext
10514LIBS=$ac_check_lib_save_LIBS
10515fi
10516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
10517$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
10518if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
10519 HAVE_X_SM=yes
10520fi
49ebbd65 10521
e6df49e4 10522fi
49ebbd65 10523
8c5ff6dd
KR
10524
10525
10526 if test "${HAVE_X_SM}" = "yes"; then
10527
10528$as_echo "#define HAVE_X_SM 1" >>confdefs.h
10529
10530 LIBXSM="-lSM -lICE"
10531 case "$LIBS" in
10532 *-lSM*) ;;
10533 *) LIBS="$LIBXSM $LIBS" ;;
10534 esac
10535 fi
10536fi
10537
10538
10539# If netdb.h doesn't declare h_errno, we must declare it by hand.
10540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
10541$as_echo_n "checking whether netdb declares h_errno... " >&6; }
10542if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
10543 $as_echo_n "(cached) " >&6
10544else
10545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 10546/* end confdefs.h. */
8c5ff6dd 10547#include <netdb.h>
0c309b80
GM
10548int
10549main ()
10550{
8c5ff6dd 10551return h_errno;
e6df49e4
GM
10552 ;
10553 return 0;
0c309b80 10554}
91e84f96 10555_ACEOF
8c5ff6dd
KR
10556if ac_fn_c_try_link "$LINENO"; then :
10557 emacs_cv_netdb_declares_h_errno=yes
9452ded1 10558else
8c5ff6dd 10559 emacs_cv_netdb_declares_h_errno=no
a4f64981 10560fi
8c5ff6dd
KR
10561rm -f core conftest.err conftest.$ac_objext \
10562 conftest$ac_exeext conftest.$ac_ext
a4f64981 10563fi
8c5ff6dd
KR
10564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
10565$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
10566if test $emacs_cv_netdb_declares_h_errno = yes; then
15e12598 10567
8c5ff6dd 10568$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
15e12598 10569
a4f64981 10570fi
15e12598 10571
8c5ff6dd
KR
10572# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10573# for constant arguments. Useless!
10574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10575$as_echo_n "checking for working alloca.h... " >&6; }
10576if test "${ac_cv_working_alloca_h+set}" = set; then :
10577 $as_echo_n "(cached) " >&6
10578else
10579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10580/* end confdefs.h. */
10581#include <alloca.h>
7186fb09
GM
10582int
10583main ()
10584{
8c5ff6dd
KR
10585char *p = (char *) alloca (2 * sizeof (int));
10586 if (p) return 0;
a4f64981
GM
10587 ;
10588 return 0;
7186fb09 10589}
0c309b80 10590_ACEOF
8c5ff6dd
KR
10591if ac_fn_c_try_link "$LINENO"; then :
10592 ac_cv_working_alloca_h=yes
aaa36002 10593else
8c5ff6dd
KR
10594 ac_cv_working_alloca_h=no
10595fi
10596rm -f core conftest.err conftest.$ac_objext \
10597 conftest$ac_exeext conftest.$ac_ext
e6df49e4 10598fi
8c5ff6dd
KR
10599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10600$as_echo "$ac_cv_working_alloca_h" >&6; }
10601if test $ac_cv_working_alloca_h = yes; then
10602
10603$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
15e12598 10604
15e12598 10605fi
8c5ff6dd
KR
10606
10607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10608$as_echo_n "checking for alloca... " >&6; }
10609if test "${ac_cv_func_alloca_works+set}" = set; then :
08b47d3d
JD
10610 $as_echo_n "(cached) " >&6
10611else
8c5ff6dd 10612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
08b47d3d 10613/* end confdefs.h. */
8c5ff6dd
KR
10614#ifdef __GNUC__
10615# define alloca __builtin_alloca
a4f64981 10616#else
8c5ff6dd
KR
10617# ifdef _MSC_VER
10618# include <malloc.h>
10619# define alloca _alloca
10620# else
10621# ifdef HAVE_ALLOCA_H
10622# include <alloca.h>
10623# else
10624# ifdef _AIX
10625 #pragma alloca
10626# else
10627# ifndef alloca /* predefined by HP cc +Olibcalls */
10628char *alloca ();
10629# endif
10630# endif
10631# endif
10632# endif
a4f64981
GM
10633#endif
10634
08b47d3d
JD
10635int
10636main ()
10637{
8c5ff6dd
KR
10638char *p = (char *) alloca (1);
10639 if (p) return 0;
08b47d3d
JD
10640 ;
10641 return 0;
10642}
7186fb09 10643_ACEOF
8c5ff6dd
KR
10644if ac_fn_c_try_link "$LINENO"; then :
10645 ac_cv_func_alloca_works=yes
cd03c74a 10646else
8c5ff6dd 10647 ac_cv_func_alloca_works=no
15e12598 10648fi
8c5ff6dd
KR
10649rm -f core conftest.err conftest.$ac_objext \
10650 conftest$ac_exeext conftest.$ac_ext
a4f64981 10651fi
8c5ff6dd
KR
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10653$as_echo "$ac_cv_func_alloca_works" >&6; }
10654
10655if test $ac_cv_func_alloca_works = yes; then
10656
10657$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10658
a4f64981 10659else
8c5ff6dd
KR
10660 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10661# that cause trouble. Some versions do not even contain alloca or
10662# contain a buggy version. If you still want to use their alloca,
10663# use ar to extract alloca.o from them instead of compiling alloca.c.
10664
10665ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10666
10667$as_echo "#define C_ALLOCA 1" >>confdefs.h
10668
10669
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10671$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10672if test "${ac_cv_os_cray+set}" = set; then :
a5edbe4a
GM
10673 $as_echo_n "(cached) " >&6
10674else
8c5ff6dd
KR
10675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10676/* end confdefs.h. */
10677#if defined CRAY && ! defined CRAY2
10678webecray
10679#else
10680wenotbecray
10681#endif
10682
10683_ACEOF
10684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10685 $EGREP "webecray" >/dev/null 2>&1; then :
10686 ac_cv_os_cray=yes
10687else
10688 ac_cv_os_cray=no
10689fi
10690rm -f conftest*
10691
10692fi
10693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10694$as_echo "$ac_cv_os_cray" >&6; }
10695if test $ac_cv_os_cray = yes; then
10696 for ac_func in _getb67 GETB67 getb67; do
10697 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10698ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10699eval as_val=\$$as_ac_var
10700 if test "x$as_val" = x""yes; then :
10701
10702cat >>confdefs.h <<_ACEOF
10703#define CRAY_STACKSEG_END $ac_func
a4f64981 10704_ACEOF
8c5ff6dd
KR
10705
10706 break
10707fi
10708
10709 done
10710fi
10711
10712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10713$as_echo_n "checking stack direction for C alloca... " >&6; }
10714if test "${ac_cv_c_stack_direction+set}" = set; then :
10715 $as_echo_n "(cached) " >&6
10716else
10717 if test "$cross_compiling" = yes; then :
10718 ac_cv_c_stack_direction=0
10719else
10720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a5edbe4a 10721/* end confdefs.h. */
8c5ff6dd
KR
10722$ac_includes_default
10723int
10724find_stack_direction ()
10725{
10726 static char *addr = 0;
10727 auto char dummy;
10728 if (addr == 0)
10729 {
10730 addr = &dummy;
10731 return find_stack_direction ();
10732 }
10733 else
10734 return (&dummy > addr) ? 1 : -1;
10735}
aaa36002 10736
a5edbe4a
GM
10737int
10738main ()
10739{
8c5ff6dd 10740 return find_stack_direction () < 0;
a5edbe4a 10741}
08b47d3d 10742_ACEOF
8c5ff6dd
KR
10743if ac_fn_c_try_run "$LINENO"; then :
10744 ac_cv_c_stack_direction=1
49ebbd65 10745else
8c5ff6dd
KR
10746 ac_cv_c_stack_direction=-1
10747fi
10748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10749 conftest.$ac_objext conftest.beam conftest.$ac_ext
10750fi
a4f64981 10751
49ebbd65 10752fi
8c5ff6dd
KR
10753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10754$as_echo "$ac_cv_c_stack_direction" >&6; }
10755cat >>confdefs.h <<_ACEOF
10756#define STACK_DIRECTION $ac_cv_c_stack_direction
10757_ACEOF
10758
a4f64981 10759
49ebbd65 10760fi
8c5ff6dd
KR
10761
10762
10763if test x"$ac_cv_func_alloca_works" != xyes; then
10764 as_fn_error "a system implementation of alloca is required " "$LINENO" 5
10765fi
10766
10767# fmod, logb, and frexp are found in -lm on most systems.
10768# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
10770$as_echo_n "checking for sqrt in -lm... " >&6; }
10771if test "${ac_cv_lib_m_sqrt+set}" = set; then :
e6df49e4
GM
10772 $as_echo_n "(cached) " >&6
10773else
15e12598 10774 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
10775LIBS="-lm $LIBS"
10776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 10777/* end confdefs.h. */
cd03c74a 10778
e6df49e4
GM
10779/* Override any GCC internal prototype to avoid an error.
10780 Use char because int might match the return type of a GCC
10781 builtin and then its argument prototype would still apply. */
10782#ifdef __cplusplus
10783extern "C"
10784#endif
8c5ff6dd 10785char sqrt ();
e6df49e4
GM
10786int
10787main ()
10788{
8c5ff6dd 10789return sqrt ();
e6df49e4
GM
10790 ;
10791 return 0;
10792}
a5edbe4a 10793_ACEOF
8c5ff6dd
KR
10794if ac_fn_c_try_link "$LINENO"; then :
10795 ac_cv_lib_m_sqrt=yes
15e12598 10796else
8c5ff6dd 10797 ac_cv_lib_m_sqrt=no
15e12598 10798fi
8c5ff6dd
KR
10799rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
a4f64981 10801LIBS=$ac_check_lib_save_LIBS
15e12598 10802fi
8c5ff6dd
KR
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
10804$as_echo "$ac_cv_lib_m_sqrt" >&6; }
10805if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
10806 cat >>confdefs.h <<_ACEOF
10807#define HAVE_LIBM 1
a4f64981 10808_ACEOF
15e12598 10809
8c5ff6dd
KR
10810 LIBS="-lm $LIBS"
10811
10812fi
49ebbd65 10813
49ebbd65 10814
8c5ff6dd
KR
10815# Check for mail-locking functions in a "mail" library. Probably this should
10816# have the same check as for liblockfile below.
10817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
10818$as_echo_n "checking for maillock in -lmail... " >&6; }
10819if test "${ac_cv_lib_mail_maillock+set}" = set; then :
10820 $as_echo_n "(cached) " >&6
10821else
10822 ac_check_lib_save_LIBS=$LIBS
10823LIBS="-lmail $LIBS"
10824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10825/* end confdefs.h. */
15e12598 10826
a4f64981
GM
10827/* Override any GCC internal prototype to avoid an error.
10828 Use char because int might match the return type of a GCC
10829 builtin and then its argument prototype would still apply. */
10830#ifdef __cplusplus
10831extern "C"
10832#endif
8c5ff6dd 10833char maillock ();
a4f64981
GM
10834int
10835main ()
10836{
8c5ff6dd 10837return maillock ();
a4f64981
GM
10838 ;
10839 return 0;
10840}
e6df49e4 10841_ACEOF
8c5ff6dd
KR
10842if ac_fn_c_try_link "$LINENO"; then :
10843 ac_cv_lib_mail_maillock=yes
a4f64981 10844else
8c5ff6dd 10845 ac_cv_lib_mail_maillock=no
e6df49e4 10846fi
8c5ff6dd
KR
10847rm -f core conftest.err conftest.$ac_objext \
10848 conftest$ac_exeext conftest.$ac_ext
10849LIBS=$ac_check_lib_save_LIBS
a4f64981 10850fi
8c5ff6dd
KR
10851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
10852$as_echo "$ac_cv_lib_mail_maillock" >&6; }
10853if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
10854 have_mail=yes
e6df49e4 10855else
8c5ff6dd
KR
10856 have_mail=no
10857fi
10858
10859if test $have_mail = yes; then
10860 LIBS_MAIL=-lmail
10861 LIBS="$LIBS_MAIL $LIBS"
10862
10863$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
10864
10865else
10866 LIBS_MAIL=
10867fi
10868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
10869$as_echo_n "checking for maillock in -llockfile... " >&6; }
10870if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
a4f64981 10871 $as_echo_n "(cached) " >&6
15e12598 10872else
a4f64981 10873 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
10874LIBS="-llockfile $LIBS"
10875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 10876/* end confdefs.h. */
15e12598 10877
a4f64981
GM
10878/* Override any GCC internal prototype to avoid an error.
10879 Use char because int might match the return type of a GCC
10880 builtin and then its argument prototype would still apply. */
10881#ifdef __cplusplus
10882extern "C"
15e12598 10883#endif
8c5ff6dd 10884char maillock ();
a4f64981
GM
10885int
10886main ()
15e12598 10887{
8c5ff6dd 10888return maillock ();
a4f64981
GM
10889 ;
10890 return 0;
15e12598 10891}
a4f64981 10892_ACEOF
8c5ff6dd
KR
10893if ac_fn_c_try_link "$LINENO"; then :
10894 ac_cv_lib_lockfile_maillock=yes
a4f64981 10895else
8c5ff6dd 10896 ac_cv_lib_lockfile_maillock=no
a4f64981 10897fi
8c5ff6dd
KR
10898rm -f core conftest.err conftest.$ac_objext \
10899 conftest$ac_exeext conftest.$ac_ext
a4f64981
GM
10900LIBS=$ac_check_lib_save_LIBS
10901fi
8c5ff6dd
KR
10902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
10903$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
10904if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
10905 have_lockfile=yes
a4f64981 10906else
8c5ff6dd 10907 have_lockfile=no
a4f64981 10908fi
15e12598 10909
8c5ff6dd
KR
10910if test $have_lockfile = yes; then
10911 LIBS_MAIL=-llockfile
10912 LIBS="$LIBS_MAIL $LIBS"
10913
10914$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
10915
10916else
10917# If we have the shared liblockfile, assume we must use it for mail
10918# locking (e.g. Debian). If we couldn't link against liblockfile
10919# (no liblockfile.a installed), ensure that we don't need to.
10920 # Extract the first word of "liblockfile.so", so it can be a program name with args.
10921set dummy liblockfile.so; ac_word=$2
10922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10923$as_echo_n "checking for $ac_word... " >&6; }
10924if test "${ac_cv_prog_liblockfile+set}" = set; then :
10925 $as_echo_n "(cached) " >&6
10926else
10927 if test -n "$liblockfile"; then
10928 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
10929else
10930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10931as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
10932for as_dir in $as_dummy
10933do
10934 IFS=$as_save_IFS
10935 test -z "$as_dir" && as_dir=.
10936 for ac_exec_ext in '' $ac_executable_extensions; do
10937 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10938 ac_cv_prog_liblockfile="yes"
10939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10940 break 2
10941 fi
10942done
10943 done
10944IFS=$as_save_IFS
10945
10946 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
10947fi
10948fi
10949liblockfile=$ac_cv_prog_liblockfile
10950if test -n "$liblockfile"; then
10951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
10952$as_echo "$liblockfile" >&6; }
10953else
10954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
a4f64981 10956fi
15e12598 10957
15e12598 10958
8c5ff6dd
KR
10959 if test $ac_cv_prog_liblockfile = yes; then
10960 as_fn_error "Shared liblockfile found but can't link against it.
10961This probably means that movemail could lose mail.
10962There may be a \`development' package to install containing liblockfile." "$LINENO" 5
10963 fi
10964fi
10965for ac_func in touchlock
10966do :
10967 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
10968if test "x$ac_cv_func_touchlock" = x""yes; then :
10969 cat >>confdefs.h <<_ACEOF
10970#define HAVE_TOUCHLOCK 1
10971_ACEOF
10972
10973fi
10974done
10975
10976for ac_header in maillock.h
10977do :
10978 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
10979if test "x$ac_cv_header_maillock_h" = x""yes; then :
10980 cat >>confdefs.h <<_ACEOF
10981#define HAVE_MAILLOCK_H 1
10982_ACEOF
10983
10984fi
10985
10986done
10987
10988
10989
10990## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
10991## interlock access to the mail spool. The alternative is a lock file named
10992## /usr/spool/mail/$USER.lock.
10993mail_lock=no
10994case "$opsys" in
10995 aix4-2) mail_lock="lockf" ;;
10996
10997 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
10998
10999 ## On GNU/Linux systems, both methods are used by various mail programs.
11000 ## I assume most people are using newer mailers that have heard of flock.
11001 ## Change this if you need to.
11002 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
11003 ## configure gets the right answers, and that means *NOT* using flock.
11004 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
11005 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
11006 ## Debian maintainer hasn't provided a clean fix for Emacs.
11007 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
11008 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
11009 ## correct logic. -- fx
11010 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
11011 ## liblockfile is a Free Software replacement for libmail, used on
11012 ## Debian systems and elsewhere. -rfr.
11013 gnu-*)
11014 mail_lock="flock"
11015 if test $have_mail = yes || test $have_lockfile = yes; then
11016 test $ac_cv_header_maillock_h = yes && mail_lock=no
11017 fi
11018 ;;
11019esac
11020
11021BLESSMAIL_TARGET=
11022case "$mail_lock" in
11023 flock)
11024$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
11025 ;;
11026
11027 lockf)
11028$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
11029 ;;
11030
11031 *) BLESSMAIL_TARGET="need-blessmail" ;;
11032esac
11033
11034
11035
11036for ac_func in gethostname getdomainname dup2 \
11037rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
11038random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
11039strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11040utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
11041__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
11042sendto recvfrom getsockopt setsockopt getsockname getpeername \
11043gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
11044memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
11045cfmakeraw cfsetspeed isnan copysign
11046do :
11047 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11048ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11049eval as_val=\$$as_ac_var
11050 if test "x$as_val" = x""yes; then :
11051 cat >>confdefs.h <<_ACEOF
11052#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11053_ACEOF
11054
11055fi
11056done
11057
11058
11059for ac_header in sys/un.h
11060do :
11061 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
11062if test "x$ac_cv_header_sys_un_h" = x""yes; then :
11063 cat >>confdefs.h <<_ACEOF
11064#define HAVE_SYS_UN_H 1
11065_ACEOF
11066
11067fi
11068
11069done
11070
11071
11072
11073
11074
11075
11076
11077 for ac_func in $ac_func_list
11078do :
11079 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11080ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11081eval as_val=\$$as_ac_var
11082 if test "x$as_val" = x""yes; then :
11083 cat >>confdefs.h <<_ACEOF
11084#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11085_ACEOF
11086
11087fi
11088done
11089
11090
11091
11092
11093
11094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
11095$as_echo_n "checking for working mktime... " >&6; }
11096if test "${ac_cv_func_working_mktime+set}" = set; then :
11097 $as_echo_n "(cached) " >&6
11098else
11099 if test "$cross_compiling" = yes; then :
11100 ac_cv_func_working_mktime=no
11101else
11102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11103/* end confdefs.h. */
11104/* Test program from Paul Eggert and Tony Leneis. */
11105#ifdef TIME_WITH_SYS_TIME
11106# include <sys/time.h>
11107# include <time.h>
11108#else
11109# ifdef HAVE_SYS_TIME_H
11110# include <sys/time.h>
11111# else
11112# include <time.h>
11113# endif
11114#endif
11115
11116#include <limits.h>
11117#include <stdlib.h>
11118
11119#ifdef HAVE_UNISTD_H
11120# include <unistd.h>
11121#endif
11122
11123#ifndef HAVE_ALARM
11124# define alarm(X) /* empty */
11125#endif
15e12598 11126
8c5ff6dd
KR
11127/* Work around redefinition to rpl_putenv by other config tests. */
11128#undef putenv
15e12598 11129
8c5ff6dd
KR
11130static time_t time_t_max;
11131static time_t time_t_min;
15e12598 11132
8c5ff6dd
KR
11133/* Values we'll use to set the TZ environment variable. */
11134static char *tz_strings[] = {
11135 (char *) 0, "TZ=GMT0", "TZ=JST-9",
11136 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11137};
11138#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
15e12598 11139
8c5ff6dd
KR
11140/* Return 0 if mktime fails to convert a date in the spring-forward gap.
11141 Based on a problem report from Andreas Jaeger. */
11142static int
11143spring_forward_gap ()
11144{
11145 /* glibc (up to about 1998-10-07) failed this test. */
11146 struct tm tm;
15e12598 11147
8c5ff6dd
KR
11148 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11149 instead of "TZ=America/Vancouver" in order to detect the bug even
11150 on systems that don't support the Olson extension, or don't have the
11151 full zoneinfo tables installed. */
11152 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15e12598 11153
8c5ff6dd
KR
11154 tm.tm_year = 98;
11155 tm.tm_mon = 3;
11156 tm.tm_mday = 5;
11157 tm.tm_hour = 2;
11158 tm.tm_min = 0;
11159 tm.tm_sec = 0;
11160 tm.tm_isdst = -1;
11161 return mktime (&tm) != (time_t) -1;
11162}
15e12598 11163
8c5ff6dd
KR
11164static int
11165mktime_test1 (now)
11166 time_t now;
11167{
11168 struct tm *lt;
11169 return ! (lt = localtime (&now)) || mktime (lt) == now;
11170}
15e12598 11171
8c5ff6dd
KR
11172static int
11173mktime_test (now)
11174 time_t now;
11175{
11176 return (mktime_test1 (now)
11177 && mktime_test1 ((time_t) (time_t_max - now))
11178 && mktime_test1 ((time_t) (time_t_min + now)));
11179}
15e12598 11180
8c5ff6dd
KR
11181static int
11182irix_6_4_bug ()
11183{
11184 /* Based on code from Ariel Faigon. */
11185 struct tm tm;
11186 tm.tm_year = 96;
11187 tm.tm_mon = 3;
11188 tm.tm_mday = 0;
11189 tm.tm_hour = 0;
11190 tm.tm_min = 0;
11191 tm.tm_sec = 0;
11192 tm.tm_isdst = -1;
11193 mktime (&tm);
11194 return tm.tm_mon == 2 && tm.tm_mday == 31;
11195}
15e12598 11196
8c5ff6dd
KR
11197static int
11198bigtime_test (j)
11199 int j;
a4f64981 11200{
8c5ff6dd
KR
11201 struct tm tm;
11202 time_t now;
11203 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11204 now = mktime (&tm);
11205 if (now != (time_t) -1)
11206 {
11207 struct tm *lt = localtime (&now);
11208 if (! (lt
11209 && lt->tm_year == tm.tm_year
11210 && lt->tm_mon == tm.tm_mon
11211 && lt->tm_mday == tm.tm_mday
11212 && lt->tm_hour == tm.tm_hour
11213 && lt->tm_min == tm.tm_min
11214 && lt->tm_sec == tm.tm_sec
11215 && lt->tm_yday == tm.tm_yday
11216 && lt->tm_wday == tm.tm_wday
11217 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11218 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11219 return 0;
11220 }
11221 return 1;
7186fb09 11222}
49ebbd65 11223
8c5ff6dd
KR
11224static int
11225year_2050_test ()
11226{
11227 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
11228 ignoring leap seconds. */
11229 unsigned long int answer = 2527315200UL;
15e12598 11230
8c5ff6dd
KR
11231 struct tm tm;
11232 time_t t;
11233 tm.tm_year = 2050 - 1900;
11234 tm.tm_mon = 2 - 1;
11235 tm.tm_mday = 1;
11236 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
11237 tm.tm_isdst = -1;
a5edbe4a 11238
8c5ff6dd
KR
11239 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11240 instead of "TZ=America/Vancouver" in order to detect the bug even
11241 on systems that don't support the Olson extension, or don't have the
11242 full zoneinfo tables installed. */
11243 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
49ebbd65 11244
8c5ff6dd 11245 t = mktime (&tm);
15e12598 11246
8c5ff6dd
KR
11247 /* Check that the result is either a failure, or close enough
11248 to the correct answer that we can assume the discrepancy is
11249 due to leap seconds. */
11250 return (t == (time_t) -1
11251 || (0 < t && answer - 120 <= t && t <= answer + 120));
11252}
e6df49e4 11253
a4f64981
GM
11254int
11255main ()
11256{
8c5ff6dd
KR
11257 time_t t, delta;
11258 int i, j;
11259
11260 /* This test makes some buggy mktime implementations loop.
11261 Give up after 60 seconds; a mktime slower than that
11262 isn't worth using anyway. */
11263 alarm (60);
11264
11265 for (;;)
11266 {
11267 t = (time_t_max << 1) + 1;
11268 if (t <= time_t_max)
11269 break;
11270 time_t_max = t;
11271 }
11272 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
11273
11274 delta = time_t_max / 997; /* a suitable prime number */
11275 for (i = 0; i < N_STRINGS; i++)
11276 {
11277 if (tz_strings[i])
11278 putenv (tz_strings[i]);
11279
11280 for (t = 0; t <= time_t_max - delta; t += delta)
11281 if (! mktime_test (t))
11282 return 1;
11283 if (! (mktime_test ((time_t) 1)
11284 && mktime_test ((time_t) (60 * 60))
11285 && mktime_test ((time_t) (60 * 60 * 24))))
11286 return 1;
11287
11288 for (j = 1; ; j <<= 1)
11289 if (! bigtime_test (j))
11290 return 1;
11291 else if (INT_MAX / 2 < j)
11292 break;
11293 if (! bigtime_test (INT_MAX))
11294 return 1;
11295 }
11296 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
a4f64981 11297}
e6df49e4 11298_ACEOF
8c5ff6dd
KR
11299if ac_fn_c_try_run "$LINENO"; then :
11300 ac_cv_func_working_mktime=yes
a4f64981 11301else
8c5ff6dd
KR
11302 ac_cv_func_working_mktime=no
11303fi
11304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11305 conftest.$ac_objext conftest.beam conftest.$ac_ext
11306fi
11307
11308fi
11309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
11310$as_echo "$ac_cv_func_working_mktime" >&6; }
11311if test $ac_cv_func_working_mktime = no; then
11312 case " $LIBOBJS " in
11313 *" mktime.$ac_objext "* ) ;;
11314 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
11315 ;;
11316esac
49ebbd65 11317
15e12598 11318fi
15e12598 11319
8c5ff6dd
KR
11320if test "$ac_cv_func_working_mktime" = no; then
11321
11322$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
11323
a4f64981 11324fi
8c5ff6dd
KR
11325
11326ac_have_func=no # yes means we've found a way to get the load average.
11327
11328# Make sure getloadavg.c is where it belongs, at configure-time.
11329test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
11330 as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
11331
11332ac_save_LIBS=$LIBS
11333
11334# Check for getloadavg, but be sure not to touch the cache variable.
11335(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11336if test "x$ac_cv_func_getloadavg" = x""yes; then :
11337 exit 0
a4f64981 11338else
8c5ff6dd 11339 exit 1
a4f64981 11340fi
8c5ff6dd 11341) && ac_have_func=yes
15e12598 11342
8c5ff6dd
KR
11343# On HPUX9, an unprivileged user can get load averages through this function.
11344for ac_func in pstat_getdynamic
11345do :
11346 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
11347if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
11348 cat >>confdefs.h <<_ACEOF
11349#define HAVE_PSTAT_GETDYNAMIC 1
a4f64981
GM
11350_ACEOF
11351
8c5ff6dd
KR
11352fi
11353done
11354
11355
11356# Solaris has libkstat which does not require root.
11357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
11358$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
11359if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
e9a63f04 11360 $as_echo_n "(cached) " >&6
98418dba 11361else
0ca10bb7 11362 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
11363LIBS="-lkstat $LIBS"
11364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11365/* end confdefs.h. */
ca81d7a0 11366
0ca10bb7
RC
11367/* Override any GCC internal prototype to avoid an error.
11368 Use char because int might match the return type of a GCC
11369 builtin and then its argument prototype would still apply. */
11370#ifdef __cplusplus
11371extern "C"
11372#endif
8c5ff6dd 11373char kstat_open ();
0ca10bb7
RC
11374int
11375main ()
11376{
8c5ff6dd 11377return kstat_open ();
0ca10bb7
RC
11378 ;
11379 return 0;
11380}
503d2be0 11381_ACEOF
8c5ff6dd
KR
11382if ac_fn_c_try_link "$LINENO"; then :
11383 ac_cv_lib_kstat_kstat_open=yes
503d2be0 11384else
8c5ff6dd 11385 ac_cv_lib_kstat_kstat_open=no
a21616bd 11386fi
8c5ff6dd
KR
11387rm -f core conftest.err conftest.$ac_objext \
11388 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11389LIBS=$ac_check_lib_save_LIBS
11390fi
8c5ff6dd
KR
11391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
11392$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
11393if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
11394 cat >>confdefs.h <<_ACEOF
11395#define HAVE_LIBKSTAT 1
11396_ACEOF
e6df49e4 11397
8c5ff6dd 11398 LIBS="-lkstat $LIBS"
15e12598 11399
8c5ff6dd 11400fi
a4f64981 11401
8c5ff6dd
KR
11402test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
11403
11404# Some systems with -lutil have (and need) -lkvm as well, some do not.
11405# On Solaris, -lkvm requires nlist from -lelf, so check that first
11406# to get the right answer into the cache.
11407# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11408if test $ac_have_func = no; then
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
11410$as_echo_n "checking for elf_begin in -lelf... " >&6; }
11411if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
e9a63f04 11412 $as_echo_n "(cached) " >&6
21287a21 11413else
0ca10bb7 11414 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
11415LIBS="-lelf $LIBS"
11416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11417/* end confdefs.h. */
21287a21 11418
0ca10bb7
RC
11419/* Override any GCC internal prototype to avoid an error.
11420 Use char because int might match the return type of a GCC
11421 builtin and then its argument prototype would still apply. */
11422#ifdef __cplusplus
11423extern "C"
11424#endif
8c5ff6dd 11425char elf_begin ();
21287a21
CY
11426int
11427main ()
11428{
8c5ff6dd 11429return elf_begin ();
21287a21
CY
11430 ;
11431 return 0;
11432}
11433_ACEOF
8c5ff6dd
KR
11434if ac_fn_c_try_link "$LINENO"; then :
11435 ac_cv_lib_elf_elf_begin=yes
21287a21 11436else
8c5ff6dd 11437 ac_cv_lib_elf_elf_begin=no
0ca10bb7 11438fi
8c5ff6dd
KR
11439rm -f core conftest.err conftest.$ac_objext \
11440 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11441LIBS=$ac_check_lib_save_LIBS
11442fi
8c5ff6dd
KR
11443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
11444$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
11445if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
11446 LIBS="-lelf $LIBS"
6da23aaa 11447fi
bf89cb4d 11448
8c5ff6dd
KR
11449fi
11450if test $ac_have_func = no; then
11451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
11452$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
11453if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
0ca10bb7
RC
11454 $as_echo_n "(cached) " >&6
11455else
11456 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
11457LIBS="-lkvm $LIBS"
11458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11459/* end confdefs.h. */
21287a21 11460
0ca10bb7
RC
11461/* Override any GCC internal prototype to avoid an error.
11462 Use char because int might match the return type of a GCC
11463 builtin and then its argument prototype would still apply. */
11464#ifdef __cplusplus
11465extern "C"
9452ded1 11466#endif
8c5ff6dd 11467char kvm_open ();
9452ded1
DN
11468int
11469main ()
11470{
8c5ff6dd 11471return kvm_open ();
9452ded1
DN
11472 ;
11473 return 0;
11474}
11475_ACEOF
8c5ff6dd
KR
11476if ac_fn_c_try_link "$LINENO"; then :
11477 ac_cv_lib_kvm_kvm_open=yes
21287a21 11478else
8c5ff6dd 11479 ac_cv_lib_kvm_kvm_open=no
21287a21 11480fi
8c5ff6dd
KR
11481rm -f core conftest.err conftest.$ac_objext \
11482 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 11483LIBS=$ac_check_lib_save_LIBS
21287a21 11484fi
8c5ff6dd
KR
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
11486$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
11487if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
11488 LIBS="-lkvm $LIBS"
21287a21 11489fi
21287a21 11490
8c5ff6dd
KR
11491 # Check for the 4.4BSD definition of getloadavg.
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
11493$as_echo_n "checking for getloadavg in -lutil... " >&6; }
11494if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
e9a63f04 11495 $as_echo_n "(cached) " >&6
21287a21 11496else
0ca10bb7 11497 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
11498LIBS="-lutil $LIBS"
11499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11500/* end confdefs.h. */
21287a21 11501
0ca10bb7
RC
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"
15e12598 11507#endif
8c5ff6dd 11508char getloadavg ();
15e12598
VB
11509int
11510main ()
11511{
8c5ff6dd 11512return getloadavg ();
15e12598
VB
11513 ;
11514 return 0;
11515}
11516_ACEOF
8c5ff6dd
KR
11517if ac_fn_c_try_link "$LINENO"; then :
11518 ac_cv_lib_util_getloadavg=yes
0ca10bb7 11519else
8c5ff6dd 11520 ac_cv_lib_util_getloadavg=no
0ca10bb7 11521fi
8c5ff6dd
KR
11522rm -f core conftest.err conftest.$ac_objext \
11523 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
11524LIBS=$ac_check_lib_save_LIBS
11525fi
8c5ff6dd
KR
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
11527$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
11528if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
11529 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
6da23aaa
EZ
11530fi
11531
8c5ff6dd 11532fi
a4f64981 11533
8c5ff6dd
KR
11534if test $ac_have_func = no; then
11535 # There is a commonly available library for RS/6000 AIX.
11536 # Since it is not a standard part of AIX, it might be installed locally.
11537 ac_getloadavg_LIBS=$LIBS
11538 LIBS="-L/usr/local/lib $LIBS"
11539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
11540$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
11541if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
0ca10bb7
RC
11542 $as_echo_n "(cached) " >&6
11543else
11544 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
11545LIBS="-lgetloadavg $LIBS"
11546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11547/* end confdefs.h. */
21287a21 11548
0ca10bb7
RC
11549/* Override any GCC internal prototype to avoid an error.
11550 Use char because int might match the return type of a GCC
11551 builtin and then its argument prototype would still apply. */
11552#ifdef __cplusplus
11553extern "C"
11554#endif
8c5ff6dd 11555char getloadavg ();
21287a21
CY
11556int
11557main ()
11558{
8c5ff6dd 11559return getloadavg ();
21287a21
CY
11560 ;
11561 return 0;
11562}
11563_ACEOF
8c5ff6dd
KR
11564if ac_fn_c_try_link "$LINENO"; then :
11565 ac_cv_lib_getloadavg_getloadavg=yes
bf89cb4d 11566else
8c5ff6dd 11567 ac_cv_lib_getloadavg_getloadavg=no
0c309b80 11568fi
8c5ff6dd
KR
11569rm -f core conftest.err conftest.$ac_objext \
11570 conftest$ac_exeext conftest.$ac_ext
7186fb09 11571LIBS=$ac_check_lib_save_LIBS
9452ded1 11572fi
8c5ff6dd
KR
11573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
11574$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
11575if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
11576 LIBS="-lgetloadavg $LIBS"
7186fb09 11577else
8c5ff6dd
KR
11578 LIBS=$ac_getloadavg_LIBS
11579fi
11580
9452ded1
DN
11581fi
11582
8c5ff6dd
KR
11583# Make sure it is really in the library, if we think we found it,
11584# otherwise set up the replacement function.
11585for ac_func in getloadavg
11586do :
11587 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11588if test "x$ac_cv_func_getloadavg" = x""yes; then :
11589 cat >>confdefs.h <<_ACEOF
11590#define HAVE_GETLOADAVG 1
11591_ACEOF
11592
11593else
11594 case " $LIBOBJS " in
11595 *" getloadavg.$ac_objext "* ) ;;
11596 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
11597 ;;
11598esac
11599
11600
11601$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
11602
11603# Figure out what our getloadavg.c needs.
11604ac_have_func=no
11605ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
11606if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
11607 ac_have_func=yes
0c309b80 11608
8c5ff6dd 11609$as_echo "#define DGUX 1" >>confdefs.h
9452ded1 11610
8c5ff6dd
KR
11611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
11612$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
11613if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
7186fb09
GM
11614 $as_echo_n "(cached) " >&6
11615else
aaa36002 11616 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
11617LIBS="-ldgc $LIBS"
11618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11619/* end confdefs.h. */
7186fb09 11620
aaa36002
DN
11621/* Override any GCC internal prototype to avoid an error.
11622 Use char because int might match the return type of a GCC
11623 builtin and then its argument prototype would still apply. */
11624#ifdef __cplusplus
11625extern "C"
11626#endif
8c5ff6dd 11627char dg_sys_info ();
8732a4e9
MB
11628int
11629main ()
11630{
8c5ff6dd 11631return dg_sys_info ();
0c309b80
GM
11632 ;
11633 return 0;
11634}
11635_ACEOF
8c5ff6dd
KR
11636if ac_fn_c_try_link "$LINENO"; then :
11637 ac_cv_lib_dgc_dg_sys_info=yes
7186fb09 11638else
8c5ff6dd 11639 ac_cv_lib_dgc_dg_sys_info=no
e6df49e4 11640fi
8c5ff6dd
KR
11641rm -f core conftest.err conftest.$ac_objext \
11642 conftest$ac_exeext conftest.$ac_ext
a4f64981 11643LIBS=$ac_check_lib_save_LIBS
15e12598 11644fi
8c5ff6dd
KR
11645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
11646$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
11647if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
11648 cat >>confdefs.h <<_ACEOF
11649#define HAVE_LIBDGC 1
11650_ACEOF
11651
11652 LIBS="-ldgc $LIBS"
11653
15e12598
VB
11654fi
11655
8c5ff6dd 11656fi
e6df49e4 11657
15e12598
VB
11658
11659
8c5ff6dd
KR
11660ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11661if test "x$ac_cv_header_locale_h" = x""yes; then :
15e12598 11662
a4f64981 11663fi
8c5ff6dd
KR
11664
11665
11666for ac_func in setlocale
11667do :
11668 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
11669if test "x$ac_cv_func_setlocale" = x""yes; then :
11670 cat >>confdefs.h <<_ACEOF
11671#define HAVE_SETLOCALE 1
08b47d3d 11672_ACEOF
15e12598 11673
7186fb09 11674fi
8c5ff6dd 11675done
bf89cb4d 11676
15e12598 11677
8c5ff6dd
KR
11678# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
11679# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
11680# Irix 4.0.5F has the header but not the library.
11681if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
11682 ac_have_func=yes
11683
11684$as_echo "#define SVR4 1" >>confdefs.h
a4f64981 11685
15e12598 11686fi
08b47d3d 11687
8c5ff6dd
KR
11688if test $ac_have_func = no; then
11689 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
11690if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
11691 ac_have_func=yes
cd03c74a 11692
8c5ff6dd
KR
11693$as_echo "#define UMAX 1" >>confdefs.h
11694
11695
11696$as_echo "#define UMAX4_3 1" >>confdefs.h
cd03c74a 11697
a4f64981 11698fi
8c5ff6dd
KR
11699
11700
11701fi
11702
11703if test $ac_have_func = no; then
11704 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
11705if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
11706 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
11707
11708fi
11709
a4f64981
GM
11710
11711fi
8c5ff6dd
KR
11712
11713if test $ac_have_func = no; then
11714 for ac_header in mach/mach.h
11715do :
11716 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
11717if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
a4f64981 11718 cat >>confdefs.h <<_ACEOF
8c5ff6dd 11719#define HAVE_MACH_MACH_H 1
a4f64981 11720_ACEOF
a4f64981 11721
8c5ff6dd
KR
11722fi
11723
11724done
a4f64981 11725
8c5ff6dd
KR
11726fi
11727
11728for ac_header in nlist.h
11729do :
11730 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
11731if test "x$ac_cv_header_nlist_h" = x""yes; then :
11732 cat >>confdefs.h <<_ACEOF
11733#define HAVE_NLIST_H 1
a4f64981 11734_ACEOF
8c5ff6dd
KR
11735 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
11736"
11737if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
a4f64981 11738
8c5ff6dd
KR
11739cat >>confdefs.h <<_ACEOF
11740#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
a5edbe4a 11741_ACEOF
a5edbe4a 11742
8c5ff6dd
KR
11743
11744$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
11745
e6df49e4 11746fi
a5edbe4a 11747
8c5ff6dd 11748
cd03c74a 11749fi
cd03c74a 11750
8c5ff6dd
KR
11751done
11752
a4f64981 11753fi
8c5ff6dd 11754done
a5edbe4a 11755
8c5ff6dd
KR
11756
11757# Some definitions of getloadavg require that the program be installed setgid.
11758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
11759$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
11760if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
11761 $as_echo_n "(cached) " >&6
11762else
11763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11764/* end confdefs.h. */
11765#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
11766#ifdef LDAV_PRIVILEGED
11767Yowza Am I SETGID yet
11768#endif
15e12598 11769_ACEOF
8c5ff6dd
KR
11770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11771 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
11772 ac_cv_func_getloadavg_setgid=yes
11773else
11774 ac_cv_func_getloadavg_setgid=no
11775fi
11776rm -f conftest*
11777
11778fi
11779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
11780$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
11781if test $ac_cv_func_getloadavg_setgid = yes; then
11782 NEED_SETGID=true
49ebbd65 11783
8c5ff6dd 11784$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
49ebbd65 11785
8c5ff6dd
KR
11786else
11787 NEED_SETGID=false
e6df49e4 11788fi
8c5ff6dd
KR
11789
11790if test $ac_cv_func_getloadavg_setgid = yes; then
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
11792$as_echo_n "checking group of /dev/kmem... " >&6; }
11793if test "${ac_cv_group_kmem+set}" = set; then :
49ebbd65
DN
11794 $as_echo_n "(cached) " >&6
11795else
8c5ff6dd
KR
11796 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
11797 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
11798 # If we got an error (system does not support symlinks), try without -L.
11799 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
11800 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
11801 | sed -ne 's/[ ][ ]*/ /g;
11802 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
11803 / /s/.* //;p;'`
a4f64981 11804
8c5ff6dd
KR
11805fi
11806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
11807$as_echo "$ac_cv_group_kmem" >&6; }
11808 KMEM_GROUP=$ac_cv_group_kmem
11809fi
11810if test "x$ac_save_LIBS" = x; then
11811 GETLOADAVG_LIBS=$LIBS
a4f64981 11812else
8c5ff6dd
KR
11813 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
11814fi
11815LIBS=$ac_save_LIBS
11816
15e12598 11817
8c5ff6dd
KR
11818
11819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11820$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11821if test "${ac_cv_sys_largefile_source+set}" = set; then :
11822 $as_echo_n "(cached) " >&6
11823else
11824 while :; do
11825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11826/* end confdefs.h. */
11827#include <sys/types.h> /* for off_t */
11828 #include <stdio.h>
11829int
11830main ()
11831{
11832int (*fp) (FILE *, off_t, int) = fseeko;
11833 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
11834 ;
11835 return 0;
11836}
a4f64981 11837_ACEOF
8c5ff6dd
KR
11838if ac_fn_c_try_link "$LINENO"; then :
11839 ac_cv_sys_largefile_source=no; break
11840fi
11841rm -f core conftest.err conftest.$ac_objext \
11842 conftest$ac_exeext conftest.$ac_ext
11843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 11844/* end confdefs.h. */
8c5ff6dd
KR
11845#define _LARGEFILE_SOURCE 1
11846#include <sys/types.h> /* for off_t */
11847 #include <stdio.h>
a4f64981
GM
11848int
11849main ()
11850{
8c5ff6dd
KR
11851int (*fp) (FILE *, off_t, int) = fseeko;
11852 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
15e12598
VB
11853 ;
11854 return 0;
11855}
e6df49e4 11856_ACEOF
8c5ff6dd
KR
11857if ac_fn_c_try_link "$LINENO"; then :
11858 ac_cv_sys_largefile_source=1; break
11859fi
11860rm -f core conftest.err conftest.$ac_objext \
11861 conftest$ac_exeext conftest.$ac_ext
11862 ac_cv_sys_largefile_source=unknown
11863 break
11864done
11865fi
11866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11867$as_echo "$ac_cv_sys_largefile_source" >&6; }
11868case $ac_cv_sys_largefile_source in #(
11869 no | unknown) ;;
11870 *)
11871cat >>confdefs.h <<_ACEOF
11872#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11873_ACEOF
11874;;
a4f64981 11875esac
8c5ff6dd 11876rm -rf conftest*
a4f64981 11877
8c5ff6dd
KR
11878# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11879# in glibc 2.1.3, but that breaks too many other things.
11880# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11881if test $ac_cv_sys_largefile_source != unknown; then
a4f64981 11882
8c5ff6dd 11883$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
e6df49e4 11884
49ebbd65 11885fi
a5edbe4a 11886
a5edbe4a 11887
8c5ff6dd
KR
11888# Configure getopt.
11889# getopt.m4 serial 10
e6df49e4 11890
8c5ff6dd
KR
11891# The getopt module assume you want GNU getopt, with getopt_long etc,
11892# rather than vanilla POSIX getopt. This means your your code should
11893# always include <getopt.h> for the getopt prototypes.
e6df49e4 11894
08b47d3d 11895
e6df49e4 11896
49ebbd65
DN
11897
11898
15e12598 11899
a4f64981 11900
a4f64981 11901
a4f64981 11902
a4f64981 11903
cd03c74a 11904
8c5ff6dd
KR
11905# Prerequisites of lib/getopt*.
11906
11907
11908
11909
11910 GETOPT_H=
11911 for ac_header in getopt.h
11912do :
11913 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11914if test "x$ac_cv_header_getopt_h" = x""yes; then :
11915 cat >>confdefs.h <<_ACEOF
11916#define HAVE_GETOPT_H 1
11917_ACEOF
11918
a4f64981 11919else
8c5ff6dd 11920 GETOPT_H=getopt.h
49ebbd65 11921fi
e6df49e4 11922
8c5ff6dd
KR
11923done
11924
11925 if test -z "$GETOPT_H"; then
11926 for ac_func in getopt_long_only
11927do :
11928 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11929if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
a4f64981 11930 cat >>confdefs.h <<_ACEOF
8c5ff6dd 11931#define HAVE_GETOPT_LONG_ONLY 1
a4f64981 11932_ACEOF
cd03c74a 11933
a4f64981 11934else
8c5ff6dd
KR
11935 GETOPT_H=getopt.h
11936fi
11937done
49ebbd65 11938
8c5ff6dd
KR
11939 fi
11940
11941 if test -z "$GETOPT_H"; then
11942 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
11943"
11944if test "x$ac_cv_have_decl_optreset" = x""yes; then :
11945 GETOPT_H=getopt.h
11946fi
11947
11948 fi
11949
11950 if test -z "$GETOPT_H"; then
11951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11952$as_echo_n "checking for working GNU getopt function... " >&6; }
11953if test "${gl_cv_func_gnu_getopt+set}" = set; then :
a5edbe4a 11954 $as_echo_n "(cached) " >&6
8c5ff6dd
KR
11955else
11956 if test "$cross_compiling" = yes; then :
11957 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
11958"
11959if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
11960 gl_cv_func_gnu_getopt=no
11961else
11962 gl_cv_func_gnu_getopt=yes
a4f64981 11963fi
8c5ff6dd 11964
a5edbe4a 11965else
8c5ff6dd 11966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd03c74a 11967/* end confdefs.h. */
8c5ff6dd
KR
11968#include <getopt.h>
11969int
11970main ()
11971{
11972
11973 char *myargv[3];
11974 myargv[0] = "conftest";
11975 myargv[1] = "-+";
11976 myargv[2] = 0;
11977 return getopt (2, myargv, "+a") != '?';
11978
11979 ;
11980 return 0;
11981}
08b47d3d 11982_ACEOF
8c5ff6dd
KR
11983if ac_fn_c_try_run "$LINENO"; then :
11984 gl_cv_func_gnu_getopt=yes
e6df49e4 11985else
8c5ff6dd
KR
11986 gl_cv_func_gnu_getopt=no
11987fi
11988rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11989 conftest.$ac_objext conftest.beam conftest.$ac_ext
11990fi
a4f64981 11991
15e12598 11992fi
8c5ff6dd
KR
11993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
11994$as_echo "$gl_cv_func_gnu_getopt" >&6; }
11995 if test "$gl_cv_func_gnu_getopt" = "no"; then
11996 GETOPT_H=getopt.h
11997 fi
11998 fi
a4f64981 11999
a4f64981 12000
e6df49e4 12001
8c5ff6dd 12002 if test -n "$GETOPT_H"; then :
49ebbd65 12003
e6df49e4 12004
8c5ff6dd 12005 GETOPT_H=getopt.h
15e12598 12006
8c5ff6dd
KR
12007$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12008
12009
12010
12011 :
12012 GETOPTOBJS='getopt.o getopt1.o'
15e12598 12013
a4f64981 12014fi
15e12598 12015
a4f64981 12016
8c5ff6dd
KR
12017
12018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
12019$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
12020if test "${ac_cv_func_getpgrp_void+set}" = set; then :
15e12598
VB
12021 $as_echo_n "(cached) " >&6
12022else
8c5ff6dd
KR
12023 # Use it with a single arg.
12024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 12025/* end confdefs.h. */
a4f64981 12026$ac_includes_default
8c5ff6dd
KR
12027int
12028main ()
12029{
12030getpgrp (0);
12031 ;
12032 return 0;
12033}
e6df49e4 12034_ACEOF
8c5ff6dd
KR
12035if ac_fn_c_try_compile "$LINENO"; then :
12036 ac_cv_func_getpgrp_void=no
49ebbd65 12037else
8c5ff6dd
KR
12038 ac_cv_func_getpgrp_void=yes
12039fi
12040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
e6df49e4 12041
49ebbd65 12042fi
8c5ff6dd
KR
12043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
12044$as_echo "$ac_cv_func_getpgrp_void" >&6; }
12045if test $ac_cv_func_getpgrp_void = yes; then
49ebbd65 12046
8c5ff6dd 12047$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
a4f64981 12048
15e12598 12049fi
e6df49e4 12050
a4f64981 12051
8c5ff6dd
KR
12052for ac_func in strftime
12053do :
12054 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
12055if test "x$ac_cv_func_strftime" = x""yes; then :
12056 cat >>confdefs.h <<_ACEOF
12057#define HAVE_STRFTIME 1
12058_ACEOF
e6df49e4 12059
8c5ff6dd
KR
12060else
12061 # strftime is in -lintl on SCO UNIX.
12062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
12063$as_echo_n "checking for strftime in -lintl... " >&6; }
12064if test "${ac_cv_lib_intl_strftime+set}" = set; then :
a4f64981
GM
12065 $as_echo_n "(cached) " >&6
12066else
8c5ff6dd
KR
12067 ac_check_lib_save_LIBS=$LIBS
12068LIBS="-lintl $LIBS"
12069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12070/* end confdefs.h. */
12071
12072/* Override any GCC internal prototype to avoid an error.
12073 Use char because int might match the return type of a GCC
12074 builtin and then its argument prototype would still apply. */
12075#ifdef __cplusplus
12076extern "C"
12077#endif
12078char strftime ();
12079int
12080main ()
12081{
12082return strftime ();
12083 ;
12084 return 0;
12085}
12086_ACEOF
12087if ac_fn_c_try_link "$LINENO"; then :
12088 ac_cv_lib_intl_strftime=yes
12089else
12090 ac_cv_lib_intl_strftime=no
12091fi
12092rm -f core conftest.err conftest.$ac_objext \
12093 conftest$ac_exeext conftest.$ac_ext
12094LIBS=$ac_check_lib_save_LIBS
12095fi
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
12097$as_echo "$ac_cv_lib_intl_strftime" >&6; }
12098if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
12099 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
12100
12101LIBS="-lintl $LIBS"
a4f64981 12102fi
a4f64981
GM
12103
12104fi
8c5ff6dd
KR
12105done
12106
12107
12108# UNIX98 PTYs.
12109for ac_func in grantpt
12110do :
12111 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
12112if test "x$ac_cv_func_grantpt" = x""yes; then :
15e12598 12113 cat >>confdefs.h <<_ACEOF
8c5ff6dd 12114#define HAVE_GRANTPT 1
15e12598 12115_ACEOF
a5edbe4a 12116
cd03c74a 12117fi
15e12598
VB
12118done
12119
12120
8c5ff6dd
KR
12121# PTY-related GNU extensions.
12122for ac_func in getpt
12123do :
12124 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
12125if test "x$ac_cv_func_getpt" = x""yes; then :
12126 cat >>confdefs.h <<_ACEOF
12127#define HAVE_GETPT 1
12128_ACEOF
49ebbd65 12129
15e12598
VB
12130fi
12131done
49ebbd65 12132
15e12598 12133
8c5ff6dd
KR
12134# Check this now, so that we will NOT find the above functions in ncurses.
12135# That is because we have not set up to link ncurses in lib-src.
12136# It's better to believe a function is not available
12137# than to expect to find it in ncurses.
12138# Also we need tputs and friends to be able to build at all.
12139have_tputs_et_al=true
12140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
12141$as_echo_n "checking for library containing tputs... " >&6; }
12142if test "${ac_cv_search_tputs+set}" = set; then :
e6df49e4 12143 $as_echo_n "(cached) " >&6
e6df49e4 12144else
8c5ff6dd
KR
12145 ac_func_search_save_LIBS=$LIBS
12146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 12147/* end confdefs.h. */
a4f64981 12148
8c5ff6dd
KR
12149/* Override any GCC internal prototype to avoid an error.
12150 Use char because int might match the return type of a GCC
12151 builtin and then its argument prototype would still apply. */
12152#ifdef __cplusplus
12153extern "C"
12154#endif
12155char tputs ();
12156int
12157main ()
12158{
12159return tputs ();
12160 ;
12161 return 0;
12162}
12163_ACEOF
12164for ac_lib in '' ncurses terminfo termcap; do
12165 if test -z "$ac_lib"; then
12166 ac_res="none required"
12167 else
12168 ac_res=-l$ac_lib
12169 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12170 fi
12171 if ac_fn_c_try_link "$LINENO"; then :
12172 ac_cv_search_tputs=$ac_res
12173fi
12174rm -f core conftest.err conftest.$ac_objext \
12175 conftest$ac_exeext
12176 if test "${ac_cv_search_tputs+set}" = set; then :
12177 break
15e12598 12178fi
8c5ff6dd
KR
12179done
12180if test "${ac_cv_search_tputs+set}" = set; then :
15e12598 12181
8c5ff6dd
KR
12182else
12183 ac_cv_search_tputs=no
12184fi
12185rm conftest.$ac_ext
12186LIBS=$ac_func_search_save_LIBS
12187fi
12188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
12189$as_echo "$ac_cv_search_tputs" >&6; }
12190ac_res=$ac_cv_search_tputs
12191if test "$ac_res" != no; then :
12192 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
a4f64981 12193
49ebbd65 12194else
8c5ff6dd
KR
12195 have_tputs_et_al=false
12196fi
e6df49e4 12197
8c5ff6dd
KR
12198if test "$have_tputs_et_al" != true; then
12199 as_fn_error "I couldn't find termcap functions (tputs and friends).
12200Maybe some development libraries/packages are missing? Try installing
12201libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
49ebbd65 12202fi
8c5ff6dd 12203# Must define this when any termcap library is found.
e6df49e4 12204
8c5ff6dd 12205$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
a4f64981 12206
8c5ff6dd
KR
12207## FIXME This was the cpp logic, but I am not sure it is right.
12208## The above test has not necessarily found libncurses.
12209HAVE_LIBNCURSES=yes
12210
12211## Use terminfo instead of termcap?
12212## Note only system files NOT using terminfo are:
12213## bsd-common, freebsd < 40000, ms-w32, msdos, netbsd, and
12214## darwin|gnu without ncurses.
12215TERMINFO=no
12216LIBS_TERMCAP=
12217case "$opsys" in
12218 ## cygwin: Fewer environment variables to go wrong, more terminal types.
12219 ## hpux10-20: Use the system provided termcap(3) library.
12220 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
12221 ## is necessary. Otherwise Emacs dumps core when run -nw.
12222 aix4-2|cygwin|hpux*|irix6-5|openbsd|usg5-4|sol2*|unixware) TERMINFO=yes ;;
a4f64981 12223
8c5ff6dd
KR
12224 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
12225 ## The ncurses library has been moved out of the System framework in
12226 ## Mac OS X 10.2. So if configure detects it, set the command-line
12227 ## option to use it.
12228 darwin|gnu*)
12229 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
12230 if test "x$HAVE_LIBNCURSES" = "xyes"; then
12231 TERMINFO=yes
12232 LIBS_TERMCAP="-lncurses"
12233 fi
a4f64981 12234 ;;
8c5ff6dd
KR
12235
12236 freebsd)
12237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
12238$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
12239 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
a4f64981
GM
12240 $as_echo_n "(cached) " >&6
12241else
8c5ff6dd
KR
12242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12243/* end confdefs.h. */
12244#include <osreldate.h>
12245int
12246main ()
12247{
12248#if __FreeBSD_version < 400000
12249fail;
12250#endif
e6df49e4 12251
8c5ff6dd
KR
12252 ;
12253 return 0;
12254}
a4f64981 12255_ACEOF
8c5ff6dd
KR
12256if ac_fn_c_try_link "$LINENO"; then :
12257 emacs_cv_freebsd_terminfo=yes
a4f64981 12258else
8c5ff6dd 12259 emacs_cv_freebsd_terminfo=no
a4f64981 12260fi
8c5ff6dd
KR
12261rm -f core conftest.err conftest.$ac_objext \
12262 conftest$ac_exeext conftest.$ac_ext
12263fi
12264
12265
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
12267$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
12268
12269 if test $emacs_cv_freebsd_terminfo = yes; then
12270 TERMINFO=yes
12271 LIBS_TERMCAP="-lncurses"
12272 else
12273 LIBS_TERMCAP="-ltermcap"
12274 fi
12275 ;;
12276
a4f64981 12277esac
a4f64981 12278
8c5ff6dd
KR
12279case "$opsys" in
12280 ## hpux: Make sure we get select from libc rather than from libcurses
12281 ## because libcurses on HPUX 10.10 has a broken version of select.
12282 ## We used to use -lc -lcurses, but this may be cleaner.
12283 hpux*|netbsd) LIBS_TERMCAP="-ltermcap" ;;
12284
12285 openbsd) LIBS_TERMCAP="-lncurses" ;;
12286
12287 ## Must use system termcap, if we use any termcap. It does special things.
12288 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
12289esac
12290
12291TERMCAP_OBJ=tparam.o
12292if test $TERMINFO = yes; then
12293
12294$as_echo "#define TERMINFO 1" >>confdefs.h
12295
12296
12297 ## Default used to be -ltermcap. Add a case above if need something else.
12298 test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
12299
12300 TERMCAP_OBJ=terminfo.o
15e12598 12301fi
a4f64981 12302
a4f64981 12303
8c5ff6dd
KR
12304
12305
12306# Do we have res_init, for detecting changes in /etc/resolv.conf?
12307resolv=no
12308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12309/* end confdefs.h. */
12310#include <netinet/in.h>
12311#include <arpa/nameser.h>
12312#include <resolv.h>
12313int
12314main ()
12315{
12316return res_init();
12317 ;
12318 return 0;
12319}
a4f64981 12320_ACEOF
8c5ff6dd
KR
12321if ac_fn_c_try_link "$LINENO"; then :
12322 have_res_init=yes
12323else
12324 have_res_init=no
12325fi
12326rm -f core conftest.err conftest.$ac_objext \
12327 conftest$ac_exeext conftest.$ac_ext
12328if test "$have_res_init" = no; then
12329 OLIBS="$LIBS"
12330 LIBS="$LIBS -lresolv"
12331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
12332$as_echo_n "checking for res_init with -lresolv... " >&6; }
12333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12334/* end confdefs.h. */
8c5ff6dd
KR
12335#include <netinet/in.h>
12336#include <arpa/nameser.h>
12337#include <resolv.h>
12338int
12339main ()
12340{
12341return res_init();
12342 ;
12343 return 0;
12344}
aaa36002 12345_ACEOF
8c5ff6dd
KR
12346if ac_fn_c_try_link "$LINENO"; then :
12347 have_res_init=yes
7186fb09 12348else
8c5ff6dd
KR
12349 have_res_init=no
12350fi
12351rm -f core conftest.err conftest.$ac_objext \
12352 conftest$ac_exeext conftest.$ac_ext
12353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
12354$as_echo "$have_res_init" >&6; }
12355 if test "$have_res_init" = yes ; then
12356 resolv=yes
12357 fi
12358 LIBS="$OLIBS"
6da23aaa 12359fi
bf89cb4d 12360
8c5ff6dd 12361if test "$have_res_init" = yes; then
ca81d7a0 12362
8c5ff6dd 12363$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
7186fb09 12364
6da23aaa 12365fi
ca81d7a0 12366
8c5ff6dd
KR
12367# Do we need the Hesiod library to provide the support routines?
12368LIBHESIOD=
12369if test "$with_hesiod" != no ; then
12370 # Don't set $LIBS here -- see comments above. FIXME which comments?
12371 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
12372if test "x$ac_cv_func_res_send" = x""yes; then :
7186fb09 12373
aaa36002 12374else
8c5ff6dd
KR
12375 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
12376if test "x$ac_cv_func___res_send" = x""yes; then :
6da23aaa 12377
8c5ff6dd
KR
12378else
12379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
12380$as_echo_n "checking for res_send in -lresolv... " >&6; }
12381if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
6da23aaa
EZ
12382 $as_echo_n "(cached) " >&6
12383else
8c5ff6dd
KR
12384 ac_check_lib_save_LIBS=$LIBS
12385LIBS="-lresolv $LIBS"
12386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12387/* end confdefs.h. */
8c5ff6dd
KR
12388
12389/* Override any GCC internal prototype to avoid an error.
12390 Use char because int might match the return type of a GCC
12391 builtin and then its argument prototype would still apply. */
12392#ifdef __cplusplus
12393extern "C"
12394#endif
12395char res_send ();
12396int
12397main ()
12398{
12399return res_send ();
12400 ;
12401 return 0;
12402}
7186fb09 12403_ACEOF
8c5ff6dd
KR
12404if ac_fn_c_try_link "$LINENO"; then :
12405 ac_cv_lib_resolv_res_send=yes
7186fb09 12406else
8c5ff6dd 12407 ac_cv_lib_resolv_res_send=no
15e12598 12408fi
8c5ff6dd
KR
12409rm -f core conftest.err conftest.$ac_objext \
12410 conftest$ac_exeext conftest.$ac_ext
12411LIBS=$ac_check_lib_save_LIBS
12412fi
12413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
12414$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
12415if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
12416 resolv=yes
12417else
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
12419$as_echo_n "checking for __res_send in -lresolv... " >&6; }
12420if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
12421 $as_echo_n "(cached) " >&6
12422else
12423 ac_check_lib_save_LIBS=$LIBS
12424LIBS="-lresolv $LIBS"
12425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 12426/* end confdefs.h. */
8c5ff6dd
KR
12427
12428/* Override any GCC internal prototype to avoid an error.
12429 Use char because int might match the return type of a GCC
12430 builtin and then its argument prototype would still apply. */
12431#ifdef __cplusplus
12432extern "C"
12433#endif
12434char __res_send ();
12435int
12436main ()
12437{
12438return __res_send ();
12439 ;
12440 return 0;
12441}
a4f64981 12442_ACEOF
8c5ff6dd
KR
12443if ac_fn_c_try_link "$LINENO"; then :
12444 ac_cv_lib_resolv___res_send=yes
9452ded1 12445else
8c5ff6dd 12446 ac_cv_lib_resolv___res_send=no
aaa36002 12447fi
8c5ff6dd
KR
12448rm -f core conftest.err conftest.$ac_objext \
12449 conftest$ac_exeext conftest.$ac_ext
12450LIBS=$ac_check_lib_save_LIBS
aaa36002 12451fi
8c5ff6dd
KR
12452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
12453$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
12454if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
12455 resolv=yes
aaa36002 12456fi
7186fb09 12457
9452ded1 12458fi
7186fb09 12459
aaa36002 12460fi
7186fb09 12461
aaa36002 12462fi
7186fb09 12463
8c5ff6dd
KR
12464 if test "$resolv" = yes ; then
12465 RESOLVLIB=-lresolv
12466 else
12467 RESOLVLIB=
aaa36002 12468 fi
8c5ff6dd
KR
12469 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
12470if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
aaa36002 12471
8c5ff6dd
KR
12472else
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
12474$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
12475if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
7186fb09 12476 $as_echo_n "(cached) " >&6
ba4481b5 12477else
8c5ff6dd
KR
12478 ac_check_lib_save_LIBS=$LIBS
12479LIBS="-lhesiod $RESOLVLIB $LIBS"
12480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12481/* end confdefs.h. */
a4f64981 12482
8c5ff6dd
KR
12483/* Override any GCC internal prototype to avoid an error.
12484 Use char because int might match the return type of a GCC
12485 builtin and then its argument prototype would still apply. */
12486#ifdef __cplusplus
12487extern "C"
12488#endif
12489char hes_getmailhost ();
12490int
12491main ()
12492{
12493return hes_getmailhost ();
12494 ;
12495 return 0;
12496}
a4f64981 12497_ACEOF
8c5ff6dd
KR
12498if ac_fn_c_try_link "$LINENO"; then :
12499 ac_cv_lib_hesiod_hes_getmailhost=yes
12500else
12501 ac_cv_lib_hesiod_hes_getmailhost=no
15e12598 12502fi
8c5ff6dd
KR
12503rm -f core conftest.err conftest.$ac_objext \
12504 conftest$ac_exeext conftest.$ac_ext
12505LIBS=$ac_check_lib_save_LIBS
12506fi
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
12508$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
12509if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
12510 hesiod=yes
e6df49e4 12511else
8c5ff6dd 12512 :
49ebbd65 12513fi
aaa36002 12514
e6df49e4 12515fi
08b47d3d 12516
6da23aaa 12517
8c5ff6dd 12518 if test x"$hesiod" = xyes; then
cd03c74a 12519
8c5ff6dd 12520$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
08b47d3d 12521
8c5ff6dd
KR
12522 LIBHESIOD=-lhesiod
12523 fi
12524fi
a5edbe4a 12525
cd03c74a 12526
8c5ff6dd
KR
12527# Do we need libresolv (due to res_init or Hesiod)?
12528if test "$resolv" = yes ; then
8732a4e9 12529
8c5ff6dd 12530$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
49ebbd65 12531
8c5ff6dd
KR
12532 LIBRESOLV=-lresolv
12533else
12534 LIBRESOLV=
12535fi
a5edbe4a 12536
e6df49e4 12537
8c5ff6dd
KR
12538# These tell us which Kerberos-related libraries to use.
12539COM_ERRLIB=
12540CRYPTOLIB=
12541KRB5LIB=
12542DESLIB=
12543KRB4LIB=
a4f64981 12544
8c5ff6dd
KR
12545if test "${with_kerberos}" != no; then
12546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
12547$as_echo_n "checking for com_err in -lcom_err... " >&6; }
12548if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
cd03c74a 12549 $as_echo_n "(cached) " >&6
aaa36002 12550else
49ebbd65 12551 ac_check_lib_save_LIBS=$LIBS
8c5ff6dd
KR
12552LIBS="-lcom_err $LIBS"
12553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd03c74a 12554/* end confdefs.h. */
49ebbd65
DN
12555
12556/* Override any GCC internal prototype to avoid an error.
12557 Use char because int might match the return type of a GCC
12558 builtin and then its argument prototype would still apply. */
12559#ifdef __cplusplus
12560extern "C"
12561#endif
8c5ff6dd 12562char com_err ();
49ebbd65
DN
12563int
12564main ()
a5edbe4a 12565{
8c5ff6dd 12566return com_err ();
49ebbd65
DN
12567 ;
12568 return 0;
cd03c74a 12569}
08b47d3d 12570_ACEOF
8c5ff6dd
KR
12571if ac_fn_c_try_link "$LINENO"; then :
12572 ac_cv_lib_com_err_com_err=yes
cd03c74a 12573else
8c5ff6dd 12574 ac_cv_lib_com_err_com_err=no
49ebbd65 12575fi
8c5ff6dd
KR
12576rm -f core conftest.err conftest.$ac_objext \
12577 conftest$ac_exeext conftest.$ac_ext
49ebbd65 12578LIBS=$ac_check_lib_save_LIBS
cd03c74a 12579fi
8c5ff6dd
KR
12580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
12581$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
12582if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
12583 have_com_err=yes
12584else
12585 have_com_err=no
a4f64981 12586fi
15e12598 12587
8c5ff6dd
KR
12588 if test $have_com_err = yes; then
12589 COM_ERRLIB=-lcom_err
12590 LIBS="$COM_ERRLIB $LIBS"
12591
12592$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
e6df49e4 12593
8c5ff6dd
KR
12594 fi
12595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
12596$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
12597if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
49ebbd65 12598 $as_echo_n "(cached) " >&6
cd03c74a 12599else
8c5ff6dd
KR
12600 ac_check_lib_save_LIBS=$LIBS
12601LIBS="-lcrypto $LIBS"
12602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 12603/* end confdefs.h. */
8c5ff6dd
KR
12604
12605/* Override any GCC internal prototype to avoid an error.
12606 Use char because int might match the return type of a GCC
12607 builtin and then its argument prototype would still apply. */
12608#ifdef __cplusplus
12609extern "C"
12610#endif
12611char mit_des_cbc_encrypt ();
12612int
12613main ()
a4f64981 12614{
8c5ff6dd
KR
12615return mit_des_cbc_encrypt ();
12616 ;
12617 return 0;
49ebbd65 12618}
a5edbe4a 12619_ACEOF
8c5ff6dd
KR
12620if ac_fn_c_try_link "$LINENO"; then :
12621 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
49ebbd65 12622else
8c5ff6dd
KR
12623 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
12624fi
12625rm -f core conftest.err conftest.$ac_objext \
12626 conftest$ac_exeext conftest.$ac_ext
12627LIBS=$ac_check_lib_save_LIBS
49ebbd65 12628fi
8c5ff6dd
KR
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
12630$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
12631if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
12632 have_crypto=yes
12633else
12634 have_crypto=no
a5edbe4a 12635fi
cd03c74a 12636
8c5ff6dd
KR
12637 if test $have_crypto = yes; then
12638 CRYPTOLIB=-lcrypto
12639 LIBS="$CRYPTOLIB $LIBS"
12640
12641$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
49ebbd65 12642
8c5ff6dd
KR
12643 fi
12644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
12645$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
12646if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
12647 $as_echo_n "(cached) " >&6
15e12598 12648else
8c5ff6dd
KR
12649 ac_check_lib_save_LIBS=$LIBS
12650LIBS="-lk5crypto $LIBS"
12651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12652/* end confdefs.h. */
49ebbd65 12653
8c5ff6dd
KR
12654/* Override any GCC internal prototype to avoid an error.
12655 Use char because int might match the return type of a GCC
12656 builtin and then its argument prototype would still apply. */
12657#ifdef __cplusplus
12658extern "C"
12659#endif
12660char mit_des_cbc_encrypt ();
12661int
12662main ()
12663{
12664return mit_des_cbc_encrypt ();
12665 ;
12666 return 0;
12667}
a4f64981 12668_ACEOF
8c5ff6dd
KR
12669if ac_fn_c_try_link "$LINENO"; then :
12670 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
12671else
12672 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
12673fi
12674rm -f core conftest.err conftest.$ac_objext \
12675 conftest$ac_exeext conftest.$ac_ext
12676LIBS=$ac_check_lib_save_LIBS
12677fi
12678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
12679$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
12680if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
12681 have_k5crypto=yes
12682else
12683 have_k5crypto=no
a4f64981 12684fi
15e12598 12685
8c5ff6dd
KR
12686 if test $have_k5crypto = yes; then
12687 CRYPTOLIB=-lk5crypto
12688 LIBS="$CRYPTOLIB $LIBS"
a4f64981 12689
8c5ff6dd
KR
12690$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
12691
12692 fi
12693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
12694$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
12695if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
49ebbd65
DN
12696 $as_echo_n "(cached) " >&6
12697else
8c5ff6dd
KR
12698 ac_check_lib_save_LIBS=$LIBS
12699LIBS="-lkrb5 $LIBS"
12700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 12701/* end confdefs.h. */
e6df49e4 12702
8c5ff6dd
KR
12703/* Override any GCC internal prototype to avoid an error.
12704 Use char because int might match the return type of a GCC
12705 builtin and then its argument prototype would still apply. */
12706#ifdef __cplusplus
12707extern "C"
a4f64981 12708#endif
8c5ff6dd
KR
12709char krb5_init_context ();
12710int
12711main ()
12712{
12713return krb5_init_context ();
12714 ;
12715 return 0;
12716}
12717_ACEOF
12718if ac_fn_c_try_link "$LINENO"; then :
12719 ac_cv_lib_krb5_krb5_init_context=yes
12720else
12721 ac_cv_lib_krb5_krb5_init_context=no
12722fi
12723rm -f core conftest.err conftest.$ac_objext \
12724 conftest$ac_exeext conftest.$ac_ext
12725LIBS=$ac_check_lib_save_LIBS
12726fi
12727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
12728$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
12729if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
12730 have_krb5=yes
12731else
12732 have_krb5=no
12733fi
12734
12735 if test $have_krb5=yes; then
12736 KRB5LIB=-lkrb5
12737 LIBS="$KRB5LIB $LIBS"
15e12598 12738
8c5ff6dd
KR
12739$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
12740
12741 fi
12742 if test "${with_kerberos5}" = no; then
12743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
12744$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
12745if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
12746 $as_echo_n "(cached) " >&6
12747else
12748 ac_check_lib_save_LIBS=$LIBS
12749LIBS="-ldes425 $LIBS"
12750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
aaa36002
DN
12752
12753/* Override any GCC internal prototype to avoid an error.
12754 Use char because int might match the return type of a GCC
12755 builtin and then its argument prototype would still apply. */
12756#ifdef __cplusplus
12757extern "C"
7186fb09 12758#endif
8c5ff6dd 12759char des_cbc_encrypt ();
0ca10bb7
RC
12760int
12761main ()
12762{
8c5ff6dd 12763return des_cbc_encrypt ();
0ca10bb7
RC
12764 ;
12765 return 0;
12766}
12767_ACEOF
8c5ff6dd
KR
12768if ac_fn_c_try_link "$LINENO"; then :
12769 ac_cv_lib_des425_des_cbc_encrypt=yes
15e12598 12770else
8c5ff6dd 12771 ac_cv_lib_des425_des_cbc_encrypt=no
e6df49e4 12772fi
8c5ff6dd
KR
12773rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext conftest.$ac_ext
12775LIBS=$ac_check_lib_save_LIBS
a4f64981 12776fi
8c5ff6dd
KR
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
12778$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
12779if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
12780 have_des425=yes
12781else
12782 have_des425=no
a4f64981 12783fi
15e12598 12784
8c5ff6dd
KR
12785 if test $have_des425 = yes; then
12786 DESLIB=-ldes425
12787 LIBS="$DESLIB $LIBS"
12788
12789$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
12790
12791 else
12792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
12793$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
12794if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
12795 $as_echo_n "(cached) " >&6
12796else
8c5ff6dd
KR
12797 ac_check_lib_save_LIBS=$LIBS
12798LIBS="-ldes $LIBS"
12799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12800/* end confdefs.h. */
edfaf76d 12801
8c5ff6dd
KR
12802/* Override any GCC internal prototype to avoid an error.
12803 Use char because int might match the return type of a GCC
12804 builtin and then its argument prototype would still apply. */
12805#ifdef __cplusplus
12806extern "C"
503d2be0 12807#endif
8c5ff6dd 12808char des_cbc_encrypt ();
19650fd6
AS
12809int
12810main ()
12811{
8c5ff6dd 12812return des_cbc_encrypt ();
503d2be0
AS
12813 ;
12814 return 0;
12815}
12816_ACEOF
8c5ff6dd
KR
12817if ac_fn_c_try_link "$LINENO"; then :
12818 ac_cv_lib_des_des_cbc_encrypt=yes
15e12598 12819else
8c5ff6dd 12820 ac_cv_lib_des_des_cbc_encrypt=no
e6df49e4 12821fi
8c5ff6dd
KR
12822rm -f core conftest.err conftest.$ac_objext \
12823 conftest$ac_exeext conftest.$ac_ext
12824LIBS=$ac_check_lib_save_LIBS
12825fi
12826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
12827$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
12828if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
12829 have_des=yes
12830else
12831 have_des=no
a4f64981 12832fi
a5edbe4a 12833
8c5ff6dd
KR
12834 if test $have_des = yes; then
12835 DESLIB=-ldes
12836 LIBS="$DESLIB $LIBS"
e6df49e4 12837
8c5ff6dd 12838$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
a4f64981 12839
8c5ff6dd
KR
12840 fi
12841 fi
12842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
12843$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
12844if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
e9a63f04 12845 $as_echo_n "(cached) " >&6
ba4481b5 12846else
8c5ff6dd
KR
12847 ac_check_lib_save_LIBS=$LIBS
12848LIBS="-lkrb4 $LIBS"
12849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12850/* end confdefs.h. */
ba4481b5 12851
0ca10bb7
RC
12852/* Override any GCC internal prototype to avoid an error.
12853 Use char because int might match the return type of a GCC
12854 builtin and then its argument prototype would still apply. */
12855#ifdef __cplusplus
12856extern "C"
a3f08d9e 12857#endif
8c5ff6dd 12858char krb_get_cred ();
503d2be0
AS
12859int
12860main ()
12861{
8c5ff6dd 12862return krb_get_cred ();
503d2be0
AS
12863 ;
12864 return 0;
12865}
12866_ACEOF
8c5ff6dd
KR
12867if ac_fn_c_try_link "$LINENO"; then :
12868 ac_cv_lib_krb4_krb_get_cred=yes
bf89cb4d 12869else
8c5ff6dd 12870 ac_cv_lib_krb4_krb_get_cred=no
91e84f96 12871fi
8c5ff6dd
KR
12872rm -f core conftest.err conftest.$ac_objext \
12873 conftest$ac_exeext conftest.$ac_ext
12874LIBS=$ac_check_lib_save_LIBS
91e84f96 12875fi
8c5ff6dd
KR
12876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
12877$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
12878if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
12879 have_krb4=yes
bf89cb4d 12880else
8c5ff6dd 12881 have_krb4=no
91e84f96
GM
12882fi
12883
8c5ff6dd
KR
12884 if test $have_krb4 = yes; then
12885 KRB4LIB=-lkrb4
12886 LIBS="$KRB4LIB $LIBS"
12887
12888$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
12889
12890 else
12891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
12892$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
12893if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
bf89cb4d 12894 $as_echo_n "(cached) " >&6
bf89cb4d 12895else
8c5ff6dd
KR
12896 ac_check_lib_save_LIBS=$LIBS
12897LIBS="-lkrb $LIBS"
12898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12899/* end confdefs.h. */
a4f64981 12900
8c5ff6dd
KR
12901/* Override any GCC internal prototype to avoid an error.
12902 Use char because int might match the return type of a GCC
12903 builtin and then its argument prototype would still apply. */
12904#ifdef __cplusplus
12905extern "C"
12906#endif
12907char krb_get_cred ();
12908int
12909main ()
12910{
12911return krb_get_cred ();
12912 ;
12913 return 0;
12914}
a4f64981 12915_ACEOF
8c5ff6dd
KR
12916if ac_fn_c_try_link "$LINENO"; then :
12917 ac_cv_lib_krb_krb_get_cred=yes
a4f64981 12918else
8c5ff6dd 12919 ac_cv_lib_krb_krb_get_cred=no
e6df49e4 12920fi
8c5ff6dd
KR
12921rm -f core conftest.err conftest.$ac_objext \
12922 conftest$ac_exeext conftest.$ac_ext
12923LIBS=$ac_check_lib_save_LIBS
a4f64981 12924fi
8c5ff6dd
KR
12925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
12926$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
12927if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
12928 have_krb=yes
91e84f96 12929else
8c5ff6dd 12930 have_krb=no
6da23aaa 12931fi
0ca10bb7 12932
8c5ff6dd
KR
12933 if test $have_krb = yes; then
12934 KRB4LIB=-lkrb
12935 LIBS="$KRB4LIB $LIBS"
2d2b6695 12936
8c5ff6dd 12937$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
ca81d7a0 12938
8c5ff6dd
KR
12939 fi
12940 fi
12941 fi
ca81d7a0 12942
8c5ff6dd
KR
12943 if test "${with_kerberos5}" != no; then
12944 for ac_header in krb5.h
12945do :
12946 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
12947if test "x$ac_cv_header_krb5_h" = x""yes; then :
12948 cat >>confdefs.h <<_ACEOF
12949#define HAVE_KRB5_H 1
6da23aaa 12950_ACEOF
8c5ff6dd
KR
12951 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
12952"
12953if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
12954
12955cat >>confdefs.h <<_ACEOF
12956#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 12957_ACEOF
2d2b6695 12958
8c5ff6dd 12959
2d2b6695 12960fi
8c5ff6dd
KR
12961ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
12962"
12963if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
6da23aaa 12964
8c5ff6dd
KR
12965cat >>confdefs.h <<_ACEOF
12966#define HAVE_KRB5_ERROR_E_TEXT 1
12967_ACEOF
0ca10bb7 12968
0ca10bb7 12969
bf89cb4d 12970fi
2d2b6695
KS
12971
12972fi
12973
8c5ff6dd 12974done
15e12598 12975
8c5ff6dd
KR
12976 else
12977 for ac_header in des.h
12978do :
12979 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
12980if test "x$ac_cv_header_des_h" = x""yes; then :
12981 cat >>confdefs.h <<_ACEOF
12982#define HAVE_DES_H 1
12983_ACEOF
12984
12985else
12986 for ac_header in kerberosIV/des.h
12987do :
12988 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
12989if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
12990 cat >>confdefs.h <<_ACEOF
12991#define HAVE_KERBEROSIV_DES_H 1
12992_ACEOF
6da23aaa 12993
8c5ff6dd
KR
12994else
12995 for ac_header in kerberos/des.h
12996do :
12997 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
12998if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
12999 cat >>confdefs.h <<_ACEOF
13000#define HAVE_KERBEROS_DES_H 1
6da23aaa 13001_ACEOF
3d9fec71 13002
3d9fec71
DL
13003fi
13004
8c5ff6dd 13005done
0ca10bb7 13006
0ca10bb7 13007fi
6da23aaa 13008
8c5ff6dd
KR
13009done
13010
0ca10bb7 13011fi
6da23aaa 13012
8c5ff6dd 13013done
6da23aaa 13014
8c5ff6dd
KR
13015 for ac_header in krb.h
13016do :
13017 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
13018if test "x$ac_cv_header_krb_h" = x""yes; then :
13019 cat >>confdefs.h <<_ACEOF
13020#define HAVE_KRB_H 1
6da23aaa 13021_ACEOF
8c5ff6dd
KR
13022
13023else
13024 for ac_header in kerberosIV/krb.h
13025do :
13026 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
13027if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
13028 cat >>confdefs.h <<_ACEOF
13029#define HAVE_KERBEROSIV_KRB_H 1
6da23aaa 13030_ACEOF
8c5ff6dd 13031
6da23aaa 13032else
8c5ff6dd
KR
13033 for ac_header in kerberos/krb.h
13034do :
13035 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
13036if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
13037 cat >>confdefs.h <<_ACEOF
13038#define HAVE_KERBEROS_KRB_H 1
13039_ACEOF
0ca10bb7 13040
0ca10bb7
RC
13041fi
13042
8c5ff6dd 13043done
49ebbd65 13044
e6df49e4 13045fi
8c5ff6dd
KR
13046
13047done
15e12598 13048
a4f64981 13049fi
8c5ff6dd
KR
13050
13051done
13052
13053 fi
13054 for ac_header in com_err.h
13055do :
13056 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
13057if test "x$ac_cv_header_com_err_h" = x""yes; then :
6da23aaa 13058 cat >>confdefs.h <<_ACEOF
8c5ff6dd 13059#define HAVE_COM_ERR_H 1
0ca10bb7
RC
13060_ACEOF
13061
13062fi
0ca10bb7 13063
6da23aaa
EZ
13064done
13065
8c5ff6dd 13066fi
6da23aaa 13067
6da23aaa 13068
91e84f96 13069
6da23aaa 13070
6da23aaa 13071
6da23aaa
EZ
13072
13073
8c5ff6dd
KR
13074# Solaris requires -lintl if you want strerror (which calls dgettext)
13075# to return localized messages.
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
13077$as_echo_n "checking for dgettext in -lintl... " >&6; }
13078if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
6da23aaa
EZ
13079 $as_echo_n "(cached) " >&6
13080else
8c5ff6dd
KR
13081 ac_check_lib_save_LIBS=$LIBS
13082LIBS="-lintl $LIBS"
13083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13084/* end confdefs.h. */
8c5ff6dd
KR
13085
13086/* Override any GCC internal prototype to avoid an error.
13087 Use char because int might match the return type of a GCC
13088 builtin and then its argument prototype would still apply. */
13089#ifdef __cplusplus
13090extern "C"
13091#endif
13092char dgettext ();
91e84f96
GM
13093int
13094main ()
6da23aaa 13095{
8c5ff6dd 13096return dgettext ();
91e84f96
GM
13097 ;
13098 return 0;
6da23aaa
EZ
13099}
13100_ACEOF
8c5ff6dd
KR
13101if ac_fn_c_try_link "$LINENO"; then :
13102 ac_cv_lib_intl_dgettext=yes
13103else
13104 ac_cv_lib_intl_dgettext=no
13105fi
13106rm -f core conftest.err conftest.$ac_objext \
13107 conftest$ac_exeext conftest.$ac_ext
13108LIBS=$ac_check_lib_save_LIBS
13109fi
13110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
13111$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
13112if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
13113 cat >>confdefs.h <<_ACEOF
13114#define HAVE_LIBINTL 1
15e12598 13115_ACEOF
8c5ff6dd
KR
13116
13117 LIBS="-lintl $LIBS"
13118
13119fi
13120
13121
13122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
13123$as_echo_n "checking whether localtime caches TZ... " >&6; }
13124if test "${emacs_cv_localtime_cache+set}" = set; then :
13125 $as_echo_n "(cached) " >&6
13126else
13127 if test x$ac_cv_func_tzset = xyes; then
13128if test "$cross_compiling" = yes; then :
13129 # If we have tzset, assume the worst when cross-compiling.
13130emacs_cv_localtime_cache=yes
13131else
13132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 13133/* end confdefs.h. */
8c5ff6dd
KR
13134#include <time.h>
13135extern char **environ;
13136unset_TZ ()
13137{
13138 char **from, **to;
13139 for (to = from = environ; (*to = *from); from++)
13140 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
13141 to++;
13142}
13143char TZ_GMT0[] = "TZ=GMT0";
13144char TZ_PST8[] = "TZ=PST8";
13145main()
13146{
13147 time_t now = time ((time_t *) 0);
13148 int hour_GMT0, hour_unset;
13149 if (putenv (TZ_GMT0) != 0)
13150 exit (1);
13151 hour_GMT0 = localtime (&now)->tm_hour;
13152 unset_TZ ();
13153 hour_unset = localtime (&now)->tm_hour;
13154 if (putenv (TZ_PST8) != 0)
13155 exit (1);
13156 if (localtime (&now)->tm_hour == hour_GMT0)
13157 exit (1);
13158 unset_TZ ();
13159 if (localtime (&now)->tm_hour != hour_unset)
13160 exit (1);
13161 exit (0);
13162}
13163_ACEOF
13164if ac_fn_c_try_run "$LINENO"; then :
13165 emacs_cv_localtime_cache=no
13166else
13167 emacs_cv_localtime_cache=yes
13168fi
13169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13170 conftest.$ac_objext conftest.beam conftest.$ac_ext
13171fi
13172
13173else
13174 # If we lack tzset, report that localtime does not cache TZ,
13175 # since we can't invalidate the cache if we don't have tzset.
13176 emacs_cv_localtime_cache=no
13177fi
13178fi
13179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
13180$as_echo "$emacs_cv_localtime_cache" >&6; }
13181if test $emacs_cv_localtime_cache = yes; then
13182
13183$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
13184
13185fi
13186
13187if test "x$HAVE_TIMEVAL" = xyes; then
13188 for ac_func in gettimeofday
13189do :
13190 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13191if test "x$ac_cv_func_gettimeofday" = x""yes; then :
13192 cat >>confdefs.h <<_ACEOF
13193#define HAVE_GETTIMEOFDAY 1
13194_ACEOF
13195
13196fi
13197done
13198
13199 if test $ac_cv_func_gettimeofday = yes; then
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
13201$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
13202if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
13203 $as_echo_n "(cached) " >&6
13204else
13205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13206/* end confdefs.h. */
13207
13208#ifdef TIME_WITH_SYS_TIME
13209#include <sys/time.h>
13210#include <time.h>
13211#else
13212#ifdef HAVE_SYS_TIME_H
13213#include <sys/time.h>
13214#else
13215#include <time.h>
13216#endif
13217#endif
aaa36002
DN
13218int
13219main ()
a4f64981 13220{
8c5ff6dd
KR
13221struct timeval time;
13222 gettimeofday (&time, 0);
aaa36002
DN
13223 ;
13224 return 0;
13225}
8c5ff6dd
KR
13226_ACEOF
13227if ac_fn_c_try_compile "$LINENO"; then :
13228 emacs_cv_gettimeofday_two_arguments=yes
e9a63f04 13229else
8c5ff6dd 13230 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 13231fi
e9a63f04 13232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd
KR
13233fi
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
13235$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
13236 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 13237
8c5ff6dd 13238$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 13239
8c5ff6dd
KR
13240 fi
13241 fi
647847ea 13242fi
ca81d7a0 13243
8c5ff6dd
KR
13244ok_so_far=yes
13245ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13246if test "x$ac_cv_func_socket" = x""yes; then :
13247
a4f64981 13248else
8c5ff6dd
KR
13249 ok_so_far=no
13250fi
503d2be0 13251
8c5ff6dd
KR
13252if test $ok_so_far = yes; then
13253 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
13254if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
647847ea 13255
8c5ff6dd
KR
13256else
13257 ok_so_far=no
647847ea
DL
13258fi
13259
c0d27fcc 13260
c0d27fcc 13261fi
8c5ff6dd
KR
13262if test $ok_so_far = yes; then
13263 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
13264if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
a4f64981 13265
8c5ff6dd
KR
13266else
13267 ok_so_far=no
c0d27fcc 13268fi
ca81d7a0 13269
19650fd6 13270
647847ea 13271fi
8c5ff6dd 13272if test $ok_so_far = yes; then
ca81d7a0 13273
8c5ff6dd 13274$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
ca81d7a0 13275
647847ea 13276fi
c0d27fcc 13277
8c5ff6dd
KR
13278for ac_header in sys/ioctl.h
13279do :
13280 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
13281if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 13282 cat >>confdefs.h <<_ACEOF
8c5ff6dd 13283#define HAVE_SYS_IOCTL_H 1
c0d27fcc 13284_ACEOF
647847ea 13285
73b77ee5 13286fi
c0d27fcc 13287
503d2be0 13288done
73b77ee5 13289
c0d27fcc 13290
8c5ff6dd 13291if test -f /usr/lpp/X11/bin/smt.exp; then
49ebbd65 13292
8c5ff6dd 13293$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
15e12598 13294
8c5ff6dd 13295fi
cd03c74a 13296
8c5ff6dd
KR
13297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
13298$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
13299if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13301$as_echo "yes" >&6; }
49ebbd65 13302
8c5ff6dd 13303$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
15e12598 13304
8c5ff6dd
KR
13305else
13306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13307$as_echo "no" >&6; }
13308fi
13309
13310ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13311if test "x$ac_cv_type_pid_t" = x""yes; then :
49ebbd65 13312
a4f64981 13313else
15e12598 13314
8c5ff6dd
KR
13315cat >>confdefs.h <<_ACEOF
13316#define pid_t int
13317_ACEOF
13318
e6df49e4 13319fi
15e12598 13320
8c5ff6dd
KR
13321for ac_header in vfork.h
13322do :
13323 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13324if test "x$ac_cv_header_vfork_h" = x""yes; then :
13325 cat >>confdefs.h <<_ACEOF
13326#define HAVE_VFORK_H 1
13327_ACEOF
13328
a4f64981 13329fi
8c5ff6dd
KR
13330
13331done
13332
13333for ac_func in fork vfork
13334do :
13335 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13336ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13337eval as_val=\$$as_ac_var
13338 if test "x$as_val" = x""yes; then :
c0d27fcc 13339 cat >>confdefs.h <<_ACEOF
e9a63f04 13340#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13341_ACEOF
503d2be0 13342
fa0b693c 13343fi
503d2be0 13344done
fa0b693c 13345
503d2be0 13346if test "x$ac_cv_func_fork" = xyes; then
8c5ff6dd 13347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
e9a63f04 13348$as_echo_n "checking for working fork... " >&6; }
8c5ff6dd 13349if test "${ac_cv_func_fork_works+set}" = set; then :
e9a63f04 13350 $as_echo_n "(cached) " >&6
fa0b693c 13351else
8c5ff6dd 13352 if test "$cross_compiling" = yes; then :
503d2be0
AS
13353 ac_cv_func_fork_works=cross
13354else
8c5ff6dd 13355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
13356/* end confdefs.h. */
13357$ac_includes_default
13358int
13359main ()
13360{
13361
13362 /* By Ruediger Kuhlmann. */
13363 return fork () < 0;
13364
13365 ;
13366 return 0;
13367}
503d2be0 13368_ACEOF
8c5ff6dd 13369if ac_fn_c_try_run "$LINENO"; then :
503d2be0
AS
13370 ac_cv_func_fork_works=yes
13371else
8c5ff6dd 13372 ac_cv_func_fork_works=no
503d2be0 13373fi
8c5ff6dd
KR
13374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13375 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 13376fi
ca81d7a0 13377
503d2be0 13378fi
8c5ff6dd 13379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
e9a63f04 13380$as_echo "$ac_cv_func_fork_works" >&6; }
503d2be0 13381
6bae0ccf
DL
13382else
13383 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
13384fi
13385if test "x$ac_cv_func_fork_works" = xcross; then
13386 case $host in
13387 *-*-amigaos* | *-*-msdosdjgpp*)
13388 # Override, as these systems have only a dummy fork() stub
13389 ac_cv_func_fork_works=no
13390 ;;
13391 *)
13392 ac_cv_func_fork_works=yes
13393 ;;
13394 esac
8c5ff6dd 13395 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
e9a63f04 13396$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 13397fi
73b77ee5 13398ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 13399if test "x$ac_cv_func_vfork" = xyes; then
8c5ff6dd 13400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
e9a63f04 13401$as_echo_n "checking for working vfork... " >&6; }
8c5ff6dd 13402if test "${ac_cv_func_vfork_works+set}" = set; then :
e9a63f04 13403 $as_echo_n "(cached) " >&6
503d2be0 13404else
8c5ff6dd 13405 if test "$cross_compiling" = yes; then :
503d2be0 13406 ac_cv_func_vfork_works=cross
fa0b693c 13407else
8c5ff6dd 13408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13409/* end confdefs.h. */
73b77ee5 13410/* Thanks to Paul Eggert for this test. */
ca81d7a0 13411$ac_includes_default
19650fd6 13412#include <sys/wait.h>
f053c89f 13413#ifdef HAVE_VFORK_H
503d2be0 13414# include <vfork.h>
73b77ee5
GM
13415#endif
13416/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
13417 argument registers are propagated back to the parent. The compiler
13418 is told about this with #include <vfork.h>, but some compilers
13419 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13420 static variable whose address is put into a register that is
13421 clobbered by the vfork. */
19650fd6 13422static void
fa0b693c 13423#ifdef __cplusplus
73b77ee5 13424sparc_address_test (int arg)
503d2be0 13425# else
73b77ee5 13426sparc_address_test (arg) int arg;
fa0b693c 13427#endif
fa0b693c 13428{
73b77ee5
GM
13429 static pid_t child;
13430 if (!child) {
13431 child = vfork ();
13432 if (child < 0) {
13433 perror ("vfork");
13434 _exit(2);
13435 }
13436 if (!child) {
13437 arg = getpid();
13438 write(-1, "", 0);
13439 _exit (arg);
13440 }
13441 }
13442}
503d2be0
AS
13443
13444int
13445main ()
13446{
73b77ee5
GM
13447 pid_t parent = getpid ();
13448 pid_t child;
fa0b693c 13449
19650fd6 13450 sparc_address_test (0);
fa0b693c 13451
73b77ee5 13452 child = vfork ();
fa0b693c 13453
73b77ee5 13454 if (child == 0) {
503d2be0
AS
13455 /* Here is another test for sparc vfork register problems. This
13456 test uses lots of local variables, at least as many local
13457 variables as main has allocated so far including compiler
13458 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13459 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13460 reuse the register of parent for one of the local variables,
13461 since it will think that parent can't possibly be used any more
13462 in this routine. Assigning to the local variable will thus
13463 munge parent in the parent process. */
73b77ee5
GM
13464 pid_t
13465 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13466 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13467 /* Convince the compiler that p..p7 are live; otherwise, it might
13468 use the same hardware register for all 8 local variables. */
13469 if (p != p1 || p != p2 || p != p3 || p != p4
13470 || p != p5 || p != p6 || p != p7)
13471 _exit(1);
fa0b693c 13472
503d2be0
AS
13473 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13474 from child file descriptors. If the child closes a descriptor
13475 before it execs or exits, this munges the parent's descriptor
13476 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
13477 _exit(close(fileno(stdout)) != 0);
13478 } else {
13479 int status;
13480 struct stat st;
13481
13482 while (wait(&status) != child)
13483 ;
ca81d7a0 13484 return (
73b77ee5
GM
13485 /* Was there some problem with vforking? */
13486 child < 0
13487
13488 /* Did the child fail? (This shouldn't happen.) */
13489 || status
13490
13491 /* Did the vfork/compiler bug occur? */
13492 || parent != getpid()
fa0b693c 13493
73b77ee5
GM
13494 /* Did the file descriptor bug occur? */
13495 || fstat(fileno(stdout), &st) != 0
13496 );
13497 }
13498}
503d2be0 13499_ACEOF
8c5ff6dd 13500if ac_fn_c_try_run "$LINENO"; then :
73b77ee5 13501 ac_cv_func_vfork_works=yes
fa0b693c 13502else
8c5ff6dd 13503 ac_cv_func_vfork_works=no
503d2be0 13504fi
8c5ff6dd
KR
13505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13506 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa0b693c 13507fi
ca81d7a0 13508
fa0b693c 13509fi
8c5ff6dd 13510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
e9a63f04 13511$as_echo "$ac_cv_func_vfork_works" >&6; }
fa0b693c 13512
503d2be0
AS
13513fi;
13514if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 13515 ac_cv_func_vfork_works=$ac_cv_func_vfork
8c5ff6dd 13516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
e9a63f04 13517$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
13518fi
13519
503d2be0
AS
13520if test "x$ac_cv_func_vfork_works" = xyes; then
13521
8c5ff6dd 13522$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
503d2be0
AS
13523
13524else
13525
8c5ff6dd 13526$as_echo "#define vfork fork" >>confdefs.h
fa0b693c
GM
13527
13528fi
503d2be0
AS
13529if test "x$ac_cv_func_fork_works" = xyes; then
13530
8c5ff6dd 13531$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fa0b693c 13532
503d2be0 13533fi
647847ea 13534
c0d27fcc 13535
8c5ff6dd 13536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
e9a63f04 13537$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8c5ff6dd 13538if test "${emacs_cv_langinfo_codeset+set}" = set; then :
e9a63f04 13539 $as_echo_n "(cached) " >&6
6a3a24fa 13540else
8c5ff6dd 13541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13542/* end confdefs.h. */
6a3a24fa
JD
13543#include <langinfo.h>
13544int
13545main ()
13546{
13547char* cs = nl_langinfo(CODESET);
15e12598
VB
13548 ;
13549 return 0;
8c5ff6dd
KR
13550}
13551_ACEOF
13552if ac_fn_c_try_link "$LINENO"; then :
13553 emacs_cv_langinfo_codeset=yes
a4f64981 13554else
8c5ff6dd 13555 emacs_cv_langinfo_codeset=no
15e12598 13556fi
8c5ff6dd
KR
13557rm -f core conftest.err conftest.$ac_objext \
13558 conftest$ac_exeext conftest.$ac_ext
e6df49e4 13559
8c5ff6dd
KR
13560fi
13561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
13562$as_echo "$emacs_cv_langinfo_codeset" >&6; }
13563if test $emacs_cv_langinfo_codeset = yes; then
a4f64981 13564
8c5ff6dd 13565$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
e9a63f04 13566
8730a8da 13567fi
dc2933eb 13568
8c5ff6dd
KR
13569ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13570if test "x$ac_cv_type_size_t" = x""yes; then :
503d2be0 13571
c0d27fcc
MR
13572cat >>confdefs.h <<_ACEOF
13573#define HAVE_SIZE_T 1
13574_ACEOF
13575
8730a8da
DL
13576
13577fi
13578
c0d27fcc 13579
8c5ff6dd 13580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
e9a63f04 13581$as_echo_n "checking for mbstate_t... " >&6; }
8c5ff6dd 13582if test "${ac_cv_type_mbstate_t+set}" = set; then :
e9a63f04 13583 $as_echo_n "(cached) " >&6
973a76b1 13584else
8c5ff6dd 13585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13586/* end confdefs.h. */
973a76b1
DL
13587$ac_includes_default
13588# include <wchar.h>
13589int
13590main ()
13591{
13592mbstate_t x; return sizeof x;
13593 ;
13594 return 0;
13595}
13596_ACEOF
8c5ff6dd 13597if ac_fn_c_try_compile "$LINENO"; then :
973a76b1
DL
13598 ac_cv_type_mbstate_t=yes
13599else
8c5ff6dd 13600 ac_cv_type_mbstate_t=no
973a76b1 13601fi
ca81d7a0 13602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 13603fi
8c5ff6dd 13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
e9a63f04 13605$as_echo "$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
13606 if test $ac_cv_type_mbstate_t = yes; then
13607
8c5ff6dd 13608$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
973a76b1
DL
13609
13610 else
13611
8c5ff6dd 13612$as_echo "#define mbstate_t int" >>confdefs.h
973a76b1
DL
13613
13614 fi
13615
8c5ff6dd 13616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
e9a63f04 13617$as_echo_n "checking for C restrict keyword... " >&6; }
8c5ff6dd 13618if test "${emacs_cv_c_restrict+set}" = set; then :
e9a63f04 13619 $as_echo_n "(cached) " >&6
22044edf 13620else
8c5ff6dd 13621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13622/* end confdefs.h. */
22044edf
DL
13623void fred (int *restrict x);
13624int
13625main ()
13626{
b936fae4 13627
22044edf
DL
13628 ;
13629 return 0;
13630}
c0d27fcc 13631_ACEOF
8c5ff6dd 13632if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13633 emacs_cv_c_restrict=yes
13634else
8c5ff6dd 13635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13636/* end confdefs.h. */
22044edf
DL
13637void fred (int *__restrict x);
13638int
13639main ()
13640{
c0d27fcc 13641
22044edf
DL
13642 ;
13643 return 0;
13644}
c0d27fcc 13645_ACEOF
8c5ff6dd 13646if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13647 emacs_cv_c_restrict=__restrict
13648else
8c5ff6dd 13649 emacs_cv_c_restrict=no
ba4481b5 13650fi
ca81d7a0 13651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13652fi
ca81d7a0 13653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13654fi
8c5ff6dd 13655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
e9a63f04 13656$as_echo "$emacs_cv_c_restrict" >&6; }
22044edf
DL
13657case "$emacs_cv_c_restrict" in
13658 yes) emacs_restrict=restrict;;
13659 no) emacs_restrict="";;
13660 *) emacs_restrict="$emacs_cv_c_restrict";;
13661esac
13662if test "$emacs_restrict" != __restrict; then
b936fae4 13663
22044edf
DL
13664cat >>confdefs.h <<_ACEOF
13665#define __restrict $emacs_restrict
c0d27fcc 13666_ACEOF
ba4481b5
DL
13667
13668fi
ba4481b5 13669
8c5ff6dd 13670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
e9a63f04 13671$as_echo_n "checking for C restricted array declarations... " >&6; }
8c5ff6dd 13672if test "${emacs_cv_c_restrict_arr+set}" = set; then :
e9a63f04 13673 $as_echo_n "(cached) " >&6
22044edf 13674else
8c5ff6dd 13675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13676/* end confdefs.h. */
22044edf
DL
13677void fred (int x[__restrict]);
13678int
13679main ()
13680{
b936fae4 13681
22044edf
DL
13682 ;
13683 return 0;
13684}
c0d27fcc 13685_ACEOF
8c5ff6dd 13686if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13687 emacs_cv_c_restrict_arr=yes
13688else
8c5ff6dd 13689 emacs_cv_c_restrict_arr=no
ba4481b5 13690fi
ca81d7a0 13691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 13692fi
8c5ff6dd 13693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
e9a63f04 13694$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22044edf 13695if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 13696
8c5ff6dd 13697$as_echo "#define __restrict_arr __restrict" >>confdefs.h
ba4481b5 13698
ba4481b5
DL
13699fi
13700
c0d27fcc 13701
c0d27fcc 13702
22044edf
DL
13703# Set up the CFLAGS for real compilation, so we can substitute it.
13704CFLAGS="$REAL_CFLAGS"
13705CPPFLAGS="$REAL_CPPFLAGS"
13706
9978c06c
CY
13707## Hack to detect a buggy GCC version.
13708if test "x$GCC" = xyes \
13709 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
13710 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
13711 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
8c5ff6dd 13712 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
9978c06c
CY
13713fi
13714
22044edf 13715#### Find out which version of Emacs this is.
8c5ff6dd 13716version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \
22044edf
DL
13717 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
13718if test x"${version}" = x; then
8c5ff6dd 13719 as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5
22044edf 13720fi
879de935 13721if test x"${version}" != x"$PACKAGE_VERSION"; then
8c5ff6dd
KR
13722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5
13723$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;}
879de935 13724fi
22044edf
DL
13725
13726### Specify what sort of things we'll be editing into Makefile and config.h.
13727### Use configuration here uncanonicalized to avoid exceeding size limits.
13728
13729
4286c48d 13730## Unused?
22044edf
DL
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
4286c48d
GM
13752## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
13753## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
13754## end of LIBX_BASE, but nothing ever set it.
22044edf
DL
13755
13756
13757
13758
c82a7244 13759## Used in lwlib/Makefile.in.
22044edf
DL
13760
13761
6a3a24fa 13762
06b62770
AR
13763
13764
13765
48fad8e8
DN
13766
13767
5e159d07
CY
13768
13769
edfda783 13770
91231421 13771
aaa36002 13772
08b47d3d 13773
22044edf
DL
13774cat >>confdefs.h <<_ACEOF
13775#define EMACS_CONFIGURATION "${canonical}"
13776_ACEOF
13777
13778
13779cat >>confdefs.h <<_ACEOF
13780#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
13781_ACEOF
13782
13783
13784cat >>confdefs.h <<_ACEOF
13785#define config_machfile "${machfile}"
13786_ACEOF
13787
13788
13789cat >>confdefs.h <<_ACEOF
13790#define config_opsysfile "${opsysfile}"
13791_ACEOF
13792
13793
e765bf58
JD
13794XMENU_OBJ=
13795XOBJ=
22044edf
DL
13796if test "${HAVE_X_WINDOWS}" = "yes" ; then
13797
8c5ff6dd 13798$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
22044edf 13799
e765bf58
JD
13800 XMENU_OBJ=xmenu.o
13801 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
22044edf 13802fi
e765bf58
JD
13803
13804
13805
7186fb09 13806WIDGET_OBJ=
c82a7244 13807MOTIF_LIBW=
22044edf 13808if test "${USE_X_TOOLKIT}" != "none" ; then
7186fb09 13809 WIDGET_OBJ=widget.o
22044edf 13810
8c5ff6dd 13811$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
22044edf 13812
39dd4d52 13813 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5 13814
8c5ff6dd 13815$as_echo "#define USE_LUCID 1" >>confdefs.h
73d798d5 13816
39dd4d52 13817 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5 13818
8c5ff6dd 13819$as_echo "#define USE_MOTIF 1" >>confdefs.h
73d798d5 13820
c82a7244
GM
13821 MOTIF_LIBW=-lXm
13822 case "$opsys" in
13823 gnu-linux)
13824 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
13825 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
13826 ;;
13827
13828 unixware)
13829 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
13830 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
13831 MOTIF_LIBW="MOTIF_LIBW -lXimp"
13832 ;;
13833
13834 aix4-2)
13835 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
13836 MOTIF_LIBW="$MOTIF_LIBW -li18n"
13837 ;;
13838 esac
13839 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
73d798d5 13840 fi
22044edf 13841fi
7186fb09 13842
c82a7244 13843
718a19c8 13844TOOLKIT_LIBW=
c82a7244
GM
13845case "$USE_X_TOOLKIT" in
13846 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
13847 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
718a19c8 13848 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
c82a7244
GM
13849esac
13850
13851
a5edbe4a
GM
13852if test "$USE_X_TOOLKIT" = "none"; then
13853 LIBXT_OTHER="\$(LIBXSM)"
8b44daa0 13854 OLDXMENU_TARGET="really-oldXMenu"
a5edbe4a
GM
13855else
13856 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
8b44daa0 13857 OLDXMENU_TARGET="really-lwlib"
a5edbe4a
GM
13858fi
13859
13860
8b44daa0 13861
718a19c8
GM
13862## The X Menu stuff is present in the X10 distribution, but missing
13863## from X11. If we have X10, just use the installed library;
13864## otherwise, use our own copy.
22044edf
DL
13865if test "${HAVE_X11}" = "yes" ; then
13866
8c5ff6dd 13867$as_echo "#define HAVE_X11 1" >>confdefs.h
22044edf 13868
718a19c8
GM
13869
13870 if test "$USE_X_TOOLKIT" = "none"; then
13871 OLDXMENU="\${oldXMenudir}libXMenu11.a"
13872 else
13873 OLDXMENU="\${lwlibdir}liblw.a"
13874 fi
13875 LIBXMENU="\$(OLDXMENU)"
a5edbe4a 13876 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
718a19c8
GM
13877else
13878 OLDXMENU=
13879 LIBXMENU="-lXMenu"
a5edbe4a 13880 LIBX_OTHER=
22044edf 13881fi
718a19c8 13882
4286c48d 13883if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
718a19c8
GM
13884 OLDXMENU=
13885 LIBXMENU=
13886fi
13887
13888
13889
13890
a5edbe4a 13891
22044edf
DL
13892if test "${HAVE_MENUS}" = "yes" ; then
13893
8c5ff6dd 13894$as_echo "#define HAVE_MENUS 1" >>confdefs.h
22044edf
DL
13895
13896fi
13897if test "${GNU_MALLOC}" = "yes" ; then
13898
8c5ff6dd 13899$as_echo "#define GNU_MALLOC 1" >>confdefs.h
22044edf
DL
13900
13901fi
13902if test "${REL_ALLOC}" = "yes" ; then
13903
8c5ff6dd 13904$as_echo "#define REL_ALLOC 1" >>confdefs.h
22044edf
DL
13905
13906fi
13907
718a19c8 13908
718a19c8
GM
13909if test "$opsys" = "cygwin"; then
13910 CYGWIN_OBJ="sheap.o"
13911 ## Cygwin differs because of its unexec().
7acac9f4
GM
13912 PRE_ALLOC_OBJ=
13913 POST_ALLOC_OBJ="lastfile.o vm-limit.o"
718a19c8
GM
13914else
13915 CYGWIN_OBJ=
7acac9f4
GM
13916 PRE_ALLOC_OBJ=lastfile.o
13917 POST_ALLOC_OBJ="\$(vmlimitobj)"
718a19c8
GM
13918fi
13919
106c6f74 13920
22044edf
DL
13921
13922
c0d27fcc 13923
ede4834a
GM
13924case "$opsys" in
13925 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
13926
13927 darwin)
13928 ## The -headerpad option tells ld (see man page) to leave room at the
13929 ## end of the header for adding load commands. Needed for dumping.
13930 ## 0x690 is the total size of 30 segment load commands (at 56
13931 ## each); under Cocoa 31 commands are required.
13932 if test "$HAVE_NS" = "yes"; then
13933 libs_nsgui="-framework AppKit"
13934 headerpad_extra=6C8
13935 else
13936 libs_nsgui=
13937 headerpad_extra=690
13938 fi
13939 LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
13940 ;;
13941
13942 *) LD_SWITCH_SYSTEM_TEMACS= ;;
13943esac
13944
13945
13946
e6df49e4
GM
13947## This exists because src/Makefile.in did some extra fiddling around
13948## with LD_SWITCH_SYSTEM. The cpp logic was:
13949## #ifndef LD_SWITCH_SYSTEM
13950## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
13951## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
13952## not using gcc, darwin system not on an alpha (ie darwin, since
13953## darwin + alpha does not occur).
13954## Note that unlike L_S_S, this is not used in ac_link.
13955if test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
13956 test "$opsys" = "darwin"; then
13957 LD_SWITCH_SYSTEM_EXTRA="-X"
13958else
13959 LD_SWITCH_SYSTEM_EXTRA=
13960fi
13961
13962
13963
057886a3
GM
13964LIB_GCC=
13965if test "x$GCC" = "xyes"; then
13966
13967 case "$opsys" in
13968 ## cygwin: don't link against static libgcc.
13969 cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
13970
13971 gnu-*)
13972 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
13973 ## build on ARM EABI under GNU/Linux. (Bug#5518)
13974 ## Note that m/arm.h never bothered to undefine LIB_GCC first.
13975 if test "$machine" = "arm"; then
13976 LIB_GCC="-lgcc_s"
13977 else
13978 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
13979 ## immediately undefine it again and redefine it to empty.
13980 ## Was the C_SWITCH_X_SITE part really necessary?
3536f993 13981## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
057886a3
GM
13982 LIB_GCC=
13983 fi
13984 ;;
13985
13986 ## Ask GCC where to find libgcc.a.
3536f993 13987 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
057886a3
GM
13988 esac
13989fi
13990
13991
372b4090
GM
13992TOOLTIP_SUPPORT=
13993WINDOW_SUPPORT=
13994## If we're using X11/GNUstep, define some consequences.
13995if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
13996
8c5ff6dd 13997$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
372b4090
GM
13998
13999
8c5ff6dd 14000$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
372b4090
GM
14001
14002 MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
14003 TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
14004
14005 WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
14006 test "$HAVE_X_WINDOWS" = "yes" && \
14007 WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
14008
14009fi
14010
14011
14012
14013
14014
e6df49e4
GM
14015
14016
ba4481b5 14017#### Report on what we decided to do.
488dd4c4
JD
14018#### Report GTK as a toolkit, even if it doesn't use Xt.
14019#### It makes printing result more understandable as using GTK sets
14020#### toolkit_scroll_bars to yes by default.
14021if test "${HAVE_GTK}" = "yes"; then
14022 USE_X_TOOLKIT=GTK
14023fi
14024
ba4481b5
DL
14025echo "
14026Configured for \`${canonical}'.
14027
14028 Where should the build process find the source code? ${srcdir}
14029 What operating system and machine description files should Emacs use?
14030 \`${opsysfile}' and \`${machfile}'
14031 What compiler should emacs be built with? ${CC} ${CFLAGS}
14032 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 14033 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 14034 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 14035 What window system should Emacs use? ${window_system}
8e967cf7 14036 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
14037
14038if test -n "${x_includes}"; then
14039echo " Where do we find X Windows header files? ${x_includes}"
14040else
14041echo " Where do we find X Windows header files? Standard dirs"
14042fi
14043if test -n "${x_libraries}"; then
14044echo " Where do we find X Windows libraries? ${x_libraries}"
14045else
14046echo " Where do we find X Windows libraries? Standard dirs"
14047fi
14048
14049echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
14050echo " Does Emacs use -lXpm? ${HAVE_XPM}"
14051echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
14052echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
91e84f96 14053echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
ba4481b5 14054echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 14055echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 14056echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 14057echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
637fa988 14058echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
022c122a 14059echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
2ee27f27 14060
edfda783
AR
14061echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
14062echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
14063echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
14064echo " Does Emacs use -lxft? ${HAVE_XFT}"
14065
8d87199b 14066echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
14067echo
14068
d0098f13
JD
14069if test $USE_XASSERTS = yes; then
14070 echo " Compiling with asserts turned on."
d0098f13 14071 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 14072fi
05cf15c6 14073
ca34d75a
JD
14074echo
14075
06b62770
AR
14076if test "$HAVE_NS" = "yes"; then
14077 echo
14078 echo "You must run \"make install\" in order to test the built application.
14079The installed application will go to nextstep/Emacs.app and can be
14080run or moved from there."
14081 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
14082 echo "The application will be fully self-contained."
14083 else
14084 echo "The lisp resources for the application will be installed under ${prefix}.
14085You may need to run \"make install\" with sudo. The application will fail
14086to run if these resources are not installed."
14087 fi
14088 echo
14089fi
14090
131e4133
MA
14091if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
14092 echo "D-Bus integration has been tested for GNU/Linux only."
14093 echo
14094fi
14095
05cf15c6 14096
ba4481b5
DL
14097# Remove any trailing slashes in these variables.
14098test "${prefix}" != NONE &&
14099 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
14100test "${exec_prefix}" != NONE &&
14101 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
14102
8acdcf6f
GM
14103# Now get this: Some word that is part of the ${srcdir} directory name
14104# or the ${configuration} value might, just might, happen to be an
14105# identifier like `sun4' or `i386' or something, and be predefined by
14106# the C preprocessor to some helpful value like 1, or maybe the empty
14107# string. Needless to say consequent macro substitutions are less
14108# than conducive to the makefile finding the correct directory.
8b44daa0
GM
14109# src/Makefile.in used to treat X11 as equivalent to HAVE_X11.
14110# But nothing in Emacs defines X11, and everywhere else uses HAVE_X11,
14111# so that cannot have been doing anything.
fbc00890 14112cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 |
8acdcf6f
GM
14113 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
14114 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
14115
d0e9bfd2
GM
14116## Check if the C preprocessor will convert `..' to `. .'. If so, set
14117## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
14118## from Makefile.c can correctly provide the arg `-traditional' to the
14119## C preprocessor.
14120
8c5ff6dd 14121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14122/* end confdefs.h. */
d0e9bfd2 14123yes..yes
503d2be0 14124_ACEOF
d0e9bfd2 14125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8c5ff6dd 14126 $EGREP "yes..yes" >/dev/null 2>&1; then :
d0e9bfd2
GM
14127 CPP_NEED_TRADITIONAL=no
14128else
d0e9bfd2
GM
14129 CPP_NEED_TRADITIONAL=yes
14130fi
14131rm -f conftest*
14132
c0d27fcc 14133
981f8c13 14134ac_config_files="$ac_config_files Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
ca81d7a0
JD
14135
14136ac_config_commands="$ac_config_commands default"
14137
503d2be0 14138cat >confcache <<\_ACEOF
ba4481b5
DL
14139# This file is a shell script that caches the results of configure
14140# tests run on this system so they can be shared between configure
503d2be0
AS
14141# scripts and configure runs, see configure's option --config-cache.
14142# It is not useful on other systems. If it contains results you don't
14143# want to keep, you may remove or edit it.
ba4481b5 14144#
503d2be0
AS
14145# config.status only pays attention to the cache file if you give it
14146# the --recheck option to rerun configure.
ba4481b5 14147#
6bae0ccf 14148# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
14149# loading this file, other *unset* `ac_cv_foo' will be assigned the
14150# following values.
14151
14152_ACEOF
14153
ba4481b5
DL
14154# The following way of writing the cache mishandles newlines in values,
14155# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 14156# So, we kill variables containing newlines.
ba4481b5
DL
14157# Ultrix sh set writes to stderr and can't be redirected directly,
14158# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
14159(
14160 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14161 eval ac_val=\$$ac_var
14162 case $ac_val in #(
14163 *${as_nl}*)
14164 case $ac_var in #(
8c5ff6dd
KR
14165 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14166$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
14167 esac
14168 case $ac_var in #(
14169 _ | IFS | as_nl) ;; #(
e9a63f04 14170 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
8c5ff6dd 14171 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
14172 esac ;;
14173 esac
14174 done
14175
503d2be0 14176 (set) 2>&1 |
ca81d7a0
JD
14177 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14178 *${as_nl}ac_space=\ *)
8c5ff6dd
KR
14179 # `set' does not quote correctly, so add quotes: double-quote
14180 # substitution turns \\\\ into \\, and sed turns \\ into \.
503d2be0 14181 sed -n \
edfaf76d
LK
14182 "s/'/'\\\\''/g;
14183 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 14184 ;; #(
503d2be0
AS
14185 *)
14186 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 14187 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 14188 ;;
ca81d7a0
JD
14189 esac |
14190 sort
14191) |
503d2be0 14192 sed '
ca81d7a0 14193 /^ac_cv_env_/b end
503d2be0 14194 t clear
ca81d7a0 14195 :clear
503d2be0
AS
14196 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14197 t end
ca81d7a0
JD
14198 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14199 :end' >>confcache
14200if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14201 if test -w "$cache_file"; then
14202 test "x$cache_file" != "x/dev/null" &&
8c5ff6dd 14203 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
e9a63f04 14204$as_echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 14205 cat confcache >$cache_file
ba4481b5 14206 else
8c5ff6dd 14207 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
e9a63f04 14208$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
14209 fi
14210fi
14211rm -f confcache
14212
ba4481b5
DL
14213test "x$prefix" = xNONE && prefix=$ac_default_prefix
14214# Let make expand exec_prefix.
14215test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14216
ba4481b5
DL
14217DEFS=-DHAVE_CONFIG_H
14218
6bae0ccf
DL
14219ac_libobjs=
14220ac_ltlibobjs=
14221for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14222 # 1. Remove the extension, and $U if already installed.
ca81d7a0 14223 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 14224 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
14225 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14226 # will be set to the directory where LIBOBJS objects are built.
8c5ff6dd
KR
14227 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14228 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
14229done
14230LIBOBJS=$ac_libobjs
14231
14232LTLIBOBJS=$ac_ltlibobjs
14233
14234
c0d27fcc 14235
ba4481b5 14236: ${CONFIG_STATUS=./config.status}
e9a63f04 14237ac_write_fail=0
503d2be0
AS
14238ac_clean_files_save=$ac_clean_files
14239ac_clean_files="$ac_clean_files $CONFIG_STATUS"
8c5ff6dd 14240{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 14241$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
8c5ff6dd
KR
14242as_write_fail=0
14243cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 14244#! $SHELL
c0d27fcc 14245# Generated by $as_me.
ba4481b5 14246# Run this file to recreate the current configuration.
ba4481b5 14247# Compiler output produced by configure, useful for debugging
503d2be0 14248# configure, is in config.log if it exists.
ba4481b5 14249
503d2be0 14250debug=false
19650fd6
AS
14251ac_cs_recheck=false
14252ac_cs_silent=false
a4f64981 14253
8c5ff6dd
KR
14254SHELL=\${CONFIG_SHELL-$SHELL}
14255export SHELL
14256_ASEOF
14257cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14258## -------------------- ##
14259## M4sh Initialization. ##
14260## -------------------- ##
c0d27fcc 14261
f053c89f
CY
14262# Be more Bourne compatible
14263DUALCASE=1; export DUALCASE # for MKS sh
8c5ff6dd 14264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
14265 emulate sh
14266 NULLCMD=:
e9a63f04 14267 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
14268 # is contrary to our usage. Disable this feature.
14269 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
14270 setopt NO_GLOB_SUBST
14271else
8c5ff6dd
KR
14272 case `(set -o) 2>/dev/null` in #(
14273 *posix*) :
14274 set -o posix ;; #(
14275 *) :
14276 ;;
f053c89f 14277esac
503d2be0 14278fi
f053c89f
CY
14279
14280
e9a63f04
GM
14281as_nl='
14282'
14283export as_nl
14284# Printing a long string crashes Solaris 7 /usr/bin/printf.
14285as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14286as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14287as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
8c5ff6dd
KR
14288# Prefer a ksh shell builtin over an external printf program on Solaris,
14289# but without wasting forks for bash or zsh.
14290if test -z "$BASH_VERSION$ZSH_VERSION" \
14291 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14292 as_echo='print -r --'
14293 as_echo_n='print -rn --'
14294elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
14295 as_echo='printf %s\n'
14296 as_echo_n='printf %s'
14297else
14298 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14299 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14300 as_echo_n='/usr/ucb/echo -n'
7bbec45b 14301 else
e9a63f04
GM
14302 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14303 as_echo_n_body='eval
14304 arg=$1;
8c5ff6dd 14305 case $arg in #(
e9a63f04
GM
14306 *"$as_nl"*)
14307 expr "X$arg" : "X\\(.*\\)$as_nl";
14308 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14309 esac;
14310 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14311 '
14312 export as_echo_n_body
14313 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 14314 fi
e9a63f04
GM
14315 export as_echo_body
14316 as_echo='sh -c $as_echo_body as_echo'
14317fi
14318
14319# The user is always right.
14320if test "${PATH_SEPARATOR+set}" != set; then
14321 PATH_SEPARATOR=:
14322 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14323 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14324 PATH_SEPARATOR=';'
14325 }
503d2be0
AS
14326fi
14327
6bae0ccf 14328
ca81d7a0
JD
14329# IFS
14330# We need space, tab and new line, in precisely that order. Quoting is
14331# there to prevent editors from complaining about space-tab.
14332# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14333# splitting by setting IFS to empty value.)
ca81d7a0
JD
14334IFS=" "" $as_nl"
14335
14336# Find who we are. Look in the path if we contain no directory separator.
8c5ff6dd 14337case $0 in #((
ca81d7a0
JD
14338 *[\\/]* ) as_myself=$0 ;;
14339 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14340for as_dir in $PATH
14341do
14342 IFS=$as_save_IFS
14343 test -z "$as_dir" && as_dir=.
8c5ff6dd
KR
14344 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14345 done
ca81d7a0
JD
14346IFS=$as_save_IFS
14347
14348 ;;
14349esac
14350# We did not find ourselves, most probably we were run as `sh COMMAND'
14351# in which case we are not to be found in the path.
14352if test "x$as_myself" = x; then
14353 as_myself=$0
14354fi
14355if test ! -f "$as_myself"; then
e9a63f04 14356 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
8c5ff6dd 14357 exit 1
ca81d7a0
JD
14358fi
14359
8c5ff6dd
KR
14360# Unset variables that we do not need and which cause bugs (e.g. in
14361# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14362# suppresses any "Segmentation fault" message there. '((' could
14363# trigger a bug in pdksh 5.2.14.
14364for as_var in BASH_ENV ENV MAIL MAILPATH
14365do eval test x\${$as_var+set} = xset \
14366 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 14367done
6bae0ccf
DL
14368PS1='$ '
14369PS2='> '
14370PS4='+ '
14371
14372# NLS nuisances.
e9a63f04
GM
14373LC_ALL=C
14374export LC_ALL
14375LANGUAGE=C
14376export LANGUAGE
6bae0ccf 14377
8c5ff6dd
KR
14378# CDPATH.
14379(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14380
14381
14382# as_fn_error ERROR [LINENO LOG_FD]
14383# ---------------------------------
14384# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14385# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14386# script with status $?, using 1 if that was 0.
14387as_fn_error ()
14388{
14389 as_status=$?; test $as_status -eq 0 && as_status=1
14390 if test "$3"; then
14391 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14392 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14393 fi
14394 $as_echo "$as_me: error: $1" >&2
14395 as_fn_exit $as_status
14396} # as_fn_error
14397
14398
14399# as_fn_set_status STATUS
14400# -----------------------
14401# Set $? to STATUS, without forking.
14402as_fn_set_status ()
14403{
14404 return $1
14405} # as_fn_set_status
14406
14407# as_fn_exit STATUS
14408# -----------------
14409# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14410as_fn_exit ()
14411{
14412 set +e
14413 as_fn_set_status $1
14414 exit $1
14415} # as_fn_exit
14416
14417# as_fn_unset VAR
14418# ---------------
14419# Portably unset VAR.
14420as_fn_unset ()
14421{
14422 { eval $1=; unset $1;}
14423}
14424as_unset=as_fn_unset
14425# as_fn_append VAR VALUE
14426# ----------------------
14427# Append the text in VALUE to the end of the definition contained in VAR. Take
14428# advantage of any shell optimizations that allow amortized linear growth over
14429# repeated appends, instead of the typical quadratic growth present in naive
14430# implementations.
14431if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14432 eval 'as_fn_append ()
14433 {
14434 eval $1+=\$2
14435 }'
14436else
14437 as_fn_append ()
14438 {
14439 eval $1=\$$1\$2
14440 }
14441fi # as_fn_append
14442
14443# as_fn_arith ARG...
14444# ------------------
14445# Perform arithmetic evaluation on the ARGs, and store the result in the
14446# global $as_val. Take advantage of shells that can avoid forks. The arguments
14447# must be portable across $(()) and expr.
14448if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14449 eval 'as_fn_arith ()
14450 {
14451 as_val=$(( $* ))
14452 }'
14453else
14454 as_fn_arith ()
14455 {
14456 as_val=`expr "$@" || test $? -eq 1`
14457 }
14458fi # as_fn_arith
14459
14460
ca81d7a0
JD
14461if expr a : '\(a\)' >/dev/null 2>&1 &&
14462 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
14463 as_expr=expr
14464else
14465 as_expr=false
14466fi
14467
ca81d7a0 14468if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
14469 as_basename=basename
14470else
14471 as_basename=false
14472fi
c0d27fcc 14473
8c5ff6dd
KR
14474if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14475 as_dirname=dirname
14476else
14477 as_dirname=false
14478fi
c0d27fcc 14479
ca81d7a0 14480as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
14481$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14482 X"$0" : 'X\(//\)$' \| \
ca81d7a0 14483 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 14484$as_echo X/"$0" |
ca81d7a0
JD
14485 sed '/^.*\/\([^/][^/]*\)\/*$/{
14486 s//\1/
14487 q
14488 }
14489 /^X\/\(\/\/\)$/{
14490 s//\1/
14491 q
14492 }
14493 /^X\/\(\/\).*/{
14494 s//\1/
14495 q
14496 }
14497 s/.*/./; q'`
c0d27fcc 14498
8c5ff6dd
KR
14499# Avoid depending upon Character Ranges.
14500as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14501as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14502as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14503as_cr_digits='0123456789'
14504as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
14505
14506ECHO_C= ECHO_N= ECHO_T=
8c5ff6dd 14507case `echo -n x` in #(((((
ca81d7a0 14508-n*)
8c5ff6dd 14509 case `echo 'xy\c'` in
ca81d7a0 14510 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
8c5ff6dd
KR
14511 xy) ECHO_C='\c';;
14512 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14513 ECHO_T=' ';;
ca81d7a0
JD
14514 esac;;
14515*)
14516 ECHO_N='-n';;
c0d27fcc 14517esac
503d2be0
AS
14518
14519rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
14520if test -d conf$$.dir; then
14521 rm -f conf$$.dir/conf$$.file
14522else
14523 rm -f conf$$.dir
e9a63f04
GM
14524 mkdir conf$$.dir 2>/dev/null
14525fi
14526if (echo >conf$$.file) 2>/dev/null; then
14527 if ln -s conf$$.file conf$$ 2>/dev/null; then
14528 as_ln_s='ln -s'
14529 # ... but there are two gotchas:
14530 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14531 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14532 # In both cases, we have to default to `cp -p'.
14533 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14534 as_ln_s='cp -p'
14535 elif ln conf$$.file conf$$ 2>/dev/null; then
14536 as_ln_s=ln
14537 else
503d2be0 14538 as_ln_s='cp -p'
e9a63f04 14539 fi
503d2be0
AS
14540else
14541 as_ln_s='cp -p'
14542fi
ca81d7a0
JD
14543rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14544rmdir conf$$.dir 2>/dev/null
503d2be0 14545
8c5ff6dd
KR
14546
14547# as_fn_mkdir_p
14548# -------------
14549# Create "$as_dir" as a directory, including parents if necessary.
14550as_fn_mkdir_p ()
14551{
14552
14553 case $as_dir in #(
14554 -*) as_dir=./$as_dir;;
14555 esac
14556 test -d "$as_dir" || eval $as_mkdir_p || {
14557 as_dirs=
14558 while :; do
14559 case $as_dir in #(
14560 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14561 *) as_qdir=$as_dir;;
14562 esac
14563 as_dirs="'$as_qdir' $as_dirs"
14564 as_dir=`$as_dirname -- "$as_dir" ||
14565$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14566 X"$as_dir" : 'X\(//\)[^/]' \| \
14567 X"$as_dir" : 'X\(//\)$' \| \
14568 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14569$as_echo X"$as_dir" |
14570 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14571 s//\1/
14572 q
14573 }
14574 /^X\(\/\/\)[^/].*/{
14575 s//\1/
14576 q
14577 }
14578 /^X\(\/\/\)$/{
14579 s//\1/
14580 q
14581 }
14582 /^X\(\/\).*/{
14583 s//\1/
14584 q
14585 }
14586 s/.*/./; q'`
14587 test -d "$as_dir" && break
14588 done
14589 test -z "$as_dirs" || eval "mkdir $as_dirs"
14590 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14591
14592
14593} # as_fn_mkdir_p
6bae0ccf 14594if mkdir -p . 2>/dev/null; then
8c5ff6dd 14595 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 14596else
edfaf76d 14597 test -d ./-p && rmdir ./-p
6bae0ccf
DL
14598 as_mkdir_p=false
14599fi
14600
f053c89f
CY
14601if test -x / >/dev/null 2>&1; then
14602 as_test_x='test -x'
ca81d7a0 14603else
f053c89f
CY
14604 if ls -dL / >/dev/null 2>&1; then
14605 as_ls_L_option=L
14606 else
14607 as_ls_L_option=
14608 fi
14609 as_test_x='
14610 eval sh -c '\''
14611 if test -d "$1"; then
e9a63f04 14612 test -d "$1/.";
f053c89f 14613 else
8c5ff6dd 14614 case $1 in #(
e9a63f04 14615 -*)set "./$1";;
f053c89f 14616 esac;
8c5ff6dd 14617 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
14618 ???[sx]*):;;*)false;;esac;fi
14619 '\'' sh
14620 '
ca81d7a0 14621fi
f053c89f 14622as_executable_p=$as_test_x
503d2be0 14623
c0d27fcc 14624# Sed expression to map a string onto a valid CPP name.
edfaf76d 14625as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
14626
14627# Sed expression to map a string onto a valid variable name.
edfaf76d 14628as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 14629
503d2be0 14630
503d2be0 14631exec 6>&1
8c5ff6dd
KR
14632## ----------------------------------- ##
14633## Main body of $CONFIG_STATUS script. ##
14634## ----------------------------------- ##
14635_ASEOF
14636test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 14637
8c5ff6dd
KR
14638cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14639# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 14640# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
14641# values after options handling.
14642ac_log="
49a62e8a 14643This file was extended by emacs $as_me 24.0.50, which was
8c5ff6dd 14644generated by GNU Autoconf 2.65. Invocation command line was
c0d27fcc
MR
14645
14646 CONFIG_FILES = $CONFIG_FILES
14647 CONFIG_HEADERS = $CONFIG_HEADERS
14648 CONFIG_LINKS = $CONFIG_LINKS
14649 CONFIG_COMMANDS = $CONFIG_COMMANDS
14650 $ $0 $@
14651
ca81d7a0
JD
14652on `(hostname || uname -n) 2>/dev/null | sed 1q`
14653"
14654
503d2be0
AS
14655_ACEOF
14656
8c5ff6dd
KR
14657case $ac_config_files in *"
14658"*) set x $ac_config_files; shift; ac_config_files=$*;;
14659esac
14660
14661case $ac_config_headers in *"
14662"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14663esac
14664
14665
e9a63f04 14666cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14667# Files that config.status was made for.
ca81d7a0
JD
14668config_files="$ac_config_files"
14669config_headers="$ac_config_headers"
14670config_commands="$ac_config_commands"
503d2be0 14671
ca81d7a0 14672_ACEOF
503d2be0 14673
e9a63f04 14674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 14675ac_cs_usage="\
8c5ff6dd
KR
14676\`$as_me' instantiates files and other configuration actions
14677from templates according to the current configuration. Unless the files
14678and actions are specified as TAGs, all are instantiated by default.
503d2be0 14679
8c5ff6dd 14680Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
14681
14682 -h, --help print this help, then exit
f053c89f 14683 -V, --version print version number and configuration settings, then exit
8c5ff6dd
KR
14684 --config print configuration, then exit
14685 -q, --quiet, --silent
14686 do not print progress messages
503d2be0
AS
14687 -d, --debug don't remove temporary files
14688 --recheck update $as_me by reconfiguring in the same conditions
8c5ff6dd 14689 --file=FILE[:TEMPLATE]
e9a63f04 14690 instantiate the configuration file FILE
8c5ff6dd 14691 --header=FILE[:TEMPLATE]
e9a63f04 14692 instantiate the configuration header FILE
503d2be0
AS
14693
14694Configuration files:
14695$config_files
14696
14697Configuration headers:
14698$config_headers
14699
14700Configuration commands:
14701$config_commands
14702
8c5ff6dd 14703Report bugs to the package provider."
503d2be0 14704
ca81d7a0 14705_ACEOF
e9a63f04 14706cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8c5ff6dd 14707ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 14708ac_cs_version="\\
49a62e8a 14709emacs config.status 24.0.50
8c5ff6dd
KR
14710configured by $0, generated by GNU Autoconf 2.65,
14711 with options \\"\$ac_cs_config\\"
503d2be0 14712
8c5ff6dd 14713Copyright (C) 2009 Free Software Foundation, Inc.
503d2be0
AS
14714This config.status script is free software; the Free Software Foundation
14715gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
14716
14717ac_pwd='$ac_pwd'
14718srcdir='$srcdir'
14719INSTALL='$INSTALL'
e9a63f04 14720test -n "\$AWK" || AWK=awk
c0d27fcc 14721_ACEOF
503d2be0 14722
e9a63f04
GM
14723cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14724# The default lists apply if the user does not specify any file.
503d2be0
AS
14725ac_need_defaults=:
14726while test $# != 0
ba4481b5 14727do
503d2be0
AS
14728 case $1 in
14729 --*=*)
ca81d7a0
JD
14730 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14731 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
14732 ac_shift=:
14733 ;;
ca81d7a0 14734 *)
6bae0ccf
DL
14735 ac_option=$1
14736 ac_optarg=$2
14737 ac_shift=shift
503d2be0 14738 ;;
503d2be0
AS
14739 esac
14740
6bae0ccf 14741 case $ac_option in
503d2be0 14742 # Handling of the options.
19650fd6
AS
14743 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14744 ac_cs_recheck=: ;;
ca81d7a0 14745 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 14746 $as_echo "$ac_cs_version"; exit ;;
8c5ff6dd
KR
14747 --config | --confi | --conf | --con | --co | --c )
14748 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 14749 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
14750 debug=: ;;
14751 --file | --fil | --fi | --f )
6bae0ccf 14752 $ac_shift
e9a63f04
GM
14753 case $ac_optarg in
14754 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14755 esac
8c5ff6dd 14756 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
14757 ac_need_defaults=false;;
14758 --header | --heade | --head | --hea )
6bae0ccf 14759 $ac_shift
e9a63f04
GM
14760 case $ac_optarg in
14761 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14762 esac
8c5ff6dd 14763 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 14764 ac_need_defaults=false;;
ca81d7a0
JD
14765 --he | --h)
14766 # Conflict between --help and --header
8c5ff6dd
KR
14767 as_fn_error "ambiguous option: \`$1'
14768Try \`$0 --help' for more information.";;
ca81d7a0 14769 --help | --hel | -h )
e9a63f04 14770 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
14771 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14772 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14773 ac_cs_silent=: ;;
503d2be0
AS
14774
14775 # This is an error.
8c5ff6dd
KR
14776 -*) as_fn_error "unrecognized option: \`$1'
14777Try \`$0 --help' for more information." ;;
503d2be0 14778
8c5ff6dd 14779 *) as_fn_append ac_config_targets " $1"
ca81d7a0 14780 ac_need_defaults=false ;;
503d2be0 14781
ba4481b5 14782 esac
503d2be0 14783 shift
ba4481b5
DL
14784done
14785
19650fd6
AS
14786ac_configure_extra_args=
14787
14788if $ac_cs_silent; then
14789 exec 6>/dev/null
14790 ac_configure_extra_args="$ac_configure_extra_args --silent"
14791fi
14792
14793_ACEOF
e9a63f04 14794cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 14795if \$ac_cs_recheck; then
e9a63f04
GM
14796 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14797 shift
14798 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14799 CONFIG_SHELL='$SHELL'
ca81d7a0 14800 export CONFIG_SHELL
e9a63f04 14801 exec "\$@"
19650fd6
AS
14802fi
14803
503d2be0 14804_ACEOF
e9a63f04 14805cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14806exec 5>>config.log
14807{
14808 echo
14809 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14810## Running $as_me. ##
14811_ASBOX
e9a63f04 14812 $as_echo "$ac_log"
ca81d7a0 14813} >&5
ba4481b5 14814
ca81d7a0 14815_ACEOF
e9a63f04 14816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14817#
ca81d7a0 14818# INIT-COMMANDS
503d2be0 14819#
8acdcf6f 14820GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 14821
c0d27fcc
MR
14822_ACEOF
14823
e9a63f04 14824cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14825
14826# Handling of arguments.
503d2be0
AS
14827for ac_config_target in $ac_config_targets
14828do
ca81d7a0
JD
14829 case $ac_config_target in
14830 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
14831 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
981f8c13 14832 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
ca81d7a0 14833 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
14834 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
14835 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
14836 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
14837 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 14838 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 14839 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 14840 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
14841 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
14842 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14843
8c5ff6dd 14844 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 14845 esac
ba4481b5 14846done
503d2be0 14847
ca81d7a0 14848
503d2be0
AS
14849# If the user did not use the arguments to specify the items to instantiate,
14850# then the envvar interface is used. Set only those that are not.
14851# We use the long form for the default assignment because of an extremely
14852# bizarre bug on SunOS 4.1.3.
14853if $ac_need_defaults; then
14854 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14855 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14856 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 14857fi
503d2be0 14858
19650fd6 14859# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 14860# simply because there is no reason against having it here, and in addition,
19650fd6 14861# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
14862# Hook for its removal unless debugging.
14863# Note that there is a small window in which the directory will not be cleaned:
14864# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
14865$debug ||
14866{
ca81d7a0
JD
14867 tmp=
14868 trap 'exit_status=$?
14869 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14870' 0
8c5ff6dd 14871 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 14872}
503d2be0 14873# Create a (secure) tmp directory for tmp files.
19650fd6 14874
503d2be0 14875{
ca81d7a0 14876 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
14877 test -n "$tmp" && test -d "$tmp"
14878} ||
14879{
ca81d7a0
JD
14880 tmp=./conf$$-$RANDOM
14881 (umask 077 && mkdir "$tmp")
8c5ff6dd 14882} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 14883
e9a63f04
GM
14884# Set up the scripts for CONFIG_FILES section.
14885# No need to generate them if there are no CONFIG_FILES.
14886# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
14887if test -n "$CONFIG_FILES"; then
14888
7bbec45b 14889
8c5ff6dd
KR
14890ac_cr=`echo X | tr X '\015'`
14891# On cygwin, bash can eat \r inside `` if the user requested igncr.
14892# But we know of no other shell where ac_cr would be empty at this
14893# point, so we can use a bashism as a fallback.
14894if test "x$ac_cr" = x; then
14895 eval ac_cr=\$\'\\r\'
14896fi
e9a63f04
GM
14897ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14898if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
8c5ff6dd 14899 ac_cs_awk_cr='\r'
e9a63f04
GM
14900else
14901 ac_cs_awk_cr=$ac_cr
ca81d7a0 14902fi
503d2be0 14903
e9a63f04 14904echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 14905_ACEOF
503d2be0 14906
ca81d7a0 14907
e9a63f04
GM
14908{
14909 echo "cat >conf$$subs.awk <<_ACEOF" &&
14910 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14911 echo "_ACEOF"
14912} >conf$$subs.sh ||
8c5ff6dd 14913 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 14914ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ca81d7a0
JD
14915ac_delim='%!_!# '
14916for ac_last_try in false false false false false :; do
e9a63f04 14917 . ./conf$$subs.sh ||
8c5ff6dd 14918 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 14919
8c5ff6dd
KR
14920 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14921 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
14922 break
14923 elif $ac_last_try; then
8c5ff6dd 14924 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
14925 else
14926 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 14927 fi
ca81d7a0 14928done
e9a63f04
GM
14929rm -f conf$$subs.sh
14930
14931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14932cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14933_ACEOF
14934sed -n '
14935h
14936s/^/S["/; s/!.*/"]=/
14937p
14938g
14939s/^[^!]*!//
14940:repl
14941t repl
14942s/'"$ac_delim"'$//
14943t delim
14944:nl
14945h
8c5ff6dd 14946s/\(.\{148\}\)..*/\1/
e9a63f04
GM
14947t more1
14948s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14949p
14950n
14951b repl
14952:more1
14953s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14954p
14955g
14956s/.\{148\}//
14957t nl
14958:delim
14959h
8c5ff6dd 14960s/\(.\{148\}\)..*/\1/
e9a63f04
GM
14961t more2
14962s/["\\]/\\&/g; s/^/"/; s/$/"/
14963p
14964b
14965:more2
14966s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14967p
14968g
14969s/.\{148\}//
14970t delim
14971' <conf$$subs.awk | sed '
14972/^[^""]/{
14973 N
14974 s/\n//
14975}
14976' >>$CONFIG_STATUS || ac_write_fail=1
14977rm -f conf$$subs.awk
14978cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14979_ACAWK
14980cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14981 for (key in S) S_is_set[key] = 1
14982 FS = "\a"
1e0093ea 14983
e9a63f04
GM
14984}
14985{
14986 line = $ 0
14987 nfields = split(line, field, "@")
14988 substed = 0
14989 len = length(field[1])
14990 for (i = 2; i < nfields; i++) {
14991 key = field[i]
14992 keylen = length(key)
14993 if (S_is_set[key]) {
14994 value = S[key]
14995 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14996 len += length(value) + length(field[++i])
14997 substed = 1
14998 } else
14999 len += 1 + keylen
15000 }
ba4481b5 15001
e9a63f04
GM
15002 print line
15003}
15004
15005_ACAWK
ca81d7a0 15006_ACEOF
e9a63f04
GM
15007cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15008if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15009 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15010else
15011 cat
15012fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
8c5ff6dd 15013 || as_fn_error "could not setup config files machinery" "$LINENO" 5
c0d27fcc 15014_ACEOF
ca81d7a0 15015
ca81d7a0
JD
15016# VPATH may cause trouble with some makes, so we remove $(srcdir),
15017# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15018# trailing colons and then remove the whole line if VPATH becomes empty
15019# (actually we leave an empty line to preserve line numbers).
15020if test "x$srcdir" = x.; then
15021 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15022s/:*\$(srcdir):*/:/
15023s/:*\${srcdir}:*/:/
15024s/:*@srcdir@:*/:/
15025s/^\([^=]*=[ ]*\):*/\1/
15026s/:*$//
15027s/^[^=]*=[ ]*$//
15028}'
15029fi
15030
e9a63f04 15031cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15032fi # test -n "$CONFIG_FILES"
15033
e9a63f04
GM
15034# Set up the scripts for CONFIG_HEADERS section.
15035# No need to generate them if there are no CONFIG_HEADERS.
15036# This happens for instance with `./config.status Makefile'.
15037if test -n "$CONFIG_HEADERS"; then
15038cat >"$tmp/defines.awk" <<\_ACAWK ||
15039BEGIN {
15040_ACEOF
dc2933eb 15041
e9a63f04
GM
15042# Transform confdefs.h into an awk script `defines.awk', embedded as
15043# here-document in config.status, that substitutes the proper values into
15044# config.h.in to produce config.h.
15045
15046# Create a delimiter string that does not exist in confdefs.h, to ease
15047# handling of long lines.
15048ac_delim='%!_!# '
15049for ac_last_try in false false :; do
15050 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15051 if test -z "$ac_t"; then
15052 break
15053 elif $ac_last_try; then
8c5ff6dd 15054 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
15055 else
15056 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15057 fi
15058done
15059
15060# For the awk script, D is an array of macro values keyed by name,
15061# likewise P contains macro parameters if any. Preserve backslash
15062# newline sequences.
15063
15064ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15065sed -n '
15066s/.\{148\}/&'"$ac_delim"'/g
15067t rset
15068:rset
15069s/^[ ]*#[ ]*define[ ][ ]*/ /
15070t def
15071d
15072:def
15073s/\\$//
15074t bsnl
15075s/["\\]/\\&/g
15076s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15077D["\1"]=" \3"/p
15078s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15079d
15080:bsnl
15081s/["\\]/\\&/g
15082s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15083D["\1"]=" \3\\\\\\n"\\/p
15084t cont
15085s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15086t cont
15087d
15088:cont
15089n
15090s/.\{148\}/&'"$ac_delim"'/g
15091t clear
15092:clear
15093s/\\$//
15094t bsnlc
15095s/["\\]/\\&/g; s/^/"/; s/$/"/p
15096d
15097:bsnlc
15098s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15099b cont
15100' <confdefs.h | sed '
15101s/'"$ac_delim"'/"\\\
15102"/g' >>$CONFIG_STATUS || ac_write_fail=1
15103
15104cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15105 for (key in D) D_is_set[key] = 1
15106 FS = "\a"
15107}
15108/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15109 line = \$ 0
15110 split(line, arg, " ")
15111 if (arg[1] == "#") {
15112 defundef = arg[2]
15113 mac1 = arg[3]
15114 } else {
15115 defundef = substr(arg[1], 2)
15116 mac1 = arg[2]
15117 }
15118 split(mac1, mac2, "(") #)
15119 macro = mac2[1]
8c5ff6dd 15120 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
15121 if (D_is_set[macro]) {
15122 # Preserve the white space surrounding the "#".
e9a63f04
GM
15123 print prefix "define", macro P[macro] D[macro]
15124 next
15125 } else {
15126 # Replace #undef with comments. This is necessary, for example,
15127 # in the case of _POSIX_SOURCE, which is predefined and required
15128 # on some systems where configure will not decide to define it.
15129 if (defundef == "undef") {
8c5ff6dd 15130 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
15131 next
15132 }
15133 }
15134}
15135{ print }
15136_ACAWK
15137_ACEOF
15138cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8c5ff6dd 15139 as_fn_error "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
15140fi # test -n "$CONFIG_HEADERS"
15141
15142
15143eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15144shift
15145for ac_tag
ca81d7a0
JD
15146do
15147 case $ac_tag in
15148 :[FHLC]) ac_mode=$ac_tag; continue;;
15149 esac
15150 case $ac_mode$ac_tag in
15151 :[FHL]*:*);;
8c5ff6dd 15152 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
15153 :[FH]-) ac_tag=-:-;;
15154 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15155 esac
15156 ac_save_IFS=$IFS
15157 IFS=:
15158 set x $ac_tag
15159 IFS=$ac_save_IFS
15160 shift
15161 ac_file=$1
15162 shift
15163
15164 case $ac_mode in
15165 :L) ac_source=$1;;
15166 :[FH])
15167 ac_file_inputs=
15168 for ac_f
15169 do
15170 case $ac_f in
15171 -) ac_f="$tmp/stdin";;
15172 *) # Look for the file first in the build tree, then in the source tree
15173 # (if the path is not absolute). The absolute path cannot be DOS-style,
15174 # because $ac_f cannot contain `:'.
15175 test -f "$ac_f" ||
15176 case $ac_f in
15177 [\\/$]*) false;;
15178 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15179 esac ||
8c5ff6dd 15180 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 15181 esac
e9a63f04 15182 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
8c5ff6dd 15183 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
15184 done
15185
15186 # Let's still pretend it is `configure' which instantiates (i.e., don't
15187 # use $as_me), people would be surprised to read:
15188 # /* config.h. Generated by config.status. */
e9a63f04
GM
15189 configure_input='Generated from '`
15190 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15191 `' by configure.'
ca81d7a0
JD
15192 if test x"$ac_file" != x-; then
15193 configure_input="$ac_file. $configure_input"
8c5ff6dd 15194 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 15195$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 15196 fi
e9a63f04
GM
15197 # Neutralize special characters interpreted by sed in replacement strings.
15198 case $configure_input in #(
15199 *\&* | *\|* | *\\* )
15200 ac_sed_conf_input=`$as_echo "$configure_input" |
15201 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15202 *) ac_sed_conf_input=$configure_input;;
15203 esac
ca81d7a0
JD
15204
15205 case $ac_tag in
e9a63f04 15206 *:-:* | *:-) cat >"$tmp/stdin" \
8c5ff6dd 15207 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
15208 esac
15209 ;;
ba4481b5
DL
15210 esac
15211
ca81d7a0 15212 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 15213$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
15214 X"$ac_file" : 'X\(//\)[^/]' \| \
15215 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 15216 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 15217$as_echo X"$ac_file" |
ca81d7a0
JD
15218 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15219 s//\1/
15220 q
15221 }
15222 /^X\(\/\/\)[^/].*/{
15223 s//\1/
15224 q
15225 }
15226 /^X\(\/\/\)$/{
15227 s//\1/
15228 q
15229 }
15230 /^X\(\/\).*/{
15231 s//\1/
15232 q
15233 }
15234 s/.*/./; q'`
8c5ff6dd 15235 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 15236 ac_builddir=.
98418dba 15237
ca81d7a0
JD
15238case "$ac_dir" in
15239.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15240*)
e9a63f04 15241 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 15242 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 15243 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
15244 case $ac_top_builddir_sub in
15245 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15246 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15247 esac ;;
15248esac
15249ac_abs_top_builddir=$ac_pwd
15250ac_abs_builddir=$ac_pwd$ac_dir_suffix
15251# for backward compatibility:
15252ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
15253
15254case $srcdir in
ca81d7a0 15255 .) # We are building in place.
c0d27fcc 15256 ac_srcdir=.
ca81d7a0
JD
15257 ac_top_srcdir=$ac_top_builddir_sub
15258 ac_abs_top_srcdir=$ac_pwd ;;
15259 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 15260 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
15261 ac_top_srcdir=$srcdir
15262 ac_abs_top_srcdir=$srcdir ;;
15263 *) # Relative name.
15264 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15265 ac_top_srcdir=$ac_top_build_prefix$srcdir
15266 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 15267esac
ca81d7a0 15268ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 15269
c0d27fcc 15270
ca81d7a0
JD
15271 case $ac_mode in
15272 :F)
15273 #
15274 # CONFIG_FILE
15275 #
ba4481b5 15276
503d2be0
AS
15277 case $INSTALL in
15278 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 15279 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 15280 esac
ca81d7a0 15281_ACEOF
ba4481b5 15282
e9a63f04 15283cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15284# If the template does not know about datarootdir, expand it.
15285# FIXME: This hack should be removed a few years after 2.60.
15286ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
15287ac_sed_dataroot='
15288/datarootdir/ {
ca81d7a0
JD
15289 p
15290 q
15291}
15292/@datadir@/p
15293/@docdir@/p
15294/@infodir@/p
15295/@localedir@/p
8c5ff6dd 15296/@mandir@/p'
e9a63f04 15297case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
15298*datarootdir*) ac_datarootdir_seen=yes;;
15299*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
8c5ff6dd 15300 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 15301$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 15302_ACEOF
e9a63f04 15303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
15304 ac_datarootdir_hack='
15305 s&@datadir@&$datadir&g
15306 s&@docdir@&$docdir&g
15307 s&@infodir@&$infodir&g
15308 s&@localedir@&$localedir&g
15309 s&@mandir@&$mandir&g
8c5ff6dd 15310 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 15311esac
c0d27fcc 15312_ACEOF
ca81d7a0
JD
15313
15314# Neutralize VPATH when `$srcdir' = `.'.
15315# Shell code in configure.ac might set extrasub.
15316# FIXME: do we really want to maintain this feature?
e9a63f04
GM
15317cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15318ac_sed_extra="$ac_vpsub
503d2be0 15319$extrasub
c0d27fcc 15320_ACEOF
e9a63f04 15321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
15322:t
15323/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 15324s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 15325s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 15326s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
15327s&@srcdir@&$ac_srcdir&;t t
15328s&@abs_srcdir@&$ac_abs_srcdir&;t t
15329s&@top_srcdir@&$ac_top_srcdir&;t t
15330s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15331s&@builddir@&$ac_builddir&;t t
15332s&@abs_builddir@&$ac_abs_builddir&;t t
15333s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15334s&@INSTALL@&$ac_INSTALL&;t t
15335$ac_datarootdir_hack
e9a63f04
GM
15336"
15337eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
8c5ff6dd 15338 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15339
15340test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15341 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15342 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
8c5ff6dd 15343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0 15344which seems to be undefined. Please make sure it is defined." >&5
e9a63f04 15345$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0
JD
15346which seems to be undefined. Please make sure it is defined." >&2;}
15347
15348 rm -f "$tmp/stdin"
503d2be0 15349 case $ac_file in
e9a63f04
GM
15350 -) cat "$tmp/out" && rm -f "$tmp/out";;
15351 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15352 esac \
8c5ff6dd 15353 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15354 ;;
15355 :H)
15356 #
15357 # CONFIG_HEADER
15358 #
503d2be0 15359 if test x"$ac_file" != x-; then
e9a63f04
GM
15360 {
15361 $as_echo "/* $configure_input */" \
15362 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15363 } >"$tmp/config.h" \
8c5ff6dd 15364 || as_fn_error "could not create $ac_file" "$LINENO" 5
e9a63f04 15365 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
8c5ff6dd 15366 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 15367$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 15368 else
e9a63f04
GM
15369 rm -f "$ac_file"
15370 mv "$tmp/config.h" "$ac_file" \
8c5ff6dd 15371 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba4481b5 15372 fi
503d2be0 15373 else
e9a63f04
GM
15374 $as_echo "/* $configure_input */" \
15375 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
8c5ff6dd 15376 || as_fn_error "could not create -" "$LINENO" 5
ba4481b5 15377 fi
ca81d7a0 15378 ;;
edfaf76d 15379
8c5ff6dd 15380 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 15381$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
15382 ;;
15383 esac
ba4481b5 15384
c0d27fcc 15385
ca81d7a0
JD
15386 case $ac_file$ac_mode in
15387 "default":C)
ba4481b5
DL
15388
15389### Make the necessary directories, if they don't exist.
15390for dir in etc lisp ; do
15391 test -d ${dir} || mkdir ${dir}
15392done
15393
15394# Build src/Makefile from ${srcdir}/src/Makefile.c
15395# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
15396# This must be done after src/config.h is built, since we rely on that file.
15397
ba4481b5 15398echo creating src/epaths.h
4aa6b955 15399${MAKE-make} epaths-force
ba4481b5 15400
1c203d4c
DL
15401# As of 2000-11-19, newest development versions of GNU cpp preprocess
15402# `..' to `. .' unless invoked with -traditional
15403
d0e9bfd2 15404if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
15405 CPPFLAGS="$CPPFLAGS -traditional"
15406fi
15407
ba4481b5
DL
15408echo creating src/Makefile
15409( cd src
15410 rm -f junk.c junk1.c junk2.c
15411 sed -e '/start of cpp stuff/q' \
15412 < Makefile.c > junk1.c
15413 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 15414 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 15415 < Makefile.c > junk.c
91231421 15416 $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
15417 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
15418 cat junk1.c junk2.c > Makefile.new
15419 rm -f junk.c junk1.c junk2.c
15420 chmod 444 Makefile.new
15421 mv -f Makefile.new Makefile
15422)
15423
bf3126f6 15424if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 15425 echo creating src/.gdbinit
503d2be0 15426 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
15427fi
15428
503d2be0 15429 ;;
ca81d7a0 15430
503d2be0 15431 esac
ca81d7a0 15432done # for ac_tag
503d2be0 15433
ba4481b5 15434
8c5ff6dd 15435as_fn_exit 0
c0d27fcc 15436_ACEOF
503d2be0
AS
15437ac_clean_files=$ac_clean_files_save
15438
e9a63f04 15439test $ac_write_fail = 0 ||
8c5ff6dd 15440 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15441
c0d27fcc 15442
503d2be0
AS
15443# configure is writing to config.log, and then calls config.status.
15444# config.status does its own redirection, appending to config.log.
15445# Unfortunately, on DOS this fails, as config.log is still kept open
15446# by configure, so config.status won't be able to write to it; its
15447# output is simply discarded. So we exec the FD to /dev/null,
15448# effectively closing config.log, so it can be properly (re)opened and
15449# appended to by config.status. When coming back to configure, we
15450# need to make the FD available again.
15451if test "$no_create" != yes; then
15452 ac_cs_success=:
19650fd6
AS
15453 ac_config_status_args=
15454 test "$silent" = yes &&
15455 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 15456 exec 5>/dev/null
19650fd6 15457 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
15458 exec 5>>config.log
15459 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15460 # would make configure fail if this is the last instruction.
8c5ff6dd 15461 $ac_cs_success || as_fn_exit $?
503d2be0 15462fi
e9a63f04 15463if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
8c5ff6dd
KR
15464 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15465$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 15466fi
f5f47add 15467
c0d27fcc 15468