sieve-manage: use auth-source.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
036dc38d 3# Generated by GNU Autoconf 2.65 for emacs 24.0.50.
eb697db5 4#
ba4481b5 5#
ca81d7a0 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
036dc38d
LMI
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
eb697db5
DN
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.
eb697db5
DN
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
503d2be0 16
f053c89f
CY
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 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
eb697db5
DN
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
eb697db5
DN
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;
eb697db5 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.
eb697db5 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=.
eb697db5
DN
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
eb697db5 112 exit 1
ca81d7a0
JD
113fi
114
eb697db5
DN
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
eb697db5
DN
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"
036dc38d 319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
eb697db5
DN
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
036dc38d
LMI
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
eb697db5
DN
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
036dc38d 363# script with status $?, using 1 if that was 0.
eb697db5
DN
364as_fn_error ()
365{
036dc38d
LMI
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
eb697db5 370 fi
036dc38d 371 $as_echo "$as_me: error: $1" >&2
eb697db5
DN
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
eb697db5
DN
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
eb697db5
DN
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
eb697db5
DN
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
eb697db5
DN
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
eb697db5
DN
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
91e84f96 464
eb697db5
DN
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
ca81d7a0 471fi
eb697db5
DN
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
6da23aaa 486else
eb697db5 487 as_ln_s='cp -p'
bf89cb4d 488fi
eb697db5
DN
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
ca81d7a0 491
eb697db5
DN
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
91e84f96
GM
497fi
498
eb697db5
DN
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
bf89cb4d 501else
eb697db5
DN
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 '
bf89cb4d 519fi
eb697db5 520as_executable_p=$as_test_x
ca81d7a0 521
eb697db5
DN
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'"
ca81d7a0 524
eb697db5
DN
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 527
bf89cb4d 528
eb697db5
DN
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
bf89cb4d
GM
531
532# Name of the host.
036dc38d 533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
bf89cb4d
GM
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=''
eb697db5 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
431dab04 595ac_header_list=
c24fa7dc 596ac_func_list=
3de25479 597ac_subst_vars='LTLIBOBJS
5929fbe7 598WINDOW_SUPPORT
eb697db5
DN
599TOOLTIP_SUPPORT
600MOUSE_SUPPORT
057886a3 601LIB_GCC
f5ea3ba7 602LD_FIRSTFLAG
ce07fa9a
JV
603LD_SWITCH_SYSTEM_TEMACS
604POST_ALLOC_OBJ
605PRE_ALLOC_OBJ
606CYGWIN_OBJ
eb697db5
DN
607RALLOC_OBJ
608OLDXMENU_DEPS
ce07fa9a
JV
609LIBX_OTHER
610LIBXMENU
611OLDXMENU
eb697db5 612OLDXMENU_TARGET
ce07fa9a
JV
613LIBXT_OTHER
614TOOLKIT_LIBW
615WIDGET_OBJ
616XOBJ
617XMENU_OBJ
eb697db5 618FONT_OBJ
91e84f96 619OTHER_FILES
3de25479 620GNU_OBJC_CFLAGS
3de25479
JV
621ns_appsrc
622ns_appresdir
623ns_appbindir
624ns_appdir
625opsysfile
626machfile
627X_TOOLKIT_TYPE
ce07fa9a 628C_SWITCH_X_SYSTEM
3de25479 629C_SWITCH_X_SITE
3de25479 630LD_SWITCH_X_SITE
3de25479
JV
631gameuser
632gamedir
633bitmapdir
634archlibdir
635etcdir
636x_default_search_path
637lisppath
638locallisppath
639lispdir
640srcdir
641canonical
642configuration
643version
644KRB4LIB
645DESLIB
646KRB5LIB
647CRYPTOLIB
648COM_ERRLIB
649LIBRESOLV
650LIBHESIOD
ce07fa9a
JV
651TERMCAP_OBJ
652LIBS_TERMCAP
3de25479
JV
653GETOPTOBJS
654GETOPT_H
655GETLOADAVG_LIBS
656KMEM_GROUP
657NEED_SETGID
658LIBOBJS
ce07fa9a 659BLESSMAIL_TARGET
3de25479
JV
660LIBS_MAIL
661liblockfile
662ALLOCA
381408e2
LMI
663LIBXML2_LIBS
664LIBXML2_CFLAGS
ce07fa9a 665LIBXSM
3de25479
JV
666LIBGPM
667LIBGIF
668LIBTIFF
669LIBPNG
670LIBJPEG
671LIBXPM
672FREETYPE_LIBS
673FREETYPE_CFLAGS
674M17N_FLT_LIBS
675M17N_FLT_CFLAGS
676LIBOTF_LIBS
677LIBOTF_CFLAGS
678XFT_LIBS
679XFT_CFLAGS
680FONTCONFIG_LIBS
681FONTCONFIG_CFLAGS
ce07fa9a
JV
682LIBXMU
683LIBXTR6
036dc38d
LMI
684LIBGNUTLS_LIBS
685LIBGNUTLS_CFLAGS
ce07fa9a 686LIBSELINUX_LIBS
3de25479
JV
687GCONF_LIBS
688GCONF_CFLAGS
ce07fa9a 689DBUS_OBJ
3de25479
JV
690DBUS_LIBS
691DBUS_CFLAGS
ce07fa9a 692GTK_OBJ
3de25479
JV
693GTK_LIBS
694GTK_CFLAGS
695IMAGEMAGICK_LIBS
696IMAGEMAGICK_CFLAGS
697RSVG_LIBS
698RSVG_CFLAGS
eb697db5
DN
699VMLIMIT_OBJ
700GMALLOC_OBJ
3de25479 701HAVE_XSERVER
ce07fa9a
JV
702LIB_STANDARD
703NS_SUPPORT
704NS_OBJ
eb697db5 705TEMACS_LDFLAGS2
ce07fa9a
JV
706LD_SWITCH_X_SITE_AUX_RPATH
707LD_SWITCH_X_SITE_AUX
3de25479 708XMKMF
eb697db5
DN
709DEPFLAGS
710MKDEPDIR
3de25479
JV
711SET_MAKE
712CFLAGS_SOUND
713ALSA_LIBS
714ALSA_CFLAGS
715PKG_CONFIG
716LIBSOUND
ce07fa9a
JV
717START_FILES
718LIB_MATH
719CRT_DIR
720LIBS_SYSTEM
721C_SWITCH_SYSTEM
eb697db5 722UNEXEC_OBJ
ce07fa9a
JV
723C_SWITCH_MACHINE
724LD_SWITCH_SYSTEM
e7586c7a 725CANNOT_DUMP
3de25479
JV
726MAKEINFO
727GZIP_PROG
728INSTALL_INFO
729RANLIB
730INSTALL_DATA
731INSTALL_SCRIPT
732INSTALL_PROGRAM
e6cfa7c3 733C_WARNINGS_SWITCH
3de25479
JV
734EGREP
735GREP
736CPP
737OBJEXT
738EXEEXT
739ac_ct_CC
740CPPFLAGS
741LDFLAGS
742CFLAGS
743CC
744host_os
745host_vendor
746host_cpu
747host
748build_os
749build_vendor
750build_cpu
751build
e6cfa7c3
AS
752PROFILING_LDFLAGS
753PROFILING_CFLAGS
3de25479 754MAINT
c05c21ed 755GZIP_INFO
3de25479
JV
756target_alias
757host_alias
758build_alias
759LIBS
760ECHO_T
761ECHO_N
762ECHO_C
763DEFS
764mandir
765localedir
766libdir
767psdir
768pdfdir
769dvidir
770htmldir
771infodir
772docdir
773oldincludedir
774includedir
775localstatedir
776sharedstatedir
777sysconfdir
778datadir
779datarootdir
780libexecdir
781sbindir
782bindir
783program_transform_name
784prefix
785exec_prefix
eb697db5 786PACKAGE_URL
3de25479
JV
787PACKAGE_BUGREPORT
788PACKAGE_STRING
789PACKAGE_VERSION
790PACKAGE_TARNAME
791PACKAGE_NAME
792PATH_SEPARATOR
793SHELL'
eb697db5
DN
794ac_subst_files='deps_frag
795ns_frag'
e9a63f04
GM
796ac_user_opts='
797enable_option_checking
798with_pop
799with_kerberos
800with_kerberos5
801with_hesiod
91e84f96
GM
802with_mmdf
803with_mail_unlink
804with_mailhost
e9a63f04
GM
805with_sound
806with_sync_input
807with_x_toolkit
808with_xpm
809with_jpeg
810with_tiff
811with_gif
812with_png
813with_rsvg
381408e2 814with_xml2
3de25479 815with_imagemagick
e9a63f04
GM
816with_xft
817with_libotf
818with_m17n_flt
819with_toolkit_scroll_bars
820with_xaw3d
821with_xim
822with_ns
823with_gpm
824with_dbus
637fa988 825with_gconf
a4f64981 826with_selinux
036dc38d 827with_gnutls
e9a63f04 828with_makeinfo
c05c21ed 829with_compress_info
e9a63f04 830with_pkg_config_prog
a4f64981 831with_crt_dir
e9a63f04
GM
832with_gnustep_conf
833enable_ns_self_contained
834enable_asserts
835enable_maintainer_mode
836enable_locallisppath
837enable_checking
d9170db5 838enable_use_lisp_union_type
e9a63f04 839enable_profiling
a53cfbe5 840enable_autodepend
e9a63f04
GM
841enable_largefile
842with_x
843'
ca81d7a0
JD
844 ac_precious_vars='build_alias
845host_alias
846target_alias
847CC
848CFLAGS
849LDFLAGS
f053c89f 850LIBS
ca81d7a0
JD
851CPPFLAGS
852CPP
853XMKMF'
854
c0d27fcc 855
ba4481b5 856# Initialize some variables set by options.
503d2be0
AS
857ac_init_help=
858ac_init_version=false
e9a63f04
GM
859ac_unrecognized_opts=
860ac_unrecognized_sep=
ba4481b5
DL
861# The variables have the same names as the options, with
862# dashes changed to underlines.
503d2be0 863cache_file=/dev/null
ba4481b5 864exec_prefix=NONE
ba4481b5 865no_create=
ba4481b5
DL
866no_recursion=
867prefix=NONE
868program_prefix=NONE
869program_suffix=NONE
870program_transform_name=s,x,x,
871silent=
872site=
873srcdir=
ba4481b5
DL
874verbose=
875x_includes=NONE
876x_libraries=NONE
503d2be0
AS
877
878# Installation directory options.
879# These are left unexpanded so users can "make install exec_prefix=/foo"
880# and all the variables that are supposed to be based on exec_prefix
881# by default will actually change.
882# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 883# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
884bindir='${exec_prefix}/bin'
885sbindir='${exec_prefix}/sbin'
886libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
887datarootdir='${prefix}/share'
888datadir='${datarootdir}'
ba4481b5
DL
889sysconfdir='${prefix}/etc'
890sharedstatedir='${prefix}/com'
891localstatedir='${prefix}/var'
ba4481b5
DL
892includedir='${prefix}/include'
893oldincludedir='/usr/include'
9cf8f393 894docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
895infodir='${datarootdir}/info'
896htmldir='${docdir}'
897dvidir='${docdir}'
898pdfdir='${docdir}'
899psdir='${docdir}'
900libdir='${exec_prefix}/lib'
901localedir='${datarootdir}/locale'
902mandir='${datarootdir}/man'
ba4481b5 903
ba4481b5 904ac_prev=
ca81d7a0 905ac_dashdash=
ba4481b5
DL
906for ac_option
907do
ba4481b5
DL
908 # If the previous option needs an argument, assign it.
909 if test -n "$ac_prev"; then
ca81d7a0 910 eval $ac_prev=\$ac_option
ba4481b5
DL
911 ac_prev=
912 continue
913 fi
914
ca81d7a0 915 case $ac_option in
375a0f65
EZ
916 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
917 *) ac_optarg=yes ;;
ca81d7a0 918 esac
ba4481b5
DL
919
920 # Accept the important Cygnus configure options, so we can diagnose typos.
921
ca81d7a0
JD
922 case $ac_dashdash$ac_option in
923 --)
924 ac_dashdash=yes ;;
ba4481b5
DL
925
926 -bindir | --bindir | --bindi | --bind | --bin | --bi)
927 ac_prev=bindir ;;
928 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 929 bindir=$ac_optarg ;;
ba4481b5
DL
930
931 -build | --build | --buil | --bui | --bu)
503d2be0 932 ac_prev=build_alias ;;
ba4481b5 933 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 934 build_alias=$ac_optarg ;;
ba4481b5
DL
935
936 -cache-file | --cache-file | --cache-fil | --cache-fi \
937 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
938 ac_prev=cache_file ;;
939 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
940 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
941 cache_file=$ac_optarg ;;
942
943 --config-cache | -C)
944 cache_file=config.cache ;;
ba4481b5 945
ca81d7a0 946 -datadir | --datadir | --datadi | --datad)
ba4481b5 947 ac_prev=datadir ;;
ca81d7a0 948 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 949 datadir=$ac_optarg ;;
ba4481b5 950
ca81d7a0
JD
951 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
952 | --dataroo | --dataro | --datar)
953 ac_prev=datarootdir ;;
954 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
955 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
956 datarootdir=$ac_optarg ;;
957
ba4481b5 958 -disable-* | --disable-*)
e9a63f04 959 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 960 # Reject names that are not valid shell variable names.
e9a63f04 961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
036dc38d 962 as_fn_error "invalid feature name: $ac_useropt"
e9a63f04
GM
963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=no ;;
ca81d7a0
JD
973
974 -docdir | --docdir | --docdi | --doc | --do)
975 ac_prev=docdir ;;
976 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
977 docdir=$ac_optarg ;;
978
979 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
980 ac_prev=dvidir ;;
981 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
982 dvidir=$ac_optarg ;;
ba4481b5
DL
983
984 -enable-* | --enable-*)
e9a63f04 985 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 986 # Reject names that are not valid shell variable names.
e9a63f04 987 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
036dc38d 988 as_fn_error "invalid feature name: $ac_useropt"
e9a63f04
GM
989 ac_useropt_orig=$ac_useropt
990 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991 case $ac_user_opts in
992 *"
993"enable_$ac_useropt"
994"*) ;;
995 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
996 ac_unrecognized_sep=', ';;
997 esac
998 eval enable_$ac_useropt=\$ac_optarg ;;
ba4481b5
DL
999
1000 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1001 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1002 | --exec | --exe | --ex)
1003 ac_prev=exec_prefix ;;
1004 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1005 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1006 | --exec=* | --exe=* | --ex=*)
503d2be0 1007 exec_prefix=$ac_optarg ;;
ba4481b5
DL
1008
1009 -gas | --gas | --ga | --g)
1010 # Obsolete; use --with-gas.
1011 with_gas=yes ;;
1012
503d2be0
AS
1013 -help | --help | --hel | --he | -h)
1014 ac_init_help=long ;;
1015 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1016 ac_init_help=recursive ;;
1017 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1018 ac_init_help=short ;;
ba4481b5
DL
1019
1020 -host | --host | --hos | --ho)
503d2be0 1021 ac_prev=host_alias ;;
ba4481b5 1022 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 1023 host_alias=$ac_optarg ;;
ba4481b5 1024
ca81d7a0
JD
1025 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1026 ac_prev=htmldir ;;
1027 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1028 | --ht=*)
1029 htmldir=$ac_optarg ;;
1030
ba4481b5
DL
1031 -includedir | --includedir | --includedi | --included | --include \
1032 | --includ | --inclu | --incl | --inc)
1033 ac_prev=includedir ;;
1034 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1035 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 1036 includedir=$ac_optarg ;;
ba4481b5
DL
1037
1038 -infodir | --infodir | --infodi | --infod | --info | --inf)
1039 ac_prev=infodir ;;
1040 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 1041 infodir=$ac_optarg ;;
ba4481b5
DL
1042
1043 -libdir | --libdir | --libdi | --libd)
1044 ac_prev=libdir ;;
1045 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 1046 libdir=$ac_optarg ;;
ba4481b5
DL
1047
1048 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1049 | --libexe | --libex | --libe)
1050 ac_prev=libexecdir ;;
1051 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1052 | --libexe=* | --libex=* | --libe=*)
503d2be0 1053 libexecdir=$ac_optarg ;;
ba4481b5 1054
ca81d7a0
JD
1055 -localedir | --localedir | --localedi | --localed | --locale)
1056 ac_prev=localedir ;;
1057 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1058 localedir=$ac_optarg ;;
1059
ba4481b5 1060 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 1061 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
1062 ac_prev=localstatedir ;;
1063 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 1064 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 1065 localstatedir=$ac_optarg ;;
ba4481b5
DL
1066
1067 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1068 ac_prev=mandir ;;
1069 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 1070 mandir=$ac_optarg ;;
ba4481b5
DL
1071
1072 -nfp | --nfp | --nf)
1073 # Obsolete; use --without-fp.
1074 with_fp=no ;;
1075
1076 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 1077 | --no-cr | --no-c | -n)
ba4481b5
DL
1078 no_create=yes ;;
1079
1080 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1081 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1082 no_recursion=yes ;;
1083
1084 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1085 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1086 | --oldin | --oldi | --old | --ol | --o)
1087 ac_prev=oldincludedir ;;
1088 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1089 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1090 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 1091 oldincludedir=$ac_optarg ;;
ba4481b5
DL
1092
1093 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1094 ac_prev=prefix ;;
1095 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 1096 prefix=$ac_optarg ;;
ba4481b5
DL
1097
1098 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1099 | --program-pre | --program-pr | --program-p)
1100 ac_prev=program_prefix ;;
1101 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1102 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 1103 program_prefix=$ac_optarg ;;
ba4481b5
DL
1104
1105 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1106 | --program-suf | --program-su | --program-s)
1107 ac_prev=program_suffix ;;
1108 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1109 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 1110 program_suffix=$ac_optarg ;;
ba4481b5
DL
1111
1112 -program-transform-name | --program-transform-name \
1113 | --program-transform-nam | --program-transform-na \
1114 | --program-transform-n | --program-transform- \
1115 | --program-transform | --program-transfor \
1116 | --program-transfo | --program-transf \
1117 | --program-trans | --program-tran \
1118 | --progr-tra | --program-tr | --program-t)
1119 ac_prev=program_transform_name ;;
1120 -program-transform-name=* | --program-transform-name=* \
1121 | --program-transform-nam=* | --program-transform-na=* \
1122 | --program-transform-n=* | --program-transform-=* \
1123 | --program-transform=* | --program-transfor=* \
1124 | --program-transfo=* | --program-transf=* \
1125 | --program-trans=* | --program-tran=* \
1126 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1127 program_transform_name=$ac_optarg ;;
ba4481b5 1128
ca81d7a0
JD
1129 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1130 ac_prev=pdfdir ;;
1131 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1132 pdfdir=$ac_optarg ;;
1133
1134 -psdir | --psdir | --psdi | --psd | --ps)
1135 ac_prev=psdir ;;
1136 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1137 psdir=$ac_optarg ;;
1138
ba4481b5
DL
1139 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1140 | -silent | --silent | --silen | --sile | --sil)
1141 silent=yes ;;
1142
1143 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1144 ac_prev=sbindir ;;
1145 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1146 | --sbi=* | --sb=*)
503d2be0 1147 sbindir=$ac_optarg ;;
ba4481b5
DL
1148
1149 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1150 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1151 | --sharedst | --shareds | --shared | --share | --shar \
1152 | --sha | --sh)
1153 ac_prev=sharedstatedir ;;
1154 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1155 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1156 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1157 | --sha=* | --sh=*)
503d2be0 1158 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1159
1160 -site | --site | --sit)
1161 ac_prev=site ;;
1162 -site=* | --site=* | --sit=*)
503d2be0 1163 site=$ac_optarg ;;
ba4481b5
DL
1164
1165 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1166 ac_prev=srcdir ;;
1167 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1168 srcdir=$ac_optarg ;;
ba4481b5
DL
1169
1170 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1171 | --syscon | --sysco | --sysc | --sys | --sy)
1172 ac_prev=sysconfdir ;;
1173 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1174 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1175 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1176
1177 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1178 ac_prev=target_alias ;;
ba4481b5 1179 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1180 target_alias=$ac_optarg ;;
ba4481b5
DL
1181
1182 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1183 verbose=yes ;;
1184
503d2be0
AS
1185 -version | --version | --versio | --versi | --vers | -V)
1186 ac_init_version=: ;;
ba4481b5
DL
1187
1188 -with-* | --with-*)
e9a63f04 1189 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1190 # Reject names that are not valid shell variable names.
e9a63f04 1191 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
036dc38d 1192 as_fn_error "invalid package name: $ac_useropt"
e9a63f04
GM
1193 ac_useropt_orig=$ac_useropt
1194 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195 case $ac_user_opts in
1196 *"
1197"with_$ac_useropt"
1198"*) ;;
1199 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1200 ac_unrecognized_sep=', ';;
1201 esac
1202 eval with_$ac_useropt=\$ac_optarg ;;
ba4481b5
DL
1203
1204 -without-* | --without-*)
e9a63f04 1205 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1206 # Reject names that are not valid shell variable names.
e9a63f04 1207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
036dc38d 1208 as_fn_error "invalid package name: $ac_useropt"
e9a63f04
GM
1209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=no ;;
ba4481b5
DL
1219
1220 --x)
1221 # Obsolete; use --with-x.
1222 with_x=yes ;;
1223
1224 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1225 | --x-incl | --x-inc | --x-in | --x-i)
1226 ac_prev=x_includes ;;
1227 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1228 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1229 x_includes=$ac_optarg ;;
ba4481b5
DL
1230
1231 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1232 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1233 ac_prev=x_libraries ;;
1234 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1235 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1236 x_libraries=$ac_optarg ;;
ba4481b5 1237
036dc38d
LMI
1238 -*) as_fn_error "unrecognized option: \`$ac_option'
1239Try \`$0 --help' for more information."
ba4481b5
DL
1240 ;;
1241
503d2be0
AS
1242 *=*)
1243 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1244 # Reject names that are not valid shell variable names.
eb697db5
DN
1245 case $ac_envvar in #(
1246 '' | [0-9]* | *[!_$as_cr_alnum]* )
036dc38d 1247 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
eb697db5 1248 esac
ca81d7a0 1249 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1250 export $ac_envvar ;;
1251
ba4481b5 1252 *)
503d2be0 1253 # FIXME: should be removed in autoconf 3.0.
e9a63f04 1254 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
503d2be0 1255 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
e9a63f04 1256 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503d2be0 1257 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1258 ;;
1259
1260 esac
1261done
1262
1263if test -n "$ac_prev"; then
503d2be0 1264 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
036dc38d 1265 as_fn_error "missing argument to $ac_option"
ba4481b5 1266fi
ba4481b5 1267
e9a63f04
GM
1268if test -n "$ac_unrecognized_opts"; then
1269 case $enable_option_checking in
1270 no) ;;
036dc38d 1271 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
3de25479 1272 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
e9a63f04
GM
1273 esac
1274fi
1275
1276# Check all directory arguments for consistency.
ca81d7a0
JD
1277for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1278 datadir sysconfdir sharedstatedir localstatedir includedir \
1279 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1280 libdir localedir mandir
ba4481b5 1281do
ca81d7a0 1282 eval ac_val=\$$ac_var
e9a63f04
GM
1283 # Remove trailing slashes.
1284 case $ac_val in
1285 */ )
1286 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1287 eval $ac_var=\$ac_val;;
1288 esac
1289 # Be sure to have absolute directory names.
503d2be0 1290 case $ac_val in
ca81d7a0
JD
1291 [\\/$]* | ?:[\\/]* ) continue;;
1292 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1293 esac
036dc38d 1294 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
ba4481b5
DL
1295done
1296
503d2be0
AS
1297# There might be people who depend on the old broken behavior: `$host'
1298# used to hold the argument of --host etc.
c0d27fcc 1299# FIXME: To remove some day.
503d2be0
AS
1300build=$build_alias
1301host=$host_alias
1302target=$target_alias
1303
c0d27fcc 1304# FIXME: To remove some day.
503d2be0
AS
1305if test "x$host_alias" != x; then
1306 if test "x$build_alias" = x; then
1307 cross_compiling=maybe
036dc38d
LMI
1308 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1309 If a cross compiler is detected then cross compile mode will be used." >&2
503d2be0
AS
1310 elif test "x$build_alias" != "x$host_alias"; then
1311 cross_compiling=yes
1312 fi
1313fi
ba4481b5 1314
503d2be0
AS
1315ac_tool_prefix=
1316test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1317
503d2be0 1318test "$silent" = yes && exec 6>/dev/null
ba4481b5 1319
c0d27fcc 1320
ca81d7a0
JD
1321ac_pwd=`pwd` && test -n "$ac_pwd" &&
1322ac_ls_di=`ls -di .` &&
1323ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
036dc38d 1324 as_fn_error "working directory cannot be determined"
ca81d7a0 1325test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
036dc38d 1326 as_fn_error "pwd does not report name of working directory"
ca81d7a0
JD
1327
1328
ba4481b5
DL
1329# Find the source files, if location was not specified.
1330if test -z "$srcdir"; then
1331 ac_srcdir_defaulted=yes
ca81d7a0 1332 # Try the directory containing this script, then the parent directory.
e9a63f04
GM
1333 ac_confdir=`$as_dirname -- "$as_myself" ||
1334$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1335 X"$as_myself" : 'X\(//\)[^/]' \| \
1336 X"$as_myself" : 'X\(//\)$' \| \
1337 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1338$as_echo X"$as_myself" |
ca81d7a0
JD
1339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1340 s//\1/
1341 q
1342 }
1343 /^X\(\/\/\)[^/].*/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)$/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\).*/{
1352 s//\1/
1353 q
1354 }
1355 s/.*/./; q'`
ba4481b5 1356 srcdir=$ac_confdir
ca81d7a0 1357 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1358 srcdir=..
1359 fi
1360else
1361 ac_srcdir_defaulted=no
1362fi
ca81d7a0
JD
1363if test ! -r "$srcdir/$ac_unique_file"; then
1364 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
036dc38d 1365 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
ba4481b5 1366fi
ca81d7a0
JD
1367ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1368ac_abs_confdir=`(
036dc38d 1369 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
ca81d7a0
JD
1370 pwd)`
1371# When building in place, set srcdir=.
1372if test "$ac_abs_confdir" = "$ac_pwd"; then
1373 srcdir=.
1374fi
1375# Remove unnecessary trailing slashes from srcdir.
1376# Double slashes in file names in object file debugging info
1377# mess up M-x gdb in Emacs.
1378case $srcdir in
1379*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1380esac
1381for ac_var in $ac_precious_vars; do
1382 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1383 eval ac_env_${ac_var}_value=\$${ac_var}
1384 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1385 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1386done
503d2be0
AS
1387
1388#
1389# Report the --help message.
1390#
1391if test "$ac_init_help" = "long"; then
1392 # Omit some internal or obsolete options to make the list less imposing.
1393 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1394 cat <<_ACEOF
49a62e8a 1395\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
503d2be0
AS
1396
1397Usage: $0 [OPTION]... [VAR=VALUE]...
1398
1399To assign environment variables (e.g., CC, CFLAGS...), specify them as
1400VAR=VALUE. See below for descriptions of some of the useful variables.
1401
1402Defaults for the options are specified in brackets.
1403
1404Configuration:
1405 -h, --help display this help and exit
1406 --help=short display options specific to this package
1407 --help=recursive display the short help of all the included packages
1408 -V, --version display version information and exit
036dc38d 1409 -q, --quiet, --silent do not print \`checking...' messages
503d2be0
AS
1410 --cache-file=FILE cache test results in FILE [disabled]
1411 -C, --config-cache alias for \`--cache-file=config.cache'
1412 -n, --no-create do not create output files
1413 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1414
503d2be0
AS
1415Installation directories:
1416 --prefix=PREFIX install architecture-independent files in PREFIX
e9a63f04 1417 [$ac_default_prefix]
503d2be0 1418 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
e9a63f04 1419 [PREFIX]
503d2be0
AS
1420
1421By default, \`make install' will install all the files in
1422\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1423an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1424for instance \`--prefix=\$HOME'.
1425
1426For better control, use the options below.
1427
1428Fine tuning of the installation directories:
e9a63f04
GM
1429 --bindir=DIR user executables [EPREFIX/bin]
1430 --sbindir=DIR system admin executables [EPREFIX/sbin]
1431 --libexecdir=DIR program executables [EPREFIX/libexec]
1432 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1433 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1434 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1435 --libdir=DIR object code libraries [EPREFIX/lib]
1436 --includedir=DIR C header files [PREFIX/include]
1437 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1438 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1439 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1440 --infodir=DIR info documentation [DATAROOTDIR/info]
1441 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1442 --mandir=DIR man documentation [DATAROOTDIR/man]
1443 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1444 --htmldir=DIR html documentation [DOCDIR]
1445 --dvidir=DIR dvi documentation [DOCDIR]
1446 --pdfdir=DIR pdf documentation [DOCDIR]
1447 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1448_ACEOF
503d2be0 1449
c0d27fcc 1450 cat <<\_ACEOF
503d2be0 1451
ba5da88a
PJ
1452Program names:
1453 --program-prefix=PREFIX prepend PREFIX to installed program names
1454 --program-suffix=SUFFIX append SUFFIX to installed program names
1455 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1456
503d2be0
AS
1457X features:
1458 --x-includes=DIR X include files are in DIR
1459 --x-libraries=DIR X library files are in DIR
1460
1461System types:
1462 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1463 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1464_ACEOF
503d2be0
AS
1465fi
1466
1467if test -n "$ac_init_help"; then
9cf8f393 1468 case $ac_init_help in
49a62e8a 1469 short | recursive ) echo "Configuration of emacs 24.0.50:";;
9cf8f393 1470 esac
c0d27fcc 1471 cat <<\_ACEOF
503d2be0
AS
1472
1473Optional Features:
e9a63f04 1474 --disable-option-checking ignore unrecognized --enable/--with options
503d2be0
AS
1475 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1476 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6b8bc489
AS
1477 --disable-ns-self-contained
1478 disable self contained build under NeXTstep
d0098f13 1479 --enable-asserts compile code with asserts enabled
709e90de
AS
1480 --enable-maintainer-mode
1481 enable make rules and dependencies not useful (and
1482 sometimes confusing) to the casual installer
9adfabc2
LK
1483 --enable-locallisppath=PATH
1484 directories Emacs should search for lisp files
1485 specific to this site
7df24305
AS
1486 --enable-checking[=LIST]
1487 enable expensive run-time checks. With LIST, enable
1488 only specific categories of checks. Categories are:
1489 all,yes,no. Flags are: stringbytes, stringoverrun,
1490 stringfreelist, xmallocoverrun, conslist
d9170db5
DN
1491 --enable-use-lisp-union-type
1492 use a union for the Lisp_Object data type. This is
1493 only useful for development for catching certain
1494 types of bugs.
7df24305
AS
1495 --enable-profiling build emacs with profiling support. This might not
1496 work on all platforms
a53cfbe5
JD
1497 --enable-autodepend automatically generate dependencies to .h-files.
1498 Requires GNU Make and Gcc. Enabled if GNU Make and
1499 Gcc is found
503d2be0
AS
1500 --disable-largefile omit support for large files
1501
1502Optional Packages:
1503 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1504 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1505 --without-pop don't support POP mail retrieval with movemail
1506 --with-kerberos support Kerberos-authenticated POP
1507 --with-kerberos5 support Kerberos version 5 authenticated POP
1508 --with-hesiod support Hesiod to get the POP server host
91e84f96
GM
1509 --with-mmdf support MMDF mailboxes
1510 --with-mail-unlink unlink, rather than empty, mail spool after reading
1511 --with-mailhost=HOSTNAME
1512 string giving default POP mail host
2c9dccc9 1513 --without-sound don't compile with sound support
ecd43cb9 1514 --without-sync-input process async input synchronously
e547b051
J
1515 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
1516 lucid or athena, motif, no)
c8467c40
GM
1517 --without-xpm don't compile with XPM image support
1518 --without-jpeg don't compile with JPEG image support
1519 --without-tiff don't compile with TIFF image support
1520 --without-gif don't compile with GIF image support
1521 --without-png don't compile with PNG image support
1522 --without-rsvg don't compile with SVG image support
381408e2 1523 --without-xml2 don't compile with XML parsing support
8ea189f7 1524 --without-imagemagick don't compile with ImageMagick image support
4efcc8d1 1525 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1526 --without-libotf don't use libotf for OpenType font support
1527 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1528 --without-toolkit-scroll-bars
cc227489 1529 don't use Motif or Xaw3d scroll bars
c982cf7d 1530 --without-xaw3d don't use Xaw3d
cc227489 1531 --without-xim don't use X11 XIM
edfda783 1532 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1533 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1534 console
b5a922de 1535 --without-dbus don't compile with D-Bus support
637fa988 1536 --without-gconf don't compile with GConf support
a4f64981 1537 --without-selinux don't compile with SELinux support
036dc38d 1538 --without-gnutls don't use -lgnutls for SSL/TLS support
921fbdf0 1539 --without-makeinfo don't require makeinfo for building manuals
c05c21ed 1540 --without-compress-info don't compress the installed Info pages
00b9c927 1541 --with-pkg-config-prog=PATH
ecd43cb9 1542 path to pkg-config for finding GTK and librsvg
a4f64981
GM
1543 --with-crt-dir=DIR directory containing crtn.o etc. The default is
1544 /usr/lib, or /usr/lib64 on some platforms.
ecd43cb9
GM
1545 --with-gnustep-conf=PATH
1546 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1547 or /etc/GNUstep/GNUstep.conf
503d2be0
AS
1548 --with-x use the X Window System
1549
1550Some influential environment variables:
1551 CC C compiler command
1552 CFLAGS C compiler flags
1553 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1554 nonstandard directory <lib dir>
f053c89f 1555 LIBS libraries to pass to the linker, e.g. -l<library>
eb697db5 1556 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
ca81d7a0 1557 you have headers in a nonstandard directory <include dir>
503d2be0 1558 CPP C preprocessor
ca81d7a0 1559 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1560
1561Use these variables to override the choices made by `configure' or to help
1562it to find libraries and programs with nonstandard names/locations.
1563
eb697db5 1564Report bugs to the package provider.
c0d27fcc 1565_ACEOF
ca81d7a0 1566ac_status=$?
503d2be0
AS
1567fi
1568
1569if test "$ac_init_help" = "recursive"; then
1570 # If there are subdirs, report their specific --help.
c0d27fcc 1571 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
e9a63f04
GM
1572 test -d "$ac_dir" ||
1573 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1574 continue
c0d27fcc
MR
1575 ac_builddir=.
1576
ca81d7a0
JD
1577case "$ac_dir" in
1578.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579*)
e9a63f04 1580 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 1581 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 1582 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
1583 case $ac_top_builddir_sub in
1584 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1586 esac ;;
1587esac
1588ac_abs_top_builddir=$ac_pwd
1589ac_abs_builddir=$ac_pwd$ac_dir_suffix
1590# for backward compatibility:
1591ac_top_builddir=$ac_top_build_prefix
503d2be0 1592
c0d27fcc 1593case $srcdir in
ca81d7a0 1594 .) # We are building in place.
c0d27fcc 1595 ac_srcdir=.
ca81d7a0
JD
1596 ac_top_srcdir=$ac_top_builddir_sub
1597 ac_abs_top_srcdir=$ac_pwd ;;
1598 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1599 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1600 ac_top_srcdir=$srcdir
1601 ac_abs_top_srcdir=$srcdir ;;
1602 *) # Relative name.
1603 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1604 ac_top_srcdir=$ac_top_build_prefix$srcdir
1605 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1606esac
ca81d7a0
JD
1607ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1608
1609 cd "$ac_dir" || { ac_status=$?; continue; }
1610 # Check for guested configure.
1611 if test -f "$ac_srcdir/configure.gnu"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1614 elif test -f "$ac_srcdir/configure"; then
1615 echo &&
1616 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1617 else
e9a63f04 1618 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1619 fi || ac_status=$?
1620 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1621 done
1622fi
1623
ca81d7a0 1624test -n "$ac_init_help" && exit $ac_status
503d2be0 1625if $ac_init_version; then
c0d27fcc 1626 cat <<\_ACEOF
49a62e8a 1627emacs configure 24.0.50
036dc38d 1628generated by GNU Autoconf 2.65
503d2be0 1629
036dc38d 1630Copyright (C) 2009 Free Software Foundation, Inc.
503d2be0
AS
1631This configure script is free software; the Free Software Foundation
1632gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1633_ACEOF
ca81d7a0 1634 exit
503d2be0 1635fi
0ca10bb7 1636
eb697db5
DN
1637## ------------------------ ##
1638## Autoconf initialization. ##
1639## ------------------------ ##
0ca10bb7 1640
eb697db5
DN
1641# ac_fn_c_try_compile LINENO
1642# --------------------------
1643# Try to compile conftest.$ac_ext, and return whether this succeeded.
1644ac_fn_c_try_compile ()
6da23aaa 1645{
eb697db5
DN
1646 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1647 rm -f conftest.$ac_objext
1648 if { { ac_try="$ac_compile"
5929fbe7
GM
1649case "(($ac_try" in
1650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1651 *) ac_try_echo=$ac_try;;
1652esac
eb697db5
DN
1653eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1654$as_echo "$ac_try_echo"; } >&5
1655 (eval "$ac_compile") 2>conftest.err
5929fbe7 1656 ac_status=$?
eb697db5
DN
1657 if test -s conftest.err; then
1658 grep -v '^ *+' conftest.err >conftest.er1
1659 cat conftest.er1 >&5
1660 mv -f conftest.er1 conftest.err
1661 fi
1662 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1663 test $ac_status = 0; } && {
5929fbe7
GM
1664 test -z "$ac_c_werror_flag" ||
1665 test ! -s conftest.err
eb697db5
DN
1666 } && test -s conftest.$ac_objext; then :
1667 ac_retval=0
8c5ff6dd 1668else
5929fbe7
GM
1669 $as_echo "$as_me: failed program was:" >&5
1670sed 's/^/| /' conftest.$ac_ext >&5
6da23aaa 1671
eb697db5 1672 ac_retval=1
5929fbe7 1673fi
eb697db5
DN
1674 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1675 as_fn_set_status $ac_retval
503d2be0 1676
eb697db5 1677} # ac_fn_c_try_compile
c0d27fcc 1678
eb697db5
DN
1679# ac_fn_c_try_link LINENO
1680# -----------------------
1681# Try to link conftest.$ac_ext, and return whether this succeeded.
1682ac_fn_c_try_link ()
503d2be0 1683{
eb697db5
DN
1684 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1685 rm -f conftest.$ac_objext conftest$ac_exeext
1686 if { { ac_try="$ac_link"
91e84f96
GM
1687case "(($ac_try" in
1688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1689 *) ac_try_echo=$ac_try;;
1690esac
eb697db5
DN
1691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1692$as_echo "$ac_try_echo"; } >&5
1693 (eval "$ac_link") 2>conftest.err
91e84f96 1694 ac_status=$?
eb697db5
DN
1695 if test -s conftest.err; then
1696 grep -v '^ *+' conftest.err >conftest.er1
1697 cat conftest.er1 >&5
1698 mv -f conftest.er1 conftest.err
1699 fi
1700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1701 test $ac_status = 0; } && {
91e84f96
GM
1702 test -z "$ac_c_werror_flag" ||
1703 test ! -s conftest.err
1704 } && test -s conftest$ac_exeext && {
1705 test "$cross_compiling" = yes ||
1706 $as_test_x conftest$ac_exeext
eb697db5
DN
1707 }; then :
1708 ac_retval=0
503d2be0 1709else
91e84f96
GM
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
6da23aaa 1712
eb697db5 1713 ac_retval=1
0ca10bb7 1714fi
eb697db5
DN
1715 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1716 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1717 # interfere with the next link command; also delete a directory that is
1718 # left behind by Apple's compiler. We do this before executing the actions.
1719 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1720 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1721 as_fn_set_status $ac_retval
0ca10bb7 1722
eb697db5 1723} # ac_fn_c_try_link
6da23aaa 1724
eb697db5
DN
1725# ac_fn_c_try_cpp LINENO
1726# ----------------------
1727# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1728ac_fn_c_try_cpp ()
91e84f96 1729{
eb697db5
DN
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1731 if { { ac_try="$ac_cpp conftest.$ac_ext"
91e84f96
GM
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
bf89cb4d 1735esac
eb697db5
DN
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
91e84f96 1739 ac_status=$?
eb697db5
DN
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
375a0f65 1746 test $ac_status = 0; } >/dev/null && {
5929fbe7 1747 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
91e84f96 1748 test ! -s conftest.err
eb697db5
DN
1749 }; then :
1750 ac_retval=0
6bae0ccf 1751else
91e84f96
GM
1752 $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
6da23aaa 1754
eb697db5 1755 ac_retval=1
6bae0ccf 1756fi
eb697db5
DN
1757 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1758 as_fn_set_status $ac_retval
6da23aaa 1759
eb697db5 1760} # ac_fn_c_try_cpp
6da23aaa 1761
eb697db5
DN
1762# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1763# -------------------------------------------------------
1764# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1765# the include files in INCLUDES and setting the cache variable VAR
1766# accordingly.
1767ac_fn_c_check_header_mongrel ()
1768{
1769 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
036dc38d 1770 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
eb697db5
DN
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1772$as_echo_n "checking for $2... " >&6; }
036dc38d 1773if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
6da23aaa 1774 $as_echo_n "(cached) " >&6
91e84f96 1775fi
eb697db5
DN
1776eval ac_res=\$$3
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
91e84f96 1778$as_echo "$ac_res" >&6; }
bf89cb4d 1779else
91e84f96 1780 # Is the header compilable?
eb697db5
DN
1781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1782$as_echo_n "checking $2 usability... " >&6; }
1783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 1784/* end confdefs.h. */
eb697db5
DN
1785$4
1786#include <$2>
91e84f96 1787_ACEOF
eb697db5 1788if ac_fn_c_try_compile "$LINENO"; then :
91e84f96 1789 ac_header_compiler=yes
6da23aaa 1790else
eb697db5 1791 ac_header_compiler=no
91e84f96 1792fi
91e84f96 1793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5 1794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
91e84f96 1795$as_echo "$ac_header_compiler" >&6; }
6da23aaa 1796
91e84f96 1797# Is the header present?
eb697db5
DN
1798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1799$as_echo_n "checking $2 presence... " >&6; }
1800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 1801/* end confdefs.h. */
eb697db5 1802#include <$2>
91e84f96 1803_ACEOF
eb697db5 1804if ac_fn_c_try_cpp "$LINENO"; then :
91e84f96
GM
1805 ac_header_preproc=yes
1806else
91e84f96
GM
1807 ac_header_preproc=no
1808fi
375a0f65 1809rm -f conftest.err conftest.$ac_ext
eb697db5 1810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
91e84f96 1811$as_echo "$ac_header_preproc" >&6; }
6da23aaa 1812
91e84f96 1813# So? What about this header?
eb697db5 1814case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
91e84f96 1815 yes:no: )
eb697db5
DN
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1817$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1819$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
91e84f96
GM
1820 ;;
1821 no:yes:* )
eb697db5
DN
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1823$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1825$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1827$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1829$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1831$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
91e84f96
GM
1832 ;;
1833esac
eb697db5
DN
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
036dc38d 1836if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
e9a63f04 1837 $as_echo_n "(cached) " >&6
98418dba 1838else
eb697db5 1839 eval "$3=\$ac_header_compiler"
6da23aaa 1840fi
eb697db5
DN
1841eval ac_res=\$$3
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
91e84f96 1843$as_echo "$ac_res" >&6; }
91e84f96 1844fi
eb697db5 1845 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
91e84f96 1846
eb697db5 1847} # ac_fn_c_check_header_mongrel
91e84f96 1848
eb697db5
DN
1849# ac_fn_c_try_run LINENO
1850# ----------------------
1851# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1852# that executables *can* be run.
1853ac_fn_c_try_run ()
6da23aaa 1854{
eb697db5
DN
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_link"
91e84f96
GM
1857case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
eb697db5
DN
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
91e84f96
GM
1863 (eval "$ac_link") 2>&5
1864 ac_status=$?
eb697db5
DN
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1867 { { case "(($ac_try" in
91e84f96
GM
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
eb697db5
DN
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
91e84f96
GM
1873 (eval "$ac_try") 2>&5
1874 ac_status=$?
eb697db5
DN
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; }; }; then :
1877 ac_retval=0
6da23aaa 1878else
91e84f96 1879 $as_echo "$as_me: program exited with status $ac_status" >&5
eb697db5 1880 $as_echo "$as_me: failed program was:" >&5
91e84f96
GM
1881sed 's/^/| /' conftest.$ac_ext >&5
1882
eb697db5 1883 ac_retval=$ac_status
b936fae4 1884fi
eb697db5
DN
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1886 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1887 as_fn_set_status $ac_retval
4c343001 1888
eb697db5 1889} # ac_fn_c_try_run
b936fae4 1890
eb697db5
DN
1891# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1892# -------------------------------------------------------
1893# Tests whether HEADER exists and can be compiled using the include files in
1894# INCLUDES, setting the cache variable VAR accordingly.
1895ac_fn_c_check_header_compile ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
036dc38d 1900if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
eb697db5
DN
1901 $as_echo_n "(cached) " >&6
1902else
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$4
1906#include <$2>
91e84f96 1907_ACEOF
eb697db5
DN
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
91e84f96 1912fi
eb697db5 1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 1914fi
eb697db5
DN
1915eval ac_res=\$$3
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5929fbe7 1917$as_echo "$ac_res" >&6; }
eb697db5 1918 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
91e84f96 1919
eb697db5 1920} # ac_fn_c_check_header_compile
91e84f96 1921
036dc38d
LMI
1922# ac_fn_c_check_decl LINENO SYMBOL VAR
1923# ------------------------------------
1924# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
eb697db5
DN
1925ac_fn_c_check_decl ()
1926{
1927 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
036dc38d
LMI
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
1929$as_echo_n "checking whether $2 is declared... " >&6; }
1930if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
bf89cb4d
GM
1931 $as_echo_n "(cached) " >&6
1932else
eb697db5 1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 1934/* end confdefs.h. */
eb697db5 1935$4
0ca10bb7
RC
1936int
1937main ()
1938{
036dc38d
LMI
1939#ifndef $2
1940 (void) $2;
eb697db5 1941#endif
e6df49e4 1942
0ca10bb7
RC
1943 ;
1944 return 0;
1945}
c0d27fcc 1946_ACEOF
eb697db5
DN
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 eval "$3=yes"
91e84f96 1949else
eb697db5 1950 eval "$3=no"
91e84f96 1951fi
eb697db5 1952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf89cb4d 1953fi
eb697db5
DN
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
1957 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
52dbaac8 1958
eb697db5 1959} # ac_fn_c_check_decl
52dbaac8 1960
eb697db5
DN
1961# ac_fn_c_check_header_preproc LINENO HEADER VAR
1962# ----------------------------------------------
1963# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1964ac_fn_c_check_header_preproc ()
1965{
1966 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1968$as_echo_n "checking for $2... " >&6; }
036dc38d 1969if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
eb697db5
DN
1970 $as_echo_n "(cached) " >&6
1971else
1972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1973/* end confdefs.h. */
1974#include <$2>
1975_ACEOF
1976if ac_fn_c_try_cpp "$LINENO"; then :
1977 eval "$3=yes"
1978else
1979 eval "$3=no"
bf89cb4d 1980fi
375a0f65 1981rm -f conftest.err conftest.$ac_ext
eb697db5
DN
1982fi
1983eval ac_res=\$$3
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1985$as_echo "$ac_res" >&6; }
1986 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
52dbaac8 1987
eb697db5 1988} # ac_fn_c_check_header_preproc
52dbaac8 1989
eb697db5
DN
1990# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1991# ----------------------------------------------------
1992# Tries to find if the field MEMBER exists in type AGGR, after including
1993# INCLUDES, setting cache variable VAR accordingly.
1994ac_fn_c_check_member ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1998$as_echo_n "checking for $2.$3... " >&6; }
036dc38d 1999if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
e9a63f04 2000 $as_echo_n "(cached) " >&6
52dbaac8 2001else
eb697db5
DN
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$5
2005int
2006main ()
2007{
2008static $2 ac_aggr;
2009if (ac_aggr.$3)
2010return 0;
2011 ;
2012 return 0;
2013}
91e84f96 2014_ACEOF
eb697db5
DN
2015if ac_fn_c_try_compile "$LINENO"; then :
2016 eval "$4=yes"
2017else
2018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 2019/* end confdefs.h. */
eb697db5 2020$5
6da23aaa
EZ
2021int
2022main ()
2023{
eb697db5
DN
2024static $2 ac_aggr;
2025if (sizeof ac_aggr.$3)
2026return 0;
6da23aaa
EZ
2027 ;
2028 return 0;
2029}
2030_ACEOF
eb697db5
DN
2031if ac_fn_c_try_compile "$LINENO"; then :
2032 eval "$4=yes"
bf89cb4d 2033else
eb697db5 2034 eval "$4=no"
bf89cb4d 2035fi
eb697db5 2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6da23aaa 2037fi
eb697db5 2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6da23aaa 2039fi
eb697db5
DN
2040eval ac_res=\$$4
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2042$as_echo "$ac_res" >&6; }
2043 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bf89cb4d 2044
eb697db5 2045} # ac_fn_c_check_member
6da23aaa 2046
eb697db5
DN
2047# ac_fn_c_check_func LINENO FUNC VAR
2048# ----------------------------------
2049# Tests whether FUNC exists, setting the cache variable VAR accordingly
2050ac_fn_c_check_func ()
2051{
2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2054$as_echo_n "checking for $2... " >&6; }
036dc38d 2055if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
6da23aaa
EZ
2056 $as_echo_n "(cached) " >&6
2057else
eb697db5 2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 2059/* end confdefs.h. */
eb697db5
DN
2060/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2061 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2062#define $2 innocuous_$2
2063
2064/* System header to define __stub macros and hopefully few prototypes,
2065 which can conflict with char $2 (); below.
2066 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2067 <limits.h> exists even on freestanding compilers. */
2068
2069#ifdef __STDC__
2070# include <limits.h>
2071#else
2072# include <assert.h>
2073#endif
2074
2075#undef $2
52dbaac8 2076
0ca10bb7
RC
2077/* Override any GCC internal prototype to avoid an error.
2078 Use char because int might match the return type of a GCC
2079 builtin and then its argument prototype would still apply. */
2080#ifdef __cplusplus
2081extern "C"
52dbaac8 2082#endif
eb697db5
DN
2083char $2 ();
2084/* The GNU C library defines this for functions which it implements
2085 to always fail with ENOSYS. Some functions are actually named
2086 something starting with __ and the normal name is an alias. */
2087#if defined __stub_$2 || defined __stub___$2
2088choke me
2089#endif
2090
0ca10bb7
RC
2091int
2092main ()
2093{
eb697db5 2094return $2 ();
0ca10bb7
RC
2095 ;
2096 return 0;
2097}
2098_ACEOF
eb697db5
DN
2099if ac_fn_c_try_link "$LINENO"; then :
2100 eval "$3=yes"
0ca10bb7 2101else
eb697db5
DN
2102 eval "$3=no"
2103fi
2104rm -f core conftest.err conftest.$ac_objext \
2105 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 2106fi
eb697db5
DN
2107eval ac_res=\$$3
2108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2109$as_echo "$ac_res" >&6; }
2110 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
91e84f96 2111
eb697db5
DN
2112} # ac_fn_c_check_func
2113
2114# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2115# -------------------------------------------
2116# Tests whether TYPE exists after having included INCLUDES, setting cache
2117# variable VAR accordingly.
2118ac_fn_c_check_type ()
2119{
2120 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2122$as_echo_n "checking for $2... " >&6; }
036dc38d 2123if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
eb697db5
DN
2124 $as_echo_n "(cached) " >&6
2125else
2126 eval "$3=no"
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130int
2131main ()
2132{
2133if (sizeof ($2))
2134 return 0;
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
2140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2141/* end confdefs.h. */
2142$4
2143int
2144main ()
2145{
2146if (sizeof (($2)))
2147 return 0;
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 2153
eb697db5
DN
2154else
2155 eval "$3=yes"
0ca10bb7 2156fi
eb697db5
DN
2157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2158fi
2159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 2160fi
eb697db5
DN
2161eval ac_res=\$$3
2162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2163$as_echo "$ac_res" >&6; }
2164 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2165
2166} # ac_fn_c_check_type
2167cat >config.log <<_ACEOF
2168This file contains any messages produced by compilers while
2169running configure, to aid debugging if configure makes a mistake.
2170
2171It was created by emacs $as_me 24.0.50, which was
036dc38d 2172generated by GNU Autoconf 2.65. Invocation command line was
eb697db5
DN
2173
2174 $ $0 $@
2175
91e84f96 2176_ACEOF
eb697db5
DN
2177exec 5>>config.log
2178{
2179cat <<_ASUNAME
2180## --------- ##
2181## Platform. ##
2182## --------- ##
91e84f96 2183
eb697db5
DN
2184hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2185uname -m = `(uname -m) 2>/dev/null || echo unknown`
2186uname -r = `(uname -r) 2>/dev/null || echo unknown`
2187uname -s = `(uname -s) 2>/dev/null || echo unknown`
2188uname -v = `(uname -v) 2>/dev/null || echo unknown`
91e84f96 2189
eb697db5
DN
2190/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2191/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2192
2193/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2194/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2195/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2196/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2197/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2198/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2199/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
bf89cb4d 2200
eb697db5 2201_ASUNAME
bf89cb4d 2202
eb697db5
DN
2203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2204for as_dir in $PATH
2205do
2206 IFS=$as_save_IFS
2207 test -z "$as_dir" && as_dir=.
2208 $as_echo "PATH: $as_dir"
2209 done
2210IFS=$as_save_IFS
1f8162fe 2211
eb697db5 2212} >&5
bf89cb4d 2213
eb697db5 2214cat >&5 <<_ACEOF
91e84f96 2215
eb697db5
DN
2216
2217## ----------- ##
2218## Core tests. ##
2219## ----------- ##
2220
2221_ACEOF
2222
2223
2224# Keep a trace of the command line.
2225# Strip out --no-create and --no-recursion so they do not pile up.
2226# Strip out --silent because we don't want to record it for future runs.
2227# Also quote any args containing shell meta-characters.
2228# Make two passes to allow for proper duplicate-argument suppression.
2229ac_configure_args=
2230ac_configure_args0=
2231ac_configure_args1=
2232ac_must_keep_next=false
2233for ac_pass in 1 2
2234do
2235 for ac_arg
2236 do
2237 case $ac_arg in
2238 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2239 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2240 | -silent | --silent | --silen | --sile | --sil)
2241 continue ;;
2242 *\'*)
2243 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2244 esac
2245 case $ac_pass in
2246 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2247 2)
2248 as_fn_append ac_configure_args1 " '$ac_arg'"
2249 if test $ac_must_keep_next = true; then
2250 ac_must_keep_next=false # Got value, back to normal.
2251 else
2252 case $ac_arg in
2253 *=* | --config-cache | -C | -disable-* | --disable-* \
2254 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2255 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2256 | -with-* | --with-* | -without-* | --without-* | --x)
2257 case "$ac_configure_args0 " in
2258 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2259 esac
2260 ;;
2261 -* ) ac_must_keep_next=true ;;
2262 esac
2263 fi
2264 as_fn_append ac_configure_args " '$ac_arg'"
2265 ;;
91e84f96 2266 esac
eb697db5
DN
2267 done
2268done
2269{ ac_configure_args0=; unset ac_configure_args0;}
2270{ ac_configure_args1=; unset ac_configure_args1;}
91e84f96 2271
eb697db5
DN
2272# When interrupted or exit'd, cleanup temporary files, and complete
2273# config.log. We remove comments because anyway the quotes in there
2274# would cause problems or look ugly.
2275# WARNING: Use '\'' to represent an apostrophe within the trap.
2276# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2277trap 'exit_status=$?
2278 # Save into config.log some information that might help in debugging.
2279 {
2280 echo
91e84f96 2281
036dc38d
LMI
2282 cat <<\_ASBOX
2283## ---------------- ##
eb697db5 2284## Cache variables. ##
036dc38d
LMI
2285## ---------------- ##
2286_ASBOX
eb697db5
DN
2287 echo
2288 # The following way of writing the cache mishandles newlines in values,
2289(
2290 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2291 eval ac_val=\$$ac_var
2292 case $ac_val in #(
2293 *${as_nl}*)
2294 case $ac_var in #(
2295 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2296$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2297 esac
2298 case $ac_var in #(
2299 _ | IFS | as_nl) ;; #(
2300 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2301 *) { eval $ac_var=; unset $ac_var;} ;;
2302 esac ;;
2303 esac
2304 done
2305 (set) 2>&1 |
2306 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2307 *${as_nl}ac_space=\ *)
2308 sed -n \
2309 "s/'\''/'\''\\\\'\'''\''/g;
2310 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2311 ;; #(
2312 *)
2313 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2314 ;;
2315 esac |
2316 sort
2317)
2318 echo
91e84f96 2319
036dc38d
LMI
2320 cat <<\_ASBOX
2321## ----------------- ##
eb697db5 2322## Output variables. ##
036dc38d
LMI
2323## ----------------- ##
2324_ASBOX
eb697db5
DN
2325 echo
2326 for ac_var in $ac_subst_vars
2327 do
2328 eval ac_val=\$$ac_var
2329 case $ac_val in
2330 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2331 esac
2332 $as_echo "$ac_var='\''$ac_val'\''"
2333 done | sort
2334 echo
bf89cb4d 2335
eb697db5 2336 if test -n "$ac_subst_files"; then
036dc38d
LMI
2337 cat <<\_ASBOX
2338## ------------------- ##
eb697db5 2339## File substitutions. ##
036dc38d
LMI
2340## ------------------- ##
2341_ASBOX
eb697db5
DN
2342 echo
2343 for ac_var in $ac_subst_files
2344 do
2345 eval ac_val=\$$ac_var
2346 case $ac_val in
2347 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2348 esac
2349 $as_echo "$ac_var='\''$ac_val'\''"
2350 done | sort
2351 echo
2352 fi
bf89cb4d 2353
eb697db5 2354 if test -s confdefs.h; then
036dc38d
LMI
2355 cat <<\_ASBOX
2356## ----------- ##
eb697db5 2357## confdefs.h. ##
036dc38d
LMI
2358## ----------- ##
2359_ASBOX
eb697db5
DN
2360 echo
2361 cat confdefs.h
2362 echo
2363 fi
2364 test "$ac_signal" != 0 &&
2365 $as_echo "$as_me: caught signal $ac_signal"
2366 $as_echo "$as_me: exit $exit_status"
2367 } >&5
2368 rm -f core *.core core.conftest.* &&
2369 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2370 exit $exit_status
2371' 0
2372for ac_signal in 1 2 13 15; do
2373 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2374done
2375ac_signal=0
6da23aaa 2376
eb697db5
DN
2377# confdefs.h avoids OS command line length limits that DEFS can exceed.
2378rm -f -r conftest* confdefs.h
6da23aaa 2379
eb697db5 2380$as_echo "/* confdefs.h */" > confdefs.h
6da23aaa 2381
eb697db5 2382# Predefined preprocessor variables.
6da23aaa 2383
eb697db5
DN
2384cat >>confdefs.h <<_ACEOF
2385#define PACKAGE_NAME "$PACKAGE_NAME"
5929fbe7 2386_ACEOF
bf89cb4d 2387
eb697db5
DN
2388cat >>confdefs.h <<_ACEOF
2389#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
91e84f96 2390_ACEOF
bf89cb4d 2391
eb697db5
DN
2392cat >>confdefs.h <<_ACEOF
2393#define PACKAGE_VERSION "$PACKAGE_VERSION"
6da23aaa 2394_ACEOF
bf89cb4d 2395
eb697db5
DN
2396cat >>confdefs.h <<_ACEOF
2397#define PACKAGE_STRING "$PACKAGE_STRING"
5929fbe7 2398_ACEOF
bf89cb4d 2399
eb697db5
DN
2400cat >>confdefs.h <<_ACEOF
2401#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
91e84f96 2402_ACEOF
91e84f96 2403
eb697db5
DN
2404cat >>confdefs.h <<_ACEOF
2405#define PACKAGE_URL "$PACKAGE_URL"
91e84f96 2406_ACEOF
91e84f96 2407
8c5ff6dd 2408
eb697db5
DN
2409# Let the site file select an alternate cache file if it wants to.
2410# Prefer an explicitly selected file to automatically selected ones.
2411ac_site_file1=NONE
2412ac_site_file2=NONE
2413if test -n "$CONFIG_SITE"; then
036dc38d 2414 ac_site_file1=$CONFIG_SITE
eb697db5
DN
2415elif test "x$prefix" != xNONE; then
2416 ac_site_file1=$prefix/share/config.site
2417 ac_site_file2=$prefix/etc/config.site
2418else
2419 ac_site_file1=$ac_default_prefix/share/config.site
2420 ac_site_file2=$ac_default_prefix/etc/config.site
91e84f96 2421fi
eb697db5
DN
2422for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2423do
2424 test "x$ac_site_file" = xNONE && continue
2425 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2426 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2427$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2428 sed 's/^/| /' "$ac_site_file" >&5
036dc38d 2429 . "$ac_site_file"
eb697db5
DN
2430 fi
2431done
91e84f96 2432
eb697db5
DN
2433if test -r "$cache_file"; then
2434 # Some versions of bash will fail to source /dev/null (special files
2435 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2436 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2438$as_echo "$as_me: loading cache $cache_file" >&6;}
2439 case $cache_file in
2440 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2441 *) . "./$cache_file";;
2442 esac
91e84f96 2443 fi
91e84f96 2444else
eb697db5
DN
2445 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2446$as_echo "$as_me: creating cache $cache_file" >&6;}
2447 >$cache_file
2448fi
91e84f96 2449
eb697db5
DN
2450as_fn_append ac_header_list " stdlib.h"
2451as_fn_append ac_header_list " unistd.h"
2452as_fn_append ac_header_list " sys/param.h"
2453as_fn_append ac_header_list " sys/time.h"
2454as_fn_append ac_func_list " alarm"
2455# Check that the precious variables saved in the cache have kept the same
2456# value.
2457ac_cache_corrupted=false
2458for ac_var in $ac_precious_vars; do
2459 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2460 eval ac_new_set=\$ac_env_${ac_var}_set
2461 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2462 eval ac_new_val=\$ac_env_${ac_var}_value
2463 case $ac_old_set,$ac_new_set in
2464 set,)
2465 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2466$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2467 ac_cache_corrupted=: ;;
2468 ,set)
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2470$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2471 ac_cache_corrupted=: ;;
2472 ,);;
2473 *)
2474 if test "x$ac_old_val" != "x$ac_new_val"; then
2475 # differences in whitespace do not lead to failure.
2476 ac_old_val_w=`echo x $ac_old_val`
2477 ac_new_val_w=`echo x $ac_new_val`
2478 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2479 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2480$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2481 ac_cache_corrupted=:
2482 else
2483 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2484$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2485 eval $ac_var=\$ac_old_val
2486 fi
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2488$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2489 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2490$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2491 fi;;
2492 esac
2493 # Pass precious variables to config.status.
2494 if test "$ac_new_set" = set; then
2495 case $ac_new_val in
2496 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2497 *) ac_arg=$ac_var=$ac_new_val ;;
2498 esac
2499 case " $ac_configure_args " in
2500 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2501 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
8c5ff6dd 2502 esac
eb697db5
DN
2503 fi
2504done
2505if $ac_cache_corrupted; then
2506 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2508 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2509$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
036dc38d 2510 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
91e84f96 2511fi
eb697db5
DN
2512## -------------------- ##
2513## Main body of script. ##
2514## -------------------- ##
91e84f96 2515
eb697db5
DN
2516ac_ext=c
2517ac_cpp='$CPP $CPPFLAGS'
2518ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2519ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2520ac_compiler_gnu=$ac_cv_c_compiler_gnu
91e84f96 2521
91e84f96 2522
eb697db5 2523ac_config_headers="$ac_config_headers src/config.h:src/config.in"
91e84f96
GM
2524
2525
2526
eb697db5
DN
2527test "$program_prefix" != NONE &&
2528 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2529# Use a double $ so make ignores it.
2530test "$program_suffix" != NONE &&
2531 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2532# Double any \ or $.
2533# By default was `s,x,x', remove it if useless.
2534ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2535program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
91e84f96
GM
2536
2537
eb697db5
DN
2538lispdir='${datadir}/emacs/${version}/lisp'
2539locallisppath='${datadir}/emacs/${version}/site-lisp:'\
2540'${datadir}/emacs/site-lisp'
2541lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
2542etcdir='${datadir}/emacs/${version}/etc'
2543archlibdir='${libexecdir}/emacs/${version}/${configuration}'
2544docdir='${datadir}/emacs/${version}/etc'
2545gamedir='${localstatedir}/games/emacs'
91e84f96 2546
eb697db5 2547gameuser=games
91e84f96 2548
91e84f96 2549
91e84f96 2550
91e84f96 2551
eb697db5
DN
2552# Check whether --with-pop was given.
2553if test "${with_pop+set}" = set; then :
2554 withval=$with_pop;
91e84f96 2555else
eb697db5 2556 with_pop=yes
91e84f96 2557fi
91e84f96 2558
eb697db5
DN
2559if test "$with_pop" = yes; then
2560 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
91e84f96
GM
2561
2562fi
6da23aaa 2563
91e84f96 2564
eb697db5
DN
2565# Check whether --with-kerberos was given.
2566if test "${with_kerberos+set}" = set; then :
2567 withval=$with_kerberos;
91e84f96 2568else
eb697db5 2569 with_kerberos=no
91e84f96
GM
2570fi
2571
eb697db5
DN
2572if test "$with_kerberos" != no; then
2573 $as_echo "#define KERBEROS 1" >>confdefs.h
bf89cb4d 2574
52dbaac8 2575fi
52dbaac8 2576
52dbaac8 2577
eb697db5
DN
2578# Check whether --with-kerberos5 was given.
2579if test "${with_kerberos5+set}" = set; then :
2580 withval=$with_kerberos5;
5929fbe7 2581else
eb697db5 2582 with_kerberos5=no
a4f64981 2583fi
0ca10bb7 2584
eb697db5
DN
2585if test "${with_kerberos5}" != no; then
2586 if test "${with_kerberos}" = no; then
2587 with_kerberos=yes
2588 $as_echo "#define KERBEROS 1" >>confdefs.h
6da23aaa 2589
6da23aaa 2590 fi
0ca10bb7 2591
eb697db5 2592$as_echo "#define KERBEROS5 1" >>confdefs.h
a4f64981 2593
bf89cb4d 2594fi
0ca10bb7
RC
2595
2596
eb697db5
DN
2597# Check whether --with-hesiod was given.
2598if test "${with_hesiod+set}" = set; then :
2599 withval=$with_hesiod;
49ebbd65 2600else
eb697db5
DN
2601 with_hesiod=no
2602fi
bf89cb4d 2603
eb697db5 2604if test "$with_hesiod" != no; then
0ca10bb7 2605
eb697db5 2606$as_echo "#define HESIOD 1" >>confdefs.h
0ca10bb7 2607
eb697db5 2608fi
0ca10bb7 2609
0ca10bb7 2610
eb697db5
DN
2611# Check whether --with-mmdf was given.
2612if test "${with_mmdf+set}" = set; then :
2613 withval=$with_mmdf;
8c5ff6dd 2614else
eb697db5 2615 with_mmdf=no
15e12598 2616fi
0ca10bb7 2617
eb697db5 2618if test "$with_mmdf" != no; then
bf89cb4d 2619
eb697db5 2620$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
52dbaac8 2621
8c5ff6dd 2622fi
0ca10bb7 2623
0ca10bb7 2624
eb697db5
DN
2625# Check whether --with-mail-unlink was given.
2626if test "${with_mail_unlink+set}" = set; then :
2627 withval=$with_mail_unlink;
8c5ff6dd 2628else
eb697db5 2629 with_mail_unlink=no
8c5ff6dd 2630fi
0ca10bb7 2631
eb697db5 2632if test "$with_mail_unlink" != no; then
91e84f96 2633
eb697db5
DN
2634$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
2635
8c5ff6dd 2636fi
91e84f96 2637
91e84f96 2638
eb697db5
DN
2639# Check whether --with-mailhost was given.
2640if test "${with_mailhost+set}" = set; then :
2641 withval=$with_mailhost;
2642cat >>confdefs.h <<_ACEOF
2643#define MAILHOST "$withval"
91e84f96
GM
2644_ACEOF
2645
91e84f96
GM
2646fi
2647
3de25479 2648
3de25479 2649
eb697db5
DN
2650# Check whether --with-sound was given.
2651if test "${with_sound+set}" = set; then :
2652 withval=$with_sound;
3de25479 2653else
eb697db5 2654 with_sound=yes
3de25479
JV
2655fi
2656
2657
2658
eb697db5
DN
2659# Check whether --with-sync-input was given.
2660if test "${with_sync_input+set}" = set; then :
2661 withval=$with_sync_input;
8c5ff6dd 2662else
eb697db5 2663 with_sync_input=yes
8c5ff6dd 2664fi
3de25479 2665
eb697db5 2666if test "$with_sync_input" = yes; then
3de25479 2667
eb697db5 2668$as_echo "#define SYNC_INPUT 1" >>confdefs.h
3de25479 2669
eb697db5 2670fi
3de25479 2671
3de25479 2672
eb697db5
DN
2673# Check whether --with-x-toolkit was given.
2674if test "${with_x_toolkit+set}" = set; then :
2675 withval=$with_x_toolkit; case "${withval}" in
2676 y | ye | yes ) val=gtk ;;
2677 n | no ) val=no ;;
2678 l | lu | luc | luci | lucid ) val=lucid ;;
2679 a | at | ath | athe | athen | athena ) val=athena ;;
2680 m | mo | mot | moti | motif ) val=motif ;;
2681 g | gt | gtk ) val=gtk ;;
e547b051 2682 gtk3 ) val=gtk3 ;;
eb697db5 2683 * )
036dc38d 2684as_fn_error "\`--with-x-toolkit=$withval' is invalid;
e547b051
J
2685this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
2686\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
eb697db5
DN
2687 ;;
2688 esac
2689 with_x_toolkit=$val
3de25479 2690
eb697db5 2691fi
3de25479 2692
3de25479 2693
3de25479 2694
eb697db5
DN
2695# Check whether --with-xpm was given.
2696if test "${with_xpm+set}" = set; then :
2697 withval=$with_xpm;
2698else
2699 with_xpm=yes
2700fi
3de25479
JV
2701
2702
eb697db5
DN
2703# Check whether --with-jpeg was given.
2704if test "${with_jpeg+set}" = set; then :
2705 withval=$with_jpeg;
2706else
2707 with_jpeg=yes
2708fi
3de25479 2709
3de25479 2710
eb697db5
DN
2711# Check whether --with-tiff was given.
2712if test "${with_tiff+set}" = set; then :
2713 withval=$with_tiff;
2714else
2715 with_tiff=yes
2716fi
3de25479 2717
431dab04 2718
eb697db5
DN
2719# Check whether --with-gif was given.
2720if test "${with_gif+set}" = set; then :
2721 withval=$with_gif;
2722else
2723 with_gif=yes
2724fi
431dab04 2725
431dab04 2726
eb697db5
DN
2727# Check whether --with-png was given.
2728if test "${with_png+set}" = set; then :
2729 withval=$with_png;
2730else
2731 with_png=yes
8c5ff6dd 2732fi
431dab04
JV
2733
2734
eb697db5
DN
2735# Check whether --with-rsvg was given.
2736if test "${with_rsvg+set}" = set; then :
2737 withval=$with_rsvg;
2738else
2739 with_rsvg=yes
2740fi
431dab04
JV
2741
2742
381408e2
LMI
2743# Check whether --with-xml2 was given.
2744if test "${with_xml2+set}" = set; then :
2745 withval=$with_xml2;
2746else
2747 with_xml2=yes
2748fi
2749
2750
c05c21ed
JV
2751# Check whether --with-imagemagick was given.
2752if test "${with_imagemagick+set}" = set; then :
2753 withval=$with_imagemagick;
431dab04 2754else
8ea189f7 2755 with_imagemagick=yes
c05c21ed 2756fi
431dab04 2757
431dab04 2758
431dab04 2759
eb697db5
DN
2760# Check whether --with-xft was given.
2761if test "${with_xft+set}" = set; then :
2762 withval=$with_xft;
8c5ff6dd 2763else
eb697db5 2764 with_xft=yes
8c5ff6dd 2765fi
431dab04 2766
431dab04 2767
eb697db5
DN
2768# Check whether --with-libotf was given.
2769if test "${with_libotf+set}" = set; then :
2770 withval=$with_libotf;
431dab04 2771else
eb697db5 2772 with_libotf=yes
431dab04
JV
2773fi
2774
431dab04 2775
eb697db5
DN
2776# Check whether --with-m17n-flt was given.
2777if test "${with_m17n_flt+set}" = set; then :
2778 withval=$with_m17n_flt;
2779else
2780 with_m17n_flt=yes
431dab04 2781fi
431dab04
JV
2782
2783
2784
eb697db5
DN
2785# Check whether --with-toolkit-scroll-bars was given.
2786if test "${with_toolkit_scroll_bars+set}" = set; then :
2787 withval=$with_toolkit_scroll_bars;
2788else
2789 with_toolkit_scroll_bars=yes
2790fi
431dab04
JV
2791
2792
eb697db5
DN
2793# Check whether --with-xaw3d was given.
2794if test "${with_xaw3d+set}" = set; then :
2795 withval=$with_xaw3d;
2796else
2797 with_xaw3d=yes
2798fi
431dab04
JV
2799
2800
eb697db5
DN
2801# Check whether --with-xim was given.
2802if test "${with_xim+set}" = set; then :
2803 withval=$with_xim;
2804else
2805 with_xim=yes
2806fi
431dab04
JV
2807
2808
eb697db5
DN
2809# Check whether --with-ns was given.
2810if test "${with_ns+set}" = set; then :
2811 withval=$with_ns;
2812else
2813 with_ns=no
3de25479 2814fi
91e84f96 2815
a4f64981 2816
0ca10bb7 2817
eb697db5
DN
2818# Check whether --with-gpm was given.
2819if test "${with_gpm+set}" = set; then :
2820 withval=$with_gpm;
2821else
2822 with_gpm=yes
8c5ff6dd 2823fi
0ca10bb7 2824
0ca10bb7 2825
eb697db5
DN
2826# Check whether --with-dbus was given.
2827if test "${with_dbus+set}" = set; then :
2828 withval=$with_dbus;
bf89cb4d 2829else
eb697db5 2830 with_dbus=yes
bf89cb4d 2831fi
5929fbe7
GM
2832
2833
eb697db5
DN
2834# Check whether --with-gconf was given.
2835if test "${with_gconf+set}" = set; then :
2836 withval=$with_gconf;
6da23aaa 2837else
eb697db5 2838 with_gconf=yes
bf89cb4d 2839fi
52dbaac8 2840
0ca10bb7 2841
eb697db5
DN
2842# Check whether --with-selinux was given.
2843if test "${with_selinux+set}" = set; then :
2844 withval=$with_selinux;
8c5ff6dd 2845else
eb697db5
DN
2846 with_selinux=yes
2847fi
0ca10bb7 2848
0ca10bb7 2849
036dc38d
LMI
2850# Check whether --with-gnutls was given.
2851if test "${with_gnutls+set}" = set; then :
2852 withval=$with_gnutls;
2853else
2854 with_gnutls=yes
2855fi
2856
2857
eb697db5
DN
2858## For the times when you want to build Emacs but don't have
2859## a suitable makeinfo, and can live without the manuals.
bf89cb4d 2860
eb697db5
DN
2861# Check whether --with-makeinfo was given.
2862if test "${with_makeinfo+set}" = set; then :
2863 withval=$with_makeinfo;
2864else
2865 with_makeinfo=yes
2866fi
52dbaac8 2867
bf89cb4d 2868
c05c21ed
JV
2869## This is an option because I do not know if all info/man support
2870## compressed files, nor how to test if they do so.
52dbaac8 2871
c05c21ed
JV
2872# Check whether --with-compress-info was given.
2873if test "${with_compress_info+set}" = set; then :
2874 withval=$with_compress_info;
2875else
2876 with_compress_info=yes
2877fi
2878
2879if test $with_compress_info = yes; then
2880 GZIP_INFO=yes
2881else
2882 GZIP_INFO=
2883fi
52dbaac8 2884
0ca10bb7 2885
0ca10bb7 2886
eb697db5
DN
2887# Check whether --with-pkg-config-prog was given.
2888if test "${with_pkg_config_prog+set}" = set; then :
2889 withval=$with_pkg_config_prog;
8c5ff6dd 2890fi
0ca10bb7 2891
eb697db5
DN
2892if test "X${with_pkg_config_prog}" != X; then
2893 if test "${with_pkg_config_prog}" != yes; then
2894 PKG_CONFIG="${with_pkg_config_prog}"
2895 fi
91e84f96
GM
2896fi
2897
eb697db5 2898CRT_DIR=
91e84f96 2899
eb697db5
DN
2900# Check whether --with-crt-dir was given.
2901if test "${with_crt_dir+set}" = set; then :
2902 withval=$with_crt_dir;
2903fi
91e84f96 2904
eb697db5 2905CRT_DIR="${with_crt_dir}"
91e84f96
GM
2906
2907
eb697db5
DN
2908# Check whether --with-gnustep-conf was given.
2909if test "${with_gnustep_conf+set}" = set; then :
2910 withval=$with_gnustep_conf;
15e12598 2911fi
91e84f96 2912
eb697db5
DN
2913test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2914 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2915test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2916 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
e6df49e4 2917
eb697db5
DN
2918# Check whether --enable-ns-self-contained was given.
2919if test "${enable_ns_self_contained+set}" = set; then :
2920 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
52dbaac8 2921else
eb697db5
DN
2922 EN_NS_SELF_CONTAINED=yes
2923fi
91e84f96 2924
91e84f96 2925
eb697db5
DN
2926# Check whether --enable-asserts was given.
2927if test "${enable_asserts+set}" = set; then :
2928 enableval=$enable_asserts; USE_XASSERTS=$enableval
2929else
2930 USE_XASSERTS=no
2931fi
91e84f96 2932
52dbaac8 2933
eb697db5
DN
2934# Check whether --enable-maintainer-mode was given.
2935if test "${enable_maintainer_mode+set}" = set; then :
2936 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
5929fbe7 2937else
eb697db5
DN
2938 USE_MAINTAINER_MODE=no
2939fi
91e84f96 2940
eb697db5
DN
2941if test $USE_MAINTAINER_MODE = yes; then
2942 MAINT=
0ca10bb7 2943else
eb697db5
DN
2944 MAINT=#
2945fi
91e84f96 2946
5929fbe7 2947
eb697db5
DN
2948# Check whether --enable-locallisppath was given.
2949if test "${enable_locallisppath+set}" = set; then :
2950 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
2951 locallisppath=
2952elif test "${enableval}" != "yes"; then
2953 locallisppath=${enableval}
6da23aaa 2954fi
eb697db5 2955fi
5929fbe7 2956
91e84f96 2957
eb697db5
DN
2958# Check whether --enable-checking was given.
2959if test "${enable_checking+set}" = set; then :
2960 enableval=$enable_checking; ac_checking_flags="${enableval}"
6da23aaa 2961fi
eb697db5
DN
2962
2963IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2964for check in $ac_checking_flags
2965do
2966 case $check in
2967 # these set all the flags to specific states
2968 yes) ac_enable_checking=1 ;;
2969 no) ac_enable_checking= ;
2970 ac_gc_check_stringbytes= ;
2971 ac_gc_check_string_overrun= ;
2972 ac_gc_check_string_free_list= ;
2973 ac_xmalloc_overrun= ;
2974 ac_gc_check_cons_list= ;;
2975 all) ac_enable_checking=1 ;
2976 ac_gc_check_stringbytes=1 ;
2977 ac_gc_check_string_overrun=1 ;
2978 ac_gc_check_string_free_list=1 ;
2979 ac_xmalloc_overrun=1 ;
2980 ac_gc_check_cons_list=1 ;;
2981 # these enable particular checks
2982 stringbytes) ac_gc_check_stringbytes=1 ;;
2983 stringoverrun) ac_gc_check_string_overrun=1 ;;
2984 stringfreelist) ac_gc_check_string_free_list=1 ;;
2985 xmallocoverrun) ac_xmalloc_overrun=1 ;;
2986 conslist) ac_gc_check_cons_list=1 ;;
036dc38d 2987 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
eb697db5
DN
2988 esac
2989done
2990IFS="$ac_save_IFS"
2991
2992if test x$ac_enable_checking != x ; then
2993
2994$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
2995
6da23aaa 2996fi
eb697db5 2997if test x$ac_gc_check_stringbytes != x ; then
52dbaac8 2998
eb697db5 2999$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
91e84f96 3000
5929fbe7 3001fi
eb697db5 3002if test x$ac_gc_check_stringoverrun != x ; then
91e84f96 3003
eb697db5 3004$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
91e84f96
GM
3005
3006fi
eb697db5 3007if test x$ac_gc_check_string_free_list != x ; then
91e84f96 3008
eb697db5 3009$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
91e84f96 3010
5929fbe7 3011fi
eb697db5 3012if test x$ac_xmalloc_overrun != x ; then
a4f64981 3013
eb697db5 3014$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
91e84f96 3015
eb697db5
DN
3016fi
3017if test x$ac_gc_check_cons_list != x ; then
91e84f96 3018
eb697db5 3019$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
91e84f96 3020
eb697db5 3021fi
91e84f96 3022
d9170db5
DN
3023# Check whether --enable-use-lisp-union-type was given.
3024if test "${enable_use_lisp_union_type+set}" = set; then :
3025 enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then
3026
3027$as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h
3028
3029fi
3030fi
3031
3032
3033
eb697db5
DN
3034# Check whether --enable-profiling was given.
3035if test "${enable_profiling+set}" = set; then :
3036 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
3037fi
91e84f96 3038
eb697db5
DN
3039if test x$ac_enable_profiling != x ; then
3040 PROFILING_CFLAGS="-DPROFILING=1 -pg"
3041 PROFILING_LDFLAGS="-pg"
5929fbe7 3042else
eb697db5
DN
3043 PROFILING_CFLAGS=
3044 PROFILING_LDFLAGS=
3045fi
91e84f96 3046
e6cfa7c3
AS
3047
3048
eb697db5
DN
3049# Check whether --enable-autodepend was given.
3050if test "${enable_autodepend+set}" = set; then :
3051 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
3052else
3053 ac_enable_autodepend=yes
3054fi
52dbaac8 3055
91e84f96 3056
eb697db5
DN
3057#### Make srcdir absolute, if it isn't already. It's important to
3058#### avoid running the path through pwd unnecessarily, since pwd can
3059#### give you automounter prefixes, which can go away. We do all this
3060#### so Emacs can find its files when run uninstalled.
3061## Make sure CDPATH doesn't affect cd (in case PWD is relative).
3062unset CDPATH
3063case "${srcdir}" in
3064 /* ) ;;
3065 . )
3066 ## We may be able to use the $PWD environment variable to make this
3067 ## absolute. But sometimes PWD is inaccurate.
3068 ## Note: we used to use ${PWD} at the end instead of `pwd`,
3069 ## but that tested only for a well-formed and valid PWD,
3070 ## it did not object when PWD was well-formed and valid but just wrong.
3071 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
3072 then
3073 srcdir="$PWD"
3074 else
3075 srcdir="`(cd ${srcdir}; pwd)`"
3076 fi
3077 ;;
3078 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
91e84f96 3079esac
52dbaac8 3080
eb697db5
DN
3081#### Check if the source directory already has a configured system in it.
3082if test `pwd` != `(cd ${srcdir} && pwd)` \
3083 && test -f "${srcdir}/src/config.h" ; then
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
3085 as a build directory right now; it has been configured in its own
3086 right. To configure in another directory as well, you MUST
3087 use GNU make. If you do not have GNU make, then you must
3088 now do \`make distclean' in ${srcdir},
3089 and then run $0 again." >&5
3090$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
3091 as a build directory right now; it has been configured in its own
3092 right. To configure in another directory as well, you MUST
3093 use GNU make. If you do not have GNU make, then you must
3094 now do \`make distclean' in ${srcdir},
3095 and then run $0 again." >&2;}
bf89cb4d 3096fi
52dbaac8 3097
eb697db5
DN
3098#### Given the configuration name, set machfile and opsysfile to the
3099#### names of the m/*.h and s/*.h files we should use.
3100
3101### Canonicalize the configuration name.
3102
3103ac_aux_dir=
3104for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
036dc38d
LMI
3105 for ac_t in install-sh install.sh shtool; do
3106 if test -f "$ac_dir/$ac_t"; then
3107 ac_aux_dir=$ac_dir
3108 ac_install_sh="$ac_aux_dir/$ac_t -c"
3109 break 2
3110 fi
3111 done
91e84f96 3112done
eb697db5 3113if test -z "$ac_aux_dir"; then
036dc38d 3114 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5929fbe7 3115fi
52dbaac8 3116
eb697db5
DN
3117# These three variables are undocumented and unsupported,
3118# and are intended to be withdrawn in a future Autoconf release.
3119# They can cause serious problems if a builder's source tree is in a directory
3120# whose full name contains unusual characters.
3121ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3122ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3123ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
52dbaac8 3124
52dbaac8 3125
eb697db5
DN
3126# Make sure we can run config.sub.
3127$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
036dc38d 3128 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
52dbaac8 3129
eb697db5
DN
3130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3131$as_echo_n "checking build system type... " >&6; }
3132if test "${ac_cv_build+set}" = set; then :
91e84f96
GM
3133 $as_echo_n "(cached) " >&6
3134else
eb697db5
DN
3135 ac_build_alias=$build_alias
3136test "x$ac_build_alias" = x &&
3137 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3138test "x$ac_build_alias" = x &&
036dc38d 3139 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
eb697db5 3140ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
036dc38d 3141 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
52dbaac8 3142
15e12598 3143fi
eb697db5
DN
3144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3145$as_echo "$ac_cv_build" >&6; }
3146case $ac_cv_build in
3147*-*-*) ;;
036dc38d 3148*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
91e84f96 3149esac
eb697db5
DN
3150build=$ac_cv_build
3151ac_save_IFS=$IFS; IFS='-'
3152set x $ac_cv_build
3153shift
3154build_cpu=$1
3155build_vendor=$2
3156shift; shift
3157# Remember, the first character of IFS is used to create $*,
3158# except with old shells:
3159build_os=$*
3160IFS=$ac_save_IFS
3161case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
52dbaac8 3162
cd958eb3 3163
eb697db5
DN
3164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3165$as_echo_n "checking host system type... " >&6; }
3166if test "${ac_cv_host+set}" = set; then :
5929fbe7 3167 $as_echo_n "(cached) " >&6
91e84f96 3168else
eb697db5
DN
3169 if test "x$host_alias" = x; then
3170 ac_cv_host=$ac_cv_build
3171else
3172 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
036dc38d 3173 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
91e84f96 3174fi
6da23aaa 3175
eb697db5
DN
3176fi
3177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3178$as_echo "$ac_cv_host" >&6; }
3179case $ac_cv_host in
3180*-*-*) ;;
036dc38d 3181*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
eb697db5
DN
3182esac
3183host=$ac_cv_host
3184ac_save_IFS=$IFS; IFS='-'
3185set x $ac_cv_host
3186shift
3187host_cpu=$1
3188host_vendor=$2
3189shift; shift
3190# Remember, the first character of IFS is used to create $*,
3191# except with old shells:
3192host_os=$*
3193IFS=$ac_save_IFS
3194case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6da23aaa 3195
973a76b1 3196
eb697db5
DN
3197canonical=$host
3198configuration=${host_alias-${build_alias-$host}}
edfaf76d 3199
edfaf76d 3200
edfaf76d 3201
eb697db5
DN
3202### If you add support for a new configuration, add code to this
3203### switch statement to recognize your configuration name and select
3204### the appropriate operating system and machine description files.
6da23aaa 3205
eb697db5
DN
3206### You would hope that you could choose an m/*.h file pretty much
3207### based on the machine portion of the configuration name, and an s/*.h
3208### file based on the operating system portion. However, it turns out
3209### that each m/*.h file is pretty manufacturer-specific - for
3210### example mips.h is MIPS
3211### So we basically have to have a special case for each
3212### configuration name.
3213###
3214### As far as handling version numbers on operating systems is
3215### concerned, make sure things will fail in a fixable way. If
3216### /etc/MACHINES doesn't say anything about version numbers, be
3217### prepared to handle anything reasonably. If version numbers
3218### matter, be sure /etc/MACHINES says something about it.
6da23aaa 3219
eb697db5
DN
3220machine='' opsys='' unported=no
3221case "${canonical}" in
973a76b1 3222
eb697db5
DN
3223 ## FreeBSD ports
3224 *-*-freebsd* )
3225 opsys=freebsd
3226 case "${canonical}" in
3227 alpha*) machine=alpha ;;
3228 amd64-*|x86_64-*) machine=amdx86-64 ;;
3229 arm*) machine=arm ;;
3230 ia64-*) machine=ia64 ;;
3231 i[3456]86-*) machine=intel386 ;;
3232 powerpc-*) machine=macppc ;;
3233 sparc-*) machine=sparc ;;
3234 sparc64-*) machine=sparc ;;
3235 esac
3236 ;;
19650fd6 3237
eb697db5
DN
3238 ## FreeBSD kernel + glibc based userland
3239 *-*-kfreebsd*gnu* )
3240 opsys=gnu-kfreebsd
3241 case "${canonical}" in
3242 alpha*) machine=alpha ;;
3243 amd64-*|x86_64-*) machine=amdx86-64 ;;
3244 ia64-*) machine=ia64 ;;
3245 i[3456]86-*) machine=intel386 ;;
3246 powerpc-*) machine=macppc ;;
3247 sparc-*) machine=sparc ;;
3248 sparc64-*) machine=sparc ;;
3249 esac
3250 ;;
ca81d7a0 3251
eb697db5
DN
3252 ## NetBSD ports
3253 *-*-netbsd* )
3254 opsys=netbsd
3255 case "${canonical}" in
3256 alpha*) machine=alpha ;;
3257 x86_64-*) machine=amdx86-64 ;;
3258 arm-*) machine=arm ;;
3259 hppa-*) machine=hp800 ;;
3260 i[3456]86-*) machine=intel386 ;;
3261 m68k-*) machine=m68k ;;
3262 powerpc-*) machine=macppc ;;
3263 mips-*) machine=mips ;;
3264 mipse[bl]-*) machine=mips ;;
3265 sparc*-) machine=sparc ;;
3266 vax-*) machine=vax ;;
3267 esac
3268 ;;
973a76b1 3269
eb697db5
DN
3270 ## OpenBSD ports
3271 *-*-openbsd* )
3272 opsys=openbsd
3273 case "${canonical}" in
3274 alpha*) machine=alpha ;;
3275 x86_64-*) machine=amdx86-64 ;;
3276 arm-*) machine=arm ;;
3277 hppa-*) machine=hp800 ;;
3278 i386-*) machine=intel386 ;;
3279 powerpc-*) machine=macppc ;;
3280 sparc*) machine=sparc ;;
3281 vax-*) machine=vax ;;
3282 esac
3283 ;;
6da23aaa 3284
eb697db5
DN
3285 alpha*-*-linux-gnu* )
3286 machine=alpha opsys=gnu-linux
3287 ;;
bf89cb4d 3288
eb697db5
DN
3289 arm*-*-linux-gnu* )
3290 machine=arm opsys=gnu-linux
3291 ;;
bf89cb4d 3292
eb697db5
DN
3293 ## Apple Darwin / Mac OS X
3294 *-apple-darwin* )
3295 case "${canonical}" in
3296 i[3456]86-* ) machine=intel386 ;;
3297 powerpc-* ) machine=macppc ;;
3298 x86_64-* ) machine=amdx86-64 ;;
3299 * ) unported=yes ;;
3300 esac
3301 opsys=darwin
3302 # Define CPP as follows to make autoconf work correctly.
3303 CPP="${CC-cc} -E -no-cpp-precomp"
3304 # Use fink packages if available.
3305 if test -d /sw/include && test -d /sw/lib; then
3306 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3307 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3308 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3309 fi
3310 ;;
973a76b1 3311
eb697db5
DN
3312 ## HP 9000 series 700 and 800, running HP/UX
3313 hppa*-hp-hpux10.2* )
3314 machine=hp800 opsys=hpux10-20
3315 ;;
3316 hppa*-hp-hpux1[1-9]* )
3317 machine=hp800 opsys=hpux11
3318 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
3319 ;;
91e84f96 3320
eb697db5
DN
3321 hppa*-*-linux-gnu* )
3322 machine=hp800 opsys=gnu-linux
3323 ;;
91e84f96 3324
eb697db5
DN
3325 ## IBM machines
3326 s390-*-linux-gnu* )
3327 machine=ibms390 opsys=gnu-linux
3328 ;;
3329 s390x-*-linux-gnu* )
3330 machine=ibms390x opsys=gnu-linux
3331 ;;
3332 rs6000-ibm-aix4.[23]* )
3333 machine=ibmrs6000 opsys=aix4-2
3334 ;;
3335 powerpc-ibm-aix4.[23]* )
3336 machine=ibmrs6000 opsys=aix4-2
3337 ;;
3338 rs6000-ibm-aix[56]* )
3339 machine=ibmrs6000 opsys=aix4-2
3340 ;;
3341 powerpc-ibm-aix[56]* )
3342 machine=ibmrs6000 opsys=aix4-2
3343 ;;
91e84f96 3344
eb697db5
DN
3345 ## Macintosh PowerPC
3346 powerpc*-*-linux-gnu* )
3347 machine=macppc opsys=gnu-linux
3348 ;;
6da23aaa 3349
eb697db5
DN
3350 ## Silicon Graphics machines
3351 ## Iris 4D
3352 mips-sgi-irix6.5 )
3353 machine=iris4d opsys=irix6-5
3354 # Without defining _LANGUAGE_C, things get masked out in the headers
3355 # so that, for instance, grepping for `free' in stdlib.h fails and
3356 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3357 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
3358 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
3359 ;;
91e84f96 3360
eb697db5
DN
3361 ## Suns
3362 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3363 machine=sparc opsys=gnu-linux
3364 ;;
15e12598 3365
eb697db5
DN
3366 *-sun-solaris* \
3367 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3368 | x86_64-*-solaris2* | x86_64-*-sunos5*)
3369 case "${canonical}" in
3370 i[3456]86-*-* ) machine=intel386 ;;
3371 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
3372 sparc* ) machine=sparc ;;
3373 * ) unported=yes ;;
3374 esac
3375 case "${canonical}" in
3376 *-sunos5.6* | *-solaris2.6* )
3377 opsys=sol2-6
3378 NON_GNU_CPP=/usr/ccs/lib/cpp
3379 RANLIB="ar -ts"
3380 ;;
3381 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
3382 opsys=sol2-6
3383 emacs_check_sunpro_c=yes
3384 NON_GNU_CPP=/usr/ccs/lib/cpp
3385 ;;
3386 *-sunos5* | *-solaris* )
3387 opsys=sol2-10
3388 emacs_check_sunpro_c=yes
3389 NON_GNU_CPP=/usr/ccs/lib/cpp
3390 ;;
3391 esac
3392 ## Watch out for a compiler that we know will not work.
3393 case "${canonical}" in
3394 *-solaris* | *-sunos5* )
3395 if [ "x$CC" = x/usr/ucb/cc ]; then
3396 ## /usr/ucb/cc doesn't work;
3397 ## we should find some other compiler that does work.
3398 unset CC
3399 fi
3400 ;;
3401 *) ;;
3402 esac
3403 ;;
91e84f96 3404
eb697db5
DN
3405 ## IA-64
3406 ia64*-*-linux* )
3407 machine=ia64 opsys=gnu-linux
3408 ;;
91e84f96 3409
eb697db5
DN
3410 ## Intel 386 machines where we don't care about the manufacturer.
3411 i[3456]86-*-* )
3412 machine=intel386
3413 case "${canonical}" in
3414 *-cygwin ) opsys=cygwin ;;
3415 *-darwin* ) opsys=darwin
3416 CPP="${CC-cc} -E -no-cpp-precomp"
3417 ;;
3418 *-linux-gnu* ) opsys=gnu-linux ;;
3419 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3420 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3421 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3422 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3423 esac
3424 ;;
b936fae4 3425
eb697db5
DN
3426 ## m68k Linux-based GNU system
3427 m68k-*-linux-gnu* )
3428 machine=m68k opsys=gnu-linux
3429 ;;
bf89cb4d 3430
eb697db5
DN
3431 ## Mips Linux-based GNU system
3432 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3433 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
3434 machine=mips opsys=gnu-linux
3435 ;;
edfaf76d 3436
eb697db5
DN
3437 ## AMD x86-64 Linux-based GNU system
3438 x86_64-*-linux-gnu* )
3439 machine=amdx86-64 opsys=gnu-linux
3440 ;;
edfaf76d 3441
eb697db5
DN
3442 ## Tensilica Xtensa Linux-based GNU system
3443 xtensa*-*-linux-gnu* )
3444 machine=xtensa opsys=gnu-linux
3445 ;;
bf89cb4d 3446
eb697db5
DN
3447 ## SuperH Linux-based GNU system
3448 sh[34]*-*-linux-gnu* )
3449 machine=sh3 opsys=gnu-linux
3450 ;;
bf89cb4d 3451
eb697db5
DN
3452 * )
3453 unported=yes
3454 ;;
91e84f96 3455esac
91e84f96 3456
eb697db5
DN
3457### If the code above didn't choose an operating system, just choose
3458### an operating system based on the configuration name. You really
3459### only want to use this when you have no idea what the right
3460### operating system is; if you know what operating systems a machine
3461### runs, it's cleaner to make it explicit in the case statement
3462### above.
3463if test x"${opsys}" = x; then
3464 case "${canonical}" in
3465 *-gnu* ) opsys=gnu ;;
3466 * )
3467 unported=yes
3468 ;;
3469 esac
91e84f96
GM
3470fi
3471
91e84f96 3472
91e84f96 3473
eb697db5 3474if test $unported = yes; then
036dc38d 3475 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
eb697db5 3476Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
91e84f96
GM
3477fi
3478
eb697db5
DN
3479machfile="m/${machine}.h"
3480opsysfile="s/${opsys}.h"
91e84f96 3481
91e84f96 3482
eb697db5
DN
3483#### Choose a compiler.
3484test -n "$CC" && cc_specified=yes
3485
3486# Save the value of CFLAGS that the user specified.
3487SPECIFIED_CFLAGS="$CFLAGS"
3488
3489ac_ext=c
3490ac_cpp='$CPP $CPPFLAGS'
3491ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3492ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3493ac_compiler_gnu=$ac_cv_c_compiler_gnu
3494if test -n "$ac_tool_prefix"; then
3495 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3496set dummy ${ac_tool_prefix}gcc; ac_word=$2
3497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3498$as_echo_n "checking for $ac_word... " >&6; }
3499if test "${ac_cv_prog_CC+set}" = set; then :
91e84f96
GM
3500 $as_echo_n "(cached) " >&6
3501else
eb697db5
DN
3502 if test -n "$CC"; then
3503 ac_cv_prog_CC="$CC" # Let the user override the test.
3504else
3505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3506for as_dir in $PATH
3507do
3508 IFS=$as_save_IFS
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3512 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3514 break 2
3515 fi
3516done
3517 done
3518IFS=$as_save_IFS
91e84f96
GM
3519
3520fi
eb697db5
DN
3521fi
3522CC=$ac_cv_prog_CC
3523if test -n "$CC"; then
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3525$as_echo "$CC" >&6; }
3526else
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3528$as_echo "no" >&6; }
91e84f96
GM
3529fi
3530
91e84f96 3531
eb697db5
DN
3532fi
3533if test -z "$ac_cv_prog_CC"; then
3534 ac_ct_CC=$CC
3535 # Extract the first word of "gcc", so it can be a program name with args.
3536set dummy gcc; ac_word=$2
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3538$as_echo_n "checking for $ac_word... " >&6; }
3539if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
91e84f96
GM
3540 $as_echo_n "(cached) " >&6
3541else
eb697db5
DN
3542 if test -n "$ac_ct_CC"; then
3543 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
91e84f96 3544else
eb697db5
DN
3545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546for as_dir in $PATH
3547do
3548 IFS=$as_save_IFS
3549 test -z "$as_dir" && as_dir=.
3550 for ac_exec_ext in '' $ac_executable_extensions; do
3551 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3552 ac_cv_prog_ac_ct_CC="gcc"
3553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3554 break 2
3555 fi
3556done
3557 done
3558IFS=$as_save_IFS
91e84f96 3559
91e84f96 3560fi
91e84f96 3561fi
eb697db5
DN
3562ac_ct_CC=$ac_cv_prog_ac_ct_CC
3563if test -n "$ac_ct_CC"; then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3565$as_echo "$ac_ct_CC" >&6; }
3566else
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568$as_echo "no" >&6; }
91e84f96
GM
3569fi
3570
eb697db5
DN
3571 if test "x$ac_ct_CC" = x; then
3572 CC=""
3573 else
3574 case $cross_compiling:$ac_tool_warned in
3575yes:)
3576{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3577$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3578ac_tool_warned=yes ;;
3579esac
3580 CC=$ac_ct_CC
91e84f96 3581 fi
eb697db5
DN
3582else
3583 CC="$ac_cv_prog_CC"
91e84f96
GM
3584fi
3585
eb697db5
DN
3586if test -z "$CC"; then
3587 if test -n "$ac_tool_prefix"; then
3588 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3589set dummy ${ac_tool_prefix}cc; ac_word=$2
3590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
91e84f96 3591$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3592if test "${ac_cv_prog_CC+set}" = set; then :
91e84f96
GM
3593 $as_echo_n "(cached) " >&6
3594else
eb697db5
DN
3595 if test -n "$CC"; then
3596 ac_cv_prog_CC="$CC" # Let the user override the test.
3597else
3598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91e84f96
GM
3599for as_dir in $PATH
3600do
3601 IFS=$as_save_IFS
3602 test -z "$as_dir" && as_dir=.
eb697db5 3603 for ac_exec_ext in '' $ac_executable_extensions; do
6da23aaa 3604 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3605 ac_cv_prog_CC="${ac_tool_prefix}cc"
3606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6da23aaa
EZ
3607 break 2
3608 fi
3609done
eb697db5 3610 done
6da23aaa 3611IFS=$as_save_IFS
bf89cb4d 3612
6da23aaa 3613fi
eb697db5
DN
3614fi
3615CC=$ac_cv_prog_CC
3616if test -n "$CC"; then
3617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3618$as_echo "$CC" >&6; }
6da23aaa 3619else
eb697db5 3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6da23aaa
EZ
3621$as_echo "no" >&6; }
3622fi
bf89cb4d
GM
3623
3624
5929fbe7 3625 fi
eb697db5
DN
3626fi
3627if test -z "$CC"; then
3628 # Extract the first word of "cc", so it can be a program name with args.
3629set dummy cc; ac_word=$2
3630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3631$as_echo_n "checking for $ac_word... " >&6; }
3632if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3633 $as_echo_n "(cached) " >&6
3634else
eb697db5
DN
3635 if test -n "$CC"; then
3636 ac_cv_prog_CC="$CC" # Let the user override the test.
8c5ff6dd 3637else
eb697db5
DN
3638 ac_prog_rejected=no
3639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640for as_dir in $PATH
3641do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
3644 for ac_exec_ext in '' $ac_executable_extensions; do
3645 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3646 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3647 ac_prog_rejected=yes
3648 continue
6da23aaa 3649 fi
eb697db5
DN
3650 ac_cv_prog_CC="cc"
3651 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3652 break 2
6da23aaa 3653 fi
eb697db5
DN
3654done
3655 done
3656IFS=$as_save_IFS
0ca10bb7 3657
eb697db5
DN
3658if test $ac_prog_rejected = yes; then
3659 # We found a bogon in the path, so make sure we never use it.
3660 set dummy $ac_cv_prog_CC
3661 shift
3662 if test $# != 0; then
3663 # We chose a different compiler from the bogus one.
3664 # However, it has the same basename, so the bogon will be chosen
3665 # first if we set CC to just the basename; use the full file name.
3666 shift
3667 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6da23aaa 3668 fi
8c5ff6dd 3669fi
8c5ff6dd 3670fi
8c5ff6dd 3671fi
eb697db5
DN
3672CC=$ac_cv_prog_CC
3673if test -n "$CC"; then
3674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3675$as_echo "$CC" >&6; }
3676else
3677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3678$as_echo "no" >&6; }
8c5ff6dd 3679fi
4c343001 3680
bf89cb4d 3681
eb697db5
DN
3682fi
3683if test -z "$CC"; then
3684 if test -n "$ac_tool_prefix"; then
3685 for ac_prog in cl.exe
3686 do
3687 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3688set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3690$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3691if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3692 $as_echo_n "(cached) " >&6
4c343001 3693else
eb697db5
DN
3694 if test -n "$CC"; then
3695 ac_cv_prog_CC="$CC" # Let the user override the test.
503d2be0 3696else
eb697db5 3697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3698for as_dir in $PATH
8c5ff6dd 3699do
5929fbe7
GM
3700 IFS=$as_save_IFS
3701 test -z "$as_dir" && as_dir=.
eb697db5 3702 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3703 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3704 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3706 break 2
3707 fi
3708done
eb697db5 3709 done
5929fbe7 3710IFS=$as_save_IFS
91e84f96 3711
6da23aaa 3712fi
ba4481b5 3713fi
eb697db5
DN
3714CC=$ac_cv_prog_CC
3715if test -n "$CC"; then
3716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3717$as_echo "$CC" >&6; }
8c5ff6dd 3718else
eb697db5 3719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3720$as_echo "no" >&6; }
bf89cb4d 3721fi
c0d27fcc 3722
15e12598 3723
eb697db5
DN
3724 test -n "$CC" && break
3725 done
3726fi
3727if test -z "$CC"; then
3728 ac_ct_CC=$CC
3729 for ac_prog in cl.exe
3730do
3731 # Extract the first word of "$ac_prog", so it can be a program name with args.
3732set dummy $ac_prog; ac_word=$2
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
91e84f96 3734$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3735if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
91e84f96 3736 $as_echo_n "(cached) " >&6
bf89cb4d 3737else
eb697db5
DN
3738 if test -n "$ac_ct_CC"; then
3739 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3740else
eb697db5 3741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91e84f96
GM
3742for as_dir in $PATH
3743do
3744 IFS=$as_save_IFS
3745 test -z "$as_dir" && as_dir=.
eb697db5 3746 for ac_exec_ext in '' $ac_executable_extensions; do
91e84f96 3747 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3748 ac_cv_prog_ac_ct_CC="$ac_prog"
3749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
91e84f96
GM
3750 break 2
3751 fi
3752done
eb697db5 3753 done
91e84f96
GM
3754IFS=$as_save_IFS
3755
91e84f96 3756fi
5929fbe7 3757fi
eb697db5
DN
3758ac_ct_CC=$ac_cv_prog_ac_ct_CC
3759if test -n "$ac_ct_CC"; then
3760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3761$as_echo "$ac_ct_CC" >&6; }
91e84f96 3762else
eb697db5 3763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
91e84f96 3764$as_echo "no" >&6; }
bf89cb4d 3765fi
6da23aaa 3766
0ca10bb7 3767
eb697db5
DN
3768 test -n "$ac_ct_CC" && break
3769done
91e84f96 3770
eb697db5
DN
3771 if test "x$ac_ct_CC" = x; then
3772 CC=""
91e84f96 3773 else
eb697db5
DN
3774 case $cross_compiling:$ac_tool_warned in
3775yes:)
3776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3778ac_tool_warned=yes ;;
3779esac
3780 CC=$ac_ct_CC
91e84f96 3781 fi
8c5ff6dd 3782fi
91e84f96 3783
eb697db5 3784fi
91e84f96 3785
91e84f96 3786
eb697db5
DN
3787test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
036dc38d
LMI
3789as_fn_error "no acceptable C compiler found in \$PATH
3790See \`config.log' for more details." "$LINENO" 5; }
91e84f96 3791
eb697db5
DN
3792# Provide some information about the compiler.
3793$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3794set X $ac_compile
3795ac_compiler=$2
3796for ac_option in --version -v -V -qversion; do
3797 { { ac_try="$ac_compiler $ac_option >&5"
5929fbe7
GM
3798case "(($ac_try" in
3799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3800 *) ac_try_echo=$ac_try;;
3801esac
eb697db5
DN
3802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3803$as_echo "$ac_try_echo"; } >&5
3804 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5929fbe7 3805 ac_status=$?
eb697db5
DN
3806 if test -s conftest.err; then
3807 sed '10a\
3808... rest of stderr output deleted ...
3809 10q' conftest.err >conftest.er1
3810 cat conftest.er1 >&5
5929fbe7 3811 fi
eb697db5
DN
3812 rm -f conftest.er1 conftest.err
3813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3814 test $ac_status = 0; }
3815done
6da23aaa 3816
eb697db5 3817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 3818/* end confdefs.h. */
a4f64981 3819
a4f64981
GM
3820int
3821main ()
3822{
5929fbe7 3823
a4f64981
GM
3824 ;
3825 return 0;
3826}
15e12598 3827_ACEOF
eb697db5
DN
3828ac_clean_files_save=$ac_clean_files
3829ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3830# Try to create an executable without -o first, disregard a.out.
3831# It will help us diagnose broken compilers, and finding out an intuition
3832# of exeext.
3833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3834$as_echo_n "checking whether the C compiler works... " >&6; }
3835ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3836
3837# The possible output files:
3838ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3839
3840ac_rmfiles=
3841for ac_file in $ac_files
3842do
3843 case $ac_file in
3844 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3845 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3846 esac
3847done
3848rm -f $ac_rmfiles
3849
3850if { { ac_try="$ac_link_default"
a4f64981
GM
3851case "(($ac_try" in
3852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3853 *) ac_try_echo=$ac_try;;
3854esac
eb697db5
DN
3855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3856$as_echo "$ac_try_echo"; } >&5
3857 (eval "$ac_link_default") 2>&5
a4f64981 3858 ac_status=$?
eb697db5
DN
3859 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3860 test $ac_status = 0; }; then :
3861 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3862# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3863# in a Makefile. We should not override ac_cv_exeext if it was cached,
3864# so that the user can short-circuit this test for compilers unknown to
3865# Autoconf.
3866for ac_file in $ac_files ''
3867do
3868 test -f "$ac_file" || continue
3869 case $ac_file in
3870 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3871 ;;
3872 [ab].out )
3873 # We found the default executable, but exeext='' is most
3874 # certainly right.
3875 break;;
3876 *.* )
3877 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3878 then :; else
3879 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3880 fi
3881 # We set ac_cv_exeext here because the later test for it is not
3882 # safe: cross compilers may not add the suffix if given an `-o'
3883 # argument, so we may need to know it at that point already.
3884 # Even if this section looks crufty: it has the advantage of
3885 # actually working.
3886 break;;
3887 * )
3888 break;;
3889 esac
3890done
3891test "$ac_cv_exeext" = no && ac_cv_exeext=
a4f64981 3892
eb697db5
DN
3893else
3894 ac_file=''
15e12598 3895fi
eb697db5
DN
3896if test -z "$ac_file"; then :
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3898$as_echo "no" >&6; }
3899$as_echo "$as_me: failed program was:" >&5
3900sed 's/^/| /' conftest.$ac_ext >&5
49ebbd65 3901
eb697db5
DN
3902{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
036dc38d
LMI
3904{ as_fn_set_status 77
3905as_fn_error "C compiler cannot create executables
3906See \`config.log' for more details." "$LINENO" 5; }; }
15e12598 3907else
eb697db5
DN
3908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3909$as_echo "yes" >&6; }
15e12598 3910fi
eb697db5
DN
3911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3912$as_echo_n "checking for C compiler default output file name... " >&6; }
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3914$as_echo "$ac_file" >&6; }
3915ac_exeext=$ac_cv_exeext
e6df49e4 3916
eb697db5
DN
3917rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3918ac_clean_files=$ac_clean_files_save
3919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3920$as_echo_n "checking for suffix of executables... " >&6; }
3921if { { ac_try="$ac_link"
3922case "(($ac_try" in
3923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3924 *) ac_try_echo=$ac_try;;
3925esac
3926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3927$as_echo "$ac_try_echo"; } >&5
3928 (eval "$ac_link") 2>&5
3929 ac_status=$?
3930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3931 test $ac_status = 0; }; then :
3932 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3933# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3934# work properly (i.e., refer to `conftest.exe'), while it won't with
3935# `rm'.
3936for ac_file in conftest.exe conftest conftest.*; do
3937 test -f "$ac_file" || continue
3938 case $ac_file in
3939 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3940 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3941 break;;
3942 * ) break;;
3943 esac
3944done
3945else
3946 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
036dc38d
LMI
3948as_fn_error "cannot compute suffix of executables: cannot compile and link
3949See \`config.log' for more details." "$LINENO" 5; }
a4f64981 3950fi
eb697db5
DN
3951rm -f conftest conftest$ac_cv_exeext
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3953$as_echo "$ac_cv_exeext" >&6; }
49ebbd65 3954
eb697db5
DN
3955rm -f conftest.$ac_ext
3956EXEEXT=$ac_cv_exeext
3957ac_exeext=$EXEEXT
3958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bc3512d0 3959/* end confdefs.h. */
eb697db5 3960#include <stdio.h>
bc3512d0
CY
3961int
3962main ()
3963{
eb697db5
DN
3964FILE *f = fopen ("conftest.out", "w");
3965 return ferror (f) || fclose (f) != 0;
91e84f96 3966
bc3512d0
CY
3967 ;
3968 return 0;
3969}
3970_ACEOF
eb697db5
DN
3971ac_clean_files="$ac_clean_files conftest.out"
3972# Check that the compiler produces executables we can run. If not, either
3973# the compiler is broken, or we cross compile.
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3975$as_echo_n "checking whether we are cross compiling... " >&6; }
3976if test "$cross_compiling" != yes; then
3977 { { ac_try="$ac_link"
91e84f96
GM
3978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
eb697db5
DN
3982eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3983$as_echo "$ac_try_echo"; } >&5
3984 (eval "$ac_link") 2>&5
91e84f96 3985 ac_status=$?
eb697db5
DN
3986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3987 test $ac_status = 0; }
3988 if { ac_try='./conftest$ac_cv_exeext'
3989 { { case "(($ac_try" in
3990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3991 *) ac_try_echo=$ac_try;;
3992esac
3993eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3994$as_echo "$ac_try_echo"; } >&5
3995 (eval "$ac_try") 2>&5
3996 ac_status=$?
3997 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3998 test $ac_status = 0; }; }; then
3999 cross_compiling=no
91e84f96 4000 else
eb697db5
DN
4001 if test "$cross_compiling" = maybe; then
4002 cross_compiling=yes
4003 else
4004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
036dc38d 4006as_fn_error "cannot run C compiled programs.
eb697db5 4007If you meant to cross compile, use \`--host'.
036dc38d 4008See \`config.log' for more details." "$LINENO" 5; }
eb697db5 4009 fi
6da23aaa 4010 fi
eb697db5
DN
4011fi
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4013$as_echo "$cross_compiling" >&6; }
5929fbe7 4014
eb697db5
DN
4015rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4016ac_clean_files=$ac_clean_files_save
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4018$as_echo_n "checking for suffix of object files... " >&6; }
4019if test "${ac_cv_objext+set}" = set; then :
6da23aaa 4020 $as_echo_n "(cached) " >&6
84e70f78 4021else
eb697db5 4022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4023/* end confdefs.h. */
6da23aaa 4024
19650fd6
AS
4025int
4026main ()
4027{
91e84f96 4028
84e70f78
KR
4029 ;
4030 return 0;
4031}
4032_ACEOF
eb697db5
DN
4033rm -f conftest.o conftest.obj
4034if { { ac_try="$ac_compile"
91e84f96
GM
4035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
eb697db5
DN
4039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
4041 (eval "$ac_compile") 2>&5
91e84f96 4042 ac_status=$?
eb697db5
DN
4043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
4045 for ac_file in conftest.o conftest.obj conftest.*; do
4046 test -f "$ac_file" || continue;
4047 case $ac_file in
4048 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4049 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4050 break;;
4051 esac
4052done
84e70f78 4053else
91e84f96
GM
4054 $as_echo "$as_me: failed program was:" >&5
4055sed 's/^/| /' conftest.$ac_ext >&5
4056
eb697db5
DN
4057{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4058$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
036dc38d
LMI
4059as_fn_error "cannot compute suffix of object files: cannot compile
4060See \`config.log' for more details." "$LINENO" 5; }
bf89cb4d 4061fi
eb697db5 4062rm -f conftest.$ac_cv_objext conftest.$ac_ext
6da23aaa 4063fi
eb697db5
DN
4064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4065$as_echo "$ac_cv_objext" >&6; }
4066OBJEXT=$ac_cv_objext
4067ac_objext=$OBJEXT
4068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4069$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4070if test "${ac_cv_c_compiler_gnu+set}" = set; then :
e9a63f04 4071 $as_echo_n "(cached) " >&6
84e70f78 4072else
eb697db5 4073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4074/* end confdefs.h. */
8c5ff6dd 4075
84e70f78
KR
4076int
4077main ()
4078{
eb697db5
DN
4079#ifndef __GNUC__
4080 choke me
91e84f96
GM
4081#endif
4082
84e70f78
KR
4083 ;
4084 return 0;
4085}
4086_ACEOF
eb697db5
DN
4087if ac_fn_c_try_compile "$LINENO"; then :
4088 ac_compiler_gnu=yes
91e84f96 4089else
eb697db5 4090 ac_compiler_gnu=no
bf89cb4d 4091fi
eb697db5
DN
4092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4093ac_cv_c_compiler_gnu=$ac_compiler_gnu
0ca10bb7 4094
91e84f96 4095fi
eb697db5
DN
4096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4097$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4098if test $ac_compiler_gnu = yes; then
4099 GCC=yes
4100else
4101 GCC=
4102fi
4103ac_test_CFLAGS=${CFLAGS+set}
4104ac_save_CFLAGS=$CFLAGS
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4106$as_echo_n "checking whether $CC accepts -g... " >&6; }
4107if test "${ac_cv_prog_cc_g+set}" = set; then :
5929fbe7 4108 $as_echo_n "(cached) " >&6
08b47d3d 4109else
eb697db5
DN
4110 ac_save_c_werror_flag=$ac_c_werror_flag
4111 ac_c_werror_flag=yes
4112 ac_cv_prog_cc_g=no
4113 CFLAGS="-g"
4114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0c309b80 4115/* end confdefs.h. */
0ca10bb7 4116
9452ded1
DN
4117int
4118main ()
4119{
0ca10bb7 4120
5929fbe7 4121 ;
9452ded1
DN
4122 return 0;
4123}
91e84f96 4124_ACEOF
eb697db5
DN
4125if ac_fn_c_try_compile "$LINENO"; then :
4126 ac_cv_prog_cc_g=yes
8c5ff6dd 4127else
eb697db5
DN
4128 CFLAGS=""
4129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4130/* end confdefs.h. */
bf89cb4d 4131
eb697db5
DN
4132int
4133main ()
4134{
bf89cb4d 4135
eb697db5
DN
4136 ;
4137 return 0;
4138}
a4f64981 4139_ACEOF
eb697db5 4140if ac_fn_c_try_compile "$LINENO"; then :
6da23aaa 4141
84e70f78 4142else
eb697db5
DN
4143 ac_c_werror_flag=$ac_save_c_werror_flag
4144 CFLAGS="-g"
4145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 4146/* end confdefs.h. */
bf89cb4d 4147
0ca10bb7
RC
4148int
4149main ()
4150{
e6df49e4 4151
0ca10bb7
RC
4152 ;
4153 return 0;
4154}
19650fd6 4155_ACEOF
eb697db5
DN
4156if ac_fn_c_try_compile "$LINENO"; then :
4157 ac_cv_prog_cc_g=yes
4158fi
4159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4160fi
4161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4162fi
4163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4164 ac_c_werror_flag=$ac_save_c_werror_flag
4165fi
4166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4167$as_echo "$ac_cv_prog_cc_g" >&6; }
4168if test "$ac_test_CFLAGS" = set; then
4169 CFLAGS=$ac_save_CFLAGS
4170elif test $ac_cv_prog_cc_g = yes; then
4171 if test "$GCC" = yes; then
4172 CFLAGS="-g -O2"
4173 else
4174 CFLAGS="-g"
4175 fi
0ca10bb7 4176else
eb697db5
DN
4177 if test "$GCC" = yes; then
4178 CFLAGS="-O2"
4179 else
4180 CFLAGS=
5929fbe7 4181 fi
6da23aaa 4182fi
eb697db5
DN
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4184$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4185if test "${ac_cv_prog_cc_c89+set}" = set; then :
5929fbe7
GM
4186 $as_echo_n "(cached) " >&6
4187else
eb697db5
DN
4188 ac_cv_prog_cc_c89=no
4189ac_save_CC=$CC
4190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4191/* end confdefs.h. */
eb697db5
DN
4192#include <stdarg.h>
4193#include <stdio.h>
4194#include <sys/types.h>
4195#include <sys/stat.h>
4196/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4197struct buf { int x; };
4198FILE * (*rcsopen) (struct buf *, struct stat *, int);
4199static char *e (p, i)
4200 char **p;
4201 int i;
5929fbe7 4202{
eb697db5
DN
4203 return p[i];
4204}
4205static char *f (char * (*g) (char **, int), char **p, ...)
4206{
4207 char *s;
4208 va_list v;
4209 va_start (v,p);
4210 s = g (p, va_arg (v,int));
4211 va_end (v);
4212 return s;
5929fbe7 4213}
91e84f96 4214
eb697db5
DN
4215/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4216 function prototypes and stuff, but not '\xHH' hex character constants.
4217 These don't provoke an error unfortunately, instead are silently treated
4218 as 'x'. The following induces an error, until -std is added to get
4219 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4220 array size at least. It's necessary to write '\x00'==0 to get something
4221 that's true only with -std. */
4222int osf4_cc_array ['\x00' == 0 ? 1 : -1];
0ca10bb7 4223
eb697db5
DN
4224/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4225 inside strings and character constants. */
4226#define FOO(x) 'x'
4227int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
49ebbd65 4228
eb697db5
DN
4229int test (int i, double x);
4230struct s1 {int (*f) (int a);};
4231struct s2 {int (*f) (double a);};
4232int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4233int argc;
4234char **argv;
5929fbe7
GM
4235int
4236main ()
4237{
eb697db5 4238return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5929fbe7
GM
4239 ;
4240 return 0;
4241}
4242_ACEOF
eb697db5
DN
4243for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4244 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4245do
4246 CC="$ac_save_CC $ac_arg"
4247 if ac_fn_c_try_compile "$LINENO"; then :
4248 ac_cv_prog_cc_c89=$ac_arg
4249fi
4250rm -f core conftest.err conftest.$ac_objext
4251 test "x$ac_cv_prog_cc_c89" != "xno" && break
4252done
4253rm -f conftest.$ac_ext
4254CC=$ac_save_CC
0ca10bb7 4255
91e84f96 4256fi
eb697db5
DN
4257# AC_CACHE_VAL
4258case "x$ac_cv_prog_cc_c89" in
4259 x)
4260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4261$as_echo "none needed" >&6; } ;;
4262 xno)
4263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4264$as_echo "unsupported" >&6; } ;;
4265 *)
4266 CC="$CC $ac_cv_prog_cc_c89"
4267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4268$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4269esac
4270if test "x$ac_cv_prog_cc_c89" != xno; then :
6da23aaa 4271
91e84f96 4272fi
6da23aaa 4273
eb697db5
DN
4274ac_ext=c
4275ac_cpp='$CPP $CPPFLAGS'
4276ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4277ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4278ac_compiler_gnu=$ac_cv_c_compiler_gnu
a5edbe4a 4279
a5edbe4a 4280
eb697db5
DN
4281# On Suns, sometimes $CPP names a directory.
4282if test -n "$CPP" && test -d "$CPP"; then
4283 CPP=
5929fbe7 4284fi
a5edbe4a 4285
eb697db5
DN
4286## If not using gcc, and on Solaris, and no CPP specified, see if
4287## using a Sun compiler, which needs -Xs to prevent whitespace.
4288if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4289 test x"$CPP" = x; then
4290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
4291$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
6da23aaa 4292
eb697db5 4293if test "${emacs_cv_sunpro_c+set}" = set; then :
0ca10bb7
RC
4294 $as_echo_n "(cached) " >&6
4295else
eb697db5 4296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4297/* end confdefs.h. */
bf89cb4d 4298
84e70f78
KR
4299int
4300main ()
4301{
eb697db5
DN
4302#ifndef __SUNPRO_C
4303fail;
4304#endif
4305
84e70f78
KR
4306 ;
4307 return 0;
4308}
4309_ACEOF
eb697db5
DN
4310if ac_fn_c_try_link "$LINENO"; then :
4311 emacs_cv_sunpro_c=yes
84e70f78 4312else
eb697db5 4313 emacs_cv_sunpro_c=no
a4f64981 4314fi
eb697db5
DN
4315rm -f core conftest.err conftest.$ac_objext \
4316 conftest$ac_exeext conftest.$ac_ext
5929fbe7 4317fi
a4f64981 4318
eb697db5
DN
4319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
4320$as_echo "$emacs_cv_sunpro_c" >&6; }
91e84f96 4321
eb697db5
DN
4322 if test x"$emacs_cv_sunpro_c" = xyes; then
4323 NON_GNU_CPP="$CC -E -Xs"
4324 fi
84e70f78 4325fi
91e84f96 4326
eb697db5
DN
4327#### Some systems specify a CPP to use unless we are using GCC.
4328#### Now that we know whether we are using GCC, we can decide whether
4329#### to use that one.
4330if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4331then
4332 CPP="$NON_GNU_CPP"
84e70f78 4333fi
6da23aaa 4334
eb697db5
DN
4335#### Some systems specify a CC to use unless we are using GCC.
4336#### Now that we know whether we are using GCC, we can decide whether
4337#### to use that one.
4338if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4339 test x$cc_specified != xyes
4340then
4341 CC="$NON_GNU_CC"
4342fi
6da23aaa 4343
9164c0e4
AS
4344if test x$GCC = xyes; then
4345 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
4346else
4347 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
6da23aaa 4348fi
bf89cb4d 4349
eb697db5
DN
4350ac_ext=c
4351ac_cpp='$CPP $CPPFLAGS'
4352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4354ac_compiler_gnu=$ac_cv_c_compiler_gnu
4355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4356$as_echo_n "checking how to run the C preprocessor... " >&6; }
4357# On Suns, sometimes $CPP names a directory.
4358if test -n "$CPP" && test -d "$CPP"; then
4359 CPP=
4360fi
4361if test -z "$CPP"; then
4362 if test "${ac_cv_prog_CPP+set}" = set; then :
e9a63f04 4363 $as_echo_n "(cached) " >&6
84e70f78 4364else
eb697db5
DN
4365 # Double quotes because CPP needs to be expanded
4366 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4367 do
4368 ac_preproc_ok=false
4369for ac_c_preproc_warn_flag in '' yes
4370do
4371 # Use a header file that comes with gcc, so configuring glibc
4372 # with a fresh cross-compiler works.
4373 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4374 # <limits.h> exists even on freestanding compilers.
4375 # On the NeXT, cc -E runs the code through the compiler's parser,
4376 # not just through cpp. "Syntax error" is here to catch this case.
4377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 4378/* end confdefs.h. */
eb697db5
DN
4379#ifdef __STDC__
4380# include <limits.h>
4381#else
4382# include <assert.h>
4383#endif
4384 Syntax error
49ebbd65 4385_ACEOF
eb697db5
DN
4386if ac_fn_c_try_cpp "$LINENO"; then :
4387
4388else
4389 # Broken: fails on valid input.
4390continue
4391fi
375a0f65 4392rm -f conftest.err conftest.$ac_ext
5929fbe7 4393
eb697db5
DN
4394 # OK, works on sane cases. Now check whether nonexistent headers
4395 # can be detected and how.
4396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4397/* end confdefs.h. */
4398#include <ac_nonexistent.h>
91e84f96 4399_ACEOF
eb697db5
DN
4400if ac_fn_c_try_cpp "$LINENO"; then :
4401 # Broken: success on invalid input.
4402continue
8c5ff6dd 4403else
eb697db5
DN
4404 # Passes both tests.
4405ac_preproc_ok=:
4406break
8c5ff6dd 4407fi
375a0f65 4408rm -f conftest.err conftest.$ac_ext
5929fbe7 4409
eb697db5
DN
4410done
4411# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
375a0f65 4412rm -f conftest.err conftest.$ac_ext
eb697db5
DN
4413if $ac_preproc_ok; then :
4414 break
4415fi
5929fbe7 4416
eb697db5
DN
4417 done
4418 ac_cv_prog_CPP=$CPP
5929fbe7 4419
eb697db5
DN
4420fi
4421 CPP=$ac_cv_prog_CPP
4422else
4423 ac_cv_prog_CPP=$CPP
4424fi
4425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4426$as_echo "$CPP" >&6; }
4427ac_preproc_ok=false
4428for ac_c_preproc_warn_flag in '' yes
4429do
4430 # Use a header file that comes with gcc, so configuring glibc
4431 # with a fresh cross-compiler works.
4432 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4433 # <limits.h> exists even on freestanding compilers.
4434 # On the NeXT, cc -E runs the code through the compiler's parser,
4435 # not just through cpp. "Syntax error" is here to catch this case.
4436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4437/* end confdefs.h. */
eb697db5
DN
4438#ifdef __STDC__
4439# include <limits.h>
91e84f96 4440#else
eb697db5 4441# include <assert.h>
91e84f96 4442#endif
eb697db5 4443 Syntax error
84e70f78 4444_ACEOF
eb697db5 4445if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4446
eb697db5
DN
4447else
4448 # Broken: fails on valid input.
4449continue
8c5ff6dd 4450fi
375a0f65 4451rm -f conftest.err conftest.$ac_ext
8c5ff6dd 4452
eb697db5
DN
4453 # OK, works on sane cases. Now check whether nonexistent headers
4454 # can be detected and how.
4455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 4456/* end confdefs.h. */
eb697db5 4457#include <ac_nonexistent.h>
8c5ff6dd 4458_ACEOF
eb697db5
DN
4459if ac_fn_c_try_cpp "$LINENO"; then :
4460 # Broken: success on invalid input.
4461continue
a5edbe4a 4462else
eb697db5
DN
4463 # Passes both tests.
4464ac_preproc_ok=:
4465break
4466fi
375a0f65 4467rm -f conftest.err conftest.$ac_ext
e6df49e4 4468
eb697db5
DN
4469done
4470# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
375a0f65 4471rm -f conftest.err conftest.$ac_ext
eb697db5 4472if $ac_preproc_ok; then :
cd03c74a 4473
eb697db5
DN
4474else
4475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
036dc38d
LMI
4477as_fn_error "C preprocessor \"$CPP\" fails sanity check
4478See \`config.log' for more details." "$LINENO" 5; }
a4f64981 4479fi
e6df49e4 4480
eb697db5
DN
4481ac_ext=c
4482ac_cpp='$CPP $CPPFLAGS'
4483ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4484ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4485ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 4486
a5edbe4a 4487
eb697db5
DN
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4489$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4490if test "${ac_cv_path_GREP+set}" = set; then :
4491 $as_echo_n "(cached) " >&6
4492else
4493 if test -z "$GREP"; then
4494 ac_path_GREP_found=false
4495 # Loop through the user's path and test for each of PROGNAME-LIST
4496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4498do
4499 IFS=$as_save_IFS
4500 test -z "$as_dir" && as_dir=.
4501 for ac_prog in grep ggrep; do
4502 for ac_exec_ext in '' $ac_executable_extensions; do
4503 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4504 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4505# Check for GNU ac_path_GREP and select it if it is found.
4506 # Check for GNU $ac_path_GREP
4507case `"$ac_path_GREP" --version 2>&1` in
4508*GNU*)
4509 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4510*)
4511 ac_count=0
4512 $as_echo_n 0123456789 >"conftest.in"
4513 while :
4514 do
4515 cat "conftest.in" "conftest.in" >"conftest.tmp"
4516 mv "conftest.tmp" "conftest.in"
4517 cp "conftest.in" "conftest.nl"
4518 $as_echo 'GREP' >> "conftest.nl"
4519 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4520 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4521 as_fn_arith $ac_count + 1 && ac_count=$as_val
4522 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4523 # Best one so far, save it but keep looking for a better one
4524 ac_cv_path_GREP="$ac_path_GREP"
4525 ac_path_GREP_max=$ac_count
4526 fi
4527 # 10*(2^10) chars as input seems more than enough
4528 test $ac_count -gt 10 && break
4529 done
4530 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
91e84f96 4531esac
6da23aaa 4532
eb697db5
DN
4533 $ac_path_GREP_found && break 3
4534 done
4535 done
4536 done
4537IFS=$as_save_IFS
4538 if test -z "$ac_cv_path_GREP"; then
036dc38d 4539 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5929fbe7 4540 fi
eb697db5
DN
4541else
4542 ac_cv_path_GREP=$GREP
6da23aaa
EZ
4543fi
4544
6da23aaa 4545fi
eb697db5
DN
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4547$as_echo "$ac_cv_path_GREP" >&6; }
4548 GREP="$ac_cv_path_GREP"
15e12598 4549
8c5ff6dd 4550
eb697db5
DN
4551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4552$as_echo_n "checking for egrep... " >&6; }
4553if test "${ac_cv_path_EGREP+set}" = set; then :
6da23aaa
EZ
4554 $as_echo_n "(cached) " >&6
4555else
eb697db5
DN
4556 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4557 then ac_cv_path_EGREP="$GREP -E"
4558 else
4559 if test -z "$EGREP"; then
4560 ac_path_EGREP_found=false
4561 # Loop through the user's path and test for each of PROGNAME-LIST
8c5ff6dd 4562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 4563for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8c5ff6dd
KR
4564do
4565 IFS=$as_save_IFS
4566 test -z "$as_dir" && as_dir=.
eb697db5
DN
4567 for ac_prog in egrep; do
4568 for ac_exec_ext in '' $ac_executable_extensions; do
4569 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4570 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4571# Check for GNU ac_path_EGREP and select it if it is found.
4572 # Check for GNU $ac_path_EGREP
4573case `"$ac_path_EGREP" --version 2>&1` in
4574*GNU*)
4575 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4576*)
4577 ac_count=0
4578 $as_echo_n 0123456789 >"conftest.in"
4579 while :
4580 do
4581 cat "conftest.in" "conftest.in" >"conftest.tmp"
4582 mv "conftest.tmp" "conftest.in"
4583 cp "conftest.in" "conftest.nl"
4584 $as_echo 'EGREP' >> "conftest.nl"
4585 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4586 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4587 as_fn_arith $ac_count + 1 && ac_count=$as_val
4588 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4589 # Best one so far, save it but keep looking for a better one
4590 ac_cv_path_EGREP="$ac_path_EGREP"
4591 ac_path_EGREP_max=$ac_count
4592 fi
4593 # 10*(2^10) chars as input seems more than enough
4594 test $ac_count -gt 10 && break
4595 done
4596 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
91e84f96 4597esac
91e84f96 4598
eb697db5
DN
4599 $ac_path_EGREP_found && break 3
4600 done
4601 done
4602 done
5929fbe7 4603IFS=$as_save_IFS
eb697db5 4604 if test -z "$ac_cv_path_EGREP"; then
036dc38d 4605 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
eb697db5
DN
4606 fi
4607else
4608 ac_cv_path_EGREP=$EGREP
84e70f78 4609fi
91e84f96 4610
eb697db5 4611 fi
bf89cb4d 4612fi
eb697db5
DN
4613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4614$as_echo "$ac_cv_path_EGREP" >&6; }
4615 EGREP="$ac_cv_path_EGREP"
84e70f78 4616
eb697db5
DN
4617
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4619$as_echo_n "checking for ANSI C header files... " >&6; }
4620if test "${ac_cv_header_stdc+set}" = set; then :
0ca10bb7
RC
4621 $as_echo_n "(cached) " >&6
4622else
eb697db5 4623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 4624/* end confdefs.h. */
eb697db5
DN
4625#include <stdlib.h>
4626#include <stdarg.h>
4627#include <string.h>
4628#include <float.h>
4629
0ca10bb7
RC
4630int
4631main ()
4632{
eb697db5 4633
bf89cb4d
GM
4634 ;
4635 return 0;
0ca10bb7
RC
4636}
4637_ACEOF
eb697db5
DN
4638if ac_fn_c_try_compile "$LINENO"; then :
4639 ac_cv_header_stdc=yes
0ca10bb7 4640else
eb697db5 4641 ac_cv_header_stdc=no
0ca10bb7 4642fi
91e84f96 4643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bc3512d0 4644
eb697db5
DN
4645if test $ac_cv_header_stdc = yes; then
4646 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4648/* end confdefs.h. */
4649#include <string.h>
91e84f96 4650
503d2be0 4651_ACEOF
eb697db5
DN
4652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4653 $EGREP "memchr" >/dev/null 2>&1; then :
6da23aaa 4654
eb697db5
DN
4655else
4656 ac_cv_header_stdc=no
4657fi
4658rm -f conftest*
a21616bd 4659
a21616bd
KR
4660fi
4661
eb697db5
DN
4662if test $ac_cv_header_stdc = yes; then
4663 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4665/* end confdefs.h. */
eb697db5 4666#include <stdlib.h>
6da23aaa 4667
91e84f96 4668_ACEOF
eb697db5
DN
4669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4670 $EGREP "free" >/dev/null 2>&1; then :
6da23aaa
EZ
4671
4672else
eb697db5 4673 ac_cv_header_stdc=no
91e84f96 4674fi
eb697db5 4675rm -f conftest*
a21616bd 4676
a21616bd
KR
4677fi
4678
eb697db5
DN
4679if test $ac_cv_header_stdc = yes; then
4680 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4681 if test "$cross_compiling" = yes; then :
4682 :
4683else
4684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4685/* end confdefs.h. */
eb697db5
DN
4686#include <ctype.h>
4687#include <stdlib.h>
4688#if ((' ' & 0x0FF) == 0x020)
4689# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4690# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4691#else
4692# define ISLOWER(c) \
4693 (('a' <= (c) && (c) <= 'i') \
4694 || ('j' <= (c) && (c) <= 'r') \
4695 || ('s' <= (c) && (c) <= 'z'))
4696# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4697#endif
bf89cb4d 4698
eb697db5 4699#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
4700int
4701main ()
4702{
eb697db5
DN
4703 int i;
4704 for (i = 0; i < 256; i++)
4705 if (XOR (islower (i), ISLOWER (i))
4706 || toupper (i) != TOUPPER (i))
4707 return 2;
91e84f96 4708 return 0;
503d2be0
AS
4709}
4710_ACEOF
eb697db5 4711if ac_fn_c_try_run "$LINENO"; then :
91e84f96 4712
eb697db5
DN
4713else
4714 ac_cv_header_stdc=no
4715fi
4716rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4717 conftest.$ac_objext conftest.beam conftest.$ac_ext
4718fi
ca81d7a0 4719
503d2be0 4720fi
eb697db5
DN
4721fi
4722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4723$as_echo "$ac_cv_header_stdc" >&6; }
4724if test $ac_cv_header_stdc = yes; then
a21616bd 4725
eb697db5 4726$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a21616bd 4727
eb697db5 4728fi
6da23aaa 4729
eb697db5
DN
4730# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4731for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4732 inttypes.h stdint.h unistd.h
4733do :
4734 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4735ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4736"
036dc38d
LMI
4737eval as_val=\$$as_ac_Header
4738 if test "x$as_val" = x""yes; then :
eb697db5
DN
4739 cat >>confdefs.h <<_ACEOF
4740#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
91e84f96 4741_ACEOF
a21616bd 4742
6da23aaa
EZ
4743fi
4744
5929fbe7 4745done
91e84f96 4746
91e84f96 4747
c0d27fcc 4748
eb697db5
DN
4749 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4750if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4751 MINIX=yes
91e84f96 4752else
eb697db5 4753 MINIX=
0ca10bb7 4754fi
6da23aaa 4755
0ca10bb7 4756
eb697db5 4757 if test "$MINIX" = yes; then
6da23aaa 4758
eb697db5 4759$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6da23aaa 4760
6da23aaa 4761
eb697db5 4762$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
0ca10bb7 4763
6da23aaa 4764
eb697db5 4765$as_echo "#define _MINIX 1" >>confdefs.h
6da23aaa 4766
91e84f96 4767 fi
6da23aaa 4768
91e84f96 4769
eb697db5
DN
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4771$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4772if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6da23aaa
EZ
4773 $as_echo_n "(cached) " >&6
4774else
eb697db5 4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4776/* end confdefs.h. */
6da23aaa 4777
eb697db5
DN
4778# define __EXTENSIONS__ 1
4779 $ac_includes_default
5929fbe7
GM
4780int
4781main ()
4782{
eb697db5 4783
5929fbe7
GM
4784 ;
4785 return 0;
4786}
4787_ACEOF
eb697db5
DN
4788if ac_fn_c_try_compile "$LINENO"; then :
4789 ac_cv_safe_to_define___extensions__=yes
6da23aaa 4790else
eb697db5 4791 ac_cv_safe_to_define___extensions__=no
6da23aaa 4792fi
eb697db5 4793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9452ded1 4794fi
eb697db5
DN
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4796$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4797 test $ac_cv_safe_to_define___extensions__ = yes &&
4798 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6da23aaa 4799
eb697db5 4800 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6da23aaa 4801
eb697db5 4802 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
0ca10bb7 4803
eb697db5 4804 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6da23aaa 4805
eb697db5 4806 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6da23aaa 4807
91e84f96
GM
4808
4809
eb697db5
DN
4810### Use -Wno-pointer-sign if the compiler supports it
4811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
4812$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
4813SAVE_CFLAGS="$CFLAGS"
4814CFLAGS="$CFLAGS -Wno-pointer-sign"
4815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4816/* end confdefs.h. */
91e84f96 4817
eb697db5
DN
4818int
4819main ()
4820{
91e84f96 4821
eb697db5
DN
4822 ;
4823 return 0;
4824}
91e84f96 4825_ACEOF
eb697db5
DN
4826if ac_fn_c_try_compile "$LINENO"; then :
4827 has_option=yes
5929fbe7 4828else
eb697db5 4829 has_option=no
cd03c74a 4830fi
eb697db5
DN
4831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4832if test $has_option = yes; then
4833 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
5929fbe7 4834fi
eb697db5
DN
4835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4836$as_echo "$has_option" >&6; }
4837CFLAGS="$SAVE_CFLAGS"
4838unset has_option
4839unset SAVE_CFLAGS
4840
4841### Use -Wdeclaration-after-statement if the compiler supports it
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
4843$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4844SAVE_CFLAGS="$CFLAGS"
4845CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4847/* end confdefs.h. */
91e84f96 4848
91e84f96
GM
4849int
4850main ()
4851{
eb697db5 4852
91e84f96
GM
4853 ;
4854 return 0;
4855}
6da23aaa 4856_ACEOF
eb697db5
DN
4857if ac_fn_c_try_compile "$LINENO"; then :
4858 has_option=yes
91e84f96 4859else
eb697db5 4860 has_option=no
91e84f96 4861fi
eb697db5
DN
4862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4863if test $has_option = yes; then
4864 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
91e84f96 4865fi
eb697db5
DN
4866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4867$as_echo "$has_option" >&6; }
4868CFLAGS="$SAVE_CFLAGS"
4869unset has_option
4870unset SAVE_CFLAGS
6da23aaa 4871
45871610
DN
4872### Use -Wold-style-definition if the compiler supports it
4873# This can be removed when conversion to standard C is finished.
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5
4875$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; }
4876SAVE_CFLAGS="$CFLAGS"
4877CFLAGS="$CFLAGS -Wold-style-definition"
4878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4879/* end confdefs.h. */
4880
4881int
4882main ()
4883{
4884
4885 ;
4886 return 0;
4887}
4888_ACEOF
4889if ac_fn_c_try_compile "$LINENO"; then :
4890 has_option=yes
4891else
4892 has_option=no
4893fi
4894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4895if test $has_option = yes; then
4896 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
4897fi
4898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4899$as_echo "$has_option" >&6; }
4900CFLAGS="$SAVE_CFLAGS"
4901unset has_option
4902unset SAVE_CFLAGS
4903
7908fb60
J
4904### Use -Wimplicit-function-declaration if the compiler supports it
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5
4906$as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; }
4907SAVE_CFLAGS="$CFLAGS"
4908CFLAGS="$CFLAGS -Wimplicit-function-declaration"
4909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4910/* end confdefs.h. */
4911
4912int
4913main ()
4914{
4915
4916 ;
4917 return 0;
4918}
4919_ACEOF
4920if ac_fn_c_try_compile "$LINENO"; then :
4921 has_option=yes
4922else
4923 has_option=no
4924fi
4925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4926if test $has_option = yes; then
4927 C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH"
4928fi
4929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4930$as_echo "$has_option" >&6; }
4931CFLAGS="$SAVE_CFLAGS"
4932unset has_option
4933unset SAVE_CFLAGS
4934
4935
45871610 4936
e6cfa7c3 4937
eb697db5 4938#### Some other nice autoconf tests.
e6df49e4 4939
eb697db5
DN
4940ac_ext=c
4941ac_cpp='$CPP $CPPFLAGS'
4942ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4943ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4944ac_compiler_gnu=$ac_cv_c_compiler_gnu
4945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4946$as_echo_n "checking how to run the C preprocessor... " >&6; }
4947# On Suns, sometimes $CPP names a directory.
4948if test -n "$CPP" && test -d "$CPP"; then
4949 CPP=
91e84f96 4950fi
eb697db5
DN
4951if test -z "$CPP"; then
4952 if test "${ac_cv_prog_CPP+set}" = set; then :
4953 $as_echo_n "(cached) " >&6
91e84f96 4954else
eb697db5
DN
4955 # Double quotes because CPP needs to be expanded
4956 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4957 do
4958 ac_preproc_ok=false
4959for ac_c_preproc_warn_flag in '' yes
4960do
4961 # Use a header file that comes with gcc, so configuring glibc
4962 # with a fresh cross-compiler works.
4963 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4964 # <limits.h> exists even on freestanding compilers.
4965 # On the NeXT, cc -E runs the code through the compiler's parser,
4966 # not just through cpp. "Syntax error" is here to catch this case.
4967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4968/* end confdefs.h. */
4969#ifdef __STDC__
4970# include <limits.h>
4971#else
4972# include <assert.h>
4973#endif
4974 Syntax error
91e84f96 4975_ACEOF
eb697db5 4976if ac_fn_c_try_cpp "$LINENO"; then :
15e12598 4977
eb697db5
DN
4978else
4979 # Broken: fails on valid input.
4980continue
8c5ff6dd 4981fi
375a0f65 4982rm -f conftest.err conftest.$ac_ext
eb697db5
DN
4983
4984 # OK, works on sane cases. Now check whether nonexistent headers
4985 # can be detected and how.
4986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 4987/* end confdefs.h. */
eb697db5 4988#include <ac_nonexistent.h>
6da23aaa 4989_ACEOF
eb697db5
DN
4990if ac_fn_c_try_cpp "$LINENO"; then :
4991 # Broken: success on invalid input.
4992continue
91e84f96 4993else
eb697db5
DN
4994 # Passes both tests.
4995ac_preproc_ok=:
4996break
a4f64981 4997fi
375a0f65 4998rm -f conftest.err conftest.$ac_ext
0ca10bb7 4999
eb697db5
DN
5000done
5001# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
375a0f65 5002rm -f conftest.err conftest.$ac_ext
eb697db5
DN
5003if $ac_preproc_ok; then :
5004 break
bf89cb4d 5005fi
0ca10bb7 5006
eb697db5
DN
5007 done
5008 ac_cv_prog_CPP=$CPP
91e84f96 5009
eb697db5
DN
5010fi
5011 CPP=$ac_cv_prog_CPP
5012else
5013 ac_cv_prog_CPP=$CPP
5014fi
5015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5016$as_echo "$CPP" >&6; }
5017ac_preproc_ok=false
5018for ac_c_preproc_warn_flag in '' yes
5019do
5020 # Use a header file that comes with gcc, so configuring glibc
5021 # with a fresh cross-compiler works.
5022 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5023 # <limits.h> exists even on freestanding compilers.
5024 # On the NeXT, cc -E runs the code through the compiler's parser,
5025 # not just through cpp. "Syntax error" is here to catch this case.
5026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 5027/* end confdefs.h. */
eb697db5
DN
5028#ifdef __STDC__
5029# include <limits.h>
5030#else
5031# include <assert.h>
5032#endif
5033 Syntax error
91e84f96 5034_ACEOF
eb697db5 5035if ac_fn_c_try_cpp "$LINENO"; then :
6da23aaa 5036
eb697db5
DN
5037else
5038 # Broken: fails on valid input.
5039continue
91e84f96 5040fi
375a0f65 5041rm -f conftest.err conftest.$ac_ext
6da23aaa 5042
eb697db5
DN
5043 # OK, works on sane cases. Now check whether nonexistent headers
5044 # can be detected and how.
5045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5046/* end confdefs.h. */
5047#include <ac_nonexistent.h>
5929fbe7 5048_ACEOF
eb697db5
DN
5049if ac_fn_c_try_cpp "$LINENO"; then :
5050 # Broken: success on invalid input.
5051continue
5052else
5053 # Passes both tests.
5054ac_preproc_ok=:
5055break
5056fi
375a0f65 5057rm -f conftest.err conftest.$ac_ext
6da23aaa 5058
eb697db5
DN
5059done
5060# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
375a0f65 5061rm -f conftest.err conftest.$ac_ext
eb697db5 5062if $ac_preproc_ok; then :
6da23aaa 5063
91e84f96 5064else
eb697db5
DN
5065 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5066$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
036dc38d
LMI
5067as_fn_error "C preprocessor \"$CPP\" fails sanity check
5068See \`config.log' for more details." "$LINENO" 5; }
91e84f96 5069fi
6da23aaa 5070
eb697db5
DN
5071ac_ext=c
5072ac_cpp='$CPP $CPPFLAGS'
5073ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5074ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5075ac_compiler_gnu=$ac_cv_c_compiler_gnu
5076
5077# Find a good install program. We prefer a C program (faster),
5078# so one script is as good as another. But avoid the broken or
5079# incompatible versions:
5080# SysV /etc/install, /usr/sbin/install
5081# SunOS /usr/etc/install
5082# IRIX /sbin/install
5083# AIX /bin/install
5084# AmigaOS /C/install, which installs bootblocks on floppy discs
5085# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5086# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5087# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5088# OS/2's system install, which has a completely different semantic
5089# ./install, which can be erroneously created by make from ./install.sh.
5090# Reject install programs that cannot install multiple files.
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5092$as_echo_n "checking for a BSD-compatible install... " >&6; }
5093if test -z "$INSTALL"; then
5094if test "${ac_cv_path_install+set}" = set; then :
91e84f96
GM
5095 $as_echo_n "(cached) " >&6
5096else
eb697db5
DN
5097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100 IFS=$as_save_IFS
5101 test -z "$as_dir" && as_dir=.
5102 # Account for people who put trailing slashes in PATH elements.
5103case $as_dir/ in #((
5104 ./ | .// | /[cC]/* | \
5105 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5106 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5107 /usr/ucb/* ) ;;
5108 *)
5109 # OSF1 and SCO ODT 3.0 have their own names for install.
5110 # Don't use installbsd from OSF since it installs stuff as root
5111 # by default.
5112 for ac_prog in ginstall scoinst install; do
5113 for ac_exec_ext in '' $ac_executable_extensions; do
5114 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5115 if test $ac_prog = install &&
5116 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5117 # AIX install. It has an incompatible calling convention.
5118 :
5119 elif test $ac_prog = install &&
5120 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5121 # program-specific install script used by HP pwplus--don't use.
5122 :
5123 else
5124 rm -rf conftest.one conftest.two conftest.dir
5125 echo one > conftest.one
5126 echo two > conftest.two
5127 mkdir conftest.dir
5128 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5129 test -s conftest.one && test -s conftest.two &&
5130 test -s conftest.dir/conftest.one &&
5131 test -s conftest.dir/conftest.two
5132 then
5133 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5134 break 3
5135 fi
5136 fi
5137 fi
5138 done
5139 done
5140 ;;
91e84f96 5141esac
6da23aaa 5142
eb697db5
DN
5143 done
5144IFS=$as_save_IFS
0ca10bb7 5145
eb697db5 5146rm -rf conftest.one conftest.two conftest.dir
91e84f96
GM
5147
5148fi
eb697db5
DN
5149 if test "${ac_cv_path_install+set}" = set; then
5150 INSTALL=$ac_cv_path_install
5151 else
5152 # As a last resort, use the slow shell script. Don't cache a
5153 # value for INSTALL within a source directory, because that will
5154 # break other packages using the cache if that directory is
5155 # removed, or if the value is a relative name.
5156 INSTALL=$ac_install_sh
5157 fi
5158fi
5159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5160$as_echo "$INSTALL" >&6; }
6da23aaa 5161
eb697db5
DN
5162# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5163# It thinks the first close brace ends the variable substitution.
5164test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6da23aaa 5165
eb697db5 5166test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6da23aaa 5167
eb697db5 5168test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6da23aaa 5169
eb697db5
DN
5170if test "x$RANLIB" = x; then
5171 if test -n "$ac_tool_prefix"; then
5172 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5173set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
91e84f96 5175$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5176if test "${ac_cv_prog_RANLIB+set}" = set; then :
e9a63f04 5177 $as_echo_n "(cached) " >&6
a21616bd 5178else
eb697db5
DN
5179 if test -n "$RANLIB"; then
5180 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5181else
5182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91e84f96
GM
5183for as_dir in $PATH
5184do
5185 IFS=$as_save_IFS
5186 test -z "$as_dir" && as_dir=.
eb697db5 5187 for ac_exec_ext in '' $ac_executable_extensions; do
91e84f96 5188 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5189 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
91e84f96
GM
5191 break 2
5192 fi
5193done
eb697db5 5194 done
91e84f96 5195IFS=$as_save_IFS
0ca10bb7 5196
91e84f96 5197fi
eb697db5
DN
5198fi
5199RANLIB=$ac_cv_prog_RANLIB
5200if test -n "$RANLIB"; then
5201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5202$as_echo "$RANLIB" >&6; }
91e84f96 5203else
eb697db5 5204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
91e84f96
GM
5205$as_echo "no" >&6; }
5206fi
6da23aaa 5207
0ca10bb7 5208
eb697db5
DN
5209fi
5210if test -z "$ac_cv_prog_RANLIB"; then
5211 ac_ct_RANLIB=$RANLIB
5212 # Extract the first word of "ranlib", so it can be a program name with args.
5213set dummy ranlib; ac_word=$2
5214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5215$as_echo_n "checking for $ac_word... " >&6; }
5216if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
91e84f96
GM
5217 $as_echo_n "(cached) " >&6
5218else
eb697db5
DN
5219 if test -n "$ac_ct_RANLIB"; then
5220 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
91e84f96 5221else
eb697db5
DN
5222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in $PATH
5224do
5225 IFS=$as_save_IFS
5226 test -z "$as_dir" && as_dir=.
5227 for ac_exec_ext in '' $ac_executable_extensions; do
5228 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5229 ac_cv_prog_ac_ct_RANLIB="ranlib"
5230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5231 break 2
5232 fi
5233done
5234 done
5235IFS=$as_save_IFS
91e84f96 5236
91e84f96 5237fi
91e84f96 5238fi
eb697db5
DN
5239ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5240if test -n "$ac_ct_RANLIB"; then
5241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5242$as_echo "$ac_ct_RANLIB" >&6; }
91e84f96 5243else
eb697db5 5244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5245$as_echo "no" >&6; }
91e84f96
GM
5246fi
5247
eb697db5
DN
5248 if test "x$ac_ct_RANLIB" = x; then
5249 RANLIB=":"
5250 else
5251 case $cross_compiling:$ac_tool_warned in
5252yes:)
5253{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5254$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5255ac_tool_warned=yes ;;
5256esac
5257 RANLIB=$ac_ct_RANLIB
5258 fi
5259else
5260 RANLIB="$ac_cv_prog_RANLIB"
5261fi
91e84f96 5262
eb697db5 5263fi
91e84f96 5264
eb697db5
DN
5265## Although we're running on an amd64 kernel, we're actually compiling for
5266## the x86 architecture. The user should probably have provided an
5267## explicit --build to `configure', but if everything else than the kernel
5268## is running in i386 mode, we can help them out.
5269if test "$machine" = "amdx86-64"; then
5270 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
5271if test "x$ac_cv_have_decl_i386" = x""yes; then :
91e84f96 5272
eb697db5 5273fi
91e84f96 5274
eb697db5
DN
5275 if test "$ac_cv_have_decl_i386" = "yes"; then
5276 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
5277 machine=intel386
5278 machfile="m/${machine}.h"
5929fbe7 5279 fi
eb697db5 5280fi
91e84f96 5281
eb697db5
DN
5282# Extract the first word of "install-info", so it can be a program name with args.
5283set dummy install-info; ac_word=$2
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
91e84f96 5285$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5286if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
91e84f96
GM
5287 $as_echo_n "(cached) " >&6
5288else
eb697db5 5289 case $INSTALL_INFO in
91e84f96 5290 [\\/]* | ?:[\\/]*)
eb697db5 5291 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
91e84f96
GM
5292 ;;
5293 *)
5294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297 IFS=$as_save_IFS
5298 test -z "$as_dir" && as_dir=.
eb697db5 5299 for ac_exec_ext in '' $ac_executable_extensions; do
91e84f96 5300 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5301 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5302 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
91e84f96
GM
5303 break 2
5304 fi
5305done
eb697db5 5306 done
91e84f96
GM
5307IFS=$as_save_IFS
5308
91e84f96
GM
5309 ;;
5310esac
5311fi
eb697db5
DN
5312INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5313if test -n "$INSTALL_INFO"; then
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5315$as_echo "$INSTALL_INFO" >&6; }
91e84f96 5316else
eb697db5 5317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
91e84f96 5318$as_echo "no" >&6; }
a4f64981 5319fi
15e12598
VB
5320
5321
eb697db5
DN
5322# Extract the first word of "install-info", so it can be a program name with args.
5323set dummy install-info; ac_word=$2
5324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 5325$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5326if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
91e84f96 5327 $as_echo_n "(cached) " >&6
91e84f96 5328else
eb697db5 5329 case $INSTALL_INFO in
5929fbe7 5330 [\\/]* | ?:[\\/]*)
eb697db5 5331 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5929fbe7
GM
5332 ;;
5333 *)
5334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 5335for as_dir in /usr/sbin
5929fbe7
GM
5336do
5337 IFS=$as_save_IFS
5338 test -z "$as_dir" && as_dir=.
eb697db5 5339 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 5340 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5341 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5342 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7 5343 break 2
8c5ff6dd 5344 fi
5929fbe7 5345done
eb697db5 5346 done
5929fbe7 5347IFS=$as_save_IFS
91e84f96 5348
5929fbe7 5349 ;;
91e84f96 5350esac
91e84f96 5351fi
eb697db5
DN
5352INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5353if test -n "$INSTALL_INFO"; then
5354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5355$as_echo "$INSTALL_INFO" >&6; }
91e84f96 5356else
eb697db5 5357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5358$as_echo "no" >&6; }
91e84f96 5359fi
91e84f96 5360
08b47d3d 5361
eb697db5
DN
5362# Extract the first word of "install-info", so it can be a program name with args.
5363set dummy install-info; ac_word=$2
5364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5365$as_echo_n "checking for $ac_word... " >&6; }
5366if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
91e84f96
GM
5367 $as_echo_n "(cached) " >&6
5368else
eb697db5
DN
5369 case $INSTALL_INFO in
5370 [\\/]* | ?:[\\/]*)
5371 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5372 ;;
5373 *)
5374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5375for as_dir in /sbin
5376do
5377 IFS=$as_save_IFS
5378 test -z "$as_dir" && as_dir=.
5379 for ac_exec_ext in '' $ac_executable_extensions; do
5380 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5381 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5383 break 2
5929fbe7 5384 fi
eb697db5
DN
5385done
5386 done
5387IFS=$as_save_IFS
91e84f96 5388
eb697db5
DN
5389 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5390 ;;
91e84f96 5391esac
91e84f96 5392fi
eb697db5
DN
5393INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5394if test -n "$INSTALL_INFO"; then
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5396$as_echo "$INSTALL_INFO" >&6; }
91e84f96 5397else
eb697db5
DN
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5399$as_echo "no" >&6; }
91e84f96 5400fi
91e84f96
GM
5401
5402
eb697db5
DN
5403# Extract the first word of "gzip", so it can be a program name with args.
5404set dummy gzip; ac_word=$2
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5406$as_echo_n "checking for $ac_word... " >&6; }
5407if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
5929fbe7 5408 $as_echo_n "(cached) " >&6
5929fbe7 5409else
eb697db5
DN
5410 case $GZIP_PROG in
5411 [\\/]* | ?:[\\/]*)
5412 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
5413 ;;
5414 *)
5415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5416for as_dir in $PATH
5417do
5418 IFS=$as_save_IFS
5419 test -z "$as_dir" && as_dir=.
5420 for ac_exec_ext in '' $ac_executable_extensions; do
5421 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5422 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
5423 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5424 break 2
91e84f96 5425 fi
eb697db5
DN
5426done
5427 done
5428IFS=$as_save_IFS
91e84f96 5429
eb697db5 5430 ;;
8c5ff6dd 5431esac
eb697db5
DN
5432fi
5433GZIP_PROG=$ac_cv_path_GZIP_PROG
5434if test -n "$GZIP_PROG"; then
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
5436$as_echo "$GZIP_PROG" >&6; }
5929fbe7 5437else
eb697db5
DN
5438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439$as_echo "no" >&6; }
5929fbe7 5440fi
91e84f96 5441
91e84f96 5442
91e84f96
GM
5443
5444
eb697db5
DN
5445## Need makeinfo >= 4.6 (?) to build the manuals.
5446# Extract the first word of "makeinfo", so it can be a program name with args.
5447set dummy makeinfo; ac_word=$2
5448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5449$as_echo_n "checking for $ac_word... " >&6; }
5450if test "${ac_cv_path_MAKEINFO+set}" = set; then :
91e84f96 5451 $as_echo_n "(cached) " >&6
91e84f96 5452else
eb697db5
DN
5453 case $MAKEINFO in
5454 [\\/]* | ?:[\\/]*)
5455 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5456 ;;
5457 *)
5458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5459for as_dir in $PATH
5460do
5461 IFS=$as_save_IFS
5462 test -z "$as_dir" && as_dir=.
5463 for ac_exec_ext in '' $ac_executable_extensions; do
5464 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5465 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5467 break 2
5468 fi
5469done
5470 done
5471IFS=$as_save_IFS
5929fbe7 5472
eb697db5
DN
5473 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5474 ;;
91e84f96 5475esac
eb697db5
DN
5476fi
5477MAKEINFO=$ac_cv_path_MAKEINFO
5478if test -n "$MAKEINFO"; then
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
5480$as_echo "$MAKEINFO" >&6; }
91e84f96 5481else
eb697db5
DN
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5483$as_echo "no" >&6; }
5484fi
91e84f96 5485
eb697db5
DN
5486
5487if test "$MAKEINFO" != "no" && \
5488 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
5489 MAKEINFO=no
91e84f96
GM
5490fi
5491
eb697db5
DN
5492## Makeinfo is unusual. For a released Emacs, the manuals are
5493## pre-built, and not deleted by the normal clean rules. makeinfo is
5494## therefore in the category of "special tools" not normally required, which
5495## configure does not have to check for (eg autoconf itself).
5496## In a Bazaar checkout on the other hand, the manuals are not included.
5497## So makeinfo is a requirement to build from Bazaar, and configure
5498## should test for it as it does for any other build requirement.
5499## We use the presence of $srcdir/info/emacs to distinguish a release,
5500## with pre-built manuals, from a Bazaar checkout.
5501if test "$MAKEINFO" = "no"; then
5502 if test "x${with_makeinfo}" = "xno"; then
5503 MAKEINFO=off
5504 elif test ! -e $srcdir/info/emacs; then
036dc38d 5505 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
eb697db5
DN
5506source tree does not seem to have pre-built manuals in the \`info' directory.
5507Either install a suitable version of makeinfo, or re-run configure
5508with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
5509 fi
5929fbe7 5510fi
91e84f96 5511
91e84f96 5512
eb697db5
DN
5513if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5514then
5515 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
91e84f96
GM
5516fi
5517
eb697db5
DN
5518if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5519then
5520 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5929fbe7 5521fi
91e84f96 5522
91e84f96 5523
eb697db5
DN
5524late_LDFLAGS=$LDFLAGS
5525if test "$GCC" = yes; then
5526 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
91e84f96 5527else
eb697db5 5528 LDFLAGS="$LDFLAGS -znocombreloc"
91e84f96 5529fi
91e84f96 5530
eb697db5
DN
5531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
5532$as_echo_n "checking for -znocombreloc... " >&6; }
5533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 5534/* end confdefs.h. */
eb697db5 5535main(){return 0;}
91e84f96 5536_ACEOF
eb697db5
DN
5537if ac_fn_c_try_link "$LINENO"; then :
5538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5539$as_echo "yes" >&6; }
91e84f96 5540else
eb697db5
DN
5541 LDFLAGS=$late_LDFLAGS
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
91e84f96 5544fi
eb697db5
DN
5545rm -f core conftest.err conftest.$ac_objext \
5546 conftest$ac_exeext conftest.$ac_ext
91e84f96 5547
91e84f96 5548
eb697db5
DN
5549# The value of CPP is a quoted variable reference, so we need to do this
5550# to get its actual value...
5551CPP=`eval "echo $CPP"`
91e84f96 5552
91e84f96 5553
e7586c7a
GM
5554CANNOT_DUMP=no
5555case "$opsys" in
5556 your-opsys-here)
5557 CANNOT_DUMP=yes
5558
5559$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
5560
5561 ;;
5562esac
5563
91e84f96 5564
eb697db5
DN
5565
5566UNEXEC_OBJ=unexelf.o
5567case "$opsys" in
52eeb591 5568 # MSDOS uses unexcoff.o
d734dbbd 5569 # MSWindows uses unexw32.o
eb697db5
DN
5570 aix4-2)
5571 UNEXEC_OBJ=unexaix.o
5572 ;;
5573 cygwin)
5574 UNEXEC_OBJ=unexcw.o
5575 ;;
5576 darwin)
5577 UNEXEC_OBJ=unexmacosx.o
5578 ;;
5579 hpux10-20 | hpux11)
5580 UNEXEC_OBJ=unexhp9k800.o
5581 ;;
5582 sol2-10)
5583 # Use the Solaris dldump() function, called from unexsol.c, to dump
5584 # emacs, instead of the generic ELF dump code found in unexelf.c.
5585 # The resulting binary has a complete symbol table, and is better
5586 # for debugging and other observability tools (debuggers, pstack, etc).
5587 #
5588 # If you encounter a problem using dldump(), please consider sending
5589 # a message to the OpenSolaris tools-linking mailing list:
5590 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
5591 #
5592 # It is likely that dldump() works with older Solaris too, but this has
5593 # not been tested, so for now this change is for Solaris 10 or newer.
5594 UNEXEC_OBJ=unexsol.o
5595 ;;
91e84f96 5596esac
91e84f96 5597
eb697db5
DN
5598LD_SWITCH_SYSTEM=
5599case "$opsys" in
5600 freebsd)
5601 ## Let `ld' find image libs and similar things in /usr/local/lib.
5602 ## The system compiler, GCC, has apparently been modified to not
5603 ## look there, contrary to what a stock GCC would do.
5604 LD_SWITCH_SYSTEM=-L/usr/local/lib
5605 ;;
91e84f96 5606
eb697db5
DN
5607 gnu-linux)
5608 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
5609 test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0"
5610 ;;
91e84f96 5611
eb697db5
DN
5612 netbsd)
5613 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
5614 ;;
91e84f96 5615
eb697db5
DN
5616 openbsd)
5617 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
5618 ## otherwise Emacs dumps core on elf systems.
5619 LD_SWITCH_SYSTEM="-Z"
5620 ;;
5621esac
91e84f96 5622
8c5ff6dd 5623
eb697db5 5624ac_link="$ac_link $LD_SWITCH_SYSTEM"
8c5ff6dd 5625
eb697db5
DN
5626## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
5627## which has not been defined yet. When this was handled with cpp,
5628## it was expanded to null when configure sourced the s/*.h file.
5629## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
5630## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
5631## (or somesuch), but because it is supposed to go at the _front_
5632## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
5633## Compare with the gnu-linux case below, which added to the end
5634## of LD_SWITCH_SYSTEM, and so can instead go at the front of
5635## LD_SWITCH_SYSTEM_TEMACS.
5636case "$opsys" in
5637 netbsd|openbsd)
5638 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
5639 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
91e84f96 5640esac
91e84f96 5641
91e84f96 5642
eb697db5
DN
5643C_SWITCH_MACHINE=
5644if test "$machine" = "alpha"; then
5645 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
5646if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8c5ff6dd 5647
91e84f96
GM
5648fi
5649
eb697db5
DN
5650 if test "$ac_cv_have_decl___ELF__" = "yes"; then
5651 ## With ELF, make sure that all common symbols get allocated to in the
5652 ## data section. Otherwise, the dump of temacs may miss variables in
5653 ## the shared library that have been initialized. For example, with
5654 ## GNU libc, __malloc_initialized would normally be resolved to the
5655 ## shared library's .bss section, which is fatal.
5656 if test "x$GCC" = "xyes"; then
5657 C_SWITCH_MACHINE="-fno-common"
5658 else
036dc38d 5659 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
91e84f96 5660 fi
eb697db5
DN
5661 else
5662 UNEXEC_OBJ=unexalpha.o
91e84f96 5663 fi
15e12598 5664fi
91e84f96 5665
91e84f96 5666
91e84f96
GM
5667
5668
eb697db5
DN
5669C_SWITCH_SYSTEM=
5670## Some programs in src produce warnings saying certain subprograms
5671## are too complex and need a MAXMEM value greater than 2000 for
5672## additional optimization. --nils@exp-math.uni-essen.de
5673test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
5674 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
5675## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
5676## It is redundant in glibc2, since we define _GNU_SOURCE.
91e84f96 5677
91e84f96 5678
91e84f96 5679
eb697db5
DN
5680LIBS_SYSTEM=
5681case "$opsys" in
5682 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
5683 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
91e84f96 5684
eb697db5 5685 freebsd) LIBS_SYSTEM="-lutil" ;;
91e84f96 5686
eb697db5 5687 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
91e84f96 5688
eb697db5 5689 sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;;
91e84f96 5690
eb697db5
DN
5691 ## Motif needs -lgen.
5692 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
91e84f96 5693esac
eb697db5
DN
5694
5695
5696
5697### Make sure subsequent tests use flags consistent with the build flags.
5698
5699if test x"${OVERRIDE_CPPFLAGS}" != x; then
5700 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
91e84f96 5701else
eb697db5 5702 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
91e84f96 5703fi
91e84f96 5704
a4f64981 5705
eb697db5
DN
5706
5707# Check whether --enable-largefile was given.
5708if test "${enable_largefile+set}" = set; then :
5709 enableval=$enable_largefile;
91e84f96 5710fi
a4f64981 5711
eb697db5 5712if test "$enable_largefile" != no; then
a4f64981 5713
eb697db5
DN
5714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5715$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5716if test "${ac_cv_sys_largefile_CC+set}" = set; then :
91e84f96
GM
5717 $as_echo_n "(cached) " >&6
5718else
eb697db5
DN
5719 ac_cv_sys_largefile_CC=no
5720 if test "$GCC" != yes; then
5721 ac_save_CC=$CC
5722 while :; do
5723 # IRIX 6.2 and later do not support large files by default,
5724 # so use the C compiler's -n32 option if that helps.
5725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 5726/* end confdefs.h. */
eb697db5
DN
5727#include <sys/types.h>
5728 /* Check that off_t can represent 2**63 - 1 correctly.
5729 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5730 since some C++ compilers masquerading as C compilers
5731 incorrectly reject 9223372036854775807. */
5732#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5733 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5734 && LARGE_OFF_T % 2147483647 == 1)
5735 ? 1 : -1];
91e84f96
GM
5736int
5737main ()
5738{
eb697db5 5739
91e84f96
GM
5740 ;
5741 return 0;
5742}
5743_ACEOF
eb697db5
DN
5744 if ac_fn_c_try_compile "$LINENO"; then :
5745 break
91e84f96 5746fi
eb697db5
DN
5747rm -f core conftest.err conftest.$ac_objext
5748 CC="$CC -n32"
5749 if ac_fn_c_try_compile "$LINENO"; then :
5750 ac_cv_sys_largefile_CC=' -n32'; break
91e84f96 5751fi
eb697db5
DN
5752rm -f core conftest.err conftest.$ac_objext
5753 break
5754 done
5755 CC=$ac_save_CC
5756 rm -f conftest.$ac_ext
5757 fi
91e84f96 5758fi
eb697db5
DN
5759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5760$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5761 if test "$ac_cv_sys_largefile_CC" != no; then
5762 CC=$CC$ac_cv_sys_largefile_CC
91e84f96
GM
5763 fi
5764
eb697db5
DN
5765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5766$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5767if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5768 $as_echo_n "(cached) " >&6
5769else
5770 while :; do
5771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5772/* end confdefs.h. */
5773#include <sys/types.h>
5774 /* Check that off_t can represent 2**63 - 1 correctly.
5775 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5776 since some C++ compilers masquerading as C compilers
5777 incorrectly reject 9223372036854775807. */
5778#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5779 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5780 && LARGE_OFF_T % 2147483647 == 1)
5781 ? 1 : -1];
5782int
5783main ()
5784{
91e84f96 5785
eb697db5
DN
5786 ;
5787 return 0;
5788}
91e84f96 5789_ACEOF
eb697db5
DN
5790if ac_fn_c_try_compile "$LINENO"; then :
5791 ac_cv_sys_file_offset_bits=no; break
91e84f96 5792fi
eb697db5
DN
5793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5795/* end confdefs.h. */
eb697db5
DN
5796#define _FILE_OFFSET_BITS 64
5797#include <sys/types.h>
5798 /* Check that off_t can represent 2**63 - 1 correctly.
5799 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5800 since some C++ compilers masquerading as C compilers
5801 incorrectly reject 9223372036854775807. */
5802#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5803 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5804 && LARGE_OFF_T % 2147483647 == 1)
5805 ? 1 : -1];
5806int
5807main ()
5808{
91e84f96 5809
eb697db5
DN
5810 ;
5811 return 0;
5812}
5813_ACEOF
5814if ac_fn_c_try_compile "$LINENO"; then :
5815 ac_cv_sys_file_offset_bits=64; break
a4f64981 5816fi
eb697db5
DN
5817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5818 ac_cv_sys_file_offset_bits=unknown
5819 break
5820done
91e84f96 5821fi
eb697db5
DN
5822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5823$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5824case $ac_cv_sys_file_offset_bits in #(
5825 no | unknown) ;;
5826 *)
5827cat >>confdefs.h <<_ACEOF
5828#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5829_ACEOF
5830;;
5929fbe7 5831esac
eb697db5
DN
5832rm -rf conftest*
5833 if test $ac_cv_sys_file_offset_bits = unknown; then
5834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5835$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5836if test "${ac_cv_sys_large_files+set}" = set; then :
5929fbe7 5837 $as_echo_n "(cached) " >&6
91e84f96 5838else
eb697db5
DN
5839 while :; do
5840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5841/* end confdefs.h. */
5842#include <sys/types.h>
5843 /* Check that off_t can represent 2**63 - 1 correctly.
5844 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5845 since some C++ compilers masquerading as C compilers
5846 incorrectly reject 9223372036854775807. */
5847#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5848 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5849 && LARGE_OFF_T % 2147483647 == 1)
5850 ? 1 : -1];
5851int
5852main ()
5853{
8c5ff6dd 5854
eb697db5
DN
5855 ;
5856 return 0;
5857}
91e84f96 5858_ACEOF
eb697db5
DN
5859if ac_fn_c_try_compile "$LINENO"; then :
5860 ac_cv_sys_large_files=no; break
5861fi
5862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 5864/* end confdefs.h. */
eb697db5
DN
5865#define _LARGE_FILES 1
5866#include <sys/types.h>
5867 /* Check that off_t can represent 2**63 - 1 correctly.
5868 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5869 since some C++ compilers masquerading as C compilers
5870 incorrectly reject 9223372036854775807. */
5871#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5872 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5873 && LARGE_OFF_T % 2147483647 == 1)
5874 ? 1 : -1];
8c5ff6dd
KR
5875int
5876main ()
5877{
eb697db5 5878
8c5ff6dd
KR
5879 ;
5880 return 0;
5881}
91e84f96 5882_ACEOF
eb697db5
DN
5883if ac_fn_c_try_compile "$LINENO"; then :
5884 ac_cv_sys_large_files=1; break
8c5ff6dd 5885fi
eb697db5
DN
5886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5887 ac_cv_sys_large_files=unknown
5888 break
5889done
5929fbe7 5890fi
eb697db5
DN
5891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5892$as_echo "$ac_cv_sys_large_files" >&6; }
5893case $ac_cv_sys_large_files in #(
5894 no | unknown) ;;
5895 *)
5896cat >>confdefs.h <<_ACEOF
5897#define _LARGE_FILES $ac_cv_sys_large_files
5898_ACEOF
5899;;
91e84f96 5900esac
eb697db5
DN
5901rm -rf conftest*
5902 fi
91e84f96
GM
5903fi
5904
91e84f96 5905
5929fbe7 5906
eb697db5
DN
5907## If user specified a crt-dir, use that unconditionally.
5908if test "X$CRT_DIR" = "X"; then
5929fbe7 5909
eb697db5
DN
5910 case "$canonical" in
5911 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
5912 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5913 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5914 ## For anything else (eg /usr/lib32), it is up the user to specify
5915 ## the location (bug#5655).
5916 ## Test for crtn.o, not just the directory, because sometimes the
5917 ## directory exists but does not have the relevant files (bug#1287).
5918 ## FIXME better to test for binary compatibility somehow.
5919 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5920 ;;
5929fbe7 5921
eb697db5
DN
5922 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
5923 esac
e6df49e4 5924
eb697db5
DN
5925 case "$opsys" in
5926 hpux10-20) CRT_DIR=/lib ;;
5927 esac
15e12598 5928
eb697db5
DN
5929 ## Default is /usr/lib.
5930 test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
8c5ff6dd 5931
91e84f96 5932else
91e84f96 5933
eb697db5
DN
5934 ## Some platforms don't use any of these files, so it is not
5935 ## appropriate to put this test outside the if block.
5936 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
036dc38d 5937 as_fn_error "crt*.o not found in specified location." "$LINENO" 5
eb697db5 5938
91e84f96
GM
5939fi
5940
91e84f96 5941
91e84f96 5942
eb697db5
DN
5943LIB_MATH=-lm
5944LIB_STANDARD=
5945START_FILES=
5946
5947case $opsys in
5948 cygwin )
5949 LIB_MATH=
921d40b4 5950 START_FILES='pre-crt0.o'
eb697db5
DN
5951 ;;
5952 darwin )
5953 ## Adding -lm confuses the dynamic linker, so omit it.
5954 LIB_MATH=
5955 START_FILES='pre-crt0.o'
5956 ;;
5957 freebsd )
5958 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5959 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5960 ;;
5961 gnu-linux | gnu-kfreebsd )
5962 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
5963 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
5964 ;;
5965 hpux10-20 | hpux11 )
5966 LIB_STANDARD=-lc
5967 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
5968 ;;
5969 netbsd | openbsd )
5970 if test -f $CRT_DIR/crti.o; then
5971 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5972 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5973 else
5974 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
5975 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
5976 fi
91e84f96
GM
5977 ;;
5978esac
5929fbe7 5979
5929fbe7 5980
5929fbe7 5981
5929fbe7 5982
a4f64981 5983
5929fbe7 5984
e6df49e4 5985
eb697db5
DN
5986if test "${with_sound}" != "no"; then
5987 # Sound support for GNU/Linux and the free BSDs.
5988 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5989do :
5990 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5991ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
036dc38d
LMI
5992eval as_val=\$$as_ac_Header
5993 if test "x$as_val" = x""yes; then :
eb697db5
DN
5994 cat >>confdefs.h <<_ACEOF
5995#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5996_ACEOF
a46007e9 5997 have_sound_header=yes
91e84f96 5998fi
eb697db5
DN
5999
6000done
6001
6002 # Emulation library used on NetBSD.
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
6004$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
6005if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
91e84f96
GM
6006 $as_echo_n "(cached) " >&6
6007else
6008 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
6009LIBS="-lossaudio $LIBS"
6010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
6011/* end confdefs.h. */
6012
6013/* Override any GCC internal prototype to avoid an error.
6014 Use char because int might match the return type of a GCC
6015 builtin and then its argument prototype would still apply. */
6016#ifdef __cplusplus
6017extern "C"
6018#endif
eb697db5 6019char _oss_ioctl ();
91e84f96
GM
6020int
6021main ()
6022{
eb697db5 6023return _oss_ioctl ();
91e84f96
GM
6024 ;
6025 return 0;
6026}
6027_ACEOF
eb697db5
DN
6028if ac_fn_c_try_link "$LINENO"; then :
6029 ac_cv_lib_ossaudio__oss_ioctl=yes
91e84f96 6030else
eb697db5 6031 ac_cv_lib_ossaudio__oss_ioctl=no
91e84f96 6032fi
eb697db5
DN
6033rm -f core conftest.err conftest.$ac_objext \
6034 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
6035LIBS=$ac_check_lib_save_LIBS
6036fi
eb697db5
DN
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6038$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
6039if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
6040 LIBSOUND=-lossaudio
91e84f96 6041else
eb697db5 6042 LIBSOUND=
91e84f96
GM
6043fi
6044
91e84f96
GM
6045
6046
eb697db5
DN
6047 ALSA_REQUIRED=1.0.0
6048 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
91e84f96 6049
eb697db5
DN
6050 succeeded=no
6051
6052 # Extract the first word of "pkg-config", so it can be a program name with args.
6053set dummy pkg-config; ac_word=$2
6054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6055$as_echo_n "checking for $ac_word... " >&6; }
6056if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
6057 $as_echo_n "(cached) " >&6
6058else
eb697db5
DN
6059 case $PKG_CONFIG in
6060 [\\/]* | ?:[\\/]*)
6061 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6062 ;;
6063 *)
6064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6065for as_dir in $PATH
6066do
6067 IFS=$as_save_IFS
6068 test -z "$as_dir" && as_dir=.
6069 for ac_exec_ext in '' $ac_executable_extensions; do
6070 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6071 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6073 break 2
6074 fi
6075done
6076 done
6077IFS=$as_save_IFS
91e84f96 6078
eb697db5
DN
6079 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6080 ;;
91e84f96 6081esac
91e84f96 6082fi
eb697db5
DN
6083PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6084if test -n "$PKG_CONFIG"; then
6085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6086$as_echo "$PKG_CONFIG" >&6; }
91e84f96 6087else
eb697db5
DN
6088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6089$as_echo "no" >&6; }
91e84f96
GM
6090fi
6091
91e84f96 6092
91e84f96 6093
eb697db5
DN
6094 if test "$PKG_CONFIG" = "no" ; then
6095 HAVE_ALSA=no
6096 else
6097 PKG_CONFIG_MIN_VERSION=0.9.0
6098 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
6100$as_echo_n "checking for $ALSA_MODULES... " >&6; }
91e84f96 6101
eb697db5
DN
6102 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
6103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6104$as_echo "yes" >&6; }
6105 succeeded=yes
91e84f96 6106
eb697db5
DN
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
6108$as_echo_n "checking ALSA_CFLAGS... " >&6; }
6109 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
6111$as_echo "$ALSA_CFLAGS" >&6; }
91e84f96 6112
eb697db5
DN
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
6114$as_echo_n "checking ALSA_LIBS... " >&6; }
6115 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
6117$as_echo "$ALSA_LIBS" >&6; }
6118 else
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120$as_echo "no" >&6; }
6121 ALSA_CFLAGS=""
6122 ALSA_LIBS=""
6123 ## If we have a custom action on failure, don't print errors, but
6124 ## do set a variable so people can do so.
6125 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
91e84f96 6126
eb697db5
DN
6127 fi
6128
6129
6130
6131 else
6132 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6133 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6134 fi
5929fbe7 6135 fi
4e569696 6136
eb697db5
DN
6137 if test $succeeded = yes; then
6138 HAVE_ALSA=yes
6139 else
6140 HAVE_ALSA=no
91e84f96 6141 fi
91e84f96 6142
eb697db5
DN
6143 if test $HAVE_ALSA = yes; then
6144 SAVE_CFLAGS="$CFLAGS"
6145 SAVE_LDFLAGS="$LDFLAGS"
6146 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6147 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6149/* end confdefs.h. */
eb697db5
DN
6150#include <asoundlib.h>
6151int
6152main ()
6153{
6154snd_lib_error_set_handler (0);
6155 ;
6156 return 0;
6157}
91e84f96 6158_ACEOF
eb697db5
DN
6159if ac_fn_c_try_compile "$LINENO"; then :
6160 emacs_alsa_normal=yes
91e84f96 6161else
eb697db5 6162 emacs_alsa_normal=no
91e84f96 6163fi
91e84f96 6164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6165 if test "$emacs_alsa_normal" != yes; then
6166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6167/* end confdefs.h. */
eb697db5
DN
6168#include <alsa/asoundlib.h>
6169int
6170main ()
6171{
6172snd_lib_error_set_handler (0);
6173 ;
6174 return 0;
6175}
91e84f96 6176_ACEOF
eb697db5
DN
6177if ac_fn_c_try_compile "$LINENO"; then :
6178 emacs_alsa_subdir=yes
91e84f96 6179else
eb697db5 6180 emacs_alsa_subdir=no
91e84f96 6181fi
eb697db5
DN
6182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6183 if test "$emacs_alsa_subdir" != yes; then
036dc38d 6184 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
eb697db5
DN
6185 fi
6186 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6187 fi
91e84f96 6188
eb697db5
DN
6189 CFLAGS="$SAVE_CFLAGS"
6190 LDFLAGS="$SAVE_LDFLAGS"
6191 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6192 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
91e84f96 6193
eb697db5 6194$as_echo "#define HAVE_ALSA 1" >>confdefs.h
91e84f96 6195
eb697db5 6196 fi
91e84f96 6197
a46007e9
GM
6198 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
6199 case "$opsys" in
6200 gnu-linux|freebsd|netbsd)
6201
6202$as_echo "#define HAVE_SOUND 1" >>confdefs.h
6203
6204 ;;
6205 esac
6206 fi
6207
6208
91e84f96 6209fi
eb697db5
DN
6210
6211for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6212 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
6213 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
6214 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
3d608a86 6215 sys/utsname.h pwd.h utmp.h dirent.h util.h
eb697db5
DN
6216do :
6217 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6218ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
036dc38d
LMI
6219eval as_val=\$$as_ac_Header
6220 if test "x$as_val" = x""yes; then :
eb697db5
DN
6221 cat >>confdefs.h <<_ACEOF
6222#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
91e84f96 6223_ACEOF
91e84f96 6224
eb697db5
DN
6225fi
6226
6227done
6228
6229
6230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
6231$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
6232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6233/* end confdefs.h. */
6234#include <sys/personality.h>
91e84f96
GM
6235int
6236main ()
6237{
eb697db5 6238personality (PER_LINUX32)
91e84f96
GM
6239 ;
6240 return 0;
6241}
6242_ACEOF
eb697db5
DN
6243if ac_fn_c_try_compile "$LINENO"; then :
6244 emacs_cv_personality_linux32=yes
91e84f96 6245else
eb697db5 6246 emacs_cv_personality_linux32=no
91e84f96 6247fi
eb697db5
DN
6248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
6250$as_echo "$emacs_cv_personality_linux32" >&6; }
91e84f96 6251
eb697db5 6252if test $emacs_cv_personality_linux32 = yes; then
91e84f96 6253
eb697db5 6254$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
91e84f96 6255
eb697db5 6256fi
91e84f96 6257
eb697db5
DN
6258for ac_header in term.h
6259do :
6260 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6261if test "x$ac_cv_header_term_h" = x""yes; then :
6262 cat >>confdefs.h <<_ACEOF
6263#define HAVE_TERM_H 1
91e84f96
GM
6264_ACEOF
6265
91e84f96
GM
6266fi
6267
eb697db5 6268done
91e84f96 6269
eb697db5
DN
6270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6271$as_echo_n "checking for ANSI C header files... " >&6; }
6272if test "${ac_cv_header_stdc+set}" = set; then :
91e84f96 6273 $as_echo_n "(cached) " >&6
91e84f96 6274else
eb697db5 6275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6276/* end confdefs.h. */
eb697db5
DN
6277#include <stdlib.h>
6278#include <stdarg.h>
6279#include <string.h>
6280#include <float.h>
6281
6282int
6283main ()
6284{
6285
6286 ;
6287 return 0;
6288}
91e84f96 6289_ACEOF
eb697db5
DN
6290if ac_fn_c_try_compile "$LINENO"; then :
6291 ac_cv_header_stdc=yes
91e84f96 6292else
eb697db5 6293 ac_cv_header_stdc=no
91e84f96 6294fi
91e84f96 6295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6296
eb697db5
DN
6297if test $ac_cv_header_stdc = yes; then
6298 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6300/* end confdefs.h. */
eb697db5
DN
6301#include <string.h>
6302
91e84f96 6303_ACEOF
eb697db5
DN
6304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6305 $EGREP "memchr" >/dev/null 2>&1; then :
6306
5929fbe7 6307else
eb697db5
DN
6308 ac_cv_header_stdc=no
6309fi
6310rm -f conftest*
a4f64981 6311
8c5ff6dd 6312fi
a4f64981 6313
eb697db5
DN
6314if test $ac_cv_header_stdc = yes; then
6315 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6317/* end confdefs.h. */
eb697db5 6318#include <stdlib.h>
a4f64981 6319
91e84f96 6320_ACEOF
eb697db5
DN
6321if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6322 $EGREP "free" >/dev/null 2>&1; then :
a4f64981 6323
91e84f96 6324else
eb697db5 6325 ac_cv_header_stdc=no
5929fbe7 6326fi
eb697db5 6327rm -f conftest*
91e84f96 6328
91e84f96
GM
6329fi
6330
eb697db5
DN
6331if test $ac_cv_header_stdc = yes; then
6332 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6333 if test "$cross_compiling" = yes; then :
6334 :
6335else
6336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6337/* end confdefs.h. */
6338#include <ctype.h>
6339#include <stdlib.h>
6340#if ((' ' & 0x0FF) == 0x020)
6341# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6342# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6343#else
6344# define ISLOWER(c) \
6345 (('a' <= (c) && (c) <= 'i') \
6346 || ('j' <= (c) && (c) <= 'r') \
6347 || ('s' <= (c) && (c) <= 'z'))
6348# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6349#endif
91e84f96 6350
eb697db5
DN
6351#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6352int
6353main ()
6354{
6355 int i;
6356 for (i = 0; i < 256; i++)
6357 if (XOR (islower (i), ISLOWER (i))
6358 || toupper (i) != TOUPPER (i))
6359 return 2;
6360 return 0;
6361}
8c5ff6dd 6362_ACEOF
eb697db5 6363if ac_fn_c_try_run "$LINENO"; then :
91e84f96 6364
91e84f96 6365else
eb697db5
DN
6366 ac_cv_header_stdc=no
6367fi
6368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6369 conftest.$ac_objext conftest.beam conftest.$ac_ext
91e84f96 6370fi
91e84f96
GM
6371
6372fi
eb697db5
DN
6373fi
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6375$as_echo "$ac_cv_header_stdc" >&6; }
6376if test $ac_cv_header_stdc = yes; then
91e84f96 6377
eb697db5 6378$as_echo "#define STDC_HEADERS 1" >>confdefs.h
91e84f96
GM
6379
6380fi
6381
eb697db5
DN
6382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
6383$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
6384if test "${ac_cv_header_time+set}" = set; then :
6385 $as_echo_n "(cached) " >&6
6386else
6387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6388/* end confdefs.h. */
6389#include <sys/types.h>
6390#include <sys/time.h>
6391#include <time.h>
91e84f96 6392
eb697db5
DN
6393int
6394main ()
6395{
6396if ((struct tm *) 0)
6397return 0;
6398 ;
6399 return 0;
6400}
8c5ff6dd 6401_ACEOF
eb697db5
DN
6402if ac_fn_c_try_compile "$LINENO"; then :
6403 ac_cv_header_time=yes
6404else
6405 ac_cv_header_time=no
6406fi
6407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6408fi
6409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
6410$as_echo "$ac_cv_header_time" >&6; }
6411if test $ac_cv_header_time = yes; then
91e84f96 6412
eb697db5 6413$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
91e84f96 6414
eb697db5 6415fi
91e84f96 6416
eb697db5
DN
6417ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6418if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6419 ac_have_decl=1
6420else
6421 ac_have_decl=0
6422fi
91e84f96 6423
eb697db5
DN
6424cat >>confdefs.h <<_ACEOF
6425#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
91e84f96
GM
6426_ACEOF
6427
eb697db5
DN
6428if test $ac_cv_have_decl_sys_siglist != yes; then
6429 # For Tru64, at least:
6430 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6431if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6432 ac_have_decl=1
6433else
6434 ac_have_decl=0
6435fi
91e84f96 6436
eb697db5
DN
6437cat >>confdefs.h <<_ACEOF
6438#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
91e84f96
GM
6439_ACEOF
6440
eb697db5 6441 if test $ac_cv_have_decl___sys_siglist = yes; then
91e84f96 6442
eb697db5 6443$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
91e84f96
GM
6444
6445 fi
91e84f96 6446fi
eb697db5
DN
6447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
6448$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
6449if test "${ac_cv_header_sys_wait_h+set}" = set; then :
91e84f96 6450 $as_echo_n "(cached) " >&6
91e84f96 6451else
eb697db5 6452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6453/* end confdefs.h. */
eb697db5
DN
6454#include <sys/types.h>
6455#include <sys/wait.h>
6456#ifndef WEXITSTATUS
6457# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6458#endif
6459#ifndef WIFEXITED
6460# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6461#endif
6462
6463int
6464main ()
6465{
6466 int s;
6467 wait (&s);
6468 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6469 ;
6470 return 0;
6471}
91e84f96 6472_ACEOF
eb697db5
DN
6473if ac_fn_c_try_compile "$LINENO"; then :
6474 ac_cv_header_sys_wait_h=yes
91e84f96 6475else
eb697db5 6476 ac_cv_header_sys_wait_h=no
91e84f96 6477fi
91e84f96 6478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6479fi
6480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
6481$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6482if test $ac_cv_header_sys_wait_h = yes; then
91e84f96 6483
eb697db5 6484$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
91e84f96 6485
91e84f96
GM
6486fi
6487
91e84f96 6488
eb697db5
DN
6489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
6490$as_echo_n "checking for struct utimbuf... " >&6; }
6491if test "${emacs_cv_struct_utimbuf+set}" = set; then :
91e84f96
GM
6492 $as_echo_n "(cached) " >&6
6493else
eb697db5
DN
6494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6495/* end confdefs.h. */
6496#ifdef TIME_WITH_SYS_TIME
6497#include <sys/time.h>
6498#include <time.h>
6499#else
6500#ifdef HAVE_SYS_TIME_H
6501#include <sys/time.h>
6502#else
6503#include <time.h>
6504#endif
6505#endif
6506#ifdef HAVE_UTIME_H
6507#include <utime.h>
6508#endif
6509int
6510main ()
6511{
6512static struct utimbuf x; x.actime = x.modtime;
6513 ;
6514 return 0;
6515}
6516_ACEOF
6517if ac_fn_c_try_compile "$LINENO"; then :
6518 emacs_cv_struct_utimbuf=yes
6519else
6520 emacs_cv_struct_utimbuf=no
6521fi
6522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6523fi
eb697db5
DN
6524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
6525$as_echo "$emacs_cv_struct_utimbuf" >&6; }
6526if test $emacs_cv_struct_utimbuf = yes; then
6527
6528$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
91e84f96
GM
6529
6530fi
eb697db5
DN
6531
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6533$as_echo_n "checking return type of signal handlers... " >&6; }
6534if test "${ac_cv_type_signal+set}" = set; then :
91e84f96
GM
6535 $as_echo_n "(cached) " >&6
6536else
eb697db5 6537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6538/* end confdefs.h. */
eb697db5
DN
6539#include <sys/types.h>
6540#include <signal.h>
91e84f96 6541
91e84f96
GM
6542int
6543main ()
6544{
eb697db5 6545return *(signal (0, 0)) (0) == 1;
91e84f96
GM
6546 ;
6547 return 0;
6548}
6549_ACEOF
eb697db5
DN
6550if ac_fn_c_try_compile "$LINENO"; then :
6551 ac_cv_type_signal=int
91e84f96 6552else
eb697db5 6553 ac_cv_type_signal=void
91e84f96 6554fi
eb697db5 6555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6556fi
eb697db5
DN
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6558$as_echo "$ac_cv_type_signal" >&6; }
91e84f96 6559
eb697db5
DN
6560cat >>confdefs.h <<_ACEOF
6561#define RETSIGTYPE $ac_cv_type_signal
5929fbe7 6562_ACEOF
91e84f96
GM
6563
6564
91e84f96 6565
eb697db5
DN
6566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
6567$as_echo_n "checking for speed_t... " >&6; }
6568if test "${emacs_cv_speed_t+set}" = set; then :
e6df49e4
GM
6569 $as_echo_n "(cached) " >&6
6570else
eb697db5 6571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 6572/* end confdefs.h. */
eb697db5 6573#include <termios.h>
8c5ff6dd
KR
6574int
6575main ()
6576{
eb697db5 6577speed_t x = 1;
8c5ff6dd
KR
6578 ;
6579 return 0;
6580}
91e84f96 6581_ACEOF
eb697db5
DN
6582if ac_fn_c_try_compile "$LINENO"; then :
6583 emacs_cv_speed_t=yes
8c5ff6dd 6584else
eb697db5 6585 emacs_cv_speed_t=no
8c5ff6dd 6586fi
eb697db5 6587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6588fi
eb697db5
DN
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
6590$as_echo "$emacs_cv_speed_t" >&6; }
6591if test $emacs_cv_speed_t = yes; then
91e84f96 6592
eb697db5 6593$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
a4f64981 6594
8c5ff6dd
KR
6595fi
6596
eb697db5
DN
6597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
6598$as_echo_n "checking for struct timeval... " >&6; }
6599if test "${emacs_cv_struct_timeval+set}" = set; then :
91e84f96
GM
6600 $as_echo_n "(cached) " >&6
6601else
eb697db5 6602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6603/* end confdefs.h. */
eb697db5
DN
6604#ifdef TIME_WITH_SYS_TIME
6605#include <sys/time.h>
6606#include <time.h>
6607#else
6608#ifdef HAVE_SYS_TIME_H
6609#include <sys/time.h>
6610#else
6611#include <time.h>
6612#endif
6613#endif
91e84f96
GM
6614int
6615main ()
6616{
eb697db5 6617static struct timeval x; x.tv_sec = x.tv_usec;
91e84f96
GM
6618 ;
6619 return 0;
6620}
6621_ACEOF
eb697db5
DN
6622if ac_fn_c_try_compile "$LINENO"; then :
6623 emacs_cv_struct_timeval=yes
91e84f96 6624else
eb697db5 6625 emacs_cv_struct_timeval=no
91e84f96 6626fi
eb697db5 6627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6628fi
eb697db5
DN
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
6630$as_echo "$emacs_cv_struct_timeval" >&6; }
6631HAVE_TIMEVAL=$emacs_cv_struct_timeval
6632if test $emacs_cv_struct_timeval = yes; then
91e84f96 6633
eb697db5 6634$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
91e84f96
GM
6635
6636fi
6637
eb697db5
DN
6638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
6639$as_echo_n "checking for struct exception... " >&6; }
6640if test "${emacs_cv_struct_exception+set}" = set; then :
91e84f96
GM
6641 $as_echo_n "(cached) " >&6
6642else
eb697db5 6643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6644/* end confdefs.h. */
eb697db5 6645#include <math.h>
91e84f96
GM
6646int
6647main ()
6648{
eb697db5 6649static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
91e84f96
GM
6650 ;
6651 return 0;
6652}
6653_ACEOF
eb697db5
DN
6654if ac_fn_c_try_compile "$LINENO"; then :
6655 emacs_cv_struct_exception=yes
91e84f96 6656else
eb697db5
DN
6657 emacs_cv_struct_exception=no
6658fi
6659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6660fi
6661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
6662$as_echo "$emacs_cv_struct_exception" >&6; }
6663HAVE_EXCEPTION=$emacs_cv_struct_exception
6664if test $emacs_cv_struct_exception != yes; then
6665
6666$as_echo "#define NO_MATHERR 1" >>confdefs.h
91e84f96 6667
91e84f96
GM
6668fi
6669
eb697db5
DN
6670for ac_header in sys/socket.h
6671do :
6672 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6673if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
6674 cat >>confdefs.h <<_ACEOF
6675#define HAVE_SYS_SOCKET_H 1
6676_ACEOF
6677
91e84f96 6678fi
91e84f96 6679
eb697db5
DN
6680done
6681
6682for ac_header in net/if.h
6683do :
6684 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
6685#if HAVE_SYS_SOCKET_H
6686#include <sys/socket.h>
6687#endif
6688"
6689if test "x$ac_cv_header_net_if_h" = x""yes; then :
6690 cat >>confdefs.h <<_ACEOF
6691#define HAVE_NET_IF_H 1
91e84f96
GM
6692_ACEOF
6693
6694fi
6695
eb697db5
DN
6696done
6697
6698
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
6700$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
6701if test "${ac_cv_struct_tm+set}" = set; then :
91e84f96
GM
6702 $as_echo_n "(cached) " >&6
6703else
eb697db5 6704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6705/* end confdefs.h. */
eb697db5
DN
6706#include <sys/types.h>
6707#include <time.h>
91e84f96
GM
6708
6709int
6710main ()
6711{
eb697db5
DN
6712struct tm tm;
6713 int *p = &tm.tm_sec;
6714 return !p;
91e84f96
GM
6715 ;
6716 return 0;
6717}
6718_ACEOF
eb697db5
DN
6719if ac_fn_c_try_compile "$LINENO"; then :
6720 ac_cv_struct_tm=time.h
91e84f96 6721else
eb697db5 6722 ac_cv_struct_tm=sys/time.h
91e84f96 6723fi
eb697db5 6724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15e12598 6725fi
eb697db5
DN
6726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
6727$as_echo "$ac_cv_struct_tm" >&6; }
6728if test $ac_cv_struct_tm = sys/time.h; then
6729
6730$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
91e84f96 6731
91e84f96 6732fi
91e84f96 6733
eb697db5
DN
6734ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
6735#include <$ac_cv_struct_tm>
91e84f96 6736
eb697db5
DN
6737"
6738if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
a4f64981 6739
eb697db5
DN
6740cat >>confdefs.h <<_ACEOF
6741#define HAVE_STRUCT_TM_TM_ZONE 1
91e84f96
GM
6742_ACEOF
6743
91e84f96 6744
eb697db5 6745fi
91e84f96 6746
eb697db5 6747if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
91e84f96 6748
eb697db5 6749$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
91e84f96 6750
91e84f96 6751else
eb697db5
DN
6752 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6753"
6754if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6755 ac_have_decl=1
8c5ff6dd 6756else
eb697db5 6757 ac_have_decl=0
8c5ff6dd 6758fi
49ebbd65 6759
eb697db5
DN
6760cat >>confdefs.h <<_ACEOF
6761#define HAVE_DECL_TZNAME $ac_have_decl
91e84f96 6762_ACEOF
eb697db5
DN
6763
6764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6765$as_echo_n "checking for tzname... " >&6; }
6766if test "${ac_cv_var_tzname+set}" = set; then :
5929fbe7
GM
6767 $as_echo_n "(cached) " >&6
6768else
eb697db5 6769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6770/* end confdefs.h. */
eb697db5
DN
6771#include <time.h>
6772#if !HAVE_DECL_TZNAME
6773extern char *tzname[];
91e84f96
GM
6774#endif
6775
a4f64981
GM
6776int
6777main ()
6778{
eb697db5 6779return tzname[0][0];
a4f64981
GM
6780 ;
6781 return 0;
6782}
91e84f96 6783_ACEOF
eb697db5
DN
6784if ac_fn_c_try_link "$LINENO"; then :
6785 ac_cv_var_tzname=yes
91e84f96 6786else
eb697db5 6787 ac_cv_var_tzname=no
91e84f96 6788fi
eb697db5
DN
6789rm -f core conftest.err conftest.$ac_objext \
6790 conftest$ac_exeext conftest.$ac_ext
6791fi
6792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6793$as_echo "$ac_cv_var_tzname" >&6; }
6794 if test $ac_cv_var_tzname = yes; then
5929fbe7 6795
eb697db5
DN
6796$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6797
6798 fi
a4f64981 6799fi
aaa36002 6800
eb697db5
DN
6801ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6802"
6803if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
6804
6805$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
91e84f96
GM
6806
6807fi
eb697db5
DN
6808
6809ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6810#if HAVE_SYS_SOCKET_H
6811#include <sys/socket.h>
6812#endif
6813#if HAVE_NET_IF_H
6814#include <net/if.h>
6815#endif
6816"
6817if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
aaa36002 6818
5929fbe7 6819cat >>confdefs.h <<_ACEOF
eb697db5 6820#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
91e84f96 6821_ACEOF
91e84f96 6822
91e84f96 6823
8c5ff6dd 6824fi
eb697db5
DN
6825ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6826#if HAVE_SYS_SOCKET_H
6827#include <sys/socket.h>
6828#endif
6829#if HAVE_NET_IF_H
6830#include <net/if.h>
91e84f96 6831#endif
eb697db5
DN
6832"
6833if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
49ebbd65 6834
eb697db5
DN
6835cat >>confdefs.h <<_ACEOF
6836#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
5929fbe7 6837_ACEOF
91e84f96 6838
91e84f96 6839
8c5ff6dd 6840fi
eb697db5
DN
6841ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6842#if HAVE_SYS_SOCKET_H
6843#include <sys/socket.h>
91e84f96 6844#endif
eb697db5
DN
6845#if HAVE_NET_IF_H
6846#include <net/if.h>
91e84f96 6847#endif
eb697db5
DN
6848"
6849if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
91e84f96 6850
eb697db5
DN
6851cat >>confdefs.h <<_ACEOF
6852#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
91e84f96 6853_ACEOF
91e84f96 6854
5929fbe7 6855
91e84f96 6856fi
eb697db5
DN
6857ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6858#if HAVE_SYS_SOCKET_H
6859#include <sys/socket.h>
6860#endif
6861#if HAVE_NET_IF_H
6862#include <net/if.h>
6863#endif
6864"
6865if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
cd03c74a 6866
5929fbe7 6867cat >>confdefs.h <<_ACEOF
eb697db5 6868#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
5929fbe7 6869_ACEOF
49ebbd65 6870
91e84f96 6871
91e84f96 6872fi
eb697db5
DN
6873ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6874#if HAVE_SYS_SOCKET_H
6875#include <sys/socket.h>
6876#endif
6877#if HAVE_NET_IF_H
6878#include <net/if.h>
6879#endif
6880"
6881if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
91e84f96
GM
6882
6883cat >>confdefs.h <<_ACEOF
eb697db5 6884#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
91e84f96
GM
6885_ACEOF
6886
5929fbe7 6887
91e84f96
GM
6888fi
6889
5929fbe7 6890
5929fbe7 6891
eb697db5
DN
6892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6893$as_echo_n "checking for function prototypes... " >&6; }
6894if test "$ac_cv_prog_cc_c89" != no; then
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6896$as_echo "yes" >&6; }
5929fbe7 6897
eb697db5 6898$as_echo "#define PROTOTYPES 1" >>confdefs.h
5929fbe7 6899
5929fbe7 6900
eb697db5 6901$as_echo "#define __PROTOTYPES 1" >>confdefs.h
5929fbe7 6902
eb697db5
DN
6903else
6904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6905$as_echo "no" >&6; }
91e84f96
GM
6906fi
6907
eb697db5
DN
6908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6909$as_echo_n "checking for working volatile... " >&6; }
6910if test "${ac_cv_c_volatile+set}" = set; then :
91e84f96
GM
6911 $as_echo_n "(cached) " >&6
6912else
eb697db5 6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6914/* end confdefs.h. */
91e84f96
GM
6915
6916int
6917main ()
6918{
eb697db5
DN
6919
6920volatile int x;
6921int * volatile y = (int *) 0;
6922return !x && !y;
8c5ff6dd
KR
6923 ;
6924 return 0;
91e84f96
GM
6925}
6926_ACEOF
eb697db5
DN
6927if ac_fn_c_try_compile "$LINENO"; then :
6928 ac_cv_c_volatile=yes
91e84f96 6929else
eb697db5 6930 ac_cv_c_volatile=no
91e84f96 6931fi
eb697db5 6932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6933fi
eb697db5
DN
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6935$as_echo "$ac_cv_c_volatile" >&6; }
6936if test $ac_cv_c_volatile = no; then
91e84f96 6937
eb697db5 6938$as_echo "#define volatile /**/" >>confdefs.h
91e84f96 6939
91e84f96
GM
6940fi
6941
eb697db5
DN
6942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6943$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6944if test "${ac_cv_c_const+set}" = set; then :
91e84f96
GM
6945 $as_echo_n "(cached) " >&6
6946else
eb697db5 6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
6948/* end confdefs.h. */
6949
91e84f96
GM
6950int
6951main ()
6952{
eb697db5
DN
6953/* FIXME: Include the comments suggested by Paul. */
6954#ifndef __cplusplus
6955 /* Ultrix mips cc rejects this. */
6956 typedef int charset[2];
6957 const charset cs;
6958 /* SunOS 4.1.1 cc rejects this. */
6959 char const *const *pcpcc;
6960 char **ppc;
6961 /* NEC SVR4.0.2 mips cc rejects this. */
6962 struct point {int x, y;};
6963 static struct point const zero = {0,0};
6964 /* AIX XL C 1.02.0.0 rejects this.
6965 It does not let you subtract one const X* pointer from another in
6966 an arm of an if-expression whose if-part is not a constant
6967 expression */
6968 const char *g = "string";
6969 pcpcc = &g + (g ? g-g : 0);
6970 /* HPUX 7.0 cc rejects these. */
6971 ++pcpcc;
6972 ppc = (char**) pcpcc;
6973 pcpcc = (char const *const *) ppc;
6974 { /* SCO 3.2v4 cc rejects this. */
6975 char *t;
6976 char const *s = 0 ? (char *) 0 : (char const *) 0;
6977
6978 *t++ = 0;
6979 if (s) return 0;
6980 }
6981 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6982 int x[] = {25, 17};
6983 const int *foo = &x[0];
6984 ++foo;
6985 }
6986 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6987 typedef const int *iptr;
6988 iptr p = 0;
6989 ++p;
6990 }
6991 { /* AIX XL C 1.02.0.0 rejects this saying
6992 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6993 struct s { int j; const int *ap[3]; };
6994 struct s *b; b->j = 5;
6995 }
6996 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6997 const int foo = 10;
6998 if (!foo) return 0;
6999 }
7000 return !cs[0] && !zero.x;
7001#endif
7002
91e84f96
GM
7003 ;
7004 return 0;
7005}
7006_ACEOF
eb697db5
DN
7007if ac_fn_c_try_compile "$LINENO"; then :
7008 ac_cv_c_const=yes
91e84f96 7009else
eb697db5 7010 ac_cv_c_const=no
91e84f96 7011fi
eb697db5 7012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 7013fi
eb697db5
DN
7014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7015$as_echo "$ac_cv_c_const" >&6; }
7016if test $ac_cv_c_const = no; then
91e84f96 7017
eb697db5 7018$as_echo "#define const /**/" >>confdefs.h
91e84f96
GM
7019
7020fi
7021
eb697db5
DN
7022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
7023$as_echo_n "checking for void * support... " >&6; }
7024if test "${emacs_cv_void_star+set}" = set; then :
91e84f96
GM
7025 $as_echo_n "(cached) " >&6
7026else
eb697db5 7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
7028/* end confdefs.h. */
7029
91e84f96
GM
7030int
7031main ()
7032{
eb697db5 7033void * foo;
91e84f96
GM
7034 ;
7035 return 0;
7036}
7037_ACEOF
eb697db5
DN
7038if ac_fn_c_try_compile "$LINENO"; then :
7039 emacs_cv_void_star=yes
91e84f96 7040else
eb697db5 7041 emacs_cv_void_star=no
91e84f96 7042fi
eb697db5 7043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 7044fi
eb697db5
DN
7045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
7046$as_echo "$emacs_cv_void_star" >&6; }
7047if test $emacs_cv_void_star = yes; then
7048 $as_echo "#define POINTER_TYPE void" >>confdefs.h
7049
91e84f96 7050else
eb697db5 7051 $as_echo "#define POINTER_TYPE char" >>confdefs.h
15e12598 7052
91e84f96
GM
7053fi
7054
671d409f
AS
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
7056$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
7057if test "${ac_cv_c_bigendian+set}" = set; then :
7058 $as_echo_n "(cached) " >&6
7059else
7060 ac_cv_c_bigendian=unknown
7061 # See if we're dealing with a universal compiler.
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063/* end confdefs.h. */
7064#ifndef __APPLE_CC__
7065 not a universal capable compiler
7066 #endif
7067 typedef int dummy;
7068
7069_ACEOF
7070if ac_fn_c_try_compile "$LINENO"; then :
7071
7072 # Check for potential -arch flags. It is not universal unless
7073 # there are at least two -arch flags with different values.
7074 ac_arch=
7075 ac_prev=
7076 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
7077 if test -n "$ac_prev"; then
7078 case $ac_word in
7079 i?86 | x86_64 | ppc | ppc64)
7080 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
7081 ac_arch=$ac_word
7082 else
7083 ac_cv_c_bigendian=universal
7084 break
7085 fi
7086 ;;
7087 esac
7088 ac_prev=
7089 elif test "x$ac_word" = "x-arch"; then
7090 ac_prev=arch
7091 fi
7092 done
7093fi
7094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7095 if test $ac_cv_c_bigendian = unknown; then
7096 # See if sys/param.h defines the BYTE_ORDER macro.
7097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7098/* end confdefs.h. */
7099#include <sys/types.h>
7100 #include <sys/param.h>
7101
7102int
7103main ()
7104{
7105#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
7106 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
7107 && LITTLE_ENDIAN)
7108 bogus endian macros
7109 #endif
7110
7111 ;
7112 return 0;
7113}
7114_ACEOF
7115if ac_fn_c_try_compile "$LINENO"; then :
7116 # It does; now see whether it defined to BIG_ENDIAN or not.
7117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7118/* end confdefs.h. */
7119#include <sys/types.h>
7120 #include <sys/param.h>
7121
7122int
7123main ()
7124{
7125#if BYTE_ORDER != BIG_ENDIAN
7126 not big endian
7127 #endif
7128
7129 ;
7130 return 0;
7131}
7132_ACEOF
7133if ac_fn_c_try_compile "$LINENO"; then :
7134 ac_cv_c_bigendian=yes
7135else
7136 ac_cv_c_bigendian=no
7137fi
7138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7139fi
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141 fi
7142 if test $ac_cv_c_bigendian = unknown; then
7143 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
7144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7145/* end confdefs.h. */
7146#include <limits.h>
7147
7148int
7149main ()
7150{
7151#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
7152 bogus endian macros
7153 #endif
7154
7155 ;
7156 return 0;
7157}
7158_ACEOF
7159if ac_fn_c_try_compile "$LINENO"; then :
7160 # It does; now see whether it defined to _BIG_ENDIAN or not.
7161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7162/* end confdefs.h. */
7163#include <limits.h>
7164
7165int
7166main ()
7167{
7168#ifndef _BIG_ENDIAN
7169 not big endian
7170 #endif
7171
7172 ;
7173 return 0;
7174}
7175_ACEOF
7176if ac_fn_c_try_compile "$LINENO"; then :
7177 ac_cv_c_bigendian=yes
7178else
7179 ac_cv_c_bigendian=no
7180fi
7181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7182fi
7183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7184 fi
7185 if test $ac_cv_c_bigendian = unknown; then
7186 # Compile a test program.
7187 if test "$cross_compiling" = yes; then :
7188 # Try to guess by grepping values from an object file.
7189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7190/* end confdefs.h. */
7191short int ascii_mm[] =
7192 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
7193 short int ascii_ii[] =
7194 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
7195 int use_ascii (int i) {
7196 return ascii_mm[i] + ascii_ii[i];
7197 }
7198 short int ebcdic_ii[] =
7199 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
7200 short int ebcdic_mm[] =
7201 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
7202 int use_ebcdic (int i) {
7203 return ebcdic_mm[i] + ebcdic_ii[i];
7204 }
7205 extern int foo;
7206
7207int
7208main ()
7209{
7210return use_ascii (foo) == use_ebcdic (foo);
7211 ;
7212 return 0;
7213}
7214_ACEOF
7215if ac_fn_c_try_compile "$LINENO"; then :
7216 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
7217 ac_cv_c_bigendian=yes
7218 fi
7219 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
7220 if test "$ac_cv_c_bigendian" = unknown; then
7221 ac_cv_c_bigendian=no
7222 else
7223 # finding both strings is unlikely to happen, but who knows?
7224 ac_cv_c_bigendian=unknown
7225 fi
7226 fi
7227fi
7228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7229else
7230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7231/* end confdefs.h. */
7232$ac_includes_default
7233int
7234main ()
7235{
7236
7237 /* Are we little or big endian? From Harbison&Steele. */
7238 union
7239 {
7240 long int l;
7241 char c[sizeof (long int)];
7242 } u;
7243 u.l = 1;
7244 return u.c[sizeof (long int) - 1] == 1;
7245
7246 ;
7247 return 0;
7248}
7249_ACEOF
7250if ac_fn_c_try_run "$LINENO"; then :
7251 ac_cv_c_bigendian=no
7252else
7253 ac_cv_c_bigendian=yes
7254fi
7255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7256 conftest.$ac_objext conftest.beam conftest.$ac_ext
7257fi
7258
7259 fi
7260fi
7261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
7262$as_echo "$ac_cv_c_bigendian" >&6; }
7263 case $ac_cv_c_bigendian in #(
7264 yes)
7265 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
7266;; #(
7267 no)
7268 ;; #(
7269 universal)
7270
7271$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
91e84f96 7272
671d409f
AS
7273 ;; #(
7274 *)
036dc38d 7275 as_fn_error "unknown endianness
375a0f65 7276 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
671d409f 7277 esac
91e84f96 7278
eb697db5
DN
7279
7280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7281$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
7282set x ${MAKE-make}
7283ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
036dc38d 7284if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
91e84f96
GM
7285 $as_echo_n "(cached) " >&6
7286else
eb697db5
DN
7287 cat >conftest.make <<\_ACEOF
7288SHELL = /bin/sh
7289all:
7290 @echo '@@@%%%=$(MAKE)=@@@%%%'
91e84f96 7291_ACEOF
036dc38d 7292# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eb697db5
DN
7293case `${MAKE-make} -f conftest.make 2>/dev/null` in
7294 *@@@%%%=?*=@@@%%%*)
7295 eval ac_cv_prog_make_${ac_make}_set=yes;;
7296 *)
7297 eval ac_cv_prog_make_${ac_make}_set=no;;
5929fbe7 7298esac
eb697db5
DN
7299rm -f conftest.make
7300fi
7301if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7303$as_echo "yes" >&6; }
7304 SET_MAKE=
5929fbe7 7305else
eb697db5
DN
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7307$as_echo "no" >&6; }
7308 SET_MAKE="MAKE=${MAKE-make}"
5929fbe7 7309fi
8c5ff6dd
KR
7310
7311
eb697db5
DN
7312DEPFLAGS=
7313MKDEPDIR=":"
7314deps_frag=deps.mk
7315if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
7316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
7317$as_echo_n "checking whether we are using GNU Make... " >&6; }
7318 HAVE_GNU_MAKE=no
7319 testval=`make --version 2>/dev/null | grep 'GNU Make'`
7320 if test "x$testval" != x; then
7321 HAVE_GNU_MAKE=yes
7322 else
7323 ac_enable_autodepend=no
7324 fi
7325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
7326$as_echo "$HAVE_GNU_MAKE" >&6; }
7327 if test $HAVE_GNU_MAKE = yes; then
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
7329$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
7330 SAVE_CFLAGS="$CFLAGS"
7331 CFLAGS="$CFLAGS -MMD -MF deps.d"
7332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
7333/* end confdefs.h. */
7334
91e84f96
GM
7335int
7336main ()
7337{
eb697db5 7338
91e84f96
GM
7339 ;
7340 return 0;
7341}
7342_ACEOF
eb697db5 7343if ac_fn_c_try_compile "$LINENO"; then :
91e84f96 7344
91e84f96 7345else
eb697db5
DN
7346 ac_enable_autodepend=no
7347fi
7348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7349 CFLAGS="$SAVE_CFLAGS"
7350 test -f deps.d || ac_enable_autodepend=no
7351 rm -rf deps.d
7352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
7353$as_echo "$ac_enable_autodepend" >&6; }
7354 fi
7355 if test $ac_enable_autodepend = yes; then
7356 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
7357 ## In parallel builds, another make might create depdir between
7358 ## the first test and mkdir, so stick another test on the end.
7359 ## Or use mkinstalldirs? mkdir -p is not portable.
7360 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
7361 deps_frag=autodeps.mk
7362 fi
91e84f96 7363fi
eb697db5 7364deps_frag=$srcdir/src/$deps_frag
91e84f96 7365
91e84f96 7366
91e84f96 7367
eb697db5
DN
7368
7369
7370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
7371$as_echo_n "checking for long file names... " >&6; }
7372if test "${ac_cv_sys_long_file_names+set}" = set; then :
91e84f96
GM
7373 $as_echo_n "(cached) " >&6
7374else
eb697db5
DN
7375 ac_cv_sys_long_file_names=yes
7376# Test for long file names in all the places we know might matter:
7377# . the current directory, where building will happen
7378# $prefix/lib where we will be installing things
7379# $exec_prefix/lib likewise
7380# $TMPDIR if set, where it might want to write temporary files
7381# /tmp where it might want to write temporary files
7382# /var/tmp likewise
7383# /usr/tmp likewise
7384for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
7385 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
7386 # in the usual case where exec_prefix is '${prefix}'.
7387 case $ac_dir in #(
7388 . | /* | ?:[\\/]*) ;; #(
7389 *) continue;;
7390 esac
7391 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
7392 ac_xdir=$ac_dir/cf$$
7393 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
7394 ac_tf1=$ac_xdir/conftest9012345
7395 ac_tf2=$ac_xdir/conftest9012346
7396 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
7397 ac_cv_sys_long_file_names=no
7398 rm -f -r "$ac_xdir" 2>/dev/null
7399 test $ac_cv_sys_long_file_names = no && break
91e84f96 7400done
91e84f96 7401fi
eb697db5
DN
7402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
7403$as_echo "$ac_cv_sys_long_file_names" >&6; }
7404if test $ac_cv_sys_long_file_names = yes; then
91e84f96 7405
eb697db5 7406$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
91e84f96 7407
91e84f96
GM
7408fi
7409
91e84f96 7410
eb697db5 7411#### Choose a window system.
91e84f96 7412
eb697db5
DN
7413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
7414$as_echo_n "checking for X... " >&6; }
91e84f96 7415
91e84f96 7416
eb697db5
DN
7417# Check whether --with-x was given.
7418if test "${with_x+set}" = set; then :
7419 withval=$with_x;
7420fi
91e84f96 7421
eb697db5
DN
7422# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7423if test "x$with_x" = xno; then
7424 # The user explicitly disabled X.
7425 have_x=disabled
91e84f96 7426else
eb697db5 7427 case $x_includes,$x_libraries in #(
036dc38d 7428 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
eb697db5
DN
7429 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
7430 $as_echo_n "(cached) " >&6
7431else
7432 # One or both of the vars are not set, and there is no cached value.
7433ac_x_includes=no ac_x_libraries=no
7434rm -f -r conftest.dir
7435if mkdir conftest.dir; then
7436 cd conftest.dir
7437 cat >Imakefile <<'_ACEOF'
7438incroot:
7439 @echo incroot='${INCROOT}'
7440usrlibdir:
7441 @echo usrlibdir='${USRLIBDIR}'
7442libdir:
7443 @echo libdir='${LIBDIR}'
7444_ACEOF
7445 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
036dc38d 7446 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eb697db5
DN
7447 for ac_var in incroot usrlibdir libdir; do
7448 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7449 done
7450 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7451 for ac_extension in a so sl dylib la dll; do
7452 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7453 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7454 ac_im_usrlibdir=$ac_im_libdir; break
7455 fi
7456 done
7457 # Screen out bogus values from the imake configuration. They are
7458 # bogus both because they are the default anyway, and because
7459 # using them would break gcc on systems where it needs fixed includes.
7460 case $ac_im_incroot in
7461 /usr/include) ac_x_includes= ;;
7462 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7463 esac
7464 case $ac_im_usrlibdir in
7465 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
7466 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7467 esac
7468 fi
7469 cd ..
7470 rm -f -r conftest.dir
91e84f96
GM
7471fi
7472
eb697db5
DN
7473# Standard set of common directories for X headers.
7474# Check X11 before X11Rn because it is often a symlink to the current release.
7475ac_x_header_dirs='
7476/usr/X11/include
7477/usr/X11R7/include
7478/usr/X11R6/include
7479/usr/X11R5/include
7480/usr/X11R4/include
91e84f96 7481
eb697db5
DN
7482/usr/include/X11
7483/usr/include/X11R7
7484/usr/include/X11R6
7485/usr/include/X11R5
7486/usr/include/X11R4
91e84f96 7487
eb697db5
DN
7488/usr/local/X11/include
7489/usr/local/X11R7/include
7490/usr/local/X11R6/include
7491/usr/local/X11R5/include
7492/usr/local/X11R4/include
91e84f96 7493
eb697db5
DN
7494/usr/local/include/X11
7495/usr/local/include/X11R7
7496/usr/local/include/X11R6
7497/usr/local/include/X11R5
7498/usr/local/include/X11R4
91e84f96 7499
eb697db5
DN
7500/usr/X386/include
7501/usr/x386/include
7502/usr/XFree86/include/X11
91e84f96 7503
eb697db5
DN
7504/usr/include
7505/usr/local/include
7506/usr/unsupported/include
7507/usr/athena/include
7508/usr/local/x11r5/include
7509/usr/lpp/Xamples/include
91e84f96 7510
eb697db5
DN
7511/usr/openwin/include
7512/usr/openwin/share/include'
8c5ff6dd 7513
eb697db5
DN
7514if test "$ac_x_includes" = no; then
7515 # Guess where to find include files, by looking for Xlib.h.
7516 # First, try using that file with no special directory specified.
7517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 7518/* end confdefs.h. */
eb697db5 7519#include <X11/Xlib.h>
91e84f96 7520_ACEOF
eb697db5
DN
7521if ac_fn_c_try_cpp "$LINENO"; then :
7522 # We can compile using X headers with no special include directory.
7523ac_x_includes=
91e84f96 7524else
eb697db5
DN
7525 for ac_dir in $ac_x_header_dirs; do
7526 if test -r "$ac_dir/X11/Xlib.h"; then
7527 ac_x_includes=$ac_dir
7528 break
7529 fi
7530done
91e84f96 7531fi
375a0f65 7532rm -f conftest.err conftest.$ac_ext
eb697db5 7533fi # $ac_x_includes = no
91e84f96 7534
eb697db5
DN
7535if test "$ac_x_libraries" = no; then
7536 # Check for the libraries.
7537 # See if we find them without any special options.
7538 # Don't add to $LIBS permanently.
7539 ac_save_LIBS=$LIBS
7540 LIBS="-lX11 $LIBS"
7541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7542/* end confdefs.h. */
7543#include <X11/Xlib.h>
7544int
7545main ()
7546{
7547XrmInitialize ()
7548 ;
7549 return 0;
7550}
5929fbe7 7551_ACEOF
eb697db5
DN
7552if ac_fn_c_try_link "$LINENO"; then :
7553 LIBS=$ac_save_LIBS
7554# We can link X programs with no special library path.
7555ac_x_libraries=
91e84f96 7556else
eb697db5
DN
7557 LIBS=$ac_save_LIBS
7558for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7559do
7560 # Don't even attempt the hair of trying to link an X program!
7561 for ac_extension in a so sl dylib la dll; do
7562 if test -r "$ac_dir/libX11.$ac_extension"; then
7563 ac_x_libraries=$ac_dir
7564 break 2
7565 fi
7566 done
7567done
91e84f96 7568fi
eb697db5
DN
7569rm -f core conftest.err conftest.$ac_objext \
7570 conftest$ac_exeext conftest.$ac_ext
7571fi # $ac_x_libraries = no
91e84f96 7572
eb697db5
DN
7573case $ac_x_includes,$ac_x_libraries in #(
7574 no,* | *,no | *\'*)
7575 # Didn't find X, or a directory has "'" in its name.
7576 ac_cv_have_x="have_x=no";; #(
7577 *)
7578 # Record where we found X for the cache.
7579 ac_cv_have_x="have_x=yes\
7580 ac_x_includes='$ac_x_includes'\
7581 ac_x_libraries='$ac_x_libraries'"
5929fbe7 7582esac
91e84f96 7583fi
eb697db5
DN
7584;; #(
7585 *) have_x=yes;;
7586 esac
7587 eval "$ac_cv_have_x"
7588fi # $with_x != no
91e84f96 7589
eb697db5
DN
7590if test "$have_x" != yes; then
7591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7592$as_echo "$have_x" >&6; }
7593 no_x=yes
7594else
7595 # If each of the values was on the command line, it overrides each guess.
7596 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7597 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7598 # Update the cache value to reflect the command line values.
7599 ac_cv_have_x="have_x=yes\
7600 ac_x_includes='$x_includes'\
7601 ac_x_libraries='$x_libraries'"
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7603$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
91e84f96
GM
7604fi
7605
eb697db5
DN
7606if test "$no_x" = yes; then
7607 window_system=none
7608else
7609 window_system=x11
7610fi
91e84f96 7611
eb697db5
DN
7612## Workaround for bug in autoconf <= 2.62.
7613## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7614## No need to do anything special for these standard directories.
7615if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
91e84f96 7616
eb697db5 7617 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
4e569696 7618
eb697db5 7619fi
4e569696 7620
eb697db5
DN
7621LD_SWITCH_X_SITE_AUX=
7622LD_SWITCH_X_SITE_AUX_RPATH=
7623if test "${x_libraries}" != NONE; then
7624 if test -n "${x_libraries}"; then
7625 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7626 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7627 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
7628 fi
7629 x_default_search_path=""
7630 x_search_path=${x_libraries}
7631 if test -z "${x_search_path}"; then
7632 x_search_path=/usr/lib
7633 fi
7634 for x_library in `echo ${x_search_path}: | \
7635 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7636 x_search_path="\
7637${x_library}/X11/%L/%T/%N%C%S:\
7638${x_library}/X11/%l/%T/%N%C%S:\
7639${x_library}/X11/%T/%N%C%S:\
7640${x_library}/X11/%L/%T/%N%S:\
7641${x_library}/X11/%l/%T/%N%S:\
7642${x_library}/X11/%T/%N%S"
7643 if test x"${x_default_search_path}" = x; then
7644 x_default_search_path=${x_search_path}
7645 else
7646 x_default_search_path="${x_search_path}:${x_default_search_path}"
4e569696 7647 fi
eb697db5
DN
7648 done
7649fi
e6df49e4 7650
91e84f96
GM
7651
7652
eb697db5
DN
7653if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7654 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
7655fi
91e84f96 7656
eb697db5
DN
7657if test x"${x_includes}" = x; then
7658 bitmapdir=/usr/include/X11/bitmaps
7659else
7660 # accumulate include directories that have X11 bitmap subdirectories
7661 bmd_acc="dummyval"
7662 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7663 if test -d "${bmd}/X11/bitmaps"; then
7664 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7665 fi
7666 if test -d "${bmd}/bitmaps"; then
7667 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7668 fi
7669 done
7670 if test ${bmd_acc} != "dummyval"; then
7671 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7672 fi
7673fi
91e84f96 7674
eb697db5
DN
7675HAVE_NS=no
7676NS_IMPL_COCOA=no
7677NS_IMPL_GNUSTEP=no
7678tmp_CPPFLAGS="$CPPFLAGS"
7679tmp_CFLAGS="$CFLAGS"
7680CPPFLAGS="$CPPFLAGS -x objective-c"
7681CFLAGS="$CFLAGS -x objective-c"
e6cfa7c3 7682TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
eb697db5
DN
7683if test "${with_ns}" != no; then
7684 if test "${opsys}" = darwin; then
7685 NS_IMPL_COCOA=yes
7686 ns_appdir=`pwd`/nextstep/Emacs.app/
7687 ns_appbindir=${ns_appdir}Contents/MacOS/
7688 ns_appresdir=${ns_appdir}Contents/Resources
7689 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7690 elif test -f $GNUSTEP_CONFIG_FILE; then
7691 NS_IMPL_GNUSTEP=yes
7692 ns_appdir=`pwd`/nextstep/Emacs.app/
7693 ns_appbindir=${ns_appdir}
7694 ns_appresdir=${ns_appdir}Resources
7695 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7696 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7697 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7698 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
7699 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
7700 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
7701 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
7702 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
7703 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
7704 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7705 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
eb697db5
DN
7706 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
7707 LIB_STANDARD=
7708 START_FILES=
7709 TEMACS_LDFLAGS2=
7710 fi
7711 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7712if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7713 HAVE_NS=yes
7714else
036dc38d 7715 as_fn_error "\`--with-ns' was specified, but the include
eb697db5
DN
7716 files are missing or cannot be compiled." "$LINENO" 5
7717fi
91e84f96
GM
7718
7719
eb697db5
DN
7720 NS_HAVE_NSINTEGER=yes
7721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7722/* end confdefs.h. */
7723#include <Foundation/NSObjCRuntime.h>
7724int
7725main ()
7726{
7727NSInteger i;
7728 ;
7729 return 0;
7730}
7731_ACEOF
7732if ac_fn_c_try_compile "$LINENO"; then :
7733 ns_have_nsinteger=yes
7734else
7735 ns_have_nsinteger=no
7736fi
7737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7738 if test $ns_have_nsinteger = no; then
7739 NS_HAVE_NSINTEGER=no
7740 fi
7741fi
91e84f96
GM
7742
7743
eb697db5
DN
7744ns_frag=/dev/null
7745NS_OBJ=
7746NS_SUPPORT=
7747if test "${HAVE_NS}" = yes; then
7748 window_system=nextstep
7749 with_xft=no
7750 # set up packaging dirs
7751 exec_prefix=${ns_appbindir}
7752 libexecdir=${ns_appbindir}/libexec
7753 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7754 prefix=${ns_appresdir}
7755 fi
7756 ns_frag=$srcdir/src/ns.mk
7757 NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
7758 NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc"
7759fi
7760CFLAGS="$tmp_CFLAGS"
7761CPPFLAGS="$tmp_CPPFLAGS"
91e84f96
GM
7762
7763
7764
7765
7766
eb697db5
DN
7767case "${window_system}" in
7768 x11 )
7769 HAVE_X_WINDOWS=yes
7770 HAVE_X11=yes
7771 case "${with_x_toolkit}" in
7772 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7773 motif ) USE_X_TOOLKIT=MOTIF ;;
7774 gtk ) with_gtk=yes
7775 USE_X_TOOLKIT=none ;;
e547b051
J
7776 gtk3 ) with_gtk3=yes
7777 USE_X_TOOLKIT=none ;;
eb697db5
DN
7778 no ) USE_X_TOOLKIT=none ;;
7779 * ) USE_X_TOOLKIT=maybe ;;
7780 esac
7781 ;;
7782 nextstep | none )
7783 HAVE_X_WINDOWS=no
7784 HAVE_X11=no
7785 USE_X_TOOLKIT=none
7786 ;;
7787esac
91e84f96 7788
eb697db5
DN
7789if test "$window_system" = none && test "X$with_x" != "Xno"; then
7790 # Extract the first word of "X", so it can be a program name with args.
7791set dummy X; ac_word=$2
7792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7793$as_echo_n "checking for $ac_word... " >&6; }
7794if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
7795 $as_echo_n "(cached) " >&6
7796else
7797 if test -n "$HAVE_XSERVER"; then
7798 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
7799else
7800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7801for as_dir in $PATH
7802do
7803 IFS=$as_save_IFS
7804 test -z "$as_dir" && as_dir=.
7805 for ac_exec_ext in '' $ac_executable_extensions; do
7806 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7807 ac_cv_prog_HAVE_XSERVER="true"
7808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7809 break 2
7810 fi
7811done
7812 done
7813IFS=$as_save_IFS
91e84f96 7814
eb697db5
DN
7815 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
7816fi
7817fi
7818HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7819if test -n "$HAVE_XSERVER"; then
7820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7821$as_echo "$HAVE_XSERVER" >&6; }
7822else
7823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7824$as_echo "no" >&6; }
7825fi
91e84f96
GM
7826
7827
eb697db5
DN
7828 if test "$HAVE_XSERVER" = true ||
7829 test -n "$DISPLAY" ||
7830 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
036dc38d 7831 as_fn_error "You seem to be running X, but no X development libraries
eb697db5
DN
7832were found. You should install the relevant development files for X
7833and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7834sure you have development files for image handling, i.e.
7835tiff, gif, jpeg, png and xpm.
7836If you are sure you want Emacs compiled without X window support, pass
7837 --without-x
7838to configure." "$LINENO" 5
7839 fi
7840fi
91e84f96 7841
eb697db5
DN
7842### If we're using X11, we should use the X menu package.
7843HAVE_MENUS=no
7844case ${HAVE_X11} in
7845 yes ) HAVE_MENUS=yes ;;
7846esac
91e84f96 7847
eb697db5
DN
7848# Do the opsystem or machine files prohibit the use of the GNU malloc?
7849# Assume not, until told otherwise.
7850GNU_MALLOC=yes
7851doug_lea_malloc=yes
7852ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7853if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
91e84f96 7854
eb697db5
DN
7855else
7856 doug_lea_malloc=no
7857fi
91e84f96 7858
eb697db5
DN
7859ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7860if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
91e84f96 7861
eb697db5
DN
7862else
7863 doug_lea_malloc=no
7864fi
91e84f96 7865
eb697db5
DN
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7867$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7868if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
7869 $as_echo_n "(cached) " >&6
7870else
7871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7872/* end confdefs.h. */
7873extern void (* __after_morecore_hook)();
7874int
7875main ()
7876{
7877__after_morecore_hook = 0
7878 ;
7879 return 0;
7880}
7881_ACEOF
7882if ac_fn_c_try_link "$LINENO"; then :
7883 emacs_cv_var___after_morecore_hook=yes
7884else
7885 emacs_cv_var___after_morecore_hook=no
7886fi
7887rm -f core conftest.err conftest.$ac_objext \
7888 conftest$ac_exeext conftest.$ac_ext
7889fi
7890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7891$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7892if test $emacs_cv_var___after_morecore_hook = no; then
7893 doug_lea_malloc=no
7894fi
91e84f96 7895
e7586c7a
GM
7896
7897system_malloc=no
7898case "$opsys" in
7899 ## darwin ld insists on the use of malloc routines in the System framework.
7900 darwin|sol2-10) system_malloc=yes ;;
7901esac
7902
eb697db5 7903if test "${system_malloc}" = "yes"; then
e7586c7a
GM
7904
7905$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
7906
eb697db5
DN
7907 GNU_MALLOC=no
7908 GNU_MALLOC_reason="
7909 (The GNU allocators don't work with this system configuration.)"
7910 GMALLOC_OBJ=
7911 VMLIMIT_OBJ=
7912else
7913 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
7914 VMLIMIT_OBJ=vm-limit.o
7915fi
91e84f96
GM
7916
7917
7918
eb697db5
DN
7919if test "$doug_lea_malloc" = "yes" ; then
7920 if test "$GNU_MALLOC" = yes ; then
7921 GNU_MALLOC_reason="
7922 (Using Doug Lea's new malloc from the GNU C Library.)"
7923 fi
91e84f96 7924
eb697db5 7925$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
91e84f96
GM
7926
7927
eb697db5
DN
7928 ## Use mmap directly for allocating larger buffers.
7929 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
7930 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
7931 ## Does the AC_FUNC_MMAP test below make this check unecessary?
7932 case "$opsys" in
7933 gnu*) REL_ALLOC=no ;;
7934 esac
7935fi
91e84f96 7936
eb697db5
DN
7937if test x"${REL_ALLOC}" = x; then
7938 REL_ALLOC=${GNU_MALLOC}
7939fi
91e84f96 7940
e7586c7a
GM
7941use_mmap_for_buffers=no
7942case "$opsys" in
7943 freebsd|irix6-5) use_mmap_for_buffers=yes ;;
7944esac
91e84f96
GM
7945
7946
7947
7948
eb697db5
DN
7949 for ac_header in $ac_header_list
7950do :
7951 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7952ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7953"
036dc38d
LMI
7954eval as_val=\$$as_ac_Header
7955 if test "x$as_val" = x""yes; then :
eb697db5
DN
7956 cat >>confdefs.h <<_ACEOF
7957#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7958_ACEOF
91e84f96 7959
eb697db5 7960fi
91e84f96 7961
eb697db5 7962done
91e84f96
GM
7963
7964
7965
7966
7967
7968
7969
7970
eb697db5
DN
7971for ac_func in getpagesize
7972do :
7973 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7974if test "x$ac_cv_func_getpagesize" = x""yes; then :
7975 cat >>confdefs.h <<_ACEOF
7976#define HAVE_GETPAGESIZE 1
7977_ACEOF
91e84f96 7978
eb697db5
DN
7979fi
7980done
91e84f96 7981
eb697db5
DN
7982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7983$as_echo_n "checking for working mmap... " >&6; }
7984if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7985 $as_echo_n "(cached) " >&6
7986else
7987 if test "$cross_compiling" = yes; then :
7988 ac_cv_func_mmap_fixed_mapped=no
7989else
7990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7991/* end confdefs.h. */
7992$ac_includes_default
7993/* malloc might have been renamed as rpl_malloc. */
7994#undef malloc
91e84f96 7995
eb697db5
DN
7996/* Thanks to Mike Haertel and Jim Avera for this test.
7997 Here is a matrix of mmap possibilities:
7998 mmap private not fixed
7999 mmap private fixed at somewhere currently unmapped
8000 mmap private fixed at somewhere already mapped
8001 mmap shared not fixed
8002 mmap shared fixed at somewhere currently unmapped
8003 mmap shared fixed at somewhere already mapped
8004 For private mappings, we should verify that changes cannot be read()
8005 back from the file, nor mmap's back from the file at a different
8006 address. (There have been systems where private was not correctly
8007 implemented like the infamous i386 svr4.0, and systems where the
8008 VM page cache was not coherent with the file system buffer cache
8009 like early versions of FreeBSD and possibly contemporary NetBSD.)
8010 For shared mappings, we should conversely verify that changes get
8011 propagated back to all the places they're supposed to be.
91e84f96 8012
eb697db5
DN
8013 Grep wants private fixed already mapped.
8014 The main things grep needs to know about mmap are:
8015 * does it exist and is it safe to write into the mmap'd area
8016 * how to use it (BSD variants) */
91e84f96 8017
eb697db5
DN
8018#include <fcntl.h>
8019#include <sys/mman.h>
91e84f96 8020
eb697db5
DN
8021#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
8022char *malloc ();
8023#endif
91e84f96 8024
eb697db5
DN
8025/* This mess was copied from the GNU getpagesize.h. */
8026#ifndef HAVE_GETPAGESIZE
8027# ifdef _SC_PAGESIZE
8028# define getpagesize() sysconf(_SC_PAGESIZE)
8029# else /* no _SC_PAGESIZE */
8030# ifdef HAVE_SYS_PARAM_H
8031# include <sys/param.h>
8032# ifdef EXEC_PAGESIZE
8033# define getpagesize() EXEC_PAGESIZE
8034# else /* no EXEC_PAGESIZE */
8035# ifdef NBPG
8036# define getpagesize() NBPG * CLSIZE
8037# ifndef CLSIZE
8038# define CLSIZE 1
8039# endif /* no CLSIZE */
8040# else /* no NBPG */
8041# ifdef NBPC
8042# define getpagesize() NBPC
8043# else /* no NBPC */
8044# ifdef PAGESIZE
8045# define getpagesize() PAGESIZE
8046# endif /* PAGESIZE */
8047# endif /* no NBPC */
8048# endif /* no NBPG */
8049# endif /* no EXEC_PAGESIZE */
8050# else /* no HAVE_SYS_PARAM_H */
8051# define getpagesize() 8192 /* punt totally */
8052# endif /* no HAVE_SYS_PARAM_H */
8053# endif /* no _SC_PAGESIZE */
91e84f96 8054
eb697db5 8055#endif /* no HAVE_GETPAGESIZE */
91e84f96 8056
eb697db5
DN
8057int
8058main ()
8059{
8060 char *data, *data2, *data3;
c05c21ed 8061 const char *cdata2;
eb697db5
DN
8062 int i, pagesize;
8063 int fd, fd2;
91e84f96 8064
eb697db5 8065 pagesize = getpagesize ();
91e84f96 8066
eb697db5
DN
8067 /* First, make a file with some known garbage in it. */
8068 data = (char *) malloc (pagesize);
8069 if (!data)
8070 return 1;
8071 for (i = 0; i < pagesize; ++i)
8072 *(data + i) = rand ();
8073 umask (0);
8074 fd = creat ("conftest.mmap", 0600);
8075 if (fd < 0)
8076 return 2;
8077 if (write (fd, data, pagesize) != pagesize)
8078 return 3;
8079 close (fd);
91e84f96 8080
eb697db5
DN
8081 /* Next, check that the tail of a page is zero-filled. File must have
8082 non-zero length, otherwise we risk SIGBUS for entire page. */
8083 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
8084 if (fd2 < 0)
8085 return 4;
c05c21ed
JV
8086 cdata2 = "";
8087 if (write (fd2, cdata2, 1) != 1)
eb697db5 8088 return 5;
c05c21ed 8089 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
eb697db5
DN
8090 if (data2 == MAP_FAILED)
8091 return 6;
8092 for (i = 0; i < pagesize; ++i)
8093 if (*(data2 + i))
8094 return 7;
8095 close (fd2);
8096 if (munmap (data2, pagesize))
8097 return 8;
91e84f96 8098
eb697db5
DN
8099 /* Next, try to mmap the file at a fixed address which already has
8100 something else allocated at it. If we can, also make sure that
8101 we see the same garbage. */
8102 fd = open ("conftest.mmap", O_RDWR);
8103 if (fd < 0)
8104 return 9;
8105 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8106 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8107 return 10;
8108 for (i = 0; i < pagesize; ++i)
8109 if (*(data + i) != *(data2 + i))
8110 return 11;
91e84f96 8111
eb697db5
DN
8112 /* Finally, make sure that changes to the mapped area do not
8113 percolate back to the file as seen by read(). (This is a bug on
8114 some variants of i386 svr4.0.) */
8115 for (i = 0; i < pagesize; ++i)
8116 *(data2 + i) = *(data2 + i) + 1;
8117 data3 = (char *) malloc (pagesize);
8118 if (!data3)
8119 return 12;
8120 if (read (fd, data3, pagesize) != pagesize)
8121 return 13;
8122 for (i = 0; i < pagesize; ++i)
8123 if (*(data + i) != *(data3 + i))
8124 return 14;
8125 close (fd);
8126 return 0;
8127}
8128_ACEOF
8129if ac_fn_c_try_run "$LINENO"; then :
8130 ac_cv_func_mmap_fixed_mapped=yes
8131else
8132 ac_cv_func_mmap_fixed_mapped=no
8133fi
8134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8135 conftest.$ac_objext conftest.beam conftest.$ac_ext
8136fi
91e84f96 8137
eb697db5
DN
8138fi
8139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
8140$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
8141if test $ac_cv_func_mmap_fixed_mapped = yes; then
91e84f96 8142
eb697db5 8143$as_echo "#define HAVE_MMAP 1" >>confdefs.h
91e84f96 8144
eb697db5
DN
8145fi
8146rm -f conftest.mmap conftest.txt
91e84f96 8147
eb697db5 8148if test $use_mmap_for_buffers = yes; then
e7586c7a
GM
8149
8150$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
8151
eb697db5
DN
8152 REL_ALLOC=no
8153fi
91e84f96 8154
eb697db5 8155LIBS="$LIBS_SYSTEM $LIBS"
91e84f96 8156
eb697db5
DN
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
8158$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
8159if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
5929fbe7 8160 $as_echo_n "(cached) " >&6
8c5ff6dd 8161else
eb697db5
DN
8162 ac_check_lib_save_LIBS=$LIBS
8163LIBS="-ldnet $LIBS"
8164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 8165/* end confdefs.h. */
91e84f96 8166
5929fbe7
GM
8167/* Override any GCC internal prototype to avoid an error.
8168 Use char because int might match the return type of a GCC
8169 builtin and then its argument prototype would still apply. */
8170#ifdef __cplusplus
8171extern "C"
8172#endif
eb697db5 8173char dnet_ntoa ();
5929fbe7
GM
8174int
8175main ()
8176{
eb697db5 8177return dnet_ntoa ();
5929fbe7
GM
8178 ;
8179 return 0;
8180}
8181_ACEOF
eb697db5
DN
8182if ac_fn_c_try_link "$LINENO"; then :
8183 ac_cv_lib_dnet_dnet_ntoa=yes
5929fbe7 8184else
eb697db5 8185 ac_cv_lib_dnet_dnet_ntoa=no
5929fbe7 8186fi
eb697db5
DN
8187rm -f core conftest.err conftest.$ac_objext \
8188 conftest$ac_exeext conftest.$ac_ext
8189LIBS=$ac_check_lib_save_LIBS
5929fbe7 8190fi
eb697db5
DN
8191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8192$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
8193if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
5929fbe7 8194 cat >>confdefs.h <<_ACEOF
eb697db5 8195#define HAVE_LIBDNET 1
5929fbe7 8196_ACEOF
91e84f96 8197
eb697db5 8198 LIBS="-ldnet $LIBS"
91e84f96 8199
a4f64981 8200fi
91e84f96
GM
8201
8202
eb697db5
DN
8203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
8204$as_echo_n "checking for main in -lXbsd... " >&6; }
8205if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
91e84f96
GM
8206 $as_echo_n "(cached) " >&6
8207else
eb697db5
DN
8208 ac_check_lib_save_LIBS=$LIBS
8209LIBS="-lXbsd $LIBS"
8210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8211/* end confdefs.h. */
91e84f96 8212
91e84f96 8213
eb697db5
DN
8214int
8215main ()
8216{
8217return main ();
8218 ;
8219 return 0;
8220}
5929fbe7 8221_ACEOF
eb697db5
DN
8222if ac_fn_c_try_link "$LINENO"; then :
8223 ac_cv_lib_Xbsd_main=yes
a4f64981 8224else
eb697db5 8225 ac_cv_lib_Xbsd_main=no
8c5ff6dd 8226fi
eb697db5
DN
8227rm -f core conftest.err conftest.$ac_objext \
8228 conftest$ac_exeext conftest.$ac_ext
8229LIBS=$ac_check_lib_save_LIBS
5929fbe7 8230fi
eb697db5
DN
8231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
8232$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
8233if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
8234 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
8c5ff6dd 8235fi
91e84f96 8236
8c5ff6dd 8237
eb697db5
DN
8238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
8239$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
8240if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
15e12598
VB
8241 $as_echo_n "(cached) " >&6
8242else
eb697db5
DN
8243 ac_check_lib_save_LIBS=$LIBS
8244LIBS="-lpthreads $LIBS"
8245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 8246/* end confdefs.h. */
91e84f96
GM
8247
8248/* Override any GCC internal prototype to avoid an error.
8249 Use char because int might match the return type of a GCC
8250 builtin and then its argument prototype would still apply. */
8251#ifdef __cplusplus
8252extern "C"
8253#endif
eb697db5 8254char cma_open ();
91e84f96
GM
8255int
8256main ()
8257{
eb697db5 8258return cma_open ();
91e84f96
GM
8259 ;
8260 return 0;
8261}
8262_ACEOF
eb697db5
DN
8263if ac_fn_c_try_link "$LINENO"; then :
8264 ac_cv_lib_pthreads_cma_open=yes
91e84f96 8265else
eb697db5 8266 ac_cv_lib_pthreads_cma_open=no
91e84f96 8267fi
eb697db5
DN
8268rm -f core conftest.err conftest.$ac_objext \
8269 conftest$ac_exeext conftest.$ac_ext
8270LIBS=$ac_check_lib_save_LIBS
91e84f96 8271fi
eb697db5
DN
8272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
8273$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
8274if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
91e84f96 8275 cat >>confdefs.h <<_ACEOF
eb697db5 8276#define HAVE_LIBPTHREADS 1
91e84f96
GM
8277_ACEOF
8278
eb697db5 8279 LIBS="-lpthreads $LIBS"
5929fbe7 8280
91e84f96 8281fi
91e84f96
GM
8282
8283
eb697db5
DN
8284## Note: when using cpp in s/aix4.2.h, this definition depended on
8285## HAVE_LIBPTHREADS. That was not defined earlier in configure when
8286## the system file was sourced. Hence the value of LIBS_SYSTEM
8287## added to LIBS in configure would never contain the pthreads part,
8288## but the value used in Makefiles might. FIXME?
8289##
8290## -lpthreads seems to be necessary for Xlib in X11R6, and should
8291## be harmless on older versions of X where it happens to exist.
8292test "$opsys" = "aix4-2" && \
8293 test $ac_cv_lib_pthreads_cma_open = yes && \
8294 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
91e84f96 8295
5929fbe7 8296
eb697db5
DN
8297case ${host_os} in
8298aix*)
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
8300$as_echo_n "checking for -bbigtoc option... " >&6; }
8301if test "${gdb_cv_bigtoc+set}" = set; then :
91e84f96 8302 $as_echo_n "(cached) " >&6
91e84f96 8303else
a4f64981 8304
eb697db5
DN
8305 case $GCC in
8306 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8307 *) gdb_cv_bigtoc=-bbigtoc ;;
8308 esac
a4f64981 8309
eb697db5
DN
8310 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8312/* end confdefs.h. */
8c5ff6dd 8313
eb697db5
DN
8314int
8315main ()
8316{
8317int i;
8318 ;
8319 return 0;
8320}
91e84f96 8321_ACEOF
eb697db5 8322if ac_fn_c_try_link "$LINENO"; then :
8c5ff6dd 8323
eb697db5
DN
8324else
8325 gdb_cv_bigtoc=
8326fi
8327rm -f core conftest.err conftest.$ac_objext \
8328 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 8329
eb697db5
DN
8330fi
8331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
8332$as_echo "$gdb_cv_bigtoc" >&6; }
8333 ;;
91e84f96 8334esac
8c5ff6dd 8335
eb697db5
DN
8336# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
8337# used for the tests that follow. We set them back to REAL_CFLAGS and
8338# REAL_CPPFLAGS later on.
8c5ff6dd 8339
e6cfa7c3 8340REAL_CFLAGS="$CFLAGS"
eb697db5 8341REAL_CPPFLAGS="$CPPFLAGS"
8c5ff6dd 8342
eb697db5
DN
8343if test "${HAVE_X11}" = "yes"; then
8344 DEFS="$C_SWITCH_X_SITE $DEFS"
8345 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
e7586c7a 8346 LIBS="-lX11 $LIBS"
eb697db5
DN
8347 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
8348 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
8c5ff6dd 8349
eb697db5
DN
8350 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
8351 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
8352 # but it's more convenient here to set LD_RUN_PATH
8353 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
8354 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8355 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
8356 export LD_RUN_PATH
8357 fi
8c5ff6dd 8358
eb697db5
DN
8359 if test "${opsys}" = "gnu-linux"; then
8360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
8361$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
8362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8363/* end confdefs.h. */
8c5ff6dd 8364
eb697db5
DN
8365int
8366main ()
5929fbe7 8367{
eb697db5
DN
8368XOpenDisplay ("foo");
8369 ;
8370 return 0;
5929fbe7 8371}
eb697db5
DN
8372_ACEOF
8373if ac_fn_c_try_link "$LINENO"; then :
8374 xlinux_first_failure=no
8375else
8376 xlinux_first_failure=yes
8377fi
8378rm -f core conftest.err conftest.$ac_objext \
8379 conftest$ac_exeext conftest.$ac_ext
8380 if test "${xlinux_first_failure}" = "yes"; then
8381 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
8382 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
8383 OLD_CPPFLAGS="$CPPFLAGS"
8384 OLD_LIBS="$LIBS"
8385 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
8386 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
8387 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
8388 LIBS="$LIBS -b i486-linuxaout"
8389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8390/* end confdefs.h. */
8c5ff6dd 8391
eb697db5
DN
8392int
8393main ()
5929fbe7 8394{
eb697db5
DN
8395XOpenDisplay ("foo");
8396 ;
8397 return 0;
5929fbe7 8398}
eb697db5
DN
8399_ACEOF
8400if ac_fn_c_try_link "$LINENO"; then :
8401 xlinux_second_failure=no
8402else
8403 xlinux_second_failure=yes
8404fi
8405rm -f core conftest.err conftest.$ac_objext \
8406 conftest$ac_exeext conftest.$ac_ext
8407 if test "${xlinux_second_failure}" = "yes"; then
8408 # If we get the same failure with -b, there is no use adding -b.
8409 # So take it out. This plays safe.
8410 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
8411 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
8412 CPPFLAGS="$OLD_CPPFLAGS"
8413 LIBS="$OLD_LIBS"
8414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8415$as_echo "no" >&6; }
8416 else
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8418$as_echo "yes" >&6; }
8419 fi
8420 else
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8422$as_echo "no" >&6; }
8423 fi
8424 fi
8c5ff6dd 8425
eb697db5
DN
8426 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
8427 # header files included from there.
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
8429$as_echo_n "checking for Xkb... " >&6; }
8430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8431/* end confdefs.h. */
8432#include <X11/Xlib.h>
8433#include <X11/XKBlib.h>
5929fbe7
GM
8434int
8435main ()
8436{
eb697db5
DN
8437XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
8438 ;
8439 return 0;
5929fbe7
GM
8440}
8441_ACEOF
eb697db5
DN
8442if ac_fn_c_try_link "$LINENO"; then :
8443 emacs_xkb=yes
91e84f96 8444else
eb697db5 8445 emacs_xkb=no
91e84f96 8446fi
eb697db5
DN
8447rm -f core conftest.err conftest.$ac_objext \
8448 conftest$ac_exeext conftest.$ac_ext
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
8450$as_echo "$emacs_xkb" >&6; }
8451 if test $emacs_xkb = yes; then
91e84f96 8452
eb697db5 8453$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
91e84f96 8454
eb697db5 8455 fi
a4f64981 8456
eb697db5
DN
8457 for ac_func in XrmSetDatabase XScreenResourceString \
8458XScreenNumberOfScreen XSetWMProtocols
8459do :
8460 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8461ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
036dc38d
LMI
8462eval as_val=\$$as_ac_var
8463 if test "x$as_val" = x""yes; then :
eb697db5
DN
8464 cat >>confdefs.h <<_ACEOF
8465#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
91e84f96 8466_ACEOF
91e84f96 8467
91e84f96 8468fi
eb697db5 8469done
91e84f96 8470
eb697db5 8471fi
91e84f96 8472
eb697db5
DN
8473if test "${window_system}" = "x11"; then
8474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
8475$as_echo_n "checking X11 version 6... " >&6; }
8476 if test "${emacs_cv_x11_version_6+set}" = set; then :
91e84f96
GM
8477 $as_echo_n "(cached) " >&6
8478else
eb697db5 8479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 8480/* end confdefs.h. */
eb697db5 8481#include <X11/Xlib.h>
9452ded1
DN
8482int
8483main ()
8484{
eb697db5
DN
8485#if XlibSpecificationRelease < 6
8486fail;
8487#endif
91e84f96 8488
9452ded1
DN
8489 ;
8490 return 0;
8491}
91e84f96 8492_ACEOF
eb697db5
DN
8493if ac_fn_c_try_link "$LINENO"; then :
8494 emacs_cv_x11_version_6=yes
7186fb09 8495else
eb697db5
DN
8496 emacs_cv_x11_version_6=no
8497fi
8498rm -f core conftest.err conftest.$ac_objext \
8499 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
8500fi
8501
eb697db5
DN
8502 if test $emacs_cv_x11_version_6 = yes; then
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8504$as_echo "6 or newer" >&6; }
8505
8506$as_echo "#define HAVE_X11R6 1" >>confdefs.h
91e84f96 8507
a46007e9
GM
8508
8509$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
8510
8511 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
8512 ## XIM support.
8513 case "$opsys" in
8514 sol2-*) : ;;
8515 *)
8516$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
8517
8518 ;;
8519 esac
eb697db5
DN
8520 else
8521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8522$as_echo "before 6" >&6; }
8523 fi
aaa36002 8524fi
91e84f96
GM
8525
8526
eb697db5
DN
8527### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
8528HAVE_RSVG=no
8529if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
8530 if test "${with_rsvg}" != "no"; then
8531 RSVG_REQUIRED=2.11.0
8532 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
91e84f96
GM
8533
8534
eb697db5 8535 succeeded=no
91e84f96 8536
eb697db5
DN
8537 # Extract the first word of "pkg-config", so it can be a program name with args.
8538set dummy pkg-config; ac_word=$2
8539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8540$as_echo_n "checking for $ac_word... " >&6; }
8541if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96 8542 $as_echo_n "(cached) " >&6
91e84f96 8543else
eb697db5
DN
8544 case $PKG_CONFIG in
8545 [\\/]* | ?:[\\/]*)
8546 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8547 ;;
8548 *)
8549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8550for as_dir in $PATH
8551do
8552 IFS=$as_save_IFS
8553 test -z "$as_dir" && as_dir=.
8554 for ac_exec_ext in '' $ac_executable_extensions; do
8555 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8556 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8557 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8558 break 2
8559 fi
8560done
8561 done
8562IFS=$as_save_IFS
8563
8564 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8565 ;;
91e84f96 8566esac
aaa36002 8567fi
eb697db5
DN
8568PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8569if test -n "$PKG_CONFIG"; then
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8571$as_echo "$PKG_CONFIG" >&6; }
91e84f96 8572else
eb697db5
DN
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574$as_echo "no" >&6; }
91e84f96
GM
8575fi
8576
91e84f96 8577
91e84f96 8578
eb697db5
DN
8579 if test "$PKG_CONFIG" = "no" ; then
8580 :
8581 else
8582 PKG_CONFIG_MIN_VERSION=0.9.0
8583 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8585$as_echo_n "checking for $RSVG_MODULE... " >&6; }
91e84f96 8586
eb697db5
DN
8587 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8589$as_echo "yes" >&6; }
8590 succeeded=yes
91e84f96 8591
eb697db5
DN
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8593$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8594 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8596$as_echo "$RSVG_CFLAGS" >&6; }
91e84f96 8597
eb697db5
DN
8598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8599$as_echo_n "checking RSVG_LIBS... " >&6; }
8600 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8602$as_echo "$RSVG_LIBS" >&6; }
8603 else
8604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605$as_echo "no" >&6; }
8606 RSVG_CFLAGS=""
8607 RSVG_LIBS=""
8608 ## If we have a custom action on failure, don't print errors, but
8609 ## do set a variable so people can do so.
8610 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
91e84f96 8611
eb697db5 8612 fi
91e84f96 8613
91e84f96 8614
91e84f96 8615
eb697db5
DN
8616 else
8617 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8618 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8619 fi
8620 fi
8621
8622 if test $succeeded = yes; then
8a0b50ed 8623 HAVE_RSVG=yes
eb697db5
DN
8624 else
8625 :
8626 fi
91e84f96
GM
8627
8628
8629
8630
8a0b50ed 8631 if test $HAVE_RSVG = yes; then
91e84f96 8632
eb697db5 8633$as_echo "#define HAVE_RSVG 1" >>confdefs.h
91e84f96 8634
eb697db5
DN
8635 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8636 LIBS="$RSVG_LIBS $LIBS"
8637 fi
8638 fi
c05c21ed 8639fi
91e84f96 8640
c05c21ed 8641HAVE_IMAGEMAGICK=no
6b0f7311
RF
8642if test "${HAVE_X11}" = "yes"; then
8643 if test "${with_imagemagick}" != "no"; then
8644 IMAGEMAGICK_MODULE="Wand"
91e84f96 8645
c05c21ed 8646 succeeded=no
91e84f96 8647
c05c21ed
JV
8648 # Extract the first word of "pkg-config", so it can be a program name with args.
8649set dummy pkg-config; ac_word=$2
8650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8651$as_echo_n "checking for $ac_word... " >&6; }
8652if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8653 $as_echo_n "(cached) " >&6
8654else
8655 case $PKG_CONFIG in
8656 [\\/]* | ?:[\\/]*)
8657 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8658 ;;
8659 *)
8660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8661for as_dir in $PATH
8662do
8663 IFS=$as_save_IFS
8664 test -z "$as_dir" && as_dir=.
8665 for ac_exec_ext in '' $ac_executable_extensions; do
8666 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8667 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8669 break 2
8670 fi
8671done
8672 done
8673IFS=$as_save_IFS
91e84f96 8674
c05c21ed
JV
8675 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8676 ;;
8677esac
8678fi
8679PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8680if test -n "$PKG_CONFIG"; then
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8682$as_echo "$PKG_CONFIG" >&6; }
8683else
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8685$as_echo "no" >&6; }
8686fi
91e84f96
GM
8687
8688
8689
c05c21ed
JV
8690 if test "$PKG_CONFIG" = "no" ; then
8691 :
8692 else
8693 PKG_CONFIG_MIN_VERSION=0.9.0
8694 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
8696$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
91e84f96 8697
c05c21ed
JV
8698 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then
8699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8700$as_echo "yes" >&6; }
8701 succeeded=yes
91e84f96 8702
c05c21ed
JV
8703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5
8704$as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; }
8705 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'`
8706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5
8707$as_echo "$IMAGEMAGICK_CFLAGS" >&6; }
91e84f96 8708
c05c21ed
JV
8709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5
8710$as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; }
8711 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'`
8712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5
8713$as_echo "$IMAGEMAGICK_LIBS" >&6; }
8714 else
8715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8716$as_echo "no" >&6; }
8717 IMAGEMAGICK_CFLAGS=""
8718 IMAGEMAGICK_LIBS=""
8719 ## If we have a custom action on failure, don't print errors, but
8720 ## do set a variable so people can do so.
8721 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
91e84f96 8722
c05c21ed 8723 fi
91e84f96
GM
8724
8725
8726
c05c21ed
JV
8727 else
8728 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8729 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8730 fi
8731 fi
91e84f96 8732
c05c21ed 8733 if test $succeeded = yes; then
8a0b50ed 8734 HAVE_IMAGEMAGICK=yes
c05c21ed
JV
8735 else
8736 :
8737 fi
91e84f96 8738
91e84f96 8739
91e84f96 8740
6da23aaa 8741
6b0f7311 8742 if test $HAVE_IMAGEMAGICK = yes; then
6da23aaa 8743
c05c21ed 8744$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
91e84f96 8745
6b0f7311
RF
8746 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
8747 LIBS="$IMAGEMAGICK_LIBS $LIBS"
8748 for ac_func in MagickExportImagePixels
c05c21ed 8749do :
8a0b50ed
AS
8750 ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels"
8751if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then :
c05c21ed 8752 cat >>confdefs.h <<_ACEOF
8a0b50ed 8753#define HAVE_MAGICKEXPORTIMAGEPIXELS 1
c05c21ed 8754_ACEOF
91e84f96 8755
c05c21ed
JV
8756fi
8757done
91e84f96 8758
6b0f7311 8759 fi
8a0b50ed 8760 fi
a4f64981 8761fi
91e84f96 8762
91e84f96 8763
eb697db5 8764HAVE_GTK=no
e547b051
J
8765if test "${with_gtk3}" = "yes"; then
8766 GLIB_REQUIRED=2.6
8767 GTK_REQUIRED=2.90
8768 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8769
8770
8771 succeeded=no
8772
8773 # Extract the first word of "pkg-config", so it can be a program name with args.
8774set dummy pkg-config; ac_word=$2
8775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8776$as_echo_n "checking for $ac_word... " >&6; }
8777if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8778 $as_echo_n "(cached) " >&6
8779else
8780 case $PKG_CONFIG in
8781 [\\/]* | ?:[\\/]*)
8782 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8783 ;;
8784 *)
8785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8786for as_dir in $PATH
8787do
8788 IFS=$as_save_IFS
8789 test -z "$as_dir" && as_dir=.
8790 for ac_exec_ext in '' $ac_executable_extensions; do
8791 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8792 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8794 break 2
8795 fi
8796done
8797 done
8798IFS=$as_save_IFS
8799
8800 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8801 ;;
8802esac
8803fi
8804PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8805if test -n "$PKG_CONFIG"; then
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8807$as_echo "$PKG_CONFIG" >&6; }
8808else
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
8811fi
8812
8813
8814
8815 if test "$PKG_CONFIG" = "no" ; then
8816 pkg_check_gtk=no
8817 else
8818 PKG_CONFIG_MIN_VERSION=0.9.0
8819 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8821$as_echo_n "checking for $GTK_MODULES... " >&6; }
8822
8823 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8825$as_echo "yes" >&6; }
8826 succeeded=yes
8827
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8829$as_echo_n "checking GTK_CFLAGS... " >&6; }
8830 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8832$as_echo "$GTK_CFLAGS" >&6; }
8833
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8835$as_echo_n "checking GTK_LIBS... " >&6; }
8836 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8838$as_echo "$GTK_LIBS" >&6; }
8839 else
8840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8841$as_echo "no" >&6; }
8842 GTK_CFLAGS=""
8843 GTK_LIBS=""
8844 ## If we have a custom action on failure, don't print errors, but
8845 ## do set a variable so people can do so.
8846 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8847
8848 fi
8849
8850
8851
8852 else
8853 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8854 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8855 fi
8856 fi
8857
8858 if test $succeeded = yes; then
8859 pkg_check_gtk=yes
8860 else
8861 pkg_check_gtk=no
8862 fi
8863
8864 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
036dc38d 8865 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
e547b051
J
8866 fi
8867fi
8868
8869if test "$pkg_check_gtk" != "yes"; then
8870 HAVE_GTK=no
eb697db5
DN
8871if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8872 GLIB_REQUIRED=2.6
8873 GTK_REQUIRED=2.6
8874 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
91e84f96 8875
91e84f96 8876
eb697db5 8877 succeeded=no
91e84f96 8878
eb697db5
DN
8879 # Extract the first word of "pkg-config", so it can be a program name with args.
8880set dummy pkg-config; ac_word=$2
8881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882$as_echo_n "checking for $ac_word... " >&6; }
8883if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981 8884 $as_echo_n "(cached) " >&6
91e84f96 8885else
eb697db5
DN
8886 case $PKG_CONFIG in
8887 [\\/]* | ?:[\\/]*)
8888 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8889 ;;
8890 *)
8891 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892for as_dir in $PATH
8893do
8894 IFS=$as_save_IFS
8895 test -z "$as_dir" && as_dir=.
8896 for ac_exec_ext in '' $ac_executable_extensions; do
8897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8898 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900 break 2
8901 fi
8902done
8903 done
8904IFS=$as_save_IFS
91e84f96 8905
eb697db5
DN
8906 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8907 ;;
5929fbe7 8908esac
91e84f96 8909fi
eb697db5
DN
8910PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8911if test -n "$PKG_CONFIG"; then
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8913$as_echo "$PKG_CONFIG" >&6; }
a4f64981 8914else
eb697db5
DN
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8916$as_echo "no" >&6; }
91e84f96
GM
8917fi
8918
8919
91e84f96 8920
eb697db5
DN
8921 if test "$PKG_CONFIG" = "no" ; then
8922 pkg_check_gtk=no
8923 else
8924 PKG_CONFIG_MIN_VERSION=0.9.0
8925 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8927$as_echo_n "checking for $GTK_MODULES... " >&6; }
91e84f96 8928
eb697db5
DN
8929 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8931$as_echo "yes" >&6; }
8932 succeeded=yes
91e84f96 8933
eb697db5
DN
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8935$as_echo_n "checking GTK_CFLAGS... " >&6; }
8936 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8938$as_echo "$GTK_CFLAGS" >&6; }
91e84f96 8939
eb697db5
DN
8940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8941$as_echo_n "checking GTK_LIBS... " >&6; }
8942 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8944$as_echo "$GTK_LIBS" >&6; }
8945 else
8946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8947$as_echo "no" >&6; }
8948 GTK_CFLAGS=""
8949 GTK_LIBS=""
8950 ## If we have a custom action on failure, don't print errors, but
8951 ## do set a variable so people can do so.
8952 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
91e84f96 8953
eb697db5 8954 fi
91e84f96 8955
91e84f96 8956
91e84f96 8957
eb697db5
DN
8958 else
8959 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8960 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8961 fi
8962 fi
91e84f96 8963
eb697db5
DN
8964 if test $succeeded = yes; then
8965 pkg_check_gtk=yes
8966 else
8967 pkg_check_gtk=no
8968 fi
91e84f96 8969
eb697db5 8970 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
036dc38d 8971 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
eb697db5 8972 fi
8c5ff6dd 8973fi
e547b051 8974fi
91e84f96 8975
eb697db5
DN
8976GTK_OBJ=
8977if test x"$pkg_check_gtk" = xyes; then
91e84f96 8978
91e84f96 8979
91e84f96 8980
eb697db5
DN
8981 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8982 CFLAGS="$CFLAGS $GTK_CFLAGS"
8983 LIBS="$GTK_LIBS $LIBS"
8984 GTK_COMPILES=no
8985 for ac_func in gtk_main
8986do :
8987 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8988if test "x$ac_cv_func_gtk_main" = x""yes; then :
8989 cat >>confdefs.h <<_ACEOF
8990#define HAVE_GTK_MAIN 1
8991_ACEOF
8992 GTK_COMPILES=yes
91e84f96 8993fi
eb697db5 8994done
91e84f96 8995
eb697db5
DN
8996 if test "${GTK_COMPILES}" != "yes"; then
8997 if test "$USE_X_TOOLKIT" != "maybe"; then
036dc38d 8998 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
eb697db5
DN
8999 fi
9000 else
9001 HAVE_GTK=yes
91e84f96 9002
eb697db5 9003$as_echo "#define USE_GTK 1" >>confdefs.h
91e84f96 9004
eb697db5
DN
9005 GTK_OBJ=gtkutil.o
9006 USE_X_TOOLKIT=none
9007 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
9008 :
9009 else
9010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
9011 closing open displays. This is no problem if you just use
9012 one display, but if you use more than one and close one of them
9013 Emacs may crash." >&5
9014$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
9015 closing open displays. This is no problem if you just use
9016 one display, but if you use more than one and close one of them
9017 Emacs may crash." >&2;}
9018 sleep 3
9019 fi
9020 fi
91e84f96 9021
a4f64981 9022fi
91e84f96 9023
91e84f96 9024
91e84f96 9025
eb697db5 9026if test "${HAVE_GTK}" = "yes"; then
91e84f96 9027
eb697db5
DN
9028 if test "$with_toolkit_scroll_bars" != no; then
9029 with_toolkit_scroll_bars=yes
eb697db5 9030 fi
8c5ff6dd 9031
eb697db5
DN
9032 HAVE_GTK_FILE_SELECTION=no
9033 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
9034#include <gtk/gtk.h>
9035"
9036if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
9037 HAVE_GTK_FILE_SELECTION=yes
91e84f96 9038else
eb697db5 9039 HAVE_GTK_FILE_SELECTION=no
5929fbe7 9040fi
91e84f96 9041
eb697db5
DN
9042 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
9043 for ac_func in gtk_file_selection_new
9044do :
9045 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
9046if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
5929fbe7 9047 cat >>confdefs.h <<_ACEOF
eb697db5 9048#define HAVE_GTK_FILE_SELECTION_NEW 1
91e84f96 9049_ACEOF
91e84f96 9050
91e84f96 9051fi
eb697db5 9052done
91e84f96 9053
eb697db5 9054 fi
5929fbe7 9055
e547b051 9056 HAVE_GTK_AND_PTHREAD=no
eb697db5
DN
9057 for ac_header in pthread.h
9058do :
9059 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
9060if test "x$ac_cv_header_pthread_h" = x""yes; then :
91e84f96 9061 cat >>confdefs.h <<_ACEOF
eb697db5 9062#define HAVE_PTHREAD_H 1
91e84f96
GM
9063_ACEOF
9064
91e84f96
GM
9065fi
9066
eb697db5 9067done
91e84f96 9068
eb697db5
DN
9069 if test "$ac_cv_header_pthread_h"; then
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
9071$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
9072if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
91e84f96
GM
9073 $as_echo_n "(cached) " >&6
9074else
9075 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
9076LIBS="-lpthread $LIBS"
9077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
9078/* end confdefs.h. */
9079
9080/* Override any GCC internal prototype to avoid an error.
9081 Use char because int might match the return type of a GCC
9082 builtin and then its argument prototype would still apply. */
9083#ifdef __cplusplus
9084extern "C"
9085#endif
eb697db5 9086char pthread_self ();
91e84f96
GM
9087int
9088main ()
9089{
eb697db5 9090return pthread_self ();
91e84f96
GM
9091 ;
9092 return 0;
9093}
9094_ACEOF
eb697db5
DN
9095if ac_fn_c_try_link "$LINENO"; then :
9096 ac_cv_lib_pthread_pthread_self=yes
91e84f96 9097else
eb697db5 9098 ac_cv_lib_pthread_pthread_self=no
91e84f96 9099fi
eb697db5
DN
9100rm -f core conftest.err conftest.$ac_objext \
9101 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
9102LIBS=$ac_check_lib_save_LIBS
9103fi
eb697db5
DN
9104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
9105$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
9106if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
9107 HAVE_GTK_AND_PTHREAD=yes
91e84f96
GM
9108fi
9109
eb697db5
DN
9110 fi
9111 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
9112 case "${canonical}" in
9113 *-hpux*) ;;
9114 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
9115 esac
91e84f96 9116
eb697db5 9117$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
cd03c74a 9118
eb697db5 9119 fi
e547b051
J
9120
9121 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
9122 gtk_dialog_get_action_area gtk_widget_get_sensitive \
9123 gtk_widget_get_mapped gtk_adjustment_get_page_size \
9124 gtk_orientable_set_orientation
9125do :
9126 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9127ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
036dc38d
LMI
9128eval as_val=\$$as_ac_var
9129 if test "x$as_val" = x""yes; then :
e547b051
J
9130 cat >>confdefs.h <<_ACEOF
9131#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9132_ACEOF
9133
9134fi
9135done
9136
9137
91e84f96 9138fi
49ebbd65 9139
eb697db5
DN
9140HAVE_DBUS=no
9141DBUS_OBJ=
9142if test "${with_dbus}" = "yes"; then
15e12598 9143
eb697db5 9144 succeeded=no
a4f64981 9145
eb697db5
DN
9146 # Extract the first word of "pkg-config", so it can be a program name with args.
9147set dummy pkg-config; ac_word=$2
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9149$as_echo_n "checking for $ac_word... " >&6; }
9150if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
9151 $as_echo_n "(cached) " >&6
9152else
eb697db5
DN
9153 case $PKG_CONFIG in
9154 [\\/]* | ?:[\\/]*)
9155 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9156 ;;
9157 *)
9158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9159for as_dir in $PATH
9160do
9161 IFS=$as_save_IFS
9162 test -z "$as_dir" && as_dir=.
9163 for ac_exec_ext in '' $ac_executable_extensions; do
9164 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9165 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9167 break 2
9168 fi
9169done
9170 done
9171IFS=$as_save_IFS
91e84f96 9172
eb697db5
DN
9173 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9174 ;;
a4f64981 9175esac
eb697db5
DN
9176fi
9177PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9178if test -n "$PKG_CONFIG"; then
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9180$as_echo "$PKG_CONFIG" >&6; }
91e84f96 9181else
eb697db5
DN
9182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9183$as_echo "no" >&6; }
5929fbe7 9184fi
a4f64981 9185
49ebbd65 9186
eb697db5
DN
9187
9188 if test "$PKG_CONFIG" = "no" ; then
9189 HAVE_DBUS=no
9190 else
9191 PKG_CONFIG_MIN_VERSION=0.9.0
9192 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
9194$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
9195
9196 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9198$as_echo "yes" >&6; }
9199 succeeded=yes
9200
9201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
9202$as_echo_n "checking DBUS_CFLAGS... " >&6; }
9203 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
9204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
9205$as_echo "$DBUS_CFLAGS" >&6; }
9206
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
9208$as_echo_n "checking DBUS_LIBS... " >&6; }
9209 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
9210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
9211$as_echo "$DBUS_LIBS" >&6; }
9212 else
9213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9214$as_echo "no" >&6; }
9215 DBUS_CFLAGS=""
9216 DBUS_LIBS=""
9217 ## If we have a custom action on failure, don't print errors, but
9218 ## do set a variable so people can do so.
9219 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
9220
9221 fi
9222
9223
9224
9225 else
9226 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9227 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9228 fi
9229 fi
9230
9231 if test $succeeded = yes; then
9232 HAVE_DBUS=yes
9233 else
9234 HAVE_DBUS=no
9235 fi
9236
9237 if test "$HAVE_DBUS" = yes; then
9238 LIBS="$LIBS $DBUS_LIBS"
9239
9240$as_echo "#define HAVE_DBUS 1" >>confdefs.h
9241
9242 for ac_func in dbus_watch_get_unix_fd
9243do :
9244 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
9245if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
9246 cat >>confdefs.h <<_ACEOF
9247#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
91e84f96 9248_ACEOF
eb697db5
DN
9249
9250fi
9251done
9252
9253 DBUS_OBJ=dbusbind.o
9254 fi
9255fi
9256
9257
9258HAVE_GCONF=no
9259if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
9260
9261 succeeded=no
9262
9263 # Extract the first word of "pkg-config", so it can be a program name with args.
9264set dummy pkg-config; ac_word=$2
9265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9266$as_echo_n "checking for $ac_word... " >&6; }
9267if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9268 $as_echo_n "(cached) " >&6
9269else
9270 case $PKG_CONFIG in
9271 [\\/]* | ?:[\\/]*)
9272 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9273 ;;
9274 *)
9275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9276for as_dir in $PATH
9277do
9278 IFS=$as_save_IFS
9279 test -z "$as_dir" && as_dir=.
9280 for ac_exec_ext in '' $ac_executable_extensions; do
9281 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9282 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9284 break 2
9285 fi
9286done
9287 done
9288IFS=$as_save_IFS
9289
9290 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9291 ;;
91e84f96 9292esac
eb697db5
DN
9293fi
9294PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9295if test -n "$PKG_CONFIG"; then
9296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9297$as_echo "$PKG_CONFIG" >&6; }
91e84f96 9298else
eb697db5
DN
9299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9300$as_echo "no" >&6; }
9301fi
9302
9303
9304
9305 if test "$PKG_CONFIG" = "no" ; then
9306 HAVE_GCONF=no
9307 else
9308 PKG_CONFIG_MIN_VERSION=0.9.0
9309 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
9311$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
9312
9313 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
9314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9315$as_echo "yes" >&6; }
9316 succeeded=yes
9317
9318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
9319$as_echo_n "checking GCONF_CFLAGS... " >&6; }
9320 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
9321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
9322$as_echo "$GCONF_CFLAGS" >&6; }
9323
9324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
9325$as_echo_n "checking GCONF_LIBS... " >&6; }
9326 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
9327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
9328$as_echo "$GCONF_LIBS" >&6; }
9329 else
9330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9331$as_echo "no" >&6; }
9332 GCONF_CFLAGS=""
9333 GCONF_LIBS=""
9334 ## If we have a custom action on failure, don't print errors, but
9335 ## do set a variable so people can do so.
9336 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
91e84f96 9337
eb697db5 9338 fi
91e84f96 9339
91e84f96 9340
91e84f96 9341
eb697db5
DN
9342 else
9343 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9344 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9345 fi
9346 fi
91e84f96 9347
eb697db5
DN
9348 if test $succeeded = yes; then
9349 HAVE_GCONF=yes
9350 else
9351 HAVE_GCONF=no
9352 fi
91e84f96 9353
eb697db5 9354 if test "$HAVE_GCONF" = yes; then
91e84f96 9355
eb697db5 9356$as_echo "#define HAVE_GCONF 1" >>confdefs.h
8c5ff6dd 9357
eb697db5 9358 fi
91e84f96
GM
9359fi
9360
eb697db5
DN
9361HAVE_LIBSELINUX=no
9362LIBSELINUX_LIBS=
9363if test "${with_selinux}" = "yes"; then
9364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
9365$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
9366if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
91e84f96
GM
9367 $as_echo_n "(cached) " >&6
9368else
9369 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
9370LIBS="-lselinux $LIBS"
9371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
9372/* end confdefs.h. */
9373
9374/* Override any GCC internal prototype to avoid an error.
9375 Use char because int might match the return type of a GCC
9376 builtin and then its argument prototype would still apply. */
9377#ifdef __cplusplus
9378extern "C"
9379#endif
eb697db5 9380char lgetfilecon ();
91e84f96
GM
9381int
9382main ()
9383{
eb697db5 9384return lgetfilecon ();
91e84f96
GM
9385 ;
9386 return 0;
9387}
9388_ACEOF
eb697db5
DN
9389if ac_fn_c_try_link "$LINENO"; then :
9390 ac_cv_lib_selinux_lgetfilecon=yes
91e84f96 9391else
eb697db5 9392 ac_cv_lib_selinux_lgetfilecon=no
91e84f96 9393fi
eb697db5
DN
9394rm -f core conftest.err conftest.$ac_objext \
9395 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
9396LIBS=$ac_check_lib_save_LIBS
9397fi
eb697db5
DN
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
9399$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
9400if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
9401 HAVE_LIBSELINUX=yes
91e84f96 9402else
eb697db5 9403 HAVE_LIBSELINUX=no
91e84f96
GM
9404fi
9405
eb697db5 9406 if test "$HAVE_LIBSELINUX" = yes; then
15e12598 9407
eb697db5 9408$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
e6df49e4 9409
eb697db5
DN
9410 LIBSELINUX_LIBS=-lselinux
9411 fi
91e84f96
GM
9412fi
9413
91e84f96 9414
036dc38d
LMI
9415HAVE_GNUTLS=no
9416if test "${with_gnutls}" = "yes" ; then
9417
9418 succeeded=no
9419
9420 # Extract the first word of "pkg-config", so it can be a program name with args.
9421set dummy pkg-config; ac_word=$2
9422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9423$as_echo_n "checking for $ac_word... " >&6; }
9424if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9425 $as_echo_n "(cached) " >&6
9426else
9427 case $PKG_CONFIG in
9428 [\\/]* | ?:[\\/]*)
9429 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9430 ;;
9431 *)
9432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9433for as_dir in $PATH
9434do
9435 IFS=$as_save_IFS
9436 test -z "$as_dir" && as_dir=.
9437 for ac_exec_ext in '' $ac_executable_extensions; do
9438 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9439 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9440 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9441 break 2
9442 fi
9443done
9444 done
9445IFS=$as_save_IFS
9446
9447 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9448 ;;
9449esac
9450fi
9451PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9452if test -n "$PKG_CONFIG"; then
9453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9454$as_echo "$PKG_CONFIG" >&6; }
9455else
9456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457$as_echo "no" >&6; }
9458fi
9459
9460
9461
9462 if test "$PKG_CONFIG" = "no" ; then
9463 HAVE_GNUTLS=no
9464 else
9465 PKG_CONFIG_MIN_VERSION=0.9.0
9466 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls >= 2.2.4" >&5
9468$as_echo_n "checking for gnutls >= 2.2.4... " >&6; }
9469
9470 if $PKG_CONFIG --exists "gnutls >= 2.2.4" 2>&5; then
9471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9472$as_echo "yes" >&6; }
9473 succeeded=yes
9474
9475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_CFLAGS" >&5
9476$as_echo_n "checking LIBGNUTLS_CFLAGS... " >&6; }
9477 LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.2.4"|sed -e 's,///*,/,g'`
9478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_CFLAGS" >&5
9479$as_echo "$LIBGNUTLS_CFLAGS" >&6; }
9480
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGNUTLS_LIBS" >&5
9482$as_echo_n "checking LIBGNUTLS_LIBS... " >&6; }
9483 LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.2.4"|sed -e 's,///*,/,g'`
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGNUTLS_LIBS" >&5
9485$as_echo "$LIBGNUTLS_LIBS" >&6; }
9486 else
9487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9488$as_echo "no" >&6; }
9489 LIBGNUTLS_CFLAGS=""
9490 LIBGNUTLS_LIBS=""
9491 ## If we have a custom action on failure, don't print errors, but
9492 ## do set a variable so people can do so.
9493 LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gnutls >= 2.2.4"`
9494
9495 fi
9496
9497
9498
9499 else
9500 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9501 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9502 fi
9503 fi
9504
9505 if test $succeeded = yes; then
9506 HAVE_GNUTLS=yes
9507 else
9508 HAVE_GNUTLS=no
9509 fi
9510
9511 if test "${HAVE_GNUTLS}" = "yes"; then
9512 $as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
9513
9514 fi
9515fi
9516
9517
9518
eb697db5
DN
9519HAVE_XAW3D=no
9520LUCID_LIBW=
9521if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
9522 if test "$with_xaw3d" != no; then
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
9524$as_echo_n "checking for xaw3d... " >&6; }
9525 if test "${emacs_cv_xaw3d+set}" = set; then :
91e84f96
GM
9526 $as_echo_n "(cached) " >&6
9527else
eb697db5 9528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9529/* end confdefs.h. */
91e84f96 9530
eb697db5
DN
9531#include <X11/Intrinsic.h>
9532#include <X11/Xaw3d/Simple.h>
91e84f96
GM
9533int
9534main ()
9535{
5929fbe7 9536
91e84f96
GM
9537 ;
9538 return 0;
9539}
9540_ACEOF
eb697db5
DN
9541if ac_fn_c_try_link "$LINENO"; then :
9542 emacs_cv_xaw3d=yes
91e84f96 9543else
eb697db5 9544 emacs_cv_xaw3d=no
91e84f96 9545fi
eb697db5
DN
9546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
91e84f96 9548fi
91e84f96 9549
eb697db5
DN
9550 else
9551 emacs_cv_xaw3d=no
9552 fi
9553 if test $emacs_cv_xaw3d = yes; then
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9555$as_echo "yes; using Lucid toolkit" >&6; }
9556 USE_X_TOOLKIT=LUCID
9557 HAVE_XAW3D=yes
9558 LUCID_LIBW=-lXaw3d
91e84f96 9559
eb697db5 9560$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
91e84f96 9561
eb697db5
DN
9562 else
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
9565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
9566$as_echo_n "checking for libXaw... " >&6; }
9567 if test "${emacs_cv_xaw+set}" = set; then :
91e84f96 9568 $as_echo_n "(cached) " >&6
91e84f96 9569else
eb697db5 9570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9571/* end confdefs.h. */
91e84f96 9572
eb697db5
DN
9573#include <X11/Intrinsic.h>
9574#include <X11/Xaw/Simple.h>
9575int
9576main ()
9577{
91e84f96 9578
eb697db5
DN
9579 ;
9580 return 0;
9581}
91e84f96 9582_ACEOF
eb697db5
DN
9583if ac_fn_c_try_link "$LINENO"; then :
9584 emacs_cv_xaw=yes
91e84f96 9585else
eb697db5
DN
9586 emacs_cv_xaw=no
9587fi
9588rm -f core conftest.err conftest.$ac_objext \
9589 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
9590fi
9591
eb697db5
DN
9592 if test $emacs_cv_xaw = yes; then
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9594$as_echo "yes; using Lucid toolkit" >&6; }
9595 USE_X_TOOLKIT=LUCID
9596 LUCID_LIBW=-lXaw
9597 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
036dc38d 9598 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
eb697db5
DN
9599 else
9600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
9601$as_echo "no; do not use toolkit by default" >&6; }
9602 USE_X_TOOLKIT=none
9603 fi
9604 fi
5929fbe7 9605fi
91e84f96 9606
eb697db5 9607X_TOOLKIT_TYPE=$USE_X_TOOLKIT
91e84f96 9608
eb697db5
DN
9609LIBXTR6=
9610if test "${USE_X_TOOLKIT}" != "none"; then
9611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
9612$as_echo_n "checking X11 toolkit version... " >&6; }
9613 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
91e84f96
GM
9614 $as_echo_n "(cached) " >&6
9615else
eb697db5
DN
9616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9617/* end confdefs.h. */
9618#include <X11/Intrinsic.h>
9619int
9620main ()
9621{
9622#if XtSpecificationRelease < 6
9623fail;
9624#endif
91e84f96 9625
eb697db5
DN
9626 ;
9627 return 0;
9628}
9629_ACEOF
9630if ac_fn_c_try_link "$LINENO"; then :
9631 emacs_cv_x11_toolkit_version_6=yes
5929fbe7 9632else
eb697db5 9633 emacs_cv_x11_toolkit_version_6=no
5929fbe7 9634fi
eb697db5
DN
9635rm -f core conftest.err conftest.$ac_objext \
9636 conftest$ac_exeext conftest.$ac_ext
91e84f96 9637fi
91e84f96 9638
eb697db5
DN
9639 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
9640 if test $emacs_cv_x11_toolkit_version_6 = yes; then
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
9642$as_echo "6 or newer" >&6; }
91e84f96 9643
eb697db5 9644$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
91e84f96 9645
eb697db5
DN
9646 LIBXTR6="-lSM -lICE"
9647 case "$opsys" in
9648 ## Use libw.a along with X11R6 Xt.
9649 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
9650 esac
9651 else
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
9653$as_echo "before 6" >&6; }
9654 fi
5929fbe7 9655
eb697db5
DN
9656 OLDLIBS="$LIBS"
9657 if test x$HAVE_X11XTR6 = xyes; then
9658 LIBS="-lXt -lSM -lICE $LIBS"
9659 else
9660 LIBS="-lXt $LIBS"
9661 fi
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
9663$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
9664if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
91e84f96
GM
9665 $as_echo_n "(cached) " >&6
9666else
9667 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
9668LIBS="-lXmu $LIBS"
9669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
9670/* end confdefs.h. */
9671
9672/* Override any GCC internal prototype to avoid an error.
9673 Use char because int might match the return type of a GCC
9674 builtin and then its argument prototype would still apply. */
9675#ifdef __cplusplus
9676extern "C"
9677#endif
eb697db5 9678char XmuConvertStandardSelection ();
91e84f96
GM
9679int
9680main ()
9681{
eb697db5 9682return XmuConvertStandardSelection ();
91e84f96
GM
9683 ;
9684 return 0;
9685}
9686_ACEOF
eb697db5
DN
9687if ac_fn_c_try_link "$LINENO"; then :
9688 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
91e84f96 9689else
eb697db5 9690 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
91e84f96 9691fi
eb697db5
DN
9692rm -f core conftest.err conftest.$ac_objext \
9693 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
9694LIBS=$ac_check_lib_save_LIBS
9695fi
eb697db5
DN
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
9697$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
9698if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
91e84f96 9699 cat >>confdefs.h <<_ACEOF
eb697db5 9700#define HAVE_LIBXMU 1
91e84f96
GM
9701_ACEOF
9702
eb697db5 9703 LIBS="-lXmu $LIBS"
91e84f96
GM
9704
9705fi
9706
eb697db5 9707 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
91e84f96
GM
9708fi
9709
9710
eb697db5
DN
9711LIBXMU=-lXmu
9712case "$machine" in
9713 ## These machines don't supply Xmu.
9714 hpux* | aix4-2 )
9715 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
5929fbe7
GM
9716 ;;
9717esac
eb697db5 9718
91e84f96 9719
eb697db5
DN
9720# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
9721if test "${HAVE_X11}" = "yes"; then
9722 if test "${USE_X_TOOLKIT}" != "none"; then
9723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
9724$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
9725if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
91e84f96 9726 $as_echo_n "(cached) " >&6
91e84f96 9727else
eb697db5
DN
9728 ac_check_lib_save_LIBS=$LIBS
9729LIBS="-lXext $LIBS"
9730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9731/* end confdefs.h. */
91e84f96 9732
eb697db5
DN
9733/* Override any GCC internal prototype to avoid an error.
9734 Use char because int might match the return type of a GCC
9735 builtin and then its argument prototype would still apply. */
9736#ifdef __cplusplus
9737extern "C"
9738#endif
9739char XShapeQueryExtension ();
9740int
9741main ()
9742{
9743return XShapeQueryExtension ();
9744 ;
9745 return 0;
9746}
91e84f96 9747_ACEOF
eb697db5
DN
9748if ac_fn_c_try_link "$LINENO"; then :
9749 ac_cv_lib_Xext_XShapeQueryExtension=yes
91e84f96 9750else
eb697db5 9751 ac_cv_lib_Xext_XShapeQueryExtension=no
91e84f96 9752fi
eb697db5
DN
9753rm -f core conftest.err conftest.$ac_objext \
9754 conftest$ac_exeext conftest.$ac_ext
9755LIBS=$ac_check_lib_save_LIBS
5929fbe7 9756fi
eb697db5
DN
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
9758$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
9759if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
5929fbe7 9760 cat >>confdefs.h <<_ACEOF
eb697db5 9761#define HAVE_LIBXEXT 1
5929fbe7 9762_ACEOF
91e84f96 9763
eb697db5 9764 LIBS="-lXext $LIBS"
91e84f96 9765
91e84f96 9766fi
91e84f96 9767
eb697db5 9768 fi
91e84f96
GM
9769fi
9770
eb697db5
DN
9771LIBXP=
9772if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
9774$as_echo_n "checking for Motif version 2.1... " >&6; }
9775if test "${emacs_cv_motif_version_2_1+set}" = set; then :
91e84f96
GM
9776 $as_echo_n "(cached) " >&6
9777else
eb697db5 9778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9779/* end confdefs.h. */
eb697db5
DN
9780#include <Xm/Xm.h>
9781int
9782main ()
9783{
9784#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
9785int x = 5;
91e84f96 9786#else
eb697db5 9787Motif version prior to 2.1.
91e84f96 9788#endif
eb697db5
DN
9789 ;
9790 return 0;
9791}
91e84f96 9792_ACEOF
eb697db5
DN
9793if ac_fn_c_try_compile "$LINENO"; then :
9794 emacs_cv_motif_version_2_1=yes
91e84f96 9795else
eb697db5 9796 emacs_cv_motif_version_2_1=no
91e84f96 9797fi
5929fbe7 9798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9799fi
9800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
9801$as_echo "$emacs_cv_motif_version_2_1" >&6; }
9802 if test $emacs_cv_motif_version_2_1 = yes; then
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
9804$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
9805if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
9806 $as_echo_n "(cached) " >&6
9807else
9808 ac_check_lib_save_LIBS=$LIBS
9809LIBS="-lXp $LIBS"
9810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811/* end confdefs.h. */
91e84f96
GM
9812
9813/* Override any GCC internal prototype to avoid an error.
9814 Use char because int might match the return type of a GCC
9815 builtin and then its argument prototype would still apply. */
9816#ifdef __cplusplus
9817extern "C"
9818#endif
eb697db5 9819char XpCreateContext ();
91e84f96
GM
9820int
9821main ()
9822{
eb697db5 9823return XpCreateContext ();
91e84f96
GM
9824 ;
9825 return 0;
9826}
9827_ACEOF
eb697db5
DN
9828if ac_fn_c_try_link "$LINENO"; then :
9829 ac_cv_lib_Xp_XpCreateContext=yes
91e84f96 9830else
eb697db5
DN
9831 ac_cv_lib_Xp_XpCreateContext=no
9832fi
9833rm -f core conftest.err conftest.$ac_objext \
9834 conftest$ac_exeext conftest.$ac_ext
9835LIBS=$ac_check_lib_save_LIBS
9836fi
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
9838$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
9839if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
9840 LIBXP=-lXp
9841fi
91e84f96 9842
eb697db5
DN
9843 else
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
9845$as_echo_n "checking for LessTif where some systems put it... " >&6; }
9846if test "${emacs_cv_lesstif+set}" = set; then :
9847 $as_echo_n "(cached) " >&6
9848else
9849 # We put this in CFLAGS temporarily to precede other -I options
9850 # that might be in CFLAGS temporarily.
9851 # We put this in CPPFLAGS where it precedes the other -I options.
9852 OLD_CPPFLAGS=$CPPFLAGS
9853 OLD_CFLAGS=$CFLAGS
9854 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
9855 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
9856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9857/* end confdefs.h. */
eb697db5
DN
9858#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
9859int
9860main ()
9861{
9862int x = 5;
9863 ;
9864 return 0;
9865}
a4f64981 9866_ACEOF
eb697db5
DN
9867if ac_fn_c_try_compile "$LINENO"; then :
9868 emacs_cv_lesstif=yes
8c5ff6dd 9869else
eb697db5
DN
9870 emacs_cv_lesstif=no
9871fi
9872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9873fi
9874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
9875$as_echo "$emacs_cv_lesstif" >&6; }
9876 if test $emacs_cv_lesstif = yes; then
9877 # Make sure this -I option remains in CPPFLAGS after it is set
9878 # back to REAL_CPPFLAGS.
9879 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
9880 # have those other -I options anyway. Ultimately, having this
9881 # directory ultimately in CPPFLAGS will be enough.
9882 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
9883 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
9884 else
9885 CFLAGS=$OLD_CFLAGS
9886 CPPFLAGS=$OLD_CPPFLAGS
9887 fi
9888 fi
91e84f96
GM
9889fi
9890
91e84f96 9891
eb697db5
DN
9892USE_TOOLKIT_SCROLL_BARS=no
9893if test "${with_toolkit_scroll_bars}" != "no"; then
9894 if test "${USE_X_TOOLKIT}" != "none"; then
9895 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9896 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
91e84f96 9897
eb697db5
DN
9898 HAVE_XAW3D=no
9899 USE_TOOLKIT_SCROLL_BARS=yes
9900 elif test "${HAVE_XAW3D}" = "yes"; then
9901 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
91e84f96 9902
eb697db5
DN
9903 USE_TOOLKIT_SCROLL_BARS=yes
9904 fi
9905 elif test "${HAVE_GTK}" = "yes"; then
9906 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
91e84f96 9907
eb697db5
DN
9908 USE_TOOLKIT_SCROLL_BARS=yes
9909 elif test "${HAVE_NS}" = "yes"; then
9910 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
91e84f96 9911
eb697db5
DN
9912 USE_TOOLKIT_SCROLL_BARS=yes
9913 fi
91e84f96
GM
9914fi
9915
eb697db5 9916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9917/* end confdefs.h. */
91e84f96 9918
eb697db5
DN
9919 #include <X11/Xlib.h>
9920 #include <X11/Xresource.h>
91e84f96
GM
9921int
9922main ()
9923{
eb697db5 9924XIMProc callback;
91e84f96
GM
9925 ;
9926 return 0;
9927}
9928_ACEOF
eb697db5
DN
9929if ac_fn_c_try_compile "$LINENO"; then :
9930 HAVE_XIM=yes
91e84f96 9931
eb697db5 9932$as_echo "#define HAVE_XIM 1" >>confdefs.h
91e84f96 9933
91e84f96 9934else
eb697db5 9935 HAVE_XIM=no
91e84f96 9936fi
eb697db5 9937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 9938
91e84f96 9939
eb697db5 9940if test "${with_xim}" != "no"; then
91e84f96 9941
eb697db5 9942$as_echo "#define USE_XIM 1" >>confdefs.h
91e84f96
GM
9943
9944fi
91e84f96 9945
91e84f96 9946
eb697db5
DN
9947if test "${HAVE_XIM}" != "no"; then
9948 late_CFLAGS=$CFLAGS
9949 if test "$GCC" = yes; then
9950 CFLAGS="$CFLAGS --pedantic-errors"
9951 fi
9952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9953/* end confdefs.h. */
91e84f96 9954
eb697db5
DN
9955#include <X11/Xlib.h>
9956#include <X11/Xresource.h>
5929fbe7
GM
9957int
9958main ()
9959{
eb697db5
DN
9960Display *display;
9961XrmDatabase db;
9962char *res_name;
9963char *res_class;
9964XIMProc callback;
9965XPointer *client_data;
9966#ifndef __GNUC__
9967/* If we're not using GCC, it's probably not XFree86, and this is
9968 probably right, but we can't use something like --pedantic-errors. */
9969extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9970 char*, XIMProc, XPointer*);
9971#endif
9972(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9973 client_data);
5929fbe7
GM
9974 ;
9975 return 0;
9976}
91e84f96 9977_ACEOF
eb697db5
DN
9978if ac_fn_c_try_compile "$LINENO"; then :
9979 emacs_cv_arg6_star=yes
91e84f96 9980fi
5929fbe7 9981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9982 if test "$emacs_cv_arg6_star" = yes; then
9983 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
91e84f96 9984
eb697db5
DN
9985 else
9986 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
91e84f96 9987
eb697db5
DN
9988 fi
9989 CFLAGS=$late_CFLAGS
91e84f96
GM
9990fi
9991
eb697db5
DN
9992### Start of font-backend (under any platform) section.
9993# (nothing here yet -- this is a placeholder)
9994### End of font-backend (under any platform) section.
91e84f96 9995
eb697db5
DN
9996### Start of font-backend (under X11) section.
9997if test "${HAVE_X11}" = "yes"; then
91e84f96 9998
eb697db5 9999 succeeded=no
91e84f96 10000
eb697db5
DN
10001 # Extract the first word of "pkg-config", so it can be a program name with args.
10002set dummy pkg-config; ac_word=$2
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
10005if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10006 $as_echo_n "(cached) " >&6
91e84f96 10007else
eb697db5
DN
10008 case $PKG_CONFIG in
10009 [\\/]* | ?:[\\/]*)
10010 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10011 ;;
10012 *)
10013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014for as_dir in $PATH
10015do
10016 IFS=$as_save_IFS
10017 test -z "$as_dir" && as_dir=.
10018 for ac_exec_ext in '' $ac_executable_extensions; do
10019 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10020 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022 break 2
10023 fi
10024done
10025 done
10026IFS=$as_save_IFS
91e84f96 10027
eb697db5
DN
10028 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10029 ;;
91e84f96 10030esac
eb697db5
DN
10031fi
10032PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10033if test -n "$PKG_CONFIG"; then
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10035$as_echo "$PKG_CONFIG" >&6; }
91e84f96 10036else
eb697db5
DN
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10038$as_echo "no" >&6; }
91e84f96 10039fi
91e84f96 10040
91e84f96 10041
91e84f96 10042
eb697db5
DN
10043 if test "$PKG_CONFIG" = "no" ; then
10044 HAVE_FC=no
10045 else
10046 PKG_CONFIG_MIN_VERSION=0.9.0
10047 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
10049$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
91e84f96 10050
eb697db5
DN
10051 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10053$as_echo "yes" >&6; }
10054 succeeded=yes
91e84f96 10055
eb697db5
DN
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
10057$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
10058 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
10060$as_echo "$FONTCONFIG_CFLAGS" >&6; }
91e84f96 10061
eb697db5
DN
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
10063$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
10064 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
10066$as_echo "$FONTCONFIG_LIBS" >&6; }
10067 else
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
10070 FONTCONFIG_CFLAGS=""
10071 FONTCONFIG_LIBS=""
10072 ## If we have a custom action on failure, don't print errors, but
10073 ## do set a variable so people can do so.
10074 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
91e84f96 10075
eb697db5 10076 fi
91e84f96 10077
91e84f96 10078
91e84f96 10079
eb697db5
DN
10080 else
10081 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10082 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10083 fi
10084 fi
91e84f96 10085
eb697db5
DN
10086 if test $succeeded = yes; then
10087 HAVE_FC=yes
10088 else
10089 HAVE_FC=no
10090 fi
91e84f96 10091
91e84f96 10092
eb697db5
DN
10093 ## Use -lXft if available, unless `--with-xft=no'.
10094 HAVE_XFT=maybe
10095 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
10096 with_xft="no";
10097 fi
10098 if test "x${with_xft}" != "xno"; then
10099
10100
10101 succeeded=no
10102
10103 # Extract the first word of "pkg-config", so it can be a program name with args.
10104set dummy pkg-config; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
10108 $as_echo_n "(cached) " >&6
10109else
eb697db5
DN
10110 case $PKG_CONFIG in
10111 [\\/]* | ?:[\\/]*)
10112 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10113 ;;
10114 *)
10115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118 IFS=$as_save_IFS
10119 test -z "$as_dir" && as_dir=.
10120 for ac_exec_ext in '' $ac_executable_extensions; do
10121 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10122 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124 break 2
10125 fi
10126done
10127 done
10128IFS=$as_save_IFS
91e84f96 10129
eb697db5
DN
10130 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10131 ;;
10132esac
91e84f96 10133fi
eb697db5
DN
10134PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10135if test -n "$PKG_CONFIG"; then
10136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10137$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 10138else
eb697db5
DN
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
91e84f96
GM
10141fi
10142
91e84f96 10143
91e84f96 10144
eb697db5
DN
10145 if test "$PKG_CONFIG" = "no" ; then
10146 HAVE_XFT=no
10147 else
10148 PKG_CONFIG_MIN_VERSION=0.9.0
10149 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
10151$as_echo_n "checking for xft >= 0.13.0... " >&6; }
91e84f96 10152
eb697db5
DN
10153 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10155$as_echo "yes" >&6; }
10156 succeeded=yes
91e84f96 10157
eb697db5
DN
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
10159$as_echo_n "checking XFT_CFLAGS... " >&6; }
10160 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
10162$as_echo "$XFT_CFLAGS" >&6; }
91e84f96 10163
eb697db5
DN
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
10165$as_echo_n "checking XFT_LIBS... " >&6; }
10166 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
10167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
10168$as_echo "$XFT_LIBS" >&6; }
10169 else
10170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10171$as_echo "no" >&6; }
10172 XFT_CFLAGS=""
10173 XFT_LIBS=""
10174 ## If we have a custom action on failure, don't print errors, but
10175 ## do set a variable so people can do so.
10176 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
91e84f96 10177
eb697db5 10178 fi
91e84f96 10179
91e84f96 10180
91e84f96 10181
eb697db5
DN
10182 else
10183 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10184 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10185 fi
10186 fi
91e84f96 10187
eb697db5
DN
10188 if test $succeeded = yes; then
10189 :
10190 else
10191 HAVE_XFT=no
10192 fi
91e84f96 10193
eb697db5
DN
10194 ## Because xftfont.c uses XRenderQueryExtension, we also
10195 ## need to link to -lXrender.
10196 HAVE_XRENDER=no
10197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
10198$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
10199if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
91e84f96
GM
10200 $as_echo_n "(cached) " >&6
10201else
eb697db5
DN
10202 ac_check_lib_save_LIBS=$LIBS
10203LIBS="-lXrender $LIBS"
10204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10205/* end confdefs.h. */
91e84f96 10206
eb697db5
DN
10207/* Override any GCC internal prototype to avoid an error.
10208 Use char because int might match the return type of a GCC
10209 builtin and then its argument prototype would still apply. */
10210#ifdef __cplusplus
10211extern "C"
10212#endif
10213char XRenderQueryExtension ();
91e84f96
GM
10214int
10215main ()
10216{
eb697db5 10217return XRenderQueryExtension ();
91e84f96
GM
10218 ;
10219 return 0;
10220}
10221_ACEOF
eb697db5
DN
10222if ac_fn_c_try_link "$LINENO"; then :
10223 ac_cv_lib_Xrender_XRenderQueryExtension=yes
91e84f96 10224else
eb697db5
DN
10225 ac_cv_lib_Xrender_XRenderQueryExtension=no
10226fi
10227rm -f core conftest.err conftest.$ac_objext \
10228 conftest$ac_exeext conftest.$ac_ext
10229LIBS=$ac_check_lib_save_LIBS
10230fi
10231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
10232$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
10233if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
10234 HAVE_XRENDER=yes
5929fbe7 10235fi
91e84f96 10236
eb697db5
DN
10237 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
10238 OLD_CPPFLAGS="$CPPFLAGS"
10239 OLD_CFLAGS="$CFLAGS"
10240 OLD_LIBS="$LIBS"
10241 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
10242 CFLAGS="$CFLAGS $XFT_CFLAGS"
10243 XFT_LIBS="-lXrender $XFT_LIBS"
10244 LIBS="$XFT_LIBS $LIBS"
10245 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
10246if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
10248$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
10249if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
10250 $as_echo_n "(cached) " >&6
10251else
10252 ac_check_lib_save_LIBS=$LIBS
10253LIBS="-lXft $XFT_LIBS $LIBS"
10254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10255/* end confdefs.h. */
91e84f96 10256
eb697db5
DN
10257/* Override any GCC internal prototype to avoid an error.
10258 Use char because int might match the return type of a GCC
10259 builtin and then its argument prototype would still apply. */
10260#ifdef __cplusplus
10261extern "C"
10262#endif
10263char XftFontOpen ();
91e84f96
GM
10264int
10265main ()
10266{
eb697db5 10267return XftFontOpen ();
91e84f96
GM
10268 ;
10269 return 0;
10270}
10271_ACEOF
eb697db5
DN
10272if ac_fn_c_try_link "$LINENO"; then :
10273 ac_cv_lib_Xft_XftFontOpen=yes
91e84f96 10274else
eb697db5 10275 ac_cv_lib_Xft_XftFontOpen=no
91e84f96 10276fi
eb697db5
DN
10277rm -f core conftest.err conftest.$ac_objext \
10278 conftest$ac_exeext conftest.$ac_ext
10279LIBS=$ac_check_lib_save_LIBS
15e12598 10280fi
eb697db5
DN
10281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
10282$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
10283if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
10284 HAVE_XFT=yes
91e84f96
GM
10285fi
10286
91e84f96 10287fi
91e84f96 10288
91e84f96
GM
10289
10290
eb697db5 10291 if test "${HAVE_XFT}" = "yes"; then
91e84f96 10292
eb697db5 10293$as_echo "#define HAVE_XFT 1" >>confdefs.h
91e84f96
GM
10294
10295
eb697db5
DN
10296 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
10297 else
10298 CPPFLAGS="$OLD_CPPFLAGS"
10299 CFLAGS="$OLD_CFLAGS"
10300 LIBS="$OLD_LIBS"
10301 fi # "${HAVE_XFT}" = "yes"
10302 fi # "$HAVE_XFT" != no
10303 fi # "x${with_xft}" != "xno"
91e84f96 10304
eb697db5
DN
10305 if test "$HAVE_XFT" != "yes"; then
10306 HAVE_XFT=no
10307 fi
91e84f96 10308
91e84f96 10309
eb697db5
DN
10310 HAVE_FREETYPE=no
10311 ## We used to allow building with FreeType and without Xft.
10312 ## However, the ftx font backend driver is not in good shape.
10313 if test "${HAVE_XFT}" = "yes"; then
10314 HAVE_FREETYPE=yes
10315 FONTCONFIG_CFLAGS=
10316 FONTCONFIG_LIBS=
10317 fi
91e84f96 10318
eb697db5
DN
10319 HAVE_LIBOTF=no
10320 if test "${HAVE_FREETYPE}" = "yes"; then
91e84f96 10321
eb697db5 10322$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
91e84f96 10323
eb697db5 10324 if test "${with_libotf}" != "no"; then
91e84f96 10325
eb697db5 10326 succeeded=no
91e84f96 10327
eb697db5
DN
10328 # Extract the first word of "pkg-config", so it can be a program name with args.
10329set dummy pkg-config; ac_word=$2
10330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10331$as_echo_n "checking for $ac_word... " >&6; }
10332if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
10333 $as_echo_n "(cached) " >&6
10334else
eb697db5
DN
10335 case $PKG_CONFIG in
10336 [\\/]* | ?:[\\/]*)
10337 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10338 ;;
10339 *)
10340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10341for as_dir in $PATH
10342do
10343 IFS=$as_save_IFS
10344 test -z "$as_dir" && as_dir=.
10345 for ac_exec_ext in '' $ac_executable_extensions; do
10346 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10347 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10348 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10349 break 2
10350 fi
10351done
10352 done
10353IFS=$as_save_IFS
91e84f96 10354
eb697db5
DN
10355 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10356 ;;
5929fbe7 10357esac
91e84f96 10358fi
eb697db5
DN
10359PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10360if test -n "$PKG_CONFIG"; then
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10362$as_echo "$PKG_CONFIG" >&6; }
91e84f96 10363else
eb697db5
DN
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
91e84f96 10366fi
91e84f96
GM
10367
10368
10369
eb697db5
DN
10370 if test "$PKG_CONFIG" = "no" ; then
10371 HAVE_LIBOTF=no
10372 else
10373 PKG_CONFIG_MIN_VERSION=0.9.0
10374 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
10376$as_echo_n "checking for libotf... " >&6; }
91e84f96 10377
eb697db5
DN
10378 if $PKG_CONFIG --exists "libotf" 2>&5; then
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10380$as_echo "yes" >&6; }
10381 succeeded=yes
91e84f96 10382
eb697db5
DN
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
10384$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
10385 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
10387$as_echo "$LIBOTF_CFLAGS" >&6; }
91e84f96 10388
eb697db5
DN
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
10390$as_echo_n "checking LIBOTF_LIBS... " >&6; }
10391 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
10392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
10393$as_echo "$LIBOTF_LIBS" >&6; }
10394 else
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10396$as_echo "no" >&6; }
10397 LIBOTF_CFLAGS=""
10398 LIBOTF_LIBS=""
10399 ## If we have a custom action on failure, don't print errors, but
10400 ## do set a variable so people can do so.
10401 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
5929fbe7 10402
eb697db5 10403 fi
15e12598 10404
15e12598
VB
10405
10406
eb697db5
DN
10407 else
10408 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10409 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10410 fi
10411 fi
8c5ff6dd 10412
eb697db5
DN
10413 if test $succeeded = yes; then
10414 HAVE_LIBOTF=yes
10415 else
10416 HAVE_LIBOTF=no
10417 fi
5929fbe7 10418
eb697db5 10419 if test "$HAVE_LIBOTF" = "yes"; then
5929fbe7 10420
eb697db5 10421$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
5929fbe7 10422
eb697db5
DN
10423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
10424$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
10425if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
10426 $as_echo_n "(cached) " >&6
10427else
10428 ac_check_lib_save_LIBS=$LIBS
10429LIBS="-lotf $LIBS"
10430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10431/* end confdefs.h. */
91e84f96
GM
10432
10433/* Override any GCC internal prototype to avoid an error.
10434 Use char because int might match the return type of a GCC
10435 builtin and then its argument prototype would still apply. */
10436#ifdef __cplusplus
10437extern "C"
10438#endif
eb697db5 10439char OTF_get_variation_glyphs ();
91e84f96
GM
10440int
10441main ()
10442{
eb697db5 10443return OTF_get_variation_glyphs ();
91e84f96
GM
10444 ;
10445 return 0;
10446}
10447_ACEOF
eb697db5
DN
10448if ac_fn_c_try_link "$LINENO"; then :
10449 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
91e84f96 10450else
eb697db5 10451 ac_cv_lib_otf_OTF_get_variation_glyphs=no
91e84f96 10452fi
eb697db5
DN
10453rm -f core conftest.err conftest.$ac_objext \
10454 conftest$ac_exeext conftest.$ac_ext
10455LIBS=$ac_check_lib_save_LIBS
5929fbe7 10456fi
eb697db5
DN
10457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
10458$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
10459if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
10460 HAVE_OTF_GET_VARIATION_GLYPHS=yes
5929fbe7 10461else
eb697db5 10462 HAVE_OTF_GET_VARIATION_GLYPHS=no
91e84f96 10463fi
91e84f96 10464
eb697db5 10465 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
91e84f96 10466
eb697db5 10467$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
91e84f96 10468
eb697db5
DN
10469 fi
10470 fi
10471 fi
10472 fi
91e84f96 10473
eb697db5
DN
10474 HAVE_M17N_FLT=no
10475 if test "${HAVE_LIBOTF}" = yes; then
10476 if test "${with_m17n_flt}" != "no"; then
91e84f96 10477
eb697db5 10478 succeeded=no
91e84f96 10479
eb697db5
DN
10480 # Extract the first word of "pkg-config", so it can be a program name with args.
10481set dummy pkg-config; ac_word=$2
10482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10483$as_echo_n "checking for $ac_word... " >&6; }
10484if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
10485 $as_echo_n "(cached) " >&6
10486else
eb697db5
DN
10487 case $PKG_CONFIG in
10488 [\\/]* | ?:[\\/]*)
10489 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10490 ;;
10491 *)
10492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10493for as_dir in $PATH
10494do
10495 IFS=$as_save_IFS
10496 test -z "$as_dir" && as_dir=.
10497 for ac_exec_ext in '' $ac_executable_extensions; do
10498 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10499 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10501 break 2
10502 fi
10503done
10504 done
10505IFS=$as_save_IFS
91e84f96 10506
eb697db5
DN
10507 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10508 ;;
5929fbe7 10509esac
5929fbe7 10510fi
eb697db5
DN
10511PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10512if test -n "$PKG_CONFIG"; then
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10514$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 10515else
eb697db5
DN
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10517$as_echo "no" >&6; }
8c5ff6dd 10518fi
91e84f96
GM
10519
10520
10521
eb697db5
DN
10522 if test "$PKG_CONFIG" = "no" ; then
10523 HAVE_M17N_FLT=no
10524 else
10525 PKG_CONFIG_MIN_VERSION=0.9.0
10526 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
10528$as_echo_n "checking for m17n-flt... " >&6; }
91e84f96 10529
eb697db5
DN
10530 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10532$as_echo "yes" >&6; }
10533 succeeded=yes
91e84f96 10534
eb697db5
DN
10535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
10536$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
10537 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
10538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
10539$as_echo "$M17N_FLT_CFLAGS" >&6; }
91e84f96 10540
eb697db5
DN
10541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
10542$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
10543 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
10544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
10545$as_echo "$M17N_FLT_LIBS" >&6; }
10546 else
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10548$as_echo "no" >&6; }
10549 M17N_FLT_CFLAGS=""
10550 M17N_FLT_LIBS=""
10551 ## If we have a custom action on failure, don't print errors, but
10552 ## do set a variable so people can do so.
10553 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
91e84f96 10554
eb697db5 10555 fi
91e84f96
GM
10556
10557
91e84f96 10558
eb697db5
DN
10559 else
10560 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10561 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10562 fi
10563 fi
91e84f96 10564
eb697db5
DN
10565 if test $succeeded = yes; then
10566 HAVE_M17N_FLT=yes
10567 else
10568 HAVE_M17N_FLT=no
5929fbe7 10569 fi
91e84f96 10570
eb697db5 10571 if test "$HAVE_M17N_FLT" = "yes"; then
91e84f96 10572
eb697db5 10573$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
91e84f96 10574
eb697db5
DN
10575 fi
10576 fi
10577 fi
91e84f96 10578else
eb697db5
DN
10579 HAVE_XFT=no
10580 HAVE_FREETYPE=no
10581 HAVE_LIBOTF=no
10582 HAVE_M17N_FLT=no
91e84f96
GM
10583fi
10584
eb697db5 10585### End of font-backend (under X11) section.
91e84f96 10586
91e84f96 10587
91e84f96 10588
91e84f96 10589
91e84f96 10590
91e84f96 10591
91e84f96 10592
91e84f96 10593
91e84f96 10594
91e84f96 10595
eb697db5
DN
10596### Use -lXpm if available, unless `--with-xpm=no'.
10597HAVE_XPM=no
10598LIBXPM=
10599if test "${HAVE_X11}" = "yes"; then
10600 if test "${with_xpm}" != "no"; then
10601 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
10602if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
10604$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
10605if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
91e84f96
GM
10606 $as_echo_n "(cached) " >&6
10607else
eb697db5
DN
10608 ac_check_lib_save_LIBS=$LIBS
10609LIBS="-lXpm -lX11 $LIBS"
10610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10611/* end confdefs.h. */
91e84f96
GM
10612
10613/* Override any GCC internal prototype to avoid an error.
10614 Use char because int might match the return type of a GCC
10615 builtin and then its argument prototype would still apply. */
10616#ifdef __cplusplus
10617extern "C"
10618#endif
eb697db5 10619char XpmReadFileToPixmap ();
91e84f96
GM
10620int
10621main ()
10622{
eb697db5 10623return XpmReadFileToPixmap ();
91e84f96
GM
10624 ;
10625 return 0;
10626}
10627_ACEOF
eb697db5
DN
10628if ac_fn_c_try_link "$LINENO"; then :
10629 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
91e84f96 10630else
eb697db5 10631 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
91e84f96 10632fi
eb697db5
DN
10633rm -f core conftest.err conftest.$ac_objext \
10634 conftest$ac_exeext conftest.$ac_ext
10635LIBS=$ac_check_lib_save_LIBS
10636fi
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
10638$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
10639if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
10640 HAVE_XPM=yes
91e84f96 10641fi
91e84f96 10642
91e84f96 10643fi
91e84f96 10644
91e84f96 10645
eb697db5
DN
10646 if test "${HAVE_XPM}" = "yes"; then
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
10648$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
10649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10650/* end confdefs.h. */
eb697db5
DN
10651#include "X11/xpm.h"
10652#ifndef XpmReturnAllocPixels
10653no_return_alloc_pixels
91e84f96
GM
10654#endif
10655
91e84f96 10656_ACEOF
eb697db5
DN
10657if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10658 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
10659 HAVE_XPM=no
91e84f96 10660else
eb697db5 10661 HAVE_XPM=yes
91e84f96 10662fi
eb697db5 10663rm -f conftest*
91e84f96 10664
91e84f96 10665
eb697db5
DN
10666 if test "${HAVE_XPM}" = "yes"; then
10667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10668$as_echo "yes" >&6; }
10669 else
10670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
10672 fi
10673 fi
91e84f96
GM
10674 fi
10675
eb697db5 10676 if test "${HAVE_XPM}" = "yes"; then
5929fbe7 10677
eb697db5 10678$as_echo "#define HAVE_XPM 1" >>confdefs.h
5929fbe7 10679
eb697db5
DN
10680 LIBXPM=-lXpm
10681 fi
10682fi
5929fbe7 10683
eb697db5
DN
10684
10685### Use -ljpeg if available, unless `--with-jpeg=no'.
10686HAVE_JPEG=no
10687LIBJPEG=
10688if test "${HAVE_X11}" = "yes"; then
10689 if test "${with_jpeg}" != "no"; then
10690 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
10691if test "x$ac_cv_header_jerror_h" = x""yes; then :
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
10693$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
10694if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
91e84f96
GM
10695 $as_echo_n "(cached) " >&6
10696else
eb697db5
DN
10697 ac_check_lib_save_LIBS=$LIBS
10698LIBS="-ljpeg $LIBS"
10699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10700/* end confdefs.h. */
91e84f96 10701
5929fbe7
GM
10702/* Override any GCC internal prototype to avoid an error.
10703 Use char because int might match the return type of a GCC
10704 builtin and then its argument prototype would still apply. */
10705#ifdef __cplusplus
10706extern "C"
10707#endif
eb697db5 10708char jpeg_destroy_compress ();
91e84f96
GM
10709int
10710main ()
10711{
eb697db5 10712return jpeg_destroy_compress ();
91e84f96
GM
10713 ;
10714 return 0;
10715}
10716_ACEOF
eb697db5
DN
10717if ac_fn_c_try_link "$LINENO"; then :
10718 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
91e84f96 10719else
eb697db5
DN
10720 ac_cv_lib_jpeg_jpeg_destroy_compress=no
10721fi
10722rm -f core conftest.err conftest.$ac_objext \
10723 conftest$ac_exeext conftest.$ac_ext
10724LIBS=$ac_check_lib_save_LIBS
10725fi
10726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
10727$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
10728if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
10729 HAVE_JPEG=yes
91e84f96
GM
10730fi
10731
91e84f96 10732fi
eb697db5
DN
10733
10734
10735 fi
10736
10737 if test "${HAVE_JPEG}" = "yes"; then
10738 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
10739
10740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10741/* end confdefs.h. */
10742#include <jpeglib.h>
10743 version=JPEG_LIB_VERSION
10744
10745_ACEOF
10746if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10747 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
10748 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
8c5ff6dd 10749
91e84f96 10750else
eb697db5
DN
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
10752$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
10753 HAVE_JPEG=no
91e84f96 10754fi
eb697db5 10755rm -f conftest*
91e84f96 10756
eb697db5
DN
10757 fi
10758 if test "${HAVE_JPEG}" = "yes"; then
10759 LIBJPEG=-ljpeg
10760 fi
5929fbe7 10761fi
eb697db5
DN
10762
10763
10764### Use -lpng if available, unless `--with-png=no'.
10765HAVE_PNG=no
10766LIBPNG=
10767if test "${HAVE_X11}" = "yes"; then
10768 if test "${with_png}" != "no"; then
10769 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
10770 # in /usr/include/libpng.
10771 for ac_header in png.h libpng/png.h
10772do :
10773 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10774ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
036dc38d
LMI
10775eval as_val=\$$as_ac_Header
10776 if test "x$as_val" = x""yes; then :
5929fbe7 10777 cat >>confdefs.h <<_ACEOF
eb697db5 10778#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
91e84f96 10779_ACEOF
8c5ff6dd 10780
eb697db5
DN
10781fi
10782
10783done
10784
10785 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
10786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
10787$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
10788if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
a5edbe4a
GM
10789 $as_echo_n "(cached) " >&6
10790else
5929fbe7 10791 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10792LIBS="-lpng -lz -lm $LIBS"
10793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10794/* end confdefs.h. */
8c5ff6dd 10795
5929fbe7
GM
10796/* Override any GCC internal prototype to avoid an error.
10797 Use char because int might match the return type of a GCC
10798 builtin and then its argument prototype would still apply. */
10799#ifdef __cplusplus
10800extern "C"
10801#endif
eb697db5 10802char png_get_channels ();
91e84f96
GM
10803int
10804main ()
10805{
eb697db5 10806return png_get_channels ();
91e84f96
GM
10807 ;
10808 return 0;
10809}
10810_ACEOF
eb697db5
DN
10811if ac_fn_c_try_link "$LINENO"; then :
10812 ac_cv_lib_png_png_get_channels=yes
91e84f96 10813else
eb697db5 10814 ac_cv_lib_png_png_get_channels=no
91e84f96 10815fi
eb697db5
DN
10816rm -f core conftest.err conftest.$ac_objext \
10817 conftest$ac_exeext conftest.$ac_ext
10818LIBS=$ac_check_lib_save_LIBS
91e84f96 10819fi
eb697db5
DN
10820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
10821$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
10822if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
10823 HAVE_PNG=yes
91e84f96 10824fi
5929fbe7 10825
91e84f96
GM
10826 fi
10827 fi
10828
eb697db5 10829 if test "${HAVE_PNG}" = "yes"; then
91e84f96 10830
eb697db5 10831$as_echo "#define HAVE_PNG 1" >>confdefs.h
91e84f96 10832
eb697db5
DN
10833 LIBPNG="-lpng -lz -lm"
10834 fi
91e84f96
GM
10835fi
10836
10837
eb697db5
DN
10838### Use -ltiff if available, unless `--with-tiff=no'.
10839HAVE_TIFF=no
10840LIBTIFF=
10841if test "${HAVE_X11}" = "yes"; then
10842 if test "${with_tiff}" != "no"; then
10843 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
10844if test "x$ac_cv_header_tiffio_h" = x""yes; then :
10845 tifflibs="-lz -lm"
10846 # At least one tiff package requires the jpeg library.
10847 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
10849$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
10850if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
91e84f96
GM
10851 $as_echo_n "(cached) " >&6
10852else
eb697db5
DN
10853 ac_check_lib_save_LIBS=$LIBS
10854LIBS="-ltiff $tifflibs $LIBS"
10855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10856/* end confdefs.h. */
5929fbe7
GM
10857
10858/* Override any GCC internal prototype to avoid an error.
10859 Use char because int might match the return type of a GCC
10860 builtin and then its argument prototype would still apply. */
10861#ifdef __cplusplus
10862extern "C"
10863#endif
eb697db5 10864char TIFFGetVersion ();
91e84f96
GM
10865int
10866main ()
10867{
eb697db5 10868return TIFFGetVersion ();
91e84f96
GM
10869 ;
10870 return 0;
10871}
10872_ACEOF
eb697db5
DN
10873if ac_fn_c_try_link "$LINENO"; then :
10874 ac_cv_lib_tiff_TIFFGetVersion=yes
91e84f96 10875else
eb697db5 10876 ac_cv_lib_tiff_TIFFGetVersion=no
8c5ff6dd 10877fi
eb697db5
DN
10878rm -f core conftest.err conftest.$ac_objext \
10879 conftest$ac_exeext conftest.$ac_ext
10880LIBS=$ac_check_lib_save_LIBS
10881fi
10882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
10883$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
10884if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
10885 HAVE_TIFF=yes
49ebbd65 10886fi
91e84f96 10887
91e84f96
GM
10888fi
10889
91e84f96 10890
eb697db5 10891 fi
91e84f96 10892
eb697db5 10893 if test "${HAVE_TIFF}" = "yes"; then
91e84f96 10894
eb697db5 10895$as_echo "#define HAVE_TIFF 1" >>confdefs.h
91e84f96 10896
eb697db5
DN
10897 LIBTIFF=-ltiff
10898 fi
10899fi
91e84f96
GM
10900
10901
eb697db5
DN
10902### Use -lgif or -lungif if available, unless `--with-gif=no'.
10903HAVE_GIF=no
10904LIBGIF=
10905if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
10906 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
10907if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
10908 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10909# Earlier versions can crash Emacs.
10910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
10911$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
10912if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
91e84f96
GM
10913 $as_echo_n "(cached) " >&6
10914else
eb697db5
DN
10915 ac_check_lib_save_LIBS=$LIBS
10916LIBS="-lgif $LIBS"
10917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10918/* end confdefs.h. */
91e84f96
GM
10919
10920/* Override any GCC internal prototype to avoid an error.
10921 Use char because int might match the return type of a GCC
10922 builtin and then its argument prototype would still apply. */
10923#ifdef __cplusplus
10924extern "C"
10925#endif
eb697db5 10926char EGifPutExtensionLast ();
91e84f96
GM
10927int
10928main ()
10929{
eb697db5 10930return EGifPutExtensionLast ();
91e84f96
GM
10931 ;
10932 return 0;
10933}
10934_ACEOF
eb697db5
DN
10935if ac_fn_c_try_link "$LINENO"; then :
10936 ac_cv_lib_gif_EGifPutExtensionLast=yes
91e84f96 10937else
eb697db5 10938 ac_cv_lib_gif_EGifPutExtensionLast=no
15e12598 10939fi
eb697db5
DN
10940rm -f core conftest.err conftest.$ac_objext \
10941 conftest$ac_exeext conftest.$ac_ext
10942LIBS=$ac_check_lib_save_LIBS
10943fi
10944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
10945$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
10946if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
10947 HAVE_GIF=yes
10948else
10949 HAVE_GIF=maybe
91e84f96
GM
10950fi
10951
91e84f96 10952fi
91e84f96 10953
49ebbd65 10954
eb697db5
DN
10955
10956 if test "$HAVE_GIF" = yes; then
10957 LIBGIF=-lgif
10958 elif test "$HAVE_GIF" = maybe; then
10959# If gif_lib.h but no libgif, try libungif.
10960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10961$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10962if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
91e84f96
GM
10963 $as_echo_n "(cached) " >&6
10964else
10965 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10966LIBS="-lungif $LIBS"
10967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
10968/* end confdefs.h. */
10969
10970/* Override any GCC internal prototype to avoid an error.
10971 Use char because int might match the return type of a GCC
10972 builtin and then its argument prototype would still apply. */
10973#ifdef __cplusplus
10974extern "C"
10975#endif
eb697db5 10976char EGifPutExtensionLast ();
91e84f96
GM
10977int
10978main ()
10979{
eb697db5 10980return EGifPutExtensionLast ();
91e84f96
GM
10981 ;
10982 return 0;
10983}
10984_ACEOF
eb697db5
DN
10985if ac_fn_c_try_link "$LINENO"; then :
10986 ac_cv_lib_ungif_EGifPutExtensionLast=yes
91e84f96 10987else
eb697db5 10988 ac_cv_lib_ungif_EGifPutExtensionLast=no
91e84f96 10989fi
eb697db5
DN
10990rm -f core conftest.err conftest.$ac_objext \
10991 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
10992LIBS=$ac_check_lib_save_LIBS
10993fi
eb697db5
DN
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10995$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10996if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10997 HAVE_GIF=yes
e6df49e4 10998else
eb697db5 10999 HAVE_GIF=no
91e84f96
GM
11000fi
11001
eb697db5
DN
11002 test "$HAVE_GIF" = yes && LIBGIF=-lungif
11003 fi
5929fbe7 11004
eb697db5 11005 if test "${HAVE_GIF}" = "yes"; then
5929fbe7 11006
eb697db5 11007$as_echo "#define HAVE_GIF 1" >>confdefs.h
5929fbe7 11008
eb697db5 11009 fi
91e84f96 11010fi
91e84f96
GM
11011
11012
eb697db5
DN
11013if test "${HAVE_X11}" = "yes"; then
11014 MISSING=""
11015 WITH_NO=""
11016 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
11017 MISSING="libXpm" && WITH_NO="--with-xpm=no"
11018 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
11019 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
11020 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
11021 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
11022 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
11023 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
11024 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
11025 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
91e84f96 11026
eb697db5 11027 if test "X${MISSING}" != X; then
036dc38d 11028 as_fn_error "The following required libraries were not found:
eb697db5
DN
11029 $MISSING
11030Maybe some development libraries/packages are missing?
11031If you don't want to link with them give
11032 $WITH_NO
11033as options to configure" "$LINENO" 5
11034 fi
11035fi
5929fbe7 11036
eb697db5
DN
11037### Use -lgpm if available, unless `--with-gpm=no'.
11038HAVE_GPM=no
11039LIBGPM=
11040MOUSE_SUPPORT=
11041if test "${with_gpm}" != "no"; then
11042 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
11043if test "x$ac_cv_header_gpm_h" = x""yes; then :
11044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
11045$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
11046if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
91e84f96
GM
11047 $as_echo_n "(cached) " >&6
11048else
eb697db5
DN
11049 ac_check_lib_save_LIBS=$LIBS
11050LIBS="-lgpm $LIBS"
11051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11052/* end confdefs.h. */
91e84f96
GM
11053
11054/* Override any GCC internal prototype to avoid an error.
11055 Use char because int might match the return type of a GCC
11056 builtin and then its argument prototype would still apply. */
11057#ifdef __cplusplus
11058extern "C"
11059#endif
eb697db5 11060char Gpm_Open ();
91e84f96
GM
11061int
11062main ()
11063{
eb697db5 11064return Gpm_Open ();
91e84f96
GM
11065 ;
11066 return 0;
11067}
11068_ACEOF
eb697db5
DN
11069if ac_fn_c_try_link "$LINENO"; then :
11070 ac_cv_lib_gpm_Gpm_Open=yes
91e84f96 11071else
eb697db5
DN
11072 ac_cv_lib_gpm_Gpm_Open=no
11073fi
11074rm -f core conftest.err conftest.$ac_objext \
11075 conftest$ac_exeext conftest.$ac_ext
11076LIBS=$ac_check_lib_save_LIBS
11077fi
11078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
11079$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
11080if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
11081 HAVE_GPM=yes
11082fi
91e84f96 11083
91e84f96
GM
11084fi
11085
eb697db5
DN
11086
11087
11088 if test "${HAVE_GPM}" = "yes"; then
11089
11090$as_echo "#define HAVE_GPM 1" >>confdefs.h
11091
11092 LIBGPM=-lgpm
11093 ## May be reset below.
11094 MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
11095 fi
91e84f96 11096fi
15e12598 11097
8c5ff6dd 11098
eb697db5
DN
11099ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
11100if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
8c5ff6dd 11101
eb697db5 11102$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
91e84f96
GM
11103
11104fi
91e84f96
GM
11105
11106
91e84f96 11107
eb697db5
DN
11108C_SWITCH_X_SYSTEM=
11109### Use NeXTstep API to implement GUI.
11110if test "${HAVE_NS}" = "yes"; then
91e84f96 11111
eb697db5 11112$as_echo "#define HAVE_NS 1" >>confdefs.h
8c5ff6dd 11113
eb697db5 11114 if test "${NS_IMPL_COCOA}" = "yes"; then
5929fbe7 11115
eb697db5 11116$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
8c5ff6dd 11117
eb697db5
DN
11118 GNU_OBJC_CFLAGS=
11119 fi
11120 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
8c5ff6dd 11121
eb697db5 11122$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
8c5ff6dd 11123
eb697db5
DN
11124 # See also .m.o rule in Makefile.in */
11125 # FIXME: are all these flags really needed? Document here why. */
11126 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
11127 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
11128 fi
11129 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
8c5ff6dd 11130
eb697db5 11131$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
8c5ff6dd 11132
eb697db5
DN
11133 fi
11134 # We also have mouse menus.
11135 HAVE_MENUS=yes
11136 OTHER_FILES=ns-app
11137fi
91e84f96 11138
91e84f96 11139
eb697db5
DN
11140### Use session management (-lSM -lICE) if available
11141HAVE_X_SM=no
11142LIBXSM=
11143if test "${HAVE_X11}" = "yes"; then
11144 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11145if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
11147$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
11148if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
11149 $as_echo_n "(cached) " >&6
11150else
11151 ac_check_lib_save_LIBS=$LIBS
11152LIBS="-lSM -lICE $LIBS"
11153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11154/* end confdefs.h. */
6da23aaa 11155
91e84f96
GM
11156/* Override any GCC internal prototype to avoid an error.
11157 Use char because int might match the return type of a GCC
11158 builtin and then its argument prototype would still apply. */
11159#ifdef __cplusplus
11160extern "C"
11161#endif
eb697db5 11162char SmcOpenConnection ();
91e84f96
GM
11163int
11164main ()
0ca10bb7 11165{
eb697db5 11166return SmcOpenConnection ();
91e84f96
GM
11167 ;
11168 return 0;
11169}
11170_ACEOF
eb697db5
DN
11171if ac_fn_c_try_link "$LINENO"; then :
11172 ac_cv_lib_SM_SmcOpenConnection=yes
91e84f96 11173else
eb697db5
DN
11174 ac_cv_lib_SM_SmcOpenConnection=no
11175fi
11176rm -f core conftest.err conftest.$ac_objext \
11177 conftest$ac_exeext conftest.$ac_ext
11178LIBS=$ac_check_lib_save_LIBS
11179fi
11180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
11181$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
11182if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
11183 HAVE_X_SM=yes
91e84f96
GM
11184fi
11185
91e84f96 11186fi
91e84f96 11187
eb697db5
DN
11188
11189
11190 if test "${HAVE_X_SM}" = "yes"; then
11191
11192$as_echo "#define HAVE_X_SM 1" >>confdefs.h
11193
11194 LIBXSM="-lSM -lICE"
11195 case "$LIBS" in
11196 *-lSM*) ;;
11197 *) LIBS="$LIBXSM $LIBS" ;;
11198 esac
11199 fi
91e84f96 11200fi
91e84f96
GM
11201
11202
381408e2
LMI
11203### Use libxml (-lxml2) if available
11204if test "${with_xml2}" != "no"; then
11205 ### I'm not sure what the version number should be, so I just guessed.
11206
11207 succeeded=no
11208
11209 # Extract the first word of "pkg-config", so it can be a program name with args.
11210set dummy pkg-config; ac_word=$2
11211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11212$as_echo_n "checking for $ac_word... " >&6; }
11213if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
11214 $as_echo_n "(cached) " >&6
11215else
11216 case $PKG_CONFIG in
11217 [\\/]* | ?:[\\/]*)
11218 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11219 ;;
11220 *)
11221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11222for as_dir in $PATH
11223do
11224 IFS=$as_save_IFS
11225 test -z "$as_dir" && as_dir=.
11226 for ac_exec_ext in '' $ac_executable_extensions; do
11227 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11228 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11230 break 2
11231 fi
11232done
11233 done
11234IFS=$as_save_IFS
11235
11236 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11237 ;;
11238esac
11239fi
11240PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11241if test -n "$PKG_CONFIG"; then
11242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
11243$as_echo "$PKG_CONFIG" >&6; }
11244else
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11246$as_echo "no" >&6; }
11247fi
11248
11249
11250
11251 if test "$PKG_CONFIG" = "no" ; then
11252 HAVE_LIBXML2=no
11253 else
11254 PKG_CONFIG_MIN_VERSION=0.9.0
11255 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 > 2.2.0" >&5
11257$as_echo_n "checking for libxml-2.0 > 2.2.0... " >&6; }
11258
11259 if $PKG_CONFIG --exists "libxml-2.0 > 2.2.0" 2>&5; then
11260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11261$as_echo "yes" >&6; }
11262 succeeded=yes
11263
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_CFLAGS" >&5
11265$as_echo_n "checking LIBXML2_CFLAGS... " >&6; }
11266 LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 > 2.2.0"|sed -e 's,///*,/,g'`
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_CFLAGS" >&5
11268$as_echo "$LIBXML2_CFLAGS" >&6; }
11269
11270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBXML2_LIBS" >&5
11271$as_echo_n "checking LIBXML2_LIBS... " >&6; }
11272 LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 > 2.2.0"|sed -e 's,///*,/,g'`
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXML2_LIBS" >&5
11274$as_echo "$LIBXML2_LIBS" >&6; }
11275 else
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
11278 LIBXML2_CFLAGS=""
11279 LIBXML2_LIBS=""
11280 ## If we have a custom action on failure, don't print errors, but
11281 ## do set a variable so people can do so.
11282 LIBXML2_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libxml-2.0 > 2.2.0"`
11283
11284 fi
11285
11286
11287
11288 else
11289 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11290 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11291 fi
11292 fi
11293
11294 if test $succeeded = yes; then
11295 HAVE_LIBXML2=yes
11296 else
11297 HAVE_LIBXML2=no
11298 fi
11299
11300 if test "${HAVE_LIBXML2}" = "yes"; then
7d5444be 11301 LIBS="$LIBXML2_LIBS $LIBS"
c7a1fb9b
LMI
11302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for htmlReadMemory in -lxml2" >&5
11303$as_echo_n "checking for htmlReadMemory in -lxml2... " >&6; }
11304if test "${ac_cv_lib_xml2_htmlReadMemory+set}" = set; then :
11305 $as_echo_n "(cached) " >&6
11306else
11307 ac_check_lib_save_LIBS=$LIBS
11308LIBS="-lxml2 $LIBS"
11309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11310/* end confdefs.h. */
11311
11312/* Override any GCC internal prototype to avoid an error.
11313 Use char because int might match the return type of a GCC
11314 builtin and then its argument prototype would still apply. */
11315#ifdef __cplusplus
11316extern "C"
11317#endif
11318char htmlReadMemory ();
11319int
11320main ()
11321{
11322return htmlReadMemory ();
11323 ;
11324 return 0;
11325}
11326_ACEOF
11327if ac_fn_c_try_link "$LINENO"; then :
11328 ac_cv_lib_xml2_htmlReadMemory=yes
11329else
11330 ac_cv_lib_xml2_htmlReadMemory=no
11331fi
11332rm -f core conftest.err conftest.$ac_objext \
11333 conftest$ac_exeext conftest.$ac_ext
11334LIBS=$ac_check_lib_save_LIBS
11335fi
11336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_htmlReadMemory" >&5
11337$as_echo "$ac_cv_lib_xml2_htmlReadMemory" >&6; }
11338if test "x$ac_cv_lib_xml2_htmlReadMemory" = x""yes; then :
11339 HAVE_LIBXML2=yes
11340else
11341 HAVE_LIBXML2=no
11342fi
11343
11344 if test "${HAVE_LIBXML2}" = "yes"; then
381408e2
LMI
11345
11346$as_echo "#define HAVE_LIBXML2 1" >>confdefs.h
11347
c7a1fb9b
LMI
11348 else
11349 LIBXML2_LIBS=""
11350 LIBXML2_CFLAGS=""
11351 fi
381408e2
LMI
11352 fi
11353fi
11354
11355
11356
eb697db5
DN
11357# If netdb.h doesn't declare h_errno, we must declare it by hand.
11358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
11359$as_echo_n "checking whether netdb declares h_errno... " >&6; }
11360if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
91e84f96
GM
11361 $as_echo_n "(cached) " >&6
11362else
eb697db5 11363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11364/* end confdefs.h. */
eb697db5 11365#include <netdb.h>
5929fbe7
GM
11366int
11367main ()
11368{
eb697db5 11369return h_errno;
5929fbe7
GM
11370 ;
11371 return 0;
11372}
11373_ACEOF
eb697db5
DN
11374if ac_fn_c_try_link "$LINENO"; then :
11375 emacs_cv_netdb_declares_h_errno=yes
5929fbe7 11376else
eb697db5 11377 emacs_cv_netdb_declares_h_errno=no
5929fbe7 11378fi
eb697db5
DN
11379rm -f core conftest.err conftest.$ac_objext \
11380 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 11381fi
eb697db5
DN
11382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
11383$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
11384if test $emacs_cv_netdb_declares_h_errno = yes; then
91e84f96 11385
eb697db5 11386$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
8c5ff6dd
KR
11387
11388fi
11389
eb697db5
DN
11390# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11391# for constant arguments. Useless!
11392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11393$as_echo_n "checking for working alloca.h... " >&6; }
11394if test "${ac_cv_working_alloca_h+set}" = set; then :
5929fbe7
GM
11395 $as_echo_n "(cached) " >&6
11396else
eb697db5 11397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11398/* end confdefs.h. */
eb697db5 11399#include <alloca.h>
91e84f96
GM
11400int
11401main ()
11402{
eb697db5
DN
11403char *p = (char *) alloca (2 * sizeof (int));
11404 if (p) return 0;
91e84f96
GM
11405 ;
11406 return 0;
11407}
11408_ACEOF
eb697db5
DN
11409if ac_fn_c_try_link "$LINENO"; then :
11410 ac_cv_working_alloca_h=yes
47ad15cd 11411else
eb697db5 11412 ac_cv_working_alloca_h=no
47ad15cd 11413fi
eb697db5
DN
11414rm -f core conftest.err conftest.$ac_objext \
11415 conftest$ac_exeext conftest.$ac_ext
47ad15cd 11416fi
eb697db5
DN
11417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
11418$as_echo "$ac_cv_working_alloca_h" >&6; }
11419if test $ac_cv_working_alloca_h = yes; then
91e84f96 11420
eb697db5 11421$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
91e84f96
GM
11422
11423fi
91e84f96 11424
eb697db5
DN
11425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
11426$as_echo_n "checking for alloca... " >&6; }
11427if test "${ac_cv_func_alloca_works+set}" = set; then :
15e12598
VB
11428 $as_echo_n "(cached) " >&6
11429else
eb697db5 11430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
08b47d3d 11431/* end confdefs.h. */
eb697db5
DN
11432#ifdef __GNUC__
11433# define alloca __builtin_alloca
11434#else
11435# ifdef _MSC_VER
11436# include <malloc.h>
11437# define alloca _alloca
11438# else
11439# ifdef HAVE_ALLOCA_H
11440# include <alloca.h>
11441# else
11442# ifdef _AIX
11443 #pragma alloca
11444# else
11445# ifndef alloca /* predefined by HP cc +Olibcalls */
11446char *alloca ();
11447# endif
11448# endif
11449# endif
11450# endif
5929fbe7 11451#endif
8c5ff6dd 11452
91e84f96
GM
11453int
11454main ()
6da23aaa 11455{
eb697db5
DN
11456char *p = (char *) alloca (1);
11457 if (p) return 0;
08b47d3d
JD
11458 ;
11459 return 0;
6da23aaa 11460}
aaa36002 11461_ACEOF
eb697db5
DN
11462if ac_fn_c_try_link "$LINENO"; then :
11463 ac_cv_func_alloca_works=yes
91e84f96 11464else
eb697db5 11465 ac_cv_func_alloca_works=no
15e12598 11466fi
eb697db5
DN
11467rm -f core conftest.err conftest.$ac_objext \
11468 conftest$ac_exeext conftest.$ac_ext
15e12598 11469fi
eb697db5
DN
11470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
11471$as_echo "$ac_cv_func_alloca_works" >&6; }
15e12598 11472
eb697db5 11473if test $ac_cv_func_alloca_works = yes; then
cd03c74a 11474
eb697db5 11475$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
a4f64981 11476
8c5ff6dd 11477else
eb697db5
DN
11478 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11479# that cause trouble. Some versions do not even contain alloca or
11480# contain a buggy version. If you still want to use their alloca,
11481# use ar to extract alloca.o from them instead of compiling alloca.c.
a4f64981 11482
eb697db5 11483ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a4f64981 11484
eb697db5 11485$as_echo "#define C_ALLOCA 1" >>confdefs.h
a4f64981 11486
a4f64981 11487
eb697db5
DN
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
11489$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
11490if test "${ac_cv_os_cray+set}" = set; then :
5929fbe7 11491 $as_echo_n "(cached) " >&6
8c5ff6dd 11492else
eb697db5 11493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 11494/* end confdefs.h. */
eb697db5
DN
11495#if defined CRAY && ! defined CRAY2
11496webecray
8c5ff6dd 11497#else
eb697db5 11498wenotbecray
8c5ff6dd 11499#endif
a4f64981 11500
a4f64981 11501_ACEOF
eb697db5
DN
11502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11503 $EGREP "webecray" >/dev/null 2>&1; then :
11504 ac_cv_os_cray=yes
11505else
11506 ac_cv_os_cray=no
11507fi
11508rm -f conftest*
a4f64981 11509
a5edbe4a 11510fi
eb697db5
DN
11511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
11512$as_echo "$ac_cv_os_cray" >&6; }
11513if test $ac_cv_os_cray = yes; then
11514 for ac_func in _getb67 GETB67 getb67; do
11515 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11516ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
036dc38d
LMI
11517eval as_val=\$$as_ac_var
11518 if test "x$as_val" = x""yes; then :
cd03c74a 11519
eb697db5
DN
11520cat >>confdefs.h <<_ACEOF
11521#define CRAY_STACKSEG_END $ac_func
5929fbe7 11522_ACEOF
a4f64981 11523
eb697db5 11524 break
5929fbe7 11525fi
a4f64981 11526
eb697db5 11527 done
5929fbe7 11528fi
a4f64981 11529
eb697db5
DN
11530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
11531$as_echo_n "checking stack direction for C alloca... " >&6; }
11532if test "${ac_cv_c_stack_direction+set}" = set; then :
5929fbe7
GM
11533 $as_echo_n "(cached) " >&6
11534else
eb697db5
DN
11535 if test "$cross_compiling" = yes; then :
11536 ac_cv_c_stack_direction=0
11537else
11538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11539/* end confdefs.h. */
eb697db5 11540$ac_includes_default
91e84f96 11541int
eb697db5 11542find_stack_direction ()
91e84f96 11543{
eb697db5
DN
11544 static char *addr = 0;
11545 auto char dummy;
11546 if (addr == 0)
11547 {
11548 addr = &dummy;
11549 return find_stack_direction ();
11550 }
11551 else
11552 return (&dummy > addr) ? 1 : -1;
91e84f96 11553}
91e84f96 11554
91e84f96
GM
11555int
11556main ()
11557{
eb697db5 11558 return find_stack_direction () < 0;
91e84f96
GM
11559}
11560_ACEOF
eb697db5
DN
11561if ac_fn_c_try_run "$LINENO"; then :
11562 ac_cv_c_stack_direction=1
91e84f96 11563else
eb697db5
DN
11564 ac_cv_c_stack_direction=-1
11565fi
11566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11567 conftest.$ac_objext conftest.beam conftest.$ac_ext
91e84f96
GM
11568fi
11569
91e84f96 11570fi
eb697db5
DN
11571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
11572$as_echo "$ac_cv_c_stack_direction" >&6; }
11573cat >>confdefs.h <<_ACEOF
11574#define STACK_DIRECTION $ac_cv_c_stack_direction
11575_ACEOF
91e84f96 11576
91e84f96 11577
5929fbe7 11578fi
eb697db5 11579
91e84f96 11580
eb697db5 11581if test x"$ac_cv_func_alloca_works" != xyes; then
036dc38d 11582 as_fn_error "a system implementation of alloca is required " "$LINENO" 5
91e84f96
GM
11583fi
11584
eb697db5
DN
11585# fmod, logb, and frexp are found in -lm on most systems.
11586# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
11587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
11588$as_echo_n "checking for sqrt in -lm... " >&6; }
11589if test "${ac_cv_lib_m_sqrt+set}" = set; then :
91e84f96
GM
11590 $as_echo_n "(cached) " >&6
11591else
5929fbe7 11592 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11593LIBS="-lm $LIBS"
11594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11595/* end confdefs.h. */
91e84f96
GM
11596
11597/* Override any GCC internal prototype to avoid an error.
11598 Use char because int might match the return type of a GCC
11599 builtin and then its argument prototype would still apply. */
11600#ifdef __cplusplus
11601extern "C"
11602#endif
eb697db5 11603char sqrt ();
91e84f96
GM
11604int
11605main ()
11606{
eb697db5 11607return sqrt ();
91e84f96
GM
11608 ;
11609 return 0;
11610}
11611_ACEOF
eb697db5
DN
11612if ac_fn_c_try_link "$LINENO"; then :
11613 ac_cv_lib_m_sqrt=yes
91e84f96 11614else
eb697db5 11615 ac_cv_lib_m_sqrt=no
91e84f96 11616fi
eb697db5
DN
11617rm -f core conftest.err conftest.$ac_objext \
11618 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11619LIBS=$ac_check_lib_save_LIBS
91e84f96 11620fi
eb697db5
DN
11621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
11622$as_echo "$ac_cv_lib_m_sqrt" >&6; }
11623if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
11624 cat >>confdefs.h <<_ACEOF
11625#define HAVE_LIBM 1
91e84f96 11626_ACEOF
6da23aaa 11627
eb697db5 11628 LIBS="-lm $LIBS"
6da23aaa 11629
5929fbe7 11630fi
0ca10bb7 11631
8c5ff6dd 11632
eb697db5
DN
11633# Check for mail-locking functions in a "mail" library. Probably this should
11634# have the same check as for liblockfile below.
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
11636$as_echo_n "checking for maillock in -lmail... " >&6; }
11637if test "${ac_cv_lib_mail_maillock+set}" = set; then :
5929fbe7
GM
11638 $as_echo_n "(cached) " >&6
11639else
eb697db5
DN
11640 ac_check_lib_save_LIBS=$LIBS
11641LIBS="-lmail $LIBS"
11642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11643/* end confdefs.h. */
0ca10bb7 11644
91e84f96
GM
11645/* Override any GCC internal prototype to avoid an error.
11646 Use char because int might match the return type of a GCC
11647 builtin and then its argument prototype would still apply. */
11648#ifdef __cplusplus
11649extern "C"
11650#endif
eb697db5 11651char maillock ();
91e84f96
GM
11652int
11653main ()
6da23aaa 11654{
eb697db5 11655return maillock ();
91e84f96
GM
11656 ;
11657 return 0;
6da23aaa 11658}
91e84f96 11659_ACEOF
eb697db5
DN
11660if ac_fn_c_try_link "$LINENO"; then :
11661 ac_cv_lib_mail_maillock=yes
91e84f96 11662else
eb697db5 11663 ac_cv_lib_mail_maillock=no
91e84f96 11664fi
eb697db5
DN
11665rm -f core conftest.err conftest.$ac_objext \
11666 conftest$ac_exeext conftest.$ac_ext
11667LIBS=$ac_check_lib_save_LIBS
91e84f96 11668fi
eb697db5
DN
11669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
11670$as_echo "$ac_cv_lib_mail_maillock" >&6; }
11671if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
11672 have_mail=yes
91e84f96 11673else
eb697db5
DN
11674 have_mail=no
11675fi
11676
11677if test $have_mail = yes; then
11678 LIBS_MAIL=-lmail
11679 LIBS="$LIBS_MAIL $LIBS"
11680
11681$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
11682
11683else
11684 LIBS_MAIL=
11685fi
11686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
11687$as_echo_n "checking for maillock in -llockfile... " >&6; }
11688if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
91e84f96
GM
11689 $as_echo_n "(cached) " >&6
11690else
11691 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11692LIBS="-llockfile $LIBS"
11693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
11694/* end confdefs.h. */
11695
11696/* Override any GCC internal prototype to avoid an error.
11697 Use char because int might match the return type of a GCC
11698 builtin and then its argument prototype would still apply. */
11699#ifdef __cplusplus
11700extern "C"
11701#endif
eb697db5 11702char maillock ();
91e84f96
GM
11703int
11704main ()
503d2be0 11705{
eb697db5 11706return maillock ();
91e84f96
GM
11707 ;
11708 return 0;
503d2be0 11709}
91e84f96 11710_ACEOF
eb697db5
DN
11711if ac_fn_c_try_link "$LINENO"; then :
11712 ac_cv_lib_lockfile_maillock=yes
503d2be0 11713else
eb697db5 11714 ac_cv_lib_lockfile_maillock=no
a21616bd 11715fi
eb697db5
DN
11716rm -f core conftest.err conftest.$ac_objext \
11717 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11718LIBS=$ac_check_lib_save_LIBS
11719fi
eb697db5
DN
11720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
11721$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
11722if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
11723 have_lockfile=yes
5929fbe7 11724else
eb697db5
DN
11725 have_lockfile=no
11726fi
11727
11728if test $have_lockfile = yes; then
11729 LIBS_MAIL=-llockfile
11730 LIBS="$LIBS_MAIL $LIBS"
11731
11732$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
11733
11734else
11735# If we have the shared liblockfile, assume we must use it for mail
11736# locking (e.g. Debian). If we couldn't link against liblockfile
11737# (no liblockfile.a installed), ensure that we don't need to.
11738 # Extract the first word of "liblockfile.so", so it can be a program name with args.
11739set dummy liblockfile.so; ac_word=$2
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11741$as_echo_n "checking for $ac_word... " >&6; }
11742if test "${ac_cv_prog_liblockfile+set}" = set; then :
11743 $as_echo_n "(cached) " >&6
11744else
11745 if test -n "$liblockfile"; then
11746 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
11747else
11748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11749as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
11750for as_dir in $as_dummy
11751do
11752 IFS=$as_save_IFS
11753 test -z "$as_dir" && as_dir=.
11754 for ac_exec_ext in '' $ac_executable_extensions; do
11755 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11756 ac_cv_prog_liblockfile="yes"
11757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11758 break 2
11759 fi
11760done
11761 done
11762IFS=$as_save_IFS
11763
11764 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
11765fi
11766fi
11767liblockfile=$ac_cv_prog_liblockfile
11768if test -n "$liblockfile"; then
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
11770$as_echo "$liblockfile" >&6; }
11771else
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11773$as_echo "no" >&6; }
11774fi
11775
11776
11777 if test $ac_cv_prog_liblockfile = yes; then
036dc38d 11778 as_fn_error "Shared liblockfile found but can't link against it.
eb697db5
DN
11779This probably means that movemail could lose mail.
11780There may be a \`development' package to install containing liblockfile." "$LINENO" 5
11781 fi
11782fi
11783for ac_func in touchlock
11784do :
11785 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
11786if test "x$ac_cv_func_touchlock" = x""yes; then :
11787 cat >>confdefs.h <<_ACEOF
11788#define HAVE_TOUCHLOCK 1
11789_ACEOF
11790
11791fi
11792done
11793
11794for ac_header in maillock.h
11795do :
11796 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
11797if test "x$ac_cv_header_maillock_h" = x""yes; then :
11798 cat >>confdefs.h <<_ACEOF
11799#define HAVE_MAILLOCK_H 1
11800_ACEOF
11801
11802fi
11803
11804done
11805
11806
11807
11808## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
11809## interlock access to the mail spool. The alternative is a lock file named
11810## /usr/spool/mail/$USER.lock.
11811mail_lock=no
11812case "$opsys" in
11813 aix4-2) mail_lock="lockf" ;;
11814
11815 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
11816
11817 ## On GNU/Linux systems, both methods are used by various mail programs.
11818 ## I assume most people are using newer mailers that have heard of flock.
11819 ## Change this if you need to.
11820 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
11821 ## configure gets the right answers, and that means *NOT* using flock.
11822 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
11823 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
11824 ## Debian maintainer hasn't provided a clean fix for Emacs.
11825 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
11826 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
11827 ## correct logic. -- fx
11828 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
11829 ## liblockfile is a Free Software replacement for libmail, used on
11830 ## Debian systems and elsewhere. -rfr.
11831 gnu-*)
11832 mail_lock="flock"
11833 if test $have_mail = yes || test $have_lockfile = yes; then
11834 test $ac_cv_header_maillock_h = yes && mail_lock=no
11835 fi
11836 ;;
11837esac
11838
11839BLESSMAIL_TARGET=
11840case "$mail_lock" in
11841 flock)
11842$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
11843 ;;
11844
11845 lockf)
11846$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
11847 ;;
11848
11849 *) BLESSMAIL_TARGET="need-blessmail" ;;
91e84f96 11850esac
ca81d7a0 11851
91e84f96 11852
91e84f96 11853
eb697db5
DN
11854for ac_func in gethostname getdomainname dup2 \
11855rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
72af86bd 11856random lrand48 logb frexp fmod rint cbrt ftime setsid \
eb697db5
DN
11857strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11858utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
8966b757 11859__fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \
eb697db5 11860sendto recvfrom getsockopt setsockopt getsockname getpeername \
72af86bd 11861gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
eb697db5 11862memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
dcc19aac 11863cfmakeraw cfsetspeed isnan copysign __executable_start
eb697db5
DN
11864do :
11865 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11866ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
036dc38d
LMI
11867eval as_val=\$$as_ac_var
11868 if test "x$as_val" = x""yes; then :
eb697db5
DN
11869 cat >>confdefs.h <<_ACEOF
11870#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
91e84f96 11871_ACEOF
a21616bd 11872
91e84f96 11873fi
eb697db5 11874done
a21616bd 11875
a21616bd 11876
eb697db5
DN
11877for ac_header in sys/un.h
11878do :
11879 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
11880if test "x$ac_cv_header_sys_un_h" = x""yes; then :
11881 cat >>confdefs.h <<_ACEOF
11882#define HAVE_SYS_UN_H 1
11883_ACEOF
503d2be0 11884
91e84f96 11885fi
503d2be0 11886
eb697db5 11887done
91e84f96 11888
eb697db5
DN
11889
11890
11891
11892
11893
11894
8a0b50ed
AS
11895 for ac_func in $ac_func_list
11896do :
11897 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11898ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
036dc38d
LMI
11899eval as_val=\$$as_ac_var
11900 if test "x$as_val" = x""yes; then :
8a0b50ed
AS
11901 cat >>confdefs.h <<_ACEOF
11902#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11903_ACEOF
11904
11905fi
11906done
11907
11908
11909
11910
eb697db5
DN
11911
11912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
11913$as_echo_n "checking for working mktime... " >&6; }
11914if test "${ac_cv_func_working_mktime+set}" = set; then :
91e84f96
GM
11915 $as_echo_n "(cached) " >&6
11916else
eb697db5
DN
11917 if test "$cross_compiling" = yes; then :
11918 ac_cv_func_working_mktime=no
11919else
11920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11921/* end confdefs.h. */
eb697db5
DN
11922/* Test program from Paul Eggert and Tony Leneis. */
11923#ifdef TIME_WITH_SYS_TIME
11924# include <sys/time.h>
11925# include <time.h>
91e84f96 11926#else
eb697db5
DN
11927# ifdef HAVE_SYS_TIME_H
11928# include <sys/time.h>
11929# else
11930# include <time.h>
11931# endif
91e84f96
GM
11932#endif
11933
eb697db5
DN
11934#include <limits.h>
11935#include <stdlib.h>
91e84f96 11936
eb697db5
DN
11937#ifdef HAVE_UNISTD_H
11938# include <unistd.h>
91e84f96 11939#endif
eb697db5
DN
11940
11941#ifndef HAVE_ALARM
11942# define alarm(X) /* empty */
91e84f96 11943#endif
ca81d7a0 11944
eb697db5
DN
11945/* Work around redefinition to rpl_putenv by other config tests. */
11946#undef putenv
11947
11948static time_t time_t_max;
11949static time_t time_t_min;
11950
11951/* Values we'll use to set the TZ environment variable. */
036dc38d
LMI
11952static char *tz_strings[] = {
11953 (char *) 0, "TZ=GMT0", "TZ=JST-9",
eb697db5
DN
11954 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11955};
11956#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5929fbe7 11957
eb697db5
DN
11958/* Return 0 if mktime fails to convert a date in the spring-forward gap.
11959 Based on a problem report from Andreas Jaeger. */
11960static int
11961spring_forward_gap ()
6da23aaa 11962{
eb697db5
DN
11963 /* glibc (up to about 1998-10-07) failed this test. */
11964 struct tm tm;
5929fbe7 11965
eb697db5
DN
11966 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11967 instead of "TZ=America/Vancouver" in order to detect the bug even
11968 on systems that don't support the Olson extension, or don't have the
11969 full zoneinfo tables installed. */
036dc38d 11970 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
5929fbe7 11971
eb697db5
DN
11972 tm.tm_year = 98;
11973 tm.tm_mon = 3;
11974 tm.tm_mday = 5;
11975 tm.tm_hour = 2;
11976 tm.tm_min = 0;
11977 tm.tm_sec = 0;
11978 tm.tm_isdst = -1;
11979 return mktime (&tm) != (time_t) -1;
91e84f96 11980}
503d2be0 11981
eb697db5 11982static int
036dc38d
LMI
11983mktime_test1 (now)
11984 time_t now;
eb697db5
DN
11985{
11986 struct tm *lt;
11987 return ! (lt = localtime (&now)) || mktime (lt) == now;
11988}
503d2be0 11989
eb697db5 11990static int
036dc38d
LMI
11991mktime_test (now)
11992 time_t now;
eb697db5
DN
11993{
11994 return (mktime_test1 (now)
11995 && mktime_test1 ((time_t) (time_t_max - now))
11996 && mktime_test1 ((time_t) (time_t_min + now)));
11997}
bf89cb4d 11998
eb697db5
DN
11999static int
12000irix_6_4_bug ()
91e84f96 12001{
eb697db5
DN
12002 /* Based on code from Ariel Faigon. */
12003 struct tm tm;
12004 tm.tm_year = 96;
12005 tm.tm_mon = 3;
12006 tm.tm_mday = 0;
12007 tm.tm_hour = 0;
12008 tm.tm_min = 0;
12009 tm.tm_sec = 0;
12010 tm.tm_isdst = -1;
12011 mktime (&tm);
12012 return tm.tm_mon == 2 && tm.tm_mday == 31;
12013}
5929fbe7 12014
eb697db5 12015static int
036dc38d
LMI
12016bigtime_test (j)
12017 int j;
eb697db5
DN
12018{
12019 struct tm tm;
12020 time_t now;
12021 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
12022 now = mktime (&tm);
12023 if (now != (time_t) -1)
12024 {
12025 struct tm *lt = localtime (&now);
12026 if (! (lt
12027 && lt->tm_year == tm.tm_year
12028 && lt->tm_mon == tm.tm_mon
12029 && lt->tm_mday == tm.tm_mday
12030 && lt->tm_hour == tm.tm_hour
12031 && lt->tm_min == tm.tm_min
12032 && lt->tm_sec == tm.tm_sec
12033 && lt->tm_yday == tm.tm_yday
12034 && lt->tm_wday == tm.tm_wday
12035 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
12036 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
12037 return 0;
12038 }
12039 return 1;
503d2be0 12040}
91e84f96 12041
eb697db5
DN
12042static int
12043year_2050_test ()
12044{
12045 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
12046 ignoring leap seconds. */
12047 unsigned long int answer = 2527315200UL;
19650fd6 12048
eb697db5
DN
12049 struct tm tm;
12050 time_t t;
12051 tm.tm_year = 2050 - 1900;
12052 tm.tm_mon = 2 - 1;
12053 tm.tm_mday = 1;
12054 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
12055 tm.tm_isdst = -1;
ca81d7a0 12056
eb697db5
DN
12057 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
12058 instead of "TZ=America/Vancouver" in order to detect the bug even
12059 on systems that don't support the Olson extension, or don't have the
12060 full zoneinfo tables installed. */
036dc38d 12061 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
a21616bd 12062
eb697db5 12063 t = mktime (&tm);
6da23aaa 12064
eb697db5
DN
12065 /* Check that the result is either a failure, or close enough
12066 to the correct answer that we can assume the discrepancy is
12067 due to leap seconds. */
12068 return (t == (time_t) -1
12069 || (0 < t && answer - 120 <= t && t <= answer + 120));
12070}
91e84f96 12071
21287a21
CY
12072int
12073main ()
12074{
eb697db5
DN
12075 time_t t, delta;
12076 int i, j;
a21616bd 12077
eb697db5
DN
12078 /* This test makes some buggy mktime implementations loop.
12079 Give up after 60 seconds; a mktime slower than that
12080 isn't worth using anyway. */
12081 alarm (60);
a21616bd 12082
eb697db5
DN
12083 for (;;)
12084 {
12085 t = (time_t_max << 1) + 1;
12086 if (t <= time_t_max)
12087 break;
12088 time_t_max = t;
12089 }
12090 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
19650fd6 12091
eb697db5
DN
12092 delta = time_t_max / 997; /* a suitable prime number */
12093 for (i = 0; i < N_STRINGS; i++)
12094 {
12095 if (tz_strings[i])
036dc38d 12096 putenv (tz_strings[i]);
ca81d7a0 12097
eb697db5
DN
12098 for (t = 0; t <= time_t_max - delta; t += delta)
12099 if (! mktime_test (t))
12100 return 1;
12101 if (! (mktime_test ((time_t) 1)
12102 && mktime_test ((time_t) (60 * 60))
12103 && mktime_test ((time_t) (60 * 60 * 24))))
12104 return 1;
bf89cb4d 12105
eb697db5
DN
12106 for (j = 1; ; j <<= 1)
12107 if (! bigtime_test (j))
12108 return 1;
12109 else if (INT_MAX / 2 < j)
12110 break;
12111 if (! bigtime_test (INT_MAX))
12112 return 1;
12113 }
12114 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
9452ded1
DN
12115}
12116_ACEOF
eb697db5
DN
12117if ac_fn_c_try_run "$LINENO"; then :
12118 ac_cv_func_working_mktime=yes
6da23aaa 12119else
eb697db5
DN
12120 ac_cv_func_working_mktime=no
12121fi
12122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12123 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 12124fi
0ca10bb7 12125
eb697db5
DN
12126fi
12127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
12128$as_echo "$ac_cv_func_working_mktime" >&6; }
12129if test $ac_cv_func_working_mktime = no; then
12130 case " $LIBOBJS " in
12131 *" mktime.$ac_objext "* ) ;;
12132 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
12133 ;;
12134esac
91e84f96 12135
eb697db5 12136fi
91e84f96 12137
eb697db5 12138if test "$ac_cv_func_working_mktime" = no; then
91e84f96 12139
eb697db5 12140$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
a21616bd 12141
91e84f96
GM
12142fi
12143
eb697db5 12144ac_have_func=no # yes means we've found a way to get the load average.
a21616bd 12145
eb697db5
DN
12146# Make sure getloadavg.c is where it belongs, at configure-time.
12147test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
036dc38d 12148 as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
503d2be0 12149
eb697db5 12150ac_save_LIBS=$LIBS
91e84f96 12151
eb697db5
DN
12152# Check for getloadavg, but be sure not to touch the cache variable.
12153(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
12154if test "x$ac_cv_func_getloadavg" = x""yes; then :
12155 exit 0
a21616bd 12156else
eb697db5 12157 exit 1
21287a21 12158fi
eb697db5 12159) && ac_have_func=yes
503d2be0 12160
eb697db5
DN
12161# On HPUX9, an unprivileged user can get load averages through this function.
12162for ac_func in pstat_getdynamic
12163do :
12164 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
12165if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
12166 cat >>confdefs.h <<_ACEOF
12167#define HAVE_PSTAT_GETDYNAMIC 1
503d2be0 12168_ACEOF
91e84f96 12169
91e84f96 12170fi
eb697db5 12171done
91e84f96 12172
a21616bd 12173
eb697db5
DN
12174# Solaris has libkstat which does not require root.
12175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
12176$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
12177if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
91e84f96
GM
12178 $as_echo_n "(cached) " >&6
12179else
12180 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12181LIBS="-lkstat $LIBS"
12182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
12183/* end confdefs.h. */
12184
12185/* Override any GCC internal prototype to avoid an error.
12186 Use char because int might match the return type of a GCC
12187 builtin and then its argument prototype would still apply. */
12188#ifdef __cplusplus
12189extern "C"
12190#endif
eb697db5 12191char kstat_open ();
91e84f96
GM
12192int
12193main ()
12194{
eb697db5 12195return kstat_open ();
91e84f96
GM
12196 ;
12197 return 0;
12198}
12199_ACEOF
eb697db5
DN
12200if ac_fn_c_try_link "$LINENO"; then :
12201 ac_cv_lib_kstat_kstat_open=yes
91e84f96 12202else
eb697db5 12203 ac_cv_lib_kstat_kstat_open=no
91e84f96 12204fi
eb697db5
DN
12205rm -f core conftest.err conftest.$ac_objext \
12206 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
12207LIBS=$ac_check_lib_save_LIBS
12208fi
eb697db5
DN
12209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
12210$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
12211if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
12212 cat >>confdefs.h <<_ACEOF
12213#define HAVE_LIBKSTAT 1
12214_ACEOF
a21616bd 12215
eb697db5 12216 LIBS="-lkstat $LIBS"
503d2be0 12217
eb697db5 12218fi
91e84f96 12219
eb697db5
DN
12220test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
12221
12222# Some systems with -lutil have (and need) -lkvm as well, some do not.
12223# On Solaris, -lkvm requires nlist from -lelf, so check that first
12224# to get the right answer into the cache.
12225# For kstat on solaris, we need libelf to force the definition of SVR4 below.
12226if test $ac_have_func = no; then
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
12228$as_echo_n "checking for elf_begin in -lelf... " >&6; }
12229if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
e9a63f04 12230 $as_echo_n "(cached) " >&6
98418dba 12231else
0ca10bb7 12232 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12233LIBS="-lelf $LIBS"
12234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12235/* end confdefs.h. */
ca81d7a0 12236
0ca10bb7
RC
12237/* Override any GCC internal prototype to avoid an error.
12238 Use char because int might match the return type of a GCC
12239 builtin and then its argument prototype would still apply. */
12240#ifdef __cplusplus
12241extern "C"
12242#endif
eb697db5 12243char elf_begin ();
0ca10bb7
RC
12244int
12245main ()
12246{
eb697db5 12247return elf_begin ();
0ca10bb7
RC
12248 ;
12249 return 0;
12250}
503d2be0 12251_ACEOF
eb697db5
DN
12252if ac_fn_c_try_link "$LINENO"; then :
12253 ac_cv_lib_elf_elf_begin=yes
503d2be0 12254else
eb697db5 12255 ac_cv_lib_elf_elf_begin=no
a21616bd 12256fi
eb697db5
DN
12257rm -f core conftest.err conftest.$ac_objext \
12258 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
12259LIBS=$ac_check_lib_save_LIBS
12260fi
eb697db5
DN
12261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
12262$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
12263if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
12264 LIBS="-lelf $LIBS"
c0d27fcc 12265fi
bf89cb4d 12266
eb697db5
DN
12267fi
12268if test $ac_have_func = no; then
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
12270$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
12271if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
e9a63f04 12272 $as_echo_n "(cached) " >&6
21287a21 12273else
0ca10bb7 12274 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12275LIBS="-lkvm $LIBS"
12276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 12277/* end confdefs.h. */
21287a21 12278
0ca10bb7
RC
12279/* Override any GCC internal prototype to avoid an error.
12280 Use char because int might match the return type of a GCC
12281 builtin and then its argument prototype would still apply. */
12282#ifdef __cplusplus
12283extern "C"
12284#endif
eb697db5 12285char kvm_open ();
21287a21
CY
12286int
12287main ()
12288{
eb697db5 12289return kvm_open ();
21287a21
CY
12290 ;
12291 return 0;
12292}
12293_ACEOF
eb697db5
DN
12294if ac_fn_c_try_link "$LINENO"; then :
12295 ac_cv_lib_kvm_kvm_open=yes
21287a21 12296else
eb697db5 12297 ac_cv_lib_kvm_kvm_open=no
0ca10bb7 12298fi
eb697db5
DN
12299rm -f core conftest.err conftest.$ac_objext \
12300 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
12301LIBS=$ac_check_lib_save_LIBS
12302fi
eb697db5
DN
12303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
12304$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
12305if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
12306 LIBS="-lkvm $LIBS"
6da23aaa 12307fi
bf89cb4d 12308
eb697db5
DN
12309 # Check for the 4.4BSD definition of getloadavg.
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
12311$as_echo_n "checking for getloadavg in -lutil... " >&6; }
12312if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
0ca10bb7
RC
12313 $as_echo_n "(cached) " >&6
12314else
12315 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12316LIBS="-lutil $LIBS"
12317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 12318/* end confdefs.h. */
21287a21 12319
0ca10bb7
RC
12320/* Override any GCC internal prototype to avoid an error.
12321 Use char because int might match the return type of a GCC
12322 builtin and then its argument prototype would still apply. */
12323#ifdef __cplusplus
12324extern "C"
12325#endif
eb697db5 12326char getloadavg ();
21287a21
CY
12327int
12328main ()
12329{
eb697db5 12330return getloadavg ();
21287a21
CY
12331 ;
12332 return 0;
12333}
12334_ACEOF
eb697db5
DN
12335if ac_fn_c_try_link "$LINENO"; then :
12336 ac_cv_lib_util_getloadavg=yes
21287a21 12337else
eb697db5 12338 ac_cv_lib_util_getloadavg=no
21287a21 12339fi
eb697db5
DN
12340rm -f core conftest.err conftest.$ac_objext \
12341 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 12342LIBS=$ac_check_lib_save_LIBS
21287a21 12343fi
eb697db5
DN
12344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
12345$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
12346if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
12347 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
21287a21 12348fi
21287a21 12349
eb697db5 12350fi
91e84f96 12351
eb697db5
DN
12352if test $ac_have_func = no; then
12353 # There is a commonly available library for RS/6000 AIX.
12354 # Since it is not a standard part of AIX, it might be installed locally.
12355 ac_getloadavg_LIBS=$LIBS
12356 LIBS="-L/usr/local/lib $LIBS"
12357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
12358$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
12359if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
e9a63f04 12360 $as_echo_n "(cached) " >&6
21287a21 12361else
0ca10bb7 12362 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12363LIBS="-lgetloadavg $LIBS"
12364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 12365/* end confdefs.h. */
21287a21 12366
0ca10bb7
RC
12367/* Override any GCC internal prototype to avoid an error.
12368 Use char because int might match the return type of a GCC
12369 builtin and then its argument prototype would still apply. */
12370#ifdef __cplusplus
12371extern "C"
12372#endif
eb697db5 12373char getloadavg ();
21287a21
CY
12374int
12375main ()
12376{
eb697db5 12377return getloadavg ();
21287a21
CY
12378 ;
12379 return 0;
12380}
12381_ACEOF
eb697db5
DN
12382if ac_fn_c_try_link "$LINENO"; then :
12383 ac_cv_lib_getloadavg_getloadavg=yes
0ca10bb7 12384else
eb697db5 12385 ac_cv_lib_getloadavg_getloadavg=no
0ca10bb7 12386fi
eb697db5
DN
12387rm -f core conftest.err conftest.$ac_objext \
12388 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
12389LIBS=$ac_check_lib_save_LIBS
12390fi
eb697db5
DN
12391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
12392$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
12393if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
12394 LIBS="-lgetloadavg $LIBS"
6da23aaa 12395else
eb697db5 12396 LIBS=$ac_getloadavg_LIBS
6da23aaa
EZ
12397fi
12398
eb697db5 12399fi
6da23aaa 12400
eb697db5
DN
12401# Make sure it is really in the library, if we think we found it,
12402# otherwise set up the replacement function.
12403for ac_func in getloadavg
12404do :
12405 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
12406if test "x$ac_cv_func_getloadavg" = x""yes; then :
12407 cat >>confdefs.h <<_ACEOF
12408#define HAVE_GETLOADAVG 1
0ca10bb7
RC
12409_ACEOF
12410
eb697db5
DN
12411else
12412 case " $LIBOBJS " in
12413 *" getloadavg.$ac_objext "* ) ;;
12414 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
12415 ;;
12416esac
12417
12418
12419$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
12420
12421# Figure out what our getloadavg.c needs.
12422ac_have_func=no
12423ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
12424if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
12425 ac_have_func=yes
12426
12427$as_echo "#define DGUX 1" >>confdefs.h
12428
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
12430$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
12431if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
0ca10bb7
RC
12432 $as_echo_n "(cached) " >&6
12433else
12434 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12435LIBS="-ldgc $LIBS"
12436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 12437/* end confdefs.h. */
21287a21 12438
0ca10bb7
RC
12439/* Override any GCC internal prototype to avoid an error.
12440 Use char because int might match the return type of a GCC
12441 builtin and then its argument prototype would still apply. */
12442#ifdef __cplusplus
12443extern "C"
12444#endif
eb697db5 12445char dg_sys_info ();
21287a21
CY
12446int
12447main ()
12448{
eb697db5 12449return dg_sys_info ();
21287a21
CY
12450 ;
12451 return 0;
12452}
12453_ACEOF
eb697db5
DN
12454if ac_fn_c_try_link "$LINENO"; then :
12455 ac_cv_lib_dgc_dg_sys_info=yes
bf89cb4d 12456else
eb697db5 12457 ac_cv_lib_dgc_dg_sys_info=no
49ebbd65 12458fi
eb697db5
DN
12459rm -f core conftest.err conftest.$ac_objext \
12460 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
12461LIBS=$ac_check_lib_save_LIBS
12462fi
eb697db5
DN
12463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
12464$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
12465if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
12466 cat >>confdefs.h <<_ACEOF
12467#define HAVE_LIBDGC 1
12468_ACEOF
12469
12470 LIBS="-ldgc $LIBS"
12471
5929fbe7 12472fi
a5edbe4a 12473
eb697db5 12474fi
49ebbd65
DN
12475
12476
15e12598 12477
eb697db5
DN
12478ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
12479if test "x$ac_cv_header_locale_h" = x""yes; then :
a4f64981 12480
5929fbe7 12481fi
eb697db5
DN
12482
12483
12484for ac_func in setlocale
12485do :
12486 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
12487if test "x$ac_cv_func_setlocale" = x""yes; then :
12488 cat >>confdefs.h <<_ACEOF
12489#define HAVE_SETLOCALE 1
5929fbe7 12490_ACEOF
a4f64981 12491
5929fbe7 12492fi
eb697db5 12493done
a4f64981 12494
19650fd6 12495
eb697db5
DN
12496# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
12497# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
12498# Irix 4.0.5F has the header but not the library.
12499if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
12500 ac_have_func=yes
12501
12502$as_echo "#define SVR4 1" >>confdefs.h
ca81d7a0 12503
91e84f96 12504fi
8c5ff6dd 12505
eb697db5
DN
12506if test $ac_have_func = no; then
12507 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
12508if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
12509 ac_have_func=yes
8c5ff6dd 12510
eb697db5
DN
12511$as_echo "#define UMAX 1" >>confdefs.h
12512
12513
12514$as_echo "#define UMAX4_3 1" >>confdefs.h
8c5ff6dd 12515
bf89cb4d 12516fi
6da23aaa 12517
c0d27fcc 12518
eb697db5 12519fi
19650fd6 12520
eb697db5
DN
12521if test $ac_have_func = no; then
12522 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
12523if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
12524 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
12525
12526fi
ca81d7a0 12527
6da23aaa 12528
bf89cb4d 12529fi
eb697db5
DN
12530
12531if test $ac_have_func = no; then
12532 for ac_header in mach/mach.h
12533do :
12534 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
12535if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
8c5ff6dd 12536 cat >>confdefs.h <<_ACEOF
eb697db5 12537#define HAVE_MACH_MACH_H 1
91e84f96 12538_ACEOF
ca81d7a0 12539
6da23aaa 12540fi
0ca10bb7 12541
eb697db5 12542done
6da23aaa 12543
eb697db5
DN
12544fi
12545
12546for ac_header in nlist.h
12547do :
12548 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
12549if test "x$ac_cv_header_nlist_h" = x""yes; then :
12550 cat >>confdefs.h <<_ACEOF
12551#define HAVE_NLIST_H 1
91e84f96 12552_ACEOF
eb697db5
DN
12553 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
12554"
12555if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
cd03c74a 12556
eb697db5
DN
12557cat >>confdefs.h <<_ACEOF
12558#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
bf89cb4d 12559_ACEOF
0ca10bb7
RC
12560
12561
eb697db5
DN
12562$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
12563
8c5ff6dd 12564fi
0ca10bb7 12565
c0d27fcc 12566
6da23aaa 12567fi
8c5ff6dd 12568
eb697db5 12569done
6da23aaa 12570
91e84f96 12571fi
eb697db5 12572done
8c5ff6dd 12573
eb697db5
DN
12574
12575# Some definitions of getloadavg require that the program be installed setgid.
12576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
12577$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
12578if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
e9a63f04 12579 $as_echo_n "(cached) " >&6
0ca10bb7 12580else
eb697db5 12581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 12582/* end confdefs.h. */
eb697db5
DN
12583#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
12584#ifdef LDAV_PRIVILEGED
12585Yowza Am I SETGID yet
12586#endif
bf89cb4d 12587_ACEOF
eb697db5
DN
12588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12589 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
12590 ac_cv_func_getloadavg_setgid=yes
91e84f96 12591else
eb697db5
DN
12592 ac_cv_func_getloadavg_setgid=no
12593fi
12594rm -f conftest*
91e84f96 12595
eb697db5
DN
12596fi
12597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
12598$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
12599if test $ac_cv_func_getloadavg_setgid = yes; then
12600 NEED_SETGID=true
91e84f96 12601
eb697db5 12602$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
6da23aaa 12603
eb697db5
DN
12604else
12605 NEED_SETGID=false
91e84f96 12606fi
6da23aaa 12607
eb697db5
DN
12608if test $ac_cv_func_getloadavg_setgid = yes; then
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
12610$as_echo_n "checking group of /dev/kmem... " >&6; }
12611if test "${ac_cv_group_kmem+set}" = set; then :
5929fbe7 12612 $as_echo_n "(cached) " >&6
a5edbe4a 12613else
eb697db5
DN
12614 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
12615 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
12616 # If we got an error (system does not support symlinks), try without -L.
12617 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
12618 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
12619 | sed -ne 's/[ ][ ]*/ /g;
12620 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
12621 / /s/.* //;p;'`
6da23aaa
EZ
12622
12623fi
eb697db5
DN
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
12625$as_echo "$ac_cv_group_kmem" >&6; }
12626 KMEM_GROUP=$ac_cv_group_kmem
12627fi
12628if test "x$ac_save_LIBS" = x; then
12629 GETLOADAVG_LIBS=$LIBS
12630else
12631 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
12632fi
12633LIBS=$ac_save_LIBS
91e84f96 12634
6da23aaa
EZ
12635
12636
eb697db5
DN
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12638$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12639if test "${ac_cv_sys_largefile_source+set}" = set; then :
91e84f96
GM
12640 $as_echo_n "(cached) " >&6
12641else
eb697db5
DN
12642 while :; do
12643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 12644/* end confdefs.h. */
eb697db5
DN
12645#include <sys/types.h> /* for off_t */
12646 #include <stdio.h>
91e84f96
GM
12647int
12648main ()
12649{
eb697db5
DN
12650int (*fp) (FILE *, off_t, int) = fseeko;
12651 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
91e84f96
GM
12652 ;
12653 return 0;
12654}
12655_ACEOF
eb697db5
DN
12656if ac_fn_c_try_link "$LINENO"; then :
12657 ac_cv_sys_largefile_source=no; break
12658fi
12659rm -f core conftest.err conftest.$ac_objext \
12660 conftest$ac_exeext conftest.$ac_ext
12661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 12662/* end confdefs.h. */
eb697db5
DN
12663#define _LARGEFILE_SOURCE 1
12664#include <sys/types.h> /* for off_t */
12665 #include <stdio.h>
91e84f96
GM
12666int
12667main ()
12668{
eb697db5
DN
12669int (*fp) (FILE *, off_t, int) = fseeko;
12670 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
91e84f96
GM
12671 ;
12672 return 0;
12673}
12674_ACEOF
eb697db5
DN
12675if ac_fn_c_try_link "$LINENO"; then :
12676 ac_cv_sys_largefile_source=1; break
12677fi
12678rm -f core conftest.err conftest.$ac_objext \
12679 conftest$ac_exeext conftest.$ac_ext
12680 ac_cv_sys_largefile_source=unknown
12681 break
12682done
12683fi
12684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12685$as_echo "$ac_cv_sys_largefile_source" >&6; }
12686case $ac_cv_sys_largefile_source in #(
12687 no | unknown) ;;
12688 *)
12689cat >>confdefs.h <<_ACEOF
12690#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12691_ACEOF
12692;;
91e84f96 12693esac
eb697db5 12694rm -rf conftest*
ca81d7a0 12695
eb697db5
DN
12696# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12697# in glibc 2.1.3, but that breaks too many other things.
12698# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12699if test $ac_cv_sys_largefile_source != unknown; then
49ebbd65 12700
eb697db5 12701$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
ca81d7a0 12702
91e84f96 12703fi
c0d27fcc 12704
19650fd6 12705
eb697db5
DN
12706# Configure getopt.
12707# getopt.m4 serial 10
8c5ff6dd 12708
eb697db5
DN
12709# The getopt module assume you want GNU getopt, with getopt_long etc,
12710# rather than vanilla POSIX getopt. This means your your code should
12711# always include <getopt.h> for the getopt prototypes.
15e12598 12712
15e12598 12713
a4f64981 12714
8c5ff6dd 12715
5929fbe7 12716
5929fbe7 12717
ca81d7a0 12718
c0d27fcc 12719
ca81d7a0 12720
0ca10bb7 12721
0ca10bb7 12722
eb697db5 12723# Prerequisites of lib/getopt*.
bf89cb4d 12724
c0d27fcc 12725
0ca10bb7
RC
12726
12727
eb697db5
DN
12728 GETOPT_H=
12729 for ac_header in getopt.h
12730do :
12731 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12732if test "x$ac_cv_header_getopt_h" = x""yes; then :
12733 cat >>confdefs.h <<_ACEOF
12734#define HAVE_GETOPT_H 1
91e84f96 12735_ACEOF
91e84f96 12736
5929fbe7 12737else
eb697db5 12738 GETOPT_H=getopt.h
bf89cb4d 12739fi
0ca10bb7 12740
eb697db5 12741done
6da23aaa 12742
eb697db5
DN
12743 if test -z "$GETOPT_H"; then
12744 for ac_func in getopt_long_only
12745do :
12746 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12747if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
8c5ff6dd 12748 cat >>confdefs.h <<_ACEOF
eb697db5 12749#define HAVE_GETOPT_LONG_ONLY 1
8c5ff6dd 12750_ACEOF
bf89cb4d 12751
6da23aaa 12752else
eb697db5 12753 GETOPT_H=getopt.h
0ca10bb7 12754fi
eb697db5 12755done
5929fbe7 12756
eb697db5 12757 fi
bf89cb4d 12758
eb697db5
DN
12759 if test -z "$GETOPT_H"; then
12760 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
12761"
12762if test "x$ac_cv_have_decl_optreset" = x""yes; then :
12763 GETOPT_H=getopt.h
0ca10bb7 12764fi
bf89cb4d 12765
eb697db5 12766 fi
0ca10bb7 12767
eb697db5
DN
12768 if test -z "$GETOPT_H"; then
12769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12770$as_echo_n "checking for working GNU getopt function... " >&6; }
12771if test "${gl_cv_func_gnu_getopt+set}" = set; then :
bf89cb4d 12772 $as_echo_n "(cached) " >&6
eb697db5
DN
12773else
12774 if test "$cross_compiling" = yes; then :
12775 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
12776"
12777if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
12778 gl_cv_func_gnu_getopt=no
12779else
12780 gl_cv_func_gnu_getopt=yes
a21616bd 12781fi
eb697db5 12782
6da23aaa 12783else
eb697db5 12784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12785/* end confdefs.h. */
eb697db5
DN
12786#include <getopt.h>
12787int
12788main ()
12789{
12790
12791 char *myargv[3];
12792 myargv[0] = "conftest";
12793 myargv[1] = "-+";
12794 myargv[2] = 0;
12795 return getopt (2, myargv, "+a") != '?';
12796
12797 ;
12798 return 0;
12799}
0ca10bb7 12800_ACEOF
eb697db5
DN
12801if ac_fn_c_try_run "$LINENO"; then :
12802 gl_cv_func_gnu_getopt=yes
bf89cb4d 12803else
eb697db5
DN
12804 gl_cv_func_gnu_getopt=no
12805fi
12806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12807 conftest.$ac_objext conftest.beam conftest.$ac_ext
12808fi
ca81d7a0 12809
0ca10bb7 12810fi
eb697db5
DN
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
12812$as_echo "$gl_cv_func_gnu_getopt" >&6; }
12813 if test "$gl_cv_func_gnu_getopt" = "no"; then
12814 GETOPT_H=getopt.h
12815 fi
12816 fi
bf89cb4d 12817
503d2be0 12818
bf89cb4d 12819
eb697db5 12820 if test -n "$GETOPT_H"; then :
bf89cb4d 12821
bf89cb4d 12822
eb697db5 12823 GETOPT_H=getopt.h
bf89cb4d 12824
eb697db5 12825$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
15e12598 12826
49ebbd65 12827
15e12598 12828
eb697db5
DN
12829 :
12830 GETOPTOBJS='getopt.o getopt1.o'
c0d27fcc 12831
91e84f96 12832fi
0ca10bb7 12833
a21616bd 12834
eb697db5
DN
12835
12836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
12837$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
12838if test "${ac_cv_func_getpgrp_void+set}" = set; then :
bf89cb4d
GM
12839 $as_echo_n "(cached) " >&6
12840else
eb697db5
DN
12841 # Use it with a single arg.
12842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa
EZ
12843/* end confdefs.h. */
12844$ac_includes_default
eb697db5
DN
12845int
12846main ()
12847{
12848getpgrp (0);
12849 ;
12850 return 0;
12851}
6da23aaa 12852_ACEOF
eb697db5
DN
12853if ac_fn_c_try_compile "$LINENO"; then :
12854 ac_cv_func_getpgrp_void=no
6da23aaa 12855else
eb697db5 12856 ac_cv_func_getpgrp_void=yes
6da23aaa 12857fi
91e84f96 12858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 12859
5929fbe7 12860fi
eb697db5
DN
12861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
12862$as_echo "$ac_cv_func_getpgrp_void" >&6; }
12863if test $ac_cv_func_getpgrp_void = yes; then
8c5ff6dd 12864
eb697db5 12865$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
c0d27fcc 12866
bf89cb4d 12867fi
6da23aaa
EZ
12868
12869
eb697db5
DN
12870for ac_func in strftime
12871do :
12872 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
12873if test "x$ac_cv_func_strftime" = x""yes; then :
12874 cat >>confdefs.h <<_ACEOF
12875#define HAVE_STRFTIME 1
12876_ACEOF
a21616bd 12877
eb697db5
DN
12878else
12879 # strftime is in -lintl on SCO UNIX.
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
12881$as_echo_n "checking for strftime in -lintl... " >&6; }
12882if test "${ac_cv_lib_intl_strftime+set}" = set; then :
e9a63f04 12883 $as_echo_n "(cached) " >&6
98418dba 12884else
eb697db5
DN
12885 ac_check_lib_save_LIBS=$LIBS
12886LIBS="-lintl $LIBS"
12887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12888/* end confdefs.h. */
12889
12890/* Override any GCC internal prototype to avoid an error.
12891 Use char because int might match the return type of a GCC
12892 builtin and then its argument prototype would still apply. */
12893#ifdef __cplusplus
12894extern "C"
12895#endif
12896char strftime ();
12897int
12898main ()
12899{
12900return strftime ();
12901 ;
12902 return 0;
12903}
12904_ACEOF
12905if ac_fn_c_try_link "$LINENO"; then :
12906 ac_cv_lib_intl_strftime=yes
12907else
12908 ac_cv_lib_intl_strftime=no
12909fi
12910rm -f core conftest.err conftest.$ac_objext \
12911 conftest$ac_exeext conftest.$ac_ext
12912LIBS=$ac_check_lib_save_LIBS
12913fi
12914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
12915$as_echo "$ac_cv_lib_intl_strftime" >&6; }
12916if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
12917 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
12918
12919LIBS="-lintl $LIBS"
91e84f96 12920fi
6da23aaa 12921
6da23aaa 12922fi
eb697db5
DN
12923done
12924
12925
12926# UNIX98 PTYs.
12927for ac_func in grantpt
12928do :
12929 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
12930if test "x$ac_cv_func_grantpt" = x""yes; then :
91e84f96 12931 cat >>confdefs.h <<_ACEOF
eb697db5 12932#define HAVE_GRANTPT 1
91e84f96
GM
12933_ACEOF
12934
6da23aaa 12935fi
91e84f96
GM
12936done
12937
0ca10bb7 12938
eb697db5
DN
12939# PTY-related GNU extensions.
12940for ac_func in getpt
12941do :
12942 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
12943if test "x$ac_cv_func_getpt" = x""yes; then :
12944 cat >>confdefs.h <<_ACEOF
12945#define HAVE_GETPT 1
12946_ACEOF
91e84f96 12947
6da23aaa
EZ
12948fi
12949done
bf89cb4d 12950
6da23aaa 12951
eb697db5
DN
12952# Check this now, so that we will NOT find the above functions in ncurses.
12953# That is because we have not set up to link ncurses in lib-src.
12954# It's better to believe a function is not available
12955# than to expect to find it in ncurses.
12956# Also we need tputs and friends to be able to build at all.
12957have_tputs_et_al=true
12958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
12959$as_echo_n "checking for library containing tputs... " >&6; }
12960if test "${ac_cv_search_tputs+set}" = set; then :
91e84f96 12961 $as_echo_n "(cached) " >&6
91e84f96 12962else
eb697db5
DN
12963 ac_func_search_save_LIBS=$LIBS
12964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 12965/* end confdefs.h. */
eb697db5
DN
12966
12967/* Override any GCC internal prototype to avoid an error.
12968 Use char because int might match the return type of a GCC
12969 builtin and then its argument prototype would still apply. */
12970#ifdef __cplusplus
12971extern "C"
12972#endif
12973char tputs ();
12974int
12975main ()
12976{
12977return tputs ();
12978 ;
12979 return 0;
12980}
bf89cb4d 12981_ACEOF
eb697db5
DN
12982for ac_lib in '' ncurses terminfo termcap; do
12983 if test -z "$ac_lib"; then
12984 ac_res="none required"
12985 else
12986 ac_res=-l$ac_lib
12987 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12988 fi
12989 if ac_fn_c_try_link "$LINENO"; then :
12990 ac_cv_search_tputs=$ac_res
12991fi
12992rm -f core conftest.err conftest.$ac_objext \
12993 conftest$ac_exeext
12994 if test "${ac_cv_search_tputs+set}" = set; then :
12995 break
12996fi
12997done
12998if test "${ac_cv_search_tputs+set}" = set; then :
12999
91e84f96 13000else
eb697db5
DN
13001 ac_cv_search_tputs=no
13002fi
13003rm conftest.$ac_ext
13004LIBS=$ac_func_search_save_LIBS
13005fi
13006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
13007$as_echo "$ac_cv_search_tputs" >&6; }
13008ac_res=$ac_cv_search_tputs
13009if test "$ac_res" != no; then :
13010 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bf89cb4d 13011
eb697db5
DN
13012else
13013 have_tputs_et_al=false
0ca10bb7 13014fi
bf89cb4d 13015
eb697db5 13016if test "$have_tputs_et_al" != true; then
036dc38d 13017 as_fn_error "I couldn't find termcap functions (tputs and friends).
eb697db5
DN
13018Maybe some development libraries/packages are missing? Try installing
13019libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
13020fi
13021# Must define this when any termcap library is found.
bf89cb4d 13022
eb697db5
DN
13023$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
13024
13025## FIXME This was the cpp logic, but I am not sure it is right.
13026## The above test has not necessarily found libncurses.
13027HAVE_LIBNCURSES=yes
13028
13029## Use terminfo instead of termcap?
13030## Note only system files NOT using terminfo are:
13031## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
13032## darwin|gnu without ncurses.
13033TERMINFO=no
13034LIBS_TERMCAP=
13035case "$opsys" in
13036 ## cygwin: Fewer environment variables to go wrong, more terminal types.
13037 ## hpux10-20: Use the system provided termcap(3) library.
13038 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
13039 ## is necessary. Otherwise Emacs dumps core when run -nw.
13040 aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
13041
13042 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
13043 ## The ncurses library has been moved out of the System framework in
13044 ## Mac OS X 10.2. So if configure detects it, set the command-line
13045 ## option to use it.
13046 darwin|gnu*)
13047 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
13048 if test "x$HAVE_LIBNCURSES" = "xyes"; then
13049 TERMINFO=yes
13050 LIBS_TERMCAP="-lncurses"
13051 fi
13052 ;;
13053
13054 freebsd)
13055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
13056$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
13057 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
13058 $as_echo_n "(cached) " >&6
13059else
13060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 13061/* end confdefs.h. */
eb697db5
DN
13062#include <osreldate.h>
13063int
13064main ()
13065{
13066#if __FreeBSD_version < 400000
13067fail;
13068#endif
13069
13070 ;
13071 return 0;
13072}
6da23aaa 13073_ACEOF
eb697db5
DN
13074if ac_fn_c_try_link "$LINENO"; then :
13075 emacs_cv_freebsd_terminfo=yes
91e84f96 13076else
eb697db5
DN
13077 emacs_cv_freebsd_terminfo=no
13078fi
13079rm -f core conftest.err conftest.$ac_objext \
13080 conftest$ac_exeext conftest.$ac_ext
6da23aaa 13081fi
6da23aaa
EZ
13082
13083
eb697db5
DN
13084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
13085$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
13086
13087 if test $emacs_cv_freebsd_terminfo = yes; then
13088 TERMINFO=yes
13089 LIBS_TERMCAP="-lncurses"
13090 else
13091 LIBS_TERMCAP="-ltermcap"
13092 fi
91e84f96 13093 ;;
bf89cb4d 13094
eb697db5
DN
13095 netbsd)
13096 if test $ac_cv_search_tputs = -lterminfo; then
13097 TERMINFO=yes
13098 LIBS_TERMCAP="-lterminfo"
13099 else
13100 LIBS_TERMCAP="-ltermcap"
13101 fi
91e84f96 13102 ;;
eb697db5 13103
91e84f96 13104esac
91e84f96 13105
eb697db5
DN
13106case "$opsys" in
13107 ## hpux: Make sure we get select from libc rather than from libcurses
13108 ## because libcurses on HPUX 10.10 has a broken version of select.
13109 ## We used to use -lc -lcurses, but this may be cleaner.
13110 hpux*) LIBS_TERMCAP="-ltermcap" ;;
0ca10bb7 13111
eb697db5 13112 openbsd) LIBS_TERMCAP="-lncurses" ;;
6da23aaa 13113
eb697db5
DN
13114 ## Must use system termcap, if we use any termcap. It does special things.
13115 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
91e84f96 13116esac
91e84f96 13117
eb697db5
DN
13118TERMCAP_OBJ=tparam.o
13119if test $TERMINFO = yes; then
13120
13121$as_echo "#define TERMINFO 1" >>confdefs.h
8c5ff6dd 13122
5929fbe7 13123
eb697db5
DN
13124 ## Default used to be -ltermcap. Add a case above if need something else.
13125 test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
13126
13127 TERMCAP_OBJ=terminfo.o
6da23aaa 13128fi
91e84f96 13129
91e84f96 13130
eb697db5
DN
13131
13132
13133# Do we have res_init, for detecting changes in /etc/resolv.conf?
13134resolv=no
13135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13136/* end confdefs.h. */
13137#include <netinet/in.h>
13138#include <arpa/nameser.h>
13139#include <resolv.h>
13140int
13141main ()
13142{
13143return res_init();
13144 ;
13145 return 0;
13146}
91e84f96 13147_ACEOF
eb697db5
DN
13148if ac_fn_c_try_link "$LINENO"; then :
13149 have_res_init=yes
13150else
13151 have_res_init=no
13152fi
13153rm -f core conftest.err conftest.$ac_objext \
13154 conftest$ac_exeext conftest.$ac_ext
13155if test "$have_res_init" = no; then
13156 OLIBS="$LIBS"
13157 LIBS="$LIBS -lresolv"
13158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
13159$as_echo_n "checking for res_init with -lresolv... " >&6; }
13160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 13161/* end confdefs.h. */
eb697db5
DN
13162#include <netinet/in.h>
13163#include <arpa/nameser.h>
13164#include <resolv.h>
13165int
13166main ()
13167{
13168return res_init();
13169 ;
13170 return 0;
13171}
6da23aaa 13172_ACEOF
eb697db5
DN
13173if ac_fn_c_try_link "$LINENO"; then :
13174 have_res_init=yes
6da23aaa 13175else
eb697db5
DN
13176 have_res_init=no
13177fi
13178rm -f core conftest.err conftest.$ac_objext \
13179 conftest$ac_exeext conftest.$ac_ext
13180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
13181$as_echo "$have_res_init" >&6; }
13182 if test "$have_res_init" = yes ; then
13183 resolv=yes
13184 fi
13185 LIBS="$OLIBS"
0ca10bb7 13186fi
19650fd6 13187
eb697db5 13188if test "$have_res_init" = yes; then
6da23aaa 13189
eb697db5 13190$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
bf89cb4d 13191
c0d27fcc 13192fi
ca81d7a0 13193
eb697db5
DN
13194# Do we need the Hesiod library to provide the support routines?
13195LIBHESIOD=
13196if test "$with_hesiod" != no ; then
13197 # Don't set $LIBS here -- see comments above. FIXME which comments?
13198 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
13199if test "x$ac_cv_func_res_send" = x""yes; then :
bf89cb4d 13200
6da23aaa 13201else
eb697db5
DN
13202 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
13203if test "x$ac_cv_func___res_send" = x""yes; then :
c0d27fcc 13204
eb697db5
DN
13205else
13206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
13207$as_echo_n "checking for res_send in -lresolv... " >&6; }
13208if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
0ca10bb7
RC
13209 $as_echo_n "(cached) " >&6
13210else
eb697db5
DN
13211 ac_check_lib_save_LIBS=$LIBS
13212LIBS="-lresolv $LIBS"
13213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 13214/* end confdefs.h. */
eb697db5
DN
13215
13216/* Override any GCC internal prototype to avoid an error.
13217 Use char because int might match the return type of a GCC
13218 builtin and then its argument prototype would still apply. */
13219#ifdef __cplusplus
13220extern "C"
13221#endif
13222char res_send ();
13223int
13224main ()
13225{
13226return res_send ();
13227 ;
13228 return 0;
13229}
bf89cb4d 13230_ACEOF
eb697db5
DN
13231if ac_fn_c_try_link "$LINENO"; then :
13232 ac_cv_lib_resolv_res_send=yes
6da23aaa 13233else
eb697db5 13234 ac_cv_lib_resolv_res_send=no
6da23aaa 13235fi
eb697db5
DN
13236rm -f core conftest.err conftest.$ac_objext \
13237 conftest$ac_exeext conftest.$ac_ext
13238LIBS=$ac_check_lib_save_LIBS
13239fi
13240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
13241$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
13242if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
13243 resolv=yes
13244else
13245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
13246$as_echo_n "checking for __res_send in -lresolv... " >&6; }
13247if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
13248 $as_echo_n "(cached) " >&6
13249else
13250 ac_check_lib_save_LIBS=$LIBS
13251LIBS="-lresolv $LIBS"
13252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 13253/* end confdefs.h. */
eb697db5
DN
13254
13255/* Override any GCC internal prototype to avoid an error.
13256 Use char because int might match the return type of a GCC
13257 builtin and then its argument prototype would still apply. */
13258#ifdef __cplusplus
13259extern "C"
13260#endif
13261char __res_send ();
13262int
13263main ()
13264{
13265return __res_send ();
13266 ;
13267 return 0;
13268}
91e84f96 13269_ACEOF
eb697db5
DN
13270if ac_fn_c_try_link "$LINENO"; then :
13271 ac_cv_lib_resolv___res_send=yes
503d2be0 13272else
eb697db5 13273 ac_cv_lib_resolv___res_send=no
6da23aaa 13274fi
eb697db5
DN
13275rm -f core conftest.err conftest.$ac_objext \
13276 conftest$ac_exeext conftest.$ac_ext
13277LIBS=$ac_check_lib_save_LIBS
6da23aaa 13278fi
eb697db5
DN
13279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
13280$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
13281if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
13282 resolv=yes
6da23aaa
EZ
13283fi
13284
13285fi
bf89cb4d 13286
0ca10bb7 13287fi
ca81d7a0 13288
6da23aaa 13289fi
ca81d7a0 13290
eb697db5
DN
13291 if test "$resolv" = yes ; then
13292 RESOLVLIB=-lresolv
13293 else
13294 RESOLVLIB=
6da23aaa 13295 fi
eb697db5
DN
13296 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
13297if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
6da23aaa 13298
eb697db5
DN
13299else
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
13301$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
13302if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
6da23aaa
EZ
13303 $as_echo_n "(cached) " >&6
13304else
eb697db5
DN
13305 ac_check_lib_save_LIBS=$LIBS
13306LIBS="-lhesiod $RESOLVLIB $LIBS"
13307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13308/* end confdefs.h. */
5929fbe7 13309
eb697db5
DN
13310/* Override any GCC internal prototype to avoid an error.
13311 Use char because int might match the return type of a GCC
13312 builtin and then its argument prototype would still apply. */
13313#ifdef __cplusplus
13314extern "C"
13315#endif
13316char hes_getmailhost ();
13317int
13318main ()
13319{
13320return hes_getmailhost ();
13321 ;
13322 return 0;
13323}
bf89cb4d 13324_ACEOF
eb697db5
DN
13325if ac_fn_c_try_link "$LINENO"; then :
13326 ac_cv_lib_hesiod_hes_getmailhost=yes
c0d27fcc 13327else
eb697db5 13328 ac_cv_lib_hesiod_hes_getmailhost=no
e6df49e4 13329fi
eb697db5
DN
13330rm -f core conftest.err conftest.$ac_objext \
13331 conftest$ac_exeext conftest.$ac_ext
13332LIBS=$ac_check_lib_save_LIBS
13333fi
13334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
13335$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
13336if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
13337 hesiod=yes
5929fbe7 13338else
eb697db5 13339 :
8c5ff6dd 13340fi
91e84f96 13341
6da23aaa 13342fi
c0d27fcc 13343
503d2be0 13344
eb697db5 13345 if test x"$hesiod" = xyes; then
ba4481b5 13346
eb697db5 13347$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
a5edbe4a 13348
eb697db5
DN
13349 LIBHESIOD=-lhesiod
13350 fi
bf89cb4d
GM
13351fi
13352
ba4481b5 13353
eb697db5
DN
13354# Do we need libresolv (due to res_init or Hesiod)?
13355if test "$resolv" = yes ; then
bf89cb4d 13356
eb697db5 13357$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
15e12598 13358
eb697db5 13359 LIBRESOLV=-lresolv
ba4481b5 13360else
eb697db5 13361 LIBRESOLV=
ba4481b5 13362fi
91e84f96 13363
0ca10bb7 13364
eb697db5
DN
13365# These tell us which Kerberos-related libraries to use.
13366COM_ERRLIB=
13367CRYPTOLIB=
13368KRB5LIB=
13369DESLIB=
13370KRB4LIB=
ca81d7a0 13371
eb697db5
DN
13372if test "${with_kerberos}" != no; then
13373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
13374$as_echo_n "checking for com_err in -lcom_err... " >&6; }
13375if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
49ebbd65 13376 $as_echo_n "(cached) " >&6
cd03c74a 13377else
8c5ff6dd 13378 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
13379LIBS="-lcom_err $LIBS"
13380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 13381/* end confdefs.h. */
6da23aaa 13382
8c5ff6dd
KR
13383/* Override any GCC internal prototype to avoid an error.
13384 Use char because int might match the return type of a GCC
13385 builtin and then its argument prototype would still apply. */
13386#ifdef __cplusplus
13387extern "C"
13388#endif
eb697db5 13389char com_err ();
8c5ff6dd
KR
13390int
13391main ()
a4f64981 13392{
eb697db5 13393return com_err ();
8c5ff6dd
KR
13394 ;
13395 return 0;
49ebbd65 13396}
a5edbe4a 13397_ACEOF
eb697db5
DN
13398if ac_fn_c_try_link "$LINENO"; then :
13399 ac_cv_lib_com_err_com_err=yes
49ebbd65 13400else
eb697db5 13401 ac_cv_lib_com_err_com_err=no
8c5ff6dd 13402fi
eb697db5
DN
13403rm -f core conftest.err conftest.$ac_objext \
13404 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 13405LIBS=$ac_check_lib_save_LIBS
49ebbd65 13406fi
eb697db5
DN
13407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
13408$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
13409if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
13410 have_com_err=yes
13411else
13412 have_com_err=no
bf89cb4d 13413fi
6da23aaa 13414
eb697db5
DN
13415 if test $have_com_err = yes; then
13416 COM_ERRLIB=-lcom_err
13417 LIBS="$COM_ERRLIB $LIBS"
bf89cb4d 13418
eb697db5 13419$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
bf89cb4d 13420
eb697db5
DN
13421 fi
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
13423$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
13424if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
6da23aaa 13425 $as_echo_n "(cached) " >&6
0ca10bb7 13426else
6da23aaa 13427 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
13428LIBS="-lcrypto $LIBS"
13429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa
EZ
13430/* end confdefs.h. */
13431
13432/* Override any GCC internal prototype to avoid an error.
13433 Use char because int might match the return type of a GCC
13434 builtin and then its argument prototype would still apply. */
13435#ifdef __cplusplus
13436extern "C"
13437#endif
eb697db5 13438char mit_des_cbc_encrypt ();
6da23aaa
EZ
13439int
13440main ()
13441{
eb697db5 13442return mit_des_cbc_encrypt ();
6da23aaa
EZ
13443 ;
13444 return 0;
13445}
13446_ACEOF
eb697db5
DN
13447if ac_fn_c_try_link "$LINENO"; then :
13448 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
6da23aaa 13449else
eb697db5 13450 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
ba4481b5 13451fi
eb697db5
DN
13452rm -f core conftest.err conftest.$ac_objext \
13453 conftest$ac_exeext conftest.$ac_ext
6da23aaa 13454LIBS=$ac_check_lib_save_LIBS
ba4481b5 13455fi
eb697db5
DN
13456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
13457$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
13458if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
13459 have_crypto=yes
13460else
13461 have_crypto=no
6da23aaa 13462fi
bf89cb4d 13463
eb697db5
DN
13464 if test $have_crypto = yes; then
13465 CRYPTOLIB=-lcrypto
13466 LIBS="$CRYPTOLIB $LIBS"
91e84f96 13467
eb697db5 13468$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
e6df49e4 13469
eb697db5
DN
13470 fi
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
13472$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
13473if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
e9a63f04 13474 $as_echo_n "(cached) " >&6
48d4b120 13475else
eb697db5
DN
13476 ac_check_lib_save_LIBS=$LIBS
13477LIBS="-lk5crypto $LIBS"
13478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13479/* end confdefs.h. */
8c5ff6dd 13480
eb697db5
DN
13481/* Override any GCC internal prototype to avoid an error.
13482 Use char because int might match the return type of a GCC
13483 builtin and then its argument prototype would still apply. */
13484#ifdef __cplusplus
13485extern "C"
13486#endif
13487char mit_des_cbc_encrypt ();
13488int
13489main ()
91e84f96 13490{
eb697db5
DN
13491return mit_des_cbc_encrypt ();
13492 ;
13493 return 0;
6da23aaa
EZ
13494}
13495_ACEOF
eb697db5
DN
13496if ac_fn_c_try_link "$LINENO"; then :
13497 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
91e84f96 13498else
eb697db5 13499 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
91e84f96 13500fi
eb697db5
DN
13501rm -f core conftest.err conftest.$ac_objext \
13502 conftest$ac_exeext conftest.$ac_ext
13503LIBS=$ac_check_lib_save_LIBS
91e84f96 13504fi
eb697db5
DN
13505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
13506$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
13507if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
13508 have_k5crypto=yes
6da23aaa 13509else
eb697db5 13510 have_k5crypto=no
6da23aaa 13511fi
6da23aaa 13512
eb697db5
DN
13513 if test $have_k5crypto = yes; then
13514 CRYPTOLIB=-lk5crypto
13515 LIBS="$CRYPTOLIB $LIBS"
bf89cb4d 13516
eb697db5 13517$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
91e84f96 13518
eb697db5
DN
13519 fi
13520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
13521$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
13522if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
6da23aaa
EZ
13523 $as_echo_n "(cached) " >&6
13524else
eb697db5
DN
13525 ac_check_lib_save_LIBS=$LIBS
13526LIBS="-lkrb5 $LIBS"
13527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 13528/* end confdefs.h. */
edfaf76d 13529
0ca10bb7
RC
13530/* Override any GCC internal prototype to avoid an error.
13531 Use char because int might match the return type of a GCC
13532 builtin and then its argument prototype would still apply. */
13533#ifdef __cplusplus
13534extern "C"
19650fd6 13535#endif
eb697db5 13536char krb5_init_context ();
0ca10bb7
RC
13537int
13538main ()
13539{
eb697db5 13540return krb5_init_context ();
0ca10bb7
RC
13541 ;
13542 return 0;
13543}
13544_ACEOF
eb697db5
DN
13545if ac_fn_c_try_link "$LINENO"; then :
13546 ac_cv_lib_krb5_krb5_init_context=yes
0ca10bb7 13547else
eb697db5 13548 ac_cv_lib_krb5_krb5_init_context=no
0ca10bb7 13549fi
eb697db5
DN
13550rm -f core conftest.err conftest.$ac_objext \
13551 conftest$ac_exeext conftest.$ac_ext
13552LIBS=$ac_check_lib_save_LIBS
0ca10bb7 13553fi
eb697db5
DN
13554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
13555$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
13556if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
13557 have_krb5=yes
13558else
13559 have_krb5=no
91e84f96 13560fi
edfaf76d 13561
eb697db5
DN
13562 if test $have_krb5=yes; then
13563 KRB5LIB=-lkrb5
13564 LIBS="$KRB5LIB $LIBS"
13565
13566$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
5929fbe7 13567
eb697db5
DN
13568 fi
13569 if test "${with_kerberos5}" = no; then
13570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
13571$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
13572if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
13573 $as_echo_n "(cached) " >&6
13574else
eb697db5
DN
13575 ac_check_lib_save_LIBS=$LIBS
13576LIBS="-ldes425 $LIBS"
13577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 13578/* end confdefs.h. */
edfaf76d 13579
aaa36002
DN
13580/* Override any GCC internal prototype to avoid an error.
13581 Use char because int might match the return type of a GCC
13582 builtin and then its argument prototype would still apply. */
13583#ifdef __cplusplus
13584extern "C"
503d2be0 13585#endif
eb697db5 13586char des_cbc_encrypt ();
19650fd6
AS
13587int
13588main ()
13589{
eb697db5 13590return des_cbc_encrypt ();
503d2be0
AS
13591 ;
13592 return 0;
13593}
13594_ACEOF
eb697db5
DN
13595if ac_fn_c_try_link "$LINENO"; then :
13596 ac_cv_lib_des425_des_cbc_encrypt=yes
503d2be0 13597else
eb697db5 13598 ac_cv_lib_des425_des_cbc_encrypt=no
91e84f96 13599fi
eb697db5
DN
13600rm -f core conftest.err conftest.$ac_objext \
13601 conftest$ac_exeext conftest.$ac_ext
13602LIBS=$ac_check_lib_save_LIBS
bf89cb4d 13603fi
eb697db5
DN
13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
13605$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
13606if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
13607 have_des425=yes
13608else
13609 have_des425=no
6da23aaa
EZ
13610fi
13611
eb697db5
DN
13612 if test $have_des425 = yes; then
13613 DESLIB=-ldes425
13614 LIBS="$DESLIB $LIBS"
13615
13616$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
13617
13618 else
13619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
13620$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
13621if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
e9a63f04 13622 $as_echo_n "(cached) " >&6
ba4481b5 13623else
eb697db5
DN
13624 ac_check_lib_save_LIBS=$LIBS
13625LIBS="-ldes $LIBS"
13626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13627/* end confdefs.h. */
ba4481b5 13628
0ca10bb7
RC
13629/* Override any GCC internal prototype to avoid an error.
13630 Use char because int might match the return type of a GCC
13631 builtin and then its argument prototype would still apply. */
13632#ifdef __cplusplus
13633extern "C"
a3f08d9e 13634#endif
eb697db5 13635char des_cbc_encrypt ();
503d2be0
AS
13636int
13637main ()
13638{
eb697db5 13639return des_cbc_encrypt ();
503d2be0
AS
13640 ;
13641 return 0;
13642}
13643_ACEOF
eb697db5
DN
13644if ac_fn_c_try_link "$LINENO"; then :
13645 ac_cv_lib_des_des_cbc_encrypt=yes
bf89cb4d 13646else
eb697db5 13647 ac_cv_lib_des_des_cbc_encrypt=no
91e84f96 13648fi
eb697db5
DN
13649rm -f core conftest.err conftest.$ac_objext \
13650 conftest$ac_exeext conftest.$ac_ext
13651LIBS=$ac_check_lib_save_LIBS
91e84f96 13652fi
eb697db5
DN
13653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
13654$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
13655if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
13656 have_des=yes
bf89cb4d 13657else
eb697db5 13658 have_des=no
91e84f96
GM
13659fi
13660
eb697db5
DN
13661 if test $have_des = yes; then
13662 DESLIB=-ldes
13663 LIBS="$DESLIB $LIBS"
a4f64981 13664
eb697db5 13665$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
5929fbe7 13666
eb697db5
DN
13667 fi
13668 fi
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
13670$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
13671if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
bf89cb4d 13672 $as_echo_n "(cached) " >&6
bf89cb4d 13673else
eb697db5
DN
13674 ac_check_lib_save_LIBS=$LIBS
13675LIBS="-lkrb4 $LIBS"
13676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13677/* end confdefs.h. */
ba4481b5 13678
0ca10bb7
RC
13679/* Override any GCC internal prototype to avoid an error.
13680 Use char because int might match the return type of a GCC
13681 builtin and then its argument prototype would still apply. */
13682#ifdef __cplusplus
13683extern "C"
a3f08d9e 13684#endif
eb697db5 13685char krb_get_cred ();
503d2be0
AS
13686int
13687main ()
13688{
eb697db5 13689return krb_get_cred ();
503d2be0
AS
13690 ;
13691 return 0;
13692}
91e84f96 13693_ACEOF
eb697db5
DN
13694if ac_fn_c_try_link "$LINENO"; then :
13695 ac_cv_lib_krb4_krb_get_cred=yes
91e84f96 13696else
eb697db5 13697 ac_cv_lib_krb4_krb_get_cred=no
91e84f96 13698fi
eb697db5
DN
13699rm -f core conftest.err conftest.$ac_objext \
13700 conftest$ac_exeext conftest.$ac_ext
13701LIBS=$ac_check_lib_save_LIBS
91e84f96 13702fi
eb697db5
DN
13703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
13704$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
13705if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
13706 have_krb4=yes
bf89cb4d 13707else
eb697db5 13708 have_krb4=no
ba4481b5 13709fi
91e84f96 13710
eb697db5
DN
13711 if test $have_krb4 = yes; then
13712 KRB4LIB=-lkrb4
13713 LIBS="$KRB4LIB $LIBS"
91e84f96 13714
eb697db5 13715$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
91e84f96 13716
eb697db5
DN
13717 else
13718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
13719$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
13720if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
91e84f96
GM
13721 $as_echo_n "(cached) " >&6
13722else
eb697db5
DN
13723 ac_check_lib_save_LIBS=$LIBS
13724LIBS="-lkrb $LIBS"
13725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13726/* end confdefs.h. */
91e84f96 13727
eb697db5
DN
13728/* Override any GCC internal prototype to avoid an error.
13729 Use char because int might match the return type of a GCC
13730 builtin and then its argument prototype would still apply. */
13731#ifdef __cplusplus
13732extern "C"
13733#endif
13734char krb_get_cred ();
13735int
13736main ()
13737{
13738return krb_get_cred ();
13739 ;
13740 return 0;
13741}
5929fbe7 13742_ACEOF
eb697db5
DN
13743if ac_fn_c_try_link "$LINENO"; then :
13744 ac_cv_lib_krb_krb_get_cred=yes
91e84f96 13745else
eb697db5 13746 ac_cv_lib_krb_krb_get_cred=no
2d2b6695 13747fi
eb697db5
DN
13748rm -f core conftest.err conftest.$ac_objext \
13749 conftest$ac_exeext conftest.$ac_ext
13750LIBS=$ac_check_lib_save_LIBS
91e84f96 13751fi
eb697db5
DN
13752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
13753$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
13754if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
13755 have_krb=yes
91e84f96 13756else
eb697db5 13757 have_krb=no
2d2b6695 13758fi
ca81d7a0 13759
eb697db5
DN
13760 if test $have_krb = yes; then
13761 KRB4LIB=-lkrb
13762 LIBS="$KRB4LIB $LIBS"
ca81d7a0 13763
eb697db5 13764$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
ca81d7a0 13765
eb697db5
DN
13766 fi
13767 fi
13768 fi
ca81d7a0 13769
eb697db5
DN
13770 if test "${with_kerberos5}" != no; then
13771 for ac_header in krb5.h
13772do :
13773 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
13774if test "x$ac_cv_header_krb5_h" = x""yes; then :
13775 cat >>confdefs.h <<_ACEOF
13776#define HAVE_KRB5_H 1
6da23aaa 13777_ACEOF
eb697db5
DN
13778 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
13779"
13780if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
13781
13782cat >>confdefs.h <<_ACEOF
13783#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 13784_ACEOF
2d2b6695 13785
eb697db5 13786
2d2b6695 13787fi
eb697db5
DN
13788ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
13789"
13790if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
6da23aaa 13791
eb697db5
DN
13792cat >>confdefs.h <<_ACEOF
13793#define HAVE_KRB5_ERROR_E_TEXT 1
13794_ACEOF
0ca10bb7 13795
0ca10bb7 13796
bf89cb4d 13797fi
2d2b6695
KS
13798
13799fi
13800
eb697db5 13801done
6da23aaa 13802
eb697db5
DN
13803 else
13804 for ac_header in des.h
13805do :
13806 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
13807if test "x$ac_cv_header_des_h" = x""yes; then :
13808 cat >>confdefs.h <<_ACEOF
13809#define HAVE_DES_H 1
6da23aaa 13810_ACEOF
3d9fec71 13811
91e84f96 13812else
eb697db5
DN
13813 for ac_header in kerberosIV/des.h
13814do :
13815 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
13816if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
13817 cat >>confdefs.h <<_ACEOF
13818#define HAVE_KERBEROSIV_DES_H 1
13819_ACEOF
6da23aaa 13820
91e84f96 13821else
eb697db5
DN
13822 for ac_header in kerberos/des.h
13823do :
13824 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
13825if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
13826 cat >>confdefs.h <<_ACEOF
13827#define HAVE_KERBEROS_DES_H 1
6da23aaa 13828_ACEOF
6da23aaa 13829
0ca10bb7 13830fi
6da23aaa 13831
eb697db5 13832done
6da23aaa 13833
0ca10bb7 13834fi
6da23aaa 13835
eb697db5
DN
13836done
13837
0ca10bb7 13838fi
6da23aaa 13839
eb697db5 13840done
6da23aaa 13841
eb697db5
DN
13842 for ac_header in krb.h
13843do :
13844 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
13845if test "x$ac_cv_header_krb_h" = x""yes; then :
13846 cat >>confdefs.h <<_ACEOF
13847#define HAVE_KRB_H 1
6da23aaa 13848_ACEOF
eb697db5
DN
13849
13850else
13851 for ac_header in kerberosIV/krb.h
13852do :
13853 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
13854if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
13855 cat >>confdefs.h <<_ACEOF
13856#define HAVE_KERBEROSIV_KRB_H 1
6da23aaa 13857_ACEOF
eb697db5 13858
6da23aaa 13859else
eb697db5
DN
13860 for ac_header in kerberos/krb.h
13861do :
13862 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
13863if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
13864 cat >>confdefs.h <<_ACEOF
13865#define HAVE_KERBEROS_KRB_H 1
13866_ACEOF
0ca10bb7 13867
0ca10bb7
RC
13868fi
13869
eb697db5 13870done
0ca10bb7
RC
13871
13872fi
eb697db5
DN
13873
13874done
0ca10bb7 13875
91e84f96 13876fi
eb697db5
DN
13877
13878done
13879
13880 fi
13881 for ac_header in com_err.h
13882do :
13883 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
13884if test "x$ac_cv_header_com_err_h" = x""yes; then :
6da23aaa 13885 cat >>confdefs.h <<_ACEOF
eb697db5 13886#define HAVE_COM_ERR_H 1
0ca10bb7
RC
13887_ACEOF
13888
13889fi
0ca10bb7 13890
6da23aaa
EZ
13891done
13892
eb697db5 13893fi
6da23aaa 13894
6da23aaa 13895
91e84f96 13896
6da23aaa 13897
6da23aaa 13898
6da23aaa
EZ
13899
13900
eb697db5
DN
13901# Solaris requires -lintl if you want strerror (which calls dgettext)
13902# to return localized messages.
13903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
13904$as_echo_n "checking for dgettext in -lintl... " >&6; }
13905if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
6da23aaa
EZ
13906 $as_echo_n "(cached) " >&6
13907else
eb697db5
DN
13908 ac_check_lib_save_LIBS=$LIBS
13909LIBS="-lintl $LIBS"
13910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13911/* end confdefs.h. */
eb697db5
DN
13912
13913/* Override any GCC internal prototype to avoid an error.
13914 Use char because int might match the return type of a GCC
13915 builtin and then its argument prototype would still apply. */
13916#ifdef __cplusplus
13917extern "C"
13918#endif
13919char dgettext ();
91e84f96
GM
13920int
13921main ()
6da23aaa 13922{
eb697db5 13923return dgettext ();
91e84f96
GM
13924 ;
13925 return 0;
6da23aaa
EZ
13926}
13927_ACEOF
eb697db5
DN
13928if ac_fn_c_try_link "$LINENO"; then :
13929 ac_cv_lib_intl_dgettext=yes
13930else
13931 ac_cv_lib_intl_dgettext=no
13932fi
13933rm -f core conftest.err conftest.$ac_objext \
13934 conftest$ac_exeext conftest.$ac_ext
13935LIBS=$ac_check_lib_save_LIBS
13936fi
13937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
13938$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
13939if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
13940 cat >>confdefs.h <<_ACEOF
13941#define HAVE_LIBINTL 1
6da23aaa 13942_ACEOF
eb697db5
DN
13943
13944 LIBS="-lintl $LIBS"
13945
13946fi
13947
13948
13949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
13950$as_echo_n "checking whether localtime caches TZ... " >&6; }
13951if test "${emacs_cv_localtime_cache+set}" = set; then :
13952 $as_echo_n "(cached) " >&6
13953else
13954 if test x$ac_cv_func_tzset = xyes; then
13955if test "$cross_compiling" = yes; then :
13956 # If we have tzset, assume the worst when cross-compiling.
13957emacs_cv_localtime_cache=yes
13958else
13959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 13960/* end confdefs.h. */
eb697db5
DN
13961#include <time.h>
13962extern char **environ;
13963unset_TZ ()
bf89cb4d 13964{
eb697db5
DN
13965 char **from, **to;
13966 for (to = from = environ; (*to = *from); from++)
13967 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
13968 to++;
13969}
13970char TZ_GMT0[] = "TZ=GMT0";
13971char TZ_PST8[] = "TZ=PST8";
13972main()
13973{
13974 time_t now = time ((time_t *) 0);
13975 int hour_GMT0, hour_unset;
13976 if (putenv (TZ_GMT0) != 0)
13977 exit (1);
13978 hour_GMT0 = localtime (&now)->tm_hour;
13979 unset_TZ ();
13980 hour_unset = localtime (&now)->tm_hour;
13981 if (putenv (TZ_PST8) != 0)
13982 exit (1);
13983 if (localtime (&now)->tm_hour == hour_GMT0)
13984 exit (1);
13985 unset_TZ ();
13986 if (localtime (&now)->tm_hour != hour_unset)
13987 exit (1);
13988 exit (0);
503d2be0 13989}
6da23aaa 13990_ACEOF
eb697db5
DN
13991if ac_fn_c_try_run "$LINENO"; then :
13992 emacs_cv_localtime_cache=no
e9a63f04 13993else
eb697db5
DN
13994 emacs_cv_localtime_cache=yes
13995fi
13996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13997 conftest.$ac_objext conftest.beam conftest.$ac_ext
e9a63f04 13998fi
91e84f96 13999
91e84f96 14000else
eb697db5
DN
14001 # If we lack tzset, report that localtime does not cache TZ,
14002 # since we can't invalidate the cache if we don't have tzset.
14003 emacs_cv_localtime_cache=no
14004fi
647847ea 14005fi
eb697db5
DN
14006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
14007$as_echo "$emacs_cv_localtime_cache" >&6; }
14008if test $emacs_cv_localtime_cache = yes; then
14009
14010$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
ca81d7a0 14011
6da23aaa 14012fi
503d2be0 14013
eb697db5
DN
14014if test "x$HAVE_TIMEVAL" = xyes; then
14015 for ac_func in gettimeofday
14016do :
14017 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
14018if test "x$ac_cv_func_gettimeofday" = x""yes; then :
14019 cat >>confdefs.h <<_ACEOF
14020#define HAVE_GETTIMEOFDAY 1
91e84f96 14021_ACEOF
647847ea
DL
14022
14023fi
eb697db5 14024done
647847ea 14025
eb697db5
DN
14026 if test $ac_cv_func_gettimeofday = yes; then
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
14028$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
14029if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
91e84f96 14030 $as_echo_n "(cached) " >&6
6da23aaa 14031else
eb697db5 14032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 14033/* end confdefs.h. */
eb697db5
DN
14034
14035#ifdef TIME_WITH_SYS_TIME
14036#include <sys/time.h>
14037#include <time.h>
14038#else
14039#ifdef HAVE_SYS_TIME_H
14040#include <sys/time.h>
14041#else
14042#include <time.h>
14043#endif
14044#endif
aaa36002
DN
14045int
14046main ()
a4f64981 14047{
eb697db5
DN
14048struct timeval time;
14049 gettimeofday (&time, 0);
aaa36002
DN
14050 ;
14051 return 0;
eb697db5 14052}
91e84f96 14053_ACEOF
eb697db5
DN
14054if ac_fn_c_try_compile "$LINENO"; then :
14055 emacs_cv_gettimeofday_two_arguments=yes
91e84f96 14056else
eb697db5 14057 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 14058fi
e9a63f04 14059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
14060fi
14061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
14062$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
14063 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 14064
eb697db5 14065$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 14066
eb697db5
DN
14067 fi
14068 fi
647847ea 14069fi
ca81d7a0 14070
eb697db5
DN
14071ok_so_far=yes
14072ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
14073if test "x$ac_cv_func_socket" = x""yes; then :
91e84f96 14074
5929fbe7 14075else
eb697db5 14076 ok_so_far=no
c0d27fcc 14077fi
ca81d7a0 14078
eb697db5
DN
14079if test $ok_so_far = yes; then
14080 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
14081if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
91e84f96 14082
91e84f96 14083else
eb697db5 14084 ok_so_far=no
647847ea 14085fi
19650fd6 14086
c0d27fcc 14087
c0d27fcc 14088fi
eb697db5
DN
14089if test $ok_so_far = yes; then
14090 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
14091if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
5929fbe7 14092
eb697db5
DN
14093else
14094 ok_so_far=no
647847ea 14095fi
ca81d7a0 14096
ca81d7a0 14097
647847ea 14098fi
eb697db5 14099if test $ok_so_far = yes; then
ca81d7a0 14100
eb697db5 14101$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
c0d27fcc 14102
91e84f96 14103fi
c0d27fcc 14104
eb697db5
DN
14105for ac_header in sys/ioctl.h
14106do :
14107 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
14108if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 14109 cat >>confdefs.h <<_ACEOF
eb697db5 14110#define HAVE_SYS_IOCTL_H 1
c0d27fcc 14111_ACEOF
647847ea 14112
73b77ee5 14113fi
c0d27fcc 14114
503d2be0 14115done
73b77ee5 14116
c0d27fcc 14117
eb697db5 14118if test -f /usr/lpp/X11/bin/smt.exp; then
0ca10bb7 14119
eb697db5 14120$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
6da23aaa 14121
eb697db5 14122fi
ca81d7a0 14123
eb697db5
DN
14124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
14125$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
14126if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14128$as_echo "yes" >&6; }
0ca10bb7 14129
eb697db5 14130$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
6da23aaa 14131
eb697db5
DN
14132else
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14134$as_echo "no" >&6; }
14135fi
14136
14137ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
14138if test "x$ac_cv_type_pid_t" = x""yes; then :
0ca10bb7 14139
91e84f96 14140else
6da23aaa 14141
eb697db5
DN
14142cat >>confdefs.h <<_ACEOF
14143#define pid_t int
14144_ACEOF
14145
bf89cb4d 14146fi
6da23aaa 14147
eb697db5
DN
14148for ac_header in vfork.h
14149do :
14150 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
14151if test "x$ac_cv_header_vfork_h" = x""yes; then :
14152 cat >>confdefs.h <<_ACEOF
14153#define HAVE_VFORK_H 1
14154_ACEOF
14155
91e84f96 14156fi
eb697db5
DN
14157
14158done
14159
14160for ac_func in fork vfork
14161do :
14162 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14163ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
036dc38d
LMI
14164eval as_val=\$$as_ac_var
14165 if test "x$as_val" = x""yes; then :
c0d27fcc 14166 cat >>confdefs.h <<_ACEOF
e9a63f04 14167#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14168_ACEOF
503d2be0 14169
fa0b693c 14170fi
503d2be0 14171done
fa0b693c 14172
503d2be0 14173if test "x$ac_cv_func_fork" = xyes; then
eb697db5 14174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
e9a63f04 14175$as_echo_n "checking for working fork... " >&6; }
eb697db5 14176if test "${ac_cv_func_fork_works+set}" = set; then :
e9a63f04 14177 $as_echo_n "(cached) " >&6
fa0b693c 14178else
eb697db5 14179 if test "$cross_compiling" = yes; then :
503d2be0
AS
14180 ac_cv_func_fork_works=cross
14181else
eb697db5 14182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
14183/* end confdefs.h. */
14184$ac_includes_default
14185int
14186main ()
14187{
14188
14189 /* By Ruediger Kuhlmann. */
14190 return fork () < 0;
14191
14192 ;
14193 return 0;
14194}
503d2be0 14195_ACEOF
eb697db5 14196if ac_fn_c_try_run "$LINENO"; then :
503d2be0
AS
14197 ac_cv_func_fork_works=yes
14198else
eb697db5 14199 ac_cv_func_fork_works=no
503d2be0 14200fi
eb697db5
DN
14201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14202 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 14203fi
ca81d7a0 14204
503d2be0 14205fi
eb697db5 14206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
e9a63f04 14207$as_echo "$ac_cv_func_fork_works" >&6; }
503d2be0 14208
6bae0ccf
DL
14209else
14210 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
14211fi
14212if test "x$ac_cv_func_fork_works" = xcross; then
14213 case $host in
14214 *-*-amigaos* | *-*-msdosdjgpp*)
14215 # Override, as these systems have only a dummy fork() stub
14216 ac_cv_func_fork_works=no
14217 ;;
14218 *)
14219 ac_cv_func_fork_works=yes
14220 ;;
14221 esac
eb697db5 14222 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
e9a63f04 14223$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 14224fi
73b77ee5 14225ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 14226if test "x$ac_cv_func_vfork" = xyes; then
eb697db5 14227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
e9a63f04 14228$as_echo_n "checking for working vfork... " >&6; }
eb697db5 14229if test "${ac_cv_func_vfork_works+set}" = set; then :
e9a63f04 14230 $as_echo_n "(cached) " >&6
503d2be0 14231else
eb697db5 14232 if test "$cross_compiling" = yes; then :
503d2be0 14233 ac_cv_func_vfork_works=cross
fa0b693c 14234else
eb697db5 14235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14236/* end confdefs.h. */
73b77ee5 14237/* Thanks to Paul Eggert for this test. */
ca81d7a0 14238$ac_includes_default
19650fd6 14239#include <sys/wait.h>
f053c89f 14240#ifdef HAVE_VFORK_H
503d2be0 14241# include <vfork.h>
73b77ee5
GM
14242#endif
14243/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
14244 argument registers are propagated back to the parent. The compiler
14245 is told about this with #include <vfork.h>, but some compilers
14246 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
14247 static variable whose address is put into a register that is
14248 clobbered by the vfork. */
19650fd6 14249static void
fa0b693c 14250#ifdef __cplusplus
73b77ee5 14251sparc_address_test (int arg)
503d2be0 14252# else
73b77ee5 14253sparc_address_test (arg) int arg;
fa0b693c 14254#endif
fa0b693c 14255{
73b77ee5
GM
14256 static pid_t child;
14257 if (!child) {
14258 child = vfork ();
14259 if (child < 0) {
14260 perror ("vfork");
14261 _exit(2);
14262 }
14263 if (!child) {
14264 arg = getpid();
14265 write(-1, "", 0);
14266 _exit (arg);
14267 }
14268 }
14269}
503d2be0
AS
14270
14271int
14272main ()
14273{
73b77ee5
GM
14274 pid_t parent = getpid ();
14275 pid_t child;
fa0b693c 14276
19650fd6 14277 sparc_address_test (0);
fa0b693c 14278
73b77ee5 14279 child = vfork ();
fa0b693c 14280
73b77ee5 14281 if (child == 0) {
503d2be0
AS
14282 /* Here is another test for sparc vfork register problems. This
14283 test uses lots of local variables, at least as many local
14284 variables as main has allocated so far including compiler
14285 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
14286 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
14287 reuse the register of parent for one of the local variables,
14288 since it will think that parent can't possibly be used any more
14289 in this routine. Assigning to the local variable will thus
14290 munge parent in the parent process. */
73b77ee5
GM
14291 pid_t
14292 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14293 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14294 /* Convince the compiler that p..p7 are live; otherwise, it might
14295 use the same hardware register for all 8 local variables. */
14296 if (p != p1 || p != p2 || p != p3 || p != p4
14297 || p != p5 || p != p6 || p != p7)
14298 _exit(1);
fa0b693c 14299
503d2be0
AS
14300 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14301 from child file descriptors. If the child closes a descriptor
14302 before it execs or exits, this munges the parent's descriptor
14303 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
14304 _exit(close(fileno(stdout)) != 0);
14305 } else {
14306 int status;
14307 struct stat st;
14308
14309 while (wait(&status) != child)
14310 ;
ca81d7a0 14311 return (
73b77ee5
GM
14312 /* Was there some problem with vforking? */
14313 child < 0
14314
14315 /* Did the child fail? (This shouldn't happen.) */
14316 || status
14317
14318 /* Did the vfork/compiler bug occur? */
14319 || parent != getpid()
fa0b693c 14320
73b77ee5
GM
14321 /* Did the file descriptor bug occur? */
14322 || fstat(fileno(stdout), &st) != 0
14323 );
14324 }
14325}
503d2be0 14326_ACEOF
eb697db5 14327if ac_fn_c_try_run "$LINENO"; then :
73b77ee5 14328 ac_cv_func_vfork_works=yes
fa0b693c 14329else
eb697db5 14330 ac_cv_func_vfork_works=no
503d2be0 14331fi
eb697db5
DN
14332rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14333 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa0b693c 14334fi
ca81d7a0 14335
fa0b693c 14336fi
eb697db5 14337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
e9a63f04 14338$as_echo "$ac_cv_func_vfork_works" >&6; }
fa0b693c 14339
503d2be0
AS
14340fi;
14341if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 14342 ac_cv_func_vfork_works=$ac_cv_func_vfork
eb697db5 14343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
e9a63f04 14344$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
14345fi
14346
503d2be0
AS
14347if test "x$ac_cv_func_vfork_works" = xyes; then
14348
eb697db5 14349$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
503d2be0
AS
14350
14351else
14352
eb697db5 14353$as_echo "#define vfork fork" >>confdefs.h
fa0b693c
GM
14354
14355fi
503d2be0
AS
14356if test "x$ac_cv_func_fork_works" = xyes; then
14357
eb697db5 14358$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fa0b693c 14359
503d2be0 14360fi
647847ea 14361
c0d27fcc 14362
eb697db5 14363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
e9a63f04 14364$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
eb697db5 14365if test "${emacs_cv_langinfo_codeset+set}" = set; then :
e9a63f04 14366 $as_echo_n "(cached) " >&6
6a3a24fa 14367else
eb697db5 14368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14369/* end confdefs.h. */
6a3a24fa
JD
14370#include <langinfo.h>
14371int
14372main ()
14373{
14374char* cs = nl_langinfo(CODESET);
6da23aaa
EZ
14375 ;
14376 return 0;
14377}
14378_ACEOF
eb697db5 14379if ac_fn_c_try_link "$LINENO"; then :
6da23aaa 14380 emacs_cv_langinfo_codeset=yes
bf89cb4d 14381else
eb697db5 14382 emacs_cv_langinfo_codeset=no
91e84f96 14383fi
eb697db5
DN
14384rm -f core conftest.err conftest.$ac_objext \
14385 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
14386
14387fi
eb697db5 14388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
91e84f96
GM
14389$as_echo "$emacs_cv_langinfo_codeset" >&6; }
14390if test $emacs_cv_langinfo_codeset = yes; then
14391
eb697db5 14392$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
e9a63f04 14393
8730a8da 14394fi
dc2933eb 14395
eb697db5
DN
14396ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14397if test "x$ac_cv_type_size_t" = x""yes; then :
503d2be0 14398
c0d27fcc
MR
14399cat >>confdefs.h <<_ACEOF
14400#define HAVE_SIZE_T 1
14401_ACEOF
14402
8730a8da
DL
14403
14404fi
14405
c0d27fcc 14406
eb697db5 14407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
e9a63f04 14408$as_echo_n "checking for mbstate_t... " >&6; }
eb697db5 14409if test "${ac_cv_type_mbstate_t+set}" = set; then :
e9a63f04 14410 $as_echo_n "(cached) " >&6
973a76b1 14411else
eb697db5 14412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14413/* end confdefs.h. */
973a76b1
DL
14414$ac_includes_default
14415# include <wchar.h>
14416int
14417main ()
14418{
14419mbstate_t x; return sizeof x;
14420 ;
14421 return 0;
14422}
14423_ACEOF
eb697db5 14424if ac_fn_c_try_compile "$LINENO"; then :
973a76b1
DL
14425 ac_cv_type_mbstate_t=yes
14426else
eb697db5 14427 ac_cv_type_mbstate_t=no
973a76b1 14428fi
ca81d7a0 14429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 14430fi
eb697db5 14431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
e9a63f04 14432$as_echo "$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
14433 if test $ac_cv_type_mbstate_t = yes; then
14434
eb697db5 14435$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
973a76b1
DL
14436
14437 else
14438
eb697db5 14439$as_echo "#define mbstate_t int" >>confdefs.h
973a76b1
DL
14440
14441 fi
14442
eb697db5 14443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
e9a63f04 14444$as_echo_n "checking for C restrict keyword... " >&6; }
eb697db5 14445if test "${emacs_cv_c_restrict+set}" = set; then :
e9a63f04 14446 $as_echo_n "(cached) " >&6
22044edf 14447else
eb697db5 14448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14449/* end confdefs.h. */
22044edf
DL
14450void fred (int *restrict x);
14451int
14452main ()
14453{
b936fae4 14454
22044edf
DL
14455 ;
14456 return 0;
14457}
c0d27fcc 14458_ACEOF
eb697db5 14459if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
14460 emacs_cv_c_restrict=yes
14461else
eb697db5 14462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14463/* end confdefs.h. */
22044edf
DL
14464void fred (int *__restrict x);
14465int
14466main ()
14467{
c0d27fcc 14468
22044edf
DL
14469 ;
14470 return 0;
14471}
c0d27fcc 14472_ACEOF
eb697db5 14473if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
14474 emacs_cv_c_restrict=__restrict
14475else
eb697db5 14476 emacs_cv_c_restrict=no
ba4481b5 14477fi
ca81d7a0 14478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 14479fi
ca81d7a0 14480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 14481fi
eb697db5 14482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
e9a63f04 14483$as_echo "$emacs_cv_c_restrict" >&6; }
22044edf
DL
14484case "$emacs_cv_c_restrict" in
14485 yes) emacs_restrict=restrict;;
14486 no) emacs_restrict="";;
14487 *) emacs_restrict="$emacs_cv_c_restrict";;
14488esac
14489if test "$emacs_restrict" != __restrict; then
b936fae4 14490
22044edf
DL
14491cat >>confdefs.h <<_ACEOF
14492#define __restrict $emacs_restrict
c0d27fcc 14493_ACEOF
ba4481b5
DL
14494
14495fi
ba4481b5 14496
eb697db5 14497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
e9a63f04 14498$as_echo_n "checking for C restricted array declarations... " >&6; }
eb697db5 14499if test "${emacs_cv_c_restrict_arr+set}" = set; then :
e9a63f04 14500 $as_echo_n "(cached) " >&6
22044edf 14501else
eb697db5 14502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14503/* end confdefs.h. */
22044edf
DL
14504void fred (int x[__restrict]);
14505int
14506main ()
14507{
b936fae4 14508
22044edf
DL
14509 ;
14510 return 0;
14511}
c0d27fcc 14512_ACEOF
eb697db5 14513if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
14514 emacs_cv_c_restrict_arr=yes
14515else
eb697db5 14516 emacs_cv_c_restrict_arr=no
ba4481b5 14517fi
ca81d7a0 14518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 14519fi
eb697db5 14520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
e9a63f04 14521$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22044edf 14522if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 14523
eb697db5 14524$as_echo "#define __restrict_arr __restrict" >>confdefs.h
ba4481b5 14525
ba4481b5
DL
14526fi
14527
c0d27fcc 14528
c0d27fcc 14529
22044edf
DL
14530# Set up the CFLAGS for real compilation, so we can substitute it.
14531CFLAGS="$REAL_CFLAGS"
14532CPPFLAGS="$REAL_CPPFLAGS"
14533
9978c06c
CY
14534## Hack to detect a buggy GCC version.
14535if test "x$GCC" = xyes \
14536 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
14537 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
14538 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
036dc38d 14539 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
9978c06c
CY
14540fi
14541
22044edf 14542#### Find out which version of Emacs this is.
8c5ff6dd 14543version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \
22044edf
DL
14544 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
14545if test x"${version}" = x; then
036dc38d 14546 as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5
22044edf 14547fi
879de935 14548if test x"${version}" != x"$PACKAGE_VERSION"; then
eb697db5 14549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5
8c5ff6dd 14550$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;}
879de935 14551fi
22044edf
DL
14552
14553### Specify what sort of things we'll be editing into Makefile and config.h.
14554### Use configuration here uncanonicalized to avoid exceeding size limits.
14555
14556
4286c48d 14557## Unused?
22044edf
DL
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
4286c48d
GM
14578## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
14579## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
14580## end of LIBX_BASE, but nothing ever set it.
22044edf
DL
14581
14582
14583
14584
c82a7244 14585## Used in lwlib/Makefile.in.
22044edf
DL
14586
14587
14588
6a3a24fa 14589
06b62770
AR
14590
14591
14592
48fad8e8
DN
14593
14594
5e159d07
CY
14595
14596
edfda783 14597
22044edf
DL
14598cat >>confdefs.h <<_ACEOF
14599#define EMACS_CONFIGURATION "${canonical}"
14600_ACEOF
14601
14602
14603cat >>confdefs.h <<_ACEOF
14604#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22044edf
DL
14605_ACEOF
14606
14607
14608cat >>confdefs.h <<_ACEOF
22044edf 14609#define config_machfile "${machfile}"
22044edf
DL
14610_ACEOF
14611
14612
22044edf 14613cat >>confdefs.h <<_ACEOF
22044edf 14614#define config_opsysfile "${opsysfile}"
22044edf
DL
14615_ACEOF
14616
14617
e765bf58
JD
14618XMENU_OBJ=
14619XOBJ=
5929fbe7 14620FONT_OBJ=
22044edf
DL
14621if test "${HAVE_X_WINDOWS}" = "yes" ; then
14622
eb697db5 14623$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
22044edf 14624
e765bf58
JD
14625 XMENU_OBJ=xmenu.o
14626 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
5929fbe7
GM
14627 FONT_OBJ=xfont.o
14628 if test "$HAVE_XFT" = "yes"; then
14629 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
14630 elif test "$HAVE_FREETYPE" = "yes"; then
14631 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
14632 fi
14633
22044edf 14634fi
e765bf58
JD
14635
14636
14637
5929fbe7 14638
7186fb09 14639WIDGET_OBJ=
c82a7244 14640MOTIF_LIBW=
22044edf 14641if test "${USE_X_TOOLKIT}" != "none" ; then
7186fb09 14642 WIDGET_OBJ=widget.o
22044edf 14643
eb697db5 14644$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
22044edf 14645
39dd4d52 14646 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5 14647
eb697db5 14648$as_echo "#define USE_LUCID 1" >>confdefs.h
73d798d5 14649
39dd4d52 14650 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5 14651
eb697db5 14652$as_echo "#define USE_MOTIF 1" >>confdefs.h
73d798d5 14653
c82a7244
GM
14654 MOTIF_LIBW=-lXm
14655 case "$opsys" in
14656 gnu-linux)
14657 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
14658 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
14659 ;;
14660
14661 unixware)
14662 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
14663 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
14664 MOTIF_LIBW="MOTIF_LIBW -lXimp"
14665 ;;
14666
14667 aix4-2)
14668 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
14669 MOTIF_LIBW="$MOTIF_LIBW -li18n"
14670 ;;
14671 esac
14672 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
73d798d5 14673 fi
22044edf 14674fi
7186fb09 14675
c82a7244 14676
718a19c8 14677TOOLKIT_LIBW=
c82a7244
GM
14678case "$USE_X_TOOLKIT" in
14679 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
14680 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
718a19c8 14681 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
c82a7244
GM
14682esac
14683
14684
a5edbe4a
GM
14685if test "$USE_X_TOOLKIT" = "none"; then
14686 LIBXT_OTHER="\$(LIBXSM)"
8b44daa0 14687 OLDXMENU_TARGET="really-oldXMenu"
a5edbe4a
GM
14688else
14689 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
8b44daa0 14690 OLDXMENU_TARGET="really-lwlib"
a5edbe4a
GM
14691fi
14692
14693
718a19c8
GM
14694## The X Menu stuff is present in the X10 distribution, but missing
14695## from X11. If we have X10, just use the installed library;
14696## otherwise, use our own copy.
22044edf
DL
14697if test "${HAVE_X11}" = "yes" ; then
14698
eb697db5 14699$as_echo "#define HAVE_X11 1" >>confdefs.h
22044edf 14700
718a19c8
GM
14701
14702 if test "$USE_X_TOOLKIT" = "none"; then
14703 OLDXMENU="\${oldXMenudir}libXMenu11.a"
14704 else
14705 OLDXMENU="\${lwlibdir}liblw.a"
14706 fi
14707 LIBXMENU="\$(OLDXMENU)"
a5edbe4a 14708 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16455a85 14709 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
718a19c8 14710else
298b8a34
GM
14711 ## For a syntactically valid Makefile; not actually used for anything.
14712 ## See comments in src/Makefile.in.
14713 OLDXMENU=nothing
1dea46de
GM
14714 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
14715 if test "${HAVE_X_WINDOWS}" = "yes"; then
14716 LIBXMENU="-lXMenu"
14717 else
14718 LIBXMENU=
14719 fi
a5edbe4a 14720 LIBX_OTHER=
16455a85 14721 OLDXMENU_DEPS=
22044edf 14722fi
718a19c8 14723
4286c48d 14724if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
298b8a34
GM
14725 OLDXMENU_TARGET=
14726 OLDXMENU=nothing
718a19c8 14727 LIBXMENU=
16455a85 14728 OLDXMENU_DEPS=
22044edf 14729fi
718a19c8
GM
14730
14731
14732
14733
a5edbe4a 14734
16455a85 14735
298b8a34 14736
22044edf
DL
14737if test "${HAVE_MENUS}" = "yes" ; then
14738
eb697db5 14739$as_echo "#define HAVE_MENUS 1" >>confdefs.h
22044edf
DL
14740
14741fi
4f91d9c8 14742
22044edf
DL
14743if test "${GNU_MALLOC}" = "yes" ; then
14744
eb697db5 14745$as_echo "#define GNU_MALLOC 1" >>confdefs.h
22044edf
DL
14746
14747fi
4f91d9c8
GM
14748
14749RALLOC_OBJ=
22044edf
DL
14750if test "${REL_ALLOC}" = "yes" ; then
14751
eb697db5 14752$as_echo "#define REL_ALLOC 1" >>confdefs.h
22044edf 14753
4f91d9c8
GM
14754
14755 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
22044edf
DL
14756fi
14757
14758
718a19c8
GM
14759if test "$opsys" = "cygwin"; then
14760 CYGWIN_OBJ="sheap.o"
14761 ## Cygwin differs because of its unexec().
7acac9f4 14762 PRE_ALLOC_OBJ=
4f91d9c8 14763 POST_ALLOC_OBJ=lastfile.o
718a19c8
GM
14764else
14765 CYGWIN_OBJ=
7acac9f4 14766 PRE_ALLOC_OBJ=lastfile.o
4f91d9c8 14767 POST_ALLOC_OBJ=
718a19c8
GM
14768fi
14769
106c6f74 14770
22044edf
DL
14771
14772
c0d27fcc 14773
ede4834a
GM
14774case "$opsys" in
14775 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
14776
14777 darwin)
a0c06748
GM
14778 ## The -headerpad option tells ld (see man page) to leave room at the
14779 ## end of the header for adding load commands. Needed for dumping.
14780 ## 0x690 is the total size of 30 segment load commands (at 56
14781 ## each); under Cocoa 31 commands are required.
14782 if test "$HAVE_NS" = "yes"; then
14783 libs_nsgui="-framework AppKit"
14784 headerpad_extra=6C8
14785 else
14786 libs_nsgui=
14787 headerpad_extra=690
14788 fi
14789 LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
14790
14791 ## This is here because src/Makefile.in did some extra fiddling around
14792 ## with LD_SWITCH_SYSTEM. The cpp logic was:
14793 ## #ifndef LD_SWITCH_SYSTEM
14794 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
14795 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
14796 ## not using gcc, darwin system not on an alpha (ie darwin, since
14797 ## darwin + alpha does not occur).
14798 ## Because this was done in src/Makefile.in, the resulting part of
14799 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
14800 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
14801 ## rather than LD_SWITCH_SYSTEM.
14802 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
14803 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
14804 ;;
14805
14806 ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
14807 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
14808 ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
14809 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
14810 ## had different values in configure (in ac_link) and src/Makefile.in.
14811 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
14812 gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
ede4834a
GM
14813
14814 *) LD_SWITCH_SYSTEM_TEMACS= ;;
14815esac
14816
a25e81b3 14817if test "$NS_IMPL_GNUSTEP" = "yes"; then
7dddde4b
GM
14818 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
14819fi
ede4834a
GM
14820
14821
ede4834a
GM
14822
14823
f5ea3ba7 14824LD_FIRSTFLAG=
ebbc2619
GM
14825ORDINARY_LINK=
14826case "$opsys" in
14827 ## gnu: GNU needs its own crt0.
b84fc05a 14828 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
ebbc2619
GM
14829
14830 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
14831 ## library search parth, i.e. it won't search /usr/lib for libc and
14832 ## friends. Using -nostartfiles instead avoids this problem, and
14833 ## will also work on earlier NetBSD releases.
f5ea3ba7 14834 netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
ebbc2619
GM
14835
14836 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
14837 ## MkLinux/LinuxPPC needs this.
14838 ## ibms390x only supports opsys = gnu-linux so it can be added here.
14839 gnu-*)
14840 case "$machine" in
f5ea3ba7 14841 macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;;
ebbc2619
GM
14842 esac
14843 ;;
14844esac
14845
90278cb6 14846
ebbc2619
GM
14847if test "x$ORDINARY_LINK" = "xyes"; then
14848
f5ea3ba7 14849 LD_FIRSTFLAG=""
ebbc2619 14850
eb697db5 14851$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
ebbc2619
GM
14852
14853
f5ea3ba7 14854## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
b84fc05a 14855## freebsd, gnu-* not on macppc|ibms390x.
f5ea3ba7 14856elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
ebbc2619
GM
14857
14858 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
14859 ## places that are difficult to figure out at make time. Fortunately,
14860 ## these same versions allow you to pass arbitrary flags on to the
14861 ## linker, so there is no reason not to use it as a linker.
14862 ##
14863 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
14864 ## searching for libraries in its internal directories, so we have to
14865 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
f5ea3ba7 14866 LD_FIRSTFLAG="-nostdlib"
e6df49e4
GM
14867fi
14868
81ac4f35 14869## FIXME? What setting of EDIT_LDFLAGS should this have?
f5ea3ba7 14870test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic"
ebbc2619
GM
14871
14872
14873
14874
81ac4f35 14875## FIXME? The logic here is not precisely the same as that above.
f5ea3ba7 14876## There is no check here for a pre-defined LD_FIRSTFLAG.
81ac4f35 14877## Should we only be setting LIB_GCC if LD ~ -nostdlib?
057886a3 14878LIB_GCC=
ebbc2619 14879if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
057886a3
GM
14880
14881 case "$opsys" in
12a25125 14882 freebsd|netbsd|openbsd) LIB_GCC= ;;
057886a3
GM
14883
14884 gnu-*)
14885 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
14886 ## build on ARM EABI under GNU/Linux. (Bug#5518)
14887 ## Note that m/arm.h never bothered to undefine LIB_GCC first.
14888 if test "$machine" = "arm"; then
14889 LIB_GCC="-lgcc_s"
14890 else
14891 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
14892 ## immediately undefine it again and redefine it to empty.
14893 ## Was the C_SWITCH_X_SITE part really necessary?
3536f993 14894## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
057886a3
GM
14895 LIB_GCC=
14896 fi
14897 ;;
14898
14899 ## Ask GCC where to find libgcc.a.
3536f993 14900 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
057886a3
GM
14901 esac
14902fi
14903
14904
372b4090
GM
14905TOOLTIP_SUPPORT=
14906WINDOW_SUPPORT=
14907## If we're using X11/GNUstep, define some consequences.
14908if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
14909
eb697db5 14910$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
372b4090
GM
14911
14912
eb697db5 14913$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
372b4090
GM
14914
14915 MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
14916 TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
14917
14918 WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
14919 test "$HAVE_X_WINDOWS" = "yes" && \
14920 WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
14921
14922fi
14923
14924
14925
22044edf 14926
c0d27fcc 14927
91e84f96
GM
14928
14929
ba4481b5 14930#### Report on what we decided to do.
488dd4c4
JD
14931#### Report GTK as a toolkit, even if it doesn't use Xt.
14932#### It makes printing result more understandable as using GTK sets
14933#### toolkit_scroll_bars to yes by default.
14934if test "${HAVE_GTK}" = "yes"; then
14935 USE_X_TOOLKIT=GTK
14936fi
14937
ba4481b5
DL
14938echo "
14939Configured for \`${canonical}'.
14940
14941 Where should the build process find the source code? ${srcdir}
14942 What operating system and machine description files should Emacs use?
14943 \`${opsysfile}' and \`${machfile}'
14944 What compiler should emacs be built with? ${CC} ${CFLAGS}
14945 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 14946 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 14947 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 14948 What window system should Emacs use? ${window_system}
8e967cf7 14949 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
14950
14951if test -n "${x_includes}"; then
14952echo " Where do we find X Windows header files? ${x_includes}"
14953else
14954echo " Where do we find X Windows header files? Standard dirs"
14955fi
14956if test -n "${x_libraries}"; then
14957echo " Where do we find X Windows libraries? ${x_libraries}"
14958else
14959echo " Where do we find X Windows libraries? Standard dirs"
14960fi
14961
14962echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
14963echo " Does Emacs use -lXpm? ${HAVE_XPM}"
14964echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
14965echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
91e84f96 14966echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
ba4481b5 14967echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 14968echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
3de25479 14969echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
4b9832a6 14970
79011b82 14971echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 14972echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
637fa988 14973echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
022c122a 14974echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
036dc38d 14975echo " Does Emacs use -lgnutls (BROKEN)? ${HAVE_GNUTLS}"
4b9832a6 14976echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}"
2ee27f27 14977
edfda783
AR
14978echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
14979echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
14980echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
14981echo " Does Emacs use -lxft? ${HAVE_XFT}"
14982
8d87199b 14983echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
14984echo
14985
d0098f13
JD
14986if test $USE_XASSERTS = yes; then
14987 echo " Compiling with asserts turned on."
d0098f13 14988 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 14989fi
05cf15c6 14990
ca34d75a
JD
14991echo
14992
06b62770
AR
14993if test "$HAVE_NS" = "yes"; then
14994 echo
14995 echo "You must run \"make install\" in order to test the built application.
14996The installed application will go to nextstep/Emacs.app and can be
14997run or moved from there."
14998 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
14999 echo "The application will be fully self-contained."
15000 else
15001 echo "The lisp resources for the application will be installed under ${prefix}.
15002You may need to run \"make install\" with sudo. The application will fail
15003to run if these resources are not installed."
15004 fi
15005 echo
15006fi
15007
131e4133
MA
15008if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
15009 echo "D-Bus integration has been tested for GNU/Linux only."
15010 echo
15011fi
15012
05cf15c6 15013
ba4481b5
DL
15014# Remove any trailing slashes in these variables.
15015test "${prefix}" != NONE &&
15016 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
15017test "${exec_prefix}" != NONE &&
15018 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
15019
81ac4f35 15020ac_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 lwlib/Makefile lisp/Makefile leim/Makefile"
ca81d7a0
JD
15021
15022ac_config_commands="$ac_config_commands default"
15023
503d2be0 15024cat >confcache <<\_ACEOF
ba4481b5
DL
15025# This file is a shell script that caches the results of configure
15026# tests run on this system so they can be shared between configure
503d2be0
AS
15027# scripts and configure runs, see configure's option --config-cache.
15028# It is not useful on other systems. If it contains results you don't
15029# want to keep, you may remove or edit it.
ba4481b5 15030#
503d2be0
AS
15031# config.status only pays attention to the cache file if you give it
15032# the --recheck option to rerun configure.
ba4481b5 15033#
6bae0ccf 15034# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
15035# loading this file, other *unset* `ac_cv_foo' will be assigned the
15036# following values.
15037
15038_ACEOF
15039
ba4481b5
DL
15040# The following way of writing the cache mishandles newlines in values,
15041# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 15042# So, we kill variables containing newlines.
ba4481b5
DL
15043# Ultrix sh set writes to stderr and can't be redirected directly,
15044# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
15045(
15046 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15047 eval ac_val=\$$ac_var
15048 case $ac_val in #(
15049 *${as_nl}*)
15050 case $ac_var in #(
eb697db5 15051 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3de25479 15052$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
15053 esac
15054 case $ac_var in #(
15055 _ | IFS | as_nl) ;; #(
e9a63f04 15056 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
eb697db5 15057 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
15058 esac ;;
15059 esac
15060 done
15061
503d2be0 15062 (set) 2>&1 |
ca81d7a0
JD
15063 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15064 *${as_nl}ac_space=\ *)
eb697db5
DN
15065 # `set' does not quote correctly, so add quotes: double-quote
15066 # substitution turns \\\\ into \\, and sed turns \\ into \.
503d2be0 15067 sed -n \
edfaf76d
LK
15068 "s/'/'\\\\''/g;
15069 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 15070 ;; #(
503d2be0
AS
15071 *)
15072 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 15073 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 15074 ;;
ca81d7a0
JD
15075 esac |
15076 sort
15077) |
503d2be0 15078 sed '
ca81d7a0 15079 /^ac_cv_env_/b end
503d2be0 15080 t clear
ca81d7a0 15081 :clear
503d2be0
AS
15082 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15083 t end
ca81d7a0
JD
15084 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15085 :end' >>confcache
15086if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15087 if test -w "$cache_file"; then
15088 test "x$cache_file" != "x/dev/null" &&
eb697db5 15089 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
e9a63f04 15090$as_echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 15091 cat confcache >$cache_file
ba4481b5 15092 else
eb697db5 15093 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
e9a63f04 15094$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
15095 fi
15096fi
15097rm -f confcache
15098
ba4481b5
DL
15099test "x$prefix" = xNONE && prefix=$ac_default_prefix
15100# Let make expand exec_prefix.
15101test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15102
ba4481b5
DL
15103DEFS=-DHAVE_CONFIG_H
15104
6bae0ccf
DL
15105ac_libobjs=
15106ac_ltlibobjs=
15107for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15108 # 1. Remove the extension, and $U if already installed.
ca81d7a0 15109 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 15110 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
15111 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15112 # will be set to the directory where LIBOBJS objects are built.
eb697db5
DN
15113 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15114 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
15115done
15116LIBOBJS=$ac_libobjs
15117
15118LTLIBOBJS=$ac_ltlibobjs
15119
15120
c0d27fcc 15121
671d409f 15122
ba4481b5 15123: ${CONFIG_STATUS=./config.status}
e9a63f04 15124ac_write_fail=0
503d2be0
AS
15125ac_clean_files_save=$ac_clean_files
15126ac_clean_files="$ac_clean_files $CONFIG_STATUS"
eb697db5 15127{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 15128$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
eb697db5
DN
15129as_write_fail=0
15130cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 15131#! $SHELL
c0d27fcc 15132# Generated by $as_me.
ba4481b5 15133# Run this file to recreate the current configuration.
ba4481b5 15134# Compiler output produced by configure, useful for debugging
503d2be0 15135# configure, is in config.log if it exists.
ba4481b5 15136
503d2be0 15137debug=false
19650fd6
AS
15138ac_cs_recheck=false
15139ac_cs_silent=false
91e84f96 15140
eb697db5
DN
15141SHELL=\${CONFIG_SHELL-$SHELL}
15142export SHELL
15143_ASEOF
15144cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15145## -------------------- ##
15146## M4sh Initialization. ##
15147## -------------------- ##
c0d27fcc 15148
f053c89f
CY
15149# Be more Bourne compatible
15150DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 15151if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
15152 emulate sh
15153 NULLCMD=:
e9a63f04 15154 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
15155 # is contrary to our usage. Disable this feature.
15156 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
15157 setopt NO_GLOB_SUBST
15158else
eb697db5
DN
15159 case `(set -o) 2>/dev/null` in #(
15160 *posix*) :
15161 set -o posix ;; #(
15162 *) :
15163 ;;
f053c89f 15164esac
503d2be0 15165fi
f053c89f
CY
15166
15167
e9a63f04
GM
15168as_nl='
15169'
15170export as_nl
15171# Printing a long string crashes Solaris 7 /usr/bin/printf.
15172as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15173as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15174as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
15175# Prefer a ksh shell builtin over an external printf program on Solaris,
15176# but without wasting forks for bash or zsh.
15177if test -z "$BASH_VERSION$ZSH_VERSION" \
15178 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15179 as_echo='print -r --'
15180 as_echo_n='print -rn --'
15181elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
15182 as_echo='printf %s\n'
15183 as_echo_n='printf %s'
15184else
15185 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15186 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15187 as_echo_n='/usr/ucb/echo -n'
7bbec45b 15188 else
e9a63f04
GM
15189 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15190 as_echo_n_body='eval
15191 arg=$1;
eb697db5 15192 case $arg in #(
e9a63f04
GM
15193 *"$as_nl"*)
15194 expr "X$arg" : "X\\(.*\\)$as_nl";
15195 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15196 esac;
15197 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15198 '
15199 export as_echo_n_body
15200 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 15201 fi
e9a63f04
GM
15202 export as_echo_body
15203 as_echo='sh -c $as_echo_body as_echo'
15204fi
15205
15206# The user is always right.
15207if test "${PATH_SEPARATOR+set}" != set; then
15208 PATH_SEPARATOR=:
15209 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15210 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15211 PATH_SEPARATOR=';'
15212 }
503d2be0
AS
15213fi
15214
6bae0ccf 15215
ca81d7a0
JD
15216# IFS
15217# We need space, tab and new line, in precisely that order. Quoting is
15218# there to prevent editors from complaining about space-tab.
15219# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15220# splitting by setting IFS to empty value.)
ca81d7a0
JD
15221IFS=" "" $as_nl"
15222
15223# Find who we are. Look in the path if we contain no directory separator.
eb697db5 15224case $0 in #((
ca81d7a0
JD
15225 *[\\/]* ) as_myself=$0 ;;
15226 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15227for as_dir in $PATH
15228do
15229 IFS=$as_save_IFS
15230 test -z "$as_dir" && as_dir=.
eb697db5
DN
15231 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15232 done
ca81d7a0
JD
15233IFS=$as_save_IFS
15234
15235 ;;
15236esac
15237# We did not find ourselves, most probably we were run as `sh COMMAND'
15238# in which case we are not to be found in the path.
15239if test "x$as_myself" = x; then
15240 as_myself=$0
15241fi
15242if test ! -f "$as_myself"; then
e9a63f04 15243 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 15244 exit 1
ca81d7a0
JD
15245fi
15246
eb697db5
DN
15247# Unset variables that we do not need and which cause bugs (e.g. in
15248# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15249# suppresses any "Segmentation fault" message there. '((' could
15250# trigger a bug in pdksh 5.2.14.
15251for as_var in BASH_ENV ENV MAIL MAILPATH
15252do eval test x\${$as_var+set} = xset \
15253 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 15254done
6bae0ccf
DL
15255PS1='$ '
15256PS2='> '
15257PS4='+ '
15258
15259# NLS nuisances.
e9a63f04
GM
15260LC_ALL=C
15261export LC_ALL
15262LANGUAGE=C
15263export LANGUAGE
6bae0ccf 15264
eb697db5
DN
15265# CDPATH.
15266(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15267
15268
036dc38d
LMI
15269# as_fn_error ERROR [LINENO LOG_FD]
15270# ---------------------------------
eb697db5
DN
15271# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15272# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
036dc38d 15273# script with status $?, using 1 if that was 0.
eb697db5
DN
15274as_fn_error ()
15275{
036dc38d
LMI
15276 as_status=$?; test $as_status -eq 0 && as_status=1
15277 if test "$3"; then
15278 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15279 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
eb697db5 15280 fi
036dc38d 15281 $as_echo "$as_me: error: $1" >&2
eb697db5
DN
15282 as_fn_exit $as_status
15283} # as_fn_error
15284
15285
15286# as_fn_set_status STATUS
15287# -----------------------
15288# Set $? to STATUS, without forking.
15289as_fn_set_status ()
15290{
15291 return $1
15292} # as_fn_set_status
15293
15294# as_fn_exit STATUS
15295# -----------------
15296# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15297as_fn_exit ()
15298{
15299 set +e
15300 as_fn_set_status $1
15301 exit $1
15302} # as_fn_exit
15303
15304# as_fn_unset VAR
15305# ---------------
15306# Portably unset VAR.
15307as_fn_unset ()
15308{
15309 { eval $1=; unset $1;}
15310}
15311as_unset=as_fn_unset
15312# as_fn_append VAR VALUE
15313# ----------------------
15314# Append the text in VALUE to the end of the definition contained in VAR. Take
15315# advantage of any shell optimizations that allow amortized linear growth over
15316# repeated appends, instead of the typical quadratic growth present in naive
15317# implementations.
15318if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15319 eval 'as_fn_append ()
15320 {
15321 eval $1+=\$2
15322 }'
15323else
15324 as_fn_append ()
15325 {
15326 eval $1=\$$1\$2
15327 }
15328fi # as_fn_append
15329
15330# as_fn_arith ARG...
15331# ------------------
15332# Perform arithmetic evaluation on the ARGs, and store the result in the
15333# global $as_val. Take advantage of shells that can avoid forks. The arguments
15334# must be portable across $(()) and expr.
15335if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15336 eval 'as_fn_arith ()
15337 {
15338 as_val=$(( $* ))
15339 }'
15340else
15341 as_fn_arith ()
15342 {
15343 as_val=`expr "$@" || test $? -eq 1`
15344 }
15345fi # as_fn_arith
15346
15347
ca81d7a0
JD
15348if expr a : '\(a\)' >/dev/null 2>&1 &&
15349 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
15350 as_expr=expr
15351else
15352 as_expr=false
15353fi
15354
ca81d7a0 15355if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
15356 as_basename=basename
15357else
15358 as_basename=false
15359fi
c0d27fcc 15360
eb697db5
DN
15361if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15362 as_dirname=dirname
15363else
15364 as_dirname=false
15365fi
c0d27fcc 15366
ca81d7a0 15367as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
15368$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15369 X"$0" : 'X\(//\)$' \| \
ca81d7a0 15370 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 15371$as_echo X/"$0" |
ca81d7a0
JD
15372 sed '/^.*\/\([^/][^/]*\)\/*$/{
15373 s//\1/
15374 q
15375 }
15376 /^X\/\(\/\/\)$/{
15377 s//\1/
15378 q
15379 }
15380 /^X\/\(\/\).*/{
15381 s//\1/
15382 q
15383 }
15384 s/.*/./; q'`
c0d27fcc 15385
eb697db5
DN
15386# Avoid depending upon Character Ranges.
15387as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15388as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15389as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15390as_cr_digits='0123456789'
15391as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
15392
15393ECHO_C= ECHO_N= ECHO_T=
eb697db5 15394case `echo -n x` in #(((((
ca81d7a0 15395-n*)
eb697db5 15396 case `echo 'xy\c'` in
ca81d7a0 15397 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
eb697db5
DN
15398 xy) ECHO_C='\c';;
15399 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15400 ECHO_T=' ';;
ca81d7a0
JD
15401 esac;;
15402*)
15403 ECHO_N='-n';;
c0d27fcc 15404esac
503d2be0
AS
15405
15406rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
15407if test -d conf$$.dir; then
15408 rm -f conf$$.dir/conf$$.file
15409else
15410 rm -f conf$$.dir
e9a63f04
GM
15411 mkdir conf$$.dir 2>/dev/null
15412fi
15413if (echo >conf$$.file) 2>/dev/null; then
15414 if ln -s conf$$.file conf$$ 2>/dev/null; then
15415 as_ln_s='ln -s'
15416 # ... but there are two gotchas:
15417 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15418 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15419 # In both cases, we have to default to `cp -p'.
15420 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15421 as_ln_s='cp -p'
15422 elif ln conf$$.file conf$$ 2>/dev/null; then
15423 as_ln_s=ln
15424 else
503d2be0 15425 as_ln_s='cp -p'
e9a63f04 15426 fi
503d2be0
AS
15427else
15428 as_ln_s='cp -p'
15429fi
ca81d7a0
JD
15430rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15431rmdir conf$$.dir 2>/dev/null
503d2be0 15432
eb697db5
DN
15433
15434# as_fn_mkdir_p
15435# -------------
15436# Create "$as_dir" as a directory, including parents if necessary.
15437as_fn_mkdir_p ()
15438{
15439
15440 case $as_dir in #(
15441 -*) as_dir=./$as_dir;;
15442 esac
15443 test -d "$as_dir" || eval $as_mkdir_p || {
15444 as_dirs=
15445 while :; do
15446 case $as_dir in #(
15447 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15448 *) as_qdir=$as_dir;;
15449 esac
15450 as_dirs="'$as_qdir' $as_dirs"
15451 as_dir=`$as_dirname -- "$as_dir" ||
15452$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15453 X"$as_dir" : 'X\(//\)[^/]' \| \
15454 X"$as_dir" : 'X\(//\)$' \| \
15455 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15456$as_echo X"$as_dir" |
15457 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15458 s//\1/
15459 q
15460 }
15461 /^X\(\/\/\)[^/].*/{
15462 s//\1/
15463 q
15464 }
15465 /^X\(\/\/\)$/{
15466 s//\1/
15467 q
15468 }
15469 /^X\(\/\).*/{
15470 s//\1/
15471 q
15472 }
15473 s/.*/./; q'`
15474 test -d "$as_dir" && break
15475 done
15476 test -z "$as_dirs" || eval "mkdir $as_dirs"
036dc38d 15477 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
eb697db5
DN
15478
15479
15480} # as_fn_mkdir_p
6bae0ccf 15481if mkdir -p . 2>/dev/null; then
eb697db5 15482 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 15483else
edfaf76d 15484 test -d ./-p && rmdir ./-p
6bae0ccf
DL
15485 as_mkdir_p=false
15486fi
15487
f053c89f
CY
15488if test -x / >/dev/null 2>&1; then
15489 as_test_x='test -x'
ca81d7a0 15490else
f053c89f
CY
15491 if ls -dL / >/dev/null 2>&1; then
15492 as_ls_L_option=L
15493 else
15494 as_ls_L_option=
15495 fi
15496 as_test_x='
15497 eval sh -c '\''
15498 if test -d "$1"; then
e9a63f04 15499 test -d "$1/.";
f053c89f 15500 else
eb697db5 15501 case $1 in #(
e9a63f04 15502 -*)set "./$1";;
f053c89f 15503 esac;
eb697db5 15504 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
15505 ???[sx]*):;;*)false;;esac;fi
15506 '\'' sh
15507 '
ca81d7a0 15508fi
f053c89f 15509as_executable_p=$as_test_x
503d2be0 15510
c0d27fcc 15511# Sed expression to map a string onto a valid CPP name.
edfaf76d 15512as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
15513
15514# Sed expression to map a string onto a valid variable name.
edfaf76d 15515as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 15516
503d2be0 15517
503d2be0 15518exec 6>&1
eb697db5
DN
15519## ----------------------------------- ##
15520## Main body of $CONFIG_STATUS script. ##
15521## ----------------------------------- ##
15522_ASEOF
15523test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 15524
eb697db5
DN
15525cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15526# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 15527# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
15528# values after options handling.
15529ac_log="
49a62e8a 15530This file was extended by emacs $as_me 24.0.50, which was
036dc38d 15531generated by GNU Autoconf 2.65. Invocation command line was
c0d27fcc
MR
15532
15533 CONFIG_FILES = $CONFIG_FILES
15534 CONFIG_HEADERS = $CONFIG_HEADERS
15535 CONFIG_LINKS = $CONFIG_LINKS
15536 CONFIG_COMMANDS = $CONFIG_COMMANDS
15537 $ $0 $@
15538
ca81d7a0
JD
15539on `(hostname || uname -n) 2>/dev/null | sed 1q`
15540"
15541
503d2be0
AS
15542_ACEOF
15543
3de25479
JV
15544case $ac_config_files in *"
15545"*) set x $ac_config_files; shift; ac_config_files=$*;;
15546esac
15547
15548case $ac_config_headers in *"
15549"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15550esac
15551
15552
e9a63f04 15553cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 15554# Files that config.status was made for.
ca81d7a0
JD
15555config_files="$ac_config_files"
15556config_headers="$ac_config_headers"
15557config_commands="$ac_config_commands"
503d2be0 15558
ca81d7a0 15559_ACEOF
503d2be0 15560
e9a63f04 15561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 15562ac_cs_usage="\
eb697db5
DN
15563\`$as_me' instantiates files and other configuration actions
15564from templates according to the current configuration. Unless the files
15565and actions are specified as TAGs, all are instantiated by default.
503d2be0 15566
eb697db5 15567Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
15568
15569 -h, --help print this help, then exit
f053c89f 15570 -V, --version print version number and configuration settings, then exit
eb697db5 15571 --config print configuration, then exit
3de25479
JV
15572 -q, --quiet, --silent
15573 do not print progress messages
503d2be0
AS
15574 -d, --debug don't remove temporary files
15575 --recheck update $as_me by reconfiguring in the same conditions
3de25479 15576 --file=FILE[:TEMPLATE]
e9a63f04 15577 instantiate the configuration file FILE
3de25479 15578 --header=FILE[:TEMPLATE]
e9a63f04 15579 instantiate the configuration header FILE
503d2be0
AS
15580
15581Configuration files:
15582$config_files
15583
15584Configuration headers:
15585$config_headers
15586
15587Configuration commands:
15588$config_commands
15589
eb697db5 15590Report bugs to the package provider."
503d2be0 15591
ca81d7a0 15592_ACEOF
e9a63f04 15593cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
eb697db5 15594ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 15595ac_cs_version="\\
49a62e8a 15596emacs config.status 24.0.50
036dc38d 15597configured by $0, generated by GNU Autoconf 2.65,
eb697db5 15598 with options \\"\$ac_cs_config\\"
503d2be0 15599
036dc38d 15600Copyright (C) 2009 Free Software Foundation, Inc.
503d2be0
AS
15601This config.status script is free software; the Free Software Foundation
15602gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
15603
15604ac_pwd='$ac_pwd'
15605srcdir='$srcdir'
15606INSTALL='$INSTALL'
e9a63f04 15607test -n "\$AWK" || AWK=awk
c0d27fcc 15608_ACEOF
503d2be0 15609
e9a63f04
GM
15610cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15611# The default lists apply if the user does not specify any file.
503d2be0
AS
15612ac_need_defaults=:
15613while test $# != 0
ba4481b5 15614do
503d2be0 15615 case $1 in
375a0f65 15616 --*=*)
ca81d7a0
JD
15617 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15618 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
15619 ac_shift=:
15620 ;;
ca81d7a0 15621 *)
6bae0ccf
DL
15622 ac_option=$1
15623 ac_optarg=$2
15624 ac_shift=shift
503d2be0 15625 ;;
503d2be0
AS
15626 esac
15627
6bae0ccf 15628 case $ac_option in
503d2be0 15629 # Handling of the options.
19650fd6
AS
15630 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15631 ac_cs_recheck=: ;;
ca81d7a0 15632 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 15633 $as_echo "$ac_cs_version"; exit ;;
eb697db5
DN
15634 --config | --confi | --conf | --con | --co | --c )
15635 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 15636 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
15637 debug=: ;;
15638 --file | --fil | --fi | --f )
6bae0ccf 15639 $ac_shift
e9a63f04
GM
15640 case $ac_optarg in
15641 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15642 esac
eb697db5 15643 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
15644 ac_need_defaults=false;;
15645 --header | --heade | --head | --hea )
6bae0ccf 15646 $ac_shift
e9a63f04
GM
15647 case $ac_optarg in
15648 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15649 esac
eb697db5 15650 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 15651 ac_need_defaults=false;;
ca81d7a0
JD
15652 --he | --h)
15653 # Conflict between --help and --header
036dc38d 15654 as_fn_error "ambiguous option: \`$1'
eb697db5 15655Try \`$0 --help' for more information.";;
ca81d7a0 15656 --help | --hel | -h )
e9a63f04 15657 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
15658 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15659 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15660 ac_cs_silent=: ;;
503d2be0
AS
15661
15662 # This is an error.
036dc38d 15663 -*) as_fn_error "unrecognized option: \`$1'
eb697db5 15664Try \`$0 --help' for more information." ;;
503d2be0 15665
eb697db5 15666 *) as_fn_append ac_config_targets " $1"
ca81d7a0 15667 ac_need_defaults=false ;;
503d2be0 15668
ba4481b5 15669 esac
503d2be0 15670 shift
ba4481b5
DL
15671done
15672
19650fd6
AS
15673ac_configure_extra_args=
15674
15675if $ac_cs_silent; then
15676 exec 6>/dev/null
15677 ac_configure_extra_args="$ac_configure_extra_args --silent"
15678fi
15679
15680_ACEOF
e9a63f04 15681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 15682if \$ac_cs_recheck; then
e9a63f04
GM
15683 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15684 shift
15685 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15686 CONFIG_SHELL='$SHELL'
ca81d7a0 15687 export CONFIG_SHELL
e9a63f04 15688 exec "\$@"
19650fd6
AS
15689fi
15690
503d2be0 15691_ACEOF
e9a63f04 15692cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15693exec 5>>config.log
15694{
15695 echo
15696 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15697## Running $as_me. ##
15698_ASBOX
e9a63f04 15699 $as_echo "$ac_log"
ca81d7a0 15700} >&5
ba4481b5 15701
ca81d7a0 15702_ACEOF
e9a63f04 15703cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 15704#
ca81d7a0 15705# INIT-COMMANDS
503d2be0 15706#
81ac4f35 15707GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
503d2be0 15708
c0d27fcc
MR
15709_ACEOF
15710
e9a63f04 15711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15712
15713# Handling of arguments.
503d2be0
AS
15714for ac_config_target in $ac_config_targets
15715do
ca81d7a0
JD
15716 case $ac_config_target in
15717 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
15718 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
981f8c13 15719 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
ca81d7a0 15720 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
15721 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
15722 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
15723 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
15724 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
81ac4f35 15725 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
f657c21b 15726 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 15727 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
15728 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
15729 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15730
036dc38d 15731 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 15732 esac
ba4481b5 15733done
503d2be0 15734
ca81d7a0 15735
503d2be0
AS
15736# If the user did not use the arguments to specify the items to instantiate,
15737# then the envvar interface is used. Set only those that are not.
15738# We use the long form for the default assignment because of an extremely
15739# bizarre bug on SunOS 4.1.3.
15740if $ac_need_defaults; then
15741 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15742 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15743 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 15744fi
503d2be0 15745
19650fd6 15746# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 15747# simply because there is no reason against having it here, and in addition,
19650fd6 15748# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
15749# Hook for its removal unless debugging.
15750# Note that there is a small window in which the directory will not be cleaned:
15751# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
15752$debug ||
15753{
ca81d7a0
JD
15754 tmp=
15755 trap 'exit_status=$?
15756 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15757' 0
eb697db5 15758 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 15759}
503d2be0 15760# Create a (secure) tmp directory for tmp files.
19650fd6 15761
503d2be0 15762{
ca81d7a0 15763 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
15764 test -n "$tmp" && test -d "$tmp"
15765} ||
15766{
ca81d7a0
JD
15767 tmp=./conf$$-$RANDOM
15768 (umask 077 && mkdir "$tmp")
036dc38d 15769} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 15770
e9a63f04
GM
15771# Set up the scripts for CONFIG_FILES section.
15772# No need to generate them if there are no CONFIG_FILES.
15773# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
15774if test -n "$CONFIG_FILES"; then
15775
648b8e6d
GM
15776if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15777 ac_cs_awk_getline=:
15778 ac_cs_awk_pipe_init=
15779 ac_cs_awk_read_file='
15780 while ((getline aline < (F[key])) > 0)
15781 print(aline)
15782 close(F[key])'
15783 ac_cs_awk_pipe_fini=
15784else
15785 ac_cs_awk_getline=false
15786 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15787 ac_cs_awk_read_file='
15788 print "|#_!!_#|"
15789 print "cat " F[key] " &&"
15790 '$ac_cs_awk_pipe_init
15791 # The final `:' finishes the AND list.
15792 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15793fi
eb697db5
DN
15794ac_cr=`echo X | tr X '\015'`
15795# On cygwin, bash can eat \r inside `` if the user requested igncr.
15796# But we know of no other shell where ac_cr would be empty at this
15797# point, so we can use a bashism as a fallback.
15798if test "x$ac_cr" = x; then
15799 eval ac_cr=\$\'\\r\'
15800fi
e9a63f04
GM
15801ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15802if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
036dc38d 15803 ac_cs_awk_cr='\r'
e9a63f04
GM
15804else
15805 ac_cs_awk_cr=$ac_cr
ca81d7a0 15806fi
503d2be0 15807
e9a63f04 15808echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 15809_ACEOF
503d2be0 15810
648b8e6d
GM
15811# Create commands to substitute file output variables.
15812{
15813 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15814 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15815 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15816 echo "_ACAWK" &&
15817 echo "_ACEOF"
15818} >conf$$files.sh &&
15819. ./conf$$files.sh ||
036dc38d 15820 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
648b8e6d 15821rm -f conf$$files.sh
ca81d7a0 15822
e9a63f04
GM
15823{
15824 echo "cat >conf$$subs.awk <<_ACEOF" &&
15825 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15826 echo "_ACEOF"
15827} >conf$$subs.sh ||
036dc38d
LMI
15828 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15829ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ca81d7a0
JD
15830ac_delim='%!_!# '
15831for ac_last_try in false false false false false :; do
e9a63f04 15832 . ./conf$$subs.sh ||
036dc38d 15833 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15834
3de25479
JV
15835 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15836 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
15837 break
15838 elif $ac_last_try; then
036dc38d 15839 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
15840 else
15841 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 15842 fi
ca81d7a0 15843done
e9a63f04
GM
15844rm -f conf$$subs.sh
15845
15846cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15847cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15848_ACEOF
15849sed -n '
15850h
15851s/^/S["/; s/!.*/"]=/
15852p
15853g
15854s/^[^!]*!//
15855:repl
15856t repl
15857s/'"$ac_delim"'$//
15858t delim
15859:nl
15860h
eb697db5 15861s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15862t more1
15863s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15864p
15865n
15866b repl
15867:more1
15868s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15869p
15870g
15871s/.\{148\}//
15872t nl
15873:delim
15874h
eb697db5 15875s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15876t more2
15877s/["\\]/\\&/g; s/^/"/; s/$/"/
15878p
15879b
15880:more2
15881s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15882p
15883g
15884s/.\{148\}//
15885t delim
15886' <conf$$subs.awk | sed '
15887/^[^""]/{
15888 N
15889 s/\n//
15890}
15891' >>$CONFIG_STATUS || ac_write_fail=1
15892rm -f conf$$subs.awk
15893cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15894_ACAWK
15895cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15896 for (key in S) S_is_set[key] = 1
15897 FS = "\a"
648b8e6d 15898 \$ac_cs_awk_pipe_init
e9a63f04
GM
15899}
15900{
15901 line = $ 0
15902 nfields = split(line, field, "@")
15903 substed = 0
15904 len = length(field[1])
15905 for (i = 2; i < nfields; i++) {
15906 key = field[i]
15907 keylen = length(key)
15908 if (S_is_set[key]) {
15909 value = S[key]
15910 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15911 len += length(value) + length(field[++i])
15912 substed = 1
15913 } else
15914 len += 1 + keylen
15915 }
648b8e6d
GM
15916 if (nfields == 3 && !substed) {
15917 key = field[2]
15918 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15919 \$ac_cs_awk_read_file
15920 next
15921 }
15922 }
e9a63f04
GM
15923 print line
15924}
648b8e6d 15925\$ac_cs_awk_pipe_fini
e9a63f04 15926_ACAWK
ca81d7a0 15927_ACEOF
e9a63f04
GM
15928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15929if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15930 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15931else
15932 cat
15933fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
036dc38d 15934 || as_fn_error "could not setup config files machinery" "$LINENO" 5
c0d27fcc 15935_ACEOF
ca81d7a0 15936
036dc38d
LMI
15937# VPATH may cause trouble with some makes, so we remove $(srcdir),
15938# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
ca81d7a0
JD
15939# trailing colons and then remove the whole line if VPATH becomes empty
15940# (actually we leave an empty line to preserve line numbers).
15941if test "x$srcdir" = x.; then
036dc38d
LMI
15942 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15943s/:*\$(srcdir):*/:/
15944s/:*\${srcdir}:*/:/
15945s/:*@srcdir@:*/:/
15946s/^\([^=]*=[ ]*\):*/\1/
ca81d7a0
JD
15947s/:*$//
15948s/^[^=]*=[ ]*$//
15949}'
15950fi
15951
e9a63f04 15952cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15953fi # test -n "$CONFIG_FILES"
15954
e9a63f04
GM
15955# Set up the scripts for CONFIG_HEADERS section.
15956# No need to generate them if there are no CONFIG_HEADERS.
15957# This happens for instance with `./config.status Makefile'.
15958if test -n "$CONFIG_HEADERS"; then
15959cat >"$tmp/defines.awk" <<\_ACAWK ||
15960BEGIN {
15961_ACEOF
dc2933eb 15962
e9a63f04
GM
15963# Transform confdefs.h into an awk script `defines.awk', embedded as
15964# here-document in config.status, that substitutes the proper values into
15965# config.h.in to produce config.h.
15966
15967# Create a delimiter string that does not exist in confdefs.h, to ease
15968# handling of long lines.
15969ac_delim='%!_!# '
15970for ac_last_try in false false :; do
15971 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15972 if test -z "$ac_t"; then
15973 break
15974 elif $ac_last_try; then
036dc38d 15975 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
15976 else
15977 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15978 fi
15979done
15980
15981# For the awk script, D is an array of macro values keyed by name,
15982# likewise P contains macro parameters if any. Preserve backslash
15983# newline sequences.
15984
15985ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15986sed -n '
15987s/.\{148\}/&'"$ac_delim"'/g
15988t rset
15989:rset
15990s/^[ ]*#[ ]*define[ ][ ]*/ /
15991t def
15992d
15993:def
15994s/\\$//
15995t bsnl
15996s/["\\]/\\&/g
15997s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15998D["\1"]=" \3"/p
15999s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16000d
16001:bsnl
16002s/["\\]/\\&/g
16003s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16004D["\1"]=" \3\\\\\\n"\\/p
16005t cont
16006s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16007t cont
16008d
16009:cont
16010n
16011s/.\{148\}/&'"$ac_delim"'/g
16012t clear
16013:clear
16014s/\\$//
16015t bsnlc
16016s/["\\]/\\&/g; s/^/"/; s/$/"/p
16017d
16018:bsnlc
16019s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16020b cont
16021' <confdefs.h | sed '
16022s/'"$ac_delim"'/"\\\
16023"/g' >>$CONFIG_STATUS || ac_write_fail=1
16024
16025cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16026 for (key in D) D_is_set[key] = 1
16027 FS = "\a"
16028}
16029/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16030 line = \$ 0
16031 split(line, arg, " ")
16032 if (arg[1] == "#") {
16033 defundef = arg[2]
16034 mac1 = arg[3]
16035 } else {
16036 defundef = substr(arg[1], 2)
16037 mac1 = arg[2]
16038 }
16039 split(mac1, mac2, "(") #)
16040 macro = mac2[1]
3de25479 16041 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
16042 if (D_is_set[macro]) {
16043 # Preserve the white space surrounding the "#".
e9a63f04
GM
16044 print prefix "define", macro P[macro] D[macro]
16045 next
16046 } else {
16047 # Replace #undef with comments. This is necessary, for example,
16048 # in the case of _POSIX_SOURCE, which is predefined and required
16049 # on some systems where configure will not decide to define it.
16050 if (defundef == "undef") {
3de25479 16051 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
16052 next
16053 }
16054 }
16055}
16056{ print }
16057_ACAWK
16058_ACEOF
16059cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
036dc38d 16060 as_fn_error "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
16061fi # test -n "$CONFIG_HEADERS"
16062
16063
16064eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
16065shift
16066for ac_tag
ca81d7a0
JD
16067do
16068 case $ac_tag in
16069 :[FHLC]) ac_mode=$ac_tag; continue;;
16070 esac
16071 case $ac_mode$ac_tag in
16072 :[FHL]*:*);;
036dc38d 16073 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
16074 :[FH]-) ac_tag=-:-;;
16075 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16076 esac
16077 ac_save_IFS=$IFS
16078 IFS=:
16079 set x $ac_tag
16080 IFS=$ac_save_IFS
16081 shift
16082 ac_file=$1
16083 shift
16084
16085 case $ac_mode in
16086 :L) ac_source=$1;;
16087 :[FH])
16088 ac_file_inputs=
16089 for ac_f
16090 do
16091 case $ac_f in
16092 -) ac_f="$tmp/stdin";;
16093 *) # Look for the file first in the build tree, then in the source tree
16094 # (if the path is not absolute). The absolute path cannot be DOS-style,
16095 # because $ac_f cannot contain `:'.
16096 test -f "$ac_f" ||
16097 case $ac_f in
16098 [\\/$]*) false;;
16099 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16100 esac ||
036dc38d 16101 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 16102 esac
e9a63f04 16103 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
eb697db5 16104 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
16105 done
16106
16107 # Let's still pretend it is `configure' which instantiates (i.e., don't
16108 # use $as_me), people would be surprised to read:
16109 # /* config.h. Generated by config.status. */
e9a63f04
GM
16110 configure_input='Generated from '`
16111 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16112 `' by configure.'
ca81d7a0
JD
16113 if test x"$ac_file" != x-; then
16114 configure_input="$ac_file. $configure_input"
eb697db5 16115 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 16116$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 16117 fi
e9a63f04
GM
16118 # Neutralize special characters interpreted by sed in replacement strings.
16119 case $configure_input in #(
16120 *\&* | *\|* | *\\* )
16121 ac_sed_conf_input=`$as_echo "$configure_input" |
16122 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16123 *) ac_sed_conf_input=$configure_input;;
16124 esac
ca81d7a0
JD
16125
16126 case $ac_tag in
e9a63f04 16127 *:-:* | *:-) cat >"$tmp/stdin" \
036dc38d 16128 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
16129 esac
16130 ;;
ba4481b5
DL
16131 esac
16132
ca81d7a0 16133 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 16134$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
16135 X"$ac_file" : 'X\(//\)[^/]' \| \
16136 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 16137 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 16138$as_echo X"$ac_file" |
ca81d7a0
JD
16139 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16140 s//\1/
16141 q
16142 }
16143 /^X\(\/\/\)[^/].*/{
16144 s//\1/
16145 q
16146 }
16147 /^X\(\/\/\)$/{
16148 s//\1/
16149 q
16150 }
16151 /^X\(\/\).*/{
16152 s//\1/
16153 q
16154 }
16155 s/.*/./; q'`
eb697db5 16156 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 16157 ac_builddir=.
98418dba 16158
ca81d7a0
JD
16159case "$ac_dir" in
16160.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16161*)
e9a63f04 16162 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 16163 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 16164 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
16165 case $ac_top_builddir_sub in
16166 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16167 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16168 esac ;;
16169esac
16170ac_abs_top_builddir=$ac_pwd
16171ac_abs_builddir=$ac_pwd$ac_dir_suffix
16172# for backward compatibility:
16173ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
16174
16175case $srcdir in
ca81d7a0 16176 .) # We are building in place.
c0d27fcc 16177 ac_srcdir=.
ca81d7a0
JD
16178 ac_top_srcdir=$ac_top_builddir_sub
16179 ac_abs_top_srcdir=$ac_pwd ;;
16180 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 16181 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
16182 ac_top_srcdir=$srcdir
16183 ac_abs_top_srcdir=$srcdir ;;
16184 *) # Relative name.
16185 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16186 ac_top_srcdir=$ac_top_build_prefix$srcdir
16187 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 16188esac
ca81d7a0 16189ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 16190
c0d27fcc 16191
ca81d7a0
JD
16192 case $ac_mode in
16193 :F)
16194 #
16195 # CONFIG_FILE
16196 #
ba4481b5 16197
503d2be0
AS
16198 case $INSTALL in
16199 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 16200 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 16201 esac
ca81d7a0 16202_ACEOF
ba4481b5 16203
e9a63f04 16204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
16205# If the template does not know about datarootdir, expand it.
16206# FIXME: This hack should be removed a few years after 2.60.
16207ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
16208ac_sed_dataroot='
16209/datarootdir/ {
ca81d7a0
JD
16210 p
16211 q
16212}
16213/@datadir@/p
16214/@docdir@/p
16215/@infodir@/p
16216/@localedir@/p
eb697db5 16217/@mandir@/p'
e9a63f04 16218case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
16219*datarootdir*) ac_datarootdir_seen=yes;;
16220*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
eb697db5 16221 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 16222$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 16223_ACEOF
e9a63f04 16224cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
16225 ac_datarootdir_hack='
16226 s&@datadir@&$datadir&g
16227 s&@docdir@&$docdir&g
16228 s&@infodir@&$infodir&g
16229 s&@localedir@&$localedir&g
16230 s&@mandir@&$mandir&g
eb697db5 16231 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 16232esac
c0d27fcc 16233_ACEOF
ca81d7a0
JD
16234
16235# Neutralize VPATH when `$srcdir' = `.'.
16236# Shell code in configure.ac might set extrasub.
16237# FIXME: do we really want to maintain this feature?
e9a63f04
GM
16238cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16239ac_sed_extra="$ac_vpsub
503d2be0 16240$extrasub
c0d27fcc 16241_ACEOF
e9a63f04 16242cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
16243:t
16244/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 16245s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 16246s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 16247s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
16248s&@srcdir@&$ac_srcdir&;t t
16249s&@abs_srcdir@&$ac_abs_srcdir&;t t
16250s&@top_srcdir@&$ac_top_srcdir&;t t
16251s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16252s&@builddir@&$ac_builddir&;t t
16253s&@abs_builddir@&$ac_abs_builddir&;t t
16254s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16255s&@INSTALL@&$ac_INSTALL&;t t
16256$ac_datarootdir_hack
e9a63f04 16257"
648b8e6d
GM
16258eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
16259if $ac_cs_awk_getline; then
16260 $AWK -f "$tmp/subs.awk"
16261else
16262 $AWK -f "$tmp/subs.awk" | $SHELL
16263fi >$tmp/out \
036dc38d 16264 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
16265
16266test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
16267 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
16268 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
eb697db5 16269 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
036dc38d 16270which seems to be undefined. Please make sure it is defined." >&5
e9a63f04 16271$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
036dc38d 16272which seems to be undefined. Please make sure it is defined." >&2;}
ca81d7a0
JD
16273
16274 rm -f "$tmp/stdin"
503d2be0 16275 case $ac_file in
e9a63f04
GM
16276 -) cat "$tmp/out" && rm -f "$tmp/out";;
16277 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
16278 esac \
036dc38d 16279 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
16280 ;;
16281 :H)
16282 #
16283 # CONFIG_HEADER
16284 #
503d2be0 16285 if test x"$ac_file" != x-; then
e9a63f04
GM
16286 {
16287 $as_echo "/* $configure_input */" \
16288 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16289 } >"$tmp/config.h" \
036dc38d 16290 || as_fn_error "could not create $ac_file" "$LINENO" 5
e9a63f04 16291 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
eb697db5 16292 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 16293$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 16294 else
e9a63f04
GM
16295 rm -f "$ac_file"
16296 mv "$tmp/config.h" "$ac_file" \
036dc38d 16297 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba4481b5 16298 fi
503d2be0 16299 else
e9a63f04
GM
16300 $as_echo "/* $configure_input */" \
16301 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
036dc38d 16302 || as_fn_error "could not create -" "$LINENO" 5
ba4481b5 16303 fi
ca81d7a0 16304 ;;
edfaf76d 16305
eb697db5 16306 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 16307$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
16308 ;;
16309 esac
ba4481b5 16310
c0d27fcc 16311
ca81d7a0
JD
16312 case $ac_file$ac_mode in
16313 "default":C)
ba4481b5
DL
16314
16315### Make the necessary directories, if they don't exist.
16316for dir in etc lisp ; do
16317 test -d ${dir} || mkdir ${dir}
16318done
16319
ba4481b5 16320echo creating src/epaths.h
4aa6b955 16321${MAKE-make} epaths-force
ba4481b5 16322
503d2be0 16323if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 16324 echo creating src/.gdbinit
503d2be0 16325 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
16326fi
16327
503d2be0 16328 ;;
ca81d7a0 16329
503d2be0 16330 esac
ca81d7a0 16331done # for ac_tag
503d2be0 16332
ba4481b5 16333
eb697db5 16334as_fn_exit 0
c0d27fcc 16335_ACEOF
503d2be0
AS
16336ac_clean_files=$ac_clean_files_save
16337
e9a63f04 16338test $ac_write_fail = 0 ||
036dc38d 16339 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 16340
c0d27fcc 16341
503d2be0
AS
16342# configure is writing to config.log, and then calls config.status.
16343# config.status does its own redirection, appending to config.log.
16344# Unfortunately, on DOS this fails, as config.log is still kept open
16345# by configure, so config.status won't be able to write to it; its
16346# output is simply discarded. So we exec the FD to /dev/null,
16347# effectively closing config.log, so it can be properly (re)opened and
16348# appended to by config.status. When coming back to configure, we
16349# need to make the FD available again.
16350if test "$no_create" != yes; then
16351 ac_cs_success=:
19650fd6
AS
16352 ac_config_status_args=
16353 test "$silent" = yes &&
16354 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 16355 exec 5>/dev/null
19650fd6 16356 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
16357 exec 5>>config.log
16358 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16359 # would make configure fail if this is the last instruction.
036dc38d 16360 $ac_cs_success || as_fn_exit $?
503d2be0 16361fi
e9a63f04 16362if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
eb697db5 16363 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
3de25479 16364$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 16365fi
f5f47add 16366
c0d27fcc 16367