gnus-html.el: Doc fix for gnus-html-image-url-blocked-p.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
eb697db5
DN
3# Generated by GNU Autoconf 2.65 for emacs 24.0.50.
4#
ba4481b5 5#
ca81d7a0 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
eb697db5
DN
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
9#
10#
ba4481b5
DL
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
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"
319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
320
321
322} # as_fn_mkdir_p
323# as_fn_append VAR VALUE
324# ----------------------
325# Append the text in VALUE to the end of the definition contained in VAR. Take
326# advantage of any shell optimizations that allow amortized linear growth over
327# repeated appends, instead of the typical quadratic growth present in naive
328# implementations.
329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339fi # as_fn_append
340
341# as_fn_arith ARG...
342# ------------------
343# Perform arithmetic evaluation on the ARGs, and store the result in the
344# global $as_val. Take advantage of shells that can avoid forks. The arguments
345# must be portable across $(()) and expr.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356fi # as_fn_arith
357
358
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
363# script with status $?, using 1 if that was 0.
364as_fn_error ()
365{
366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$3"; then
368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
370 fi
371 $as_echo "$as_me: error: $1" >&2
372 as_fn_exit $as_status
373} # as_fn_error
374
ca81d7a0
JD
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
377 as_expr=expr
378else
379 as_expr=false
380fi
381
ca81d7a0 382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
383 as_basename=basename
384else
385 as_basename=false
386fi
c0d27fcc 387
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.
533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
503d2be0 536
503d2be0
AS
537#
538# Initializations.
539#
ba4481b5 540ac_default_prefix=/usr/local
ca81d7a0 541ac_clean_files=
6bae0ccf 542ac_config_libobj_dir=.
ca81d7a0 543LIBOBJS=
503d2be0
AS
544cross_compiling=no
545subdirs=
c0d27fcc
MR
546MFLAGS=
547MAKEFLAGS=
503d2be0 548
c0d27fcc 549# Identity of this package.
9cf8f393
JD
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
49a62e8a
GM
552PACKAGE_VERSION='24.0.50'
553PACKAGE_STRING='emacs 24.0.50'
9cf8f393 554PACKAGE_BUGREPORT=''
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
eb697db5 602LINKER
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
ce07fa9a 663LIBXSM
3de25479
JV
664LIBGPM
665LIBGIF
666LIBTIFF
667LIBPNG
668LIBJPEG
669LIBXPM
670FREETYPE_LIBS
671FREETYPE_CFLAGS
672M17N_FLT_LIBS
673M17N_FLT_CFLAGS
674LIBOTF_LIBS
675LIBOTF_CFLAGS
676XFT_LIBS
677XFT_CFLAGS
678FONTCONFIG_LIBS
679FONTCONFIG_CFLAGS
ce07fa9a
JV
680LIBXMU
681LIBXTR6
682LIBSELINUX_LIBS
3de25479
JV
683GCONF_LIBS
684GCONF_CFLAGS
ce07fa9a 685DBUS_OBJ
3de25479
JV
686DBUS_LIBS
687DBUS_CFLAGS
ce07fa9a 688GTK_OBJ
3de25479
JV
689GTK_LIBS
690GTK_CFLAGS
691IMAGEMAGICK_LIBS
692IMAGEMAGICK_CFLAGS
693RSVG_LIBS
694RSVG_CFLAGS
eb697db5
DN
695VMLIMIT_OBJ
696GMALLOC_OBJ
3de25479 697HAVE_XSERVER
ce07fa9a
JV
698LIB_STANDARD
699NS_SUPPORT
700NS_OBJ
eb697db5 701TEMACS_LDFLAGS2
ce07fa9a
JV
702LD_SWITCH_X_SITE_AUX_RPATH
703LD_SWITCH_X_SITE_AUX
3de25479 704XMKMF
eb697db5
DN
705DEPFLAGS
706MKDEPDIR
3de25479
JV
707SET_MAKE
708CFLAGS_SOUND
709ALSA_LIBS
710ALSA_CFLAGS
711PKG_CONFIG
712LIBSOUND
ce07fa9a
JV
713START_FILES
714LIB_MATH
715CRT_DIR
716LIBS_SYSTEM
717C_SWITCH_SYSTEM
eb697db5 718UNEXEC_OBJ
ce07fa9a
JV
719C_SWITCH_MACHINE
720LD_SWITCH_SYSTEM
e7586c7a 721CANNOT_DUMP
3de25479
JV
722MAKEINFO
723GZIP_PROG
724INSTALL_INFO
725RANLIB
726INSTALL_DATA
727INSTALL_SCRIPT
728INSTALL_PROGRAM
e6cfa7c3 729C_WARNINGS_SWITCH
3de25479
JV
730EGREP
731GREP
732CPP
733OBJEXT
734EXEEXT
735ac_ct_CC
736CPPFLAGS
737LDFLAGS
738CFLAGS
739CC
740host_os
741host_vendor
742host_cpu
743host
744build_os
745build_vendor
746build_cpu
747build
e6cfa7c3
AS
748PROFILING_LDFLAGS
749PROFILING_CFLAGS
3de25479 750MAINT
c05c21ed 751GZIP_INFO
3de25479
JV
752target_alias
753host_alias
754build_alias
755LIBS
756ECHO_T
757ECHO_N
758ECHO_C
759DEFS
760mandir
761localedir
762libdir
763psdir
764pdfdir
765dvidir
766htmldir
767infodir
768docdir
769oldincludedir
770includedir
771localstatedir
772sharedstatedir
773sysconfdir
774datadir
775datarootdir
776libexecdir
777sbindir
778bindir
779program_transform_name
780prefix
781exec_prefix
eb697db5 782PACKAGE_URL
3de25479
JV
783PACKAGE_BUGREPORT
784PACKAGE_STRING
785PACKAGE_VERSION
786PACKAGE_TARNAME
787PACKAGE_NAME
788PATH_SEPARATOR
789SHELL'
eb697db5
DN
790ac_subst_files='deps_frag
791ns_frag'
e9a63f04
GM
792ac_user_opts='
793enable_option_checking
794with_pop
795with_kerberos
796with_kerberos5
797with_hesiod
91e84f96
GM
798with_mmdf
799with_mail_unlink
800with_mailhost
e9a63f04
GM
801with_sound
802with_sync_input
803with_x_toolkit
804with_xpm
805with_jpeg
806with_tiff
807with_gif
808with_png
809with_rsvg
3de25479 810with_imagemagick
e9a63f04
GM
811with_xft
812with_libotf
813with_m17n_flt
814with_toolkit_scroll_bars
815with_xaw3d
816with_xim
817with_ns
818with_gpm
819with_dbus
637fa988 820with_gconf
a4f64981 821with_selinux
e9a63f04 822with_makeinfo
c05c21ed 823with_compress_info
e9a63f04 824with_pkg_config_prog
a4f64981 825with_crt_dir
e9a63f04
GM
826with_gnustep_conf
827enable_ns_self_contained
828enable_asserts
829enable_maintainer_mode
830enable_locallisppath
831enable_checking
d9170db5 832enable_use_lisp_union_type
e9a63f04 833enable_profiling
a53cfbe5 834enable_autodepend
e9a63f04
GM
835enable_largefile
836with_x
837'
ca81d7a0
JD
838 ac_precious_vars='build_alias
839host_alias
840target_alias
841CC
842CFLAGS
843LDFLAGS
f053c89f 844LIBS
ca81d7a0
JD
845CPPFLAGS
846CPP
847XMKMF'
848
c0d27fcc 849
ba4481b5 850# Initialize some variables set by options.
503d2be0
AS
851ac_init_help=
852ac_init_version=false
e9a63f04
GM
853ac_unrecognized_opts=
854ac_unrecognized_sep=
ba4481b5
DL
855# The variables have the same names as the options, with
856# dashes changed to underlines.
503d2be0 857cache_file=/dev/null
ba4481b5 858exec_prefix=NONE
ba4481b5 859no_create=
ba4481b5
DL
860no_recursion=
861prefix=NONE
862program_prefix=NONE
863program_suffix=NONE
864program_transform_name=s,x,x,
865silent=
866site=
867srcdir=
ba4481b5
DL
868verbose=
869x_includes=NONE
870x_libraries=NONE
503d2be0
AS
871
872# Installation directory options.
873# These are left unexpanded so users can "make install exec_prefix=/foo"
874# and all the variables that are supposed to be based on exec_prefix
875# by default will actually change.
876# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 877# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
878bindir='${exec_prefix}/bin'
879sbindir='${exec_prefix}/sbin'
880libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
881datarootdir='${prefix}/share'
882datadir='${datarootdir}'
ba4481b5
DL
883sysconfdir='${prefix}/etc'
884sharedstatedir='${prefix}/com'
885localstatedir='${prefix}/var'
ba4481b5
DL
886includedir='${prefix}/include'
887oldincludedir='/usr/include'
9cf8f393 888docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
889infodir='${datarootdir}/info'
890htmldir='${docdir}'
891dvidir='${docdir}'
892pdfdir='${docdir}'
893psdir='${docdir}'
894libdir='${exec_prefix}/lib'
895localedir='${datarootdir}/locale'
896mandir='${datarootdir}/man'
ba4481b5 897
ba4481b5 898ac_prev=
ca81d7a0 899ac_dashdash=
ba4481b5
DL
900for ac_option
901do
ba4481b5
DL
902 # If the previous option needs an argument, assign it.
903 if test -n "$ac_prev"; then
ca81d7a0 904 eval $ac_prev=\$ac_option
ba4481b5
DL
905 ac_prev=
906 continue
907 fi
908
ca81d7a0
JD
909 case $ac_option in
910 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
911 *) ac_optarg=yes ;;
912 esac
ba4481b5
DL
913
914 # Accept the important Cygnus configure options, so we can diagnose typos.
915
ca81d7a0
JD
916 case $ac_dashdash$ac_option in
917 --)
918 ac_dashdash=yes ;;
ba4481b5
DL
919
920 -bindir | --bindir | --bindi | --bind | --bin | --bi)
921 ac_prev=bindir ;;
922 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 923 bindir=$ac_optarg ;;
ba4481b5
DL
924
925 -build | --build | --buil | --bui | --bu)
503d2be0 926 ac_prev=build_alias ;;
ba4481b5 927 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 928 build_alias=$ac_optarg ;;
ba4481b5
DL
929
930 -cache-file | --cache-file | --cache-fil | --cache-fi \
931 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
932 ac_prev=cache_file ;;
933 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
934 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
935 cache_file=$ac_optarg ;;
936
937 --config-cache | -C)
938 cache_file=config.cache ;;
ba4481b5 939
ca81d7a0 940 -datadir | --datadir | --datadi | --datad)
ba4481b5 941 ac_prev=datadir ;;
ca81d7a0 942 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 943 datadir=$ac_optarg ;;
ba4481b5 944
ca81d7a0
JD
945 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
946 | --dataroo | --dataro | --datar)
947 ac_prev=datarootdir ;;
948 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
949 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
950 datarootdir=$ac_optarg ;;
951
ba4481b5 952 -disable-* | --disable-*)
e9a63f04 953 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 954 # Reject names that are not valid shell variable names.
e9a63f04 955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
eb697db5 956 as_fn_error "invalid feature name: $ac_useropt"
e9a63f04
GM
957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=no ;;
ca81d7a0
JD
967
968 -docdir | --docdir | --docdi | --doc | --do)
969 ac_prev=docdir ;;
970 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
971 docdir=$ac_optarg ;;
972
973 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
974 ac_prev=dvidir ;;
975 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
976 dvidir=$ac_optarg ;;
ba4481b5
DL
977
978 -enable-* | --enable-*)
e9a63f04 979 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 980 # Reject names that are not valid shell variable names.
e9a63f04 981 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
eb697db5 982 as_fn_error "invalid feature name: $ac_useropt"
e9a63f04
GM
983 ac_useropt_orig=$ac_useropt
984 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
985 case $ac_user_opts in
986 *"
987"enable_$ac_useropt"
988"*) ;;
989 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
990 ac_unrecognized_sep=', ';;
991 esac
992 eval enable_$ac_useropt=\$ac_optarg ;;
ba4481b5
DL
993
994 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
995 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
996 | --exec | --exe | --ex)
997 ac_prev=exec_prefix ;;
998 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
999 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1000 | --exec=* | --exe=* | --ex=*)
503d2be0 1001 exec_prefix=$ac_optarg ;;
ba4481b5
DL
1002
1003 -gas | --gas | --ga | --g)
1004 # Obsolete; use --with-gas.
1005 with_gas=yes ;;
1006
503d2be0
AS
1007 -help | --help | --hel | --he | -h)
1008 ac_init_help=long ;;
1009 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1010 ac_init_help=recursive ;;
1011 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1012 ac_init_help=short ;;
ba4481b5
DL
1013
1014 -host | --host | --hos | --ho)
503d2be0 1015 ac_prev=host_alias ;;
ba4481b5 1016 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 1017 host_alias=$ac_optarg ;;
ba4481b5 1018
ca81d7a0
JD
1019 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1020 ac_prev=htmldir ;;
1021 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1022 | --ht=*)
1023 htmldir=$ac_optarg ;;
1024
ba4481b5
DL
1025 -includedir | --includedir | --includedi | --included | --include \
1026 | --includ | --inclu | --incl | --inc)
1027 ac_prev=includedir ;;
1028 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1029 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 1030 includedir=$ac_optarg ;;
ba4481b5
DL
1031
1032 -infodir | --infodir | --infodi | --infod | --info | --inf)
1033 ac_prev=infodir ;;
1034 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 1035 infodir=$ac_optarg ;;
ba4481b5
DL
1036
1037 -libdir | --libdir | --libdi | --libd)
1038 ac_prev=libdir ;;
1039 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 1040 libdir=$ac_optarg ;;
ba4481b5
DL
1041
1042 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1043 | --libexe | --libex | --libe)
1044 ac_prev=libexecdir ;;
1045 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1046 | --libexe=* | --libex=* | --libe=*)
503d2be0 1047 libexecdir=$ac_optarg ;;
ba4481b5 1048
ca81d7a0
JD
1049 -localedir | --localedir | --localedi | --localed | --locale)
1050 ac_prev=localedir ;;
1051 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1052 localedir=$ac_optarg ;;
1053
ba4481b5 1054 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 1055 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
1056 ac_prev=localstatedir ;;
1057 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 1058 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 1059 localstatedir=$ac_optarg ;;
ba4481b5
DL
1060
1061 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1062 ac_prev=mandir ;;
1063 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 1064 mandir=$ac_optarg ;;
ba4481b5
DL
1065
1066 -nfp | --nfp | --nf)
1067 # Obsolete; use --without-fp.
1068 with_fp=no ;;
1069
1070 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 1071 | --no-cr | --no-c | -n)
ba4481b5
DL
1072 no_create=yes ;;
1073
1074 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1075 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1076 no_recursion=yes ;;
1077
1078 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1079 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1080 | --oldin | --oldi | --old | --ol | --o)
1081 ac_prev=oldincludedir ;;
1082 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1083 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1084 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 1085 oldincludedir=$ac_optarg ;;
ba4481b5
DL
1086
1087 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1088 ac_prev=prefix ;;
1089 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 1090 prefix=$ac_optarg ;;
ba4481b5
DL
1091
1092 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1093 | --program-pre | --program-pr | --program-p)
1094 ac_prev=program_prefix ;;
1095 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1096 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 1097 program_prefix=$ac_optarg ;;
ba4481b5
DL
1098
1099 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1100 | --program-suf | --program-su | --program-s)
1101 ac_prev=program_suffix ;;
1102 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1103 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 1104 program_suffix=$ac_optarg ;;
ba4481b5
DL
1105
1106 -program-transform-name | --program-transform-name \
1107 | --program-transform-nam | --program-transform-na \
1108 | --program-transform-n | --program-transform- \
1109 | --program-transform | --program-transfor \
1110 | --program-transfo | --program-transf \
1111 | --program-trans | --program-tran \
1112 | --progr-tra | --program-tr | --program-t)
1113 ac_prev=program_transform_name ;;
1114 -program-transform-name=* | --program-transform-name=* \
1115 | --program-transform-nam=* | --program-transform-na=* \
1116 | --program-transform-n=* | --program-transform-=* \
1117 | --program-transform=* | --program-transfor=* \
1118 | --program-transfo=* | --program-transf=* \
1119 | --program-trans=* | --program-tran=* \
1120 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1121 program_transform_name=$ac_optarg ;;
ba4481b5 1122
ca81d7a0
JD
1123 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1124 ac_prev=pdfdir ;;
1125 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1126 pdfdir=$ac_optarg ;;
1127
1128 -psdir | --psdir | --psdi | --psd | --ps)
1129 ac_prev=psdir ;;
1130 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1131 psdir=$ac_optarg ;;
1132
ba4481b5
DL
1133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134 | -silent | --silent | --silen | --sile | --sil)
1135 silent=yes ;;
1136
1137 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1138 ac_prev=sbindir ;;
1139 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1140 | --sbi=* | --sb=*)
503d2be0 1141 sbindir=$ac_optarg ;;
ba4481b5
DL
1142
1143 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1144 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1145 | --sharedst | --shareds | --shared | --share | --shar \
1146 | --sha | --sh)
1147 ac_prev=sharedstatedir ;;
1148 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1149 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1150 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1151 | --sha=* | --sh=*)
503d2be0 1152 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1153
1154 -site | --site | --sit)
1155 ac_prev=site ;;
1156 -site=* | --site=* | --sit=*)
503d2be0 1157 site=$ac_optarg ;;
ba4481b5
DL
1158
1159 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1160 ac_prev=srcdir ;;
1161 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1162 srcdir=$ac_optarg ;;
ba4481b5
DL
1163
1164 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1165 | --syscon | --sysco | --sysc | --sys | --sy)
1166 ac_prev=sysconfdir ;;
1167 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1168 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1169 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1170
1171 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1172 ac_prev=target_alias ;;
ba4481b5 1173 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1174 target_alias=$ac_optarg ;;
ba4481b5
DL
1175
1176 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1177 verbose=yes ;;
1178
503d2be0
AS
1179 -version | --version | --versio | --versi | --vers | -V)
1180 ac_init_version=: ;;
ba4481b5
DL
1181
1182 -with-* | --with-*)
e9a63f04 1183 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1184 # Reject names that are not valid shell variable names.
e9a63f04 1185 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
eb697db5 1186 as_fn_error "invalid package name: $ac_useropt"
e9a63f04
GM
1187 ac_useropt_orig=$ac_useropt
1188 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1189 case $ac_user_opts in
1190 *"
1191"with_$ac_useropt"
1192"*) ;;
1193 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1194 ac_unrecognized_sep=', ';;
1195 esac
1196 eval with_$ac_useropt=\$ac_optarg ;;
ba4481b5
DL
1197
1198 -without-* | --without-*)
e9a63f04 1199 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1200 # Reject names that are not valid shell variable names.
e9a63f04 1201 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
eb697db5 1202 as_fn_error "invalid package name: $ac_useropt"
e9a63f04
GM
1203 ac_useropt_orig=$ac_useropt
1204 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1205 case $ac_user_opts in
1206 *"
1207"with_$ac_useropt"
1208"*) ;;
1209 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1210 ac_unrecognized_sep=', ';;
1211 esac
1212 eval with_$ac_useropt=no ;;
ba4481b5
DL
1213
1214 --x)
1215 # Obsolete; use --with-x.
1216 with_x=yes ;;
1217
1218 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1219 | --x-incl | --x-inc | --x-in | --x-i)
1220 ac_prev=x_includes ;;
1221 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1222 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1223 x_includes=$ac_optarg ;;
ba4481b5
DL
1224
1225 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1226 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1227 ac_prev=x_libraries ;;
1228 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1229 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1230 x_libraries=$ac_optarg ;;
ba4481b5 1231
eb697db5
DN
1232 -*) as_fn_error "unrecognized option: \`$ac_option'
1233Try \`$0 --help' for more information."
ba4481b5
DL
1234 ;;
1235
503d2be0
AS
1236 *=*)
1237 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1238 # Reject names that are not valid shell variable names.
eb697db5
DN
1239 case $ac_envvar in #(
1240 '' | [0-9]* | *[!_$as_cr_alnum]* )
1241 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1242 esac
ca81d7a0 1243 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1244 export $ac_envvar ;;
1245
ba4481b5 1246 *)
503d2be0 1247 # FIXME: should be removed in autoconf 3.0.
e9a63f04 1248 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
503d2be0 1249 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
e9a63f04 1250 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503d2be0 1251 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1252 ;;
1253
1254 esac
1255done
1256
1257if test -n "$ac_prev"; then
503d2be0 1258 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
eb697db5 1259 as_fn_error "missing argument to $ac_option"
ba4481b5 1260fi
ba4481b5 1261
e9a63f04
GM
1262if test -n "$ac_unrecognized_opts"; then
1263 case $enable_option_checking in
1264 no) ;;
eb697db5 1265 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
3de25479 1266 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
e9a63f04
GM
1267 esac
1268fi
1269
1270# Check all directory arguments for consistency.
ca81d7a0
JD
1271for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1272 datadir sysconfdir sharedstatedir localstatedir includedir \
1273 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1274 libdir localedir mandir
ba4481b5 1275do
ca81d7a0 1276 eval ac_val=\$$ac_var
e9a63f04
GM
1277 # Remove trailing slashes.
1278 case $ac_val in
1279 */ )
1280 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1281 eval $ac_var=\$ac_val;;
1282 esac
1283 # Be sure to have absolute directory names.
503d2be0 1284 case $ac_val in
ca81d7a0
JD
1285 [\\/$]* | ?:[\\/]* ) continue;;
1286 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1287 esac
eb697db5 1288 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
ba4481b5
DL
1289done
1290
503d2be0
AS
1291# There might be people who depend on the old broken behavior: `$host'
1292# used to hold the argument of --host etc.
c0d27fcc 1293# FIXME: To remove some day.
503d2be0
AS
1294build=$build_alias
1295host=$host_alias
1296target=$target_alias
1297
c0d27fcc 1298# FIXME: To remove some day.
503d2be0
AS
1299if test "x$host_alias" != x; then
1300 if test "x$build_alias" = x; then
1301 cross_compiling=maybe
e9a63f04 1302 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
503d2be0
AS
1303 If a cross compiler is detected then cross compile mode will be used." >&2
1304 elif test "x$build_alias" != "x$host_alias"; then
1305 cross_compiling=yes
1306 fi
1307fi
ba4481b5 1308
503d2be0
AS
1309ac_tool_prefix=
1310test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1311
503d2be0 1312test "$silent" = yes && exec 6>/dev/null
ba4481b5 1313
c0d27fcc 1314
ca81d7a0
JD
1315ac_pwd=`pwd` && test -n "$ac_pwd" &&
1316ac_ls_di=`ls -di .` &&
1317ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
eb697db5 1318 as_fn_error "working directory cannot be determined"
ca81d7a0 1319test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
eb697db5 1320 as_fn_error "pwd does not report name of working directory"
ca81d7a0
JD
1321
1322
ba4481b5
DL
1323# Find the source files, if location was not specified.
1324if test -z "$srcdir"; then
1325 ac_srcdir_defaulted=yes
ca81d7a0 1326 # Try the directory containing this script, then the parent directory.
e9a63f04
GM
1327 ac_confdir=`$as_dirname -- "$as_myself" ||
1328$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1329 X"$as_myself" : 'X\(//\)[^/]' \| \
1330 X"$as_myself" : 'X\(//\)$' \| \
1331 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1332$as_echo X"$as_myself" |
ca81d7a0
JD
1333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)[^/].*/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\/\)$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\).*/{
1346 s//\1/
1347 q
1348 }
1349 s/.*/./; q'`
ba4481b5 1350 srcdir=$ac_confdir
ca81d7a0 1351 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1352 srcdir=..
1353 fi
1354else
1355 ac_srcdir_defaulted=no
1356fi
ca81d7a0
JD
1357if test ! -r "$srcdir/$ac_unique_file"; then
1358 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
eb697db5 1359 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
ba4481b5 1360fi
ca81d7a0
JD
1361ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1362ac_abs_confdir=`(
eb697db5 1363 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
ca81d7a0
JD
1364 pwd)`
1365# When building in place, set srcdir=.
1366if test "$ac_abs_confdir" = "$ac_pwd"; then
1367 srcdir=.
1368fi
1369# Remove unnecessary trailing slashes from srcdir.
1370# Double slashes in file names in object file debugging info
1371# mess up M-x gdb in Emacs.
1372case $srcdir in
1373*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1374esac
1375for ac_var in $ac_precious_vars; do
1376 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1377 eval ac_env_${ac_var}_value=\$${ac_var}
1378 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1380done
503d2be0
AS
1381
1382#
1383# Report the --help message.
1384#
1385if test "$ac_init_help" = "long"; then
1386 # Omit some internal or obsolete options to make the list less imposing.
1387 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1388 cat <<_ACEOF
49a62e8a 1389\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
503d2be0
AS
1390
1391Usage: $0 [OPTION]... [VAR=VALUE]...
1392
1393To assign environment variables (e.g., CC, CFLAGS...), specify them as
1394VAR=VALUE. See below for descriptions of some of the useful variables.
1395
1396Defaults for the options are specified in brackets.
1397
1398Configuration:
1399 -h, --help display this help and exit
1400 --help=short display options specific to this package
1401 --help=recursive display the short help of all the included packages
1402 -V, --version display version information and exit
1403 -q, --quiet, --silent do not print \`checking...' messages
1404 --cache-file=FILE cache test results in FILE [disabled]
1405 -C, --config-cache alias for \`--cache-file=config.cache'
1406 -n, --no-create do not create output files
1407 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1408
503d2be0
AS
1409Installation directories:
1410 --prefix=PREFIX install architecture-independent files in PREFIX
e9a63f04 1411 [$ac_default_prefix]
503d2be0 1412 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
e9a63f04 1413 [PREFIX]
503d2be0
AS
1414
1415By default, \`make install' will install all the files in
1416\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1417an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1418for instance \`--prefix=\$HOME'.
1419
1420For better control, use the options below.
1421
1422Fine tuning of the installation directories:
e9a63f04
GM
1423 --bindir=DIR user executables [EPREFIX/bin]
1424 --sbindir=DIR system admin executables [EPREFIX/sbin]
1425 --libexecdir=DIR program executables [EPREFIX/libexec]
1426 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1427 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1428 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1429 --libdir=DIR object code libraries [EPREFIX/lib]
1430 --includedir=DIR C header files [PREFIX/include]
1431 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1432 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1433 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1434 --infodir=DIR info documentation [DATAROOTDIR/info]
1435 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1436 --mandir=DIR man documentation [DATAROOTDIR/man]
1437 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1438 --htmldir=DIR html documentation [DOCDIR]
1439 --dvidir=DIR dvi documentation [DOCDIR]
1440 --pdfdir=DIR pdf documentation [DOCDIR]
1441 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1442_ACEOF
503d2be0 1443
c0d27fcc 1444 cat <<\_ACEOF
503d2be0 1445
ba5da88a
PJ
1446Program names:
1447 --program-prefix=PREFIX prepend PREFIX to installed program names
1448 --program-suffix=SUFFIX append SUFFIX to installed program names
1449 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1450
503d2be0
AS
1451X features:
1452 --x-includes=DIR X include files are in DIR
1453 --x-libraries=DIR X library files are in DIR
1454
1455System types:
1456 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1457 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1458_ACEOF
503d2be0
AS
1459fi
1460
1461if test -n "$ac_init_help"; then
9cf8f393 1462 case $ac_init_help in
49a62e8a 1463 short | recursive ) echo "Configuration of emacs 24.0.50:";;
9cf8f393 1464 esac
c0d27fcc 1465 cat <<\_ACEOF
503d2be0
AS
1466
1467Optional Features:
e9a63f04 1468 --disable-option-checking ignore unrecognized --enable/--with options
503d2be0
AS
1469 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1470 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6b8bc489
AS
1471 --disable-ns-self-contained
1472 disable self contained build under NeXTstep
d0098f13 1473 --enable-asserts compile code with asserts enabled
709e90de
AS
1474 --enable-maintainer-mode
1475 enable make rules and dependencies not useful (and
1476 sometimes confusing) to the casual installer
9adfabc2
LK
1477 --enable-locallisppath=PATH
1478 directories Emacs should search for lisp files
1479 specific to this site
7df24305
AS
1480 --enable-checking[=LIST]
1481 enable expensive run-time checks. With LIST, enable
1482 only specific categories of checks. Categories are:
1483 all,yes,no. Flags are: stringbytes, stringoverrun,
1484 stringfreelist, xmallocoverrun, conslist
d9170db5
DN
1485 --enable-use-lisp-union-type
1486 use a union for the Lisp_Object data type. This is
1487 only useful for development for catching certain
1488 types of bugs.
7df24305
AS
1489 --enable-profiling build emacs with profiling support. This might not
1490 work on all platforms
a53cfbe5
JD
1491 --enable-autodepend automatically generate dependencies to .h-files.
1492 Requires GNU Make and Gcc. Enabled if GNU Make and
1493 Gcc is found
503d2be0
AS
1494 --disable-largefile omit support for large files
1495
1496Optional Packages:
1497 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1498 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1499 --without-pop don't support POP mail retrieval with movemail
1500 --with-kerberos support Kerberos-authenticated POP
1501 --with-kerberos5 support Kerberos version 5 authenticated POP
1502 --with-hesiod support Hesiod to get the POP server host
91e84f96
GM
1503 --with-mmdf support MMDF mailboxes
1504 --with-mail-unlink unlink, rather than empty, mail spool after reading
1505 --with-mailhost=HOSTNAME
1506 string giving default POP mail host
2c9dccc9 1507 --without-sound don't compile with sound support
ecd43cb9 1508 --without-sync-input process async input synchronously
e547b051
J
1509 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
1510 lucid or athena, motif, no)
c8467c40
GM
1511 --without-xpm don't compile with XPM image support
1512 --without-jpeg don't compile with JPEG image support
1513 --without-tiff don't compile with TIFF image support
1514 --without-gif don't compile with GIF image support
1515 --without-png don't compile with PNG image support
1516 --without-rsvg don't compile with SVG image support
3de25479 1517 --with-imagemagick compile with ImageMagick image support
4efcc8d1 1518 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1519 --without-libotf don't use libotf for OpenType font support
1520 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1521 --without-toolkit-scroll-bars
cc227489 1522 don't use Motif or Xaw3d scroll bars
c982cf7d 1523 --without-xaw3d don't use Xaw3d
cc227489 1524 --without-xim don't use X11 XIM
edfda783 1525 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1526 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1527 console
b5a922de 1528 --without-dbus don't compile with D-Bus support
637fa988 1529 --without-gconf don't compile with GConf support
a4f64981 1530 --without-selinux don't compile with SELinux support
921fbdf0 1531 --without-makeinfo don't require makeinfo for building manuals
c05c21ed 1532 --without-compress-info don't compress the installed Info pages
00b9c927 1533 --with-pkg-config-prog=PATH
ecd43cb9 1534 path to pkg-config for finding GTK and librsvg
a4f64981
GM
1535 --with-crt-dir=DIR directory containing crtn.o etc. The default is
1536 /usr/lib, or /usr/lib64 on some platforms.
ecd43cb9
GM
1537 --with-gnustep-conf=PATH
1538 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1539 or /etc/GNUstep/GNUstep.conf
503d2be0
AS
1540 --with-x use the X Window System
1541
1542Some influential environment variables:
1543 CC C compiler command
1544 CFLAGS C compiler flags
1545 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1546 nonstandard directory <lib dir>
f053c89f 1547 LIBS libraries to pass to the linker, e.g. -l<library>
eb697db5 1548 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
ca81d7a0 1549 you have headers in a nonstandard directory <include dir>
503d2be0 1550 CPP C preprocessor
ca81d7a0 1551 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1552
1553Use these variables to override the choices made by `configure' or to help
1554it to find libraries and programs with nonstandard names/locations.
1555
eb697db5 1556Report bugs to the package provider.
c0d27fcc 1557_ACEOF
ca81d7a0 1558ac_status=$?
503d2be0
AS
1559fi
1560
1561if test "$ac_init_help" = "recursive"; then
1562 # If there are subdirs, report their specific --help.
c0d27fcc 1563 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
e9a63f04
GM
1564 test -d "$ac_dir" ||
1565 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1566 continue
c0d27fcc
MR
1567 ac_builddir=.
1568
ca81d7a0
JD
1569case "$ac_dir" in
1570.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1571*)
e9a63f04 1572 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 1573 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 1574 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
1575 case $ac_top_builddir_sub in
1576 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1577 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1578 esac ;;
1579esac
1580ac_abs_top_builddir=$ac_pwd
1581ac_abs_builddir=$ac_pwd$ac_dir_suffix
1582# for backward compatibility:
1583ac_top_builddir=$ac_top_build_prefix
503d2be0 1584
c0d27fcc 1585case $srcdir in
ca81d7a0 1586 .) # We are building in place.
c0d27fcc 1587 ac_srcdir=.
ca81d7a0
JD
1588 ac_top_srcdir=$ac_top_builddir_sub
1589 ac_abs_top_srcdir=$ac_pwd ;;
1590 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1591 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1592 ac_top_srcdir=$srcdir
1593 ac_abs_top_srcdir=$srcdir ;;
1594 *) # Relative name.
1595 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1596 ac_top_srcdir=$ac_top_build_prefix$srcdir
1597 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1598esac
ca81d7a0
JD
1599ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1600
1601 cd "$ac_dir" || { ac_status=$?; continue; }
1602 # Check for guested configure.
1603 if test -f "$ac_srcdir/configure.gnu"; then
1604 echo &&
1605 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1606 elif test -f "$ac_srcdir/configure"; then
1607 echo &&
1608 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1609 else
e9a63f04 1610 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1611 fi || ac_status=$?
1612 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1613 done
1614fi
1615
ca81d7a0 1616test -n "$ac_init_help" && exit $ac_status
503d2be0 1617if $ac_init_version; then
c0d27fcc 1618 cat <<\_ACEOF
49a62e8a 1619emacs configure 24.0.50
eb697db5 1620generated by GNU Autoconf 2.65
503d2be0 1621
eb697db5 1622Copyright (C) 2009 Free Software Foundation, Inc.
503d2be0
AS
1623This configure script is free software; the Free Software Foundation
1624gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1625_ACEOF
ca81d7a0 1626 exit
503d2be0 1627fi
0ca10bb7 1628
eb697db5
DN
1629## ------------------------ ##
1630## Autoconf initialization. ##
1631## ------------------------ ##
0ca10bb7 1632
eb697db5
DN
1633# ac_fn_c_try_compile LINENO
1634# --------------------------
1635# Try to compile conftest.$ac_ext, and return whether this succeeded.
1636ac_fn_c_try_compile ()
6da23aaa 1637{
eb697db5
DN
1638 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1639 rm -f conftest.$ac_objext
1640 if { { ac_try="$ac_compile"
5929fbe7
GM
1641case "(($ac_try" in
1642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1643 *) ac_try_echo=$ac_try;;
1644esac
eb697db5
DN
1645eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1646$as_echo "$ac_try_echo"; } >&5
1647 (eval "$ac_compile") 2>conftest.err
5929fbe7 1648 ac_status=$?
eb697db5
DN
1649 if test -s conftest.err; then
1650 grep -v '^ *+' conftest.err >conftest.er1
1651 cat conftest.er1 >&5
1652 mv -f conftest.er1 conftest.err
1653 fi
1654 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1655 test $ac_status = 0; } && {
5929fbe7
GM
1656 test -z "$ac_c_werror_flag" ||
1657 test ! -s conftest.err
eb697db5
DN
1658 } && test -s conftest.$ac_objext; then :
1659 ac_retval=0
8c5ff6dd 1660else
5929fbe7
GM
1661 $as_echo "$as_me: failed program was:" >&5
1662sed 's/^/| /' conftest.$ac_ext >&5
6da23aaa 1663
eb697db5 1664 ac_retval=1
5929fbe7 1665fi
eb697db5
DN
1666 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1667 as_fn_set_status $ac_retval
503d2be0 1668
eb697db5 1669} # ac_fn_c_try_compile
c0d27fcc 1670
eb697db5
DN
1671# ac_fn_c_try_link LINENO
1672# -----------------------
1673# Try to link conftest.$ac_ext, and return whether this succeeded.
1674ac_fn_c_try_link ()
503d2be0 1675{
eb697db5
DN
1676 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1677 rm -f conftest.$ac_objext conftest$ac_exeext
1678 if { { ac_try="$ac_link"
91e84f96
GM
1679case "(($ac_try" in
1680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1681 *) ac_try_echo=$ac_try;;
1682esac
eb697db5
DN
1683eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1684$as_echo "$ac_try_echo"; } >&5
1685 (eval "$ac_link") 2>conftest.err
91e84f96 1686 ac_status=$?
eb697db5
DN
1687 if test -s conftest.err; then
1688 grep -v '^ *+' conftest.err >conftest.er1
1689 cat conftest.er1 >&5
1690 mv -f conftest.er1 conftest.err
1691 fi
1692 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1693 test $ac_status = 0; } && {
91e84f96
GM
1694 test -z "$ac_c_werror_flag" ||
1695 test ! -s conftest.err
1696 } && test -s conftest$ac_exeext && {
1697 test "$cross_compiling" = yes ||
1698 $as_test_x conftest$ac_exeext
eb697db5
DN
1699 }; then :
1700 ac_retval=0
503d2be0 1701else
91e84f96
GM
1702 $as_echo "$as_me: failed program was:" >&5
1703sed 's/^/| /' conftest.$ac_ext >&5
6da23aaa 1704
eb697db5 1705 ac_retval=1
0ca10bb7 1706fi
eb697db5
DN
1707 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1708 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1709 # interfere with the next link command; also delete a directory that is
1710 # left behind by Apple's compiler. We do this before executing the actions.
1711 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1712 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1713 as_fn_set_status $ac_retval
0ca10bb7 1714
eb697db5 1715} # ac_fn_c_try_link
6da23aaa 1716
eb697db5
DN
1717# ac_fn_c_try_cpp LINENO
1718# ----------------------
1719# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1720ac_fn_c_try_cpp ()
91e84f96 1721{
eb697db5
DN
1722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1723 if { { ac_try="$ac_cpp conftest.$ac_ext"
91e84f96
GM
1724case "(($ac_try" in
1725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1726 *) ac_try_echo=$ac_try;;
bf89cb4d 1727esac
eb697db5
DN
1728eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1729$as_echo "$ac_try_echo"; } >&5
1730 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
91e84f96 1731 ac_status=$?
eb697db5
DN
1732 if test -s conftest.err; then
1733 grep -v '^ *+' conftest.err >conftest.er1
1734 cat conftest.er1 >&5
1735 mv -f conftest.er1 conftest.err
1736 fi
1737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1738 test $ac_status = 0; } >/dev/null && {
5929fbe7 1739 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
91e84f96 1740 test ! -s conftest.err
eb697db5
DN
1741 }; then :
1742 ac_retval=0
6bae0ccf 1743else
91e84f96
GM
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
6da23aaa 1746
eb697db5 1747 ac_retval=1
6bae0ccf 1748fi
eb697db5
DN
1749 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1750 as_fn_set_status $ac_retval
6da23aaa 1751
eb697db5 1752} # ac_fn_c_try_cpp
6da23aaa 1753
eb697db5
DN
1754# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1755# -------------------------------------------------------
1756# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1757# the include files in INCLUDES and setting the cache variable VAR
1758# accordingly.
1759ac_fn_c_check_header_mongrel ()
1760{
1761 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1762 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1764$as_echo_n "checking for $2... " >&6; }
1765if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
6da23aaa 1766 $as_echo_n "(cached) " >&6
91e84f96 1767fi
eb697db5
DN
1768eval ac_res=\$$3
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
91e84f96 1770$as_echo "$ac_res" >&6; }
bf89cb4d 1771else
91e84f96 1772 # Is the header compilable?
eb697db5
DN
1773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1774$as_echo_n "checking $2 usability... " >&6; }
1775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 1776/* end confdefs.h. */
eb697db5
DN
1777$4
1778#include <$2>
91e84f96 1779_ACEOF
eb697db5 1780if ac_fn_c_try_compile "$LINENO"; then :
91e84f96 1781 ac_header_compiler=yes
6da23aaa 1782else
eb697db5 1783 ac_header_compiler=no
91e84f96 1784fi
91e84f96 1785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5 1786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
91e84f96 1787$as_echo "$ac_header_compiler" >&6; }
6da23aaa 1788
91e84f96 1789# Is the header present?
eb697db5
DN
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1791$as_echo_n "checking $2 presence... " >&6; }
1792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 1793/* end confdefs.h. */
eb697db5 1794#include <$2>
91e84f96 1795_ACEOF
eb697db5 1796if ac_fn_c_try_cpp "$LINENO"; then :
91e84f96
GM
1797 ac_header_preproc=yes
1798else
91e84f96
GM
1799 ac_header_preproc=no
1800fi
91e84f96 1801rm -f conftest.err conftest.$ac_ext
eb697db5 1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
91e84f96 1803$as_echo "$ac_header_preproc" >&6; }
6da23aaa 1804
91e84f96 1805# So? What about this header?
eb697db5 1806case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
91e84f96 1807 yes:no: )
eb697db5
DN
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1809$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1811$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
91e84f96
GM
1812 ;;
1813 no:yes:* )
eb697db5
DN
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1815$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1817$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1819$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1821$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1823$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
91e84f96
GM
1824 ;;
1825esac
eb697db5
DN
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827$as_echo_n "checking for $2... " >&6; }
1828if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
e9a63f04 1829 $as_echo_n "(cached) " >&6
98418dba 1830else
eb697db5 1831 eval "$3=\$ac_header_compiler"
6da23aaa 1832fi
eb697db5
DN
1833eval ac_res=\$$3
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
91e84f96 1835$as_echo "$ac_res" >&6; }
91e84f96 1836fi
eb697db5 1837 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
91e84f96 1838
eb697db5 1839} # ac_fn_c_check_header_mongrel
91e84f96 1840
eb697db5
DN
1841# ac_fn_c_try_run LINENO
1842# ----------------------
1843# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1844# that executables *can* be run.
1845ac_fn_c_try_run ()
6da23aaa 1846{
eb697db5
DN
1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848 if { { ac_try="$ac_link"
91e84f96
GM
1849case "(($ac_try" in
1850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1851 *) ac_try_echo=$ac_try;;
1852esac
eb697db5
DN
1853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1854$as_echo "$ac_try_echo"; } >&5
91e84f96
GM
1855 (eval "$ac_link") 2>&5
1856 ac_status=$?
eb697db5
DN
1857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1858 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1859 { { case "(($ac_try" in
91e84f96
GM
1860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1861 *) ac_try_echo=$ac_try;;
1862esac
eb697db5
DN
1863eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1864$as_echo "$ac_try_echo"; } >&5
91e84f96
GM
1865 (eval "$ac_try") 2>&5
1866 ac_status=$?
eb697db5
DN
1867 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1868 test $ac_status = 0; }; }; then :
1869 ac_retval=0
6da23aaa 1870else
91e84f96 1871 $as_echo "$as_me: program exited with status $ac_status" >&5
eb697db5 1872 $as_echo "$as_me: failed program was:" >&5
91e84f96
GM
1873sed 's/^/| /' conftest.$ac_ext >&5
1874
eb697db5 1875 ac_retval=$ac_status
b936fae4 1876fi
eb697db5
DN
1877 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1878 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1879 as_fn_set_status $ac_retval
4c343001 1880
eb697db5 1881} # ac_fn_c_try_run
b936fae4 1882
eb697db5
DN
1883# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1884# -------------------------------------------------------
1885# Tests whether HEADER exists and can be compiled using the include files in
1886# INCLUDES, setting the cache variable VAR accordingly.
1887ac_fn_c_check_header_compile ()
1888{
1889 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891$as_echo_n "checking for $2... " >&6; }
1892if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1893 $as_echo_n "(cached) " >&6
1894else
1895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896/* end confdefs.h. */
1897$4
1898#include <$2>
91e84f96 1899_ACEOF
eb697db5
DN
1900if ac_fn_c_try_compile "$LINENO"; then :
1901 eval "$3=yes"
1902else
1903 eval "$3=no"
91e84f96 1904fi
eb697db5 1905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 1906fi
eb697db5
DN
1907eval ac_res=\$$3
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5929fbe7 1909$as_echo "$ac_res" >&6; }
eb697db5 1910 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
91e84f96 1911
eb697db5 1912} # ac_fn_c_check_header_compile
91e84f96 1913
eb697db5
DN
1914# ac_fn_c_check_decl LINENO SYMBOL VAR
1915# ------------------------------------
1916# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
1917ac_fn_c_check_decl ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
1921$as_echo_n "checking whether $2 is declared... " >&6; }
1922if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
bf89cb4d
GM
1923 $as_echo_n "(cached) " >&6
1924else
eb697db5 1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 1926/* end confdefs.h. */
eb697db5 1927$4
0ca10bb7
RC
1928int
1929main ()
1930{
eb697db5
DN
1931#ifndef $2
1932 (void) $2;
1933#endif
e6df49e4 1934
0ca10bb7
RC
1935 ;
1936 return 0;
1937}
c0d27fcc 1938_ACEOF
eb697db5
DN
1939if ac_fn_c_try_compile "$LINENO"; then :
1940 eval "$3=yes"
91e84f96 1941else
eb697db5 1942 eval "$3=no"
91e84f96 1943fi
eb697db5 1944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf89cb4d 1945fi
eb697db5
DN
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
1949 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
52dbaac8 1950
eb697db5 1951} # ac_fn_c_check_decl
52dbaac8 1952
eb697db5
DN
1953# ac_fn_c_check_header_preproc LINENO HEADER VAR
1954# ----------------------------------------------
1955# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1956ac_fn_c_check_header_preproc ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1960$as_echo_n "checking for $2... " >&6; }
1961if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1962 $as_echo_n "(cached) " >&6
1963else
1964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1965/* end confdefs.h. */
1966#include <$2>
1967_ACEOF
1968if ac_fn_c_try_cpp "$LINENO"; then :
1969 eval "$3=yes"
1970else
1971 eval "$3=no"
bf89cb4d 1972fi
eb697db5
DN
1973rm -f conftest.err conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
1978 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
52dbaac8 1979
eb697db5 1980} # ac_fn_c_check_header_preproc
52dbaac8 1981
eb697db5
DN
1982# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1983# ----------------------------------------------------
1984# Tries to find if the field MEMBER exists in type AGGR, after including
1985# INCLUDES, setting cache variable VAR accordingly.
1986ac_fn_c_check_member ()
1987{
1988 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1990$as_echo_n "checking for $2.$3... " >&6; }
1991if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
e9a63f04 1992 $as_echo_n "(cached) " >&6
52dbaac8 1993else
eb697db5
DN
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$5
1997int
1998main ()
1999{
2000static $2 ac_aggr;
2001if (ac_aggr.$3)
2002return 0;
2003 ;
2004 return 0;
2005}
91e84f96 2006_ACEOF
eb697db5
DN
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 eval "$4=yes"
2009else
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 2011/* end confdefs.h. */
eb697db5 2012$5
6da23aaa
EZ
2013int
2014main ()
2015{
eb697db5
DN
2016static $2 ac_aggr;
2017if (sizeof ac_aggr.$3)
2018return 0;
6da23aaa
EZ
2019 ;
2020 return 0;
2021}
2022_ACEOF
eb697db5
DN
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 eval "$4=yes"
bf89cb4d 2025else
eb697db5 2026 eval "$4=no"
bf89cb4d 2027fi
eb697db5 2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6da23aaa 2029fi
eb697db5 2030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6da23aaa 2031fi
eb697db5
DN
2032eval ac_res=\$$4
2033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2034$as_echo "$ac_res" >&6; }
2035 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
bf89cb4d 2036
eb697db5 2037} # ac_fn_c_check_member
6da23aaa 2038
eb697db5
DN
2039# ac_fn_c_check_func LINENO FUNC VAR
2040# ----------------------------------
2041# Tests whether FUNC exists, setting the cache variable VAR accordingly
2042ac_fn_c_check_func ()
2043{
2044 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2046$as_echo_n "checking for $2... " >&6; }
2047if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
6da23aaa
EZ
2048 $as_echo_n "(cached) " >&6
2049else
eb697db5 2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 2051/* end confdefs.h. */
eb697db5
DN
2052/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2053 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2054#define $2 innocuous_$2
2055
2056/* System header to define __stub macros and hopefully few prototypes,
2057 which can conflict with char $2 (); below.
2058 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2059 <limits.h> exists even on freestanding compilers. */
2060
2061#ifdef __STDC__
2062# include <limits.h>
2063#else
2064# include <assert.h>
2065#endif
2066
2067#undef $2
52dbaac8 2068
0ca10bb7
RC
2069/* Override any GCC internal prototype to avoid an error.
2070 Use char because int might match the return type of a GCC
2071 builtin and then its argument prototype would still apply. */
2072#ifdef __cplusplus
2073extern "C"
52dbaac8 2074#endif
eb697db5
DN
2075char $2 ();
2076/* The GNU C library defines this for functions which it implements
2077 to always fail with ENOSYS. Some functions are actually named
2078 something starting with __ and the normal name is an alias. */
2079#if defined __stub_$2 || defined __stub___$2
2080choke me
2081#endif
2082
0ca10bb7
RC
2083int
2084main ()
2085{
eb697db5 2086return $2 ();
0ca10bb7
RC
2087 ;
2088 return 0;
2089}
2090_ACEOF
eb697db5
DN
2091if ac_fn_c_try_link "$LINENO"; then :
2092 eval "$3=yes"
0ca10bb7 2093else
eb697db5
DN
2094 eval "$3=no"
2095fi
2096rm -f core conftest.err conftest.$ac_objext \
2097 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 2098fi
eb697db5
DN
2099eval ac_res=\$$3
2100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2101$as_echo "$ac_res" >&6; }
2102 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
91e84f96 2103
eb697db5
DN
2104} # ac_fn_c_check_func
2105
2106# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2107# -------------------------------------------
2108# Tests whether TYPE exists after having included INCLUDES, setting cache
2109# variable VAR accordingly.
2110ac_fn_c_check_type ()
2111{
2112 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2114$as_echo_n "checking for $2... " >&6; }
2115if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2116 $as_echo_n "(cached) " >&6
2117else
2118 eval "$3=no"
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125if (sizeof ($2))
2126 return 0;
2127 ;
2128 return 0;
2129}
2130_ACEOF
2131if ac_fn_c_try_compile "$LINENO"; then :
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138if (sizeof (($2)))
2139 return 0;
2140 ;
2141 return 0;
2142}
2143_ACEOF
2144if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 2145
eb697db5
DN
2146else
2147 eval "$3=yes"
0ca10bb7 2148fi
eb697db5
DN
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 2152fi
eb697db5
DN
2153eval ac_res=\$$3
2154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2155$as_echo "$ac_res" >&6; }
2156 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2157
2158} # ac_fn_c_check_type
2159cat >config.log <<_ACEOF
2160This file contains any messages produced by compilers while
2161running configure, to aid debugging if configure makes a mistake.
2162
2163It was created by emacs $as_me 24.0.50, which was
2164generated by GNU Autoconf 2.65. Invocation command line was
2165
2166 $ $0 $@
2167
91e84f96 2168_ACEOF
eb697db5
DN
2169exec 5>>config.log
2170{
2171cat <<_ASUNAME
2172## --------- ##
2173## Platform. ##
2174## --------- ##
91e84f96 2175
eb697db5
DN
2176hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2177uname -m = `(uname -m) 2>/dev/null || echo unknown`
2178uname -r = `(uname -r) 2>/dev/null || echo unknown`
2179uname -s = `(uname -s) 2>/dev/null || echo unknown`
2180uname -v = `(uname -v) 2>/dev/null || echo unknown`
91e84f96 2181
eb697db5
DN
2182/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2183/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2184
2185/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2186/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2187/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2188/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2189/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2190/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2191/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
bf89cb4d 2192
eb697db5 2193_ASUNAME
bf89cb4d 2194
eb697db5
DN
2195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2196for as_dir in $PATH
2197do
2198 IFS=$as_save_IFS
2199 test -z "$as_dir" && as_dir=.
2200 $as_echo "PATH: $as_dir"
2201 done
2202IFS=$as_save_IFS
1f8162fe 2203
eb697db5 2204} >&5
bf89cb4d 2205
eb697db5 2206cat >&5 <<_ACEOF
91e84f96 2207
eb697db5
DN
2208
2209## ----------- ##
2210## Core tests. ##
2211## ----------- ##
2212
2213_ACEOF
2214
2215
2216# Keep a trace of the command line.
2217# Strip out --no-create and --no-recursion so they do not pile up.
2218# Strip out --silent because we don't want to record it for future runs.
2219# Also quote any args containing shell meta-characters.
2220# Make two passes to allow for proper duplicate-argument suppression.
2221ac_configure_args=
2222ac_configure_args0=
2223ac_configure_args1=
2224ac_must_keep_next=false
2225for ac_pass in 1 2
2226do
2227 for ac_arg
2228 do
2229 case $ac_arg in
2230 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2231 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2232 | -silent | --silent | --silen | --sile | --sil)
2233 continue ;;
2234 *\'*)
2235 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2236 esac
2237 case $ac_pass in
2238 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2239 2)
2240 as_fn_append ac_configure_args1 " '$ac_arg'"
2241 if test $ac_must_keep_next = true; then
2242 ac_must_keep_next=false # Got value, back to normal.
2243 else
2244 case $ac_arg in
2245 *=* | --config-cache | -C | -disable-* | --disable-* \
2246 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2247 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2248 | -with-* | --with-* | -without-* | --without-* | --x)
2249 case "$ac_configure_args0 " in
2250 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2251 esac
2252 ;;
2253 -* ) ac_must_keep_next=true ;;
2254 esac
2255 fi
2256 as_fn_append ac_configure_args " '$ac_arg'"
2257 ;;
91e84f96 2258 esac
eb697db5
DN
2259 done
2260done
2261{ ac_configure_args0=; unset ac_configure_args0;}
2262{ ac_configure_args1=; unset ac_configure_args1;}
91e84f96 2263
eb697db5
DN
2264# When interrupted or exit'd, cleanup temporary files, and complete
2265# config.log. We remove comments because anyway the quotes in there
2266# would cause problems or look ugly.
2267# WARNING: Use '\'' to represent an apostrophe within the trap.
2268# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2269trap 'exit_status=$?
2270 # Save into config.log some information that might help in debugging.
2271 {
2272 echo
91e84f96 2273
eb697db5
DN
2274 cat <<\_ASBOX
2275## ---------------- ##
2276## Cache variables. ##
2277## ---------------- ##
2278_ASBOX
2279 echo
2280 # The following way of writing the cache mishandles newlines in values,
2281(
2282 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2283 eval ac_val=\$$ac_var
2284 case $ac_val in #(
2285 *${as_nl}*)
2286 case $ac_var in #(
2287 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2288$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2289 esac
2290 case $ac_var in #(
2291 _ | IFS | as_nl) ;; #(
2292 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2293 *) { eval $ac_var=; unset $ac_var;} ;;
2294 esac ;;
2295 esac
2296 done
2297 (set) 2>&1 |
2298 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2299 *${as_nl}ac_space=\ *)
2300 sed -n \
2301 "s/'\''/'\''\\\\'\'''\''/g;
2302 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2303 ;; #(
2304 *)
2305 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2306 ;;
2307 esac |
2308 sort
2309)
2310 echo
91e84f96 2311
eb697db5
DN
2312 cat <<\_ASBOX
2313## ----------------- ##
2314## Output variables. ##
2315## ----------------- ##
2316_ASBOX
2317 echo
2318 for ac_var in $ac_subst_vars
2319 do
2320 eval ac_val=\$$ac_var
2321 case $ac_val in
2322 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2323 esac
2324 $as_echo "$ac_var='\''$ac_val'\''"
2325 done | sort
2326 echo
bf89cb4d 2327
eb697db5
DN
2328 if test -n "$ac_subst_files"; then
2329 cat <<\_ASBOX
2330## ------------------- ##
2331## File substitutions. ##
2332## ------------------- ##
2333_ASBOX
2334 echo
2335 for ac_var in $ac_subst_files
2336 do
2337 eval ac_val=\$$ac_var
2338 case $ac_val in
2339 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2340 esac
2341 $as_echo "$ac_var='\''$ac_val'\''"
2342 done | sort
2343 echo
2344 fi
bf89cb4d 2345
eb697db5
DN
2346 if test -s confdefs.h; then
2347 cat <<\_ASBOX
2348## ----------- ##
2349## confdefs.h. ##
2350## ----------- ##
2351_ASBOX
2352 echo
2353 cat confdefs.h
2354 echo
2355 fi
2356 test "$ac_signal" != 0 &&
2357 $as_echo "$as_me: caught signal $ac_signal"
2358 $as_echo "$as_me: exit $exit_status"
2359 } >&5
2360 rm -f core *.core core.conftest.* &&
2361 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2362 exit $exit_status
2363' 0
2364for ac_signal in 1 2 13 15; do
2365 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2366done
2367ac_signal=0
6da23aaa 2368
eb697db5
DN
2369# confdefs.h avoids OS command line length limits that DEFS can exceed.
2370rm -f -r conftest* confdefs.h
6da23aaa 2371
eb697db5 2372$as_echo "/* confdefs.h */" > confdefs.h
6da23aaa 2373
eb697db5 2374# Predefined preprocessor variables.
6da23aaa 2375
eb697db5
DN
2376cat >>confdefs.h <<_ACEOF
2377#define PACKAGE_NAME "$PACKAGE_NAME"
5929fbe7 2378_ACEOF
bf89cb4d 2379
eb697db5
DN
2380cat >>confdefs.h <<_ACEOF
2381#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
91e84f96 2382_ACEOF
bf89cb4d 2383
eb697db5
DN
2384cat >>confdefs.h <<_ACEOF
2385#define PACKAGE_VERSION "$PACKAGE_VERSION"
6da23aaa 2386_ACEOF
bf89cb4d 2387
eb697db5
DN
2388cat >>confdefs.h <<_ACEOF
2389#define PACKAGE_STRING "$PACKAGE_STRING"
5929fbe7 2390_ACEOF
bf89cb4d 2391
eb697db5
DN
2392cat >>confdefs.h <<_ACEOF
2393#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
91e84f96 2394_ACEOF
91e84f96 2395
eb697db5
DN
2396cat >>confdefs.h <<_ACEOF
2397#define PACKAGE_URL "$PACKAGE_URL"
91e84f96 2398_ACEOF
91e84f96 2399
8c5ff6dd 2400
eb697db5
DN
2401# Let the site file select an alternate cache file if it wants to.
2402# Prefer an explicitly selected file to automatically selected ones.
2403ac_site_file1=NONE
2404ac_site_file2=NONE
2405if test -n "$CONFIG_SITE"; then
2406 ac_site_file1=$CONFIG_SITE
2407elif test "x$prefix" != xNONE; then
2408 ac_site_file1=$prefix/share/config.site
2409 ac_site_file2=$prefix/etc/config.site
2410else
2411 ac_site_file1=$ac_default_prefix/share/config.site
2412 ac_site_file2=$ac_default_prefix/etc/config.site
91e84f96 2413fi
eb697db5
DN
2414for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2415do
2416 test "x$ac_site_file" = xNONE && continue
2417 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2418 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2419$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2420 sed 's/^/| /' "$ac_site_file" >&5
2421 . "$ac_site_file"
2422 fi
2423done
91e84f96 2424
eb697db5
DN
2425if test -r "$cache_file"; then
2426 # Some versions of bash will fail to source /dev/null (special files
2427 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2428 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2429 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2430$as_echo "$as_me: loading cache $cache_file" >&6;}
2431 case $cache_file in
2432 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2433 *) . "./$cache_file";;
2434 esac
91e84f96 2435 fi
91e84f96 2436else
eb697db5
DN
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2438$as_echo "$as_me: creating cache $cache_file" >&6;}
2439 >$cache_file
2440fi
91e84f96 2441
eb697db5
DN
2442as_fn_append ac_header_list " stdlib.h"
2443as_fn_append ac_header_list " unistd.h"
2444as_fn_append ac_header_list " sys/param.h"
2445as_fn_append ac_header_list " sys/time.h"
2446as_fn_append ac_func_list " alarm"
2447# Check that the precious variables saved in the cache have kept the same
2448# value.
2449ac_cache_corrupted=false
2450for ac_var in $ac_precious_vars; do
2451 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2452 eval ac_new_set=\$ac_env_${ac_var}_set
2453 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2454 eval ac_new_val=\$ac_env_${ac_var}_value
2455 case $ac_old_set,$ac_new_set in
2456 set,)
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2458$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2459 ac_cache_corrupted=: ;;
2460 ,set)
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2462$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2463 ac_cache_corrupted=: ;;
2464 ,);;
2465 *)
2466 if test "x$ac_old_val" != "x$ac_new_val"; then
2467 # differences in whitespace do not lead to failure.
2468 ac_old_val_w=`echo x $ac_old_val`
2469 ac_new_val_w=`echo x $ac_new_val`
2470 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2472$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2473 ac_cache_corrupted=:
2474 else
2475 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2476$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2477 eval $ac_var=\$ac_old_val
2478 fi
2479 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2480$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2481 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2482$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2483 fi;;
2484 esac
2485 # Pass precious variables to config.status.
2486 if test "$ac_new_set" = set; then
2487 case $ac_new_val in
2488 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2489 *) ac_arg=$ac_var=$ac_new_val ;;
2490 esac
2491 case " $ac_configure_args " in
2492 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2493 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
8c5ff6dd 2494 esac
eb697db5
DN
2495 fi
2496done
2497if $ac_cache_corrupted; then
2498 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2500 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2501$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2502 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
91e84f96 2503fi
eb697db5
DN
2504## -------------------- ##
2505## Main body of script. ##
2506## -------------------- ##
91e84f96 2507
eb697db5
DN
2508ac_ext=c
2509ac_cpp='$CPP $CPPFLAGS'
2510ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2511ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2512ac_compiler_gnu=$ac_cv_c_compiler_gnu
91e84f96 2513
91e84f96 2514
eb697db5 2515ac_config_headers="$ac_config_headers src/config.h:src/config.in"
91e84f96
GM
2516
2517
2518
eb697db5
DN
2519test "$program_prefix" != NONE &&
2520 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2521# Use a double $ so make ignores it.
2522test "$program_suffix" != NONE &&
2523 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2524# Double any \ or $.
2525# By default was `s,x,x', remove it if useless.
2526ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2527program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
91e84f96
GM
2528
2529
eb697db5
DN
2530lispdir='${datadir}/emacs/${version}/lisp'
2531locallisppath='${datadir}/emacs/${version}/site-lisp:'\
2532'${datadir}/emacs/site-lisp'
2533lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
2534etcdir='${datadir}/emacs/${version}/etc'
2535archlibdir='${libexecdir}/emacs/${version}/${configuration}'
2536docdir='${datadir}/emacs/${version}/etc'
2537gamedir='${localstatedir}/games/emacs'
91e84f96 2538
eb697db5 2539gameuser=games
91e84f96 2540
91e84f96 2541
91e84f96 2542
91e84f96 2543
eb697db5
DN
2544# Check whether --with-pop was given.
2545if test "${with_pop+set}" = set; then :
2546 withval=$with_pop;
91e84f96 2547else
eb697db5 2548 with_pop=yes
91e84f96 2549fi
91e84f96 2550
eb697db5
DN
2551if test "$with_pop" = yes; then
2552 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
91e84f96
GM
2553
2554fi
6da23aaa 2555
91e84f96 2556
eb697db5
DN
2557# Check whether --with-kerberos was given.
2558if test "${with_kerberos+set}" = set; then :
2559 withval=$with_kerberos;
91e84f96 2560else
eb697db5 2561 with_kerberos=no
91e84f96
GM
2562fi
2563
eb697db5
DN
2564if test "$with_kerberos" != no; then
2565 $as_echo "#define KERBEROS 1" >>confdefs.h
bf89cb4d 2566
52dbaac8 2567fi
52dbaac8 2568
52dbaac8 2569
eb697db5
DN
2570# Check whether --with-kerberos5 was given.
2571if test "${with_kerberos5+set}" = set; then :
2572 withval=$with_kerberos5;
5929fbe7 2573else
eb697db5 2574 with_kerberos5=no
a4f64981 2575fi
0ca10bb7 2576
eb697db5
DN
2577if test "${with_kerberos5}" != no; then
2578 if test "${with_kerberos}" = no; then
2579 with_kerberos=yes
2580 $as_echo "#define KERBEROS 1" >>confdefs.h
6da23aaa 2581
6da23aaa 2582 fi
0ca10bb7 2583
eb697db5 2584$as_echo "#define KERBEROS5 1" >>confdefs.h
a4f64981 2585
bf89cb4d 2586fi
0ca10bb7
RC
2587
2588
eb697db5
DN
2589# Check whether --with-hesiod was given.
2590if test "${with_hesiod+set}" = set; then :
2591 withval=$with_hesiod;
49ebbd65 2592else
eb697db5
DN
2593 with_hesiod=no
2594fi
bf89cb4d 2595
eb697db5 2596if test "$with_hesiod" != no; then
0ca10bb7 2597
eb697db5 2598$as_echo "#define HESIOD 1" >>confdefs.h
0ca10bb7 2599
eb697db5 2600fi
0ca10bb7 2601
0ca10bb7 2602
eb697db5
DN
2603# Check whether --with-mmdf was given.
2604if test "${with_mmdf+set}" = set; then :
2605 withval=$with_mmdf;
8c5ff6dd 2606else
eb697db5 2607 with_mmdf=no
15e12598 2608fi
0ca10bb7 2609
eb697db5 2610if test "$with_mmdf" != no; then
bf89cb4d 2611
eb697db5 2612$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
52dbaac8 2613
8c5ff6dd 2614fi
0ca10bb7 2615
0ca10bb7 2616
eb697db5
DN
2617# Check whether --with-mail-unlink was given.
2618if test "${with_mail_unlink+set}" = set; then :
2619 withval=$with_mail_unlink;
8c5ff6dd 2620else
eb697db5 2621 with_mail_unlink=no
8c5ff6dd 2622fi
0ca10bb7 2623
eb697db5 2624if test "$with_mail_unlink" != no; then
91e84f96 2625
eb697db5
DN
2626$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
2627
8c5ff6dd 2628fi
91e84f96 2629
91e84f96 2630
eb697db5
DN
2631# Check whether --with-mailhost was given.
2632if test "${with_mailhost+set}" = set; then :
2633 withval=$with_mailhost;
2634cat >>confdefs.h <<_ACEOF
2635#define MAILHOST "$withval"
91e84f96
GM
2636_ACEOF
2637
91e84f96
GM
2638fi
2639
3de25479 2640
3de25479 2641
eb697db5
DN
2642# Check whether --with-sound was given.
2643if test "${with_sound+set}" = set; then :
2644 withval=$with_sound;
3de25479 2645else
eb697db5 2646 with_sound=yes
3de25479
JV
2647fi
2648
2649
2650
eb697db5
DN
2651# Check whether --with-sync-input was given.
2652if test "${with_sync_input+set}" = set; then :
2653 withval=$with_sync_input;
8c5ff6dd 2654else
eb697db5 2655 with_sync_input=yes
8c5ff6dd 2656fi
3de25479 2657
eb697db5 2658if test "$with_sync_input" = yes; then
3de25479 2659
eb697db5 2660$as_echo "#define SYNC_INPUT 1" >>confdefs.h
3de25479 2661
eb697db5 2662fi
3de25479 2663
3de25479 2664
eb697db5
DN
2665# Check whether --with-x-toolkit was given.
2666if test "${with_x_toolkit+set}" = set; then :
2667 withval=$with_x_toolkit; case "${withval}" in
2668 y | ye | yes ) val=gtk ;;
2669 n | no ) val=no ;;
2670 l | lu | luc | luci | lucid ) val=lucid ;;
2671 a | at | ath | athe | athen | athena ) val=athena ;;
2672 m | mo | mot | moti | motif ) val=motif ;;
2673 g | gt | gtk ) val=gtk ;;
e547b051 2674 gtk3 ) val=gtk3 ;;
eb697db5
DN
2675 * )
2676as_fn_error "\`--with-x-toolkit=$withval' is invalid;
e547b051
J
2677this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
2678\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
eb697db5
DN
2679 ;;
2680 esac
2681 with_x_toolkit=$val
3de25479 2682
eb697db5 2683fi
3de25479 2684
3de25479 2685
3de25479 2686
eb697db5
DN
2687# Check whether --with-xpm was given.
2688if test "${with_xpm+set}" = set; then :
2689 withval=$with_xpm;
2690else
2691 with_xpm=yes
2692fi
3de25479
JV
2693
2694
eb697db5
DN
2695# Check whether --with-jpeg was given.
2696if test "${with_jpeg+set}" = set; then :
2697 withval=$with_jpeg;
2698else
2699 with_jpeg=yes
2700fi
3de25479 2701
3de25479 2702
eb697db5
DN
2703# Check whether --with-tiff was given.
2704if test "${with_tiff+set}" = set; then :
2705 withval=$with_tiff;
2706else
2707 with_tiff=yes
2708fi
3de25479 2709
431dab04 2710
eb697db5
DN
2711# Check whether --with-gif was given.
2712if test "${with_gif+set}" = set; then :
2713 withval=$with_gif;
2714else
2715 with_gif=yes
2716fi
431dab04 2717
431dab04 2718
eb697db5
DN
2719# Check whether --with-png was given.
2720if test "${with_png+set}" = set; then :
2721 withval=$with_png;
2722else
2723 with_png=yes
8c5ff6dd 2724fi
431dab04
JV
2725
2726
eb697db5
DN
2727# Check whether --with-rsvg was given.
2728if test "${with_rsvg+set}" = set; then :
2729 withval=$with_rsvg;
2730else
2731 with_rsvg=yes
2732fi
431dab04
JV
2733
2734
c05c21ed
JV
2735# Check whether --with-imagemagick was given.
2736if test "${with_imagemagick+set}" = set; then :
2737 withval=$with_imagemagick;
431dab04 2738else
c05c21ed
JV
2739 with_imagemagick=no
2740fi
431dab04 2741
431dab04 2742
431dab04 2743
eb697db5
DN
2744# Check whether --with-xft was given.
2745if test "${with_xft+set}" = set; then :
2746 withval=$with_xft;
8c5ff6dd 2747else
eb697db5 2748 with_xft=yes
8c5ff6dd 2749fi
431dab04 2750
431dab04 2751
eb697db5
DN
2752# Check whether --with-libotf was given.
2753if test "${with_libotf+set}" = set; then :
2754 withval=$with_libotf;
431dab04 2755else
eb697db5 2756 with_libotf=yes
431dab04
JV
2757fi
2758
431dab04 2759
eb697db5
DN
2760# Check whether --with-m17n-flt was given.
2761if test "${with_m17n_flt+set}" = set; then :
2762 withval=$with_m17n_flt;
2763else
2764 with_m17n_flt=yes
431dab04 2765fi
431dab04
JV
2766
2767
2768
eb697db5
DN
2769# Check whether --with-toolkit-scroll-bars was given.
2770if test "${with_toolkit_scroll_bars+set}" = set; then :
2771 withval=$with_toolkit_scroll_bars;
2772else
2773 with_toolkit_scroll_bars=yes
2774fi
431dab04
JV
2775
2776
eb697db5
DN
2777# Check whether --with-xaw3d was given.
2778if test "${with_xaw3d+set}" = set; then :
2779 withval=$with_xaw3d;
2780else
2781 with_xaw3d=yes
2782fi
431dab04
JV
2783
2784
eb697db5
DN
2785# Check whether --with-xim was given.
2786if test "${with_xim+set}" = set; then :
2787 withval=$with_xim;
2788else
2789 with_xim=yes
2790fi
431dab04
JV
2791
2792
eb697db5
DN
2793# Check whether --with-ns was given.
2794if test "${with_ns+set}" = set; then :
2795 withval=$with_ns;
2796else
2797 with_ns=no
3de25479 2798fi
91e84f96 2799
a4f64981 2800
0ca10bb7 2801
eb697db5
DN
2802# Check whether --with-gpm was given.
2803if test "${with_gpm+set}" = set; then :
2804 withval=$with_gpm;
2805else
2806 with_gpm=yes
8c5ff6dd 2807fi
0ca10bb7 2808
0ca10bb7 2809
eb697db5
DN
2810# Check whether --with-dbus was given.
2811if test "${with_dbus+set}" = set; then :
2812 withval=$with_dbus;
bf89cb4d 2813else
eb697db5 2814 with_dbus=yes
bf89cb4d 2815fi
5929fbe7
GM
2816
2817
eb697db5
DN
2818# Check whether --with-gconf was given.
2819if test "${with_gconf+set}" = set; then :
2820 withval=$with_gconf;
6da23aaa 2821else
eb697db5 2822 with_gconf=yes
bf89cb4d 2823fi
52dbaac8 2824
0ca10bb7 2825
eb697db5
DN
2826# Check whether --with-selinux was given.
2827if test "${with_selinux+set}" = set; then :
2828 withval=$with_selinux;
8c5ff6dd 2829else
eb697db5
DN
2830 with_selinux=yes
2831fi
0ca10bb7 2832
0ca10bb7 2833
eb697db5
DN
2834## For the times when you want to build Emacs but don't have
2835## a suitable makeinfo, and can live without the manuals.
bf89cb4d 2836
eb697db5
DN
2837# Check whether --with-makeinfo was given.
2838if test "${with_makeinfo+set}" = set; then :
2839 withval=$with_makeinfo;
2840else
2841 with_makeinfo=yes
2842fi
52dbaac8 2843
bf89cb4d 2844
c05c21ed
JV
2845## This is an option because I do not know if all info/man support
2846## compressed files, nor how to test if they do so.
52dbaac8 2847
c05c21ed
JV
2848# Check whether --with-compress-info was given.
2849if test "${with_compress_info+set}" = set; then :
2850 withval=$with_compress_info;
2851else
2852 with_compress_info=yes
2853fi
2854
2855if test $with_compress_info = yes; then
2856 GZIP_INFO=yes
2857else
2858 GZIP_INFO=
2859fi
52dbaac8 2860
0ca10bb7 2861
0ca10bb7 2862
eb697db5
DN
2863# Check whether --with-pkg-config-prog was given.
2864if test "${with_pkg_config_prog+set}" = set; then :
2865 withval=$with_pkg_config_prog;
8c5ff6dd 2866fi
0ca10bb7 2867
eb697db5
DN
2868if test "X${with_pkg_config_prog}" != X; then
2869 if test "${with_pkg_config_prog}" != yes; then
2870 PKG_CONFIG="${with_pkg_config_prog}"
2871 fi
91e84f96
GM
2872fi
2873
eb697db5 2874CRT_DIR=
91e84f96 2875
eb697db5
DN
2876# Check whether --with-crt-dir was given.
2877if test "${with_crt_dir+set}" = set; then :
2878 withval=$with_crt_dir;
2879fi
91e84f96 2880
eb697db5 2881CRT_DIR="${with_crt_dir}"
91e84f96
GM
2882
2883
eb697db5
DN
2884# Check whether --with-gnustep-conf was given.
2885if test "${with_gnustep_conf+set}" = set; then :
2886 withval=$with_gnustep_conf;
15e12598 2887fi
91e84f96 2888
eb697db5
DN
2889test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2890 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2891test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2892 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
e6df49e4 2893
eb697db5
DN
2894# Check whether --enable-ns-self-contained was given.
2895if test "${enable_ns_self_contained+set}" = set; then :
2896 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
52dbaac8 2897else
eb697db5
DN
2898 EN_NS_SELF_CONTAINED=yes
2899fi
91e84f96 2900
91e84f96 2901
eb697db5
DN
2902# Check whether --enable-asserts was given.
2903if test "${enable_asserts+set}" = set; then :
2904 enableval=$enable_asserts; USE_XASSERTS=$enableval
2905else
2906 USE_XASSERTS=no
2907fi
91e84f96 2908
52dbaac8 2909
eb697db5
DN
2910# Check whether --enable-maintainer-mode was given.
2911if test "${enable_maintainer_mode+set}" = set; then :
2912 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
5929fbe7 2913else
eb697db5
DN
2914 USE_MAINTAINER_MODE=no
2915fi
91e84f96 2916
eb697db5
DN
2917if test $USE_MAINTAINER_MODE = yes; then
2918 MAINT=
0ca10bb7 2919else
eb697db5
DN
2920 MAINT=#
2921fi
91e84f96 2922
5929fbe7 2923
eb697db5
DN
2924# Check whether --enable-locallisppath was given.
2925if test "${enable_locallisppath+set}" = set; then :
2926 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
2927 locallisppath=
2928elif test "${enableval}" != "yes"; then
2929 locallisppath=${enableval}
6da23aaa 2930fi
eb697db5 2931fi
5929fbe7 2932
91e84f96 2933
eb697db5
DN
2934# Check whether --enable-checking was given.
2935if test "${enable_checking+set}" = set; then :
2936 enableval=$enable_checking; ac_checking_flags="${enableval}"
6da23aaa 2937fi
eb697db5
DN
2938
2939IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2940for check in $ac_checking_flags
2941do
2942 case $check in
2943 # these set all the flags to specific states
2944 yes) ac_enable_checking=1 ;;
2945 no) ac_enable_checking= ;
2946 ac_gc_check_stringbytes= ;
2947 ac_gc_check_string_overrun= ;
2948 ac_gc_check_string_free_list= ;
2949 ac_xmalloc_overrun= ;
2950 ac_gc_check_cons_list= ;;
2951 all) ac_enable_checking=1 ;
2952 ac_gc_check_stringbytes=1 ;
2953 ac_gc_check_string_overrun=1 ;
2954 ac_gc_check_string_free_list=1 ;
2955 ac_xmalloc_overrun=1 ;
2956 ac_gc_check_cons_list=1 ;;
2957 # these enable particular checks
2958 stringbytes) ac_gc_check_stringbytes=1 ;;
2959 stringoverrun) ac_gc_check_string_overrun=1 ;;
2960 stringfreelist) ac_gc_check_string_free_list=1 ;;
2961 xmallocoverrun) ac_xmalloc_overrun=1 ;;
2962 conslist) ac_gc_check_cons_list=1 ;;
2963 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
2964 esac
2965done
2966IFS="$ac_save_IFS"
2967
2968if test x$ac_enable_checking != x ; then
2969
2970$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
2971
6da23aaa 2972fi
eb697db5 2973if test x$ac_gc_check_stringbytes != x ; then
52dbaac8 2974
eb697db5 2975$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
91e84f96 2976
5929fbe7 2977fi
eb697db5 2978if test x$ac_gc_check_stringoverrun != x ; then
91e84f96 2979
eb697db5 2980$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
91e84f96
GM
2981
2982fi
eb697db5 2983if test x$ac_gc_check_string_free_list != x ; then
91e84f96 2984
eb697db5 2985$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
91e84f96 2986
5929fbe7 2987fi
eb697db5 2988if test x$ac_xmalloc_overrun != x ; then
a4f64981 2989
eb697db5 2990$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
91e84f96 2991
eb697db5
DN
2992fi
2993if test x$ac_gc_check_cons_list != x ; then
91e84f96 2994
eb697db5 2995$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
91e84f96 2996
eb697db5 2997fi
91e84f96 2998
d9170db5
DN
2999# Check whether --enable-use-lisp-union-type was given.
3000if test "${enable_use_lisp_union_type+set}" = set; then :
3001 enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then
3002
3003$as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h
3004
3005fi
3006fi
3007
3008
3009
eb697db5
DN
3010# Check whether --enable-profiling was given.
3011if test "${enable_profiling+set}" = set; then :
3012 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
3013fi
91e84f96 3014
eb697db5
DN
3015if test x$ac_enable_profiling != x ; then
3016 PROFILING_CFLAGS="-DPROFILING=1 -pg"
3017 PROFILING_LDFLAGS="-pg"
5929fbe7 3018else
eb697db5
DN
3019 PROFILING_CFLAGS=
3020 PROFILING_LDFLAGS=
3021fi
91e84f96 3022
e6cfa7c3
AS
3023
3024
eb697db5
DN
3025# Check whether --enable-autodepend was given.
3026if test "${enable_autodepend+set}" = set; then :
3027 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
3028else
3029 ac_enable_autodepend=yes
3030fi
52dbaac8 3031
91e84f96 3032
eb697db5
DN
3033#### Make srcdir absolute, if it isn't already. It's important to
3034#### avoid running the path through pwd unnecessarily, since pwd can
3035#### give you automounter prefixes, which can go away. We do all this
3036#### so Emacs can find its files when run uninstalled.
3037## Make sure CDPATH doesn't affect cd (in case PWD is relative).
3038unset CDPATH
3039case "${srcdir}" in
3040 /* ) ;;
3041 . )
3042 ## We may be able to use the $PWD environment variable to make this
3043 ## absolute. But sometimes PWD is inaccurate.
3044 ## Note: we used to use ${PWD} at the end instead of `pwd`,
3045 ## but that tested only for a well-formed and valid PWD,
3046 ## it did not object when PWD was well-formed and valid but just wrong.
3047 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
3048 then
3049 srcdir="$PWD"
3050 else
3051 srcdir="`(cd ${srcdir}; pwd)`"
3052 fi
3053 ;;
3054 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
91e84f96 3055esac
52dbaac8 3056
eb697db5
DN
3057#### Check if the source directory already has a configured system in it.
3058if test `pwd` != `(cd ${srcdir} && pwd)` \
3059 && test -f "${srcdir}/src/config.h" ; then
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
3061 as a build directory right now; it has been configured in its own
3062 right. To configure in another directory as well, you MUST
3063 use GNU make. If you do not have GNU make, then you must
3064 now do \`make distclean' in ${srcdir},
3065 and then run $0 again." >&5
3066$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
3067 as a build directory right now; it has been configured in its own
3068 right. To configure in another directory as well, you MUST
3069 use GNU make. If you do not have GNU make, then you must
3070 now do \`make distclean' in ${srcdir},
3071 and then run $0 again." >&2;}
bf89cb4d 3072fi
52dbaac8 3073
eb697db5
DN
3074#### Given the configuration name, set machfile and opsysfile to the
3075#### names of the m/*.h and s/*.h files we should use.
3076
3077### Canonicalize the configuration name.
3078
3079ac_aux_dir=
3080for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3081 for ac_t in install-sh install.sh shtool; do
3082 if test -f "$ac_dir/$ac_t"; then
3083 ac_aux_dir=$ac_dir
3084 ac_install_sh="$ac_aux_dir/$ac_t -c"
3085 break 2
3086 fi
3087 done
91e84f96 3088done
eb697db5
DN
3089if test -z "$ac_aux_dir"; then
3090 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5929fbe7 3091fi
52dbaac8 3092
eb697db5
DN
3093# These three variables are undocumented and unsupported,
3094# and are intended to be withdrawn in a future Autoconf release.
3095# They can cause serious problems if a builder's source tree is in a directory
3096# whose full name contains unusual characters.
3097ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3098ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3099ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
52dbaac8 3100
52dbaac8 3101
eb697db5
DN
3102# Make sure we can run config.sub.
3103$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3104 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
52dbaac8 3105
eb697db5
DN
3106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3107$as_echo_n "checking build system type... " >&6; }
3108if test "${ac_cv_build+set}" = set; then :
91e84f96
GM
3109 $as_echo_n "(cached) " >&6
3110else
eb697db5
DN
3111 ac_build_alias=$build_alias
3112test "x$ac_build_alias" = x &&
3113 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3114test "x$ac_build_alias" = x &&
3115 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3116ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3117 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
52dbaac8 3118
15e12598 3119fi
eb697db5
DN
3120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3121$as_echo "$ac_cv_build" >&6; }
3122case $ac_cv_build in
3123*-*-*) ;;
3124*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
91e84f96 3125esac
eb697db5
DN
3126build=$ac_cv_build
3127ac_save_IFS=$IFS; IFS='-'
3128set x $ac_cv_build
3129shift
3130build_cpu=$1
3131build_vendor=$2
3132shift; shift
3133# Remember, the first character of IFS is used to create $*,
3134# except with old shells:
3135build_os=$*
3136IFS=$ac_save_IFS
3137case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
52dbaac8 3138
cd958eb3 3139
eb697db5
DN
3140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3141$as_echo_n "checking host system type... " >&6; }
3142if test "${ac_cv_host+set}" = set; then :
5929fbe7 3143 $as_echo_n "(cached) " >&6
91e84f96 3144else
eb697db5
DN
3145 if test "x$host_alias" = x; then
3146 ac_cv_host=$ac_cv_build
3147else
3148 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3149 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
91e84f96 3150fi
6da23aaa 3151
eb697db5
DN
3152fi
3153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3154$as_echo "$ac_cv_host" >&6; }
3155case $ac_cv_host in
3156*-*-*) ;;
3157*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3158esac
3159host=$ac_cv_host
3160ac_save_IFS=$IFS; IFS='-'
3161set x $ac_cv_host
3162shift
3163host_cpu=$1
3164host_vendor=$2
3165shift; shift
3166# Remember, the first character of IFS is used to create $*,
3167# except with old shells:
3168host_os=$*
3169IFS=$ac_save_IFS
3170case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6da23aaa 3171
973a76b1 3172
eb697db5
DN
3173canonical=$host
3174configuration=${host_alias-${build_alias-$host}}
edfaf76d 3175
edfaf76d 3176
edfaf76d 3177
eb697db5
DN
3178### If you add support for a new configuration, add code to this
3179### switch statement to recognize your configuration name and select
3180### the appropriate operating system and machine description files.
6da23aaa 3181
eb697db5
DN
3182### You would hope that you could choose an m/*.h file pretty much
3183### based on the machine portion of the configuration name, and an s/*.h
3184### file based on the operating system portion. However, it turns out
3185### that each m/*.h file is pretty manufacturer-specific - for
3186### example mips.h is MIPS
3187### So we basically have to have a special case for each
3188### configuration name.
3189###
3190### As far as handling version numbers on operating systems is
3191### concerned, make sure things will fail in a fixable way. If
3192### /etc/MACHINES doesn't say anything about version numbers, be
3193### prepared to handle anything reasonably. If version numbers
3194### matter, be sure /etc/MACHINES says something about it.
6da23aaa 3195
eb697db5
DN
3196machine='' opsys='' unported=no
3197case "${canonical}" in
973a76b1 3198
eb697db5
DN
3199 ## FreeBSD ports
3200 *-*-freebsd* )
3201 opsys=freebsd
3202 case "${canonical}" in
3203 alpha*) machine=alpha ;;
3204 amd64-*|x86_64-*) machine=amdx86-64 ;;
3205 arm*) machine=arm ;;
3206 ia64-*) machine=ia64 ;;
3207 i[3456]86-*) machine=intel386 ;;
3208 powerpc-*) machine=macppc ;;
3209 sparc-*) machine=sparc ;;
3210 sparc64-*) machine=sparc ;;
3211 esac
3212 ;;
19650fd6 3213
eb697db5
DN
3214 ## FreeBSD kernel + glibc based userland
3215 *-*-kfreebsd*gnu* )
3216 opsys=gnu-kfreebsd
3217 case "${canonical}" in
3218 alpha*) machine=alpha ;;
3219 amd64-*|x86_64-*) machine=amdx86-64 ;;
3220 ia64-*) machine=ia64 ;;
3221 i[3456]86-*) machine=intel386 ;;
3222 powerpc-*) machine=macppc ;;
3223 sparc-*) machine=sparc ;;
3224 sparc64-*) machine=sparc ;;
3225 esac
3226 ;;
ca81d7a0 3227
eb697db5
DN
3228 ## NetBSD ports
3229 *-*-netbsd* )
3230 opsys=netbsd
3231 case "${canonical}" in
3232 alpha*) machine=alpha ;;
3233 x86_64-*) machine=amdx86-64 ;;
3234 arm-*) machine=arm ;;
3235 hppa-*) machine=hp800 ;;
3236 i[3456]86-*) machine=intel386 ;;
3237 m68k-*) machine=m68k ;;
3238 powerpc-*) machine=macppc ;;
3239 mips-*) machine=mips ;;
3240 mipse[bl]-*) machine=mips ;;
3241 sparc*-) machine=sparc ;;
3242 vax-*) machine=vax ;;
3243 esac
3244 ;;
973a76b1 3245
eb697db5
DN
3246 ## OpenBSD ports
3247 *-*-openbsd* )
3248 opsys=openbsd
3249 case "${canonical}" in
3250 alpha*) machine=alpha ;;
3251 x86_64-*) machine=amdx86-64 ;;
3252 arm-*) machine=arm ;;
3253 hppa-*) machine=hp800 ;;
3254 i386-*) machine=intel386 ;;
3255 powerpc-*) machine=macppc ;;
3256 sparc*) machine=sparc ;;
3257 vax-*) machine=vax ;;
3258 esac
3259 ;;
6da23aaa 3260
eb697db5
DN
3261 alpha*-*-linux-gnu* )
3262 machine=alpha opsys=gnu-linux
3263 ;;
bf89cb4d 3264
eb697db5
DN
3265 arm*-*-linux-gnu* )
3266 machine=arm opsys=gnu-linux
3267 ;;
bf89cb4d 3268
eb697db5
DN
3269 ## Apple Darwin / Mac OS X
3270 *-apple-darwin* )
3271 case "${canonical}" in
3272 i[3456]86-* ) machine=intel386 ;;
3273 powerpc-* ) machine=macppc ;;
3274 x86_64-* ) machine=amdx86-64 ;;
3275 * ) unported=yes ;;
3276 esac
3277 opsys=darwin
3278 # Define CPP as follows to make autoconf work correctly.
3279 CPP="${CC-cc} -E -no-cpp-precomp"
3280 # Use fink packages if available.
3281 if test -d /sw/include && test -d /sw/lib; then
3282 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3283 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3284 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3285 fi
3286 ;;
973a76b1 3287
eb697db5
DN
3288 ## HP 9000 series 700 and 800, running HP/UX
3289 hppa*-hp-hpux10.2* )
3290 machine=hp800 opsys=hpux10-20
3291 ;;
3292 hppa*-hp-hpux1[1-9]* )
3293 machine=hp800 opsys=hpux11
3294 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
3295 ;;
91e84f96 3296
eb697db5
DN
3297 hppa*-*-linux-gnu* )
3298 machine=hp800 opsys=gnu-linux
3299 ;;
91e84f96 3300
eb697db5
DN
3301 ## IBM machines
3302 s390-*-linux-gnu* )
3303 machine=ibms390 opsys=gnu-linux
3304 ;;
3305 s390x-*-linux-gnu* )
3306 machine=ibms390x opsys=gnu-linux
3307 ;;
3308 rs6000-ibm-aix4.[23]* )
3309 machine=ibmrs6000 opsys=aix4-2
3310 ;;
3311 powerpc-ibm-aix4.[23]* )
3312 machine=ibmrs6000 opsys=aix4-2
3313 ;;
3314 rs6000-ibm-aix[56]* )
3315 machine=ibmrs6000 opsys=aix4-2
3316 ;;
3317 powerpc-ibm-aix[56]* )
3318 machine=ibmrs6000 opsys=aix4-2
3319 ;;
91e84f96 3320
eb697db5
DN
3321 ## Macintosh PowerPC
3322 powerpc*-*-linux-gnu* )
3323 machine=macppc opsys=gnu-linux
3324 ;;
6da23aaa 3325
eb697db5
DN
3326 ## Silicon Graphics machines
3327 ## Iris 4D
3328 mips-sgi-irix6.5 )
3329 machine=iris4d opsys=irix6-5
3330 # Without defining _LANGUAGE_C, things get masked out in the headers
3331 # so that, for instance, grepping for `free' in stdlib.h fails and
3332 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3333 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
3334 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
3335 ;;
91e84f96 3336
eb697db5
DN
3337 ## Suns
3338 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3339 machine=sparc opsys=gnu-linux
3340 ;;
15e12598 3341
eb697db5
DN
3342 *-sun-solaris* \
3343 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3344 | x86_64-*-solaris2* | x86_64-*-sunos5*)
3345 case "${canonical}" in
3346 i[3456]86-*-* ) machine=intel386 ;;
3347 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
3348 sparc* ) machine=sparc ;;
3349 * ) unported=yes ;;
3350 esac
3351 case "${canonical}" in
3352 *-sunos5.6* | *-solaris2.6* )
3353 opsys=sol2-6
3354 NON_GNU_CPP=/usr/ccs/lib/cpp
3355 RANLIB="ar -ts"
3356 ;;
3357 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
3358 opsys=sol2-6
3359 emacs_check_sunpro_c=yes
3360 NON_GNU_CPP=/usr/ccs/lib/cpp
3361 ;;
3362 *-sunos5* | *-solaris* )
3363 opsys=sol2-10
3364 emacs_check_sunpro_c=yes
3365 NON_GNU_CPP=/usr/ccs/lib/cpp
3366 ;;
3367 esac
3368 ## Watch out for a compiler that we know will not work.
3369 case "${canonical}" in
3370 *-solaris* | *-sunos5* )
3371 if [ "x$CC" = x/usr/ucb/cc ]; then
3372 ## /usr/ucb/cc doesn't work;
3373 ## we should find some other compiler that does work.
3374 unset CC
3375 fi
3376 ;;
3377 *) ;;
3378 esac
3379 ;;
91e84f96 3380
eb697db5
DN
3381 ## IA-64
3382 ia64*-*-linux* )
3383 machine=ia64 opsys=gnu-linux
3384 ;;
91e84f96 3385
eb697db5
DN
3386 ## Intel 386 machines where we don't care about the manufacturer.
3387 i[3456]86-*-* )
3388 machine=intel386
3389 case "${canonical}" in
3390 *-cygwin ) opsys=cygwin ;;
3391 *-darwin* ) opsys=darwin
3392 CPP="${CC-cc} -E -no-cpp-precomp"
3393 ;;
3394 *-linux-gnu* ) opsys=gnu-linux ;;
3395 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3396 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3397 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3398 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3399 esac
3400 ;;
b936fae4 3401
eb697db5
DN
3402 ## m68k Linux-based GNU system
3403 m68k-*-linux-gnu* )
3404 machine=m68k opsys=gnu-linux
3405 ;;
bf89cb4d 3406
eb697db5
DN
3407 ## Mips Linux-based GNU system
3408 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3409 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
3410 machine=mips opsys=gnu-linux
3411 ;;
edfaf76d 3412
eb697db5
DN
3413 ## AMD x86-64 Linux-based GNU system
3414 x86_64-*-linux-gnu* )
3415 machine=amdx86-64 opsys=gnu-linux
3416 ;;
edfaf76d 3417
eb697db5
DN
3418 ## Tensilica Xtensa Linux-based GNU system
3419 xtensa*-*-linux-gnu* )
3420 machine=xtensa opsys=gnu-linux
3421 ;;
bf89cb4d 3422
eb697db5
DN
3423 ## SuperH Linux-based GNU system
3424 sh[34]*-*-linux-gnu* )
3425 machine=sh3 opsys=gnu-linux
3426 ;;
bf89cb4d 3427
eb697db5
DN
3428 * )
3429 unported=yes
3430 ;;
91e84f96 3431esac
91e84f96 3432
eb697db5
DN
3433### If the code above didn't choose an operating system, just choose
3434### an operating system based on the configuration name. You really
3435### only want to use this when you have no idea what the right
3436### operating system is; if you know what operating systems a machine
3437### runs, it's cleaner to make it explicit in the case statement
3438### above.
3439if test x"${opsys}" = x; then
3440 case "${canonical}" in
3441 *-gnu* ) opsys=gnu ;;
3442 * )
3443 unported=yes
3444 ;;
3445 esac
91e84f96
GM
3446fi
3447
91e84f96 3448
91e84f96 3449
eb697db5
DN
3450if test $unported = yes; then
3451 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
3452Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
91e84f96
GM
3453fi
3454
eb697db5
DN
3455machfile="m/${machine}.h"
3456opsysfile="s/${opsys}.h"
91e84f96 3457
91e84f96 3458
eb697db5
DN
3459#### Choose a compiler.
3460test -n "$CC" && cc_specified=yes
3461
3462# Save the value of CFLAGS that the user specified.
3463SPECIFIED_CFLAGS="$CFLAGS"
3464
3465ac_ext=c
3466ac_cpp='$CPP $CPPFLAGS'
3467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3469ac_compiler_gnu=$ac_cv_c_compiler_gnu
3470if test -n "$ac_tool_prefix"; then
3471 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3472set dummy ${ac_tool_prefix}gcc; ac_word=$2
3473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3474$as_echo_n "checking for $ac_word... " >&6; }
3475if test "${ac_cv_prog_CC+set}" = set; then :
91e84f96
GM
3476 $as_echo_n "(cached) " >&6
3477else
eb697db5
DN
3478 if test -n "$CC"; then
3479 ac_cv_prog_CC="$CC" # Let the user override the test.
3480else
3481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3482for as_dir in $PATH
3483do
3484 IFS=$as_save_IFS
3485 test -z "$as_dir" && as_dir=.
3486 for ac_exec_ext in '' $ac_executable_extensions; do
3487 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3488 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3490 break 2
3491 fi
3492done
3493 done
3494IFS=$as_save_IFS
91e84f96
GM
3495
3496fi
eb697db5
DN
3497fi
3498CC=$ac_cv_prog_CC
3499if test -n "$CC"; then
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3501$as_echo "$CC" >&6; }
3502else
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3504$as_echo "no" >&6; }
91e84f96
GM
3505fi
3506
91e84f96 3507
eb697db5
DN
3508fi
3509if test -z "$ac_cv_prog_CC"; then
3510 ac_ct_CC=$CC
3511 # Extract the first word of "gcc", so it can be a program name with args.
3512set dummy gcc; ac_word=$2
3513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3514$as_echo_n "checking for $ac_word... " >&6; }
3515if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
91e84f96
GM
3516 $as_echo_n "(cached) " >&6
3517else
eb697db5
DN
3518 if test -n "$ac_ct_CC"; then
3519 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
91e84f96 3520else
eb697db5
DN
3521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3522for as_dir in $PATH
3523do
3524 IFS=$as_save_IFS
3525 test -z "$as_dir" && as_dir=.
3526 for ac_exec_ext in '' $ac_executable_extensions; do
3527 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3528 ac_cv_prog_ac_ct_CC="gcc"
3529 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3530 break 2
3531 fi
3532done
3533 done
3534IFS=$as_save_IFS
91e84f96 3535
91e84f96 3536fi
91e84f96 3537fi
eb697db5
DN
3538ac_ct_CC=$ac_cv_prog_ac_ct_CC
3539if test -n "$ac_ct_CC"; then
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3541$as_echo "$ac_ct_CC" >&6; }
3542else
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3544$as_echo "no" >&6; }
91e84f96
GM
3545fi
3546
eb697db5
DN
3547 if test "x$ac_ct_CC" = x; then
3548 CC=""
3549 else
3550 case $cross_compiling:$ac_tool_warned in
3551yes:)
3552{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3553$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3554ac_tool_warned=yes ;;
3555esac
3556 CC=$ac_ct_CC
91e84f96 3557 fi
eb697db5
DN
3558else
3559 CC="$ac_cv_prog_CC"
91e84f96
GM
3560fi
3561
eb697db5
DN
3562if test -z "$CC"; then
3563 if test -n "$ac_tool_prefix"; then
3564 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3565set dummy ${ac_tool_prefix}cc; ac_word=$2
3566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
91e84f96 3567$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3568if test "${ac_cv_prog_CC+set}" = set; then :
91e84f96
GM
3569 $as_echo_n "(cached) " >&6
3570else
eb697db5
DN
3571 if test -n "$CC"; then
3572 ac_cv_prog_CC="$CC" # Let the user override the test.
3573else
3574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91e84f96
GM
3575for as_dir in $PATH
3576do
3577 IFS=$as_save_IFS
3578 test -z "$as_dir" && as_dir=.
eb697db5 3579 for ac_exec_ext in '' $ac_executable_extensions; do
6da23aaa 3580 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3581 ac_cv_prog_CC="${ac_tool_prefix}cc"
3582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6da23aaa
EZ
3583 break 2
3584 fi
3585done
eb697db5 3586 done
6da23aaa 3587IFS=$as_save_IFS
bf89cb4d 3588
6da23aaa 3589fi
eb697db5
DN
3590fi
3591CC=$ac_cv_prog_CC
3592if test -n "$CC"; then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3594$as_echo "$CC" >&6; }
6da23aaa 3595else
eb697db5 3596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6da23aaa
EZ
3597$as_echo "no" >&6; }
3598fi
bf89cb4d
GM
3599
3600
5929fbe7 3601 fi
eb697db5
DN
3602fi
3603if test -z "$CC"; then
3604 # Extract the first word of "cc", so it can be a program name with args.
3605set dummy cc; ac_word=$2
3606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3607$as_echo_n "checking for $ac_word... " >&6; }
3608if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3609 $as_echo_n "(cached) " >&6
3610else
eb697db5
DN
3611 if test -n "$CC"; then
3612 ac_cv_prog_CC="$CC" # Let the user override the test.
8c5ff6dd 3613else
eb697db5
DN
3614 ac_prog_rejected=no
3615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3616for as_dir in $PATH
3617do
3618 IFS=$as_save_IFS
3619 test -z "$as_dir" && as_dir=.
3620 for ac_exec_ext in '' $ac_executable_extensions; do
3621 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3622 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3623 ac_prog_rejected=yes
3624 continue
6da23aaa 3625 fi
eb697db5
DN
3626 ac_cv_prog_CC="cc"
3627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3628 break 2
6da23aaa 3629 fi
eb697db5
DN
3630done
3631 done
3632IFS=$as_save_IFS
0ca10bb7 3633
eb697db5
DN
3634if test $ac_prog_rejected = yes; then
3635 # We found a bogon in the path, so make sure we never use it.
3636 set dummy $ac_cv_prog_CC
3637 shift
3638 if test $# != 0; then
3639 # We chose a different compiler from the bogus one.
3640 # However, it has the same basename, so the bogon will be chosen
3641 # first if we set CC to just the basename; use the full file name.
3642 shift
3643 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
6da23aaa 3644 fi
8c5ff6dd 3645fi
8c5ff6dd 3646fi
8c5ff6dd 3647fi
eb697db5
DN
3648CC=$ac_cv_prog_CC
3649if test -n "$CC"; then
3650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3651$as_echo "$CC" >&6; }
3652else
3653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3654$as_echo "no" >&6; }
8c5ff6dd 3655fi
4c343001 3656
bf89cb4d 3657
eb697db5
DN
3658fi
3659if test -z "$CC"; then
3660 if test -n "$ac_tool_prefix"; then
3661 for ac_prog in cl.exe
3662 do
3663 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3664set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3666$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3667if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3668 $as_echo_n "(cached) " >&6
4c343001 3669else
eb697db5
DN
3670 if test -n "$CC"; then
3671 ac_cv_prog_CC="$CC" # Let the user override the test.
503d2be0 3672else
eb697db5 3673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3674for as_dir in $PATH
8c5ff6dd 3675do
5929fbe7
GM
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
eb697db5 3678 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3679 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3680 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3682 break 2
3683 fi
3684done
eb697db5 3685 done
5929fbe7 3686IFS=$as_save_IFS
91e84f96 3687
6da23aaa 3688fi
ba4481b5 3689fi
eb697db5
DN
3690CC=$ac_cv_prog_CC
3691if test -n "$CC"; then
3692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3693$as_echo "$CC" >&6; }
8c5ff6dd 3694else
eb697db5 3695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3696$as_echo "no" >&6; }
bf89cb4d 3697fi
c0d27fcc 3698
15e12598 3699
eb697db5
DN
3700 test -n "$CC" && break
3701 done
3702fi
3703if test -z "$CC"; then
3704 ac_ct_CC=$CC
3705 for ac_prog in cl.exe
3706do
3707 # Extract the first word of "$ac_prog", so it can be a program name with args.
3708set dummy $ac_prog; ac_word=$2
3709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
91e84f96 3710$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3711if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
91e84f96 3712 $as_echo_n "(cached) " >&6
bf89cb4d 3713else
eb697db5
DN
3714 if test -n "$ac_ct_CC"; then
3715 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3716else
eb697db5 3717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91e84f96
GM
3718for as_dir in $PATH
3719do
3720 IFS=$as_save_IFS
3721 test -z "$as_dir" && as_dir=.
eb697db5 3722 for ac_exec_ext in '' $ac_executable_extensions; do
91e84f96 3723 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3724 ac_cv_prog_ac_ct_CC="$ac_prog"
3725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
91e84f96
GM
3726 break 2
3727 fi
3728done
eb697db5 3729 done
91e84f96
GM
3730IFS=$as_save_IFS
3731
91e84f96 3732fi
5929fbe7 3733fi
eb697db5
DN
3734ac_ct_CC=$ac_cv_prog_ac_ct_CC
3735if test -n "$ac_ct_CC"; then
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3737$as_echo "$ac_ct_CC" >&6; }
91e84f96 3738else
eb697db5 3739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
91e84f96 3740$as_echo "no" >&6; }
bf89cb4d 3741fi
6da23aaa 3742
0ca10bb7 3743
eb697db5
DN
3744 test -n "$ac_ct_CC" && break
3745done
91e84f96 3746
eb697db5
DN
3747 if test "x$ac_ct_CC" = x; then
3748 CC=""
91e84f96 3749 else
eb697db5
DN
3750 case $cross_compiling:$ac_tool_warned in
3751yes:)
3752{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3753$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3754ac_tool_warned=yes ;;
3755esac
3756 CC=$ac_ct_CC
91e84f96 3757 fi
8c5ff6dd 3758fi
91e84f96 3759
eb697db5 3760fi
91e84f96 3761
91e84f96 3762
eb697db5
DN
3763test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3764$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3765as_fn_error "no acceptable C compiler found in \$PATH
3766See \`config.log' for more details." "$LINENO" 5; }
91e84f96 3767
eb697db5
DN
3768# Provide some information about the compiler.
3769$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3770set X $ac_compile
3771ac_compiler=$2
3772for ac_option in --version -v -V -qversion; do
3773 { { ac_try="$ac_compiler $ac_option >&5"
5929fbe7
GM
3774case "(($ac_try" in
3775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3776 *) ac_try_echo=$ac_try;;
3777esac
eb697db5
DN
3778eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3779$as_echo "$ac_try_echo"; } >&5
3780 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5929fbe7 3781 ac_status=$?
eb697db5
DN
3782 if test -s conftest.err; then
3783 sed '10a\
3784... rest of stderr output deleted ...
3785 10q' conftest.err >conftest.er1
3786 cat conftest.er1 >&5
5929fbe7 3787 fi
eb697db5
DN
3788 rm -f conftest.er1 conftest.err
3789 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3790 test $ac_status = 0; }
3791done
6da23aaa 3792
eb697db5 3793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 3794/* end confdefs.h. */
a4f64981 3795
a4f64981
GM
3796int
3797main ()
3798{
5929fbe7 3799
a4f64981
GM
3800 ;
3801 return 0;
3802}
15e12598 3803_ACEOF
eb697db5
DN
3804ac_clean_files_save=$ac_clean_files
3805ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3806# Try to create an executable without -o first, disregard a.out.
3807# It will help us diagnose broken compilers, and finding out an intuition
3808# of exeext.
3809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3810$as_echo_n "checking whether the C compiler works... " >&6; }
3811ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3812
3813# The possible output files:
3814ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3815
3816ac_rmfiles=
3817for ac_file in $ac_files
3818do
3819 case $ac_file in
3820 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3821 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3822 esac
3823done
3824rm -f $ac_rmfiles
3825
3826if { { ac_try="$ac_link_default"
a4f64981
GM
3827case "(($ac_try" in
3828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3829 *) ac_try_echo=$ac_try;;
3830esac
eb697db5
DN
3831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3832$as_echo "$ac_try_echo"; } >&5
3833 (eval "$ac_link_default") 2>&5
a4f64981 3834 ac_status=$?
eb697db5
DN
3835 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3836 test $ac_status = 0; }; then :
3837 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3838# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3839# in a Makefile. We should not override ac_cv_exeext if it was cached,
3840# so that the user can short-circuit this test for compilers unknown to
3841# Autoconf.
3842for ac_file in $ac_files ''
3843do
3844 test -f "$ac_file" || continue
3845 case $ac_file in
3846 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3847 ;;
3848 [ab].out )
3849 # We found the default executable, but exeext='' is most
3850 # certainly right.
3851 break;;
3852 *.* )
3853 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3854 then :; else
3855 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3856 fi
3857 # We set ac_cv_exeext here because the later test for it is not
3858 # safe: cross compilers may not add the suffix if given an `-o'
3859 # argument, so we may need to know it at that point already.
3860 # Even if this section looks crufty: it has the advantage of
3861 # actually working.
3862 break;;
3863 * )
3864 break;;
3865 esac
3866done
3867test "$ac_cv_exeext" = no && ac_cv_exeext=
a4f64981 3868
eb697db5
DN
3869else
3870 ac_file=''
15e12598 3871fi
eb697db5
DN
3872if test -z "$ac_file"; then :
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3874$as_echo "no" >&6; }
3875$as_echo "$as_me: failed program was:" >&5
3876sed 's/^/| /' conftest.$ac_ext >&5
49ebbd65 3877
eb697db5
DN
3878{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3880{ as_fn_set_status 77
3881as_fn_error "C compiler cannot create executables
3882See \`config.log' for more details." "$LINENO" 5; }; }
15e12598 3883else
eb697db5
DN
3884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3885$as_echo "yes" >&6; }
15e12598 3886fi
eb697db5
DN
3887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3888$as_echo_n "checking for C compiler default output file name... " >&6; }
3889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3890$as_echo "$ac_file" >&6; }
3891ac_exeext=$ac_cv_exeext
e6df49e4 3892
eb697db5
DN
3893rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3894ac_clean_files=$ac_clean_files_save
3895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3896$as_echo_n "checking for suffix of executables... " >&6; }
3897if { { ac_try="$ac_link"
3898case "(($ac_try" in
3899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3900 *) ac_try_echo=$ac_try;;
3901esac
3902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3903$as_echo "$ac_try_echo"; } >&5
3904 (eval "$ac_link") 2>&5
3905 ac_status=$?
3906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3907 test $ac_status = 0; }; then :
3908 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3909# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3910# work properly (i.e., refer to `conftest.exe'), while it won't with
3911# `rm'.
3912for ac_file in conftest.exe conftest conftest.*; do
3913 test -f "$ac_file" || continue
3914 case $ac_file in
3915 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3916 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3917 break;;
3918 * ) break;;
3919 esac
3920done
3921else
3922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3924as_fn_error "cannot compute suffix of executables: cannot compile and link
3925See \`config.log' for more details." "$LINENO" 5; }
a4f64981 3926fi
eb697db5
DN
3927rm -f conftest conftest$ac_cv_exeext
3928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3929$as_echo "$ac_cv_exeext" >&6; }
49ebbd65 3930
eb697db5
DN
3931rm -f conftest.$ac_ext
3932EXEEXT=$ac_cv_exeext
3933ac_exeext=$EXEEXT
3934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bc3512d0 3935/* end confdefs.h. */
eb697db5 3936#include <stdio.h>
bc3512d0
CY
3937int
3938main ()
3939{
eb697db5
DN
3940FILE *f = fopen ("conftest.out", "w");
3941 return ferror (f) || fclose (f) != 0;
91e84f96 3942
bc3512d0
CY
3943 ;
3944 return 0;
3945}
3946_ACEOF
eb697db5
DN
3947ac_clean_files="$ac_clean_files conftest.out"
3948# Check that the compiler produces executables we can run. If not, either
3949# the compiler is broken, or we cross compile.
3950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3951$as_echo_n "checking whether we are cross compiling... " >&6; }
3952if test "$cross_compiling" != yes; then
3953 { { ac_try="$ac_link"
91e84f96
GM
3954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
eb697db5
DN
3958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
3960 (eval "$ac_link") 2>&5
91e84f96 3961 ac_status=$?
eb697db5
DN
3962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }
3964 if { ac_try='./conftest$ac_cv_exeext'
3965 { { case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
3969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
3971 (eval "$ac_try") 2>&5
3972 ac_status=$?
3973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; }; then
3975 cross_compiling=no
91e84f96 3976 else
eb697db5
DN
3977 if test "$cross_compiling" = maybe; then
3978 cross_compiling=yes
3979 else
3980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3982as_fn_error "cannot run C compiled programs.
3983If you meant to cross compile, use \`--host'.
3984See \`config.log' for more details." "$LINENO" 5; }
3985 fi
6da23aaa 3986 fi
eb697db5
DN
3987fi
3988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3989$as_echo "$cross_compiling" >&6; }
5929fbe7 3990
eb697db5
DN
3991rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3992ac_clean_files=$ac_clean_files_save
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3994$as_echo_n "checking for suffix of object files... " >&6; }
3995if test "${ac_cv_objext+set}" = set; then :
6da23aaa 3996 $as_echo_n "(cached) " >&6
84e70f78 3997else
eb697db5 3998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 3999/* end confdefs.h. */
6da23aaa 4000
19650fd6
AS
4001int
4002main ()
4003{
91e84f96 4004
84e70f78
KR
4005 ;
4006 return 0;
4007}
4008_ACEOF
eb697db5
DN
4009rm -f conftest.o conftest.obj
4010if { { ac_try="$ac_compile"
91e84f96
GM
4011case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
eb697db5
DN
4015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016$as_echo "$ac_try_echo"; } >&5
4017 (eval "$ac_compile") 2>&5
91e84f96 4018 ac_status=$?
eb697db5
DN
4019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4020 test $ac_status = 0; }; then :
4021 for ac_file in conftest.o conftest.obj conftest.*; do
4022 test -f "$ac_file" || continue;
4023 case $ac_file in
4024 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4025 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4026 break;;
4027 esac
4028done
84e70f78 4029else
91e84f96
GM
4030 $as_echo "$as_me: failed program was:" >&5
4031sed 's/^/| /' conftest.$ac_ext >&5
4032
eb697db5
DN
4033{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4035as_fn_error "cannot compute suffix of object files: cannot compile
4036See \`config.log' for more details." "$LINENO" 5; }
bf89cb4d 4037fi
eb697db5 4038rm -f conftest.$ac_cv_objext conftest.$ac_ext
6da23aaa 4039fi
eb697db5
DN
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4041$as_echo "$ac_cv_objext" >&6; }
4042OBJEXT=$ac_cv_objext
4043ac_objext=$OBJEXT
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4045$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4046if test "${ac_cv_c_compiler_gnu+set}" = set; then :
e9a63f04 4047 $as_echo_n "(cached) " >&6
84e70f78 4048else
eb697db5 4049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4050/* end confdefs.h. */
8c5ff6dd 4051
84e70f78
KR
4052int
4053main ()
4054{
eb697db5
DN
4055#ifndef __GNUC__
4056 choke me
91e84f96
GM
4057#endif
4058
84e70f78
KR
4059 ;
4060 return 0;
4061}
4062_ACEOF
eb697db5
DN
4063if ac_fn_c_try_compile "$LINENO"; then :
4064 ac_compiler_gnu=yes
91e84f96 4065else
eb697db5 4066 ac_compiler_gnu=no
bf89cb4d 4067fi
eb697db5
DN
4068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4069ac_cv_c_compiler_gnu=$ac_compiler_gnu
0ca10bb7 4070
91e84f96 4071fi
eb697db5
DN
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4073$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4074if test $ac_compiler_gnu = yes; then
4075 GCC=yes
4076else
4077 GCC=
4078fi
4079ac_test_CFLAGS=${CFLAGS+set}
4080ac_save_CFLAGS=$CFLAGS
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4082$as_echo_n "checking whether $CC accepts -g... " >&6; }
4083if test "${ac_cv_prog_cc_g+set}" = set; then :
5929fbe7 4084 $as_echo_n "(cached) " >&6
08b47d3d 4085else
eb697db5
DN
4086 ac_save_c_werror_flag=$ac_c_werror_flag
4087 ac_c_werror_flag=yes
4088 ac_cv_prog_cc_g=no
4089 CFLAGS="-g"
4090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0c309b80 4091/* end confdefs.h. */
0ca10bb7 4092
9452ded1
DN
4093int
4094main ()
4095{
0ca10bb7 4096
5929fbe7 4097 ;
9452ded1
DN
4098 return 0;
4099}
91e84f96 4100_ACEOF
eb697db5
DN
4101if ac_fn_c_try_compile "$LINENO"; then :
4102 ac_cv_prog_cc_g=yes
8c5ff6dd 4103else
eb697db5
DN
4104 CFLAGS=""
4105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4106/* end confdefs.h. */
bf89cb4d 4107
eb697db5
DN
4108int
4109main ()
4110{
bf89cb4d 4111
eb697db5
DN
4112 ;
4113 return 0;
4114}
a4f64981 4115_ACEOF
eb697db5 4116if ac_fn_c_try_compile "$LINENO"; then :
6da23aaa 4117
84e70f78 4118else
eb697db5
DN
4119 ac_c_werror_flag=$ac_save_c_werror_flag
4120 CFLAGS="-g"
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 4122/* end confdefs.h. */
bf89cb4d 4123
0ca10bb7
RC
4124int
4125main ()
4126{
e6df49e4 4127
0ca10bb7
RC
4128 ;
4129 return 0;
4130}
19650fd6 4131_ACEOF
eb697db5
DN
4132if ac_fn_c_try_compile "$LINENO"; then :
4133 ac_cv_prog_cc_g=yes
4134fi
4135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4136fi
4137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4138fi
4139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4140 ac_c_werror_flag=$ac_save_c_werror_flag
4141fi
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4143$as_echo "$ac_cv_prog_cc_g" >&6; }
4144if test "$ac_test_CFLAGS" = set; then
4145 CFLAGS=$ac_save_CFLAGS
4146elif test $ac_cv_prog_cc_g = yes; then
4147 if test "$GCC" = yes; then
4148 CFLAGS="-g -O2"
4149 else
4150 CFLAGS="-g"
4151 fi
0ca10bb7 4152else
eb697db5
DN
4153 if test "$GCC" = yes; then
4154 CFLAGS="-O2"
4155 else
4156 CFLAGS=
5929fbe7 4157 fi
6da23aaa 4158fi
eb697db5
DN
4159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4160$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4161if test "${ac_cv_prog_cc_c89+set}" = set; then :
5929fbe7
GM
4162 $as_echo_n "(cached) " >&6
4163else
eb697db5
DN
4164 ac_cv_prog_cc_c89=no
4165ac_save_CC=$CC
4166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4167/* end confdefs.h. */
eb697db5
DN
4168#include <stdarg.h>
4169#include <stdio.h>
4170#include <sys/types.h>
4171#include <sys/stat.h>
4172/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4173struct buf { int x; };
4174FILE * (*rcsopen) (struct buf *, struct stat *, int);
4175static char *e (p, i)
4176 char **p;
4177 int i;
5929fbe7 4178{
eb697db5
DN
4179 return p[i];
4180}
4181static char *f (char * (*g) (char **, int), char **p, ...)
4182{
4183 char *s;
4184 va_list v;
4185 va_start (v,p);
4186 s = g (p, va_arg (v,int));
4187 va_end (v);
4188 return s;
5929fbe7 4189}
91e84f96 4190
eb697db5
DN
4191/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4192 function prototypes and stuff, but not '\xHH' hex character constants.
4193 These don't provoke an error unfortunately, instead are silently treated
4194 as 'x'. The following induces an error, until -std is added to get
4195 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4196 array size at least. It's necessary to write '\x00'==0 to get something
4197 that's true only with -std. */
4198int osf4_cc_array ['\x00' == 0 ? 1 : -1];
0ca10bb7 4199
eb697db5
DN
4200/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4201 inside strings and character constants. */
4202#define FOO(x) 'x'
4203int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
49ebbd65 4204
eb697db5
DN
4205int test (int i, double x);
4206struct s1 {int (*f) (int a);};
4207struct s2 {int (*f) (double a);};
4208int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4209int argc;
4210char **argv;
5929fbe7
GM
4211int
4212main ()
4213{
eb697db5 4214return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5929fbe7
GM
4215 ;
4216 return 0;
4217}
4218_ACEOF
eb697db5
DN
4219for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4220 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4221do
4222 CC="$ac_save_CC $ac_arg"
4223 if ac_fn_c_try_compile "$LINENO"; then :
4224 ac_cv_prog_cc_c89=$ac_arg
4225fi
4226rm -f core conftest.err conftest.$ac_objext
4227 test "x$ac_cv_prog_cc_c89" != "xno" && break
4228done
4229rm -f conftest.$ac_ext
4230CC=$ac_save_CC
0ca10bb7 4231
91e84f96 4232fi
eb697db5
DN
4233# AC_CACHE_VAL
4234case "x$ac_cv_prog_cc_c89" in
4235 x)
4236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4237$as_echo "none needed" >&6; } ;;
4238 xno)
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4240$as_echo "unsupported" >&6; } ;;
4241 *)
4242 CC="$CC $ac_cv_prog_cc_c89"
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4244$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4245esac
4246if test "x$ac_cv_prog_cc_c89" != xno; then :
6da23aaa 4247
91e84f96 4248fi
6da23aaa 4249
eb697db5
DN
4250ac_ext=c
4251ac_cpp='$CPP $CPPFLAGS'
4252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4254ac_compiler_gnu=$ac_cv_c_compiler_gnu
a5edbe4a 4255
a5edbe4a 4256
eb697db5
DN
4257# On Suns, sometimes $CPP names a directory.
4258if test -n "$CPP" && test -d "$CPP"; then
4259 CPP=
5929fbe7 4260fi
a5edbe4a 4261
eb697db5
DN
4262## If not using gcc, and on Solaris, and no CPP specified, see if
4263## using a Sun compiler, which needs -Xs to prevent whitespace.
4264if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4265 test x"$CPP" = x; then
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
4267$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
6da23aaa 4268
eb697db5 4269if test "${emacs_cv_sunpro_c+set}" = set; then :
0ca10bb7
RC
4270 $as_echo_n "(cached) " >&6
4271else
eb697db5 4272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4273/* end confdefs.h. */
bf89cb4d 4274
84e70f78
KR
4275int
4276main ()
4277{
eb697db5
DN
4278#ifndef __SUNPRO_C
4279fail;
4280#endif
4281
84e70f78
KR
4282 ;
4283 return 0;
4284}
4285_ACEOF
eb697db5
DN
4286if ac_fn_c_try_link "$LINENO"; then :
4287 emacs_cv_sunpro_c=yes
84e70f78 4288else
eb697db5 4289 emacs_cv_sunpro_c=no
a4f64981 4290fi
eb697db5
DN
4291rm -f core conftest.err conftest.$ac_objext \
4292 conftest$ac_exeext conftest.$ac_ext
5929fbe7 4293fi
a4f64981 4294
eb697db5
DN
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
4296$as_echo "$emacs_cv_sunpro_c" >&6; }
91e84f96 4297
eb697db5
DN
4298 if test x"$emacs_cv_sunpro_c" = xyes; then
4299 NON_GNU_CPP="$CC -E -Xs"
4300 fi
84e70f78 4301fi
91e84f96 4302
eb697db5
DN
4303#### Some systems specify a CPP to use unless we are using GCC.
4304#### Now that we know whether we are using GCC, we can decide whether
4305#### to use that one.
4306if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4307then
4308 CPP="$NON_GNU_CPP"
84e70f78 4309fi
6da23aaa 4310
eb697db5
DN
4311#### Some systems specify a CC to use unless we are using GCC.
4312#### Now that we know whether we are using GCC, we can decide whether
4313#### to use that one.
4314if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4315 test x$cc_specified != xyes
4316then
4317 CC="$NON_GNU_CC"
4318fi
6da23aaa 4319
9164c0e4
AS
4320if test x$GCC = xyes; then
4321 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
4322else
4323 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
6da23aaa 4324fi
bf89cb4d 4325
eb697db5
DN
4326ac_ext=c
4327ac_cpp='$CPP $CPPFLAGS'
4328ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4329ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4330ac_compiler_gnu=$ac_cv_c_compiler_gnu
4331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4332$as_echo_n "checking how to run the C preprocessor... " >&6; }
4333# On Suns, sometimes $CPP names a directory.
4334if test -n "$CPP" && test -d "$CPP"; then
4335 CPP=
4336fi
4337if test -z "$CPP"; then
4338 if test "${ac_cv_prog_CPP+set}" = set; then :
e9a63f04 4339 $as_echo_n "(cached) " >&6
84e70f78 4340else
eb697db5
DN
4341 # Double quotes because CPP needs to be expanded
4342 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4343 do
4344 ac_preproc_ok=false
4345for ac_c_preproc_warn_flag in '' yes
4346do
4347 # Use a header file that comes with gcc, so configuring glibc
4348 # with a fresh cross-compiler works.
4349 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4350 # <limits.h> exists even on freestanding compilers.
4351 # On the NeXT, cc -E runs the code through the compiler's parser,
4352 # not just through cpp. "Syntax error" is here to catch this case.
4353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 4354/* end confdefs.h. */
eb697db5
DN
4355#ifdef __STDC__
4356# include <limits.h>
4357#else
4358# include <assert.h>
4359#endif
4360 Syntax error
49ebbd65 4361_ACEOF
eb697db5
DN
4362if ac_fn_c_try_cpp "$LINENO"; then :
4363
4364else
4365 # Broken: fails on valid input.
4366continue
4367fi
4368rm -f conftest.err conftest.$ac_ext
5929fbe7 4369
eb697db5
DN
4370 # OK, works on sane cases. Now check whether nonexistent headers
4371 # can be detected and how.
4372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4373/* end confdefs.h. */
4374#include <ac_nonexistent.h>
91e84f96 4375_ACEOF
eb697db5
DN
4376if ac_fn_c_try_cpp "$LINENO"; then :
4377 # Broken: success on invalid input.
4378continue
8c5ff6dd 4379else
eb697db5
DN
4380 # Passes both tests.
4381ac_preproc_ok=:
4382break
8c5ff6dd 4383fi
eb697db5 4384rm -f conftest.err conftest.$ac_ext
5929fbe7 4385
eb697db5
DN
4386done
4387# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4388rm -f conftest.err conftest.$ac_ext
4389if $ac_preproc_ok; then :
4390 break
4391fi
5929fbe7 4392
eb697db5
DN
4393 done
4394 ac_cv_prog_CPP=$CPP
5929fbe7 4395
eb697db5
DN
4396fi
4397 CPP=$ac_cv_prog_CPP
4398else
4399 ac_cv_prog_CPP=$CPP
4400fi
4401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4402$as_echo "$CPP" >&6; }
4403ac_preproc_ok=false
4404for ac_c_preproc_warn_flag in '' yes
4405do
4406 # Use a header file that comes with gcc, so configuring glibc
4407 # with a fresh cross-compiler works.
4408 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4409 # <limits.h> exists even on freestanding compilers.
4410 # On the NeXT, cc -E runs the code through the compiler's parser,
4411 # not just through cpp. "Syntax error" is here to catch this case.
4412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4413/* end confdefs.h. */
eb697db5
DN
4414#ifdef __STDC__
4415# include <limits.h>
91e84f96 4416#else
eb697db5 4417# include <assert.h>
91e84f96 4418#endif
eb697db5 4419 Syntax error
84e70f78 4420_ACEOF
eb697db5 4421if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4422
eb697db5
DN
4423else
4424 # Broken: fails on valid input.
4425continue
8c5ff6dd 4426fi
eb697db5 4427rm -f conftest.err conftest.$ac_ext
8c5ff6dd 4428
eb697db5
DN
4429 # OK, works on sane cases. Now check whether nonexistent headers
4430 # can be detected and how.
4431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 4432/* end confdefs.h. */
eb697db5 4433#include <ac_nonexistent.h>
8c5ff6dd 4434_ACEOF
eb697db5
DN
4435if ac_fn_c_try_cpp "$LINENO"; then :
4436 # Broken: success on invalid input.
4437continue
a5edbe4a 4438else
eb697db5
DN
4439 # Passes both tests.
4440ac_preproc_ok=:
4441break
4442fi
4443rm -f conftest.err conftest.$ac_ext
e6df49e4 4444
eb697db5
DN
4445done
4446# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4447rm -f conftest.err conftest.$ac_ext
4448if $ac_preproc_ok; then :
cd03c74a 4449
eb697db5
DN
4450else
4451 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4453as_fn_error "C preprocessor \"$CPP\" fails sanity check
4454See \`config.log' for more details." "$LINENO" 5; }
a4f64981 4455fi
e6df49e4 4456
eb697db5
DN
4457ac_ext=c
4458ac_cpp='$CPP $CPPFLAGS'
4459ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4460ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4461ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 4462
a5edbe4a 4463
eb697db5
DN
4464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4465$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4466if test "${ac_cv_path_GREP+set}" = set; then :
4467 $as_echo_n "(cached) " >&6
4468else
4469 if test -z "$GREP"; then
4470 ac_path_GREP_found=false
4471 # Loop through the user's path and test for each of PROGNAME-LIST
4472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4473for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4474do
4475 IFS=$as_save_IFS
4476 test -z "$as_dir" && as_dir=.
4477 for ac_prog in grep ggrep; do
4478 for ac_exec_ext in '' $ac_executable_extensions; do
4479 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4480 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4481# Check for GNU ac_path_GREP and select it if it is found.
4482 # Check for GNU $ac_path_GREP
4483case `"$ac_path_GREP" --version 2>&1` in
4484*GNU*)
4485 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4486*)
4487 ac_count=0
4488 $as_echo_n 0123456789 >"conftest.in"
4489 while :
4490 do
4491 cat "conftest.in" "conftest.in" >"conftest.tmp"
4492 mv "conftest.tmp" "conftest.in"
4493 cp "conftest.in" "conftest.nl"
4494 $as_echo 'GREP' >> "conftest.nl"
4495 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4496 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4497 as_fn_arith $ac_count + 1 && ac_count=$as_val
4498 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4499 # Best one so far, save it but keep looking for a better one
4500 ac_cv_path_GREP="$ac_path_GREP"
4501 ac_path_GREP_max=$ac_count
4502 fi
4503 # 10*(2^10) chars as input seems more than enough
4504 test $ac_count -gt 10 && break
4505 done
4506 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
91e84f96 4507esac
6da23aaa 4508
eb697db5
DN
4509 $ac_path_GREP_found && break 3
4510 done
4511 done
4512 done
4513IFS=$as_save_IFS
4514 if test -z "$ac_cv_path_GREP"; then
4515 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5929fbe7 4516 fi
eb697db5
DN
4517else
4518 ac_cv_path_GREP=$GREP
6da23aaa
EZ
4519fi
4520
6da23aaa 4521fi
eb697db5
DN
4522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4523$as_echo "$ac_cv_path_GREP" >&6; }
4524 GREP="$ac_cv_path_GREP"
15e12598 4525
8c5ff6dd 4526
eb697db5
DN
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4528$as_echo_n "checking for egrep... " >&6; }
4529if test "${ac_cv_path_EGREP+set}" = set; then :
6da23aaa
EZ
4530 $as_echo_n "(cached) " >&6
4531else
eb697db5
DN
4532 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4533 then ac_cv_path_EGREP="$GREP -E"
4534 else
4535 if test -z "$EGREP"; then
4536 ac_path_EGREP_found=false
4537 # Loop through the user's path and test for each of PROGNAME-LIST
8c5ff6dd 4538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 4539for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8c5ff6dd
KR
4540do
4541 IFS=$as_save_IFS
4542 test -z "$as_dir" && as_dir=.
eb697db5
DN
4543 for ac_prog in egrep; do
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4546 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4547# Check for GNU ac_path_EGREP and select it if it is found.
4548 # Check for GNU $ac_path_EGREP
4549case `"$ac_path_EGREP" --version 2>&1` in
4550*GNU*)
4551 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4552*)
4553 ac_count=0
4554 $as_echo_n 0123456789 >"conftest.in"
4555 while :
4556 do
4557 cat "conftest.in" "conftest.in" >"conftest.tmp"
4558 mv "conftest.tmp" "conftest.in"
4559 cp "conftest.in" "conftest.nl"
4560 $as_echo 'EGREP' >> "conftest.nl"
4561 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4562 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4563 as_fn_arith $ac_count + 1 && ac_count=$as_val
4564 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4565 # Best one so far, save it but keep looking for a better one
4566 ac_cv_path_EGREP="$ac_path_EGREP"
4567 ac_path_EGREP_max=$ac_count
4568 fi
4569 # 10*(2^10) chars as input seems more than enough
4570 test $ac_count -gt 10 && break
4571 done
4572 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
91e84f96 4573esac
91e84f96 4574
eb697db5
DN
4575 $ac_path_EGREP_found && break 3
4576 done
4577 done
4578 done
5929fbe7 4579IFS=$as_save_IFS
eb697db5
DN
4580 if test -z "$ac_cv_path_EGREP"; then
4581 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4582 fi
4583else
4584 ac_cv_path_EGREP=$EGREP
84e70f78 4585fi
91e84f96 4586
eb697db5 4587 fi
bf89cb4d 4588fi
eb697db5
DN
4589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4590$as_echo "$ac_cv_path_EGREP" >&6; }
4591 EGREP="$ac_cv_path_EGREP"
84e70f78 4592
eb697db5
DN
4593
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4595$as_echo_n "checking for ANSI C header files... " >&6; }
4596if test "${ac_cv_header_stdc+set}" = set; then :
0ca10bb7
RC
4597 $as_echo_n "(cached) " >&6
4598else
eb697db5 4599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 4600/* end confdefs.h. */
eb697db5
DN
4601#include <stdlib.h>
4602#include <stdarg.h>
4603#include <string.h>
4604#include <float.h>
4605
0ca10bb7
RC
4606int
4607main ()
4608{
eb697db5 4609
bf89cb4d
GM
4610 ;
4611 return 0;
0ca10bb7
RC
4612}
4613_ACEOF
eb697db5
DN
4614if ac_fn_c_try_compile "$LINENO"; then :
4615 ac_cv_header_stdc=yes
0ca10bb7 4616else
eb697db5 4617 ac_cv_header_stdc=no
0ca10bb7 4618fi
91e84f96 4619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bc3512d0 4620
eb697db5
DN
4621if test $ac_cv_header_stdc = yes; then
4622 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4624/* end confdefs.h. */
4625#include <string.h>
91e84f96 4626
503d2be0 4627_ACEOF
eb697db5
DN
4628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4629 $EGREP "memchr" >/dev/null 2>&1; then :
6da23aaa 4630
eb697db5
DN
4631else
4632 ac_cv_header_stdc=no
4633fi
4634rm -f conftest*
a21616bd 4635
a21616bd
KR
4636fi
4637
eb697db5
DN
4638if test $ac_cv_header_stdc = yes; then
4639 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4641/* end confdefs.h. */
eb697db5 4642#include <stdlib.h>
6da23aaa 4643
91e84f96 4644_ACEOF
eb697db5
DN
4645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4646 $EGREP "free" >/dev/null 2>&1; then :
6da23aaa
EZ
4647
4648else
eb697db5 4649 ac_cv_header_stdc=no
91e84f96 4650fi
eb697db5 4651rm -f conftest*
a21616bd 4652
a21616bd
KR
4653fi
4654
eb697db5
DN
4655if test $ac_cv_header_stdc = yes; then
4656 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4657 if test "$cross_compiling" = yes; then :
4658 :
4659else
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4661/* end confdefs.h. */
eb697db5
DN
4662#include <ctype.h>
4663#include <stdlib.h>
4664#if ((' ' & 0x0FF) == 0x020)
4665# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4666# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4667#else
4668# define ISLOWER(c) \
4669 (('a' <= (c) && (c) <= 'i') \
4670 || ('j' <= (c) && (c) <= 'r') \
4671 || ('s' <= (c) && (c) <= 'z'))
4672# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4673#endif
bf89cb4d 4674
eb697db5 4675#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
4676int
4677main ()
4678{
eb697db5
DN
4679 int i;
4680 for (i = 0; i < 256; i++)
4681 if (XOR (islower (i), ISLOWER (i))
4682 || toupper (i) != TOUPPER (i))
4683 return 2;
91e84f96 4684 return 0;
503d2be0
AS
4685}
4686_ACEOF
eb697db5 4687if ac_fn_c_try_run "$LINENO"; then :
91e84f96 4688
eb697db5
DN
4689else
4690 ac_cv_header_stdc=no
4691fi
4692rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4693 conftest.$ac_objext conftest.beam conftest.$ac_ext
4694fi
ca81d7a0 4695
503d2be0 4696fi
eb697db5
DN
4697fi
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4699$as_echo "$ac_cv_header_stdc" >&6; }
4700if test $ac_cv_header_stdc = yes; then
a21616bd 4701
eb697db5 4702$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a21616bd 4703
eb697db5 4704fi
6da23aaa 4705
eb697db5
DN
4706# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4707for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4708 inttypes.h stdint.h unistd.h
4709do :
4710 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4711ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4712"
4713eval as_val=\$$as_ac_Header
4714 if test "x$as_val" = x""yes; then :
4715 cat >>confdefs.h <<_ACEOF
4716#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
91e84f96 4717_ACEOF
a21616bd 4718
6da23aaa
EZ
4719fi
4720
5929fbe7 4721done
91e84f96 4722
91e84f96 4723
c0d27fcc 4724
eb697db5
DN
4725 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4726if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4727 MINIX=yes
91e84f96 4728else
eb697db5 4729 MINIX=
0ca10bb7 4730fi
6da23aaa 4731
0ca10bb7 4732
eb697db5 4733 if test "$MINIX" = yes; then
6da23aaa 4734
eb697db5 4735$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6da23aaa 4736
6da23aaa 4737
eb697db5 4738$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
0ca10bb7 4739
6da23aaa 4740
eb697db5 4741$as_echo "#define _MINIX 1" >>confdefs.h
6da23aaa 4742
91e84f96 4743 fi
6da23aaa 4744
91e84f96 4745
eb697db5
DN
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4747$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4748if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
6da23aaa
EZ
4749 $as_echo_n "(cached) " >&6
4750else
eb697db5 4751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4752/* end confdefs.h. */
6da23aaa 4753
eb697db5
DN
4754# define __EXTENSIONS__ 1
4755 $ac_includes_default
5929fbe7
GM
4756int
4757main ()
4758{
eb697db5 4759
5929fbe7
GM
4760 ;
4761 return 0;
4762}
4763_ACEOF
eb697db5
DN
4764if ac_fn_c_try_compile "$LINENO"; then :
4765 ac_cv_safe_to_define___extensions__=yes
6da23aaa 4766else
eb697db5 4767 ac_cv_safe_to_define___extensions__=no
6da23aaa 4768fi
eb697db5 4769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9452ded1 4770fi
eb697db5
DN
4771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4772$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4773 test $ac_cv_safe_to_define___extensions__ = yes &&
4774 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6da23aaa 4775
eb697db5 4776 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6da23aaa 4777
eb697db5 4778 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
0ca10bb7 4779
eb697db5 4780 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6da23aaa 4781
eb697db5 4782 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6da23aaa 4783
91e84f96
GM
4784
4785
eb697db5
DN
4786### Use -Wno-pointer-sign if the compiler supports it
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
4788$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
4789SAVE_CFLAGS="$CFLAGS"
4790CFLAGS="$CFLAGS -Wno-pointer-sign"
4791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4792/* end confdefs.h. */
91e84f96 4793
eb697db5
DN
4794int
4795main ()
4796{
91e84f96 4797
eb697db5
DN
4798 ;
4799 return 0;
4800}
91e84f96 4801_ACEOF
eb697db5
DN
4802if ac_fn_c_try_compile "$LINENO"; then :
4803 has_option=yes
5929fbe7 4804else
eb697db5 4805 has_option=no
cd03c74a 4806fi
eb697db5
DN
4807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4808if test $has_option = yes; then
4809 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
5929fbe7 4810fi
eb697db5
DN
4811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4812$as_echo "$has_option" >&6; }
4813CFLAGS="$SAVE_CFLAGS"
4814unset has_option
4815unset SAVE_CFLAGS
4816
4817### Use -Wdeclaration-after-statement if the compiler supports it
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
4819$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4820SAVE_CFLAGS="$CFLAGS"
4821CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4823/* end confdefs.h. */
91e84f96 4824
91e84f96
GM
4825int
4826main ()
4827{
eb697db5 4828
91e84f96
GM
4829 ;
4830 return 0;
4831}
6da23aaa 4832_ACEOF
eb697db5
DN
4833if ac_fn_c_try_compile "$LINENO"; then :
4834 has_option=yes
91e84f96 4835else
eb697db5 4836 has_option=no
91e84f96 4837fi
eb697db5
DN
4838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4839if test $has_option = yes; then
4840 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
91e84f96 4841fi
eb697db5
DN
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4843$as_echo "$has_option" >&6; }
4844CFLAGS="$SAVE_CFLAGS"
4845unset has_option
4846unset SAVE_CFLAGS
6da23aaa 4847
45871610
DN
4848### Use -Wold-style-definition if the compiler supports it
4849# This can be removed when conversion to standard C is finished.
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5
4851$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; }
4852SAVE_CFLAGS="$CFLAGS"
4853CFLAGS="$CFLAGS -Wold-style-definition"
4854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4855/* end confdefs.h. */
4856
4857int
4858main ()
4859{
4860
4861 ;
4862 return 0;
4863}
4864_ACEOF
4865if ac_fn_c_try_compile "$LINENO"; then :
4866 has_option=yes
4867else
4868 has_option=no
4869fi
4870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871if test $has_option = yes; then
4872 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
4873fi
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4875$as_echo "$has_option" >&6; }
4876CFLAGS="$SAVE_CFLAGS"
4877unset has_option
4878unset SAVE_CFLAGS
4879
7908fb60
J
4880### Use -Wimplicit-function-declaration if the compiler supports it
4881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wimplicit-function-declaration" >&5
4882$as_echo_n "checking whether gcc understands -Wimplicit-function-declaration... " >&6; }
4883SAVE_CFLAGS="$CFLAGS"
4884CFLAGS="$CFLAGS -Wimplicit-function-declaration"
4885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4886/* end confdefs.h. */
4887
4888int
4889main ()
4890{
4891
4892 ;
4893 return 0;
4894}
4895_ACEOF
4896if ac_fn_c_try_compile "$LINENO"; then :
4897 has_option=yes
4898else
4899 has_option=no
4900fi
4901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4902if test $has_option = yes; then
4903 C_WARNINGS_SWITCH="-Wimplicit-function-declaration $C_WARNINGS_SWITCH"
4904fi
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4906$as_echo "$has_option" >&6; }
4907CFLAGS="$SAVE_CFLAGS"
4908unset has_option
4909unset SAVE_CFLAGS
4910
4911
45871610 4912
e6cfa7c3 4913
eb697db5 4914#### Some other nice autoconf tests.
e6df49e4 4915
eb697db5
DN
4916ac_ext=c
4917ac_cpp='$CPP $CPPFLAGS'
4918ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4919ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4920ac_compiler_gnu=$ac_cv_c_compiler_gnu
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4922$as_echo_n "checking how to run the C preprocessor... " >&6; }
4923# On Suns, sometimes $CPP names a directory.
4924if test -n "$CPP" && test -d "$CPP"; then
4925 CPP=
91e84f96 4926fi
eb697db5
DN
4927if test -z "$CPP"; then
4928 if test "${ac_cv_prog_CPP+set}" = set; then :
4929 $as_echo_n "(cached) " >&6
91e84f96 4930else
eb697db5
DN
4931 # Double quotes because CPP needs to be expanded
4932 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4933 do
4934 ac_preproc_ok=false
4935for ac_c_preproc_warn_flag in '' yes
4936do
4937 # Use a header file that comes with gcc, so configuring glibc
4938 # with a fresh cross-compiler works.
4939 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4940 # <limits.h> exists even on freestanding compilers.
4941 # On the NeXT, cc -E runs the code through the compiler's parser,
4942 # not just through cpp. "Syntax error" is here to catch this case.
4943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4944/* end confdefs.h. */
4945#ifdef __STDC__
4946# include <limits.h>
4947#else
4948# include <assert.h>
4949#endif
4950 Syntax error
91e84f96 4951_ACEOF
eb697db5 4952if ac_fn_c_try_cpp "$LINENO"; then :
15e12598 4953
eb697db5
DN
4954else
4955 # Broken: fails on valid input.
4956continue
8c5ff6dd 4957fi
eb697db5
DN
4958rm -f conftest.err conftest.$ac_ext
4959
4960 # OK, works on sane cases. Now check whether nonexistent headers
4961 # can be detected and how.
4962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 4963/* end confdefs.h. */
eb697db5 4964#include <ac_nonexistent.h>
6da23aaa 4965_ACEOF
eb697db5
DN
4966if ac_fn_c_try_cpp "$LINENO"; then :
4967 # Broken: success on invalid input.
4968continue
91e84f96 4969else
eb697db5
DN
4970 # Passes both tests.
4971ac_preproc_ok=:
4972break
a4f64981 4973fi
eb697db5 4974rm -f conftest.err conftest.$ac_ext
0ca10bb7 4975
eb697db5
DN
4976done
4977# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4978rm -f conftest.err conftest.$ac_ext
4979if $ac_preproc_ok; then :
4980 break
bf89cb4d 4981fi
0ca10bb7 4982
eb697db5
DN
4983 done
4984 ac_cv_prog_CPP=$CPP
91e84f96 4985
eb697db5
DN
4986fi
4987 CPP=$ac_cv_prog_CPP
4988else
4989 ac_cv_prog_CPP=$CPP
4990fi
4991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4992$as_echo "$CPP" >&6; }
4993ac_preproc_ok=false
4994for ac_c_preproc_warn_flag in '' yes
4995do
4996 # Use a header file that comes with gcc, so configuring glibc
4997 # with a fresh cross-compiler works.
4998 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4999 # <limits.h> exists even on freestanding compilers.
5000 # On the NeXT, cc -E runs the code through the compiler's parser,
5001 # not just through cpp. "Syntax error" is here to catch this case.
5002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 5003/* end confdefs.h. */
eb697db5
DN
5004#ifdef __STDC__
5005# include <limits.h>
5006#else
5007# include <assert.h>
5008#endif
5009 Syntax error
91e84f96 5010_ACEOF
eb697db5 5011if ac_fn_c_try_cpp "$LINENO"; then :
6da23aaa 5012
eb697db5
DN
5013else
5014 # Broken: fails on valid input.
5015continue
91e84f96 5016fi
eb697db5 5017rm -f conftest.err conftest.$ac_ext
6da23aaa 5018
eb697db5
DN
5019 # OK, works on sane cases. Now check whether nonexistent headers
5020 # can be detected and how.
5021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5022/* end confdefs.h. */
5023#include <ac_nonexistent.h>
5929fbe7 5024_ACEOF
eb697db5
DN
5025if ac_fn_c_try_cpp "$LINENO"; then :
5026 # Broken: success on invalid input.
5027continue
5028else
5029 # Passes both tests.
5030ac_preproc_ok=:
5031break
5032fi
91e84f96 5033rm -f conftest.err conftest.$ac_ext
6da23aaa 5034
eb697db5
DN
5035done
5036# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5037rm -f conftest.err conftest.$ac_ext
5038if $ac_preproc_ok; then :
6da23aaa 5039
91e84f96 5040else
eb697db5
DN
5041 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5042$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5043as_fn_error "C preprocessor \"$CPP\" fails sanity check
5044See \`config.log' for more details." "$LINENO" 5; }
91e84f96 5045fi
6da23aaa 5046
eb697db5
DN
5047ac_ext=c
5048ac_cpp='$CPP $CPPFLAGS'
5049ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5050ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5051ac_compiler_gnu=$ac_cv_c_compiler_gnu
5052
5053# Find a good install program. We prefer a C program (faster),
5054# so one script is as good as another. But avoid the broken or
5055# incompatible versions:
5056# SysV /etc/install, /usr/sbin/install
5057# SunOS /usr/etc/install
5058# IRIX /sbin/install
5059# AIX /bin/install
5060# AmigaOS /C/install, which installs bootblocks on floppy discs
5061# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5062# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5063# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5064# OS/2's system install, which has a completely different semantic
5065# ./install, which can be erroneously created by make from ./install.sh.
5066# Reject install programs that cannot install multiple files.
5067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5068$as_echo_n "checking for a BSD-compatible install... " >&6; }
5069if test -z "$INSTALL"; then
5070if test "${ac_cv_path_install+set}" = set; then :
91e84f96
GM
5071 $as_echo_n "(cached) " >&6
5072else
eb697db5
DN
5073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076 IFS=$as_save_IFS
5077 test -z "$as_dir" && as_dir=.
5078 # Account for people who put trailing slashes in PATH elements.
5079case $as_dir/ in #((
5080 ./ | .// | /[cC]/* | \
5081 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5082 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5083 /usr/ucb/* ) ;;
5084 *)
5085 # OSF1 and SCO ODT 3.0 have their own names for install.
5086 # Don't use installbsd from OSF since it installs stuff as root
5087 # by default.
5088 for ac_prog in ginstall scoinst install; do
5089 for ac_exec_ext in '' $ac_executable_extensions; do
5090 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5091 if test $ac_prog = install &&
5092 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5093 # AIX install. It has an incompatible calling convention.
5094 :
5095 elif test $ac_prog = install &&
5096 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5097 # program-specific install script used by HP pwplus--don't use.
5098 :
5099 else
5100 rm -rf conftest.one conftest.two conftest.dir
5101 echo one > conftest.one
5102 echo two > conftest.two
5103 mkdir conftest.dir
5104 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5105 test -s conftest.one && test -s conftest.two &&
5106 test -s conftest.dir/conftest.one &&
5107 test -s conftest.dir/conftest.two
5108 then
5109 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5110 break 3
5111 fi
5112 fi
5113 fi
5114 done
5115 done
5116 ;;
91e84f96 5117esac
6da23aaa 5118
eb697db5
DN
5119 done
5120IFS=$as_save_IFS
0ca10bb7 5121
eb697db5 5122rm -rf conftest.one conftest.two conftest.dir
91e84f96
GM
5123
5124fi
eb697db5
DN
5125 if test "${ac_cv_path_install+set}" = set; then
5126 INSTALL=$ac_cv_path_install
5127 else
5128 # As a last resort, use the slow shell script. Don't cache a
5129 # value for INSTALL within a source directory, because that will
5130 # break other packages using the cache if that directory is
5131 # removed, or if the value is a relative name.
5132 INSTALL=$ac_install_sh
5133 fi
5134fi
5135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5136$as_echo "$INSTALL" >&6; }
6da23aaa 5137
eb697db5
DN
5138# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5139# It thinks the first close brace ends the variable substitution.
5140test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6da23aaa 5141
eb697db5 5142test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6da23aaa 5143
eb697db5 5144test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6da23aaa 5145
eb697db5
DN
5146if test "x$RANLIB" = x; then
5147 if test -n "$ac_tool_prefix"; then
5148 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5149set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
91e84f96 5151$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5152if test "${ac_cv_prog_RANLIB+set}" = set; then :
e9a63f04 5153 $as_echo_n "(cached) " >&6
a21616bd 5154else
eb697db5
DN
5155 if test -n "$RANLIB"; then
5156 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5157else
5158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91e84f96
GM
5159for as_dir in $PATH
5160do
5161 IFS=$as_save_IFS
5162 test -z "$as_dir" && as_dir=.
eb697db5 5163 for ac_exec_ext in '' $ac_executable_extensions; do
91e84f96 5164 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5165 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
91e84f96
GM
5167 break 2
5168 fi
5169done
eb697db5 5170 done
91e84f96 5171IFS=$as_save_IFS
0ca10bb7 5172
91e84f96 5173fi
eb697db5
DN
5174fi
5175RANLIB=$ac_cv_prog_RANLIB
5176if test -n "$RANLIB"; then
5177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5178$as_echo "$RANLIB" >&6; }
91e84f96 5179else
eb697db5 5180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
91e84f96
GM
5181$as_echo "no" >&6; }
5182fi
6da23aaa 5183
0ca10bb7 5184
eb697db5
DN
5185fi
5186if test -z "$ac_cv_prog_RANLIB"; then
5187 ac_ct_RANLIB=$RANLIB
5188 # Extract the first word of "ranlib", so it can be a program name with args.
5189set dummy ranlib; ac_word=$2
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5191$as_echo_n "checking for $ac_word... " >&6; }
5192if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
91e84f96
GM
5193 $as_echo_n "(cached) " >&6
5194else
eb697db5
DN
5195 if test -n "$ac_ct_RANLIB"; then
5196 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
91e84f96 5197else
eb697db5
DN
5198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201 IFS=$as_save_IFS
5202 test -z "$as_dir" && as_dir=.
5203 for ac_exec_ext in '' $ac_executable_extensions; do
5204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5205 ac_cv_prog_ac_ct_RANLIB="ranlib"
5206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5207 break 2
5208 fi
5209done
5210 done
5211IFS=$as_save_IFS
91e84f96 5212
91e84f96 5213fi
91e84f96 5214fi
eb697db5
DN
5215ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5216if test -n "$ac_ct_RANLIB"; then
5217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5218$as_echo "$ac_ct_RANLIB" >&6; }
91e84f96 5219else
eb697db5 5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5221$as_echo "no" >&6; }
91e84f96
GM
5222fi
5223
eb697db5
DN
5224 if test "x$ac_ct_RANLIB" = x; then
5225 RANLIB=":"
5226 else
5227 case $cross_compiling:$ac_tool_warned in
5228yes:)
5229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5231ac_tool_warned=yes ;;
5232esac
5233 RANLIB=$ac_ct_RANLIB
5234 fi
5235else
5236 RANLIB="$ac_cv_prog_RANLIB"
5237fi
91e84f96 5238
eb697db5 5239fi
91e84f96 5240
eb697db5
DN
5241## Although we're running on an amd64 kernel, we're actually compiling for
5242## the x86 architecture. The user should probably have provided an
5243## explicit --build to `configure', but if everything else than the kernel
5244## is running in i386 mode, we can help them out.
5245if test "$machine" = "amdx86-64"; then
5246 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
5247if test "x$ac_cv_have_decl_i386" = x""yes; then :
91e84f96 5248
eb697db5 5249fi
91e84f96 5250
eb697db5
DN
5251 if test "$ac_cv_have_decl_i386" = "yes"; then
5252 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
5253 machine=intel386
5254 machfile="m/${machine}.h"
5929fbe7 5255 fi
eb697db5 5256fi
91e84f96 5257
eb697db5
DN
5258# Extract the first word of "install-info", so it can be a program name with args.
5259set dummy install-info; ac_word=$2
5260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
91e84f96 5261$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5262if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
91e84f96
GM
5263 $as_echo_n "(cached) " >&6
5264else
eb697db5 5265 case $INSTALL_INFO in
91e84f96 5266 [\\/]* | ?:[\\/]*)
eb697db5 5267 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
91e84f96
GM
5268 ;;
5269 *)
5270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5271for as_dir in $PATH
5272do
5273 IFS=$as_save_IFS
5274 test -z "$as_dir" && as_dir=.
eb697db5 5275 for ac_exec_ext in '' $ac_executable_extensions; do
91e84f96 5276 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5277 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5278 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
91e84f96
GM
5279 break 2
5280 fi
5281done
eb697db5 5282 done
91e84f96
GM
5283IFS=$as_save_IFS
5284
91e84f96
GM
5285 ;;
5286esac
5287fi
eb697db5
DN
5288INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5289if test -n "$INSTALL_INFO"; then
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5291$as_echo "$INSTALL_INFO" >&6; }
91e84f96 5292else
eb697db5 5293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
91e84f96 5294$as_echo "no" >&6; }
a4f64981 5295fi
15e12598
VB
5296
5297
eb697db5
DN
5298# Extract the first word of "install-info", so it can be a program name with args.
5299set dummy install-info; ac_word=$2
5300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 5301$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5302if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
91e84f96 5303 $as_echo_n "(cached) " >&6
91e84f96 5304else
eb697db5 5305 case $INSTALL_INFO in
5929fbe7 5306 [\\/]* | ?:[\\/]*)
eb697db5 5307 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5929fbe7
GM
5308 ;;
5309 *)
5310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 5311for as_dir in /usr/sbin
5929fbe7
GM
5312do
5313 IFS=$as_save_IFS
5314 test -z "$as_dir" && as_dir=.
eb697db5 5315 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 5316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5317 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7 5319 break 2
8c5ff6dd 5320 fi
5929fbe7 5321done
eb697db5 5322 done
5929fbe7 5323IFS=$as_save_IFS
91e84f96 5324
5929fbe7 5325 ;;
91e84f96 5326esac
91e84f96 5327fi
eb697db5
DN
5328INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5329if test -n "$INSTALL_INFO"; then
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5331$as_echo "$INSTALL_INFO" >&6; }
91e84f96 5332else
eb697db5 5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5334$as_echo "no" >&6; }
91e84f96 5335fi
91e84f96 5336
08b47d3d 5337
eb697db5
DN
5338# Extract the first word of "install-info", so it can be a program name with args.
5339set dummy install-info; ac_word=$2
5340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5341$as_echo_n "checking for $ac_word... " >&6; }
5342if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
91e84f96
GM
5343 $as_echo_n "(cached) " >&6
5344else
eb697db5
DN
5345 case $INSTALL_INFO in
5346 [\\/]* | ?:[\\/]*)
5347 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5348 ;;
5349 *)
5350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5351for as_dir in /sbin
5352do
5353 IFS=$as_save_IFS
5354 test -z "$as_dir" && as_dir=.
5355 for ac_exec_ext in '' $ac_executable_extensions; do
5356 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5357 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5358 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5359 break 2
5929fbe7 5360 fi
eb697db5
DN
5361done
5362 done
5363IFS=$as_save_IFS
91e84f96 5364
eb697db5
DN
5365 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5366 ;;
91e84f96 5367esac
91e84f96 5368fi
eb697db5
DN
5369INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5370if test -n "$INSTALL_INFO"; then
5371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5372$as_echo "$INSTALL_INFO" >&6; }
91e84f96 5373else
eb697db5
DN
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5375$as_echo "no" >&6; }
91e84f96 5376fi
91e84f96
GM
5377
5378
eb697db5
DN
5379# Extract the first word of "gzip", so it can be a program name with args.
5380set dummy gzip; ac_word=$2
5381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5382$as_echo_n "checking for $ac_word... " >&6; }
5383if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
5929fbe7 5384 $as_echo_n "(cached) " >&6
5929fbe7 5385else
eb697db5
DN
5386 case $GZIP_PROG in
5387 [\\/]* | ?:[\\/]*)
5388 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
5389 ;;
5390 *)
5391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5392for as_dir in $PATH
5393do
5394 IFS=$as_save_IFS
5395 test -z "$as_dir" && as_dir=.
5396 for ac_exec_ext in '' $ac_executable_extensions; do
5397 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5398 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
5399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5400 break 2
91e84f96 5401 fi
eb697db5
DN
5402done
5403 done
5404IFS=$as_save_IFS
91e84f96 5405
eb697db5 5406 ;;
8c5ff6dd 5407esac
eb697db5
DN
5408fi
5409GZIP_PROG=$ac_cv_path_GZIP_PROG
5410if test -n "$GZIP_PROG"; then
5411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
5412$as_echo "$GZIP_PROG" >&6; }
5929fbe7 5413else
eb697db5
DN
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
5929fbe7 5416fi
91e84f96 5417
91e84f96 5418
91e84f96
GM
5419
5420
eb697db5
DN
5421## Need makeinfo >= 4.6 (?) to build the manuals.
5422# Extract the first word of "makeinfo", so it can be a program name with args.
5423set dummy makeinfo; ac_word=$2
5424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5425$as_echo_n "checking for $ac_word... " >&6; }
5426if test "${ac_cv_path_MAKEINFO+set}" = set; then :
91e84f96 5427 $as_echo_n "(cached) " >&6
91e84f96 5428else
eb697db5
DN
5429 case $MAKEINFO in
5430 [\\/]* | ?:[\\/]*)
5431 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5432 ;;
5433 *)
5434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5435for as_dir in $PATH
5436do
5437 IFS=$as_save_IFS
5438 test -z "$as_dir" && as_dir=.
5439 for ac_exec_ext in '' $ac_executable_extensions; do
5440 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5441 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5443 break 2
5444 fi
5445done
5446 done
5447IFS=$as_save_IFS
5929fbe7 5448
eb697db5
DN
5449 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5450 ;;
91e84f96 5451esac
eb697db5
DN
5452fi
5453MAKEINFO=$ac_cv_path_MAKEINFO
5454if test -n "$MAKEINFO"; then
5455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
5456$as_echo "$MAKEINFO" >&6; }
91e84f96 5457else
eb697db5
DN
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5459$as_echo "no" >&6; }
5460fi
91e84f96 5461
eb697db5
DN
5462
5463if test "$MAKEINFO" != "no" && \
5464 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
5465 MAKEINFO=no
91e84f96
GM
5466fi
5467
eb697db5
DN
5468## Makeinfo is unusual. For a released Emacs, the manuals are
5469## pre-built, and not deleted by the normal clean rules. makeinfo is
5470## therefore in the category of "special tools" not normally required, which
5471## configure does not have to check for (eg autoconf itself).
5472## In a Bazaar checkout on the other hand, the manuals are not included.
5473## So makeinfo is a requirement to build from Bazaar, and configure
5474## should test for it as it does for any other build requirement.
5475## We use the presence of $srcdir/info/emacs to distinguish a release,
5476## with pre-built manuals, from a Bazaar checkout.
5477if test "$MAKEINFO" = "no"; then
5478 if test "x${with_makeinfo}" = "xno"; then
5479 MAKEINFO=off
5480 elif test ! -e $srcdir/info/emacs; then
5481 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
5482source tree does not seem to have pre-built manuals in the \`info' directory.
5483Either install a suitable version of makeinfo, or re-run configure
5484with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
5485 fi
5929fbe7 5486fi
91e84f96 5487
91e84f96 5488
eb697db5
DN
5489if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5490then
5491 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
91e84f96
GM
5492fi
5493
eb697db5
DN
5494if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5495then
5496 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5929fbe7 5497fi
91e84f96 5498
91e84f96 5499
eb697db5
DN
5500late_LDFLAGS=$LDFLAGS
5501if test "$GCC" = yes; then
5502 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
91e84f96 5503else
eb697db5 5504 LDFLAGS="$LDFLAGS -znocombreloc"
91e84f96 5505fi
91e84f96 5506
eb697db5
DN
5507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
5508$as_echo_n "checking for -znocombreloc... " >&6; }
5509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 5510/* end confdefs.h. */
eb697db5 5511main(){return 0;}
91e84f96 5512_ACEOF
eb697db5
DN
5513if ac_fn_c_try_link "$LINENO"; then :
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5515$as_echo "yes" >&6; }
91e84f96 5516else
eb697db5
DN
5517 LDFLAGS=$late_LDFLAGS
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5519$as_echo "no" >&6; }
91e84f96 5520fi
eb697db5
DN
5521rm -f core conftest.err conftest.$ac_objext \
5522 conftest$ac_exeext conftest.$ac_ext
91e84f96 5523
91e84f96 5524
eb697db5
DN
5525# The value of CPP is a quoted variable reference, so we need to do this
5526# to get its actual value...
5527CPP=`eval "echo $CPP"`
91e84f96 5528
91e84f96 5529
e7586c7a
GM
5530CANNOT_DUMP=no
5531case "$opsys" in
5532 your-opsys-here)
5533 CANNOT_DUMP=yes
5534
5535$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
5536
5537 ;;
5538esac
5539
91e84f96 5540
eb697db5
DN
5541
5542UNEXEC_OBJ=unexelf.o
5543case "$opsys" in
52eeb591 5544 # MSDOS uses unexcoff.o
d734dbbd 5545 # MSWindows uses unexw32.o
eb697db5
DN
5546 aix4-2)
5547 UNEXEC_OBJ=unexaix.o
5548 ;;
5549 cygwin)
5550 UNEXEC_OBJ=unexcw.o
5551 ;;
5552 darwin)
5553 UNEXEC_OBJ=unexmacosx.o
5554 ;;
5555 hpux10-20 | hpux11)
5556 UNEXEC_OBJ=unexhp9k800.o
5557 ;;
5558 sol2-10)
5559 # Use the Solaris dldump() function, called from unexsol.c, to dump
5560 # emacs, instead of the generic ELF dump code found in unexelf.c.
5561 # The resulting binary has a complete symbol table, and is better
5562 # for debugging and other observability tools (debuggers, pstack, etc).
5563 #
5564 # If you encounter a problem using dldump(), please consider sending
5565 # a message to the OpenSolaris tools-linking mailing list:
5566 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
5567 #
5568 # It is likely that dldump() works with older Solaris too, but this has
5569 # not been tested, so for now this change is for Solaris 10 or newer.
5570 UNEXEC_OBJ=unexsol.o
5571 ;;
91e84f96 5572esac
91e84f96 5573
eb697db5
DN
5574LD_SWITCH_SYSTEM=
5575case "$opsys" in
5576 freebsd)
5577 ## Let `ld' find image libs and similar things in /usr/local/lib.
5578 ## The system compiler, GCC, has apparently been modified to not
5579 ## look there, contrary to what a stock GCC would do.
5580 LD_SWITCH_SYSTEM=-L/usr/local/lib
5581 ;;
91e84f96 5582
eb697db5
DN
5583 gnu-linux)
5584 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
5585 test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0"
5586 ;;
91e84f96 5587
eb697db5
DN
5588 netbsd)
5589 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
5590 ;;
91e84f96 5591
eb697db5
DN
5592 openbsd)
5593 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
5594 ## otherwise Emacs dumps core on elf systems.
5595 LD_SWITCH_SYSTEM="-Z"
5596 ;;
5597esac
91e84f96 5598
8c5ff6dd 5599
eb697db5 5600ac_link="$ac_link $LD_SWITCH_SYSTEM"
8c5ff6dd 5601
eb697db5
DN
5602## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
5603## which has not been defined yet. When this was handled with cpp,
5604## it was expanded to null when configure sourced the s/*.h file.
5605## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
5606## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
5607## (or somesuch), but because it is supposed to go at the _front_
5608## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
5609## Compare with the gnu-linux case below, which added to the end
5610## of LD_SWITCH_SYSTEM, and so can instead go at the front of
5611## LD_SWITCH_SYSTEM_TEMACS.
5612case "$opsys" in
5613 netbsd|openbsd)
5614 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
5615 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
91e84f96 5616esac
91e84f96 5617
91e84f96 5618
eb697db5
DN
5619C_SWITCH_MACHINE=
5620if test "$machine" = "alpha"; then
5621 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
5622if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8c5ff6dd 5623
91e84f96
GM
5624fi
5625
eb697db5
DN
5626 if test "$ac_cv_have_decl___ELF__" = "yes"; then
5627 ## With ELF, make sure that all common symbols get allocated to in the
5628 ## data section. Otherwise, the dump of temacs may miss variables in
5629 ## the shared library that have been initialized. For example, with
5630 ## GNU libc, __malloc_initialized would normally be resolved to the
5631 ## shared library's .bss section, which is fatal.
5632 if test "x$GCC" = "xyes"; then
5633 C_SWITCH_MACHINE="-fno-common"
5634 else
5635 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
91e84f96 5636 fi
eb697db5
DN
5637 else
5638 UNEXEC_OBJ=unexalpha.o
91e84f96 5639 fi
15e12598 5640fi
91e84f96 5641
91e84f96 5642
91e84f96
GM
5643
5644
eb697db5
DN
5645C_SWITCH_SYSTEM=
5646## Some programs in src produce warnings saying certain subprograms
5647## are too complex and need a MAXMEM value greater than 2000 for
5648## additional optimization. --nils@exp-math.uni-essen.de
5649test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
5650 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
5651## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
5652## It is redundant in glibc2, since we define _GNU_SOURCE.
91e84f96 5653
91e84f96 5654
91e84f96 5655
eb697db5
DN
5656LIBS_SYSTEM=
5657case "$opsys" in
5658 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
5659 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
91e84f96 5660
eb697db5 5661 freebsd) LIBS_SYSTEM="-lutil" ;;
91e84f96 5662
eb697db5 5663 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
91e84f96 5664
eb697db5 5665 sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;;
91e84f96 5666
eb697db5
DN
5667 ## Motif needs -lgen.
5668 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
91e84f96 5669esac
eb697db5
DN
5670
5671
5672
5673### Make sure subsequent tests use flags consistent with the build flags.
5674
5675if test x"${OVERRIDE_CPPFLAGS}" != x; then
5676 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
91e84f96 5677else
eb697db5 5678 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
91e84f96 5679fi
91e84f96 5680
a4f64981 5681
eb697db5
DN
5682
5683# Check whether --enable-largefile was given.
5684if test "${enable_largefile+set}" = set; then :
5685 enableval=$enable_largefile;
91e84f96 5686fi
a4f64981 5687
eb697db5 5688if test "$enable_largefile" != no; then
a4f64981 5689
eb697db5
DN
5690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5691$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5692if test "${ac_cv_sys_largefile_CC+set}" = set; then :
91e84f96
GM
5693 $as_echo_n "(cached) " >&6
5694else
eb697db5
DN
5695 ac_cv_sys_largefile_CC=no
5696 if test "$GCC" != yes; then
5697 ac_save_CC=$CC
5698 while :; do
5699 # IRIX 6.2 and later do not support large files by default,
5700 # so use the C compiler's -n32 option if that helps.
5701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 5702/* end confdefs.h. */
eb697db5
DN
5703#include <sys/types.h>
5704 /* Check that off_t can represent 2**63 - 1 correctly.
5705 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5706 since some C++ compilers masquerading as C compilers
5707 incorrectly reject 9223372036854775807. */
5708#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5709 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5710 && LARGE_OFF_T % 2147483647 == 1)
5711 ? 1 : -1];
91e84f96
GM
5712int
5713main ()
5714{
eb697db5 5715
91e84f96
GM
5716 ;
5717 return 0;
5718}
5719_ACEOF
eb697db5
DN
5720 if ac_fn_c_try_compile "$LINENO"; then :
5721 break
91e84f96 5722fi
eb697db5
DN
5723rm -f core conftest.err conftest.$ac_objext
5724 CC="$CC -n32"
5725 if ac_fn_c_try_compile "$LINENO"; then :
5726 ac_cv_sys_largefile_CC=' -n32'; break
91e84f96 5727fi
eb697db5
DN
5728rm -f core conftest.err conftest.$ac_objext
5729 break
5730 done
5731 CC=$ac_save_CC
5732 rm -f conftest.$ac_ext
5733 fi
91e84f96 5734fi
eb697db5
DN
5735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5736$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5737 if test "$ac_cv_sys_largefile_CC" != no; then
5738 CC=$CC$ac_cv_sys_largefile_CC
91e84f96
GM
5739 fi
5740
eb697db5
DN
5741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5742$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5743if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5744 $as_echo_n "(cached) " >&6
5745else
5746 while :; do
5747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5748/* end confdefs.h. */
5749#include <sys/types.h>
5750 /* Check that off_t can represent 2**63 - 1 correctly.
5751 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5752 since some C++ compilers masquerading as C compilers
5753 incorrectly reject 9223372036854775807. */
5754#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5755 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5756 && LARGE_OFF_T % 2147483647 == 1)
5757 ? 1 : -1];
5758int
5759main ()
5760{
91e84f96 5761
eb697db5
DN
5762 ;
5763 return 0;
5764}
91e84f96 5765_ACEOF
eb697db5
DN
5766if ac_fn_c_try_compile "$LINENO"; then :
5767 ac_cv_sys_file_offset_bits=no; break
91e84f96 5768fi
eb697db5
DN
5769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5771/* end confdefs.h. */
eb697db5
DN
5772#define _FILE_OFFSET_BITS 64
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}
5789_ACEOF
5790if ac_fn_c_try_compile "$LINENO"; then :
5791 ac_cv_sys_file_offset_bits=64; break
a4f64981 5792fi
eb697db5
DN
5793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5794 ac_cv_sys_file_offset_bits=unknown
5795 break
5796done
91e84f96 5797fi
eb697db5
DN
5798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5799$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5800case $ac_cv_sys_file_offset_bits in #(
5801 no | unknown) ;;
5802 *)
5803cat >>confdefs.h <<_ACEOF
5804#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5805_ACEOF
5806;;
5929fbe7 5807esac
eb697db5
DN
5808rm -rf conftest*
5809 if test $ac_cv_sys_file_offset_bits = unknown; then
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5811$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5812if test "${ac_cv_sys_large_files+set}" = set; then :
5929fbe7 5813 $as_echo_n "(cached) " >&6
91e84f96 5814else
eb697db5
DN
5815 while :; do
5816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5817/* end confdefs.h. */
5818#include <sys/types.h>
5819 /* Check that off_t can represent 2**63 - 1 correctly.
5820 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5821 since some C++ compilers masquerading as C compilers
5822 incorrectly reject 9223372036854775807. */
5823#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5824 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5825 && LARGE_OFF_T % 2147483647 == 1)
5826 ? 1 : -1];
5827int
5828main ()
5829{
8c5ff6dd 5830
eb697db5
DN
5831 ;
5832 return 0;
5833}
91e84f96 5834_ACEOF
eb697db5
DN
5835if ac_fn_c_try_compile "$LINENO"; then :
5836 ac_cv_sys_large_files=no; break
5837fi
5838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 5840/* end confdefs.h. */
eb697db5
DN
5841#define _LARGE_FILES 1
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];
8c5ff6dd
KR
5851int
5852main ()
5853{
eb697db5 5854
8c5ff6dd
KR
5855 ;
5856 return 0;
5857}
91e84f96 5858_ACEOF
eb697db5
DN
5859if ac_fn_c_try_compile "$LINENO"; then :
5860 ac_cv_sys_large_files=1; break
8c5ff6dd 5861fi
eb697db5
DN
5862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5863 ac_cv_sys_large_files=unknown
5864 break
5865done
5929fbe7 5866fi
eb697db5
DN
5867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5868$as_echo "$ac_cv_sys_large_files" >&6; }
5869case $ac_cv_sys_large_files in #(
5870 no | unknown) ;;
5871 *)
5872cat >>confdefs.h <<_ACEOF
5873#define _LARGE_FILES $ac_cv_sys_large_files
5874_ACEOF
5875;;
91e84f96 5876esac
eb697db5
DN
5877rm -rf conftest*
5878 fi
91e84f96
GM
5879fi
5880
91e84f96 5881
5929fbe7 5882
eb697db5
DN
5883## If user specified a crt-dir, use that unconditionally.
5884if test "X$CRT_DIR" = "X"; then
5929fbe7 5885
eb697db5
DN
5886 case "$canonical" in
5887 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
5888 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5889 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5890 ## For anything else (eg /usr/lib32), it is up the user to specify
5891 ## the location (bug#5655).
5892 ## Test for crtn.o, not just the directory, because sometimes the
5893 ## directory exists but does not have the relevant files (bug#1287).
5894 ## FIXME better to test for binary compatibility somehow.
5895 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5896 ;;
5929fbe7 5897
eb697db5
DN
5898 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
5899 esac
e6df49e4 5900
eb697db5
DN
5901 case "$opsys" in
5902 hpux10-20) CRT_DIR=/lib ;;
5903 esac
15e12598 5904
eb697db5
DN
5905 ## Default is /usr/lib.
5906 test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
8c5ff6dd 5907
91e84f96 5908else
91e84f96 5909
eb697db5
DN
5910 ## Some platforms don't use any of these files, so it is not
5911 ## appropriate to put this test outside the if block.
5912 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
5913 as_fn_error "crt*.o not found in specified location." "$LINENO" 5
5914
91e84f96
GM
5915fi
5916
91e84f96 5917
91e84f96 5918
eb697db5
DN
5919LIB_MATH=-lm
5920LIB_STANDARD=
5921START_FILES=
5922
5923case $opsys in
5924 cygwin )
5925 LIB_MATH=
921d40b4 5926 START_FILES='pre-crt0.o'
eb697db5
DN
5927 ;;
5928 darwin )
5929 ## Adding -lm confuses the dynamic linker, so omit it.
5930 LIB_MATH=
5931 START_FILES='pre-crt0.o'
5932 ;;
5933 freebsd )
5934 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5935 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5936 ;;
5937 gnu-linux | gnu-kfreebsd )
5938 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
5939 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
5940 ;;
5941 hpux10-20 | hpux11 )
5942 LIB_STANDARD=-lc
5943 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
5944 ;;
5945 netbsd | openbsd )
5946 if test -f $CRT_DIR/crti.o; then
5947 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5948 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5949 else
5950 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
5951 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
5952 fi
91e84f96
GM
5953 ;;
5954esac
5929fbe7 5955
5929fbe7 5956
5929fbe7 5957
5929fbe7 5958
a4f64981 5959
5929fbe7 5960
e6df49e4 5961
eb697db5
DN
5962if test "${with_sound}" != "no"; then
5963 # Sound support for GNU/Linux and the free BSDs.
5964 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5965do :
5966 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5967ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5968eval as_val=\$$as_ac_Header
5969 if test "x$as_val" = x""yes; then :
5970 cat >>confdefs.h <<_ACEOF
5971#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5972_ACEOF
a46007e9 5973 have_sound_header=yes
91e84f96 5974fi
eb697db5
DN
5975
5976done
5977
5978 # Emulation library used on NetBSD.
5979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5980$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
5981if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
91e84f96
GM
5982 $as_echo_n "(cached) " >&6
5983else
5984 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
5985LIBS="-lossaudio $LIBS"
5986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
5987/* end confdefs.h. */
5988
5989/* Override any GCC internal prototype to avoid an error.
5990 Use char because int might match the return type of a GCC
5991 builtin and then its argument prototype would still apply. */
5992#ifdef __cplusplus
5993extern "C"
5994#endif
eb697db5 5995char _oss_ioctl ();
91e84f96
GM
5996int
5997main ()
5998{
eb697db5 5999return _oss_ioctl ();
91e84f96
GM
6000 ;
6001 return 0;
6002}
6003_ACEOF
eb697db5
DN
6004if ac_fn_c_try_link "$LINENO"; then :
6005 ac_cv_lib_ossaudio__oss_ioctl=yes
91e84f96 6006else
eb697db5 6007 ac_cv_lib_ossaudio__oss_ioctl=no
91e84f96 6008fi
eb697db5
DN
6009rm -f core conftest.err conftest.$ac_objext \
6010 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
6011LIBS=$ac_check_lib_save_LIBS
6012fi
eb697db5
DN
6013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6014$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
6015if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
6016 LIBSOUND=-lossaudio
91e84f96 6017else
eb697db5 6018 LIBSOUND=
91e84f96
GM
6019fi
6020
91e84f96
GM
6021
6022
eb697db5
DN
6023 ALSA_REQUIRED=1.0.0
6024 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
91e84f96 6025
eb697db5
DN
6026 succeeded=no
6027
6028 # Extract the first word of "pkg-config", so it can be a program name with args.
6029set dummy pkg-config; ac_word=$2
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
6033 $as_echo_n "(cached) " >&6
6034else
eb697db5
DN
6035 case $PKG_CONFIG in
6036 [\\/]* | ?:[\\/]*)
6037 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6038 ;;
6039 *)
6040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043 IFS=$as_save_IFS
6044 test -z "$as_dir" && as_dir=.
6045 for ac_exec_ext in '' $ac_executable_extensions; do
6046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6047 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049 break 2
6050 fi
6051done
6052 done
6053IFS=$as_save_IFS
91e84f96 6054
eb697db5
DN
6055 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6056 ;;
91e84f96 6057esac
91e84f96 6058fi
eb697db5
DN
6059PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6060if test -n "$PKG_CONFIG"; then
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6062$as_echo "$PKG_CONFIG" >&6; }
91e84f96 6063else
eb697db5
DN
6064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
91e84f96
GM
6066fi
6067
91e84f96 6068
91e84f96 6069
eb697db5
DN
6070 if test "$PKG_CONFIG" = "no" ; then
6071 HAVE_ALSA=no
6072 else
6073 PKG_CONFIG_MIN_VERSION=0.9.0
6074 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
6076$as_echo_n "checking for $ALSA_MODULES... " >&6; }
91e84f96 6077
eb697db5
DN
6078 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6080$as_echo "yes" >&6; }
6081 succeeded=yes
91e84f96 6082
eb697db5
DN
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
6084$as_echo_n "checking ALSA_CFLAGS... " >&6; }
6085 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
6087$as_echo "$ALSA_CFLAGS" >&6; }
91e84f96 6088
eb697db5
DN
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
6090$as_echo_n "checking ALSA_LIBS... " >&6; }
6091 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
6093$as_echo "$ALSA_LIBS" >&6; }
6094 else
6095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6096$as_echo "no" >&6; }
6097 ALSA_CFLAGS=""
6098 ALSA_LIBS=""
6099 ## If we have a custom action on failure, don't print errors, but
6100 ## do set a variable so people can do so.
6101 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
91e84f96 6102
eb697db5
DN
6103 fi
6104
6105
6106
6107 else
6108 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6109 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6110 fi
5929fbe7 6111 fi
4e569696 6112
eb697db5
DN
6113 if test $succeeded = yes; then
6114 HAVE_ALSA=yes
6115 else
6116 HAVE_ALSA=no
91e84f96 6117 fi
91e84f96 6118
eb697db5
DN
6119 if test $HAVE_ALSA = yes; then
6120 SAVE_CFLAGS="$CFLAGS"
6121 SAVE_LDFLAGS="$LDFLAGS"
6122 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6123 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6125/* end confdefs.h. */
eb697db5
DN
6126#include <asoundlib.h>
6127int
6128main ()
6129{
6130snd_lib_error_set_handler (0);
6131 ;
6132 return 0;
6133}
91e84f96 6134_ACEOF
eb697db5
DN
6135if ac_fn_c_try_compile "$LINENO"; then :
6136 emacs_alsa_normal=yes
91e84f96 6137else
eb697db5 6138 emacs_alsa_normal=no
91e84f96 6139fi
91e84f96 6140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6141 if test "$emacs_alsa_normal" != yes; then
6142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6143/* end confdefs.h. */
eb697db5
DN
6144#include <alsa/asoundlib.h>
6145int
6146main ()
6147{
6148snd_lib_error_set_handler (0);
6149 ;
6150 return 0;
6151}
91e84f96 6152_ACEOF
eb697db5
DN
6153if ac_fn_c_try_compile "$LINENO"; then :
6154 emacs_alsa_subdir=yes
91e84f96 6155else
eb697db5 6156 emacs_alsa_subdir=no
91e84f96 6157fi
eb697db5
DN
6158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6159 if test "$emacs_alsa_subdir" != yes; then
6160 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
6161 fi
6162 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6163 fi
91e84f96 6164
eb697db5
DN
6165 CFLAGS="$SAVE_CFLAGS"
6166 LDFLAGS="$SAVE_LDFLAGS"
6167 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6168 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
91e84f96 6169
eb697db5 6170$as_echo "#define HAVE_ALSA 1" >>confdefs.h
91e84f96 6171
eb697db5 6172 fi
91e84f96 6173
a46007e9
GM
6174 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
6175 case "$opsys" in
6176 gnu-linux|freebsd|netbsd)
6177
6178$as_echo "#define HAVE_SOUND 1" >>confdefs.h
6179
6180 ;;
6181 esac
6182 fi
6183
6184
91e84f96 6185fi
eb697db5
DN
6186
6187for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6188 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
6189 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
6190 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
3d608a86 6191 sys/utsname.h pwd.h utmp.h dirent.h util.h
eb697db5
DN
6192do :
6193 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6194ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6195eval as_val=\$$as_ac_Header
6196 if test "x$as_val" = x""yes; then :
6197 cat >>confdefs.h <<_ACEOF
6198#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
91e84f96 6199_ACEOF
91e84f96 6200
eb697db5
DN
6201fi
6202
6203done
6204
6205
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
6207$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
6208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6209/* end confdefs.h. */
6210#include <sys/personality.h>
91e84f96
GM
6211int
6212main ()
6213{
eb697db5 6214personality (PER_LINUX32)
91e84f96
GM
6215 ;
6216 return 0;
6217}
6218_ACEOF
eb697db5
DN
6219if ac_fn_c_try_compile "$LINENO"; then :
6220 emacs_cv_personality_linux32=yes
91e84f96 6221else
eb697db5 6222 emacs_cv_personality_linux32=no
91e84f96 6223fi
eb697db5
DN
6224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
6226$as_echo "$emacs_cv_personality_linux32" >&6; }
91e84f96 6227
eb697db5 6228if test $emacs_cv_personality_linux32 = yes; then
91e84f96 6229
eb697db5 6230$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
91e84f96 6231
eb697db5 6232fi
91e84f96 6233
eb697db5
DN
6234for ac_header in term.h
6235do :
6236 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6237if test "x$ac_cv_header_term_h" = x""yes; then :
6238 cat >>confdefs.h <<_ACEOF
6239#define HAVE_TERM_H 1
91e84f96
GM
6240_ACEOF
6241
91e84f96
GM
6242fi
6243
eb697db5 6244done
91e84f96 6245
eb697db5
DN
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6247$as_echo_n "checking for ANSI C header files... " >&6; }
6248if test "${ac_cv_header_stdc+set}" = set; then :
91e84f96 6249 $as_echo_n "(cached) " >&6
91e84f96 6250else
eb697db5 6251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6252/* end confdefs.h. */
eb697db5
DN
6253#include <stdlib.h>
6254#include <stdarg.h>
6255#include <string.h>
6256#include <float.h>
6257
6258int
6259main ()
6260{
6261
6262 ;
6263 return 0;
6264}
91e84f96 6265_ACEOF
eb697db5
DN
6266if ac_fn_c_try_compile "$LINENO"; then :
6267 ac_cv_header_stdc=yes
91e84f96 6268else
eb697db5 6269 ac_cv_header_stdc=no
91e84f96 6270fi
91e84f96 6271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6272
eb697db5
DN
6273if test $ac_cv_header_stdc = yes; then
6274 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6276/* end confdefs.h. */
eb697db5
DN
6277#include <string.h>
6278
91e84f96 6279_ACEOF
eb697db5
DN
6280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6281 $EGREP "memchr" >/dev/null 2>&1; then :
6282
5929fbe7 6283else
eb697db5
DN
6284 ac_cv_header_stdc=no
6285fi
6286rm -f conftest*
a4f64981 6287
8c5ff6dd 6288fi
a4f64981 6289
eb697db5
DN
6290if test $ac_cv_header_stdc = yes; then
6291 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6293/* end confdefs.h. */
eb697db5 6294#include <stdlib.h>
a4f64981 6295
91e84f96 6296_ACEOF
eb697db5
DN
6297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6298 $EGREP "free" >/dev/null 2>&1; then :
a4f64981 6299
91e84f96 6300else
eb697db5 6301 ac_cv_header_stdc=no
5929fbe7 6302fi
eb697db5 6303rm -f conftest*
91e84f96 6304
91e84f96
GM
6305fi
6306
eb697db5
DN
6307if test $ac_cv_header_stdc = yes; then
6308 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6309 if test "$cross_compiling" = yes; then :
6310 :
6311else
6312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6313/* end confdefs.h. */
6314#include <ctype.h>
6315#include <stdlib.h>
6316#if ((' ' & 0x0FF) == 0x020)
6317# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6318# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6319#else
6320# define ISLOWER(c) \
6321 (('a' <= (c) && (c) <= 'i') \
6322 || ('j' <= (c) && (c) <= 'r') \
6323 || ('s' <= (c) && (c) <= 'z'))
6324# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6325#endif
91e84f96 6326
eb697db5
DN
6327#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6328int
6329main ()
6330{
6331 int i;
6332 for (i = 0; i < 256; i++)
6333 if (XOR (islower (i), ISLOWER (i))
6334 || toupper (i) != TOUPPER (i))
6335 return 2;
6336 return 0;
6337}
8c5ff6dd 6338_ACEOF
eb697db5 6339if ac_fn_c_try_run "$LINENO"; then :
91e84f96 6340
91e84f96 6341else
eb697db5
DN
6342 ac_cv_header_stdc=no
6343fi
6344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6345 conftest.$ac_objext conftest.beam conftest.$ac_ext
91e84f96 6346fi
91e84f96
GM
6347
6348fi
eb697db5
DN
6349fi
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6351$as_echo "$ac_cv_header_stdc" >&6; }
6352if test $ac_cv_header_stdc = yes; then
91e84f96 6353
eb697db5 6354$as_echo "#define STDC_HEADERS 1" >>confdefs.h
91e84f96
GM
6355
6356fi
6357
eb697db5
DN
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
6359$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
6360if test "${ac_cv_header_time+set}" = set; then :
6361 $as_echo_n "(cached) " >&6
6362else
6363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6364/* end confdefs.h. */
6365#include <sys/types.h>
6366#include <sys/time.h>
6367#include <time.h>
91e84f96 6368
eb697db5
DN
6369int
6370main ()
6371{
6372if ((struct tm *) 0)
6373return 0;
6374 ;
6375 return 0;
6376}
8c5ff6dd 6377_ACEOF
eb697db5
DN
6378if ac_fn_c_try_compile "$LINENO"; then :
6379 ac_cv_header_time=yes
6380else
6381 ac_cv_header_time=no
6382fi
6383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6384fi
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
6386$as_echo "$ac_cv_header_time" >&6; }
6387if test $ac_cv_header_time = yes; then
91e84f96 6388
eb697db5 6389$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
91e84f96 6390
eb697db5 6391fi
91e84f96 6392
eb697db5
DN
6393ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6394if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6395 ac_have_decl=1
6396else
6397 ac_have_decl=0
6398fi
91e84f96 6399
eb697db5
DN
6400cat >>confdefs.h <<_ACEOF
6401#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
91e84f96
GM
6402_ACEOF
6403
eb697db5
DN
6404if test $ac_cv_have_decl_sys_siglist != yes; then
6405 # For Tru64, at least:
6406 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6407if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6408 ac_have_decl=1
6409else
6410 ac_have_decl=0
6411fi
91e84f96 6412
eb697db5
DN
6413cat >>confdefs.h <<_ACEOF
6414#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
91e84f96
GM
6415_ACEOF
6416
eb697db5 6417 if test $ac_cv_have_decl___sys_siglist = yes; then
91e84f96 6418
eb697db5 6419$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
91e84f96
GM
6420
6421 fi
91e84f96 6422fi
eb697db5
DN
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
6424$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
6425if test "${ac_cv_header_sys_wait_h+set}" = set; then :
91e84f96 6426 $as_echo_n "(cached) " >&6
91e84f96 6427else
eb697db5 6428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6429/* end confdefs.h. */
eb697db5
DN
6430#include <sys/types.h>
6431#include <sys/wait.h>
6432#ifndef WEXITSTATUS
6433# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6434#endif
6435#ifndef WIFEXITED
6436# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6437#endif
6438
6439int
6440main ()
6441{
6442 int s;
6443 wait (&s);
6444 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6445 ;
6446 return 0;
6447}
91e84f96 6448_ACEOF
eb697db5
DN
6449if ac_fn_c_try_compile "$LINENO"; then :
6450 ac_cv_header_sys_wait_h=yes
91e84f96 6451else
eb697db5 6452 ac_cv_header_sys_wait_h=no
91e84f96 6453fi
91e84f96 6454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6455fi
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
6457$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6458if test $ac_cv_header_sys_wait_h = yes; then
91e84f96 6459
eb697db5 6460$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
91e84f96 6461
91e84f96
GM
6462fi
6463
91e84f96 6464
eb697db5
DN
6465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
6466$as_echo_n "checking for struct utimbuf... " >&6; }
6467if test "${emacs_cv_struct_utimbuf+set}" = set; then :
91e84f96
GM
6468 $as_echo_n "(cached) " >&6
6469else
eb697db5
DN
6470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6471/* end confdefs.h. */
6472#ifdef TIME_WITH_SYS_TIME
6473#include <sys/time.h>
6474#include <time.h>
6475#else
6476#ifdef HAVE_SYS_TIME_H
6477#include <sys/time.h>
6478#else
6479#include <time.h>
6480#endif
6481#endif
6482#ifdef HAVE_UTIME_H
6483#include <utime.h>
6484#endif
6485int
6486main ()
6487{
6488static struct utimbuf x; x.actime = x.modtime;
6489 ;
6490 return 0;
6491}
6492_ACEOF
6493if ac_fn_c_try_compile "$LINENO"; then :
6494 emacs_cv_struct_utimbuf=yes
6495else
6496 emacs_cv_struct_utimbuf=no
6497fi
6498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6499fi
eb697db5
DN
6500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
6501$as_echo "$emacs_cv_struct_utimbuf" >&6; }
6502if test $emacs_cv_struct_utimbuf = yes; then
6503
6504$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
91e84f96
GM
6505
6506fi
eb697db5
DN
6507
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6509$as_echo_n "checking return type of signal handlers... " >&6; }
6510if test "${ac_cv_type_signal+set}" = set; then :
91e84f96
GM
6511 $as_echo_n "(cached) " >&6
6512else
eb697db5 6513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6514/* end confdefs.h. */
eb697db5
DN
6515#include <sys/types.h>
6516#include <signal.h>
91e84f96 6517
91e84f96
GM
6518int
6519main ()
6520{
eb697db5 6521return *(signal (0, 0)) (0) == 1;
91e84f96
GM
6522 ;
6523 return 0;
6524}
6525_ACEOF
eb697db5
DN
6526if ac_fn_c_try_compile "$LINENO"; then :
6527 ac_cv_type_signal=int
91e84f96 6528else
eb697db5 6529 ac_cv_type_signal=void
91e84f96 6530fi
eb697db5 6531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6532fi
eb697db5
DN
6533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6534$as_echo "$ac_cv_type_signal" >&6; }
91e84f96 6535
eb697db5
DN
6536cat >>confdefs.h <<_ACEOF
6537#define RETSIGTYPE $ac_cv_type_signal
5929fbe7 6538_ACEOF
91e84f96
GM
6539
6540
91e84f96 6541
eb697db5
DN
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
6543$as_echo_n "checking for speed_t... " >&6; }
6544if test "${emacs_cv_speed_t+set}" = set; then :
e6df49e4
GM
6545 $as_echo_n "(cached) " >&6
6546else
eb697db5 6547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 6548/* end confdefs.h. */
eb697db5 6549#include <termios.h>
8c5ff6dd
KR
6550int
6551main ()
6552{
eb697db5 6553speed_t x = 1;
8c5ff6dd
KR
6554 ;
6555 return 0;
6556}
91e84f96 6557_ACEOF
eb697db5
DN
6558if ac_fn_c_try_compile "$LINENO"; then :
6559 emacs_cv_speed_t=yes
8c5ff6dd 6560else
eb697db5 6561 emacs_cv_speed_t=no
8c5ff6dd 6562fi
eb697db5 6563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6564fi
eb697db5
DN
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
6566$as_echo "$emacs_cv_speed_t" >&6; }
6567if test $emacs_cv_speed_t = yes; then
91e84f96 6568
eb697db5 6569$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
a4f64981 6570
8c5ff6dd
KR
6571fi
6572
eb697db5
DN
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
6574$as_echo_n "checking for struct timeval... " >&6; }
6575if test "${emacs_cv_struct_timeval+set}" = set; then :
91e84f96
GM
6576 $as_echo_n "(cached) " >&6
6577else
eb697db5 6578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6579/* end confdefs.h. */
eb697db5
DN
6580#ifdef TIME_WITH_SYS_TIME
6581#include <sys/time.h>
6582#include <time.h>
6583#else
6584#ifdef HAVE_SYS_TIME_H
6585#include <sys/time.h>
6586#else
6587#include <time.h>
6588#endif
6589#endif
91e84f96
GM
6590int
6591main ()
6592{
eb697db5 6593static struct timeval x; x.tv_sec = x.tv_usec;
91e84f96
GM
6594 ;
6595 return 0;
6596}
6597_ACEOF
eb697db5
DN
6598if ac_fn_c_try_compile "$LINENO"; then :
6599 emacs_cv_struct_timeval=yes
91e84f96 6600else
eb697db5 6601 emacs_cv_struct_timeval=no
91e84f96 6602fi
eb697db5 6603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6604fi
eb697db5
DN
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
6606$as_echo "$emacs_cv_struct_timeval" >&6; }
6607HAVE_TIMEVAL=$emacs_cv_struct_timeval
6608if test $emacs_cv_struct_timeval = yes; then
91e84f96 6609
eb697db5 6610$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
91e84f96
GM
6611
6612fi
6613
eb697db5
DN
6614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
6615$as_echo_n "checking for struct exception... " >&6; }
6616if test "${emacs_cv_struct_exception+set}" = set; then :
91e84f96
GM
6617 $as_echo_n "(cached) " >&6
6618else
eb697db5 6619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6620/* end confdefs.h. */
eb697db5 6621#include <math.h>
91e84f96
GM
6622int
6623main ()
6624{
eb697db5 6625static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
91e84f96
GM
6626 ;
6627 return 0;
6628}
6629_ACEOF
eb697db5
DN
6630if ac_fn_c_try_compile "$LINENO"; then :
6631 emacs_cv_struct_exception=yes
91e84f96 6632else
eb697db5
DN
6633 emacs_cv_struct_exception=no
6634fi
6635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6636fi
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
6638$as_echo "$emacs_cv_struct_exception" >&6; }
6639HAVE_EXCEPTION=$emacs_cv_struct_exception
6640if test $emacs_cv_struct_exception != yes; then
6641
6642$as_echo "#define NO_MATHERR 1" >>confdefs.h
91e84f96 6643
91e84f96
GM
6644fi
6645
eb697db5
DN
6646for ac_header in sys/socket.h
6647do :
6648 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6649if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
6650 cat >>confdefs.h <<_ACEOF
6651#define HAVE_SYS_SOCKET_H 1
6652_ACEOF
6653
91e84f96 6654fi
91e84f96 6655
eb697db5
DN
6656done
6657
6658for ac_header in net/if.h
6659do :
6660 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
6661#if HAVE_SYS_SOCKET_H
6662#include <sys/socket.h>
6663#endif
6664"
6665if test "x$ac_cv_header_net_if_h" = x""yes; then :
6666 cat >>confdefs.h <<_ACEOF
6667#define HAVE_NET_IF_H 1
91e84f96
GM
6668_ACEOF
6669
6670fi
6671
eb697db5
DN
6672done
6673
6674
6675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
6676$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
6677if test "${ac_cv_struct_tm+set}" = set; then :
91e84f96
GM
6678 $as_echo_n "(cached) " >&6
6679else
eb697db5 6680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6681/* end confdefs.h. */
eb697db5
DN
6682#include <sys/types.h>
6683#include <time.h>
91e84f96
GM
6684
6685int
6686main ()
6687{
eb697db5
DN
6688struct tm tm;
6689 int *p = &tm.tm_sec;
6690 return !p;
91e84f96
GM
6691 ;
6692 return 0;
6693}
6694_ACEOF
eb697db5
DN
6695if ac_fn_c_try_compile "$LINENO"; then :
6696 ac_cv_struct_tm=time.h
91e84f96 6697else
eb697db5 6698 ac_cv_struct_tm=sys/time.h
91e84f96 6699fi
eb697db5 6700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15e12598 6701fi
eb697db5
DN
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
6703$as_echo "$ac_cv_struct_tm" >&6; }
6704if test $ac_cv_struct_tm = sys/time.h; then
6705
6706$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
91e84f96 6707
91e84f96 6708fi
91e84f96 6709
eb697db5
DN
6710ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
6711#include <$ac_cv_struct_tm>
91e84f96 6712
eb697db5
DN
6713"
6714if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
a4f64981 6715
eb697db5
DN
6716cat >>confdefs.h <<_ACEOF
6717#define HAVE_STRUCT_TM_TM_ZONE 1
91e84f96
GM
6718_ACEOF
6719
91e84f96 6720
eb697db5 6721fi
91e84f96 6722
eb697db5 6723if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
91e84f96 6724
eb697db5 6725$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
91e84f96 6726
91e84f96 6727else
eb697db5
DN
6728 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6729"
6730if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6731 ac_have_decl=1
8c5ff6dd 6732else
eb697db5 6733 ac_have_decl=0
8c5ff6dd 6734fi
49ebbd65 6735
eb697db5
DN
6736cat >>confdefs.h <<_ACEOF
6737#define HAVE_DECL_TZNAME $ac_have_decl
91e84f96 6738_ACEOF
eb697db5
DN
6739
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6741$as_echo_n "checking for tzname... " >&6; }
6742if test "${ac_cv_var_tzname+set}" = set; then :
5929fbe7
GM
6743 $as_echo_n "(cached) " >&6
6744else
eb697db5 6745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6746/* end confdefs.h. */
eb697db5
DN
6747#include <time.h>
6748#if !HAVE_DECL_TZNAME
6749extern char *tzname[];
91e84f96
GM
6750#endif
6751
a4f64981
GM
6752int
6753main ()
6754{
eb697db5 6755return tzname[0][0];
a4f64981
GM
6756 ;
6757 return 0;
6758}
91e84f96 6759_ACEOF
eb697db5
DN
6760if ac_fn_c_try_link "$LINENO"; then :
6761 ac_cv_var_tzname=yes
91e84f96 6762else
eb697db5 6763 ac_cv_var_tzname=no
91e84f96 6764fi
eb697db5
DN
6765rm -f core conftest.err conftest.$ac_objext \
6766 conftest$ac_exeext conftest.$ac_ext
6767fi
6768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6769$as_echo "$ac_cv_var_tzname" >&6; }
6770 if test $ac_cv_var_tzname = yes; then
5929fbe7 6771
eb697db5
DN
6772$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6773
6774 fi
a4f64981 6775fi
aaa36002 6776
eb697db5
DN
6777ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6778"
6779if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
6780
6781$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
91e84f96
GM
6782
6783fi
eb697db5
DN
6784
6785ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6786#if HAVE_SYS_SOCKET_H
6787#include <sys/socket.h>
6788#endif
6789#if HAVE_NET_IF_H
6790#include <net/if.h>
6791#endif
6792"
6793if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
aaa36002 6794
5929fbe7 6795cat >>confdefs.h <<_ACEOF
eb697db5 6796#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
91e84f96 6797_ACEOF
91e84f96 6798
91e84f96 6799
8c5ff6dd 6800fi
eb697db5
DN
6801ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6802#if HAVE_SYS_SOCKET_H
6803#include <sys/socket.h>
6804#endif
6805#if HAVE_NET_IF_H
6806#include <net/if.h>
91e84f96 6807#endif
eb697db5
DN
6808"
6809if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
49ebbd65 6810
eb697db5
DN
6811cat >>confdefs.h <<_ACEOF
6812#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
5929fbe7 6813_ACEOF
91e84f96 6814
91e84f96 6815
8c5ff6dd 6816fi
eb697db5
DN
6817ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6818#if HAVE_SYS_SOCKET_H
6819#include <sys/socket.h>
91e84f96 6820#endif
eb697db5
DN
6821#if HAVE_NET_IF_H
6822#include <net/if.h>
91e84f96 6823#endif
eb697db5
DN
6824"
6825if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
91e84f96 6826
eb697db5
DN
6827cat >>confdefs.h <<_ACEOF
6828#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
91e84f96 6829_ACEOF
91e84f96 6830
5929fbe7 6831
91e84f96 6832fi
eb697db5
DN
6833ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6834#if HAVE_SYS_SOCKET_H
6835#include <sys/socket.h>
6836#endif
6837#if HAVE_NET_IF_H
6838#include <net/if.h>
6839#endif
6840"
6841if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
cd03c74a 6842
5929fbe7 6843cat >>confdefs.h <<_ACEOF
eb697db5 6844#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
5929fbe7 6845_ACEOF
49ebbd65 6846
91e84f96 6847
91e84f96 6848fi
eb697db5
DN
6849ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6850#if HAVE_SYS_SOCKET_H
6851#include <sys/socket.h>
6852#endif
6853#if HAVE_NET_IF_H
6854#include <net/if.h>
6855#endif
6856"
6857if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
91e84f96
GM
6858
6859cat >>confdefs.h <<_ACEOF
eb697db5 6860#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
91e84f96
GM
6861_ACEOF
6862
5929fbe7 6863
91e84f96
GM
6864fi
6865
5929fbe7 6866
5929fbe7 6867
eb697db5
DN
6868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6869$as_echo_n "checking for function prototypes... " >&6; }
6870if test "$ac_cv_prog_cc_c89" != no; then
6871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6872$as_echo "yes" >&6; }
5929fbe7 6873
eb697db5 6874$as_echo "#define PROTOTYPES 1" >>confdefs.h
5929fbe7 6875
5929fbe7 6876
eb697db5 6877$as_echo "#define __PROTOTYPES 1" >>confdefs.h
5929fbe7 6878
eb697db5
DN
6879else
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6881$as_echo "no" >&6; }
91e84f96
GM
6882fi
6883
eb697db5
DN
6884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6885$as_echo_n "checking for working volatile... " >&6; }
6886if test "${ac_cv_c_volatile+set}" = set; then :
91e84f96
GM
6887 $as_echo_n "(cached) " >&6
6888else
eb697db5 6889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 6890/* end confdefs.h. */
91e84f96
GM
6891
6892int
6893main ()
6894{
eb697db5
DN
6895
6896volatile int x;
6897int * volatile y = (int *) 0;
6898return !x && !y;
8c5ff6dd
KR
6899 ;
6900 return 0;
91e84f96
GM
6901}
6902_ACEOF
eb697db5
DN
6903if ac_fn_c_try_compile "$LINENO"; then :
6904 ac_cv_c_volatile=yes
91e84f96 6905else
eb697db5 6906 ac_cv_c_volatile=no
91e84f96 6907fi
eb697db5 6908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6909fi
eb697db5
DN
6910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6911$as_echo "$ac_cv_c_volatile" >&6; }
6912if test $ac_cv_c_volatile = no; then
91e84f96 6913
eb697db5 6914$as_echo "#define volatile /**/" >>confdefs.h
91e84f96 6915
91e84f96
GM
6916fi
6917
eb697db5
DN
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6919$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6920if test "${ac_cv_c_const+set}" = set; then :
91e84f96
GM
6921 $as_echo_n "(cached) " >&6
6922else
eb697db5 6923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
6924/* end confdefs.h. */
6925
91e84f96
GM
6926int
6927main ()
6928{
eb697db5
DN
6929/* FIXME: Include the comments suggested by Paul. */
6930#ifndef __cplusplus
6931 /* Ultrix mips cc rejects this. */
6932 typedef int charset[2];
6933 const charset cs;
6934 /* SunOS 4.1.1 cc rejects this. */
6935 char const *const *pcpcc;
6936 char **ppc;
6937 /* NEC SVR4.0.2 mips cc rejects this. */
6938 struct point {int x, y;};
6939 static struct point const zero = {0,0};
6940 /* AIX XL C 1.02.0.0 rejects this.
6941 It does not let you subtract one const X* pointer from another in
6942 an arm of an if-expression whose if-part is not a constant
6943 expression */
6944 const char *g = "string";
6945 pcpcc = &g + (g ? g-g : 0);
6946 /* HPUX 7.0 cc rejects these. */
6947 ++pcpcc;
6948 ppc = (char**) pcpcc;
6949 pcpcc = (char const *const *) ppc;
6950 { /* SCO 3.2v4 cc rejects this. */
6951 char *t;
6952 char const *s = 0 ? (char *) 0 : (char const *) 0;
6953
6954 *t++ = 0;
6955 if (s) return 0;
6956 }
6957 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6958 int x[] = {25, 17};
6959 const int *foo = &x[0];
6960 ++foo;
6961 }
6962 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6963 typedef const int *iptr;
6964 iptr p = 0;
6965 ++p;
6966 }
6967 { /* AIX XL C 1.02.0.0 rejects this saying
6968 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6969 struct s { int j; const int *ap[3]; };
6970 struct s *b; b->j = 5;
6971 }
6972 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6973 const int foo = 10;
6974 if (!foo) return 0;
6975 }
6976 return !cs[0] && !zero.x;
6977#endif
6978
91e84f96
GM
6979 ;
6980 return 0;
6981}
6982_ACEOF
eb697db5
DN
6983if ac_fn_c_try_compile "$LINENO"; then :
6984 ac_cv_c_const=yes
91e84f96 6985else
eb697db5 6986 ac_cv_c_const=no
91e84f96 6987fi
eb697db5 6988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 6989fi
eb697db5
DN
6990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6991$as_echo "$ac_cv_c_const" >&6; }
6992if test $ac_cv_c_const = no; then
91e84f96 6993
eb697db5 6994$as_echo "#define const /**/" >>confdefs.h
91e84f96
GM
6995
6996fi
6997
eb697db5
DN
6998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
6999$as_echo_n "checking for void * support... " >&6; }
7000if test "${emacs_cv_void_star+set}" = set; then :
91e84f96
GM
7001 $as_echo_n "(cached) " >&6
7002else
eb697db5 7003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
7004/* end confdefs.h. */
7005
91e84f96
GM
7006int
7007main ()
7008{
eb697db5 7009void * foo;
91e84f96
GM
7010 ;
7011 return 0;
7012}
7013_ACEOF
eb697db5
DN
7014if ac_fn_c_try_compile "$LINENO"; then :
7015 emacs_cv_void_star=yes
91e84f96 7016else
eb697db5 7017 emacs_cv_void_star=no
91e84f96 7018fi
eb697db5 7019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 7020fi
eb697db5
DN
7021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
7022$as_echo "$emacs_cv_void_star" >&6; }
7023if test $emacs_cv_void_star = yes; then
7024 $as_echo "#define POINTER_TYPE void" >>confdefs.h
7025
91e84f96 7026else
eb697db5 7027 $as_echo "#define POINTER_TYPE char" >>confdefs.h
15e12598 7028
91e84f96
GM
7029fi
7030
671d409f
AS
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
7032$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
7033if test "${ac_cv_c_bigendian+set}" = set; then :
7034 $as_echo_n "(cached) " >&6
7035else
7036 ac_cv_c_bigendian=unknown
7037 # See if we're dealing with a universal compiler.
7038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7039/* end confdefs.h. */
7040#ifndef __APPLE_CC__
7041 not a universal capable compiler
7042 #endif
7043 typedef int dummy;
7044
7045_ACEOF
7046if ac_fn_c_try_compile "$LINENO"; then :
7047
7048 # Check for potential -arch flags. It is not universal unless
7049 # there are at least two -arch flags with different values.
7050 ac_arch=
7051 ac_prev=
7052 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
7053 if test -n "$ac_prev"; then
7054 case $ac_word in
7055 i?86 | x86_64 | ppc | ppc64)
7056 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
7057 ac_arch=$ac_word
7058 else
7059 ac_cv_c_bigendian=universal
7060 break
7061 fi
7062 ;;
7063 esac
7064 ac_prev=
7065 elif test "x$ac_word" = "x-arch"; then
7066 ac_prev=arch
7067 fi
7068 done
7069fi
7070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7071 if test $ac_cv_c_bigendian = unknown; then
7072 # See if sys/param.h defines the BYTE_ORDER macro.
7073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7074/* end confdefs.h. */
7075#include <sys/types.h>
7076 #include <sys/param.h>
7077
7078int
7079main ()
7080{
7081#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
7082 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
7083 && LITTLE_ENDIAN)
7084 bogus endian macros
7085 #endif
7086
7087 ;
7088 return 0;
7089}
7090_ACEOF
7091if ac_fn_c_try_compile "$LINENO"; then :
7092 # It does; now see whether it defined to BIG_ENDIAN or not.
7093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7094/* end confdefs.h. */
7095#include <sys/types.h>
7096 #include <sys/param.h>
7097
7098int
7099main ()
7100{
7101#if BYTE_ORDER != BIG_ENDIAN
7102 not big endian
7103 #endif
7104
7105 ;
7106 return 0;
7107}
7108_ACEOF
7109if ac_fn_c_try_compile "$LINENO"; then :
7110 ac_cv_c_bigendian=yes
7111else
7112 ac_cv_c_bigendian=no
7113fi
7114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7115fi
7116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117 fi
7118 if test $ac_cv_c_bigendian = unknown; then
7119 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
7120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7121/* end confdefs.h. */
7122#include <limits.h>
7123
7124int
7125main ()
7126{
7127#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
7128 bogus endian macros
7129 #endif
7130
7131 ;
7132 return 0;
7133}
7134_ACEOF
7135if ac_fn_c_try_compile "$LINENO"; then :
7136 # It does; now see whether it defined to _BIG_ENDIAN or not.
7137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7138/* end confdefs.h. */
7139#include <limits.h>
7140
7141int
7142main ()
7143{
7144#ifndef _BIG_ENDIAN
7145 not big endian
7146 #endif
7147
7148 ;
7149 return 0;
7150}
7151_ACEOF
7152if ac_fn_c_try_compile "$LINENO"; then :
7153 ac_cv_c_bigendian=yes
7154else
7155 ac_cv_c_bigendian=no
7156fi
7157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7158fi
7159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7160 fi
7161 if test $ac_cv_c_bigendian = unknown; then
7162 # Compile a test program.
7163 if test "$cross_compiling" = yes; then :
7164 # Try to guess by grepping values from an object file.
7165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7166/* end confdefs.h. */
7167short int ascii_mm[] =
7168 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
7169 short int ascii_ii[] =
7170 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
7171 int use_ascii (int i) {
7172 return ascii_mm[i] + ascii_ii[i];
7173 }
7174 short int ebcdic_ii[] =
7175 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
7176 short int ebcdic_mm[] =
7177 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
7178 int use_ebcdic (int i) {
7179 return ebcdic_mm[i] + ebcdic_ii[i];
7180 }
7181 extern int foo;
7182
7183int
7184main ()
7185{
7186return use_ascii (foo) == use_ebcdic (foo);
7187 ;
7188 return 0;
7189}
7190_ACEOF
7191if ac_fn_c_try_compile "$LINENO"; then :
7192 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
7193 ac_cv_c_bigendian=yes
7194 fi
7195 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
7196 if test "$ac_cv_c_bigendian" = unknown; then
7197 ac_cv_c_bigendian=no
7198 else
7199 # finding both strings is unlikely to happen, but who knows?
7200 ac_cv_c_bigendian=unknown
7201 fi
7202 fi
7203fi
7204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7205else
7206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7207/* end confdefs.h. */
7208$ac_includes_default
7209int
7210main ()
7211{
7212
7213 /* Are we little or big endian? From Harbison&Steele. */
7214 union
7215 {
7216 long int l;
7217 char c[sizeof (long int)];
7218 } u;
7219 u.l = 1;
7220 return u.c[sizeof (long int) - 1] == 1;
7221
7222 ;
7223 return 0;
7224}
7225_ACEOF
7226if ac_fn_c_try_run "$LINENO"; then :
7227 ac_cv_c_bigendian=no
7228else
7229 ac_cv_c_bigendian=yes
7230fi
7231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7232 conftest.$ac_objext conftest.beam conftest.$ac_ext
7233fi
7234
7235 fi
7236fi
7237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
7238$as_echo "$ac_cv_c_bigendian" >&6; }
7239 case $ac_cv_c_bigendian in #(
7240 yes)
7241 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
7242;; #(
7243 no)
7244 ;; #(
7245 universal)
7246
7247$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
91e84f96 7248
671d409f
AS
7249 ;; #(
7250 *)
a8101f66 7251 as_fn_error "unknown endianness
671d409f
AS
7252 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
7253 esac
91e84f96 7254
eb697db5
DN
7255
7256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7257$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
7258set x ${MAKE-make}
7259ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
7260if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
91e84f96
GM
7261 $as_echo_n "(cached) " >&6
7262else
eb697db5
DN
7263 cat >conftest.make <<\_ACEOF
7264SHELL = /bin/sh
7265all:
7266 @echo '@@@%%%=$(MAKE)=@@@%%%'
91e84f96 7267_ACEOF
eb697db5
DN
7268# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7269case `${MAKE-make} -f conftest.make 2>/dev/null` in
7270 *@@@%%%=?*=@@@%%%*)
7271 eval ac_cv_prog_make_${ac_make}_set=yes;;
7272 *)
7273 eval ac_cv_prog_make_${ac_make}_set=no;;
5929fbe7 7274esac
eb697db5
DN
7275rm -f conftest.make
7276fi
7277if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7279$as_echo "yes" >&6; }
7280 SET_MAKE=
5929fbe7 7281else
eb697db5
DN
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283$as_echo "no" >&6; }
7284 SET_MAKE="MAKE=${MAKE-make}"
5929fbe7 7285fi
8c5ff6dd
KR
7286
7287
eb697db5
DN
7288DEPFLAGS=
7289MKDEPDIR=":"
7290deps_frag=deps.mk
7291if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
7292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
7293$as_echo_n "checking whether we are using GNU Make... " >&6; }
7294 HAVE_GNU_MAKE=no
7295 testval=`make --version 2>/dev/null | grep 'GNU Make'`
7296 if test "x$testval" != x; then
7297 HAVE_GNU_MAKE=yes
7298 else
7299 ac_enable_autodepend=no
7300 fi
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
7302$as_echo "$HAVE_GNU_MAKE" >&6; }
7303 if test $HAVE_GNU_MAKE = yes; then
7304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
7305$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
7306 SAVE_CFLAGS="$CFLAGS"
7307 CFLAGS="$CFLAGS -MMD -MF deps.d"
7308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
7309/* end confdefs.h. */
7310
91e84f96
GM
7311int
7312main ()
7313{
eb697db5 7314
91e84f96
GM
7315 ;
7316 return 0;
7317}
7318_ACEOF
eb697db5 7319if ac_fn_c_try_compile "$LINENO"; then :
91e84f96 7320
91e84f96 7321else
eb697db5
DN
7322 ac_enable_autodepend=no
7323fi
7324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7325 CFLAGS="$SAVE_CFLAGS"
7326 test -f deps.d || ac_enable_autodepend=no
7327 rm -rf deps.d
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
7329$as_echo "$ac_enable_autodepend" >&6; }
7330 fi
7331 if test $ac_enable_autodepend = yes; then
7332 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
7333 ## In parallel builds, another make might create depdir between
7334 ## the first test and mkdir, so stick another test on the end.
7335 ## Or use mkinstalldirs? mkdir -p is not portable.
7336 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
7337 deps_frag=autodeps.mk
7338 fi
91e84f96 7339fi
eb697db5 7340deps_frag=$srcdir/src/$deps_frag
91e84f96 7341
91e84f96 7342
91e84f96 7343
eb697db5
DN
7344
7345
7346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
7347$as_echo_n "checking for long file names... " >&6; }
7348if test "${ac_cv_sys_long_file_names+set}" = set; then :
91e84f96
GM
7349 $as_echo_n "(cached) " >&6
7350else
eb697db5
DN
7351 ac_cv_sys_long_file_names=yes
7352# Test for long file names in all the places we know might matter:
7353# . the current directory, where building will happen
7354# $prefix/lib where we will be installing things
7355# $exec_prefix/lib likewise
7356# $TMPDIR if set, where it might want to write temporary files
7357# /tmp where it might want to write temporary files
7358# /var/tmp likewise
7359# /usr/tmp likewise
7360for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
7361 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
7362 # in the usual case where exec_prefix is '${prefix}'.
7363 case $ac_dir in #(
7364 . | /* | ?:[\\/]*) ;; #(
7365 *) continue;;
7366 esac
7367 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
7368 ac_xdir=$ac_dir/cf$$
7369 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
7370 ac_tf1=$ac_xdir/conftest9012345
7371 ac_tf2=$ac_xdir/conftest9012346
7372 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
7373 ac_cv_sys_long_file_names=no
7374 rm -f -r "$ac_xdir" 2>/dev/null
7375 test $ac_cv_sys_long_file_names = no && break
91e84f96 7376done
91e84f96 7377fi
eb697db5
DN
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
7379$as_echo "$ac_cv_sys_long_file_names" >&6; }
7380if test $ac_cv_sys_long_file_names = yes; then
91e84f96 7381
eb697db5 7382$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
91e84f96 7383
91e84f96
GM
7384fi
7385
91e84f96 7386
eb697db5 7387#### Choose a window system.
91e84f96 7388
eb697db5
DN
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
7390$as_echo_n "checking for X... " >&6; }
91e84f96 7391
91e84f96 7392
eb697db5
DN
7393# Check whether --with-x was given.
7394if test "${with_x+set}" = set; then :
7395 withval=$with_x;
7396fi
91e84f96 7397
eb697db5
DN
7398# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7399if test "x$with_x" = xno; then
7400 # The user explicitly disabled X.
7401 have_x=disabled
91e84f96 7402else
eb697db5
DN
7403 case $x_includes,$x_libraries in #(
7404 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
7405 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
7406 $as_echo_n "(cached) " >&6
7407else
7408 # One or both of the vars are not set, and there is no cached value.
7409ac_x_includes=no ac_x_libraries=no
7410rm -f -r conftest.dir
7411if mkdir conftest.dir; then
7412 cd conftest.dir
7413 cat >Imakefile <<'_ACEOF'
7414incroot:
7415 @echo incroot='${INCROOT}'
7416usrlibdir:
7417 @echo usrlibdir='${USRLIBDIR}'
7418libdir:
7419 @echo libdir='${LIBDIR}'
7420_ACEOF
7421 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
7422 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7423 for ac_var in incroot usrlibdir libdir; do
7424 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7425 done
7426 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7427 for ac_extension in a so sl dylib la dll; do
7428 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7429 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7430 ac_im_usrlibdir=$ac_im_libdir; break
7431 fi
7432 done
7433 # Screen out bogus values from the imake configuration. They are
7434 # bogus both because they are the default anyway, and because
7435 # using them would break gcc on systems where it needs fixed includes.
7436 case $ac_im_incroot in
7437 /usr/include) ac_x_includes= ;;
7438 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7439 esac
7440 case $ac_im_usrlibdir in
7441 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
7442 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7443 esac
7444 fi
7445 cd ..
7446 rm -f -r conftest.dir
91e84f96
GM
7447fi
7448
eb697db5
DN
7449# Standard set of common directories for X headers.
7450# Check X11 before X11Rn because it is often a symlink to the current release.
7451ac_x_header_dirs='
7452/usr/X11/include
7453/usr/X11R7/include
7454/usr/X11R6/include
7455/usr/X11R5/include
7456/usr/X11R4/include
91e84f96 7457
eb697db5
DN
7458/usr/include/X11
7459/usr/include/X11R7
7460/usr/include/X11R6
7461/usr/include/X11R5
7462/usr/include/X11R4
91e84f96 7463
eb697db5
DN
7464/usr/local/X11/include
7465/usr/local/X11R7/include
7466/usr/local/X11R6/include
7467/usr/local/X11R5/include
7468/usr/local/X11R4/include
91e84f96 7469
eb697db5
DN
7470/usr/local/include/X11
7471/usr/local/include/X11R7
7472/usr/local/include/X11R6
7473/usr/local/include/X11R5
7474/usr/local/include/X11R4
91e84f96 7475
eb697db5
DN
7476/usr/X386/include
7477/usr/x386/include
7478/usr/XFree86/include/X11
91e84f96 7479
eb697db5
DN
7480/usr/include
7481/usr/local/include
7482/usr/unsupported/include
7483/usr/athena/include
7484/usr/local/x11r5/include
7485/usr/lpp/Xamples/include
91e84f96 7486
eb697db5
DN
7487/usr/openwin/include
7488/usr/openwin/share/include'
8c5ff6dd 7489
eb697db5
DN
7490if test "$ac_x_includes" = no; then
7491 # Guess where to find include files, by looking for Xlib.h.
7492 # First, try using that file with no special directory specified.
7493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 7494/* end confdefs.h. */
eb697db5 7495#include <X11/Xlib.h>
91e84f96 7496_ACEOF
eb697db5
DN
7497if ac_fn_c_try_cpp "$LINENO"; then :
7498 # We can compile using X headers with no special include directory.
7499ac_x_includes=
91e84f96 7500else
eb697db5
DN
7501 for ac_dir in $ac_x_header_dirs; do
7502 if test -r "$ac_dir/X11/Xlib.h"; then
7503 ac_x_includes=$ac_dir
7504 break
7505 fi
7506done
91e84f96 7507fi
91e84f96 7508rm -f conftest.err conftest.$ac_ext
eb697db5 7509fi # $ac_x_includes = no
91e84f96 7510
eb697db5
DN
7511if test "$ac_x_libraries" = no; then
7512 # Check for the libraries.
7513 # See if we find them without any special options.
7514 # Don't add to $LIBS permanently.
7515 ac_save_LIBS=$LIBS
7516 LIBS="-lX11 $LIBS"
7517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7518/* end confdefs.h. */
7519#include <X11/Xlib.h>
7520int
7521main ()
7522{
7523XrmInitialize ()
7524 ;
7525 return 0;
7526}
5929fbe7 7527_ACEOF
eb697db5
DN
7528if ac_fn_c_try_link "$LINENO"; then :
7529 LIBS=$ac_save_LIBS
7530# We can link X programs with no special library path.
7531ac_x_libraries=
91e84f96 7532else
eb697db5
DN
7533 LIBS=$ac_save_LIBS
7534for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7535do
7536 # Don't even attempt the hair of trying to link an X program!
7537 for ac_extension in a so sl dylib la dll; do
7538 if test -r "$ac_dir/libX11.$ac_extension"; then
7539 ac_x_libraries=$ac_dir
7540 break 2
7541 fi
7542 done
7543done
91e84f96 7544fi
eb697db5
DN
7545rm -f core conftest.err conftest.$ac_objext \
7546 conftest$ac_exeext conftest.$ac_ext
7547fi # $ac_x_libraries = no
91e84f96 7548
eb697db5
DN
7549case $ac_x_includes,$ac_x_libraries in #(
7550 no,* | *,no | *\'*)
7551 # Didn't find X, or a directory has "'" in its name.
7552 ac_cv_have_x="have_x=no";; #(
7553 *)
7554 # Record where we found X for the cache.
7555 ac_cv_have_x="have_x=yes\
7556 ac_x_includes='$ac_x_includes'\
7557 ac_x_libraries='$ac_x_libraries'"
5929fbe7 7558esac
91e84f96 7559fi
eb697db5
DN
7560;; #(
7561 *) have_x=yes;;
7562 esac
7563 eval "$ac_cv_have_x"
7564fi # $with_x != no
91e84f96 7565
eb697db5
DN
7566if test "$have_x" != yes; then
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7568$as_echo "$have_x" >&6; }
7569 no_x=yes
7570else
7571 # If each of the values was on the command line, it overrides each guess.
7572 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7573 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7574 # Update the cache value to reflect the command line values.
7575 ac_cv_have_x="have_x=yes\
7576 ac_x_includes='$x_includes'\
7577 ac_x_libraries='$x_libraries'"
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7579$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
91e84f96
GM
7580fi
7581
eb697db5
DN
7582if test "$no_x" = yes; then
7583 window_system=none
7584else
7585 window_system=x11
7586fi
91e84f96 7587
eb697db5
DN
7588## Workaround for bug in autoconf <= 2.62.
7589## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7590## No need to do anything special for these standard directories.
7591if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
91e84f96 7592
eb697db5 7593 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
4e569696 7594
eb697db5 7595fi
4e569696 7596
eb697db5
DN
7597LD_SWITCH_X_SITE_AUX=
7598LD_SWITCH_X_SITE_AUX_RPATH=
7599if test "${x_libraries}" != NONE; then
7600 if test -n "${x_libraries}"; then
7601 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7602 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7603 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
7604 fi
7605 x_default_search_path=""
7606 x_search_path=${x_libraries}
7607 if test -z "${x_search_path}"; then
7608 x_search_path=/usr/lib
7609 fi
7610 for x_library in `echo ${x_search_path}: | \
7611 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7612 x_search_path="\
7613${x_library}/X11/%L/%T/%N%C%S:\
7614${x_library}/X11/%l/%T/%N%C%S:\
7615${x_library}/X11/%T/%N%C%S:\
7616${x_library}/X11/%L/%T/%N%S:\
7617${x_library}/X11/%l/%T/%N%S:\
7618${x_library}/X11/%T/%N%S"
7619 if test x"${x_default_search_path}" = x; then
7620 x_default_search_path=${x_search_path}
7621 else
7622 x_default_search_path="${x_search_path}:${x_default_search_path}"
4e569696 7623 fi
eb697db5
DN
7624 done
7625fi
e6df49e4 7626
91e84f96
GM
7627
7628
eb697db5
DN
7629if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7630 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
7631fi
91e84f96 7632
eb697db5
DN
7633if test x"${x_includes}" = x; then
7634 bitmapdir=/usr/include/X11/bitmaps
7635else
7636 # accumulate include directories that have X11 bitmap subdirectories
7637 bmd_acc="dummyval"
7638 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7639 if test -d "${bmd}/X11/bitmaps"; then
7640 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7641 fi
7642 if test -d "${bmd}/bitmaps"; then
7643 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7644 fi
7645 done
7646 if test ${bmd_acc} != "dummyval"; then
7647 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7648 fi
7649fi
91e84f96 7650
eb697db5
DN
7651HAVE_NS=no
7652NS_IMPL_COCOA=no
7653NS_IMPL_GNUSTEP=no
7654tmp_CPPFLAGS="$CPPFLAGS"
7655tmp_CFLAGS="$CFLAGS"
7656CPPFLAGS="$CPPFLAGS -x objective-c"
7657CFLAGS="$CFLAGS -x objective-c"
e6cfa7c3 7658TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
eb697db5
DN
7659if test "${with_ns}" != no; then
7660 if test "${opsys}" = darwin; then
7661 NS_IMPL_COCOA=yes
7662 ns_appdir=`pwd`/nextstep/Emacs.app/
7663 ns_appbindir=${ns_appdir}Contents/MacOS/
7664 ns_appresdir=${ns_appdir}Contents/Resources
7665 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7666 elif test -f $GNUSTEP_CONFIG_FILE; then
7667 NS_IMPL_GNUSTEP=yes
7668 ns_appdir=`pwd`/nextstep/Emacs.app/
7669 ns_appbindir=${ns_appdir}
7670 ns_appresdir=${ns_appdir}Resources
7671 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7672 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7673 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7674 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
7675 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
7676 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
7677 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
7678 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
7679 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
7680 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7681 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
eb697db5
DN
7682 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
7683 LIB_STANDARD=
7684 START_FILES=
7685 TEMACS_LDFLAGS2=
7686 fi
7687 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7688if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7689 HAVE_NS=yes
7690else
7691 as_fn_error "\`--with-ns' was specified, but the include
7692 files are missing or cannot be compiled." "$LINENO" 5
7693fi
91e84f96
GM
7694
7695
eb697db5
DN
7696 NS_HAVE_NSINTEGER=yes
7697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7698/* end confdefs.h. */
7699#include <Foundation/NSObjCRuntime.h>
7700int
7701main ()
7702{
7703NSInteger i;
7704 ;
7705 return 0;
7706}
7707_ACEOF
7708if ac_fn_c_try_compile "$LINENO"; then :
7709 ns_have_nsinteger=yes
7710else
7711 ns_have_nsinteger=no
7712fi
7713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7714 if test $ns_have_nsinteger = no; then
7715 NS_HAVE_NSINTEGER=no
7716 fi
7717fi
91e84f96
GM
7718
7719
eb697db5
DN
7720ns_frag=/dev/null
7721NS_OBJ=
7722NS_SUPPORT=
7723if test "${HAVE_NS}" = yes; then
7724 window_system=nextstep
7725 with_xft=no
7726 # set up packaging dirs
7727 exec_prefix=${ns_appbindir}
7728 libexecdir=${ns_appbindir}/libexec
7729 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7730 prefix=${ns_appresdir}
7731 fi
7732 ns_frag=$srcdir/src/ns.mk
7733 NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
7734 NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc"
7735fi
7736CFLAGS="$tmp_CFLAGS"
7737CPPFLAGS="$tmp_CPPFLAGS"
91e84f96
GM
7738
7739
7740
7741
7742
eb697db5
DN
7743case "${window_system}" in
7744 x11 )
7745 HAVE_X_WINDOWS=yes
7746 HAVE_X11=yes
7747 case "${with_x_toolkit}" in
7748 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7749 motif ) USE_X_TOOLKIT=MOTIF ;;
7750 gtk ) with_gtk=yes
7751 USE_X_TOOLKIT=none ;;
e547b051
J
7752 gtk3 ) with_gtk3=yes
7753 USE_X_TOOLKIT=none ;;
eb697db5
DN
7754 no ) USE_X_TOOLKIT=none ;;
7755 * ) USE_X_TOOLKIT=maybe ;;
7756 esac
7757 ;;
7758 nextstep | none )
7759 HAVE_X_WINDOWS=no
7760 HAVE_X11=no
7761 USE_X_TOOLKIT=none
7762 ;;
7763esac
91e84f96 7764
eb697db5
DN
7765if test "$window_system" = none && test "X$with_x" != "Xno"; then
7766 # Extract the first word of "X", so it can be a program name with args.
7767set dummy X; ac_word=$2
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769$as_echo_n "checking for $ac_word... " >&6; }
7770if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
7771 $as_echo_n "(cached) " >&6
7772else
7773 if test -n "$HAVE_XSERVER"; then
7774 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
7775else
7776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7777for as_dir in $PATH
7778do
7779 IFS=$as_save_IFS
7780 test -z "$as_dir" && as_dir=.
7781 for ac_exec_ext in '' $ac_executable_extensions; do
7782 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7783 ac_cv_prog_HAVE_XSERVER="true"
7784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7785 break 2
7786 fi
7787done
7788 done
7789IFS=$as_save_IFS
91e84f96 7790
eb697db5
DN
7791 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
7792fi
7793fi
7794HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7795if test -n "$HAVE_XSERVER"; then
7796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7797$as_echo "$HAVE_XSERVER" >&6; }
7798else
7799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7800$as_echo "no" >&6; }
7801fi
91e84f96
GM
7802
7803
eb697db5
DN
7804 if test "$HAVE_XSERVER" = true ||
7805 test -n "$DISPLAY" ||
7806 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
7807 as_fn_error "You seem to be running X, but no X development libraries
7808were found. You should install the relevant development files for X
7809and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7810sure you have development files for image handling, i.e.
7811tiff, gif, jpeg, png and xpm.
7812If you are sure you want Emacs compiled without X window support, pass
7813 --without-x
7814to configure." "$LINENO" 5
7815 fi
7816fi
91e84f96 7817
eb697db5
DN
7818### If we're using X11, we should use the X menu package.
7819HAVE_MENUS=no
7820case ${HAVE_X11} in
7821 yes ) HAVE_MENUS=yes ;;
7822esac
91e84f96 7823
eb697db5
DN
7824# Do the opsystem or machine files prohibit the use of the GNU malloc?
7825# Assume not, until told otherwise.
7826GNU_MALLOC=yes
7827doug_lea_malloc=yes
7828ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7829if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
91e84f96 7830
eb697db5
DN
7831else
7832 doug_lea_malloc=no
7833fi
91e84f96 7834
eb697db5
DN
7835ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7836if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
91e84f96 7837
eb697db5
DN
7838else
7839 doug_lea_malloc=no
7840fi
91e84f96 7841
eb697db5
DN
7842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7843$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7844if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
7845 $as_echo_n "(cached) " >&6
7846else
7847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7848/* end confdefs.h. */
7849extern void (* __after_morecore_hook)();
7850int
7851main ()
7852{
7853__after_morecore_hook = 0
7854 ;
7855 return 0;
7856}
7857_ACEOF
7858if ac_fn_c_try_link "$LINENO"; then :
7859 emacs_cv_var___after_morecore_hook=yes
7860else
7861 emacs_cv_var___after_morecore_hook=no
7862fi
7863rm -f core conftest.err conftest.$ac_objext \
7864 conftest$ac_exeext conftest.$ac_ext
7865fi
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7867$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7868if test $emacs_cv_var___after_morecore_hook = no; then
7869 doug_lea_malloc=no
7870fi
91e84f96 7871
e7586c7a
GM
7872
7873system_malloc=no
7874case "$opsys" in
7875 ## darwin ld insists on the use of malloc routines in the System framework.
7876 darwin|sol2-10) system_malloc=yes ;;
7877esac
7878
eb697db5 7879if test "${system_malloc}" = "yes"; then
e7586c7a
GM
7880
7881$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
7882
eb697db5
DN
7883 GNU_MALLOC=no
7884 GNU_MALLOC_reason="
7885 (The GNU allocators don't work with this system configuration.)"
7886 GMALLOC_OBJ=
7887 VMLIMIT_OBJ=
7888else
7889 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
7890 VMLIMIT_OBJ=vm-limit.o
7891fi
91e84f96
GM
7892
7893
7894
eb697db5
DN
7895if test "$doug_lea_malloc" = "yes" ; then
7896 if test "$GNU_MALLOC" = yes ; then
7897 GNU_MALLOC_reason="
7898 (Using Doug Lea's new malloc from the GNU C Library.)"
7899 fi
91e84f96 7900
eb697db5 7901$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
91e84f96
GM
7902
7903
eb697db5
DN
7904 ## Use mmap directly for allocating larger buffers.
7905 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
7906 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
7907 ## Does the AC_FUNC_MMAP test below make this check unecessary?
7908 case "$opsys" in
7909 gnu*) REL_ALLOC=no ;;
7910 esac
7911fi
91e84f96 7912
eb697db5
DN
7913if test x"${REL_ALLOC}" = x; then
7914 REL_ALLOC=${GNU_MALLOC}
7915fi
91e84f96 7916
e7586c7a
GM
7917use_mmap_for_buffers=no
7918case "$opsys" in
7919 freebsd|irix6-5) use_mmap_for_buffers=yes ;;
7920esac
91e84f96
GM
7921
7922
7923
7924
eb697db5
DN
7925 for ac_header in $ac_header_list
7926do :
7927 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7928ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7929"
7930eval as_val=\$$as_ac_Header
7931 if test "x$as_val" = x""yes; then :
7932 cat >>confdefs.h <<_ACEOF
7933#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7934_ACEOF
91e84f96 7935
eb697db5 7936fi
91e84f96 7937
eb697db5 7938done
91e84f96
GM
7939
7940
7941
7942
7943
7944
7945
7946
eb697db5
DN
7947for ac_func in getpagesize
7948do :
7949 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7950if test "x$ac_cv_func_getpagesize" = x""yes; then :
7951 cat >>confdefs.h <<_ACEOF
7952#define HAVE_GETPAGESIZE 1
7953_ACEOF
91e84f96 7954
eb697db5
DN
7955fi
7956done
91e84f96 7957
eb697db5
DN
7958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7959$as_echo_n "checking for working mmap... " >&6; }
7960if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7961 $as_echo_n "(cached) " >&6
7962else
7963 if test "$cross_compiling" = yes; then :
7964 ac_cv_func_mmap_fixed_mapped=no
7965else
7966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7967/* end confdefs.h. */
7968$ac_includes_default
7969/* malloc might have been renamed as rpl_malloc. */
7970#undef malloc
91e84f96 7971
eb697db5
DN
7972/* Thanks to Mike Haertel and Jim Avera for this test.
7973 Here is a matrix of mmap possibilities:
7974 mmap private not fixed
7975 mmap private fixed at somewhere currently unmapped
7976 mmap private fixed at somewhere already mapped
7977 mmap shared not fixed
7978 mmap shared fixed at somewhere currently unmapped
7979 mmap shared fixed at somewhere already mapped
7980 For private mappings, we should verify that changes cannot be read()
7981 back from the file, nor mmap's back from the file at a different
7982 address. (There have been systems where private was not correctly
7983 implemented like the infamous i386 svr4.0, and systems where the
7984 VM page cache was not coherent with the file system buffer cache
7985 like early versions of FreeBSD and possibly contemporary NetBSD.)
7986 For shared mappings, we should conversely verify that changes get
7987 propagated back to all the places they're supposed to be.
91e84f96 7988
eb697db5
DN
7989 Grep wants private fixed already mapped.
7990 The main things grep needs to know about mmap are:
7991 * does it exist and is it safe to write into the mmap'd area
7992 * how to use it (BSD variants) */
91e84f96 7993
eb697db5
DN
7994#include <fcntl.h>
7995#include <sys/mman.h>
91e84f96 7996
eb697db5
DN
7997#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7998char *malloc ();
7999#endif
91e84f96 8000
eb697db5
DN
8001/* This mess was copied from the GNU getpagesize.h. */
8002#ifndef HAVE_GETPAGESIZE
8003# ifdef _SC_PAGESIZE
8004# define getpagesize() sysconf(_SC_PAGESIZE)
8005# else /* no _SC_PAGESIZE */
8006# ifdef HAVE_SYS_PARAM_H
8007# include <sys/param.h>
8008# ifdef EXEC_PAGESIZE
8009# define getpagesize() EXEC_PAGESIZE
8010# else /* no EXEC_PAGESIZE */
8011# ifdef NBPG
8012# define getpagesize() NBPG * CLSIZE
8013# ifndef CLSIZE
8014# define CLSIZE 1
8015# endif /* no CLSIZE */
8016# else /* no NBPG */
8017# ifdef NBPC
8018# define getpagesize() NBPC
8019# else /* no NBPC */
8020# ifdef PAGESIZE
8021# define getpagesize() PAGESIZE
8022# endif /* PAGESIZE */
8023# endif /* no NBPC */
8024# endif /* no NBPG */
8025# endif /* no EXEC_PAGESIZE */
8026# else /* no HAVE_SYS_PARAM_H */
8027# define getpagesize() 8192 /* punt totally */
8028# endif /* no HAVE_SYS_PARAM_H */
8029# endif /* no _SC_PAGESIZE */
91e84f96 8030
eb697db5 8031#endif /* no HAVE_GETPAGESIZE */
91e84f96 8032
eb697db5
DN
8033int
8034main ()
8035{
8036 char *data, *data2, *data3;
c05c21ed 8037 const char *cdata2;
eb697db5
DN
8038 int i, pagesize;
8039 int fd, fd2;
91e84f96 8040
eb697db5 8041 pagesize = getpagesize ();
91e84f96 8042
eb697db5
DN
8043 /* First, make a file with some known garbage in it. */
8044 data = (char *) malloc (pagesize);
8045 if (!data)
8046 return 1;
8047 for (i = 0; i < pagesize; ++i)
8048 *(data + i) = rand ();
8049 umask (0);
8050 fd = creat ("conftest.mmap", 0600);
8051 if (fd < 0)
8052 return 2;
8053 if (write (fd, data, pagesize) != pagesize)
8054 return 3;
8055 close (fd);
91e84f96 8056
eb697db5
DN
8057 /* Next, check that the tail of a page is zero-filled. File must have
8058 non-zero length, otherwise we risk SIGBUS for entire page. */
8059 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
8060 if (fd2 < 0)
8061 return 4;
c05c21ed
JV
8062 cdata2 = "";
8063 if (write (fd2, cdata2, 1) != 1)
eb697db5 8064 return 5;
c05c21ed 8065 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
eb697db5
DN
8066 if (data2 == MAP_FAILED)
8067 return 6;
8068 for (i = 0; i < pagesize; ++i)
8069 if (*(data2 + i))
8070 return 7;
8071 close (fd2);
8072 if (munmap (data2, pagesize))
8073 return 8;
91e84f96 8074
eb697db5
DN
8075 /* Next, try to mmap the file at a fixed address which already has
8076 something else allocated at it. If we can, also make sure that
8077 we see the same garbage. */
8078 fd = open ("conftest.mmap", O_RDWR);
8079 if (fd < 0)
8080 return 9;
8081 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8082 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8083 return 10;
8084 for (i = 0; i < pagesize; ++i)
8085 if (*(data + i) != *(data2 + i))
8086 return 11;
91e84f96 8087
eb697db5
DN
8088 /* Finally, make sure that changes to the mapped area do not
8089 percolate back to the file as seen by read(). (This is a bug on
8090 some variants of i386 svr4.0.) */
8091 for (i = 0; i < pagesize; ++i)
8092 *(data2 + i) = *(data2 + i) + 1;
8093 data3 = (char *) malloc (pagesize);
8094 if (!data3)
8095 return 12;
8096 if (read (fd, data3, pagesize) != pagesize)
8097 return 13;
8098 for (i = 0; i < pagesize; ++i)
8099 if (*(data + i) != *(data3 + i))
8100 return 14;
8101 close (fd);
8102 return 0;
8103}
8104_ACEOF
8105if ac_fn_c_try_run "$LINENO"; then :
8106 ac_cv_func_mmap_fixed_mapped=yes
8107else
8108 ac_cv_func_mmap_fixed_mapped=no
8109fi
8110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8111 conftest.$ac_objext conftest.beam conftest.$ac_ext
8112fi
91e84f96 8113
eb697db5
DN
8114fi
8115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
8116$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
8117if test $ac_cv_func_mmap_fixed_mapped = yes; then
91e84f96 8118
eb697db5 8119$as_echo "#define HAVE_MMAP 1" >>confdefs.h
91e84f96 8120
eb697db5
DN
8121fi
8122rm -f conftest.mmap conftest.txt
91e84f96 8123
eb697db5 8124if test $use_mmap_for_buffers = yes; then
e7586c7a
GM
8125
8126$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
8127
eb697db5
DN
8128 REL_ALLOC=no
8129fi
91e84f96 8130
eb697db5 8131LIBS="$LIBS_SYSTEM $LIBS"
91e84f96 8132
eb697db5
DN
8133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
8134$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
8135if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
5929fbe7 8136 $as_echo_n "(cached) " >&6
8c5ff6dd 8137else
eb697db5
DN
8138 ac_check_lib_save_LIBS=$LIBS
8139LIBS="-ldnet $LIBS"
8140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 8141/* end confdefs.h. */
91e84f96 8142
5929fbe7
GM
8143/* Override any GCC internal prototype to avoid an error.
8144 Use char because int might match the return type of a GCC
8145 builtin and then its argument prototype would still apply. */
8146#ifdef __cplusplus
8147extern "C"
8148#endif
eb697db5 8149char dnet_ntoa ();
5929fbe7
GM
8150int
8151main ()
8152{
eb697db5 8153return dnet_ntoa ();
5929fbe7
GM
8154 ;
8155 return 0;
8156}
8157_ACEOF
eb697db5
DN
8158if ac_fn_c_try_link "$LINENO"; then :
8159 ac_cv_lib_dnet_dnet_ntoa=yes
5929fbe7 8160else
eb697db5 8161 ac_cv_lib_dnet_dnet_ntoa=no
5929fbe7 8162fi
eb697db5
DN
8163rm -f core conftest.err conftest.$ac_objext \
8164 conftest$ac_exeext conftest.$ac_ext
8165LIBS=$ac_check_lib_save_LIBS
5929fbe7 8166fi
eb697db5
DN
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8168$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
8169if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
5929fbe7 8170 cat >>confdefs.h <<_ACEOF
eb697db5 8171#define HAVE_LIBDNET 1
5929fbe7 8172_ACEOF
91e84f96 8173
eb697db5 8174 LIBS="-ldnet $LIBS"
91e84f96 8175
a4f64981 8176fi
91e84f96
GM
8177
8178
eb697db5
DN
8179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
8180$as_echo_n "checking for main in -lXbsd... " >&6; }
8181if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
91e84f96
GM
8182 $as_echo_n "(cached) " >&6
8183else
eb697db5
DN
8184 ac_check_lib_save_LIBS=$LIBS
8185LIBS="-lXbsd $LIBS"
8186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8187/* end confdefs.h. */
91e84f96 8188
91e84f96 8189
eb697db5
DN
8190int
8191main ()
8192{
8193return main ();
8194 ;
8195 return 0;
8196}
5929fbe7 8197_ACEOF
eb697db5
DN
8198if ac_fn_c_try_link "$LINENO"; then :
8199 ac_cv_lib_Xbsd_main=yes
a4f64981 8200else
eb697db5 8201 ac_cv_lib_Xbsd_main=no
8c5ff6dd 8202fi
eb697db5
DN
8203rm -f core conftest.err conftest.$ac_objext \
8204 conftest$ac_exeext conftest.$ac_ext
8205LIBS=$ac_check_lib_save_LIBS
5929fbe7 8206fi
eb697db5
DN
8207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
8208$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
8209if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
8210 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
8c5ff6dd 8211fi
91e84f96 8212
8c5ff6dd 8213
eb697db5
DN
8214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
8215$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
8216if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
15e12598
VB
8217 $as_echo_n "(cached) " >&6
8218else
eb697db5
DN
8219 ac_check_lib_save_LIBS=$LIBS
8220LIBS="-lpthreads $LIBS"
8221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 8222/* end confdefs.h. */
91e84f96
GM
8223
8224/* Override any GCC internal prototype to avoid an error.
8225 Use char because int might match the return type of a GCC
8226 builtin and then its argument prototype would still apply. */
8227#ifdef __cplusplus
8228extern "C"
8229#endif
eb697db5 8230char cma_open ();
91e84f96
GM
8231int
8232main ()
8233{
eb697db5 8234return cma_open ();
91e84f96
GM
8235 ;
8236 return 0;
8237}
8238_ACEOF
eb697db5
DN
8239if ac_fn_c_try_link "$LINENO"; then :
8240 ac_cv_lib_pthreads_cma_open=yes
91e84f96 8241else
eb697db5 8242 ac_cv_lib_pthreads_cma_open=no
91e84f96 8243fi
eb697db5
DN
8244rm -f core conftest.err conftest.$ac_objext \
8245 conftest$ac_exeext conftest.$ac_ext
8246LIBS=$ac_check_lib_save_LIBS
91e84f96 8247fi
eb697db5
DN
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
8249$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
8250if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
91e84f96 8251 cat >>confdefs.h <<_ACEOF
eb697db5 8252#define HAVE_LIBPTHREADS 1
91e84f96
GM
8253_ACEOF
8254
eb697db5 8255 LIBS="-lpthreads $LIBS"
5929fbe7 8256
91e84f96 8257fi
91e84f96
GM
8258
8259
eb697db5
DN
8260## Note: when using cpp in s/aix4.2.h, this definition depended on
8261## HAVE_LIBPTHREADS. That was not defined earlier in configure when
8262## the system file was sourced. Hence the value of LIBS_SYSTEM
8263## added to LIBS in configure would never contain the pthreads part,
8264## but the value used in Makefiles might. FIXME?
8265##
8266## -lpthreads seems to be necessary for Xlib in X11R6, and should
8267## be harmless on older versions of X where it happens to exist.
8268test "$opsys" = "aix4-2" && \
8269 test $ac_cv_lib_pthreads_cma_open = yes && \
8270 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
91e84f96 8271
5929fbe7 8272
eb697db5
DN
8273case ${host_os} in
8274aix*)
8275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
8276$as_echo_n "checking for -bbigtoc option... " >&6; }
8277if test "${gdb_cv_bigtoc+set}" = set; then :
91e84f96 8278 $as_echo_n "(cached) " >&6
91e84f96 8279else
a4f64981 8280
eb697db5
DN
8281 case $GCC in
8282 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8283 *) gdb_cv_bigtoc=-bbigtoc ;;
8284 esac
a4f64981 8285
eb697db5
DN
8286 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8288/* end confdefs.h. */
8c5ff6dd 8289
eb697db5
DN
8290int
8291main ()
8292{
8293int i;
8294 ;
8295 return 0;
8296}
91e84f96 8297_ACEOF
eb697db5 8298if ac_fn_c_try_link "$LINENO"; then :
8c5ff6dd 8299
eb697db5
DN
8300else
8301 gdb_cv_bigtoc=
8302fi
8303rm -f core conftest.err conftest.$ac_objext \
8304 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 8305
eb697db5
DN
8306fi
8307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
8308$as_echo "$gdb_cv_bigtoc" >&6; }
8309 ;;
91e84f96 8310esac
8c5ff6dd 8311
eb697db5
DN
8312# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
8313# used for the tests that follow. We set them back to REAL_CFLAGS and
8314# REAL_CPPFLAGS later on.
8c5ff6dd 8315
e6cfa7c3 8316REAL_CFLAGS="$CFLAGS"
eb697db5 8317REAL_CPPFLAGS="$CPPFLAGS"
8c5ff6dd 8318
eb697db5
DN
8319if test "${HAVE_X11}" = "yes"; then
8320 DEFS="$C_SWITCH_X_SITE $DEFS"
8321 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
e7586c7a 8322 LIBS="-lX11 $LIBS"
eb697db5
DN
8323 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
8324 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
8c5ff6dd 8325
eb697db5
DN
8326 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
8327 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
8328 # but it's more convenient here to set LD_RUN_PATH
8329 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
8330 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8331 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
8332 export LD_RUN_PATH
8333 fi
8c5ff6dd 8334
eb697db5
DN
8335 if test "${opsys}" = "gnu-linux"; then
8336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
8337$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
8338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8339/* end confdefs.h. */
8c5ff6dd 8340
eb697db5
DN
8341int
8342main ()
5929fbe7 8343{
eb697db5
DN
8344XOpenDisplay ("foo");
8345 ;
8346 return 0;
5929fbe7 8347}
eb697db5
DN
8348_ACEOF
8349if ac_fn_c_try_link "$LINENO"; then :
8350 xlinux_first_failure=no
8351else
8352 xlinux_first_failure=yes
8353fi
8354rm -f core conftest.err conftest.$ac_objext \
8355 conftest$ac_exeext conftest.$ac_ext
8356 if test "${xlinux_first_failure}" = "yes"; then
8357 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
8358 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
8359 OLD_CPPFLAGS="$CPPFLAGS"
8360 OLD_LIBS="$LIBS"
8361 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
8362 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
8363 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
8364 LIBS="$LIBS -b i486-linuxaout"
8365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8366/* end confdefs.h. */
8c5ff6dd 8367
eb697db5
DN
8368int
8369main ()
5929fbe7 8370{
eb697db5
DN
8371XOpenDisplay ("foo");
8372 ;
8373 return 0;
5929fbe7 8374}
eb697db5
DN
8375_ACEOF
8376if ac_fn_c_try_link "$LINENO"; then :
8377 xlinux_second_failure=no
8378else
8379 xlinux_second_failure=yes
8380fi
8381rm -f core conftest.err conftest.$ac_objext \
8382 conftest$ac_exeext conftest.$ac_ext
8383 if test "${xlinux_second_failure}" = "yes"; then
8384 # If we get the same failure with -b, there is no use adding -b.
8385 # So take it out. This plays safe.
8386 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
8387 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
8388 CPPFLAGS="$OLD_CPPFLAGS"
8389 LIBS="$OLD_LIBS"
8390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8391$as_echo "no" >&6; }
8392 else
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8394$as_echo "yes" >&6; }
8395 fi
8396 else
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398$as_echo "no" >&6; }
8399 fi
8400 fi
8c5ff6dd 8401
eb697db5
DN
8402 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
8403 # header files included from there.
8404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
8405$as_echo_n "checking for Xkb... " >&6; }
8406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8407/* end confdefs.h. */
8408#include <X11/Xlib.h>
8409#include <X11/XKBlib.h>
5929fbe7
GM
8410int
8411main ()
8412{
eb697db5
DN
8413XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
8414 ;
8415 return 0;
5929fbe7
GM
8416}
8417_ACEOF
eb697db5
DN
8418if ac_fn_c_try_link "$LINENO"; then :
8419 emacs_xkb=yes
91e84f96 8420else
eb697db5 8421 emacs_xkb=no
91e84f96 8422fi
eb697db5
DN
8423rm -f core conftest.err conftest.$ac_objext \
8424 conftest$ac_exeext conftest.$ac_ext
8425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
8426$as_echo "$emacs_xkb" >&6; }
8427 if test $emacs_xkb = yes; then
91e84f96 8428
eb697db5 8429$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
91e84f96 8430
eb697db5 8431 fi
a4f64981 8432
eb697db5
DN
8433 for ac_func in XrmSetDatabase XScreenResourceString \
8434XScreenNumberOfScreen XSetWMProtocols
8435do :
8436 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8437ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8438eval as_val=\$$as_ac_var
8439 if test "x$as_val" = x""yes; then :
8440 cat >>confdefs.h <<_ACEOF
8441#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
91e84f96 8442_ACEOF
91e84f96 8443
91e84f96 8444fi
eb697db5 8445done
91e84f96 8446
eb697db5 8447fi
91e84f96 8448
eb697db5
DN
8449if test "${window_system}" = "x11"; then
8450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
8451$as_echo_n "checking X11 version 6... " >&6; }
8452 if test "${emacs_cv_x11_version_6+set}" = set; then :
91e84f96
GM
8453 $as_echo_n "(cached) " >&6
8454else
eb697db5 8455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 8456/* end confdefs.h. */
eb697db5 8457#include <X11/Xlib.h>
9452ded1
DN
8458int
8459main ()
8460{
eb697db5
DN
8461#if XlibSpecificationRelease < 6
8462fail;
8463#endif
91e84f96 8464
9452ded1
DN
8465 ;
8466 return 0;
8467}
91e84f96 8468_ACEOF
eb697db5
DN
8469if ac_fn_c_try_link "$LINENO"; then :
8470 emacs_cv_x11_version_6=yes
7186fb09 8471else
eb697db5
DN
8472 emacs_cv_x11_version_6=no
8473fi
8474rm -f core conftest.err conftest.$ac_objext \
8475 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
8476fi
8477
eb697db5
DN
8478 if test $emacs_cv_x11_version_6 = yes; then
8479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8480$as_echo "6 or newer" >&6; }
8481
8482$as_echo "#define HAVE_X11R6 1" >>confdefs.h
91e84f96 8483
a46007e9
GM
8484
8485$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
8486
8487 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
8488 ## XIM support.
8489 case "$opsys" in
8490 sol2-*) : ;;
8491 *)
8492$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
8493
8494 ;;
8495 esac
eb697db5
DN
8496 else
8497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8498$as_echo "before 6" >&6; }
8499 fi
aaa36002 8500fi
91e84f96
GM
8501
8502
eb697db5
DN
8503### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
8504HAVE_RSVG=no
8505if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
8506 if test "${with_rsvg}" != "no"; then
8507 RSVG_REQUIRED=2.11.0
8508 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
91e84f96
GM
8509
8510
eb697db5 8511 succeeded=no
91e84f96 8512
eb697db5
DN
8513 # Extract the first word of "pkg-config", so it can be a program name with args.
8514set dummy pkg-config; ac_word=$2
8515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8516$as_echo_n "checking for $ac_word... " >&6; }
8517if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96 8518 $as_echo_n "(cached) " >&6
91e84f96 8519else
eb697db5
DN
8520 case $PKG_CONFIG in
8521 [\\/]* | ?:[\\/]*)
8522 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8523 ;;
8524 *)
8525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8526for as_dir in $PATH
8527do
8528 IFS=$as_save_IFS
8529 test -z "$as_dir" && as_dir=.
8530 for ac_exec_ext in '' $ac_executable_extensions; do
8531 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8532 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8533 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8534 break 2
8535 fi
8536done
8537 done
8538IFS=$as_save_IFS
8539
8540 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8541 ;;
91e84f96 8542esac
aaa36002 8543fi
eb697db5
DN
8544PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8545if test -n "$PKG_CONFIG"; then
8546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8547$as_echo "$PKG_CONFIG" >&6; }
91e84f96 8548else
eb697db5
DN
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8550$as_echo "no" >&6; }
91e84f96
GM
8551fi
8552
91e84f96 8553
91e84f96 8554
eb697db5
DN
8555 if test "$PKG_CONFIG" = "no" ; then
8556 :
8557 else
8558 PKG_CONFIG_MIN_VERSION=0.9.0
8559 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8561$as_echo_n "checking for $RSVG_MODULE... " >&6; }
91e84f96 8562
eb697db5
DN
8563 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8565$as_echo "yes" >&6; }
8566 succeeded=yes
91e84f96 8567
eb697db5
DN
8568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8569$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8570 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8572$as_echo "$RSVG_CFLAGS" >&6; }
91e84f96 8573
eb697db5
DN
8574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8575$as_echo_n "checking RSVG_LIBS... " >&6; }
8576 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8578$as_echo "$RSVG_LIBS" >&6; }
8579 else
8580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8581$as_echo "no" >&6; }
8582 RSVG_CFLAGS=""
8583 RSVG_LIBS=""
8584 ## If we have a custom action on failure, don't print errors, but
8585 ## do set a variable so people can do so.
8586 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
91e84f96 8587
eb697db5 8588 fi
91e84f96 8589
91e84f96 8590
91e84f96 8591
eb697db5
DN
8592 else
8593 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8594 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8595 fi
8596 fi
8597
8598 if test $succeeded = yes; then
8a0b50ed 8599 HAVE_RSVG=yes
eb697db5
DN
8600 else
8601 :
8602 fi
91e84f96
GM
8603
8604
8605
8606
8a0b50ed 8607 if test $HAVE_RSVG = yes; then
91e84f96 8608
eb697db5 8609$as_echo "#define HAVE_RSVG 1" >>confdefs.h
91e84f96 8610
eb697db5
DN
8611 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8612 LIBS="$RSVG_LIBS $LIBS"
8613 fi
8614 fi
c05c21ed 8615fi
91e84f96 8616
c05c21ed
JV
8617HAVE_IMAGEMAGICK=no
8618if test "${with_imagemagick}" != "no"; then
8619 IMAGEMAGICK_MODULE="Wand"
91e84f96 8620
c05c21ed 8621 succeeded=no
91e84f96 8622
c05c21ed
JV
8623 # Extract the first word of "pkg-config", so it can be a program name with args.
8624set dummy pkg-config; ac_word=$2
8625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8626$as_echo_n "checking for $ac_word... " >&6; }
8627if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8628 $as_echo_n "(cached) " >&6
8629else
8630 case $PKG_CONFIG in
8631 [\\/]* | ?:[\\/]*)
8632 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8633 ;;
8634 *)
8635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8636for as_dir in $PATH
8637do
8638 IFS=$as_save_IFS
8639 test -z "$as_dir" && as_dir=.
8640 for ac_exec_ext in '' $ac_executable_extensions; do
8641 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8642 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8644 break 2
8645 fi
8646done
8647 done
8648IFS=$as_save_IFS
91e84f96 8649
c05c21ed
JV
8650 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8651 ;;
8652esac
8653fi
8654PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8655if test -n "$PKG_CONFIG"; then
8656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8657$as_echo "$PKG_CONFIG" >&6; }
8658else
8659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8660$as_echo "no" >&6; }
8661fi
91e84f96
GM
8662
8663
8664
c05c21ed
JV
8665 if test "$PKG_CONFIG" = "no" ; then
8666 :
8667 else
8668 PKG_CONFIG_MIN_VERSION=0.9.0
8669 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $IMAGEMAGICK_MODULE" >&5
8671$as_echo_n "checking for $IMAGEMAGICK_MODULE... " >&6; }
91e84f96 8672
c05c21ed
JV
8673 if $PKG_CONFIG --exists "$IMAGEMAGICK_MODULE" 2>&5; then
8674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8675$as_echo "yes" >&6; }
8676 succeeded=yes
91e84f96 8677
c05c21ed
JV
8678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_CFLAGS" >&5
8679$as_echo_n "checking IMAGEMAGICK_CFLAGS... " >&6; }
8680 IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'`
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_CFLAGS" >&5
8682$as_echo "$IMAGEMAGICK_CFLAGS" >&6; }
91e84f96 8683
c05c21ed
JV
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking IMAGEMAGICK_LIBS" >&5
8685$as_echo_n "checking IMAGEMAGICK_LIBS... " >&6; }
8686 IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "$IMAGEMAGICK_MODULE"|sed -e 's,///*,/,g'`
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IMAGEMAGICK_LIBS" >&5
8688$as_echo "$IMAGEMAGICK_LIBS" >&6; }
8689 else
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8691$as_echo "no" >&6; }
8692 IMAGEMAGICK_CFLAGS=""
8693 IMAGEMAGICK_LIBS=""
8694 ## If we have a custom action on failure, don't print errors, but
8695 ## do set a variable so people can do so.
8696 IMAGEMAGICK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$IMAGEMAGICK_MODULE"`
91e84f96 8697
c05c21ed 8698 fi
91e84f96
GM
8699
8700
8701
c05c21ed
JV
8702 else
8703 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8704 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8705 fi
8706 fi
91e84f96 8707
c05c21ed 8708 if test $succeeded = yes; then
8a0b50ed 8709 HAVE_IMAGEMAGICK=yes
c05c21ed
JV
8710 else
8711 :
8712 fi
91e84f96 8713
91e84f96 8714
91e84f96 8715
6da23aaa 8716
8a0b50ed 8717 if test $HAVE_IMAGEMAGICK = yes; then
6da23aaa 8718
c05c21ed 8719$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
91e84f96 8720
c05c21ed
JV
8721 CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
8722 LIBS="$IMAGEMAGICK_LIBS $LIBS"
8a0b50ed 8723 for ac_func in MagickExportImagePixels
c05c21ed 8724do :
8a0b50ed
AS
8725 ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels"
8726if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then :
c05c21ed 8727 cat >>confdefs.h <<_ACEOF
8a0b50ed 8728#define HAVE_MAGICKEXPORTIMAGEPIXELS 1
c05c21ed 8729_ACEOF
91e84f96 8730
c05c21ed
JV
8731fi
8732done
91e84f96 8733
8a0b50ed 8734 fi
a4f64981 8735fi
91e84f96 8736
91e84f96 8737
eb697db5 8738HAVE_GTK=no
e547b051
J
8739if test "${with_gtk3}" = "yes"; then
8740 GLIB_REQUIRED=2.6
8741 GTK_REQUIRED=2.90
8742 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8743
8744
8745 succeeded=no
8746
8747 # Extract the first word of "pkg-config", so it can be a program name with args.
8748set dummy pkg-config; ac_word=$2
8749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8750$as_echo_n "checking for $ac_word... " >&6; }
8751if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8752 $as_echo_n "(cached) " >&6
8753else
8754 case $PKG_CONFIG in
8755 [\\/]* | ?:[\\/]*)
8756 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8757 ;;
8758 *)
8759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8760for as_dir in $PATH
8761do
8762 IFS=$as_save_IFS
8763 test -z "$as_dir" && as_dir=.
8764 for ac_exec_ext in '' $ac_executable_extensions; do
8765 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8766 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8768 break 2
8769 fi
8770done
8771 done
8772IFS=$as_save_IFS
8773
8774 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8775 ;;
8776esac
8777fi
8778PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8779if test -n "$PKG_CONFIG"; then
8780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8781$as_echo "$PKG_CONFIG" >&6; }
8782else
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784$as_echo "no" >&6; }
8785fi
8786
8787
8788
8789 if test "$PKG_CONFIG" = "no" ; then
8790 pkg_check_gtk=no
8791 else
8792 PKG_CONFIG_MIN_VERSION=0.9.0
8793 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8795$as_echo_n "checking for $GTK_MODULES... " >&6; }
8796
8797 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8799$as_echo "yes" >&6; }
8800 succeeded=yes
8801
8802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8803$as_echo_n "checking GTK_CFLAGS... " >&6; }
8804 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8806$as_echo "$GTK_CFLAGS" >&6; }
8807
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8809$as_echo_n "checking GTK_LIBS... " >&6; }
8810 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8812$as_echo "$GTK_LIBS" >&6; }
8813 else
8814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8815$as_echo "no" >&6; }
8816 GTK_CFLAGS=""
8817 GTK_LIBS=""
8818 ## If we have a custom action on failure, don't print errors, but
8819 ## do set a variable so people can do so.
8820 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8821
8822 fi
8823
8824
8825
8826 else
8827 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8828 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8829 fi
8830 fi
8831
8832 if test $succeeded = yes; then
8833 pkg_check_gtk=yes
8834 else
8835 pkg_check_gtk=no
8836 fi
8837
8838 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
a8101f66 8839 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
e547b051
J
8840 fi
8841fi
8842
8843if test "$pkg_check_gtk" != "yes"; then
8844 HAVE_GTK=no
eb697db5
DN
8845if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8846 GLIB_REQUIRED=2.6
8847 GTK_REQUIRED=2.6
8848 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
91e84f96 8849
91e84f96 8850
eb697db5 8851 succeeded=no
91e84f96 8852
eb697db5
DN
8853 # Extract the first word of "pkg-config", so it can be a program name with args.
8854set dummy pkg-config; ac_word=$2
8855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8856$as_echo_n "checking for $ac_word... " >&6; }
8857if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981 8858 $as_echo_n "(cached) " >&6
91e84f96 8859else
eb697db5
DN
8860 case $PKG_CONFIG in
8861 [\\/]* | ?:[\\/]*)
8862 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8863 ;;
8864 *)
8865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8866for as_dir in $PATH
8867do
8868 IFS=$as_save_IFS
8869 test -z "$as_dir" && as_dir=.
8870 for ac_exec_ext in '' $ac_executable_extensions; do
8871 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8872 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8874 break 2
8875 fi
8876done
8877 done
8878IFS=$as_save_IFS
91e84f96 8879
eb697db5
DN
8880 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8881 ;;
5929fbe7 8882esac
91e84f96 8883fi
eb697db5
DN
8884PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8885if test -n "$PKG_CONFIG"; then
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8887$as_echo "$PKG_CONFIG" >&6; }
a4f64981 8888else
eb697db5
DN
8889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8890$as_echo "no" >&6; }
91e84f96
GM
8891fi
8892
8893
91e84f96 8894
eb697db5
DN
8895 if test "$PKG_CONFIG" = "no" ; then
8896 pkg_check_gtk=no
8897 else
8898 PKG_CONFIG_MIN_VERSION=0.9.0
8899 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8901$as_echo_n "checking for $GTK_MODULES... " >&6; }
91e84f96 8902
eb697db5
DN
8903 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8905$as_echo "yes" >&6; }
8906 succeeded=yes
91e84f96 8907
eb697db5
DN
8908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8909$as_echo_n "checking GTK_CFLAGS... " >&6; }
8910 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8912$as_echo "$GTK_CFLAGS" >&6; }
91e84f96 8913
eb697db5
DN
8914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8915$as_echo_n "checking GTK_LIBS... " >&6; }
8916 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8918$as_echo "$GTK_LIBS" >&6; }
8919 else
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8921$as_echo "no" >&6; }
8922 GTK_CFLAGS=""
8923 GTK_LIBS=""
8924 ## If we have a custom action on failure, don't print errors, but
8925 ## do set a variable so people can do so.
8926 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
91e84f96 8927
eb697db5 8928 fi
91e84f96 8929
91e84f96 8930
91e84f96 8931
eb697db5
DN
8932 else
8933 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8934 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8935 fi
8936 fi
91e84f96 8937
eb697db5
DN
8938 if test $succeeded = yes; then
8939 pkg_check_gtk=yes
8940 else
8941 pkg_check_gtk=no
8942 fi
91e84f96 8943
eb697db5
DN
8944 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
8945 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
8946 fi
8c5ff6dd 8947fi
e547b051 8948fi
91e84f96 8949
eb697db5
DN
8950GTK_OBJ=
8951if test x"$pkg_check_gtk" = xyes; then
91e84f96 8952
91e84f96 8953
91e84f96 8954
eb697db5
DN
8955 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8956 CFLAGS="$CFLAGS $GTK_CFLAGS"
8957 LIBS="$GTK_LIBS $LIBS"
8958 GTK_COMPILES=no
8959 for ac_func in gtk_main
8960do :
8961 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8962if test "x$ac_cv_func_gtk_main" = x""yes; then :
8963 cat >>confdefs.h <<_ACEOF
8964#define HAVE_GTK_MAIN 1
8965_ACEOF
8966 GTK_COMPILES=yes
91e84f96 8967fi
eb697db5 8968done
91e84f96 8969
eb697db5
DN
8970 if test "${GTK_COMPILES}" != "yes"; then
8971 if test "$USE_X_TOOLKIT" != "maybe"; then
8972 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
8973 fi
8974 else
8975 HAVE_GTK=yes
91e84f96 8976
eb697db5 8977$as_echo "#define USE_GTK 1" >>confdefs.h
91e84f96 8978
eb697db5
DN
8979 GTK_OBJ=gtkutil.o
8980 USE_X_TOOLKIT=none
8981 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
8982 :
8983 else
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
8985 closing open displays. This is no problem if you just use
8986 one display, but if you use more than one and close one of them
8987 Emacs may crash." >&5
8988$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
8989 closing open displays. This is no problem if you just use
8990 one display, but if you use more than one and close one of them
8991 Emacs may crash." >&2;}
8992 sleep 3
8993 fi
8994 fi
91e84f96 8995
a4f64981 8996fi
91e84f96 8997
91e84f96 8998
91e84f96 8999
eb697db5 9000if test "${HAVE_GTK}" = "yes"; then
91e84f96 9001
eb697db5
DN
9002 if test "$with_toolkit_scroll_bars" != no; then
9003 with_toolkit_scroll_bars=yes
eb697db5 9004 fi
8c5ff6dd 9005
eb697db5
DN
9006 HAVE_GTK_FILE_SELECTION=no
9007 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
9008#include <gtk/gtk.h>
9009"
9010if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
9011 HAVE_GTK_FILE_SELECTION=yes
91e84f96 9012else
eb697db5 9013 HAVE_GTK_FILE_SELECTION=no
5929fbe7 9014fi
91e84f96 9015
eb697db5
DN
9016 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
9017 for ac_func in gtk_file_selection_new
9018do :
9019 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
9020if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
5929fbe7 9021 cat >>confdefs.h <<_ACEOF
eb697db5 9022#define HAVE_GTK_FILE_SELECTION_NEW 1
91e84f96 9023_ACEOF
91e84f96 9024
91e84f96 9025fi
eb697db5 9026done
91e84f96 9027
eb697db5 9028 fi
5929fbe7 9029
e547b051 9030 HAVE_GTK_AND_PTHREAD=no
eb697db5
DN
9031 for ac_header in pthread.h
9032do :
9033 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
9034if test "x$ac_cv_header_pthread_h" = x""yes; then :
91e84f96 9035 cat >>confdefs.h <<_ACEOF
eb697db5 9036#define HAVE_PTHREAD_H 1
91e84f96
GM
9037_ACEOF
9038
91e84f96
GM
9039fi
9040
eb697db5 9041done
91e84f96 9042
eb697db5
DN
9043 if test "$ac_cv_header_pthread_h"; then
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
9045$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
9046if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
91e84f96
GM
9047 $as_echo_n "(cached) " >&6
9048else
9049 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
9050LIBS="-lpthread $LIBS"
9051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
9052/* end confdefs.h. */
9053
9054/* Override any GCC internal prototype to avoid an error.
9055 Use char because int might match the return type of a GCC
9056 builtin and then its argument prototype would still apply. */
9057#ifdef __cplusplus
9058extern "C"
9059#endif
eb697db5 9060char pthread_self ();
91e84f96
GM
9061int
9062main ()
9063{
eb697db5 9064return pthread_self ();
91e84f96
GM
9065 ;
9066 return 0;
9067}
9068_ACEOF
eb697db5
DN
9069if ac_fn_c_try_link "$LINENO"; then :
9070 ac_cv_lib_pthread_pthread_self=yes
91e84f96 9071else
eb697db5 9072 ac_cv_lib_pthread_pthread_self=no
91e84f96 9073fi
eb697db5
DN
9074rm -f core conftest.err conftest.$ac_objext \
9075 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
9076LIBS=$ac_check_lib_save_LIBS
9077fi
eb697db5
DN
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
9079$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
9080if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
9081 HAVE_GTK_AND_PTHREAD=yes
91e84f96
GM
9082fi
9083
eb697db5
DN
9084 fi
9085 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
9086 case "${canonical}" in
9087 *-hpux*) ;;
9088 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
9089 esac
91e84f96 9090
eb697db5 9091$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
cd03c74a 9092
eb697db5 9093 fi
e547b051
J
9094
9095 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
9096 gtk_dialog_get_action_area gtk_widget_get_sensitive \
9097 gtk_widget_get_mapped gtk_adjustment_get_page_size \
9098 gtk_orientable_set_orientation
9099do :
9100 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9101ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
a8101f66
JV
9102eval as_val=\$$as_ac_var
9103 if test "x$as_val" = x""yes; then :
e547b051
J
9104 cat >>confdefs.h <<_ACEOF
9105#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9106_ACEOF
9107
9108fi
9109done
9110
9111
91e84f96 9112fi
49ebbd65 9113
eb697db5
DN
9114HAVE_DBUS=no
9115DBUS_OBJ=
9116if test "${with_dbus}" = "yes"; then
15e12598 9117
eb697db5 9118 succeeded=no
a4f64981 9119
eb697db5
DN
9120 # Extract the first word of "pkg-config", so it can be a program name with args.
9121set dummy pkg-config; ac_word=$2
9122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9123$as_echo_n "checking for $ac_word... " >&6; }
9124if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
9125 $as_echo_n "(cached) " >&6
9126else
eb697db5
DN
9127 case $PKG_CONFIG in
9128 [\\/]* | ?:[\\/]*)
9129 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9130 ;;
9131 *)
9132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9133for as_dir in $PATH
9134do
9135 IFS=$as_save_IFS
9136 test -z "$as_dir" && as_dir=.
9137 for ac_exec_ext in '' $ac_executable_extensions; do
9138 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9139 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9141 break 2
9142 fi
9143done
9144 done
9145IFS=$as_save_IFS
91e84f96 9146
eb697db5
DN
9147 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9148 ;;
a4f64981 9149esac
eb697db5
DN
9150fi
9151PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9152if test -n "$PKG_CONFIG"; then
9153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9154$as_echo "$PKG_CONFIG" >&6; }
91e84f96 9155else
eb697db5
DN
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157$as_echo "no" >&6; }
5929fbe7 9158fi
a4f64981 9159
49ebbd65 9160
eb697db5
DN
9161
9162 if test "$PKG_CONFIG" = "no" ; then
9163 HAVE_DBUS=no
9164 else
9165 PKG_CONFIG_MIN_VERSION=0.9.0
9166 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
9168$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
9169
9170 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9172$as_echo "yes" >&6; }
9173 succeeded=yes
9174
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
9176$as_echo_n "checking DBUS_CFLAGS... " >&6; }
9177 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
9179$as_echo "$DBUS_CFLAGS" >&6; }
9180
9181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
9182$as_echo_n "checking DBUS_LIBS... " >&6; }
9183 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
9185$as_echo "$DBUS_LIBS" >&6; }
9186 else
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9188$as_echo "no" >&6; }
9189 DBUS_CFLAGS=""
9190 DBUS_LIBS=""
9191 ## If we have a custom action on failure, don't print errors, but
9192 ## do set a variable so people can do so.
9193 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
9194
9195 fi
9196
9197
9198
9199 else
9200 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9201 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9202 fi
9203 fi
9204
9205 if test $succeeded = yes; then
9206 HAVE_DBUS=yes
9207 else
9208 HAVE_DBUS=no
9209 fi
9210
9211 if test "$HAVE_DBUS" = yes; then
9212 LIBS="$LIBS $DBUS_LIBS"
9213
9214$as_echo "#define HAVE_DBUS 1" >>confdefs.h
9215
9216 for ac_func in dbus_watch_get_unix_fd
9217do :
9218 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
9219if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
9220 cat >>confdefs.h <<_ACEOF
9221#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
91e84f96 9222_ACEOF
eb697db5
DN
9223
9224fi
9225done
9226
9227 DBUS_OBJ=dbusbind.o
9228 fi
9229fi
9230
9231
9232HAVE_GCONF=no
9233if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
9234
9235 succeeded=no
9236
9237 # Extract the first word of "pkg-config", so it can be a program name with args.
9238set dummy pkg-config; ac_word=$2
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9240$as_echo_n "checking for $ac_word... " >&6; }
9241if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9242 $as_echo_n "(cached) " >&6
9243else
9244 case $PKG_CONFIG in
9245 [\\/]* | ?:[\\/]*)
9246 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9247 ;;
9248 *)
9249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9250for as_dir in $PATH
9251do
9252 IFS=$as_save_IFS
9253 test -z "$as_dir" && as_dir=.
9254 for ac_exec_ext in '' $ac_executable_extensions; do
9255 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9256 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9257 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9258 break 2
9259 fi
9260done
9261 done
9262IFS=$as_save_IFS
9263
9264 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9265 ;;
91e84f96 9266esac
eb697db5
DN
9267fi
9268PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9269if test -n "$PKG_CONFIG"; then
9270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9271$as_echo "$PKG_CONFIG" >&6; }
91e84f96 9272else
eb697db5
DN
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274$as_echo "no" >&6; }
9275fi
9276
9277
9278
9279 if test "$PKG_CONFIG" = "no" ; then
9280 HAVE_GCONF=no
9281 else
9282 PKG_CONFIG_MIN_VERSION=0.9.0
9283 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
9285$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
9286
9287 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
9288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9289$as_echo "yes" >&6; }
9290 succeeded=yes
9291
9292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
9293$as_echo_n "checking GCONF_CFLAGS... " >&6; }
9294 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
9296$as_echo "$GCONF_CFLAGS" >&6; }
9297
9298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
9299$as_echo_n "checking GCONF_LIBS... " >&6; }
9300 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
9301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
9302$as_echo "$GCONF_LIBS" >&6; }
9303 else
9304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9305$as_echo "no" >&6; }
9306 GCONF_CFLAGS=""
9307 GCONF_LIBS=""
9308 ## If we have a custom action on failure, don't print errors, but
9309 ## do set a variable so people can do so.
9310 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
91e84f96 9311
eb697db5 9312 fi
91e84f96 9313
91e84f96 9314
91e84f96 9315
eb697db5
DN
9316 else
9317 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9318 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9319 fi
9320 fi
91e84f96 9321
eb697db5
DN
9322 if test $succeeded = yes; then
9323 HAVE_GCONF=yes
9324 else
9325 HAVE_GCONF=no
9326 fi
91e84f96 9327
eb697db5 9328 if test "$HAVE_GCONF" = yes; then
91e84f96 9329
eb697db5 9330$as_echo "#define HAVE_GCONF 1" >>confdefs.h
8c5ff6dd 9331
eb697db5 9332 fi
91e84f96
GM
9333fi
9334
eb697db5
DN
9335HAVE_LIBSELINUX=no
9336LIBSELINUX_LIBS=
9337if test "${with_selinux}" = "yes"; then
9338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
9339$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
9340if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
91e84f96
GM
9341 $as_echo_n "(cached) " >&6
9342else
9343 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
9344LIBS="-lselinux $LIBS"
9345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
9346/* end confdefs.h. */
9347
9348/* Override any GCC internal prototype to avoid an error.
9349 Use char because int might match the return type of a GCC
9350 builtin and then its argument prototype would still apply. */
9351#ifdef __cplusplus
9352extern "C"
9353#endif
eb697db5 9354char lgetfilecon ();
91e84f96
GM
9355int
9356main ()
9357{
eb697db5 9358return lgetfilecon ();
91e84f96
GM
9359 ;
9360 return 0;
9361}
9362_ACEOF
eb697db5
DN
9363if ac_fn_c_try_link "$LINENO"; then :
9364 ac_cv_lib_selinux_lgetfilecon=yes
91e84f96 9365else
eb697db5 9366 ac_cv_lib_selinux_lgetfilecon=no
91e84f96 9367fi
eb697db5
DN
9368rm -f core conftest.err conftest.$ac_objext \
9369 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
9370LIBS=$ac_check_lib_save_LIBS
9371fi
eb697db5
DN
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
9373$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
9374if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
9375 HAVE_LIBSELINUX=yes
91e84f96 9376else
eb697db5 9377 HAVE_LIBSELINUX=no
91e84f96
GM
9378fi
9379
eb697db5 9380 if test "$HAVE_LIBSELINUX" = yes; then
15e12598 9381
eb697db5 9382$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
e6df49e4 9383
eb697db5
DN
9384 LIBSELINUX_LIBS=-lselinux
9385 fi
91e84f96
GM
9386fi
9387
91e84f96 9388
eb697db5
DN
9389HAVE_XAW3D=no
9390LUCID_LIBW=
9391if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
9392 if test "$with_xaw3d" != no; then
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
9394$as_echo_n "checking for xaw3d... " >&6; }
9395 if test "${emacs_cv_xaw3d+set}" = set; then :
91e84f96
GM
9396 $as_echo_n "(cached) " >&6
9397else
eb697db5 9398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9399/* end confdefs.h. */
91e84f96 9400
eb697db5
DN
9401#include <X11/Intrinsic.h>
9402#include <X11/Xaw3d/Simple.h>
91e84f96
GM
9403int
9404main ()
9405{
5929fbe7 9406
91e84f96
GM
9407 ;
9408 return 0;
9409}
9410_ACEOF
eb697db5
DN
9411if ac_fn_c_try_link "$LINENO"; then :
9412 emacs_cv_xaw3d=yes
91e84f96 9413else
eb697db5 9414 emacs_cv_xaw3d=no
91e84f96 9415fi
eb697db5
DN
9416rm -f core conftest.err conftest.$ac_objext \
9417 conftest$ac_exeext conftest.$ac_ext
91e84f96 9418fi
91e84f96 9419
eb697db5
DN
9420 else
9421 emacs_cv_xaw3d=no
9422 fi
9423 if test $emacs_cv_xaw3d = yes; then
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9425$as_echo "yes; using Lucid toolkit" >&6; }
9426 USE_X_TOOLKIT=LUCID
9427 HAVE_XAW3D=yes
9428 LUCID_LIBW=-lXaw3d
91e84f96 9429
eb697db5 9430$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
91e84f96 9431
eb697db5
DN
9432 else
9433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434$as_echo "no" >&6; }
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
9436$as_echo_n "checking for libXaw... " >&6; }
9437 if test "${emacs_cv_xaw+set}" = set; then :
91e84f96 9438 $as_echo_n "(cached) " >&6
91e84f96 9439else
eb697db5 9440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9441/* end confdefs.h. */
91e84f96 9442
eb697db5
DN
9443#include <X11/Intrinsic.h>
9444#include <X11/Xaw/Simple.h>
9445int
9446main ()
9447{
91e84f96 9448
eb697db5
DN
9449 ;
9450 return 0;
9451}
91e84f96 9452_ACEOF
eb697db5
DN
9453if ac_fn_c_try_link "$LINENO"; then :
9454 emacs_cv_xaw=yes
91e84f96 9455else
eb697db5
DN
9456 emacs_cv_xaw=no
9457fi
9458rm -f core conftest.err conftest.$ac_objext \
9459 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
9460fi
9461
eb697db5
DN
9462 if test $emacs_cv_xaw = yes; then
9463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9464$as_echo "yes; using Lucid toolkit" >&6; }
9465 USE_X_TOOLKIT=LUCID
9466 LUCID_LIBW=-lXaw
9467 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
9468 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
9469 else
9470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
9471$as_echo "no; do not use toolkit by default" >&6; }
9472 USE_X_TOOLKIT=none
9473 fi
9474 fi
5929fbe7 9475fi
91e84f96 9476
eb697db5 9477X_TOOLKIT_TYPE=$USE_X_TOOLKIT
91e84f96 9478
eb697db5
DN
9479LIBXTR6=
9480if test "${USE_X_TOOLKIT}" != "none"; then
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
9482$as_echo_n "checking X11 toolkit version... " >&6; }
9483 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
91e84f96
GM
9484 $as_echo_n "(cached) " >&6
9485else
eb697db5
DN
9486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9487/* end confdefs.h. */
9488#include <X11/Intrinsic.h>
9489int
9490main ()
9491{
9492#if XtSpecificationRelease < 6
9493fail;
9494#endif
91e84f96 9495
eb697db5
DN
9496 ;
9497 return 0;
9498}
9499_ACEOF
9500if ac_fn_c_try_link "$LINENO"; then :
9501 emacs_cv_x11_toolkit_version_6=yes
5929fbe7 9502else
eb697db5 9503 emacs_cv_x11_toolkit_version_6=no
5929fbe7 9504fi
eb697db5
DN
9505rm -f core conftest.err conftest.$ac_objext \
9506 conftest$ac_exeext conftest.$ac_ext
91e84f96 9507fi
91e84f96 9508
eb697db5
DN
9509 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
9510 if test $emacs_cv_x11_toolkit_version_6 = yes; then
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
9512$as_echo "6 or newer" >&6; }
91e84f96 9513
eb697db5 9514$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
91e84f96 9515
eb697db5
DN
9516 LIBXTR6="-lSM -lICE"
9517 case "$opsys" in
9518 ## Use libw.a along with X11R6 Xt.
9519 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
9520 esac
9521 else
9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
9523$as_echo "before 6" >&6; }
9524 fi
5929fbe7 9525
eb697db5
DN
9526 OLDLIBS="$LIBS"
9527 if test x$HAVE_X11XTR6 = xyes; then
9528 LIBS="-lXt -lSM -lICE $LIBS"
9529 else
9530 LIBS="-lXt $LIBS"
9531 fi
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
9533$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
9534if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
91e84f96
GM
9535 $as_echo_n "(cached) " >&6
9536else
9537 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
9538LIBS="-lXmu $LIBS"
9539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
9540/* end confdefs.h. */
9541
9542/* Override any GCC internal prototype to avoid an error.
9543 Use char because int might match the return type of a GCC
9544 builtin and then its argument prototype would still apply. */
9545#ifdef __cplusplus
9546extern "C"
9547#endif
eb697db5 9548char XmuConvertStandardSelection ();
91e84f96
GM
9549int
9550main ()
9551{
eb697db5 9552return XmuConvertStandardSelection ();
91e84f96
GM
9553 ;
9554 return 0;
9555}
9556_ACEOF
eb697db5
DN
9557if ac_fn_c_try_link "$LINENO"; then :
9558 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
91e84f96 9559else
eb697db5 9560 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
91e84f96 9561fi
eb697db5
DN
9562rm -f core conftest.err conftest.$ac_objext \
9563 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
9564LIBS=$ac_check_lib_save_LIBS
9565fi
eb697db5
DN
9566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
9567$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
9568if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
91e84f96 9569 cat >>confdefs.h <<_ACEOF
eb697db5 9570#define HAVE_LIBXMU 1
91e84f96
GM
9571_ACEOF
9572
eb697db5 9573 LIBS="-lXmu $LIBS"
91e84f96
GM
9574
9575fi
9576
eb697db5 9577 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
91e84f96
GM
9578fi
9579
9580
eb697db5
DN
9581LIBXMU=-lXmu
9582case "$machine" in
9583 ## These machines don't supply Xmu.
9584 hpux* | aix4-2 )
9585 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
5929fbe7
GM
9586 ;;
9587esac
eb697db5 9588
91e84f96 9589
eb697db5
DN
9590# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
9591if test "${HAVE_X11}" = "yes"; then
9592 if test "${USE_X_TOOLKIT}" != "none"; then
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
9594$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
9595if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
91e84f96 9596 $as_echo_n "(cached) " >&6
91e84f96 9597else
eb697db5
DN
9598 ac_check_lib_save_LIBS=$LIBS
9599LIBS="-lXext $LIBS"
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9601/* end confdefs.h. */
91e84f96 9602
eb697db5
DN
9603/* Override any GCC internal prototype to avoid an error.
9604 Use char because int might match the return type of a GCC
9605 builtin and then its argument prototype would still apply. */
9606#ifdef __cplusplus
9607extern "C"
9608#endif
9609char XShapeQueryExtension ();
9610int
9611main ()
9612{
9613return XShapeQueryExtension ();
9614 ;
9615 return 0;
9616}
91e84f96 9617_ACEOF
eb697db5
DN
9618if ac_fn_c_try_link "$LINENO"; then :
9619 ac_cv_lib_Xext_XShapeQueryExtension=yes
91e84f96 9620else
eb697db5 9621 ac_cv_lib_Xext_XShapeQueryExtension=no
91e84f96 9622fi
eb697db5
DN
9623rm -f core conftest.err conftest.$ac_objext \
9624 conftest$ac_exeext conftest.$ac_ext
9625LIBS=$ac_check_lib_save_LIBS
5929fbe7 9626fi
eb697db5
DN
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
9628$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
9629if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
5929fbe7 9630 cat >>confdefs.h <<_ACEOF
eb697db5 9631#define HAVE_LIBXEXT 1
5929fbe7 9632_ACEOF
91e84f96 9633
eb697db5 9634 LIBS="-lXext $LIBS"
91e84f96 9635
91e84f96 9636fi
91e84f96 9637
eb697db5 9638 fi
91e84f96
GM
9639fi
9640
eb697db5
DN
9641LIBXP=
9642if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
9644$as_echo_n "checking for Motif version 2.1... " >&6; }
9645if test "${emacs_cv_motif_version_2_1+set}" = set; then :
91e84f96
GM
9646 $as_echo_n "(cached) " >&6
9647else
eb697db5 9648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9649/* end confdefs.h. */
eb697db5
DN
9650#include <Xm/Xm.h>
9651int
9652main ()
9653{
9654#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
9655int x = 5;
91e84f96 9656#else
eb697db5 9657Motif version prior to 2.1.
91e84f96 9658#endif
eb697db5
DN
9659 ;
9660 return 0;
9661}
91e84f96 9662_ACEOF
eb697db5
DN
9663if ac_fn_c_try_compile "$LINENO"; then :
9664 emacs_cv_motif_version_2_1=yes
91e84f96 9665else
eb697db5 9666 emacs_cv_motif_version_2_1=no
91e84f96 9667fi
5929fbe7 9668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9669fi
9670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
9671$as_echo "$emacs_cv_motif_version_2_1" >&6; }
9672 if test $emacs_cv_motif_version_2_1 = yes; then
9673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
9674$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
9675if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
9676 $as_echo_n "(cached) " >&6
9677else
9678 ac_check_lib_save_LIBS=$LIBS
9679LIBS="-lXp $LIBS"
9680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9681/* end confdefs.h. */
91e84f96
GM
9682
9683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
9686#ifdef __cplusplus
9687extern "C"
9688#endif
eb697db5 9689char XpCreateContext ();
91e84f96
GM
9690int
9691main ()
9692{
eb697db5 9693return XpCreateContext ();
91e84f96
GM
9694 ;
9695 return 0;
9696}
9697_ACEOF
eb697db5
DN
9698if ac_fn_c_try_link "$LINENO"; then :
9699 ac_cv_lib_Xp_XpCreateContext=yes
91e84f96 9700else
eb697db5
DN
9701 ac_cv_lib_Xp_XpCreateContext=no
9702fi
9703rm -f core conftest.err conftest.$ac_objext \
9704 conftest$ac_exeext conftest.$ac_ext
9705LIBS=$ac_check_lib_save_LIBS
9706fi
9707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
9708$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
9709if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
9710 LIBXP=-lXp
9711fi
91e84f96 9712
eb697db5
DN
9713 else
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
9715$as_echo_n "checking for LessTif where some systems put it... " >&6; }
9716if test "${emacs_cv_lesstif+set}" = set; then :
9717 $as_echo_n "(cached) " >&6
9718else
9719 # We put this in CFLAGS temporarily to precede other -I options
9720 # that might be in CFLAGS temporarily.
9721 # We put this in CPPFLAGS where it precedes the other -I options.
9722 OLD_CPPFLAGS=$CPPFLAGS
9723 OLD_CFLAGS=$CFLAGS
9724 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
9725 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
9726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9727/* end confdefs.h. */
eb697db5
DN
9728#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
9729int
9730main ()
9731{
9732int x = 5;
9733 ;
9734 return 0;
9735}
a4f64981 9736_ACEOF
eb697db5
DN
9737if ac_fn_c_try_compile "$LINENO"; then :
9738 emacs_cv_lesstif=yes
8c5ff6dd 9739else
eb697db5
DN
9740 emacs_cv_lesstif=no
9741fi
9742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9743fi
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
9745$as_echo "$emacs_cv_lesstif" >&6; }
9746 if test $emacs_cv_lesstif = yes; then
9747 # Make sure this -I option remains in CPPFLAGS after it is set
9748 # back to REAL_CPPFLAGS.
9749 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
9750 # have those other -I options anyway. Ultimately, having this
9751 # directory ultimately in CPPFLAGS will be enough.
9752 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
9753 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
9754 else
9755 CFLAGS=$OLD_CFLAGS
9756 CPPFLAGS=$OLD_CPPFLAGS
9757 fi
9758 fi
91e84f96
GM
9759fi
9760
91e84f96 9761
eb697db5
DN
9762USE_TOOLKIT_SCROLL_BARS=no
9763if test "${with_toolkit_scroll_bars}" != "no"; then
9764 if test "${USE_X_TOOLKIT}" != "none"; then
9765 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9766 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
91e84f96 9767
eb697db5
DN
9768 HAVE_XAW3D=no
9769 USE_TOOLKIT_SCROLL_BARS=yes
9770 elif test "${HAVE_XAW3D}" = "yes"; then
9771 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
91e84f96 9772
eb697db5
DN
9773 USE_TOOLKIT_SCROLL_BARS=yes
9774 fi
9775 elif test "${HAVE_GTK}" = "yes"; then
9776 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
91e84f96 9777
eb697db5
DN
9778 USE_TOOLKIT_SCROLL_BARS=yes
9779 elif test "${HAVE_NS}" = "yes"; then
9780 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
91e84f96 9781
eb697db5
DN
9782 USE_TOOLKIT_SCROLL_BARS=yes
9783 fi
91e84f96
GM
9784fi
9785
eb697db5 9786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9787/* end confdefs.h. */
91e84f96 9788
eb697db5
DN
9789 #include <X11/Xlib.h>
9790 #include <X11/Xresource.h>
91e84f96
GM
9791int
9792main ()
9793{
eb697db5 9794XIMProc callback;
91e84f96
GM
9795 ;
9796 return 0;
9797}
9798_ACEOF
eb697db5
DN
9799if ac_fn_c_try_compile "$LINENO"; then :
9800 HAVE_XIM=yes
91e84f96 9801
eb697db5 9802$as_echo "#define HAVE_XIM 1" >>confdefs.h
91e84f96 9803
91e84f96 9804else
eb697db5 9805 HAVE_XIM=no
91e84f96 9806fi
eb697db5 9807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 9808
91e84f96 9809
eb697db5 9810if test "${with_xim}" != "no"; then
91e84f96 9811
eb697db5 9812$as_echo "#define USE_XIM 1" >>confdefs.h
91e84f96
GM
9813
9814fi
91e84f96 9815
91e84f96 9816
eb697db5
DN
9817if test "${HAVE_XIM}" != "no"; then
9818 late_CFLAGS=$CFLAGS
9819 if test "$GCC" = yes; then
9820 CFLAGS="$CFLAGS --pedantic-errors"
9821 fi
9822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9823/* end confdefs.h. */
91e84f96 9824
eb697db5
DN
9825#include <X11/Xlib.h>
9826#include <X11/Xresource.h>
5929fbe7
GM
9827int
9828main ()
9829{
eb697db5
DN
9830Display *display;
9831XrmDatabase db;
9832char *res_name;
9833char *res_class;
9834XIMProc callback;
9835XPointer *client_data;
9836#ifndef __GNUC__
9837/* If we're not using GCC, it's probably not XFree86, and this is
9838 probably right, but we can't use something like --pedantic-errors. */
9839extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9840 char*, XIMProc, XPointer*);
9841#endif
9842(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9843 client_data);
5929fbe7
GM
9844 ;
9845 return 0;
9846}
91e84f96 9847_ACEOF
eb697db5
DN
9848if ac_fn_c_try_compile "$LINENO"; then :
9849 emacs_cv_arg6_star=yes
91e84f96 9850fi
5929fbe7 9851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9852 if test "$emacs_cv_arg6_star" = yes; then
9853 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
91e84f96 9854
eb697db5
DN
9855 else
9856 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
91e84f96 9857
eb697db5
DN
9858 fi
9859 CFLAGS=$late_CFLAGS
91e84f96
GM
9860fi
9861
eb697db5
DN
9862### Start of font-backend (under any platform) section.
9863# (nothing here yet -- this is a placeholder)
9864### End of font-backend (under any platform) section.
91e84f96 9865
eb697db5
DN
9866### Start of font-backend (under X11) section.
9867if test "${HAVE_X11}" = "yes"; then
91e84f96 9868
eb697db5 9869 succeeded=no
91e84f96 9870
eb697db5
DN
9871 # Extract the first word of "pkg-config", so it can be a program name with args.
9872set dummy pkg-config; ac_word=$2
9873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9874$as_echo_n "checking for $ac_word... " >&6; }
9875if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9876 $as_echo_n "(cached) " >&6
91e84f96 9877else
eb697db5
DN
9878 case $PKG_CONFIG in
9879 [\\/]* | ?:[\\/]*)
9880 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9881 ;;
9882 *)
9883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9884for as_dir in $PATH
9885do
9886 IFS=$as_save_IFS
9887 test -z "$as_dir" && as_dir=.
9888 for ac_exec_ext in '' $ac_executable_extensions; do
9889 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9890 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9892 break 2
9893 fi
9894done
9895 done
9896IFS=$as_save_IFS
91e84f96 9897
eb697db5
DN
9898 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9899 ;;
91e84f96 9900esac
eb697db5
DN
9901fi
9902PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9903if test -n "$PKG_CONFIG"; then
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9905$as_echo "$PKG_CONFIG" >&6; }
91e84f96 9906else
eb697db5
DN
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9908$as_echo "no" >&6; }
91e84f96 9909fi
91e84f96 9910
91e84f96 9911
91e84f96 9912
eb697db5
DN
9913 if test "$PKG_CONFIG" = "no" ; then
9914 HAVE_FC=no
9915 else
9916 PKG_CONFIG_MIN_VERSION=0.9.0
9917 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
9919$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
91e84f96 9920
eb697db5
DN
9921 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9923$as_echo "yes" >&6; }
9924 succeeded=yes
91e84f96 9925
eb697db5
DN
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
9927$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
9928 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
9930$as_echo "$FONTCONFIG_CFLAGS" >&6; }
91e84f96 9931
eb697db5
DN
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
9933$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
9934 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
9936$as_echo "$FONTCONFIG_LIBS" >&6; }
9937 else
9938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9939$as_echo "no" >&6; }
9940 FONTCONFIG_CFLAGS=""
9941 FONTCONFIG_LIBS=""
9942 ## If we have a custom action on failure, don't print errors, but
9943 ## do set a variable so people can do so.
9944 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
91e84f96 9945
eb697db5 9946 fi
91e84f96 9947
91e84f96 9948
91e84f96 9949
eb697db5
DN
9950 else
9951 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9952 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9953 fi
9954 fi
91e84f96 9955
eb697db5
DN
9956 if test $succeeded = yes; then
9957 HAVE_FC=yes
9958 else
9959 HAVE_FC=no
9960 fi
91e84f96 9961
91e84f96 9962
eb697db5
DN
9963 ## Use -lXft if available, unless `--with-xft=no'.
9964 HAVE_XFT=maybe
9965 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
9966 with_xft="no";
9967 fi
9968 if test "x${with_xft}" != "xno"; then
9969
9970
9971 succeeded=no
9972
9973 # Extract the first word of "pkg-config", so it can be a program name with args.
9974set dummy pkg-config; ac_word=$2
9975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9976$as_echo_n "checking for $ac_word... " >&6; }
9977if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
9978 $as_echo_n "(cached) " >&6
9979else
eb697db5
DN
9980 case $PKG_CONFIG in
9981 [\\/]* | ?:[\\/]*)
9982 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9983 ;;
9984 *)
9985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9986for as_dir in $PATH
9987do
9988 IFS=$as_save_IFS
9989 test -z "$as_dir" && as_dir=.
9990 for ac_exec_ext in '' $ac_executable_extensions; do
9991 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9992 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9994 break 2
9995 fi
9996done
9997 done
9998IFS=$as_save_IFS
91e84f96 9999
eb697db5
DN
10000 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10001 ;;
10002esac
91e84f96 10003fi
eb697db5
DN
10004PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10005if test -n "$PKG_CONFIG"; then
10006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10007$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 10008else
eb697db5
DN
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010$as_echo "no" >&6; }
91e84f96
GM
10011fi
10012
91e84f96 10013
91e84f96 10014
eb697db5
DN
10015 if test "$PKG_CONFIG" = "no" ; then
10016 HAVE_XFT=no
10017 else
10018 PKG_CONFIG_MIN_VERSION=0.9.0
10019 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
10021$as_echo_n "checking for xft >= 0.13.0... " >&6; }
91e84f96 10022
eb697db5
DN
10023 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
10024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10025$as_echo "yes" >&6; }
10026 succeeded=yes
91e84f96 10027
eb697db5
DN
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
10029$as_echo_n "checking XFT_CFLAGS... " >&6; }
10030 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
10032$as_echo "$XFT_CFLAGS" >&6; }
91e84f96 10033
eb697db5
DN
10034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
10035$as_echo_n "checking XFT_LIBS... " >&6; }
10036 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
10038$as_echo "$XFT_LIBS" >&6; }
10039 else
10040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10041$as_echo "no" >&6; }
10042 XFT_CFLAGS=""
10043 XFT_LIBS=""
10044 ## If we have a custom action on failure, don't print errors, but
10045 ## do set a variable so people can do so.
10046 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
91e84f96 10047
eb697db5 10048 fi
91e84f96 10049
91e84f96 10050
91e84f96 10051
eb697db5
DN
10052 else
10053 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10054 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10055 fi
10056 fi
91e84f96 10057
eb697db5
DN
10058 if test $succeeded = yes; then
10059 :
10060 else
10061 HAVE_XFT=no
10062 fi
91e84f96 10063
eb697db5
DN
10064 ## Because xftfont.c uses XRenderQueryExtension, we also
10065 ## need to link to -lXrender.
10066 HAVE_XRENDER=no
10067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
10068$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
10069if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
91e84f96
GM
10070 $as_echo_n "(cached) " >&6
10071else
eb697db5
DN
10072 ac_check_lib_save_LIBS=$LIBS
10073LIBS="-lXrender $LIBS"
10074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10075/* end confdefs.h. */
91e84f96 10076
eb697db5
DN
10077/* Override any GCC internal prototype to avoid an error.
10078 Use char because int might match the return type of a GCC
10079 builtin and then its argument prototype would still apply. */
10080#ifdef __cplusplus
10081extern "C"
10082#endif
10083char XRenderQueryExtension ();
91e84f96
GM
10084int
10085main ()
10086{
eb697db5 10087return XRenderQueryExtension ();
91e84f96
GM
10088 ;
10089 return 0;
10090}
10091_ACEOF
eb697db5
DN
10092if ac_fn_c_try_link "$LINENO"; then :
10093 ac_cv_lib_Xrender_XRenderQueryExtension=yes
91e84f96 10094else
eb697db5
DN
10095 ac_cv_lib_Xrender_XRenderQueryExtension=no
10096fi
10097rm -f core conftest.err conftest.$ac_objext \
10098 conftest$ac_exeext conftest.$ac_ext
10099LIBS=$ac_check_lib_save_LIBS
10100fi
10101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
10102$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
10103if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
10104 HAVE_XRENDER=yes
5929fbe7 10105fi
91e84f96 10106
eb697db5
DN
10107 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
10108 OLD_CPPFLAGS="$CPPFLAGS"
10109 OLD_CFLAGS="$CFLAGS"
10110 OLD_LIBS="$LIBS"
10111 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
10112 CFLAGS="$CFLAGS $XFT_CFLAGS"
10113 XFT_LIBS="-lXrender $XFT_LIBS"
10114 LIBS="$XFT_LIBS $LIBS"
10115 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
10116if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
10118$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
10119if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
10120 $as_echo_n "(cached) " >&6
10121else
10122 ac_check_lib_save_LIBS=$LIBS
10123LIBS="-lXft $XFT_LIBS $LIBS"
10124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10125/* end confdefs.h. */
91e84f96 10126
eb697db5
DN
10127/* Override any GCC internal prototype to avoid an error.
10128 Use char because int might match the return type of a GCC
10129 builtin and then its argument prototype would still apply. */
10130#ifdef __cplusplus
10131extern "C"
10132#endif
10133char XftFontOpen ();
91e84f96
GM
10134int
10135main ()
10136{
eb697db5 10137return XftFontOpen ();
91e84f96
GM
10138 ;
10139 return 0;
10140}
10141_ACEOF
eb697db5
DN
10142if ac_fn_c_try_link "$LINENO"; then :
10143 ac_cv_lib_Xft_XftFontOpen=yes
91e84f96 10144else
eb697db5 10145 ac_cv_lib_Xft_XftFontOpen=no
91e84f96 10146fi
eb697db5
DN
10147rm -f core conftest.err conftest.$ac_objext \
10148 conftest$ac_exeext conftest.$ac_ext
10149LIBS=$ac_check_lib_save_LIBS
15e12598 10150fi
eb697db5
DN
10151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
10152$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
10153if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
10154 HAVE_XFT=yes
91e84f96
GM
10155fi
10156
91e84f96 10157fi
91e84f96 10158
91e84f96
GM
10159
10160
eb697db5 10161 if test "${HAVE_XFT}" = "yes"; then
91e84f96 10162
eb697db5 10163$as_echo "#define HAVE_XFT 1" >>confdefs.h
91e84f96
GM
10164
10165
eb697db5
DN
10166 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
10167 else
10168 CPPFLAGS="$OLD_CPPFLAGS"
10169 CFLAGS="$OLD_CFLAGS"
10170 LIBS="$OLD_LIBS"
10171 fi # "${HAVE_XFT}" = "yes"
10172 fi # "$HAVE_XFT" != no
10173 fi # "x${with_xft}" != "xno"
91e84f96 10174
eb697db5
DN
10175 if test "$HAVE_XFT" != "yes"; then
10176 HAVE_XFT=no
10177 fi
91e84f96 10178
91e84f96 10179
eb697db5
DN
10180 HAVE_FREETYPE=no
10181 ## We used to allow building with FreeType and without Xft.
10182 ## However, the ftx font backend driver is not in good shape.
10183 if test "${HAVE_XFT}" = "yes"; then
10184 HAVE_FREETYPE=yes
10185 FONTCONFIG_CFLAGS=
10186 FONTCONFIG_LIBS=
10187 fi
91e84f96 10188
eb697db5
DN
10189 HAVE_LIBOTF=no
10190 if test "${HAVE_FREETYPE}" = "yes"; then
91e84f96 10191
eb697db5 10192$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
91e84f96 10193
eb697db5 10194 if test "${with_libotf}" != "no"; then
91e84f96 10195
eb697db5 10196 succeeded=no
91e84f96 10197
eb697db5
DN
10198 # Extract the first word of "pkg-config", so it can be a program name with args.
10199set dummy pkg-config; ac_word=$2
10200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10201$as_echo_n "checking for $ac_word... " >&6; }
10202if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
10203 $as_echo_n "(cached) " >&6
10204else
eb697db5
DN
10205 case $PKG_CONFIG in
10206 [\\/]* | ?:[\\/]*)
10207 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10208 ;;
10209 *)
10210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10211for as_dir in $PATH
10212do
10213 IFS=$as_save_IFS
10214 test -z "$as_dir" && as_dir=.
10215 for ac_exec_ext in '' $ac_executable_extensions; do
10216 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10217 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10219 break 2
10220 fi
10221done
10222 done
10223IFS=$as_save_IFS
91e84f96 10224
eb697db5
DN
10225 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10226 ;;
5929fbe7 10227esac
91e84f96 10228fi
eb697db5
DN
10229PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10230if test -n "$PKG_CONFIG"; then
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10232$as_echo "$PKG_CONFIG" >&6; }
91e84f96 10233else
eb697db5
DN
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235$as_echo "no" >&6; }
91e84f96 10236fi
91e84f96
GM
10237
10238
10239
eb697db5
DN
10240 if test "$PKG_CONFIG" = "no" ; then
10241 HAVE_LIBOTF=no
10242 else
10243 PKG_CONFIG_MIN_VERSION=0.9.0
10244 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
10246$as_echo_n "checking for libotf... " >&6; }
91e84f96 10247
eb697db5
DN
10248 if $PKG_CONFIG --exists "libotf" 2>&5; then
10249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10250$as_echo "yes" >&6; }
10251 succeeded=yes
91e84f96 10252
eb697db5
DN
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
10254$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
10255 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
10257$as_echo "$LIBOTF_CFLAGS" >&6; }
91e84f96 10258
eb697db5
DN
10259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
10260$as_echo_n "checking LIBOTF_LIBS... " >&6; }
10261 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
10262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
10263$as_echo "$LIBOTF_LIBS" >&6; }
10264 else
10265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10266$as_echo "no" >&6; }
10267 LIBOTF_CFLAGS=""
10268 LIBOTF_LIBS=""
10269 ## If we have a custom action on failure, don't print errors, but
10270 ## do set a variable so people can do so.
10271 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
5929fbe7 10272
eb697db5 10273 fi
15e12598 10274
15e12598
VB
10275
10276
eb697db5
DN
10277 else
10278 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10279 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10280 fi
10281 fi
8c5ff6dd 10282
eb697db5
DN
10283 if test $succeeded = yes; then
10284 HAVE_LIBOTF=yes
10285 else
10286 HAVE_LIBOTF=no
10287 fi
5929fbe7 10288
eb697db5 10289 if test "$HAVE_LIBOTF" = "yes"; then
5929fbe7 10290
eb697db5 10291$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
5929fbe7 10292
eb697db5
DN
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
10294$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
10295if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
10296 $as_echo_n "(cached) " >&6
10297else
10298 ac_check_lib_save_LIBS=$LIBS
10299LIBS="-lotf $LIBS"
10300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10301/* end confdefs.h. */
91e84f96
GM
10302
10303/* Override any GCC internal prototype to avoid an error.
10304 Use char because int might match the return type of a GCC
10305 builtin and then its argument prototype would still apply. */
10306#ifdef __cplusplus
10307extern "C"
10308#endif
eb697db5 10309char OTF_get_variation_glyphs ();
91e84f96
GM
10310int
10311main ()
10312{
eb697db5 10313return OTF_get_variation_glyphs ();
91e84f96
GM
10314 ;
10315 return 0;
10316}
10317_ACEOF
eb697db5
DN
10318if ac_fn_c_try_link "$LINENO"; then :
10319 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
91e84f96 10320else
eb697db5 10321 ac_cv_lib_otf_OTF_get_variation_glyphs=no
91e84f96 10322fi
eb697db5
DN
10323rm -f core conftest.err conftest.$ac_objext \
10324 conftest$ac_exeext conftest.$ac_ext
10325LIBS=$ac_check_lib_save_LIBS
5929fbe7 10326fi
eb697db5
DN
10327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
10328$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
10329if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
10330 HAVE_OTF_GET_VARIATION_GLYPHS=yes
5929fbe7 10331else
eb697db5 10332 HAVE_OTF_GET_VARIATION_GLYPHS=no
91e84f96 10333fi
91e84f96 10334
eb697db5 10335 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
91e84f96 10336
eb697db5 10337$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
91e84f96 10338
eb697db5
DN
10339 fi
10340 fi
10341 fi
10342 fi
91e84f96 10343
eb697db5
DN
10344 HAVE_M17N_FLT=no
10345 if test "${HAVE_LIBOTF}" = yes; then
10346 if test "${with_m17n_flt}" != "no"; then
91e84f96 10347
eb697db5 10348 succeeded=no
91e84f96 10349
eb697db5
DN
10350 # Extract the first word of "pkg-config", so it can be a program name with args.
10351set dummy pkg-config; ac_word=$2
10352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10353$as_echo_n "checking for $ac_word... " >&6; }
10354if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
10355 $as_echo_n "(cached) " >&6
10356else
eb697db5
DN
10357 case $PKG_CONFIG in
10358 [\\/]* | ?:[\\/]*)
10359 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10360 ;;
10361 *)
10362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10363for as_dir in $PATH
10364do
10365 IFS=$as_save_IFS
10366 test -z "$as_dir" && as_dir=.
10367 for ac_exec_ext in '' $ac_executable_extensions; do
10368 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10369 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10371 break 2
10372 fi
10373done
10374 done
10375IFS=$as_save_IFS
91e84f96 10376
eb697db5
DN
10377 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10378 ;;
5929fbe7 10379esac
5929fbe7 10380fi
eb697db5
DN
10381PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10382if test -n "$PKG_CONFIG"; then
10383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10384$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 10385else
eb697db5
DN
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10387$as_echo "no" >&6; }
8c5ff6dd 10388fi
91e84f96
GM
10389
10390
10391
eb697db5
DN
10392 if test "$PKG_CONFIG" = "no" ; then
10393 HAVE_M17N_FLT=no
10394 else
10395 PKG_CONFIG_MIN_VERSION=0.9.0
10396 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
10398$as_echo_n "checking for m17n-flt... " >&6; }
91e84f96 10399
eb697db5
DN
10400 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10402$as_echo "yes" >&6; }
10403 succeeded=yes
91e84f96 10404
eb697db5
DN
10405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
10406$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
10407 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
10409$as_echo "$M17N_FLT_CFLAGS" >&6; }
91e84f96 10410
eb697db5
DN
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
10412$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
10413 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
10415$as_echo "$M17N_FLT_LIBS" >&6; }
10416 else
10417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
10419 M17N_FLT_CFLAGS=""
10420 M17N_FLT_LIBS=""
10421 ## If we have a custom action on failure, don't print errors, but
10422 ## do set a variable so people can do so.
10423 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
91e84f96 10424
eb697db5 10425 fi
91e84f96
GM
10426
10427
91e84f96 10428
eb697db5
DN
10429 else
10430 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10431 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10432 fi
10433 fi
91e84f96 10434
eb697db5
DN
10435 if test $succeeded = yes; then
10436 HAVE_M17N_FLT=yes
10437 else
10438 HAVE_M17N_FLT=no
5929fbe7 10439 fi
91e84f96 10440
eb697db5 10441 if test "$HAVE_M17N_FLT" = "yes"; then
91e84f96 10442
eb697db5 10443$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
91e84f96 10444
eb697db5
DN
10445 fi
10446 fi
10447 fi
91e84f96 10448else
eb697db5
DN
10449 HAVE_XFT=no
10450 HAVE_FREETYPE=no
10451 HAVE_LIBOTF=no
10452 HAVE_M17N_FLT=no
91e84f96
GM
10453fi
10454
eb697db5 10455### End of font-backend (under X11) section.
91e84f96 10456
91e84f96 10457
91e84f96 10458
91e84f96 10459
91e84f96 10460
91e84f96 10461
91e84f96 10462
91e84f96 10463
91e84f96 10464
91e84f96 10465
eb697db5
DN
10466### Use -lXpm if available, unless `--with-xpm=no'.
10467HAVE_XPM=no
10468LIBXPM=
10469if test "${HAVE_X11}" = "yes"; then
10470 if test "${with_xpm}" != "no"; then
10471 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
10472if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
10474$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
10475if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
91e84f96
GM
10476 $as_echo_n "(cached) " >&6
10477else
eb697db5
DN
10478 ac_check_lib_save_LIBS=$LIBS
10479LIBS="-lXpm -lX11 $LIBS"
10480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10481/* end confdefs.h. */
91e84f96
GM
10482
10483/* Override any GCC internal prototype to avoid an error.
10484 Use char because int might match the return type of a GCC
10485 builtin and then its argument prototype would still apply. */
10486#ifdef __cplusplus
10487extern "C"
10488#endif
eb697db5 10489char XpmReadFileToPixmap ();
91e84f96
GM
10490int
10491main ()
10492{
eb697db5 10493return XpmReadFileToPixmap ();
91e84f96
GM
10494 ;
10495 return 0;
10496}
10497_ACEOF
eb697db5
DN
10498if ac_fn_c_try_link "$LINENO"; then :
10499 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
91e84f96 10500else
eb697db5 10501 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
91e84f96 10502fi
eb697db5
DN
10503rm -f core conftest.err conftest.$ac_objext \
10504 conftest$ac_exeext conftest.$ac_ext
10505LIBS=$ac_check_lib_save_LIBS
10506fi
10507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
10508$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
10509if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
10510 HAVE_XPM=yes
91e84f96 10511fi
91e84f96 10512
91e84f96 10513fi
91e84f96 10514
91e84f96 10515
eb697db5
DN
10516 if test "${HAVE_XPM}" = "yes"; then
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
10518$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
10519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10520/* end confdefs.h. */
eb697db5
DN
10521#include "X11/xpm.h"
10522#ifndef XpmReturnAllocPixels
10523no_return_alloc_pixels
91e84f96
GM
10524#endif
10525
91e84f96 10526_ACEOF
eb697db5
DN
10527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10528 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
10529 HAVE_XPM=no
91e84f96 10530else
eb697db5 10531 HAVE_XPM=yes
91e84f96 10532fi
eb697db5 10533rm -f conftest*
91e84f96 10534
91e84f96 10535
eb697db5
DN
10536 if test "${HAVE_XPM}" = "yes"; then
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10538$as_echo "yes" >&6; }
10539 else
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10541$as_echo "no" >&6; }
10542 fi
10543 fi
91e84f96
GM
10544 fi
10545
eb697db5 10546 if test "${HAVE_XPM}" = "yes"; then
5929fbe7 10547
eb697db5 10548$as_echo "#define HAVE_XPM 1" >>confdefs.h
5929fbe7 10549
eb697db5
DN
10550 LIBXPM=-lXpm
10551 fi
10552fi
5929fbe7 10553
eb697db5
DN
10554
10555### Use -ljpeg if available, unless `--with-jpeg=no'.
10556HAVE_JPEG=no
10557LIBJPEG=
10558if test "${HAVE_X11}" = "yes"; then
10559 if test "${with_jpeg}" != "no"; then
10560 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
10561if test "x$ac_cv_header_jerror_h" = x""yes; then :
10562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
10563$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
10564if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
91e84f96
GM
10565 $as_echo_n "(cached) " >&6
10566else
eb697db5
DN
10567 ac_check_lib_save_LIBS=$LIBS
10568LIBS="-ljpeg $LIBS"
10569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10570/* end confdefs.h. */
91e84f96 10571
5929fbe7
GM
10572/* Override any GCC internal prototype to avoid an error.
10573 Use char because int might match the return type of a GCC
10574 builtin and then its argument prototype would still apply. */
10575#ifdef __cplusplus
10576extern "C"
10577#endif
eb697db5 10578char jpeg_destroy_compress ();
91e84f96
GM
10579int
10580main ()
10581{
eb697db5 10582return jpeg_destroy_compress ();
91e84f96
GM
10583 ;
10584 return 0;
10585}
10586_ACEOF
eb697db5
DN
10587if ac_fn_c_try_link "$LINENO"; then :
10588 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
91e84f96 10589else
eb697db5
DN
10590 ac_cv_lib_jpeg_jpeg_destroy_compress=no
10591fi
10592rm -f core conftest.err conftest.$ac_objext \
10593 conftest$ac_exeext conftest.$ac_ext
10594LIBS=$ac_check_lib_save_LIBS
10595fi
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
10597$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
10598if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
10599 HAVE_JPEG=yes
91e84f96
GM
10600fi
10601
91e84f96 10602fi
eb697db5
DN
10603
10604
10605 fi
10606
10607 if test "${HAVE_JPEG}" = "yes"; then
10608 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
10609
10610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10611/* end confdefs.h. */
10612#include <jpeglib.h>
10613 version=JPEG_LIB_VERSION
10614
10615_ACEOF
10616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10617 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
10618 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
8c5ff6dd 10619
91e84f96 10620else
eb697db5
DN
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
10622$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
10623 HAVE_JPEG=no
91e84f96 10624fi
eb697db5 10625rm -f conftest*
91e84f96 10626
eb697db5
DN
10627 fi
10628 if test "${HAVE_JPEG}" = "yes"; then
10629 LIBJPEG=-ljpeg
10630 fi
5929fbe7 10631fi
eb697db5
DN
10632
10633
10634### Use -lpng if available, unless `--with-png=no'.
10635HAVE_PNG=no
10636LIBPNG=
10637if test "${HAVE_X11}" = "yes"; then
10638 if test "${with_png}" != "no"; then
10639 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
10640 # in /usr/include/libpng.
10641 for ac_header in png.h libpng/png.h
10642do :
10643 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10644ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10645eval as_val=\$$as_ac_Header
10646 if test "x$as_val" = x""yes; then :
5929fbe7 10647 cat >>confdefs.h <<_ACEOF
eb697db5 10648#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
91e84f96 10649_ACEOF
8c5ff6dd 10650
eb697db5
DN
10651fi
10652
10653done
10654
10655 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
10657$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
10658if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
a5edbe4a
GM
10659 $as_echo_n "(cached) " >&6
10660else
5929fbe7 10661 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10662LIBS="-lpng -lz -lm $LIBS"
10663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10664/* end confdefs.h. */
8c5ff6dd 10665
5929fbe7
GM
10666/* Override any GCC internal prototype to avoid an error.
10667 Use char because int might match the return type of a GCC
10668 builtin and then its argument prototype would still apply. */
10669#ifdef __cplusplus
10670extern "C"
10671#endif
eb697db5 10672char png_get_channels ();
91e84f96
GM
10673int
10674main ()
10675{
eb697db5 10676return png_get_channels ();
91e84f96
GM
10677 ;
10678 return 0;
10679}
10680_ACEOF
eb697db5
DN
10681if ac_fn_c_try_link "$LINENO"; then :
10682 ac_cv_lib_png_png_get_channels=yes
91e84f96 10683else
eb697db5 10684 ac_cv_lib_png_png_get_channels=no
91e84f96 10685fi
eb697db5
DN
10686rm -f core conftest.err conftest.$ac_objext \
10687 conftest$ac_exeext conftest.$ac_ext
10688LIBS=$ac_check_lib_save_LIBS
91e84f96 10689fi
eb697db5
DN
10690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
10691$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
10692if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
10693 HAVE_PNG=yes
91e84f96 10694fi
5929fbe7 10695
91e84f96
GM
10696 fi
10697 fi
10698
eb697db5 10699 if test "${HAVE_PNG}" = "yes"; then
91e84f96 10700
eb697db5 10701$as_echo "#define HAVE_PNG 1" >>confdefs.h
91e84f96 10702
eb697db5
DN
10703 LIBPNG="-lpng -lz -lm"
10704 fi
91e84f96
GM
10705fi
10706
10707
eb697db5
DN
10708### Use -ltiff if available, unless `--with-tiff=no'.
10709HAVE_TIFF=no
10710LIBTIFF=
10711if test "${HAVE_X11}" = "yes"; then
10712 if test "${with_tiff}" != "no"; then
10713 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
10714if test "x$ac_cv_header_tiffio_h" = x""yes; then :
10715 tifflibs="-lz -lm"
10716 # At least one tiff package requires the jpeg library.
10717 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
10718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
10719$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
10720if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
91e84f96
GM
10721 $as_echo_n "(cached) " >&6
10722else
eb697db5
DN
10723 ac_check_lib_save_LIBS=$LIBS
10724LIBS="-ltiff $tifflibs $LIBS"
10725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10726/* end confdefs.h. */
5929fbe7
GM
10727
10728/* Override any GCC internal prototype to avoid an error.
10729 Use char because int might match the return type of a GCC
10730 builtin and then its argument prototype would still apply. */
10731#ifdef __cplusplus
10732extern "C"
10733#endif
eb697db5 10734char TIFFGetVersion ();
91e84f96
GM
10735int
10736main ()
10737{
eb697db5 10738return TIFFGetVersion ();
91e84f96
GM
10739 ;
10740 return 0;
10741}
10742_ACEOF
eb697db5
DN
10743if ac_fn_c_try_link "$LINENO"; then :
10744 ac_cv_lib_tiff_TIFFGetVersion=yes
91e84f96 10745else
eb697db5 10746 ac_cv_lib_tiff_TIFFGetVersion=no
8c5ff6dd 10747fi
eb697db5
DN
10748rm -f core conftest.err conftest.$ac_objext \
10749 conftest$ac_exeext conftest.$ac_ext
10750LIBS=$ac_check_lib_save_LIBS
10751fi
10752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
10753$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
10754if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
10755 HAVE_TIFF=yes
49ebbd65 10756fi
91e84f96 10757
91e84f96
GM
10758fi
10759
91e84f96 10760
eb697db5 10761 fi
91e84f96 10762
eb697db5 10763 if test "${HAVE_TIFF}" = "yes"; then
91e84f96 10764
eb697db5 10765$as_echo "#define HAVE_TIFF 1" >>confdefs.h
91e84f96 10766
eb697db5
DN
10767 LIBTIFF=-ltiff
10768 fi
10769fi
91e84f96
GM
10770
10771
eb697db5
DN
10772### Use -lgif or -lungif if available, unless `--with-gif=no'.
10773HAVE_GIF=no
10774LIBGIF=
10775if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
10776 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
10777if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
10778 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10779# Earlier versions can crash Emacs.
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
10781$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
10782if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
91e84f96
GM
10783 $as_echo_n "(cached) " >&6
10784else
eb697db5
DN
10785 ac_check_lib_save_LIBS=$LIBS
10786LIBS="-lgif $LIBS"
10787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10788/* end confdefs.h. */
91e84f96
GM
10789
10790/* Override any GCC internal prototype to avoid an error.
10791 Use char because int might match the return type of a GCC
10792 builtin and then its argument prototype would still apply. */
10793#ifdef __cplusplus
10794extern "C"
10795#endif
eb697db5 10796char EGifPutExtensionLast ();
91e84f96
GM
10797int
10798main ()
10799{
eb697db5 10800return EGifPutExtensionLast ();
91e84f96
GM
10801 ;
10802 return 0;
10803}
10804_ACEOF
eb697db5
DN
10805if ac_fn_c_try_link "$LINENO"; then :
10806 ac_cv_lib_gif_EGifPutExtensionLast=yes
91e84f96 10807else
eb697db5 10808 ac_cv_lib_gif_EGifPutExtensionLast=no
15e12598 10809fi
eb697db5
DN
10810rm -f core conftest.err conftest.$ac_objext \
10811 conftest$ac_exeext conftest.$ac_ext
10812LIBS=$ac_check_lib_save_LIBS
10813fi
10814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
10815$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
10816if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
10817 HAVE_GIF=yes
10818else
10819 HAVE_GIF=maybe
91e84f96
GM
10820fi
10821
91e84f96 10822fi
91e84f96 10823
49ebbd65 10824
eb697db5
DN
10825
10826 if test "$HAVE_GIF" = yes; then
10827 LIBGIF=-lgif
10828 elif test "$HAVE_GIF" = maybe; then
10829# If gif_lib.h but no libgif, try libungif.
10830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10831$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10832if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
91e84f96
GM
10833 $as_echo_n "(cached) " >&6
10834else
10835 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10836LIBS="-lungif $LIBS"
10837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
10838/* end confdefs.h. */
10839
10840/* Override any GCC internal prototype to avoid an error.
10841 Use char because int might match the return type of a GCC
10842 builtin and then its argument prototype would still apply. */
10843#ifdef __cplusplus
10844extern "C"
10845#endif
eb697db5 10846char EGifPutExtensionLast ();
91e84f96
GM
10847int
10848main ()
10849{
eb697db5 10850return EGifPutExtensionLast ();
91e84f96
GM
10851 ;
10852 return 0;
10853}
10854_ACEOF
eb697db5
DN
10855if ac_fn_c_try_link "$LINENO"; then :
10856 ac_cv_lib_ungif_EGifPutExtensionLast=yes
91e84f96 10857else
eb697db5 10858 ac_cv_lib_ungif_EGifPutExtensionLast=no
91e84f96 10859fi
eb697db5
DN
10860rm -f core conftest.err conftest.$ac_objext \
10861 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
10862LIBS=$ac_check_lib_save_LIBS
10863fi
eb697db5
DN
10864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10865$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10866if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10867 HAVE_GIF=yes
e6df49e4 10868else
eb697db5 10869 HAVE_GIF=no
91e84f96
GM
10870fi
10871
eb697db5
DN
10872 test "$HAVE_GIF" = yes && LIBGIF=-lungif
10873 fi
5929fbe7 10874
eb697db5 10875 if test "${HAVE_GIF}" = "yes"; then
5929fbe7 10876
eb697db5 10877$as_echo "#define HAVE_GIF 1" >>confdefs.h
5929fbe7 10878
eb697db5 10879 fi
91e84f96 10880fi
91e84f96
GM
10881
10882
eb697db5
DN
10883if test "${HAVE_X11}" = "yes"; then
10884 MISSING=""
10885 WITH_NO=""
10886 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
10887 MISSING="libXpm" && WITH_NO="--with-xpm=no"
10888 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
10889 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
10890 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
10891 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
10892 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
10893 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
10894 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
10895 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
91e84f96 10896
eb697db5
DN
10897 if test "X${MISSING}" != X; then
10898 as_fn_error "The following required libraries were not found:
10899 $MISSING
10900Maybe some development libraries/packages are missing?
10901If you don't want to link with them give
10902 $WITH_NO
10903as options to configure" "$LINENO" 5
10904 fi
10905fi
5929fbe7 10906
eb697db5
DN
10907### Use -lgpm if available, unless `--with-gpm=no'.
10908HAVE_GPM=no
10909LIBGPM=
10910MOUSE_SUPPORT=
10911if test "${with_gpm}" != "no"; then
10912 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
10913if test "x$ac_cv_header_gpm_h" = x""yes; then :
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
10915$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
10916if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
91e84f96
GM
10917 $as_echo_n "(cached) " >&6
10918else
eb697db5
DN
10919 ac_check_lib_save_LIBS=$LIBS
10920LIBS="-lgpm $LIBS"
10921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 10922/* end confdefs.h. */
91e84f96
GM
10923
10924/* Override any GCC internal prototype to avoid an error.
10925 Use char because int might match the return type of a GCC
10926 builtin and then its argument prototype would still apply. */
10927#ifdef __cplusplus
10928extern "C"
10929#endif
eb697db5 10930char Gpm_Open ();
91e84f96
GM
10931int
10932main ()
10933{
eb697db5 10934return Gpm_Open ();
91e84f96
GM
10935 ;
10936 return 0;
10937}
10938_ACEOF
eb697db5
DN
10939if ac_fn_c_try_link "$LINENO"; then :
10940 ac_cv_lib_gpm_Gpm_Open=yes
91e84f96 10941else
eb697db5
DN
10942 ac_cv_lib_gpm_Gpm_Open=no
10943fi
10944rm -f core conftest.err conftest.$ac_objext \
10945 conftest$ac_exeext conftest.$ac_ext
10946LIBS=$ac_check_lib_save_LIBS
10947fi
10948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10949$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
10950if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
10951 HAVE_GPM=yes
10952fi
91e84f96 10953
91e84f96
GM
10954fi
10955
eb697db5
DN
10956
10957
10958 if test "${HAVE_GPM}" = "yes"; then
10959
10960$as_echo "#define HAVE_GPM 1" >>confdefs.h
10961
10962 LIBGPM=-lgpm
10963 ## May be reset below.
10964 MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
10965 fi
91e84f96 10966fi
15e12598 10967
8c5ff6dd 10968
eb697db5
DN
10969ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
10970if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
8c5ff6dd 10971
eb697db5 10972$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
91e84f96
GM
10973
10974fi
91e84f96
GM
10975
10976
91e84f96 10977
eb697db5
DN
10978C_SWITCH_X_SYSTEM=
10979### Use NeXTstep API to implement GUI.
10980if test "${HAVE_NS}" = "yes"; then
91e84f96 10981
eb697db5 10982$as_echo "#define HAVE_NS 1" >>confdefs.h
8c5ff6dd 10983
eb697db5 10984 if test "${NS_IMPL_COCOA}" = "yes"; then
5929fbe7 10985
eb697db5 10986$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
8c5ff6dd 10987
eb697db5
DN
10988 GNU_OBJC_CFLAGS=
10989 fi
10990 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
8c5ff6dd 10991
eb697db5 10992$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
8c5ff6dd 10993
eb697db5
DN
10994 # See also .m.o rule in Makefile.in */
10995 # FIXME: are all these flags really needed? Document here why. */
10996 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
10997 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
10998 fi
10999 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
8c5ff6dd 11000
eb697db5 11001$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
8c5ff6dd 11002
eb697db5
DN
11003 fi
11004 # We also have mouse menus.
11005 HAVE_MENUS=yes
11006 OTHER_FILES=ns-app
11007fi
91e84f96 11008
91e84f96 11009
eb697db5
DN
11010### Use session management (-lSM -lICE) if available
11011HAVE_X_SM=no
11012LIBXSM=
11013if test "${HAVE_X11}" = "yes"; then
11014 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
11015if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
11017$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
11018if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
11019 $as_echo_n "(cached) " >&6
11020else
11021 ac_check_lib_save_LIBS=$LIBS
11022LIBS="-lSM -lICE $LIBS"
11023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11024/* end confdefs.h. */
6da23aaa 11025
91e84f96
GM
11026/* Override any GCC internal prototype to avoid an error.
11027 Use char because int might match the return type of a GCC
11028 builtin and then its argument prototype would still apply. */
11029#ifdef __cplusplus
11030extern "C"
11031#endif
eb697db5 11032char SmcOpenConnection ();
91e84f96
GM
11033int
11034main ()
0ca10bb7 11035{
eb697db5 11036return SmcOpenConnection ();
91e84f96
GM
11037 ;
11038 return 0;
11039}
11040_ACEOF
eb697db5
DN
11041if ac_fn_c_try_link "$LINENO"; then :
11042 ac_cv_lib_SM_SmcOpenConnection=yes
91e84f96 11043else
eb697db5
DN
11044 ac_cv_lib_SM_SmcOpenConnection=no
11045fi
11046rm -f core conftest.err conftest.$ac_objext \
11047 conftest$ac_exeext conftest.$ac_ext
11048LIBS=$ac_check_lib_save_LIBS
11049fi
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
11051$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
11052if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
11053 HAVE_X_SM=yes
91e84f96
GM
11054fi
11055
91e84f96 11056fi
91e84f96 11057
eb697db5
DN
11058
11059
11060 if test "${HAVE_X_SM}" = "yes"; then
11061
11062$as_echo "#define HAVE_X_SM 1" >>confdefs.h
11063
11064 LIBXSM="-lSM -lICE"
11065 case "$LIBS" in
11066 *-lSM*) ;;
11067 *) LIBS="$LIBXSM $LIBS" ;;
11068 esac
11069 fi
91e84f96 11070fi
91e84f96
GM
11071
11072
eb697db5
DN
11073# If netdb.h doesn't declare h_errno, we must declare it by hand.
11074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
11075$as_echo_n "checking whether netdb declares h_errno... " >&6; }
11076if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
91e84f96
GM
11077 $as_echo_n "(cached) " >&6
11078else
eb697db5 11079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11080/* end confdefs.h. */
eb697db5 11081#include <netdb.h>
5929fbe7
GM
11082int
11083main ()
11084{
eb697db5 11085return h_errno;
5929fbe7
GM
11086 ;
11087 return 0;
11088}
11089_ACEOF
eb697db5
DN
11090if ac_fn_c_try_link "$LINENO"; then :
11091 emacs_cv_netdb_declares_h_errno=yes
5929fbe7 11092else
eb697db5 11093 emacs_cv_netdb_declares_h_errno=no
5929fbe7 11094fi
eb697db5
DN
11095rm -f core conftest.err conftest.$ac_objext \
11096 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 11097fi
eb697db5
DN
11098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
11099$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
11100if test $emacs_cv_netdb_declares_h_errno = yes; then
91e84f96 11101
eb697db5 11102$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
8c5ff6dd
KR
11103
11104fi
11105
eb697db5
DN
11106# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11107# for constant arguments. Useless!
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
11109$as_echo_n "checking for working alloca.h... " >&6; }
11110if test "${ac_cv_working_alloca_h+set}" = set; then :
5929fbe7
GM
11111 $as_echo_n "(cached) " >&6
11112else
eb697db5 11113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11114/* end confdefs.h. */
eb697db5 11115#include <alloca.h>
91e84f96
GM
11116int
11117main ()
11118{
eb697db5
DN
11119char *p = (char *) alloca (2 * sizeof (int));
11120 if (p) return 0;
91e84f96
GM
11121 ;
11122 return 0;
11123}
11124_ACEOF
eb697db5
DN
11125if ac_fn_c_try_link "$LINENO"; then :
11126 ac_cv_working_alloca_h=yes
47ad15cd 11127else
eb697db5 11128 ac_cv_working_alloca_h=no
47ad15cd 11129fi
eb697db5
DN
11130rm -f core conftest.err conftest.$ac_objext \
11131 conftest$ac_exeext conftest.$ac_ext
47ad15cd 11132fi
eb697db5
DN
11133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
11134$as_echo "$ac_cv_working_alloca_h" >&6; }
11135if test $ac_cv_working_alloca_h = yes; then
91e84f96 11136
eb697db5 11137$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
91e84f96
GM
11138
11139fi
91e84f96 11140
eb697db5
DN
11141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
11142$as_echo_n "checking for alloca... " >&6; }
11143if test "${ac_cv_func_alloca_works+set}" = set; then :
15e12598
VB
11144 $as_echo_n "(cached) " >&6
11145else
eb697db5 11146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
08b47d3d 11147/* end confdefs.h. */
eb697db5
DN
11148#ifdef __GNUC__
11149# define alloca __builtin_alloca
11150#else
11151# ifdef _MSC_VER
11152# include <malloc.h>
11153# define alloca _alloca
11154# else
11155# ifdef HAVE_ALLOCA_H
11156# include <alloca.h>
11157# else
11158# ifdef _AIX
11159 #pragma alloca
11160# else
11161# ifndef alloca /* predefined by HP cc +Olibcalls */
11162char *alloca ();
11163# endif
11164# endif
11165# endif
11166# endif
5929fbe7 11167#endif
8c5ff6dd 11168
91e84f96
GM
11169int
11170main ()
6da23aaa 11171{
eb697db5
DN
11172char *p = (char *) alloca (1);
11173 if (p) return 0;
08b47d3d
JD
11174 ;
11175 return 0;
6da23aaa 11176}
aaa36002 11177_ACEOF
eb697db5
DN
11178if ac_fn_c_try_link "$LINENO"; then :
11179 ac_cv_func_alloca_works=yes
91e84f96 11180else
eb697db5 11181 ac_cv_func_alloca_works=no
15e12598 11182fi
eb697db5
DN
11183rm -f core conftest.err conftest.$ac_objext \
11184 conftest$ac_exeext conftest.$ac_ext
15e12598 11185fi
eb697db5
DN
11186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
11187$as_echo "$ac_cv_func_alloca_works" >&6; }
15e12598 11188
eb697db5 11189if test $ac_cv_func_alloca_works = yes; then
cd03c74a 11190
eb697db5 11191$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
a4f64981 11192
8c5ff6dd 11193else
eb697db5
DN
11194 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11195# that cause trouble. Some versions do not even contain alloca or
11196# contain a buggy version. If you still want to use their alloca,
11197# use ar to extract alloca.o from them instead of compiling alloca.c.
a4f64981 11198
eb697db5 11199ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
a4f64981 11200
eb697db5 11201$as_echo "#define C_ALLOCA 1" >>confdefs.h
a4f64981 11202
a4f64981 11203
eb697db5
DN
11204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
11205$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
11206if test "${ac_cv_os_cray+set}" = set; then :
5929fbe7 11207 $as_echo_n "(cached) " >&6
8c5ff6dd 11208else
eb697db5 11209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 11210/* end confdefs.h. */
eb697db5
DN
11211#if defined CRAY && ! defined CRAY2
11212webecray
8c5ff6dd 11213#else
eb697db5 11214wenotbecray
8c5ff6dd 11215#endif
a4f64981 11216
a4f64981 11217_ACEOF
eb697db5
DN
11218if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11219 $EGREP "webecray" >/dev/null 2>&1; then :
11220 ac_cv_os_cray=yes
11221else
11222 ac_cv_os_cray=no
11223fi
11224rm -f conftest*
a4f64981 11225
a5edbe4a 11226fi
eb697db5
DN
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
11228$as_echo "$ac_cv_os_cray" >&6; }
11229if test $ac_cv_os_cray = yes; then
11230 for ac_func in _getb67 GETB67 getb67; do
11231 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11232ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11233eval as_val=\$$as_ac_var
11234 if test "x$as_val" = x""yes; then :
cd03c74a 11235
eb697db5
DN
11236cat >>confdefs.h <<_ACEOF
11237#define CRAY_STACKSEG_END $ac_func
5929fbe7 11238_ACEOF
a4f64981 11239
eb697db5 11240 break
5929fbe7 11241fi
a4f64981 11242
eb697db5 11243 done
5929fbe7 11244fi
a4f64981 11245
eb697db5
DN
11246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
11247$as_echo_n "checking stack direction for C alloca... " >&6; }
11248if test "${ac_cv_c_stack_direction+set}" = set; then :
5929fbe7
GM
11249 $as_echo_n "(cached) " >&6
11250else
eb697db5
DN
11251 if test "$cross_compiling" = yes; then :
11252 ac_cv_c_stack_direction=0
11253else
11254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11255/* end confdefs.h. */
eb697db5 11256$ac_includes_default
91e84f96 11257int
eb697db5 11258find_stack_direction ()
91e84f96 11259{
eb697db5
DN
11260 static char *addr = 0;
11261 auto char dummy;
11262 if (addr == 0)
11263 {
11264 addr = &dummy;
11265 return find_stack_direction ();
11266 }
11267 else
11268 return (&dummy > addr) ? 1 : -1;
91e84f96 11269}
91e84f96 11270
91e84f96
GM
11271int
11272main ()
11273{
eb697db5 11274 return find_stack_direction () < 0;
91e84f96
GM
11275}
11276_ACEOF
eb697db5
DN
11277if ac_fn_c_try_run "$LINENO"; then :
11278 ac_cv_c_stack_direction=1
91e84f96 11279else
eb697db5
DN
11280 ac_cv_c_stack_direction=-1
11281fi
11282rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11283 conftest.$ac_objext conftest.beam conftest.$ac_ext
91e84f96
GM
11284fi
11285
91e84f96 11286fi
eb697db5
DN
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
11288$as_echo "$ac_cv_c_stack_direction" >&6; }
11289cat >>confdefs.h <<_ACEOF
11290#define STACK_DIRECTION $ac_cv_c_stack_direction
11291_ACEOF
91e84f96 11292
91e84f96 11293
5929fbe7 11294fi
eb697db5 11295
91e84f96 11296
eb697db5
DN
11297if test x"$ac_cv_func_alloca_works" != xyes; then
11298 as_fn_error "a system implementation of alloca is required " "$LINENO" 5
91e84f96
GM
11299fi
11300
eb697db5
DN
11301# fmod, logb, and frexp are found in -lm on most systems.
11302# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
11303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
11304$as_echo_n "checking for sqrt in -lm... " >&6; }
11305if test "${ac_cv_lib_m_sqrt+set}" = set; then :
91e84f96
GM
11306 $as_echo_n "(cached) " >&6
11307else
5929fbe7 11308 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11309LIBS="-lm $LIBS"
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11311/* end confdefs.h. */
91e84f96
GM
11312
11313/* Override any GCC internal prototype to avoid an error.
11314 Use char because int might match the return type of a GCC
11315 builtin and then its argument prototype would still apply. */
11316#ifdef __cplusplus
11317extern "C"
11318#endif
eb697db5 11319char sqrt ();
91e84f96
GM
11320int
11321main ()
11322{
eb697db5 11323return sqrt ();
91e84f96
GM
11324 ;
11325 return 0;
11326}
11327_ACEOF
eb697db5
DN
11328if ac_fn_c_try_link "$LINENO"; then :
11329 ac_cv_lib_m_sqrt=yes
91e84f96 11330else
eb697db5 11331 ac_cv_lib_m_sqrt=no
91e84f96 11332fi
eb697db5
DN
11333rm -f core conftest.err conftest.$ac_objext \
11334 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11335LIBS=$ac_check_lib_save_LIBS
91e84f96 11336fi
eb697db5
DN
11337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
11338$as_echo "$ac_cv_lib_m_sqrt" >&6; }
11339if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
11340 cat >>confdefs.h <<_ACEOF
11341#define HAVE_LIBM 1
91e84f96 11342_ACEOF
6da23aaa 11343
eb697db5 11344 LIBS="-lm $LIBS"
6da23aaa 11345
5929fbe7 11346fi
0ca10bb7 11347
8c5ff6dd 11348
eb697db5
DN
11349# Check for mail-locking functions in a "mail" library. Probably this should
11350# have the same check as for liblockfile below.
11351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
11352$as_echo_n "checking for maillock in -lmail... " >&6; }
11353if test "${ac_cv_lib_mail_maillock+set}" = set; then :
5929fbe7
GM
11354 $as_echo_n "(cached) " >&6
11355else
eb697db5
DN
11356 ac_check_lib_save_LIBS=$LIBS
11357LIBS="-lmail $LIBS"
11358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11359/* end confdefs.h. */
0ca10bb7 11360
91e84f96
GM
11361/* Override any GCC internal prototype to avoid an error.
11362 Use char because int might match the return type of a GCC
11363 builtin and then its argument prototype would still apply. */
11364#ifdef __cplusplus
11365extern "C"
11366#endif
eb697db5 11367char maillock ();
91e84f96
GM
11368int
11369main ()
6da23aaa 11370{
eb697db5 11371return maillock ();
91e84f96
GM
11372 ;
11373 return 0;
6da23aaa 11374}
91e84f96 11375_ACEOF
eb697db5
DN
11376if ac_fn_c_try_link "$LINENO"; then :
11377 ac_cv_lib_mail_maillock=yes
91e84f96 11378else
eb697db5 11379 ac_cv_lib_mail_maillock=no
91e84f96 11380fi
eb697db5
DN
11381rm -f core conftest.err conftest.$ac_objext \
11382 conftest$ac_exeext conftest.$ac_ext
11383LIBS=$ac_check_lib_save_LIBS
91e84f96 11384fi
eb697db5
DN
11385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
11386$as_echo "$ac_cv_lib_mail_maillock" >&6; }
11387if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
11388 have_mail=yes
91e84f96 11389else
eb697db5
DN
11390 have_mail=no
11391fi
11392
11393if test $have_mail = yes; then
11394 LIBS_MAIL=-lmail
11395 LIBS="$LIBS_MAIL $LIBS"
11396
11397$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
11398
11399else
11400 LIBS_MAIL=
11401fi
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
11403$as_echo_n "checking for maillock in -llockfile... " >&6; }
11404if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
91e84f96
GM
11405 $as_echo_n "(cached) " >&6
11406else
11407 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11408LIBS="-llockfile $LIBS"
11409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
11410/* end confdefs.h. */
11411
11412/* Override any GCC internal prototype to avoid an error.
11413 Use char because int might match the return type of a GCC
11414 builtin and then its argument prototype would still apply. */
11415#ifdef __cplusplus
11416extern "C"
11417#endif
eb697db5 11418char maillock ();
91e84f96
GM
11419int
11420main ()
503d2be0 11421{
eb697db5 11422return maillock ();
91e84f96
GM
11423 ;
11424 return 0;
503d2be0 11425}
91e84f96 11426_ACEOF
eb697db5
DN
11427if ac_fn_c_try_link "$LINENO"; then :
11428 ac_cv_lib_lockfile_maillock=yes
503d2be0 11429else
eb697db5 11430 ac_cv_lib_lockfile_maillock=no
a21616bd 11431fi
eb697db5
DN
11432rm -f core conftest.err conftest.$ac_objext \
11433 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11434LIBS=$ac_check_lib_save_LIBS
11435fi
eb697db5
DN
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
11437$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
11438if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
11439 have_lockfile=yes
5929fbe7 11440else
eb697db5
DN
11441 have_lockfile=no
11442fi
11443
11444if test $have_lockfile = yes; then
11445 LIBS_MAIL=-llockfile
11446 LIBS="$LIBS_MAIL $LIBS"
11447
11448$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
11449
11450else
11451# If we have the shared liblockfile, assume we must use it for mail
11452# locking (e.g. Debian). If we couldn't link against liblockfile
11453# (no liblockfile.a installed), ensure that we don't need to.
11454 # Extract the first word of "liblockfile.so", so it can be a program name with args.
11455set dummy liblockfile.so; ac_word=$2
11456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11457$as_echo_n "checking for $ac_word... " >&6; }
11458if test "${ac_cv_prog_liblockfile+set}" = set; then :
11459 $as_echo_n "(cached) " >&6
11460else
11461 if test -n "$liblockfile"; then
11462 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
11463else
11464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11465as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
11466for as_dir in $as_dummy
11467do
11468 IFS=$as_save_IFS
11469 test -z "$as_dir" && as_dir=.
11470 for ac_exec_ext in '' $ac_executable_extensions; do
11471 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11472 ac_cv_prog_liblockfile="yes"
11473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11474 break 2
11475 fi
11476done
11477 done
11478IFS=$as_save_IFS
11479
11480 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
11481fi
11482fi
11483liblockfile=$ac_cv_prog_liblockfile
11484if test -n "$liblockfile"; then
11485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
11486$as_echo "$liblockfile" >&6; }
11487else
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11489$as_echo "no" >&6; }
11490fi
11491
11492
11493 if test $ac_cv_prog_liblockfile = yes; then
11494 as_fn_error "Shared liblockfile found but can't link against it.
11495This probably means that movemail could lose mail.
11496There may be a \`development' package to install containing liblockfile." "$LINENO" 5
11497 fi
11498fi
11499for ac_func in touchlock
11500do :
11501 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
11502if test "x$ac_cv_func_touchlock" = x""yes; then :
11503 cat >>confdefs.h <<_ACEOF
11504#define HAVE_TOUCHLOCK 1
11505_ACEOF
11506
11507fi
11508done
11509
11510for ac_header in maillock.h
11511do :
11512 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
11513if test "x$ac_cv_header_maillock_h" = x""yes; then :
11514 cat >>confdefs.h <<_ACEOF
11515#define HAVE_MAILLOCK_H 1
11516_ACEOF
11517
11518fi
11519
11520done
11521
11522
11523
11524## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
11525## interlock access to the mail spool. The alternative is a lock file named
11526## /usr/spool/mail/$USER.lock.
11527mail_lock=no
11528case "$opsys" in
11529 aix4-2) mail_lock="lockf" ;;
11530
11531 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
11532
11533 ## On GNU/Linux systems, both methods are used by various mail programs.
11534 ## I assume most people are using newer mailers that have heard of flock.
11535 ## Change this if you need to.
11536 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
11537 ## configure gets the right answers, and that means *NOT* using flock.
11538 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
11539 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
11540 ## Debian maintainer hasn't provided a clean fix for Emacs.
11541 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
11542 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
11543 ## correct logic. -- fx
11544 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
11545 ## liblockfile is a Free Software replacement for libmail, used on
11546 ## Debian systems and elsewhere. -rfr.
11547 gnu-*)
11548 mail_lock="flock"
11549 if test $have_mail = yes || test $have_lockfile = yes; then
11550 test $ac_cv_header_maillock_h = yes && mail_lock=no
11551 fi
11552 ;;
11553esac
11554
11555BLESSMAIL_TARGET=
11556case "$mail_lock" in
11557 flock)
11558$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
11559 ;;
11560
11561 lockf)
11562$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
11563 ;;
11564
11565 *) BLESSMAIL_TARGET="need-blessmail" ;;
91e84f96 11566esac
ca81d7a0 11567
91e84f96 11568
91e84f96 11569
eb697db5
DN
11570for ac_func in gethostname getdomainname dup2 \
11571rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
72af86bd 11572random lrand48 logb frexp fmod rint cbrt ftime setsid \
eb697db5
DN
11573strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11574utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
8966b757 11575__fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \
eb697db5 11576sendto recvfrom getsockopt setsockopt getsockname getpeername \
72af86bd 11577gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
eb697db5 11578memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
dcc19aac 11579cfmakeraw cfsetspeed isnan copysign __executable_start
eb697db5
DN
11580do :
11581 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11582ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11583eval as_val=\$$as_ac_var
11584 if test "x$as_val" = x""yes; then :
11585 cat >>confdefs.h <<_ACEOF
11586#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
91e84f96 11587_ACEOF
a21616bd 11588
91e84f96 11589fi
eb697db5 11590done
a21616bd 11591
a21616bd 11592
eb697db5
DN
11593for ac_header in sys/un.h
11594do :
11595 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
11596if test "x$ac_cv_header_sys_un_h" = x""yes; then :
11597 cat >>confdefs.h <<_ACEOF
11598#define HAVE_SYS_UN_H 1
11599_ACEOF
503d2be0 11600
91e84f96 11601fi
503d2be0 11602
eb697db5 11603done
91e84f96 11604
eb697db5
DN
11605
11606
11607
11608
11609
11610
8a0b50ed
AS
11611 for ac_func in $ac_func_list
11612do :
11613 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11614ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11615eval as_val=\$$as_ac_var
11616 if test "x$as_val" = x""yes; then :
11617 cat >>confdefs.h <<_ACEOF
11618#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11619_ACEOF
11620
11621fi
11622done
11623
11624
11625
11626
eb697db5
DN
11627
11628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
11629$as_echo_n "checking for working mktime... " >&6; }
11630if test "${ac_cv_func_working_mktime+set}" = set; then :
91e84f96
GM
11631 $as_echo_n "(cached) " >&6
11632else
eb697db5
DN
11633 if test "$cross_compiling" = yes; then :
11634 ac_cv_func_working_mktime=no
11635else
11636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11637/* end confdefs.h. */
eb697db5
DN
11638/* Test program from Paul Eggert and Tony Leneis. */
11639#ifdef TIME_WITH_SYS_TIME
11640# include <sys/time.h>
11641# include <time.h>
91e84f96 11642#else
eb697db5
DN
11643# ifdef HAVE_SYS_TIME_H
11644# include <sys/time.h>
11645# else
11646# include <time.h>
11647# endif
91e84f96
GM
11648#endif
11649
eb697db5
DN
11650#include <limits.h>
11651#include <stdlib.h>
91e84f96 11652
eb697db5
DN
11653#ifdef HAVE_UNISTD_H
11654# include <unistd.h>
91e84f96 11655#endif
eb697db5
DN
11656
11657#ifndef HAVE_ALARM
11658# define alarm(X) /* empty */
91e84f96 11659#endif
ca81d7a0 11660
eb697db5
DN
11661/* Work around redefinition to rpl_putenv by other config tests. */
11662#undef putenv
11663
11664static time_t time_t_max;
11665static time_t time_t_min;
11666
11667/* Values we'll use to set the TZ environment variable. */
11668static char *tz_strings[] = {
11669 (char *) 0, "TZ=GMT0", "TZ=JST-9",
11670 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11671};
11672#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5929fbe7 11673
eb697db5
DN
11674/* Return 0 if mktime fails to convert a date in the spring-forward gap.
11675 Based on a problem report from Andreas Jaeger. */
11676static int
11677spring_forward_gap ()
6da23aaa 11678{
eb697db5
DN
11679 /* glibc (up to about 1998-10-07) failed this test. */
11680 struct tm tm;
5929fbe7 11681
eb697db5
DN
11682 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11683 instead of "TZ=America/Vancouver" in order to detect the bug even
11684 on systems that don't support the Olson extension, or don't have the
11685 full zoneinfo tables installed. */
11686 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
5929fbe7 11687
eb697db5
DN
11688 tm.tm_year = 98;
11689 tm.tm_mon = 3;
11690 tm.tm_mday = 5;
11691 tm.tm_hour = 2;
11692 tm.tm_min = 0;
11693 tm.tm_sec = 0;
11694 tm.tm_isdst = -1;
11695 return mktime (&tm) != (time_t) -1;
91e84f96 11696}
503d2be0 11697
eb697db5
DN
11698static int
11699mktime_test1 (now)
11700 time_t now;
11701{
11702 struct tm *lt;
11703 return ! (lt = localtime (&now)) || mktime (lt) == now;
11704}
503d2be0 11705
eb697db5
DN
11706static int
11707mktime_test (now)
11708 time_t now;
11709{
11710 return (mktime_test1 (now)
11711 && mktime_test1 ((time_t) (time_t_max - now))
11712 && mktime_test1 ((time_t) (time_t_min + now)));
11713}
bf89cb4d 11714
eb697db5
DN
11715static int
11716irix_6_4_bug ()
91e84f96 11717{
eb697db5
DN
11718 /* Based on code from Ariel Faigon. */
11719 struct tm tm;
11720 tm.tm_year = 96;
11721 tm.tm_mon = 3;
11722 tm.tm_mday = 0;
11723 tm.tm_hour = 0;
11724 tm.tm_min = 0;
11725 tm.tm_sec = 0;
11726 tm.tm_isdst = -1;
11727 mktime (&tm);
11728 return tm.tm_mon == 2 && tm.tm_mday == 31;
11729}
5929fbe7 11730
eb697db5
DN
11731static int
11732bigtime_test (j)
11733 int j;
11734{
11735 struct tm tm;
11736 time_t now;
11737 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11738 now = mktime (&tm);
11739 if (now != (time_t) -1)
11740 {
11741 struct tm *lt = localtime (&now);
11742 if (! (lt
11743 && lt->tm_year == tm.tm_year
11744 && lt->tm_mon == tm.tm_mon
11745 && lt->tm_mday == tm.tm_mday
11746 && lt->tm_hour == tm.tm_hour
11747 && lt->tm_min == tm.tm_min
11748 && lt->tm_sec == tm.tm_sec
11749 && lt->tm_yday == tm.tm_yday
11750 && lt->tm_wday == tm.tm_wday
11751 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11752 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11753 return 0;
11754 }
11755 return 1;
503d2be0 11756}
91e84f96 11757
eb697db5
DN
11758static int
11759year_2050_test ()
11760{
11761 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
11762 ignoring leap seconds. */
11763 unsigned long int answer = 2527315200UL;
19650fd6 11764
eb697db5
DN
11765 struct tm tm;
11766 time_t t;
11767 tm.tm_year = 2050 - 1900;
11768 tm.tm_mon = 2 - 1;
11769 tm.tm_mday = 1;
11770 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
11771 tm.tm_isdst = -1;
ca81d7a0 11772
eb697db5
DN
11773 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11774 instead of "TZ=America/Vancouver" in order to detect the bug even
11775 on systems that don't support the Olson extension, or don't have the
11776 full zoneinfo tables installed. */
11777 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
a21616bd 11778
eb697db5 11779 t = mktime (&tm);
6da23aaa 11780
eb697db5
DN
11781 /* Check that the result is either a failure, or close enough
11782 to the correct answer that we can assume the discrepancy is
11783 due to leap seconds. */
11784 return (t == (time_t) -1
11785 || (0 < t && answer - 120 <= t && t <= answer + 120));
11786}
91e84f96 11787
21287a21
CY
11788int
11789main ()
11790{
eb697db5
DN
11791 time_t t, delta;
11792 int i, j;
a21616bd 11793
eb697db5
DN
11794 /* This test makes some buggy mktime implementations loop.
11795 Give up after 60 seconds; a mktime slower than that
11796 isn't worth using anyway. */
11797 alarm (60);
a21616bd 11798
eb697db5
DN
11799 for (;;)
11800 {
11801 t = (time_t_max << 1) + 1;
11802 if (t <= time_t_max)
11803 break;
11804 time_t_max = t;
11805 }
11806 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
19650fd6 11807
eb697db5
DN
11808 delta = time_t_max / 997; /* a suitable prime number */
11809 for (i = 0; i < N_STRINGS; i++)
11810 {
11811 if (tz_strings[i])
11812 putenv (tz_strings[i]);
ca81d7a0 11813
eb697db5
DN
11814 for (t = 0; t <= time_t_max - delta; t += delta)
11815 if (! mktime_test (t))
11816 return 1;
11817 if (! (mktime_test ((time_t) 1)
11818 && mktime_test ((time_t) (60 * 60))
11819 && mktime_test ((time_t) (60 * 60 * 24))))
11820 return 1;
bf89cb4d 11821
eb697db5
DN
11822 for (j = 1; ; j <<= 1)
11823 if (! bigtime_test (j))
11824 return 1;
11825 else if (INT_MAX / 2 < j)
11826 break;
11827 if (! bigtime_test (INT_MAX))
11828 return 1;
11829 }
11830 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
9452ded1
DN
11831}
11832_ACEOF
eb697db5
DN
11833if ac_fn_c_try_run "$LINENO"; then :
11834 ac_cv_func_working_mktime=yes
6da23aaa 11835else
eb697db5
DN
11836 ac_cv_func_working_mktime=no
11837fi
11838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11839 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 11840fi
0ca10bb7 11841
eb697db5
DN
11842fi
11843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
11844$as_echo "$ac_cv_func_working_mktime" >&6; }
11845if test $ac_cv_func_working_mktime = no; then
11846 case " $LIBOBJS " in
11847 *" mktime.$ac_objext "* ) ;;
11848 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
11849 ;;
11850esac
91e84f96 11851
eb697db5 11852fi
91e84f96 11853
eb697db5 11854if test "$ac_cv_func_working_mktime" = no; then
91e84f96 11855
eb697db5 11856$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
a21616bd 11857
91e84f96
GM
11858fi
11859
eb697db5 11860ac_have_func=no # yes means we've found a way to get the load average.
a21616bd 11861
eb697db5
DN
11862# Make sure getloadavg.c is where it belongs, at configure-time.
11863test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
11864 as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
503d2be0 11865
eb697db5 11866ac_save_LIBS=$LIBS
91e84f96 11867
eb697db5
DN
11868# Check for getloadavg, but be sure not to touch the cache variable.
11869(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11870if test "x$ac_cv_func_getloadavg" = x""yes; then :
11871 exit 0
a21616bd 11872else
eb697db5 11873 exit 1
21287a21 11874fi
eb697db5 11875) && ac_have_func=yes
503d2be0 11876
eb697db5
DN
11877# On HPUX9, an unprivileged user can get load averages through this function.
11878for ac_func in pstat_getdynamic
11879do :
11880 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
11881if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
11882 cat >>confdefs.h <<_ACEOF
11883#define HAVE_PSTAT_GETDYNAMIC 1
503d2be0 11884_ACEOF
91e84f96 11885
91e84f96 11886fi
eb697db5 11887done
91e84f96 11888
a21616bd 11889
eb697db5
DN
11890# Solaris has libkstat which does not require root.
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
11892$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
11893if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
91e84f96
GM
11894 $as_echo_n "(cached) " >&6
11895else
11896 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11897LIBS="-lkstat $LIBS"
11898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96
GM
11899/* end confdefs.h. */
11900
11901/* Override any GCC internal prototype to avoid an error.
11902 Use char because int might match the return type of a GCC
11903 builtin and then its argument prototype would still apply. */
11904#ifdef __cplusplus
11905extern "C"
11906#endif
eb697db5 11907char kstat_open ();
91e84f96
GM
11908int
11909main ()
11910{
eb697db5 11911return kstat_open ();
91e84f96
GM
11912 ;
11913 return 0;
11914}
11915_ACEOF
eb697db5
DN
11916if ac_fn_c_try_link "$LINENO"; then :
11917 ac_cv_lib_kstat_kstat_open=yes
91e84f96 11918else
eb697db5 11919 ac_cv_lib_kstat_kstat_open=no
91e84f96 11920fi
eb697db5
DN
11921rm -f core conftest.err conftest.$ac_objext \
11922 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
11923LIBS=$ac_check_lib_save_LIBS
11924fi
eb697db5
DN
11925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
11926$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
11927if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
11928 cat >>confdefs.h <<_ACEOF
11929#define HAVE_LIBKSTAT 1
11930_ACEOF
a21616bd 11931
eb697db5 11932 LIBS="-lkstat $LIBS"
503d2be0 11933
eb697db5 11934fi
91e84f96 11935
eb697db5
DN
11936test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
11937
11938# Some systems with -lutil have (and need) -lkvm as well, some do not.
11939# On Solaris, -lkvm requires nlist from -lelf, so check that first
11940# to get the right answer into the cache.
11941# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11942if test $ac_have_func = no; then
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
11944$as_echo_n "checking for elf_begin in -lelf... " >&6; }
11945if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
e9a63f04 11946 $as_echo_n "(cached) " >&6
98418dba 11947else
0ca10bb7 11948 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11949LIBS="-lelf $LIBS"
11950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11951/* end confdefs.h. */
ca81d7a0 11952
0ca10bb7
RC
11953/* Override any GCC internal prototype to avoid an error.
11954 Use char because int might match the return type of a GCC
11955 builtin and then its argument prototype would still apply. */
11956#ifdef __cplusplus
11957extern "C"
11958#endif
eb697db5 11959char elf_begin ();
0ca10bb7
RC
11960int
11961main ()
11962{
eb697db5 11963return elf_begin ();
0ca10bb7
RC
11964 ;
11965 return 0;
11966}
503d2be0 11967_ACEOF
eb697db5
DN
11968if ac_fn_c_try_link "$LINENO"; then :
11969 ac_cv_lib_elf_elf_begin=yes
503d2be0 11970else
eb697db5 11971 ac_cv_lib_elf_elf_begin=no
a21616bd 11972fi
eb697db5
DN
11973rm -f core conftest.err conftest.$ac_objext \
11974 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11975LIBS=$ac_check_lib_save_LIBS
11976fi
eb697db5
DN
11977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
11978$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
11979if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
11980 LIBS="-lelf $LIBS"
c0d27fcc 11981fi
bf89cb4d 11982
eb697db5
DN
11983fi
11984if test $ac_have_func = no; then
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
11986$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
11987if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
e9a63f04 11988 $as_echo_n "(cached) " >&6
21287a21 11989else
0ca10bb7 11990 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11991LIBS="-lkvm $LIBS"
11992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11993/* end confdefs.h. */
21287a21 11994
0ca10bb7
RC
11995/* Override any GCC internal prototype to avoid an error.
11996 Use char because int might match the return type of a GCC
11997 builtin and then its argument prototype would still apply. */
11998#ifdef __cplusplus
11999extern "C"
12000#endif
eb697db5 12001char kvm_open ();
21287a21
CY
12002int
12003main ()
12004{
eb697db5 12005return kvm_open ();
21287a21
CY
12006 ;
12007 return 0;
12008}
12009_ACEOF
eb697db5
DN
12010if ac_fn_c_try_link "$LINENO"; then :
12011 ac_cv_lib_kvm_kvm_open=yes
21287a21 12012else
eb697db5 12013 ac_cv_lib_kvm_kvm_open=no
0ca10bb7 12014fi
eb697db5
DN
12015rm -f core conftest.err conftest.$ac_objext \
12016 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
12017LIBS=$ac_check_lib_save_LIBS
12018fi
eb697db5
DN
12019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
12020$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
12021if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
12022 LIBS="-lkvm $LIBS"
6da23aaa 12023fi
bf89cb4d 12024
eb697db5
DN
12025 # Check for the 4.4BSD definition of getloadavg.
12026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
12027$as_echo_n "checking for getloadavg in -lutil... " >&6; }
12028if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
0ca10bb7
RC
12029 $as_echo_n "(cached) " >&6
12030else
12031 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12032LIBS="-lutil $LIBS"
12033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 12034/* end confdefs.h. */
21287a21 12035
0ca10bb7
RC
12036/* Override any GCC internal prototype to avoid an error.
12037 Use char because int might match the return type of a GCC
12038 builtin and then its argument prototype would still apply. */
12039#ifdef __cplusplus
12040extern "C"
12041#endif
eb697db5 12042char getloadavg ();
21287a21
CY
12043int
12044main ()
12045{
eb697db5 12046return getloadavg ();
21287a21
CY
12047 ;
12048 return 0;
12049}
12050_ACEOF
eb697db5
DN
12051if ac_fn_c_try_link "$LINENO"; then :
12052 ac_cv_lib_util_getloadavg=yes
21287a21 12053else
eb697db5 12054 ac_cv_lib_util_getloadavg=no
21287a21 12055fi
eb697db5
DN
12056rm -f core conftest.err conftest.$ac_objext \
12057 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 12058LIBS=$ac_check_lib_save_LIBS
21287a21 12059fi
eb697db5
DN
12060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
12061$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
12062if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
12063 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
21287a21 12064fi
21287a21 12065
eb697db5 12066fi
91e84f96 12067
eb697db5
DN
12068if test $ac_have_func = no; then
12069 # There is a commonly available library for RS/6000 AIX.
12070 # Since it is not a standard part of AIX, it might be installed locally.
12071 ac_getloadavg_LIBS=$LIBS
12072 LIBS="-L/usr/local/lib $LIBS"
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
12074$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
12075if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
e9a63f04 12076 $as_echo_n "(cached) " >&6
21287a21 12077else
0ca10bb7 12078 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12079LIBS="-lgetloadavg $LIBS"
12080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 12081/* end confdefs.h. */
21287a21 12082
0ca10bb7
RC
12083/* Override any GCC internal prototype to avoid an error.
12084 Use char because int might match the return type of a GCC
12085 builtin and then its argument prototype would still apply. */
12086#ifdef __cplusplus
12087extern "C"
12088#endif
eb697db5 12089char getloadavg ();
21287a21
CY
12090int
12091main ()
12092{
eb697db5 12093return getloadavg ();
21287a21
CY
12094 ;
12095 return 0;
12096}
12097_ACEOF
eb697db5
DN
12098if ac_fn_c_try_link "$LINENO"; then :
12099 ac_cv_lib_getloadavg_getloadavg=yes
0ca10bb7 12100else
eb697db5 12101 ac_cv_lib_getloadavg_getloadavg=no
0ca10bb7 12102fi
eb697db5
DN
12103rm -f core conftest.err conftest.$ac_objext \
12104 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
12105LIBS=$ac_check_lib_save_LIBS
12106fi
eb697db5
DN
12107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
12108$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
12109if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
12110 LIBS="-lgetloadavg $LIBS"
6da23aaa 12111else
eb697db5 12112 LIBS=$ac_getloadavg_LIBS
6da23aaa
EZ
12113fi
12114
eb697db5 12115fi
6da23aaa 12116
eb697db5
DN
12117# Make sure it is really in the library, if we think we found it,
12118# otherwise set up the replacement function.
12119for ac_func in getloadavg
12120do :
12121 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
12122if test "x$ac_cv_func_getloadavg" = x""yes; then :
12123 cat >>confdefs.h <<_ACEOF
12124#define HAVE_GETLOADAVG 1
0ca10bb7
RC
12125_ACEOF
12126
eb697db5
DN
12127else
12128 case " $LIBOBJS " in
12129 *" getloadavg.$ac_objext "* ) ;;
12130 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
12131 ;;
12132esac
12133
12134
12135$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
12136
12137# Figure out what our getloadavg.c needs.
12138ac_have_func=no
12139ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
12140if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
12141 ac_have_func=yes
12142
12143$as_echo "#define DGUX 1" >>confdefs.h
12144
12145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
12146$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
12147if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
0ca10bb7
RC
12148 $as_echo_n "(cached) " >&6
12149else
12150 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12151LIBS="-ldgc $LIBS"
12152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 12153/* end confdefs.h. */
21287a21 12154
0ca10bb7
RC
12155/* Override any GCC internal prototype to avoid an error.
12156 Use char because int might match the return type of a GCC
12157 builtin and then its argument prototype would still apply. */
12158#ifdef __cplusplus
12159extern "C"
12160#endif
eb697db5 12161char dg_sys_info ();
21287a21
CY
12162int
12163main ()
12164{
eb697db5 12165return dg_sys_info ();
21287a21
CY
12166 ;
12167 return 0;
12168}
12169_ACEOF
eb697db5
DN
12170if ac_fn_c_try_link "$LINENO"; then :
12171 ac_cv_lib_dgc_dg_sys_info=yes
bf89cb4d 12172else
eb697db5 12173 ac_cv_lib_dgc_dg_sys_info=no
49ebbd65 12174fi
eb697db5
DN
12175rm -f core conftest.err conftest.$ac_objext \
12176 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
12177LIBS=$ac_check_lib_save_LIBS
12178fi
eb697db5
DN
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
12180$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
12181if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
12182 cat >>confdefs.h <<_ACEOF
12183#define HAVE_LIBDGC 1
12184_ACEOF
12185
12186 LIBS="-ldgc $LIBS"
12187
5929fbe7 12188fi
a5edbe4a 12189
eb697db5 12190fi
49ebbd65
DN
12191
12192
15e12598 12193
eb697db5
DN
12194ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
12195if test "x$ac_cv_header_locale_h" = x""yes; then :
a4f64981 12196
5929fbe7 12197fi
eb697db5
DN
12198
12199
12200for ac_func in setlocale
12201do :
12202 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
12203if test "x$ac_cv_func_setlocale" = x""yes; then :
12204 cat >>confdefs.h <<_ACEOF
12205#define HAVE_SETLOCALE 1
5929fbe7 12206_ACEOF
a4f64981 12207
5929fbe7 12208fi
eb697db5 12209done
a4f64981 12210
19650fd6 12211
eb697db5
DN
12212# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
12213# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
12214# Irix 4.0.5F has the header but not the library.
12215if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
12216 ac_have_func=yes
12217
12218$as_echo "#define SVR4 1" >>confdefs.h
ca81d7a0 12219
91e84f96 12220fi
8c5ff6dd 12221
eb697db5
DN
12222if test $ac_have_func = no; then
12223 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
12224if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
12225 ac_have_func=yes
8c5ff6dd 12226
eb697db5
DN
12227$as_echo "#define UMAX 1" >>confdefs.h
12228
12229
12230$as_echo "#define UMAX4_3 1" >>confdefs.h
8c5ff6dd 12231
bf89cb4d 12232fi
6da23aaa 12233
c0d27fcc 12234
eb697db5 12235fi
19650fd6 12236
eb697db5
DN
12237if test $ac_have_func = no; then
12238 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
12239if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
12240 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
12241
12242fi
ca81d7a0 12243
6da23aaa 12244
bf89cb4d 12245fi
eb697db5
DN
12246
12247if test $ac_have_func = no; then
12248 for ac_header in mach/mach.h
12249do :
12250 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
12251if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
8c5ff6dd 12252 cat >>confdefs.h <<_ACEOF
eb697db5 12253#define HAVE_MACH_MACH_H 1
91e84f96 12254_ACEOF
ca81d7a0 12255
6da23aaa 12256fi
0ca10bb7 12257
eb697db5 12258done
6da23aaa 12259
eb697db5
DN
12260fi
12261
12262for ac_header in nlist.h
12263do :
12264 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
12265if test "x$ac_cv_header_nlist_h" = x""yes; then :
12266 cat >>confdefs.h <<_ACEOF
12267#define HAVE_NLIST_H 1
91e84f96 12268_ACEOF
eb697db5
DN
12269 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
12270"
12271if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
cd03c74a 12272
eb697db5
DN
12273cat >>confdefs.h <<_ACEOF
12274#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
bf89cb4d 12275_ACEOF
0ca10bb7
RC
12276
12277
eb697db5
DN
12278$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
12279
8c5ff6dd 12280fi
0ca10bb7 12281
c0d27fcc 12282
6da23aaa 12283fi
8c5ff6dd 12284
eb697db5 12285done
6da23aaa 12286
91e84f96 12287fi
eb697db5 12288done
8c5ff6dd 12289
eb697db5
DN
12290
12291# Some definitions of getloadavg require that the program be installed setgid.
12292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
12293$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
12294if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
e9a63f04 12295 $as_echo_n "(cached) " >&6
0ca10bb7 12296else
eb697db5 12297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 12298/* end confdefs.h. */
eb697db5
DN
12299#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
12300#ifdef LDAV_PRIVILEGED
12301Yowza Am I SETGID yet
12302#endif
bf89cb4d 12303_ACEOF
eb697db5
DN
12304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12305 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
12306 ac_cv_func_getloadavg_setgid=yes
91e84f96 12307else
eb697db5
DN
12308 ac_cv_func_getloadavg_setgid=no
12309fi
12310rm -f conftest*
91e84f96 12311
eb697db5
DN
12312fi
12313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
12314$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
12315if test $ac_cv_func_getloadavg_setgid = yes; then
12316 NEED_SETGID=true
91e84f96 12317
eb697db5 12318$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
6da23aaa 12319
eb697db5
DN
12320else
12321 NEED_SETGID=false
91e84f96 12322fi
6da23aaa 12323
eb697db5
DN
12324if test $ac_cv_func_getloadavg_setgid = yes; then
12325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
12326$as_echo_n "checking group of /dev/kmem... " >&6; }
12327if test "${ac_cv_group_kmem+set}" = set; then :
5929fbe7 12328 $as_echo_n "(cached) " >&6
a5edbe4a 12329else
eb697db5
DN
12330 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
12331 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
12332 # If we got an error (system does not support symlinks), try without -L.
12333 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
12334 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
12335 | sed -ne 's/[ ][ ]*/ /g;
12336 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
12337 / /s/.* //;p;'`
6da23aaa
EZ
12338
12339fi
eb697db5
DN
12340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
12341$as_echo "$ac_cv_group_kmem" >&6; }
12342 KMEM_GROUP=$ac_cv_group_kmem
12343fi
12344if test "x$ac_save_LIBS" = x; then
12345 GETLOADAVG_LIBS=$LIBS
12346else
12347 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
12348fi
12349LIBS=$ac_save_LIBS
91e84f96 12350
6da23aaa
EZ
12351
12352
eb697db5
DN
12353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12354$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
12355if test "${ac_cv_sys_largefile_source+set}" = set; then :
91e84f96
GM
12356 $as_echo_n "(cached) " >&6
12357else
eb697db5
DN
12358 while :; do
12359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 12360/* end confdefs.h. */
eb697db5
DN
12361#include <sys/types.h> /* for off_t */
12362 #include <stdio.h>
91e84f96
GM
12363int
12364main ()
12365{
eb697db5
DN
12366int (*fp) (FILE *, off_t, int) = fseeko;
12367 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
91e84f96
GM
12368 ;
12369 return 0;
12370}
12371_ACEOF
eb697db5
DN
12372if ac_fn_c_try_link "$LINENO"; then :
12373 ac_cv_sys_largefile_source=no; break
12374fi
12375rm -f core conftest.err conftest.$ac_objext \
12376 conftest$ac_exeext conftest.$ac_ext
12377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 12378/* end confdefs.h. */
eb697db5
DN
12379#define _LARGEFILE_SOURCE 1
12380#include <sys/types.h> /* for off_t */
12381 #include <stdio.h>
91e84f96
GM
12382int
12383main ()
12384{
eb697db5
DN
12385int (*fp) (FILE *, off_t, int) = fseeko;
12386 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
91e84f96
GM
12387 ;
12388 return 0;
12389}
12390_ACEOF
eb697db5
DN
12391if ac_fn_c_try_link "$LINENO"; then :
12392 ac_cv_sys_largefile_source=1; break
12393fi
12394rm -f core conftest.err conftest.$ac_objext \
12395 conftest$ac_exeext conftest.$ac_ext
12396 ac_cv_sys_largefile_source=unknown
12397 break
12398done
12399fi
12400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12401$as_echo "$ac_cv_sys_largefile_source" >&6; }
12402case $ac_cv_sys_largefile_source in #(
12403 no | unknown) ;;
12404 *)
12405cat >>confdefs.h <<_ACEOF
12406#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12407_ACEOF
12408;;
91e84f96 12409esac
eb697db5 12410rm -rf conftest*
ca81d7a0 12411
eb697db5
DN
12412# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12413# in glibc 2.1.3, but that breaks too many other things.
12414# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12415if test $ac_cv_sys_largefile_source != unknown; then
49ebbd65 12416
eb697db5 12417$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
ca81d7a0 12418
91e84f96 12419fi
c0d27fcc 12420
19650fd6 12421
eb697db5
DN
12422# Configure getopt.
12423# getopt.m4 serial 10
8c5ff6dd 12424
eb697db5
DN
12425# The getopt module assume you want GNU getopt, with getopt_long etc,
12426# rather than vanilla POSIX getopt. This means your your code should
12427# always include <getopt.h> for the getopt prototypes.
15e12598 12428
15e12598 12429
a4f64981 12430
8c5ff6dd 12431
5929fbe7 12432
5929fbe7 12433
ca81d7a0 12434
c0d27fcc 12435
ca81d7a0 12436
0ca10bb7 12437
0ca10bb7 12438
eb697db5 12439# Prerequisites of lib/getopt*.
bf89cb4d 12440
c0d27fcc 12441
0ca10bb7
RC
12442
12443
eb697db5
DN
12444 GETOPT_H=
12445 for ac_header in getopt.h
12446do :
12447 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12448if test "x$ac_cv_header_getopt_h" = x""yes; then :
12449 cat >>confdefs.h <<_ACEOF
12450#define HAVE_GETOPT_H 1
91e84f96 12451_ACEOF
91e84f96 12452
5929fbe7 12453else
eb697db5 12454 GETOPT_H=getopt.h
bf89cb4d 12455fi
0ca10bb7 12456
eb697db5 12457done
6da23aaa 12458
eb697db5
DN
12459 if test -z "$GETOPT_H"; then
12460 for ac_func in getopt_long_only
12461do :
12462 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12463if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
8c5ff6dd 12464 cat >>confdefs.h <<_ACEOF
eb697db5 12465#define HAVE_GETOPT_LONG_ONLY 1
8c5ff6dd 12466_ACEOF
bf89cb4d 12467
6da23aaa 12468else
eb697db5 12469 GETOPT_H=getopt.h
0ca10bb7 12470fi
eb697db5 12471done
5929fbe7 12472
eb697db5 12473 fi
bf89cb4d 12474
eb697db5
DN
12475 if test -z "$GETOPT_H"; then
12476 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
12477"
12478if test "x$ac_cv_have_decl_optreset" = x""yes; then :
12479 GETOPT_H=getopt.h
0ca10bb7 12480fi
bf89cb4d 12481
eb697db5 12482 fi
0ca10bb7 12483
eb697db5
DN
12484 if test -z "$GETOPT_H"; then
12485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12486$as_echo_n "checking for working GNU getopt function... " >&6; }
12487if test "${gl_cv_func_gnu_getopt+set}" = set; then :
bf89cb4d 12488 $as_echo_n "(cached) " >&6
eb697db5
DN
12489else
12490 if test "$cross_compiling" = yes; then :
12491 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
12492"
12493if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
12494 gl_cv_func_gnu_getopt=no
12495else
12496 gl_cv_func_gnu_getopt=yes
a21616bd 12497fi
eb697db5 12498
6da23aaa 12499else
eb697db5 12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12501/* end confdefs.h. */
eb697db5
DN
12502#include <getopt.h>
12503int
12504main ()
12505{
12506
12507 char *myargv[3];
12508 myargv[0] = "conftest";
12509 myargv[1] = "-+";
12510 myargv[2] = 0;
12511 return getopt (2, myargv, "+a") != '?';
12512
12513 ;
12514 return 0;
12515}
0ca10bb7 12516_ACEOF
eb697db5
DN
12517if ac_fn_c_try_run "$LINENO"; then :
12518 gl_cv_func_gnu_getopt=yes
bf89cb4d 12519else
eb697db5
DN
12520 gl_cv_func_gnu_getopt=no
12521fi
12522rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12523 conftest.$ac_objext conftest.beam conftest.$ac_ext
12524fi
ca81d7a0 12525
0ca10bb7 12526fi
eb697db5
DN
12527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
12528$as_echo "$gl_cv_func_gnu_getopt" >&6; }
12529 if test "$gl_cv_func_gnu_getopt" = "no"; then
12530 GETOPT_H=getopt.h
12531 fi
12532 fi
bf89cb4d 12533
503d2be0 12534
bf89cb4d 12535
eb697db5 12536 if test -n "$GETOPT_H"; then :
bf89cb4d 12537
bf89cb4d 12538
eb697db5 12539 GETOPT_H=getopt.h
bf89cb4d 12540
eb697db5 12541$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
15e12598 12542
49ebbd65 12543
15e12598 12544
eb697db5
DN
12545 :
12546 GETOPTOBJS='getopt.o getopt1.o'
c0d27fcc 12547
91e84f96 12548fi
0ca10bb7 12549
a21616bd 12550
eb697db5
DN
12551
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
12553$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
12554if test "${ac_cv_func_getpgrp_void+set}" = set; then :
bf89cb4d
GM
12555 $as_echo_n "(cached) " >&6
12556else
eb697db5
DN
12557 # Use it with a single arg.
12558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa
EZ
12559/* end confdefs.h. */
12560$ac_includes_default
eb697db5
DN
12561int
12562main ()
12563{
12564getpgrp (0);
12565 ;
12566 return 0;
12567}
6da23aaa 12568_ACEOF
eb697db5
DN
12569if ac_fn_c_try_compile "$LINENO"; then :
12570 ac_cv_func_getpgrp_void=no
6da23aaa 12571else
eb697db5 12572 ac_cv_func_getpgrp_void=yes
6da23aaa 12573fi
91e84f96 12574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91e84f96 12575
5929fbe7 12576fi
eb697db5
DN
12577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
12578$as_echo "$ac_cv_func_getpgrp_void" >&6; }
12579if test $ac_cv_func_getpgrp_void = yes; then
8c5ff6dd 12580
eb697db5 12581$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
c0d27fcc 12582
bf89cb4d 12583fi
6da23aaa
EZ
12584
12585
eb697db5
DN
12586for ac_func in strftime
12587do :
12588 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
12589if test "x$ac_cv_func_strftime" = x""yes; then :
12590 cat >>confdefs.h <<_ACEOF
12591#define HAVE_STRFTIME 1
12592_ACEOF
a21616bd 12593
eb697db5
DN
12594else
12595 # strftime is in -lintl on SCO UNIX.
12596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
12597$as_echo_n "checking for strftime in -lintl... " >&6; }
12598if test "${ac_cv_lib_intl_strftime+set}" = set; then :
e9a63f04 12599 $as_echo_n "(cached) " >&6
98418dba 12600else
eb697db5
DN
12601 ac_check_lib_save_LIBS=$LIBS
12602LIBS="-lintl $LIBS"
12603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12604/* end confdefs.h. */
12605
12606/* Override any GCC internal prototype to avoid an error.
12607 Use char because int might match the return type of a GCC
12608 builtin and then its argument prototype would still apply. */
12609#ifdef __cplusplus
12610extern "C"
12611#endif
12612char strftime ();
12613int
12614main ()
12615{
12616return strftime ();
12617 ;
12618 return 0;
12619}
12620_ACEOF
12621if ac_fn_c_try_link "$LINENO"; then :
12622 ac_cv_lib_intl_strftime=yes
12623else
12624 ac_cv_lib_intl_strftime=no
12625fi
12626rm -f core conftest.err conftest.$ac_objext \
12627 conftest$ac_exeext conftest.$ac_ext
12628LIBS=$ac_check_lib_save_LIBS
12629fi
12630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
12631$as_echo "$ac_cv_lib_intl_strftime" >&6; }
12632if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
12633 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
12634
12635LIBS="-lintl $LIBS"
91e84f96 12636fi
6da23aaa 12637
6da23aaa 12638fi
eb697db5
DN
12639done
12640
12641
12642# UNIX98 PTYs.
12643for ac_func in grantpt
12644do :
12645 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
12646if test "x$ac_cv_func_grantpt" = x""yes; then :
91e84f96 12647 cat >>confdefs.h <<_ACEOF
eb697db5 12648#define HAVE_GRANTPT 1
91e84f96
GM
12649_ACEOF
12650
6da23aaa 12651fi
91e84f96
GM
12652done
12653
0ca10bb7 12654
eb697db5
DN
12655# PTY-related GNU extensions.
12656for ac_func in getpt
12657do :
12658 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
12659if test "x$ac_cv_func_getpt" = x""yes; then :
12660 cat >>confdefs.h <<_ACEOF
12661#define HAVE_GETPT 1
12662_ACEOF
91e84f96 12663
6da23aaa
EZ
12664fi
12665done
bf89cb4d 12666
6da23aaa 12667
eb697db5
DN
12668# Check this now, so that we will NOT find the above functions in ncurses.
12669# That is because we have not set up to link ncurses in lib-src.
12670# It's better to believe a function is not available
12671# than to expect to find it in ncurses.
12672# Also we need tputs and friends to be able to build at all.
12673have_tputs_et_al=true
12674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
12675$as_echo_n "checking for library containing tputs... " >&6; }
12676if test "${ac_cv_search_tputs+set}" = set; then :
91e84f96 12677 $as_echo_n "(cached) " >&6
91e84f96 12678else
eb697db5
DN
12679 ac_func_search_save_LIBS=$LIBS
12680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 12681/* end confdefs.h. */
eb697db5
DN
12682
12683/* Override any GCC internal prototype to avoid an error.
12684 Use char because int might match the return type of a GCC
12685 builtin and then its argument prototype would still apply. */
12686#ifdef __cplusplus
12687extern "C"
12688#endif
12689char tputs ();
12690int
12691main ()
12692{
12693return tputs ();
12694 ;
12695 return 0;
12696}
bf89cb4d 12697_ACEOF
eb697db5
DN
12698for ac_lib in '' ncurses terminfo termcap; do
12699 if test -z "$ac_lib"; then
12700 ac_res="none required"
12701 else
12702 ac_res=-l$ac_lib
12703 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12704 fi
12705 if ac_fn_c_try_link "$LINENO"; then :
12706 ac_cv_search_tputs=$ac_res
12707fi
12708rm -f core conftest.err conftest.$ac_objext \
12709 conftest$ac_exeext
12710 if test "${ac_cv_search_tputs+set}" = set; then :
12711 break
12712fi
12713done
12714if test "${ac_cv_search_tputs+set}" = set; then :
12715
91e84f96 12716else
eb697db5
DN
12717 ac_cv_search_tputs=no
12718fi
12719rm conftest.$ac_ext
12720LIBS=$ac_func_search_save_LIBS
12721fi
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
12723$as_echo "$ac_cv_search_tputs" >&6; }
12724ac_res=$ac_cv_search_tputs
12725if test "$ac_res" != no; then :
12726 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
bf89cb4d 12727
eb697db5
DN
12728else
12729 have_tputs_et_al=false
0ca10bb7 12730fi
bf89cb4d 12731
eb697db5
DN
12732if test "$have_tputs_et_al" != true; then
12733 as_fn_error "I couldn't find termcap functions (tputs and friends).
12734Maybe some development libraries/packages are missing? Try installing
12735libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
12736fi
12737# Must define this when any termcap library is found.
bf89cb4d 12738
eb697db5
DN
12739$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
12740
12741## FIXME This was the cpp logic, but I am not sure it is right.
12742## The above test has not necessarily found libncurses.
12743HAVE_LIBNCURSES=yes
12744
12745## Use terminfo instead of termcap?
12746## Note only system files NOT using terminfo are:
12747## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
12748## darwin|gnu without ncurses.
12749TERMINFO=no
12750LIBS_TERMCAP=
12751case "$opsys" in
12752 ## cygwin: Fewer environment variables to go wrong, more terminal types.
12753 ## hpux10-20: Use the system provided termcap(3) library.
12754 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
12755 ## is necessary. Otherwise Emacs dumps core when run -nw.
12756 aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
12757
12758 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
12759 ## The ncurses library has been moved out of the System framework in
12760 ## Mac OS X 10.2. So if configure detects it, set the command-line
12761 ## option to use it.
12762 darwin|gnu*)
12763 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
12764 if test "x$HAVE_LIBNCURSES" = "xyes"; then
12765 TERMINFO=yes
12766 LIBS_TERMCAP="-lncurses"
12767 fi
12768 ;;
12769
12770 freebsd)
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
12772$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
12773 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
12774 $as_echo_n "(cached) " >&6
12775else
12776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 12777/* end confdefs.h. */
eb697db5
DN
12778#include <osreldate.h>
12779int
12780main ()
12781{
12782#if __FreeBSD_version < 400000
12783fail;
12784#endif
12785
12786 ;
12787 return 0;
12788}
6da23aaa 12789_ACEOF
eb697db5
DN
12790if ac_fn_c_try_link "$LINENO"; then :
12791 emacs_cv_freebsd_terminfo=yes
91e84f96 12792else
eb697db5
DN
12793 emacs_cv_freebsd_terminfo=no
12794fi
12795rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext conftest.$ac_ext
6da23aaa 12797fi
6da23aaa
EZ
12798
12799
eb697db5
DN
12800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
12801$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
12802
12803 if test $emacs_cv_freebsd_terminfo = yes; then
12804 TERMINFO=yes
12805 LIBS_TERMCAP="-lncurses"
12806 else
12807 LIBS_TERMCAP="-ltermcap"
12808 fi
91e84f96 12809 ;;
bf89cb4d 12810
eb697db5
DN
12811 netbsd)
12812 if test $ac_cv_search_tputs = -lterminfo; then
12813 TERMINFO=yes
12814 LIBS_TERMCAP="-lterminfo"
12815 else
12816 LIBS_TERMCAP="-ltermcap"
12817 fi
91e84f96 12818 ;;
eb697db5 12819
91e84f96 12820esac
91e84f96 12821
eb697db5
DN
12822case "$opsys" in
12823 ## hpux: Make sure we get select from libc rather than from libcurses
12824 ## because libcurses on HPUX 10.10 has a broken version of select.
12825 ## We used to use -lc -lcurses, but this may be cleaner.
12826 hpux*) LIBS_TERMCAP="-ltermcap" ;;
0ca10bb7 12827
eb697db5 12828 openbsd) LIBS_TERMCAP="-lncurses" ;;
6da23aaa 12829
eb697db5
DN
12830 ## Must use system termcap, if we use any termcap. It does special things.
12831 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
91e84f96 12832esac
91e84f96 12833
eb697db5
DN
12834TERMCAP_OBJ=tparam.o
12835if test $TERMINFO = yes; then
12836
12837$as_echo "#define TERMINFO 1" >>confdefs.h
8c5ff6dd 12838
5929fbe7 12839
eb697db5
DN
12840 ## Default used to be -ltermcap. Add a case above if need something else.
12841 test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
12842
12843 TERMCAP_OBJ=terminfo.o
6da23aaa 12844fi
91e84f96 12845
91e84f96 12846
eb697db5
DN
12847
12848
12849# Do we have res_init, for detecting changes in /etc/resolv.conf?
12850resolv=no
12851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12852/* end confdefs.h. */
12853#include <netinet/in.h>
12854#include <arpa/nameser.h>
12855#include <resolv.h>
12856int
12857main ()
12858{
12859return res_init();
12860 ;
12861 return 0;
12862}
91e84f96 12863_ACEOF
eb697db5
DN
12864if ac_fn_c_try_link "$LINENO"; then :
12865 have_res_init=yes
12866else
12867 have_res_init=no
12868fi
12869rm -f core conftest.err conftest.$ac_objext \
12870 conftest$ac_exeext conftest.$ac_ext
12871if test "$have_res_init" = no; then
12872 OLIBS="$LIBS"
12873 LIBS="$LIBS -lresolv"
12874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
12875$as_echo_n "checking for res_init with -lresolv... " >&6; }
12876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 12877/* end confdefs.h. */
eb697db5
DN
12878#include <netinet/in.h>
12879#include <arpa/nameser.h>
12880#include <resolv.h>
12881int
12882main ()
12883{
12884return res_init();
12885 ;
12886 return 0;
12887}
6da23aaa 12888_ACEOF
eb697db5
DN
12889if ac_fn_c_try_link "$LINENO"; then :
12890 have_res_init=yes
6da23aaa 12891else
eb697db5
DN
12892 have_res_init=no
12893fi
12894rm -f core conftest.err conftest.$ac_objext \
12895 conftest$ac_exeext conftest.$ac_ext
12896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
12897$as_echo "$have_res_init" >&6; }
12898 if test "$have_res_init" = yes ; then
12899 resolv=yes
12900 fi
12901 LIBS="$OLIBS"
0ca10bb7 12902fi
19650fd6 12903
eb697db5 12904if test "$have_res_init" = yes; then
6da23aaa 12905
eb697db5 12906$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
bf89cb4d 12907
c0d27fcc 12908fi
ca81d7a0 12909
eb697db5
DN
12910# Do we need the Hesiod library to provide the support routines?
12911LIBHESIOD=
12912if test "$with_hesiod" != no ; then
12913 # Don't set $LIBS here -- see comments above. FIXME which comments?
12914 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
12915if test "x$ac_cv_func_res_send" = x""yes; then :
bf89cb4d 12916
6da23aaa 12917else
eb697db5
DN
12918 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
12919if test "x$ac_cv_func___res_send" = x""yes; then :
c0d27fcc 12920
eb697db5
DN
12921else
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
12923$as_echo_n "checking for res_send in -lresolv... " >&6; }
12924if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
0ca10bb7
RC
12925 $as_echo_n "(cached) " >&6
12926else
eb697db5
DN
12927 ac_check_lib_save_LIBS=$LIBS
12928LIBS="-lresolv $LIBS"
12929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 12930/* end confdefs.h. */
eb697db5
DN
12931
12932/* Override any GCC internal prototype to avoid an error.
12933 Use char because int might match the return type of a GCC
12934 builtin and then its argument prototype would still apply. */
12935#ifdef __cplusplus
12936extern "C"
12937#endif
12938char res_send ();
12939int
12940main ()
12941{
12942return res_send ();
12943 ;
12944 return 0;
12945}
bf89cb4d 12946_ACEOF
eb697db5
DN
12947if ac_fn_c_try_link "$LINENO"; then :
12948 ac_cv_lib_resolv_res_send=yes
6da23aaa 12949else
eb697db5 12950 ac_cv_lib_resolv_res_send=no
6da23aaa 12951fi
eb697db5
DN
12952rm -f core conftest.err conftest.$ac_objext \
12953 conftest$ac_exeext conftest.$ac_ext
12954LIBS=$ac_check_lib_save_LIBS
12955fi
12956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
12957$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
12958if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
12959 resolv=yes
12960else
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
12962$as_echo_n "checking for __res_send in -lresolv... " >&6; }
12963if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
12964 $as_echo_n "(cached) " >&6
12965else
12966 ac_check_lib_save_LIBS=$LIBS
12967LIBS="-lresolv $LIBS"
12968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 12969/* end confdefs.h. */
eb697db5
DN
12970
12971/* Override any GCC internal prototype to avoid an error.
12972 Use char because int might match the return type of a GCC
12973 builtin and then its argument prototype would still apply. */
12974#ifdef __cplusplus
12975extern "C"
12976#endif
12977char __res_send ();
12978int
12979main ()
12980{
12981return __res_send ();
12982 ;
12983 return 0;
12984}
91e84f96 12985_ACEOF
eb697db5
DN
12986if ac_fn_c_try_link "$LINENO"; then :
12987 ac_cv_lib_resolv___res_send=yes
503d2be0 12988else
eb697db5 12989 ac_cv_lib_resolv___res_send=no
6da23aaa 12990fi
eb697db5
DN
12991rm -f core conftest.err conftest.$ac_objext \
12992 conftest$ac_exeext conftest.$ac_ext
12993LIBS=$ac_check_lib_save_LIBS
6da23aaa 12994fi
eb697db5
DN
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
12996$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
12997if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
12998 resolv=yes
6da23aaa
EZ
12999fi
13000
13001fi
bf89cb4d 13002
0ca10bb7 13003fi
ca81d7a0 13004
6da23aaa 13005fi
ca81d7a0 13006
eb697db5
DN
13007 if test "$resolv" = yes ; then
13008 RESOLVLIB=-lresolv
13009 else
13010 RESOLVLIB=
6da23aaa 13011 fi
eb697db5
DN
13012 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
13013if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
6da23aaa 13014
eb697db5
DN
13015else
13016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
13017$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
13018if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
6da23aaa
EZ
13019 $as_echo_n "(cached) " >&6
13020else
eb697db5
DN
13021 ac_check_lib_save_LIBS=$LIBS
13022LIBS="-lhesiod $RESOLVLIB $LIBS"
13023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13024/* end confdefs.h. */
5929fbe7 13025
eb697db5
DN
13026/* Override any GCC internal prototype to avoid an error.
13027 Use char because int might match the return type of a GCC
13028 builtin and then its argument prototype would still apply. */
13029#ifdef __cplusplus
13030extern "C"
13031#endif
13032char hes_getmailhost ();
13033int
13034main ()
13035{
13036return hes_getmailhost ();
13037 ;
13038 return 0;
13039}
bf89cb4d 13040_ACEOF
eb697db5
DN
13041if ac_fn_c_try_link "$LINENO"; then :
13042 ac_cv_lib_hesiod_hes_getmailhost=yes
c0d27fcc 13043else
eb697db5 13044 ac_cv_lib_hesiod_hes_getmailhost=no
e6df49e4 13045fi
eb697db5
DN
13046rm -f core conftest.err conftest.$ac_objext \
13047 conftest$ac_exeext conftest.$ac_ext
13048LIBS=$ac_check_lib_save_LIBS
13049fi
13050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
13051$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
13052if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
13053 hesiod=yes
5929fbe7 13054else
eb697db5 13055 :
8c5ff6dd 13056fi
91e84f96 13057
6da23aaa 13058fi
c0d27fcc 13059
503d2be0 13060
eb697db5 13061 if test x"$hesiod" = xyes; then
ba4481b5 13062
eb697db5 13063$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
a5edbe4a 13064
eb697db5
DN
13065 LIBHESIOD=-lhesiod
13066 fi
bf89cb4d
GM
13067fi
13068
ba4481b5 13069
eb697db5
DN
13070# Do we need libresolv (due to res_init or Hesiod)?
13071if test "$resolv" = yes ; then
bf89cb4d 13072
eb697db5 13073$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
15e12598 13074
eb697db5 13075 LIBRESOLV=-lresolv
ba4481b5 13076else
eb697db5 13077 LIBRESOLV=
ba4481b5 13078fi
91e84f96 13079
0ca10bb7 13080
eb697db5
DN
13081# These tell us which Kerberos-related libraries to use.
13082COM_ERRLIB=
13083CRYPTOLIB=
13084KRB5LIB=
13085DESLIB=
13086KRB4LIB=
ca81d7a0 13087
eb697db5
DN
13088if test "${with_kerberos}" != no; then
13089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
13090$as_echo_n "checking for com_err in -lcom_err... " >&6; }
13091if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
49ebbd65 13092 $as_echo_n "(cached) " >&6
cd03c74a 13093else
8c5ff6dd 13094 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
13095LIBS="-lcom_err $LIBS"
13096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 13097/* end confdefs.h. */
6da23aaa 13098
8c5ff6dd
KR
13099/* Override any GCC internal prototype to avoid an error.
13100 Use char because int might match the return type of a GCC
13101 builtin and then its argument prototype would still apply. */
13102#ifdef __cplusplus
13103extern "C"
13104#endif
eb697db5 13105char com_err ();
8c5ff6dd
KR
13106int
13107main ()
a4f64981 13108{
eb697db5 13109return com_err ();
8c5ff6dd
KR
13110 ;
13111 return 0;
49ebbd65 13112}
a5edbe4a 13113_ACEOF
eb697db5
DN
13114if ac_fn_c_try_link "$LINENO"; then :
13115 ac_cv_lib_com_err_com_err=yes
49ebbd65 13116else
eb697db5 13117 ac_cv_lib_com_err_com_err=no
8c5ff6dd 13118fi
eb697db5
DN
13119rm -f core conftest.err conftest.$ac_objext \
13120 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 13121LIBS=$ac_check_lib_save_LIBS
49ebbd65 13122fi
eb697db5
DN
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
13124$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
13125if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
13126 have_com_err=yes
13127else
13128 have_com_err=no
bf89cb4d 13129fi
6da23aaa 13130
eb697db5
DN
13131 if test $have_com_err = yes; then
13132 COM_ERRLIB=-lcom_err
13133 LIBS="$COM_ERRLIB $LIBS"
bf89cb4d 13134
eb697db5 13135$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
bf89cb4d 13136
eb697db5
DN
13137 fi
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
13139$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
13140if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
6da23aaa 13141 $as_echo_n "(cached) " >&6
0ca10bb7 13142else
6da23aaa 13143 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
13144LIBS="-lcrypto $LIBS"
13145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa
EZ
13146/* end confdefs.h. */
13147
13148/* Override any GCC internal prototype to avoid an error.
13149 Use char because int might match the return type of a GCC
13150 builtin and then its argument prototype would still apply. */
13151#ifdef __cplusplus
13152extern "C"
13153#endif
eb697db5 13154char mit_des_cbc_encrypt ();
6da23aaa
EZ
13155int
13156main ()
13157{
eb697db5 13158return mit_des_cbc_encrypt ();
6da23aaa
EZ
13159 ;
13160 return 0;
13161}
13162_ACEOF
eb697db5
DN
13163if ac_fn_c_try_link "$LINENO"; then :
13164 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
6da23aaa 13165else
eb697db5 13166 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
ba4481b5 13167fi
eb697db5
DN
13168rm -f core conftest.err conftest.$ac_objext \
13169 conftest$ac_exeext conftest.$ac_ext
6da23aaa 13170LIBS=$ac_check_lib_save_LIBS
ba4481b5 13171fi
eb697db5
DN
13172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
13173$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
13174if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
13175 have_crypto=yes
13176else
13177 have_crypto=no
6da23aaa 13178fi
bf89cb4d 13179
eb697db5
DN
13180 if test $have_crypto = yes; then
13181 CRYPTOLIB=-lcrypto
13182 LIBS="$CRYPTOLIB $LIBS"
91e84f96 13183
eb697db5 13184$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
e6df49e4 13185
eb697db5
DN
13186 fi
13187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
13188$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
13189if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
e9a63f04 13190 $as_echo_n "(cached) " >&6
48d4b120 13191else
eb697db5
DN
13192 ac_check_lib_save_LIBS=$LIBS
13193LIBS="-lk5crypto $LIBS"
13194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13195/* end confdefs.h. */
8c5ff6dd 13196
eb697db5
DN
13197/* Override any GCC internal prototype to avoid an error.
13198 Use char because int might match the return type of a GCC
13199 builtin and then its argument prototype would still apply. */
13200#ifdef __cplusplus
13201extern "C"
13202#endif
13203char mit_des_cbc_encrypt ();
13204int
13205main ()
91e84f96 13206{
eb697db5
DN
13207return mit_des_cbc_encrypt ();
13208 ;
13209 return 0;
6da23aaa
EZ
13210}
13211_ACEOF
eb697db5
DN
13212if ac_fn_c_try_link "$LINENO"; then :
13213 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
91e84f96 13214else
eb697db5 13215 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
91e84f96 13216fi
eb697db5
DN
13217rm -f core conftest.err conftest.$ac_objext \
13218 conftest$ac_exeext conftest.$ac_ext
13219LIBS=$ac_check_lib_save_LIBS
91e84f96 13220fi
eb697db5
DN
13221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
13222$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
13223if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
13224 have_k5crypto=yes
6da23aaa 13225else
eb697db5 13226 have_k5crypto=no
6da23aaa 13227fi
6da23aaa 13228
eb697db5
DN
13229 if test $have_k5crypto = yes; then
13230 CRYPTOLIB=-lk5crypto
13231 LIBS="$CRYPTOLIB $LIBS"
bf89cb4d 13232
eb697db5 13233$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
91e84f96 13234
eb697db5
DN
13235 fi
13236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
13237$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
13238if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
6da23aaa
EZ
13239 $as_echo_n "(cached) " >&6
13240else
eb697db5
DN
13241 ac_check_lib_save_LIBS=$LIBS
13242LIBS="-lkrb5 $LIBS"
13243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 13244/* end confdefs.h. */
edfaf76d 13245
0ca10bb7
RC
13246/* Override any GCC internal prototype to avoid an error.
13247 Use char because int might match the return type of a GCC
13248 builtin and then its argument prototype would still apply. */
13249#ifdef __cplusplus
13250extern "C"
19650fd6 13251#endif
eb697db5 13252char krb5_init_context ();
0ca10bb7
RC
13253int
13254main ()
13255{
eb697db5 13256return krb5_init_context ();
0ca10bb7
RC
13257 ;
13258 return 0;
13259}
13260_ACEOF
eb697db5
DN
13261if ac_fn_c_try_link "$LINENO"; then :
13262 ac_cv_lib_krb5_krb5_init_context=yes
0ca10bb7 13263else
eb697db5 13264 ac_cv_lib_krb5_krb5_init_context=no
0ca10bb7 13265fi
eb697db5
DN
13266rm -f core conftest.err conftest.$ac_objext \
13267 conftest$ac_exeext conftest.$ac_ext
13268LIBS=$ac_check_lib_save_LIBS
0ca10bb7 13269fi
eb697db5
DN
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
13271$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
13272if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
13273 have_krb5=yes
13274else
13275 have_krb5=no
91e84f96 13276fi
edfaf76d 13277
eb697db5
DN
13278 if test $have_krb5=yes; then
13279 KRB5LIB=-lkrb5
13280 LIBS="$KRB5LIB $LIBS"
13281
13282$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
5929fbe7 13283
eb697db5
DN
13284 fi
13285 if test "${with_kerberos5}" = no; then
13286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
13287$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
13288if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
13289 $as_echo_n "(cached) " >&6
13290else
eb697db5
DN
13291 ac_check_lib_save_LIBS=$LIBS
13292LIBS="-ldes425 $LIBS"
13293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 13294/* end confdefs.h. */
edfaf76d 13295
aaa36002
DN
13296/* Override any GCC internal prototype to avoid an error.
13297 Use char because int might match the return type of a GCC
13298 builtin and then its argument prototype would still apply. */
13299#ifdef __cplusplus
13300extern "C"
503d2be0 13301#endif
eb697db5 13302char des_cbc_encrypt ();
19650fd6
AS
13303int
13304main ()
13305{
eb697db5 13306return des_cbc_encrypt ();
503d2be0
AS
13307 ;
13308 return 0;
13309}
13310_ACEOF
eb697db5
DN
13311if ac_fn_c_try_link "$LINENO"; then :
13312 ac_cv_lib_des425_des_cbc_encrypt=yes
503d2be0 13313else
eb697db5 13314 ac_cv_lib_des425_des_cbc_encrypt=no
91e84f96 13315fi
eb697db5
DN
13316rm -f core conftest.err conftest.$ac_objext \
13317 conftest$ac_exeext conftest.$ac_ext
13318LIBS=$ac_check_lib_save_LIBS
bf89cb4d 13319fi
eb697db5
DN
13320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
13321$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
13322if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
13323 have_des425=yes
13324else
13325 have_des425=no
6da23aaa
EZ
13326fi
13327
eb697db5
DN
13328 if test $have_des425 = yes; then
13329 DESLIB=-ldes425
13330 LIBS="$DESLIB $LIBS"
13331
13332$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
13333
13334 else
13335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
13336$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
13337if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
e9a63f04 13338 $as_echo_n "(cached) " >&6
ba4481b5 13339else
eb697db5
DN
13340 ac_check_lib_save_LIBS=$LIBS
13341LIBS="-ldes $LIBS"
13342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13343/* end confdefs.h. */
ba4481b5 13344
0ca10bb7
RC
13345/* Override any GCC internal prototype to avoid an error.
13346 Use char because int might match the return type of a GCC
13347 builtin and then its argument prototype would still apply. */
13348#ifdef __cplusplus
13349extern "C"
a3f08d9e 13350#endif
eb697db5 13351char des_cbc_encrypt ();
503d2be0
AS
13352int
13353main ()
13354{
eb697db5 13355return des_cbc_encrypt ();
503d2be0
AS
13356 ;
13357 return 0;
13358}
13359_ACEOF
eb697db5
DN
13360if ac_fn_c_try_link "$LINENO"; then :
13361 ac_cv_lib_des_des_cbc_encrypt=yes
bf89cb4d 13362else
eb697db5 13363 ac_cv_lib_des_des_cbc_encrypt=no
91e84f96 13364fi
eb697db5
DN
13365rm -f core conftest.err conftest.$ac_objext \
13366 conftest$ac_exeext conftest.$ac_ext
13367LIBS=$ac_check_lib_save_LIBS
91e84f96 13368fi
eb697db5
DN
13369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
13370$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
13371if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
13372 have_des=yes
bf89cb4d 13373else
eb697db5 13374 have_des=no
91e84f96
GM
13375fi
13376
eb697db5
DN
13377 if test $have_des = yes; then
13378 DESLIB=-ldes
13379 LIBS="$DESLIB $LIBS"
a4f64981 13380
eb697db5 13381$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
5929fbe7 13382
eb697db5
DN
13383 fi
13384 fi
13385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
13386$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
13387if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
bf89cb4d 13388 $as_echo_n "(cached) " >&6
bf89cb4d 13389else
eb697db5
DN
13390 ac_check_lib_save_LIBS=$LIBS
13391LIBS="-lkrb4 $LIBS"
13392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13393/* end confdefs.h. */
ba4481b5 13394
0ca10bb7
RC
13395/* Override any GCC internal prototype to avoid an error.
13396 Use char because int might match the return type of a GCC
13397 builtin and then its argument prototype would still apply. */
13398#ifdef __cplusplus
13399extern "C"
a3f08d9e 13400#endif
eb697db5 13401char krb_get_cred ();
503d2be0
AS
13402int
13403main ()
13404{
eb697db5 13405return krb_get_cred ();
503d2be0
AS
13406 ;
13407 return 0;
13408}
91e84f96 13409_ACEOF
eb697db5
DN
13410if ac_fn_c_try_link "$LINENO"; then :
13411 ac_cv_lib_krb4_krb_get_cred=yes
91e84f96 13412else
eb697db5 13413 ac_cv_lib_krb4_krb_get_cred=no
91e84f96 13414fi
eb697db5
DN
13415rm -f core conftest.err conftest.$ac_objext \
13416 conftest$ac_exeext conftest.$ac_ext
13417LIBS=$ac_check_lib_save_LIBS
91e84f96 13418fi
eb697db5
DN
13419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
13420$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
13421if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
13422 have_krb4=yes
bf89cb4d 13423else
eb697db5 13424 have_krb4=no
ba4481b5 13425fi
91e84f96 13426
eb697db5
DN
13427 if test $have_krb4 = yes; then
13428 KRB4LIB=-lkrb4
13429 LIBS="$KRB4LIB $LIBS"
91e84f96 13430
eb697db5 13431$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
91e84f96 13432
eb697db5
DN
13433 else
13434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
13435$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
13436if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
91e84f96
GM
13437 $as_echo_n "(cached) " >&6
13438else
eb697db5
DN
13439 ac_check_lib_save_LIBS=$LIBS
13440LIBS="-lkrb $LIBS"
13441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13442/* end confdefs.h. */
91e84f96 13443
eb697db5
DN
13444/* Override any GCC internal prototype to avoid an error.
13445 Use char because int might match the return type of a GCC
13446 builtin and then its argument prototype would still apply. */
13447#ifdef __cplusplus
13448extern "C"
13449#endif
13450char krb_get_cred ();
13451int
13452main ()
13453{
13454return krb_get_cred ();
13455 ;
13456 return 0;
13457}
5929fbe7 13458_ACEOF
eb697db5
DN
13459if ac_fn_c_try_link "$LINENO"; then :
13460 ac_cv_lib_krb_krb_get_cred=yes
91e84f96 13461else
eb697db5 13462 ac_cv_lib_krb_krb_get_cred=no
2d2b6695 13463fi
eb697db5
DN
13464rm -f core conftest.err conftest.$ac_objext \
13465 conftest$ac_exeext conftest.$ac_ext
13466LIBS=$ac_check_lib_save_LIBS
91e84f96 13467fi
eb697db5
DN
13468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
13469$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
13470if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
13471 have_krb=yes
91e84f96 13472else
eb697db5 13473 have_krb=no
2d2b6695 13474fi
ca81d7a0 13475
eb697db5
DN
13476 if test $have_krb = yes; then
13477 KRB4LIB=-lkrb
13478 LIBS="$KRB4LIB $LIBS"
ca81d7a0 13479
eb697db5 13480$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
ca81d7a0 13481
eb697db5
DN
13482 fi
13483 fi
13484 fi
ca81d7a0 13485
eb697db5
DN
13486 if test "${with_kerberos5}" != no; then
13487 for ac_header in krb5.h
13488do :
13489 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
13490if test "x$ac_cv_header_krb5_h" = x""yes; then :
13491 cat >>confdefs.h <<_ACEOF
13492#define HAVE_KRB5_H 1
6da23aaa 13493_ACEOF
eb697db5
DN
13494 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
13495"
13496if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
13497
13498cat >>confdefs.h <<_ACEOF
13499#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 13500_ACEOF
2d2b6695 13501
eb697db5 13502
2d2b6695 13503fi
eb697db5
DN
13504ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
13505"
13506if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
6da23aaa 13507
eb697db5
DN
13508cat >>confdefs.h <<_ACEOF
13509#define HAVE_KRB5_ERROR_E_TEXT 1
13510_ACEOF
0ca10bb7 13511
0ca10bb7 13512
bf89cb4d 13513fi
2d2b6695
KS
13514
13515fi
13516
eb697db5 13517done
6da23aaa 13518
eb697db5
DN
13519 else
13520 for ac_header in des.h
13521do :
13522 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
13523if test "x$ac_cv_header_des_h" = x""yes; then :
13524 cat >>confdefs.h <<_ACEOF
13525#define HAVE_DES_H 1
6da23aaa 13526_ACEOF
3d9fec71 13527
91e84f96 13528else
eb697db5
DN
13529 for ac_header in kerberosIV/des.h
13530do :
13531 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
13532if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
13533 cat >>confdefs.h <<_ACEOF
13534#define HAVE_KERBEROSIV_DES_H 1
13535_ACEOF
6da23aaa 13536
91e84f96 13537else
eb697db5
DN
13538 for ac_header in kerberos/des.h
13539do :
13540 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
13541if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
13542 cat >>confdefs.h <<_ACEOF
13543#define HAVE_KERBEROS_DES_H 1
6da23aaa 13544_ACEOF
6da23aaa 13545
0ca10bb7 13546fi
6da23aaa 13547
eb697db5 13548done
6da23aaa 13549
0ca10bb7 13550fi
6da23aaa 13551
eb697db5
DN
13552done
13553
0ca10bb7 13554fi
6da23aaa 13555
eb697db5 13556done
6da23aaa 13557
eb697db5
DN
13558 for ac_header in krb.h
13559do :
13560 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
13561if test "x$ac_cv_header_krb_h" = x""yes; then :
13562 cat >>confdefs.h <<_ACEOF
13563#define HAVE_KRB_H 1
6da23aaa 13564_ACEOF
eb697db5
DN
13565
13566else
13567 for ac_header in kerberosIV/krb.h
13568do :
13569 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
13570if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
13571 cat >>confdefs.h <<_ACEOF
13572#define HAVE_KERBEROSIV_KRB_H 1
6da23aaa 13573_ACEOF
eb697db5 13574
6da23aaa 13575else
eb697db5
DN
13576 for ac_header in kerberos/krb.h
13577do :
13578 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
13579if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
13580 cat >>confdefs.h <<_ACEOF
13581#define HAVE_KERBEROS_KRB_H 1
13582_ACEOF
0ca10bb7 13583
0ca10bb7
RC
13584fi
13585
eb697db5 13586done
0ca10bb7
RC
13587
13588fi
eb697db5
DN
13589
13590done
0ca10bb7 13591
91e84f96 13592fi
eb697db5
DN
13593
13594done
13595
13596 fi
13597 for ac_header in com_err.h
13598do :
13599 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
13600if test "x$ac_cv_header_com_err_h" = x""yes; then :
6da23aaa 13601 cat >>confdefs.h <<_ACEOF
eb697db5 13602#define HAVE_COM_ERR_H 1
0ca10bb7
RC
13603_ACEOF
13604
13605fi
0ca10bb7 13606
6da23aaa
EZ
13607done
13608
eb697db5 13609fi
6da23aaa 13610
6da23aaa 13611
91e84f96 13612
6da23aaa 13613
6da23aaa 13614
6da23aaa
EZ
13615
13616
eb697db5
DN
13617# Solaris requires -lintl if you want strerror (which calls dgettext)
13618# to return localized messages.
13619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
13620$as_echo_n "checking for dgettext in -lintl... " >&6; }
13621if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
6da23aaa
EZ
13622 $as_echo_n "(cached) " >&6
13623else
eb697db5
DN
13624 ac_check_lib_save_LIBS=$LIBS
13625LIBS="-lintl $LIBS"
13626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13627/* end confdefs.h. */
eb697db5
DN
13628
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"
13634#endif
13635char dgettext ();
91e84f96
GM
13636int
13637main ()
6da23aaa 13638{
eb697db5 13639return dgettext ();
91e84f96
GM
13640 ;
13641 return 0;
6da23aaa
EZ
13642}
13643_ACEOF
eb697db5
DN
13644if ac_fn_c_try_link "$LINENO"; then :
13645 ac_cv_lib_intl_dgettext=yes
13646else
13647 ac_cv_lib_intl_dgettext=no
13648fi
13649rm -f core conftest.err conftest.$ac_objext \
13650 conftest$ac_exeext conftest.$ac_ext
13651LIBS=$ac_check_lib_save_LIBS
13652fi
13653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
13654$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
13655if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
13656 cat >>confdefs.h <<_ACEOF
13657#define HAVE_LIBINTL 1
6da23aaa 13658_ACEOF
eb697db5
DN
13659
13660 LIBS="-lintl $LIBS"
13661
13662fi
13663
13664
13665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
13666$as_echo_n "checking whether localtime caches TZ... " >&6; }
13667if test "${emacs_cv_localtime_cache+set}" = set; then :
13668 $as_echo_n "(cached) " >&6
13669else
13670 if test x$ac_cv_func_tzset = xyes; then
13671if test "$cross_compiling" = yes; then :
13672 # If we have tzset, assume the worst when cross-compiling.
13673emacs_cv_localtime_cache=yes
13674else
13675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6da23aaa 13676/* end confdefs.h. */
eb697db5
DN
13677#include <time.h>
13678extern char **environ;
13679unset_TZ ()
bf89cb4d 13680{
eb697db5
DN
13681 char **from, **to;
13682 for (to = from = environ; (*to = *from); from++)
13683 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
13684 to++;
13685}
13686char TZ_GMT0[] = "TZ=GMT0";
13687char TZ_PST8[] = "TZ=PST8";
13688main()
13689{
13690 time_t now = time ((time_t *) 0);
13691 int hour_GMT0, hour_unset;
13692 if (putenv (TZ_GMT0) != 0)
13693 exit (1);
13694 hour_GMT0 = localtime (&now)->tm_hour;
13695 unset_TZ ();
13696 hour_unset = localtime (&now)->tm_hour;
13697 if (putenv (TZ_PST8) != 0)
13698 exit (1);
13699 if (localtime (&now)->tm_hour == hour_GMT0)
13700 exit (1);
13701 unset_TZ ();
13702 if (localtime (&now)->tm_hour != hour_unset)
13703 exit (1);
13704 exit (0);
503d2be0 13705}
6da23aaa 13706_ACEOF
eb697db5
DN
13707if ac_fn_c_try_run "$LINENO"; then :
13708 emacs_cv_localtime_cache=no
e9a63f04 13709else
eb697db5
DN
13710 emacs_cv_localtime_cache=yes
13711fi
13712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13713 conftest.$ac_objext conftest.beam conftest.$ac_ext
e9a63f04 13714fi
91e84f96 13715
91e84f96 13716else
eb697db5
DN
13717 # If we lack tzset, report that localtime does not cache TZ,
13718 # since we can't invalidate the cache if we don't have tzset.
13719 emacs_cv_localtime_cache=no
13720fi
647847ea 13721fi
eb697db5
DN
13722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
13723$as_echo "$emacs_cv_localtime_cache" >&6; }
13724if test $emacs_cv_localtime_cache = yes; then
13725
13726$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
ca81d7a0 13727
6da23aaa 13728fi
503d2be0 13729
eb697db5
DN
13730if test "x$HAVE_TIMEVAL" = xyes; then
13731 for ac_func in gettimeofday
13732do :
13733 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13734if test "x$ac_cv_func_gettimeofday" = x""yes; then :
13735 cat >>confdefs.h <<_ACEOF
13736#define HAVE_GETTIMEOFDAY 1
91e84f96 13737_ACEOF
647847ea
DL
13738
13739fi
eb697db5 13740done
647847ea 13741
eb697db5
DN
13742 if test $ac_cv_func_gettimeofday = yes; then
13743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
13744$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
13745if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
91e84f96 13746 $as_echo_n "(cached) " >&6
6da23aaa 13747else
eb697db5 13748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 13749/* end confdefs.h. */
eb697db5
DN
13750
13751#ifdef TIME_WITH_SYS_TIME
13752#include <sys/time.h>
13753#include <time.h>
13754#else
13755#ifdef HAVE_SYS_TIME_H
13756#include <sys/time.h>
13757#else
13758#include <time.h>
13759#endif
13760#endif
aaa36002
DN
13761int
13762main ()
a4f64981 13763{
eb697db5
DN
13764struct timeval time;
13765 gettimeofday (&time, 0);
aaa36002
DN
13766 ;
13767 return 0;
eb697db5 13768}
91e84f96 13769_ACEOF
eb697db5
DN
13770if ac_fn_c_try_compile "$LINENO"; then :
13771 emacs_cv_gettimeofday_two_arguments=yes
91e84f96 13772else
eb697db5 13773 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 13774fi
e9a63f04 13775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
13776fi
13777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
13778$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
13779 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 13780
eb697db5 13781$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 13782
eb697db5
DN
13783 fi
13784 fi
647847ea 13785fi
ca81d7a0 13786
eb697db5
DN
13787ok_so_far=yes
13788ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13789if test "x$ac_cv_func_socket" = x""yes; then :
91e84f96 13790
5929fbe7 13791else
eb697db5 13792 ok_so_far=no
c0d27fcc 13793fi
ca81d7a0 13794
eb697db5
DN
13795if test $ok_so_far = yes; then
13796 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
13797if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
91e84f96 13798
91e84f96 13799else
eb697db5 13800 ok_so_far=no
647847ea 13801fi
19650fd6 13802
c0d27fcc 13803
c0d27fcc 13804fi
eb697db5
DN
13805if test $ok_so_far = yes; then
13806 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
13807if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
5929fbe7 13808
eb697db5
DN
13809else
13810 ok_so_far=no
647847ea 13811fi
ca81d7a0 13812
ca81d7a0 13813
647847ea 13814fi
eb697db5 13815if test $ok_so_far = yes; then
ca81d7a0 13816
eb697db5 13817$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
c0d27fcc 13818
91e84f96 13819fi
c0d27fcc 13820
eb697db5
DN
13821for ac_header in sys/ioctl.h
13822do :
13823 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
13824if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 13825 cat >>confdefs.h <<_ACEOF
eb697db5 13826#define HAVE_SYS_IOCTL_H 1
c0d27fcc 13827_ACEOF
647847ea 13828
73b77ee5 13829fi
c0d27fcc 13830
503d2be0 13831done
73b77ee5 13832
c0d27fcc 13833
eb697db5 13834if test -f /usr/lpp/X11/bin/smt.exp; then
0ca10bb7 13835
eb697db5 13836$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
6da23aaa 13837
eb697db5 13838fi
ca81d7a0 13839
eb697db5
DN
13840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
13841$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
13842if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
13843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13844$as_echo "yes" >&6; }
0ca10bb7 13845
eb697db5 13846$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
6da23aaa 13847
eb697db5
DN
13848else
13849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13850$as_echo "no" >&6; }
13851fi
13852
13853ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13854if test "x$ac_cv_type_pid_t" = x""yes; then :
0ca10bb7 13855
91e84f96 13856else
6da23aaa 13857
eb697db5
DN
13858cat >>confdefs.h <<_ACEOF
13859#define pid_t int
13860_ACEOF
13861
bf89cb4d 13862fi
6da23aaa 13863
eb697db5
DN
13864for ac_header in vfork.h
13865do :
13866 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13867if test "x$ac_cv_header_vfork_h" = x""yes; then :
13868 cat >>confdefs.h <<_ACEOF
13869#define HAVE_VFORK_H 1
13870_ACEOF
13871
91e84f96 13872fi
eb697db5
DN
13873
13874done
13875
13876for ac_func in fork vfork
13877do :
13878 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13879ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13880eval as_val=\$$as_ac_var
13881 if test "x$as_val" = x""yes; then :
c0d27fcc 13882 cat >>confdefs.h <<_ACEOF
e9a63f04 13883#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13884_ACEOF
503d2be0 13885
fa0b693c 13886fi
503d2be0 13887done
fa0b693c 13888
503d2be0 13889if test "x$ac_cv_func_fork" = xyes; then
eb697db5 13890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
e9a63f04 13891$as_echo_n "checking for working fork... " >&6; }
eb697db5 13892if test "${ac_cv_func_fork_works+set}" = set; then :
e9a63f04 13893 $as_echo_n "(cached) " >&6
fa0b693c 13894else
eb697db5 13895 if test "$cross_compiling" = yes; then :
503d2be0
AS
13896 ac_cv_func_fork_works=cross
13897else
eb697db5 13898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
13899/* end confdefs.h. */
13900$ac_includes_default
13901int
13902main ()
13903{
13904
13905 /* By Ruediger Kuhlmann. */
13906 return fork () < 0;
13907
13908 ;
13909 return 0;
13910}
503d2be0 13911_ACEOF
eb697db5 13912if ac_fn_c_try_run "$LINENO"; then :
503d2be0
AS
13913 ac_cv_func_fork_works=yes
13914else
eb697db5 13915 ac_cv_func_fork_works=no
503d2be0 13916fi
eb697db5
DN
13917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13918 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 13919fi
ca81d7a0 13920
503d2be0 13921fi
eb697db5 13922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
e9a63f04 13923$as_echo "$ac_cv_func_fork_works" >&6; }
503d2be0 13924
6bae0ccf
DL
13925else
13926 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
13927fi
13928if test "x$ac_cv_func_fork_works" = xcross; then
13929 case $host in
13930 *-*-amigaos* | *-*-msdosdjgpp*)
13931 # Override, as these systems have only a dummy fork() stub
13932 ac_cv_func_fork_works=no
13933 ;;
13934 *)
13935 ac_cv_func_fork_works=yes
13936 ;;
13937 esac
eb697db5 13938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
e9a63f04 13939$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 13940fi
73b77ee5 13941ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 13942if test "x$ac_cv_func_vfork" = xyes; then
eb697db5 13943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
e9a63f04 13944$as_echo_n "checking for working vfork... " >&6; }
eb697db5 13945if test "${ac_cv_func_vfork_works+set}" = set; then :
e9a63f04 13946 $as_echo_n "(cached) " >&6
503d2be0 13947else
eb697db5 13948 if test "$cross_compiling" = yes; then :
503d2be0 13949 ac_cv_func_vfork_works=cross
fa0b693c 13950else
eb697db5 13951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13952/* end confdefs.h. */
73b77ee5 13953/* Thanks to Paul Eggert for this test. */
ca81d7a0 13954$ac_includes_default
19650fd6 13955#include <sys/wait.h>
f053c89f 13956#ifdef HAVE_VFORK_H
503d2be0 13957# include <vfork.h>
73b77ee5
GM
13958#endif
13959/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
13960 argument registers are propagated back to the parent. The compiler
13961 is told about this with #include <vfork.h>, but some compilers
13962 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13963 static variable whose address is put into a register that is
13964 clobbered by the vfork. */
19650fd6 13965static void
fa0b693c 13966#ifdef __cplusplus
73b77ee5 13967sparc_address_test (int arg)
503d2be0 13968# else
73b77ee5 13969sparc_address_test (arg) int arg;
fa0b693c 13970#endif
fa0b693c 13971{
73b77ee5
GM
13972 static pid_t child;
13973 if (!child) {
13974 child = vfork ();
13975 if (child < 0) {
13976 perror ("vfork");
13977 _exit(2);
13978 }
13979 if (!child) {
13980 arg = getpid();
13981 write(-1, "", 0);
13982 _exit (arg);
13983 }
13984 }
13985}
503d2be0
AS
13986
13987int
13988main ()
13989{
73b77ee5
GM
13990 pid_t parent = getpid ();
13991 pid_t child;
fa0b693c 13992
19650fd6 13993 sparc_address_test (0);
fa0b693c 13994
73b77ee5 13995 child = vfork ();
fa0b693c 13996
73b77ee5 13997 if (child == 0) {
503d2be0
AS
13998 /* Here is another test for sparc vfork register problems. This
13999 test uses lots of local variables, at least as many local
14000 variables as main has allocated so far including compiler
14001 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
14002 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
14003 reuse the register of parent for one of the local variables,
14004 since it will think that parent can't possibly be used any more
14005 in this routine. Assigning to the local variable will thus
14006 munge parent in the parent process. */
73b77ee5
GM
14007 pid_t
14008 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
14009 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
14010 /* Convince the compiler that p..p7 are live; otherwise, it might
14011 use the same hardware register for all 8 local variables. */
14012 if (p != p1 || p != p2 || p != p3 || p != p4
14013 || p != p5 || p != p6 || p != p7)
14014 _exit(1);
fa0b693c 14015
503d2be0
AS
14016 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
14017 from child file descriptors. If the child closes a descriptor
14018 before it execs or exits, this munges the parent's descriptor
14019 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
14020 _exit(close(fileno(stdout)) != 0);
14021 } else {
14022 int status;
14023 struct stat st;
14024
14025 while (wait(&status) != child)
14026 ;
ca81d7a0 14027 return (
73b77ee5
GM
14028 /* Was there some problem with vforking? */
14029 child < 0
14030
14031 /* Did the child fail? (This shouldn't happen.) */
14032 || status
14033
14034 /* Did the vfork/compiler bug occur? */
14035 || parent != getpid()
fa0b693c 14036
73b77ee5
GM
14037 /* Did the file descriptor bug occur? */
14038 || fstat(fileno(stdout), &st) != 0
14039 );
14040 }
14041}
503d2be0 14042_ACEOF
eb697db5 14043if ac_fn_c_try_run "$LINENO"; then :
73b77ee5 14044 ac_cv_func_vfork_works=yes
fa0b693c 14045else
eb697db5 14046 ac_cv_func_vfork_works=no
503d2be0 14047fi
eb697db5
DN
14048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14049 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa0b693c 14050fi
ca81d7a0 14051
fa0b693c 14052fi
eb697db5 14053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
e9a63f04 14054$as_echo "$ac_cv_func_vfork_works" >&6; }
fa0b693c 14055
503d2be0
AS
14056fi;
14057if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 14058 ac_cv_func_vfork_works=$ac_cv_func_vfork
eb697db5 14059 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
e9a63f04 14060$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
14061fi
14062
503d2be0
AS
14063if test "x$ac_cv_func_vfork_works" = xyes; then
14064
eb697db5 14065$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
503d2be0
AS
14066
14067else
14068
eb697db5 14069$as_echo "#define vfork fork" >>confdefs.h
fa0b693c
GM
14070
14071fi
503d2be0
AS
14072if test "x$ac_cv_func_fork_works" = xyes; then
14073
eb697db5 14074$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fa0b693c 14075
503d2be0 14076fi
647847ea 14077
c0d27fcc 14078
eb697db5 14079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
e9a63f04 14080$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
eb697db5 14081if test "${emacs_cv_langinfo_codeset+set}" = set; then :
e9a63f04 14082 $as_echo_n "(cached) " >&6
6a3a24fa 14083else
eb697db5 14084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14085/* end confdefs.h. */
6a3a24fa
JD
14086#include <langinfo.h>
14087int
14088main ()
14089{
14090char* cs = nl_langinfo(CODESET);
6da23aaa
EZ
14091 ;
14092 return 0;
14093}
14094_ACEOF
eb697db5 14095if ac_fn_c_try_link "$LINENO"; then :
6da23aaa 14096 emacs_cv_langinfo_codeset=yes
bf89cb4d 14097else
eb697db5 14098 emacs_cv_langinfo_codeset=no
91e84f96 14099fi
eb697db5
DN
14100rm -f core conftest.err conftest.$ac_objext \
14101 conftest$ac_exeext conftest.$ac_ext
91e84f96
GM
14102
14103fi
eb697db5 14104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
91e84f96
GM
14105$as_echo "$emacs_cv_langinfo_codeset" >&6; }
14106if test $emacs_cv_langinfo_codeset = yes; then
14107
eb697db5 14108$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
e9a63f04 14109
8730a8da 14110fi
dc2933eb 14111
eb697db5
DN
14112ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
14113if test "x$ac_cv_type_size_t" = x""yes; then :
503d2be0 14114
c0d27fcc
MR
14115cat >>confdefs.h <<_ACEOF
14116#define HAVE_SIZE_T 1
14117_ACEOF
14118
8730a8da
DL
14119
14120fi
14121
c0d27fcc 14122
eb697db5 14123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
e9a63f04 14124$as_echo_n "checking for mbstate_t... " >&6; }
eb697db5 14125if test "${ac_cv_type_mbstate_t+set}" = set; then :
e9a63f04 14126 $as_echo_n "(cached) " >&6
973a76b1 14127else
eb697db5 14128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14129/* end confdefs.h. */
973a76b1
DL
14130$ac_includes_default
14131# include <wchar.h>
14132int
14133main ()
14134{
14135mbstate_t x; return sizeof x;
14136 ;
14137 return 0;
14138}
14139_ACEOF
eb697db5 14140if ac_fn_c_try_compile "$LINENO"; then :
973a76b1
DL
14141 ac_cv_type_mbstate_t=yes
14142else
eb697db5 14143 ac_cv_type_mbstate_t=no
973a76b1 14144fi
ca81d7a0 14145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 14146fi
eb697db5 14147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
e9a63f04 14148$as_echo "$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
14149 if test $ac_cv_type_mbstate_t = yes; then
14150
eb697db5 14151$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
973a76b1
DL
14152
14153 else
14154
eb697db5 14155$as_echo "#define mbstate_t int" >>confdefs.h
973a76b1
DL
14156
14157 fi
14158
eb697db5 14159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
e9a63f04 14160$as_echo_n "checking for C restrict keyword... " >&6; }
eb697db5 14161if test "${emacs_cv_c_restrict+set}" = set; then :
e9a63f04 14162 $as_echo_n "(cached) " >&6
22044edf 14163else
eb697db5 14164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14165/* end confdefs.h. */
22044edf
DL
14166void fred (int *restrict x);
14167int
14168main ()
14169{
b936fae4 14170
22044edf
DL
14171 ;
14172 return 0;
14173}
c0d27fcc 14174_ACEOF
eb697db5 14175if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
14176 emacs_cv_c_restrict=yes
14177else
eb697db5 14178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14179/* end confdefs.h. */
22044edf
DL
14180void fred (int *__restrict x);
14181int
14182main ()
14183{
c0d27fcc 14184
22044edf
DL
14185 ;
14186 return 0;
14187}
c0d27fcc 14188_ACEOF
eb697db5 14189if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
14190 emacs_cv_c_restrict=__restrict
14191else
eb697db5 14192 emacs_cv_c_restrict=no
ba4481b5 14193fi
ca81d7a0 14194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 14195fi
ca81d7a0 14196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 14197fi
eb697db5 14198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
e9a63f04 14199$as_echo "$emacs_cv_c_restrict" >&6; }
22044edf
DL
14200case "$emacs_cv_c_restrict" in
14201 yes) emacs_restrict=restrict;;
14202 no) emacs_restrict="";;
14203 *) emacs_restrict="$emacs_cv_c_restrict";;
14204esac
14205if test "$emacs_restrict" != __restrict; then
b936fae4 14206
22044edf
DL
14207cat >>confdefs.h <<_ACEOF
14208#define __restrict $emacs_restrict
c0d27fcc 14209_ACEOF
ba4481b5
DL
14210
14211fi
ba4481b5 14212
eb697db5 14213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
e9a63f04 14214$as_echo_n "checking for C restricted array declarations... " >&6; }
eb697db5 14215if test "${emacs_cv_c_restrict_arr+set}" = set; then :
e9a63f04 14216 $as_echo_n "(cached) " >&6
22044edf 14217else
eb697db5 14218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 14219/* end confdefs.h. */
22044edf
DL
14220void fred (int x[__restrict]);
14221int
14222main ()
14223{
b936fae4 14224
22044edf
DL
14225 ;
14226 return 0;
14227}
c0d27fcc 14228_ACEOF
eb697db5 14229if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
14230 emacs_cv_c_restrict_arr=yes
14231else
eb697db5 14232 emacs_cv_c_restrict_arr=no
ba4481b5 14233fi
ca81d7a0 14234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 14235fi
eb697db5 14236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
e9a63f04 14237$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22044edf 14238if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 14239
eb697db5 14240$as_echo "#define __restrict_arr __restrict" >>confdefs.h
ba4481b5 14241
ba4481b5
DL
14242fi
14243
c0d27fcc 14244
c0d27fcc 14245
22044edf
DL
14246# Set up the CFLAGS for real compilation, so we can substitute it.
14247CFLAGS="$REAL_CFLAGS"
14248CPPFLAGS="$REAL_CPPFLAGS"
14249
9978c06c
CY
14250## Hack to detect a buggy GCC version.
14251if test "x$GCC" = xyes \
14252 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
14253 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
14254 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
eb697db5 14255 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
9978c06c
CY
14256fi
14257
22044edf 14258#### Find out which version of Emacs this is.
8c5ff6dd 14259version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \
22044edf
DL
14260 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
14261if test x"${version}" = x; then
eb697db5 14262 as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5
22044edf 14263fi
879de935 14264if test x"${version}" != x"$PACKAGE_VERSION"; then
eb697db5 14265 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5
8c5ff6dd 14266$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;}
879de935 14267fi
22044edf
DL
14268
14269### Specify what sort of things we'll be editing into Makefile and config.h.
14270### Use configuration here uncanonicalized to avoid exceeding size limits.
14271
14272
4286c48d 14273## Unused?
22044edf
DL
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
4286c48d
GM
14294## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
14295## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
14296## end of LIBX_BASE, but nothing ever set it.
22044edf
DL
14297
14298
14299
14300
c82a7244 14301## Used in lwlib/Makefile.in.
22044edf
DL
14302
14303
14304
6a3a24fa 14305
06b62770
AR
14306
14307
14308
48fad8e8
DN
14309
14310
5e159d07
CY
14311
14312
edfda783 14313
22044edf
DL
14314cat >>confdefs.h <<_ACEOF
14315#define EMACS_CONFIGURATION "${canonical}"
14316_ACEOF
14317
14318
14319cat >>confdefs.h <<_ACEOF
14320#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22044edf
DL
14321_ACEOF
14322
14323
14324cat >>confdefs.h <<_ACEOF
22044edf 14325#define config_machfile "${machfile}"
22044edf
DL
14326_ACEOF
14327
14328
22044edf 14329cat >>confdefs.h <<_ACEOF
22044edf 14330#define config_opsysfile "${opsysfile}"
22044edf
DL
14331_ACEOF
14332
14333
e765bf58
JD
14334XMENU_OBJ=
14335XOBJ=
5929fbe7 14336FONT_OBJ=
22044edf
DL
14337if test "${HAVE_X_WINDOWS}" = "yes" ; then
14338
eb697db5 14339$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
22044edf 14340
e765bf58
JD
14341 XMENU_OBJ=xmenu.o
14342 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
5929fbe7
GM
14343 FONT_OBJ=xfont.o
14344 if test "$HAVE_XFT" = "yes"; then
14345 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
14346 elif test "$HAVE_FREETYPE" = "yes"; then
14347 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
14348 fi
14349
22044edf 14350fi
e765bf58
JD
14351
14352
14353
5929fbe7 14354
7186fb09 14355WIDGET_OBJ=
c82a7244 14356MOTIF_LIBW=
22044edf 14357if test "${USE_X_TOOLKIT}" != "none" ; then
7186fb09 14358 WIDGET_OBJ=widget.o
22044edf 14359
eb697db5 14360$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
22044edf 14361
39dd4d52 14362 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5 14363
eb697db5 14364$as_echo "#define USE_LUCID 1" >>confdefs.h
73d798d5 14365
39dd4d52 14366 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5 14367
eb697db5 14368$as_echo "#define USE_MOTIF 1" >>confdefs.h
73d798d5 14369
c82a7244
GM
14370 MOTIF_LIBW=-lXm
14371 case "$opsys" in
14372 gnu-linux)
14373 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
14374 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
14375 ;;
14376
14377 unixware)
14378 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
14379 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
14380 MOTIF_LIBW="MOTIF_LIBW -lXimp"
14381 ;;
14382
14383 aix4-2)
14384 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
14385 MOTIF_LIBW="$MOTIF_LIBW -li18n"
14386 ;;
14387 esac
14388 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
73d798d5 14389 fi
22044edf 14390fi
7186fb09 14391
c82a7244 14392
718a19c8 14393TOOLKIT_LIBW=
c82a7244
GM
14394case "$USE_X_TOOLKIT" in
14395 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
14396 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
718a19c8 14397 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
c82a7244
GM
14398esac
14399
14400
a5edbe4a
GM
14401if test "$USE_X_TOOLKIT" = "none"; then
14402 LIBXT_OTHER="\$(LIBXSM)"
8b44daa0 14403 OLDXMENU_TARGET="really-oldXMenu"
a5edbe4a
GM
14404else
14405 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
8b44daa0 14406 OLDXMENU_TARGET="really-lwlib"
a5edbe4a
GM
14407fi
14408
14409
718a19c8
GM
14410## The X Menu stuff is present in the X10 distribution, but missing
14411## from X11. If we have X10, just use the installed library;
14412## otherwise, use our own copy.
22044edf
DL
14413if test "${HAVE_X11}" = "yes" ; then
14414
eb697db5 14415$as_echo "#define HAVE_X11 1" >>confdefs.h
22044edf 14416
718a19c8
GM
14417
14418 if test "$USE_X_TOOLKIT" = "none"; then
14419 OLDXMENU="\${oldXMenudir}libXMenu11.a"
14420 else
14421 OLDXMENU="\${lwlibdir}liblw.a"
14422 fi
14423 LIBXMENU="\$(OLDXMENU)"
a5edbe4a 14424 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16455a85 14425 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
718a19c8 14426else
298b8a34
GM
14427 ## For a syntactically valid Makefile; not actually used for anything.
14428 ## See comments in src/Makefile.in.
14429 OLDXMENU=nothing
1dea46de
GM
14430 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
14431 if test "${HAVE_X_WINDOWS}" = "yes"; then
14432 LIBXMENU="-lXMenu"
14433 else
14434 LIBXMENU=
14435 fi
a5edbe4a 14436 LIBX_OTHER=
16455a85 14437 OLDXMENU_DEPS=
22044edf 14438fi
718a19c8 14439
4286c48d 14440if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
298b8a34
GM
14441 OLDXMENU_TARGET=
14442 OLDXMENU=nothing
718a19c8 14443 LIBXMENU=
16455a85 14444 OLDXMENU_DEPS=
22044edf 14445fi
718a19c8
GM
14446
14447
14448
14449
a5edbe4a 14450
16455a85 14451
298b8a34 14452
22044edf
DL
14453if test "${HAVE_MENUS}" = "yes" ; then
14454
eb697db5 14455$as_echo "#define HAVE_MENUS 1" >>confdefs.h
22044edf
DL
14456
14457fi
4f91d9c8 14458
22044edf
DL
14459if test "${GNU_MALLOC}" = "yes" ; then
14460
eb697db5 14461$as_echo "#define GNU_MALLOC 1" >>confdefs.h
22044edf
DL
14462
14463fi
4f91d9c8
GM
14464
14465RALLOC_OBJ=
22044edf
DL
14466if test "${REL_ALLOC}" = "yes" ; then
14467
eb697db5 14468$as_echo "#define REL_ALLOC 1" >>confdefs.h
22044edf 14469
4f91d9c8
GM
14470
14471 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
22044edf
DL
14472fi
14473
14474
718a19c8
GM
14475if test "$opsys" = "cygwin"; then
14476 CYGWIN_OBJ="sheap.o"
14477 ## Cygwin differs because of its unexec().
7acac9f4 14478 PRE_ALLOC_OBJ=
4f91d9c8 14479 POST_ALLOC_OBJ=lastfile.o
718a19c8
GM
14480else
14481 CYGWIN_OBJ=
7acac9f4 14482 PRE_ALLOC_OBJ=lastfile.o
4f91d9c8 14483 POST_ALLOC_OBJ=
718a19c8
GM
14484fi
14485
106c6f74 14486
22044edf
DL
14487
14488
c0d27fcc 14489
ede4834a
GM
14490case "$opsys" in
14491 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
14492
14493 darwin)
a0c06748
GM
14494 ## The -headerpad option tells ld (see man page) to leave room at the
14495 ## end of the header for adding load commands. Needed for dumping.
14496 ## 0x690 is the total size of 30 segment load commands (at 56
14497 ## each); under Cocoa 31 commands are required.
14498 if test "$HAVE_NS" = "yes"; then
14499 libs_nsgui="-framework AppKit"
14500 headerpad_extra=6C8
14501 else
14502 libs_nsgui=
14503 headerpad_extra=690
14504 fi
14505 LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
14506
14507 ## This is here because src/Makefile.in did some extra fiddling around
14508 ## with LD_SWITCH_SYSTEM. The cpp logic was:
14509 ## #ifndef LD_SWITCH_SYSTEM
14510 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
14511 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
14512 ## not using gcc, darwin system not on an alpha (ie darwin, since
14513 ## darwin + alpha does not occur).
14514 ## Because this was done in src/Makefile.in, the resulting part of
14515 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
14516 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
14517 ## rather than LD_SWITCH_SYSTEM.
14518 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
14519 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
14520 ;;
14521
14522 ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
14523 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
14524 ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
14525 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
14526 ## had different values in configure (in ac_link) and src/Makefile.in.
14527 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
14528 gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
ede4834a
GM
14529
14530 *) LD_SWITCH_SYSTEM_TEMACS= ;;
14531esac
14532
a25e81b3 14533if test "$NS_IMPL_GNUSTEP" = "yes"; then
7dddde4b
GM
14534 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
14535fi
ede4834a
GM
14536
14537
ede4834a
GM
14538
14539
ebbc2619
GM
14540LINKER=
14541ORDINARY_LINK=
14542case "$opsys" in
14543 ## gnu: GNU needs its own crt0.
b84fc05a 14544 aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
ebbc2619
GM
14545
14546 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
14547 ## library search parth, i.e. it won't search /usr/lib for libc and
14548 ## friends. Using -nostartfiles instead avoids this problem, and
14549 ## will also work on earlier NetBSD releases.
14550 netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;;
14551
14552 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
14553 ## MkLinux/LinuxPPC needs this.
14554 ## ibms390x only supports opsys = gnu-linux so it can be added here.
14555 gnu-*)
14556 case "$machine" in
14557 macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;;
14558 esac
14559 ;;
14560esac
14561
90278cb6 14562
ebbc2619
GM
14563if test "x$ORDINARY_LINK" = "xyes"; then
14564
14565 LINKER="\$(CC)"
14566
eb697db5 14567$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
ebbc2619
GM
14568
14569
14570## The system files defining neither ORDINARY_LINK nor LINKER are:
b84fc05a 14571## freebsd, gnu-* not on macppc|ibms390x.
ebbc2619
GM
14572elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
14573
14574 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
14575 ## places that are difficult to figure out at make time. Fortunately,
14576 ## these same versions allow you to pass arbitrary flags on to the
14577 ## linker, so there is no reason not to use it as a linker.
14578 ##
14579 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
14580 ## searching for libraries in its internal directories, so we have to
14581 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
14582 LINKER="\$(CC) -nostdlib"
e6df49e4
GM
14583fi
14584
ebbc2619 14585test "x$LINKER" = "x" && LINKER=ld
81ac4f35 14586## FIXME? What setting of EDIT_LDFLAGS should this have?
ebbc2619
GM
14587test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
14588
14589
14590
14591
81ac4f35
GM
14592## FIXME? The logic here is not precisely the same as that above.
14593## There is no check here for a pre-defined LINKER.
14594## Should we only be setting LIB_GCC if LD ~ -nostdlib?
057886a3 14595LIB_GCC=
ebbc2619 14596if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
057886a3
GM
14597
14598 case "$opsys" in
12a25125 14599 freebsd|netbsd|openbsd) LIB_GCC= ;;
057886a3
GM
14600
14601 gnu-*)
14602 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
14603 ## build on ARM EABI under GNU/Linux. (Bug#5518)
14604 ## Note that m/arm.h never bothered to undefine LIB_GCC first.
14605 if test "$machine" = "arm"; then
14606 LIB_GCC="-lgcc_s"
14607 else
14608 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
14609 ## immediately undefine it again and redefine it to empty.
14610 ## Was the C_SWITCH_X_SITE part really necessary?
3536f993 14611## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
057886a3
GM
14612 LIB_GCC=
14613 fi
14614 ;;
14615
14616 ## Ask GCC where to find libgcc.a.
3536f993 14617 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
057886a3
GM
14618 esac
14619fi
14620
14621
372b4090
GM
14622TOOLTIP_SUPPORT=
14623WINDOW_SUPPORT=
14624## If we're using X11/GNUstep, define some consequences.
14625if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
14626
eb697db5 14627$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
372b4090
GM
14628
14629
eb697db5 14630$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
372b4090
GM
14631
14632 MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
14633 TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
14634
14635 WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
14636 test "$HAVE_X_WINDOWS" = "yes" && \
14637 WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
14638
14639fi
14640
14641
14642
22044edf 14643
c0d27fcc 14644
91e84f96
GM
14645
14646
ba4481b5 14647#### Report on what we decided to do.
488dd4c4
JD
14648#### Report GTK as a toolkit, even if it doesn't use Xt.
14649#### It makes printing result more understandable as using GTK sets
14650#### toolkit_scroll_bars to yes by default.
14651if test "${HAVE_GTK}" = "yes"; then
14652 USE_X_TOOLKIT=GTK
14653fi
14654
ba4481b5
DL
14655echo "
14656Configured for \`${canonical}'.
14657
14658 Where should the build process find the source code? ${srcdir}
14659 What operating system and machine description files should Emacs use?
14660 \`${opsysfile}' and \`${machfile}'
14661 What compiler should emacs be built with? ${CC} ${CFLAGS}
14662 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 14663 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 14664 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 14665 What window system should Emacs use? ${window_system}
8e967cf7 14666 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
14667
14668if test -n "${x_includes}"; then
14669echo " Where do we find X Windows header files? ${x_includes}"
14670else
14671echo " Where do we find X Windows header files? Standard dirs"
14672fi
14673if test -n "${x_libraries}"; then
14674echo " Where do we find X Windows libraries? ${x_libraries}"
14675else
14676echo " Where do we find X Windows libraries? Standard dirs"
14677fi
14678
14679echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
14680echo " Does Emacs use -lXpm? ${HAVE_XPM}"
14681echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
14682echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
91e84f96 14683echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
ba4481b5 14684echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 14685echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
3de25479 14686echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}"
79011b82 14687echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 14688echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
637fa988 14689echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
022c122a 14690echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
2ee27f27 14691
edfda783
AR
14692echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
14693echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
14694echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
14695echo " Does Emacs use -lxft? ${HAVE_XFT}"
14696
8d87199b 14697echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
14698echo
14699
d0098f13
JD
14700if test $USE_XASSERTS = yes; then
14701 echo " Compiling with asserts turned on."
d0098f13 14702 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 14703fi
05cf15c6 14704
ca34d75a
JD
14705echo
14706
06b62770
AR
14707if test "$HAVE_NS" = "yes"; then
14708 echo
14709 echo "You must run \"make install\" in order to test the built application.
14710The installed application will go to nextstep/Emacs.app and can be
14711run or moved from there."
14712 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
14713 echo "The application will be fully self-contained."
14714 else
14715 echo "The lisp resources for the application will be installed under ${prefix}.
14716You may need to run \"make install\" with sudo. The application will fail
14717to run if these resources are not installed."
14718 fi
14719 echo
14720fi
14721
131e4133
MA
14722if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
14723 echo "D-Bus integration has been tested for GNU/Linux only."
14724 echo
14725fi
14726
05cf15c6 14727
ba4481b5
DL
14728# Remove any trailing slashes in these variables.
14729test "${prefix}" != NONE &&
14730 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
14731test "${exec_prefix}" != NONE &&
14732 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
14733
81ac4f35 14734ac_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
14735
14736ac_config_commands="$ac_config_commands default"
14737
503d2be0 14738cat >confcache <<\_ACEOF
ba4481b5
DL
14739# This file is a shell script that caches the results of configure
14740# tests run on this system so they can be shared between configure
503d2be0
AS
14741# scripts and configure runs, see configure's option --config-cache.
14742# It is not useful on other systems. If it contains results you don't
14743# want to keep, you may remove or edit it.
ba4481b5 14744#
503d2be0
AS
14745# config.status only pays attention to the cache file if you give it
14746# the --recheck option to rerun configure.
ba4481b5 14747#
6bae0ccf 14748# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
14749# loading this file, other *unset* `ac_cv_foo' will be assigned the
14750# following values.
14751
14752_ACEOF
14753
ba4481b5
DL
14754# The following way of writing the cache mishandles newlines in values,
14755# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 14756# So, we kill variables containing newlines.
ba4481b5
DL
14757# Ultrix sh set writes to stderr and can't be redirected directly,
14758# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
14759(
14760 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14761 eval ac_val=\$$ac_var
14762 case $ac_val in #(
14763 *${as_nl}*)
14764 case $ac_var in #(
eb697db5 14765 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3de25479 14766$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
14767 esac
14768 case $ac_var in #(
14769 _ | IFS | as_nl) ;; #(
e9a63f04 14770 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
eb697db5 14771 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
14772 esac ;;
14773 esac
14774 done
14775
503d2be0 14776 (set) 2>&1 |
ca81d7a0
JD
14777 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14778 *${as_nl}ac_space=\ *)
eb697db5
DN
14779 # `set' does not quote correctly, so add quotes: double-quote
14780 # substitution turns \\\\ into \\, and sed turns \\ into \.
503d2be0 14781 sed -n \
edfaf76d
LK
14782 "s/'/'\\\\''/g;
14783 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 14784 ;; #(
503d2be0
AS
14785 *)
14786 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 14787 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 14788 ;;
ca81d7a0
JD
14789 esac |
14790 sort
14791) |
503d2be0 14792 sed '
ca81d7a0 14793 /^ac_cv_env_/b end
503d2be0 14794 t clear
ca81d7a0 14795 :clear
503d2be0
AS
14796 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14797 t end
ca81d7a0
JD
14798 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14799 :end' >>confcache
14800if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14801 if test -w "$cache_file"; then
14802 test "x$cache_file" != "x/dev/null" &&
eb697db5 14803 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
e9a63f04 14804$as_echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 14805 cat confcache >$cache_file
ba4481b5 14806 else
eb697db5 14807 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
e9a63f04 14808$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
14809 fi
14810fi
14811rm -f confcache
14812
ba4481b5
DL
14813test "x$prefix" = xNONE && prefix=$ac_default_prefix
14814# Let make expand exec_prefix.
14815test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14816
ba4481b5
DL
14817DEFS=-DHAVE_CONFIG_H
14818
6bae0ccf
DL
14819ac_libobjs=
14820ac_ltlibobjs=
14821for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14822 # 1. Remove the extension, and $U if already installed.
ca81d7a0 14823 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 14824 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
14825 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14826 # will be set to the directory where LIBOBJS objects are built.
eb697db5
DN
14827 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14828 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
14829done
14830LIBOBJS=$ac_libobjs
14831
14832LTLIBOBJS=$ac_ltlibobjs
14833
14834
c0d27fcc 14835
671d409f 14836
ba4481b5 14837: ${CONFIG_STATUS=./config.status}
e9a63f04 14838ac_write_fail=0
503d2be0
AS
14839ac_clean_files_save=$ac_clean_files
14840ac_clean_files="$ac_clean_files $CONFIG_STATUS"
eb697db5 14841{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 14842$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
eb697db5
DN
14843as_write_fail=0
14844cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 14845#! $SHELL
c0d27fcc 14846# Generated by $as_me.
ba4481b5 14847# Run this file to recreate the current configuration.
ba4481b5 14848# Compiler output produced by configure, useful for debugging
503d2be0 14849# configure, is in config.log if it exists.
ba4481b5 14850
503d2be0 14851debug=false
19650fd6
AS
14852ac_cs_recheck=false
14853ac_cs_silent=false
91e84f96 14854
eb697db5
DN
14855SHELL=\${CONFIG_SHELL-$SHELL}
14856export SHELL
14857_ASEOF
14858cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14859## -------------------- ##
14860## M4sh Initialization. ##
14861## -------------------- ##
c0d27fcc 14862
f053c89f
CY
14863# Be more Bourne compatible
14864DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 14865if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
14866 emulate sh
14867 NULLCMD=:
e9a63f04 14868 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
14869 # is contrary to our usage. Disable this feature.
14870 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
14871 setopt NO_GLOB_SUBST
14872else
eb697db5
DN
14873 case `(set -o) 2>/dev/null` in #(
14874 *posix*) :
14875 set -o posix ;; #(
14876 *) :
14877 ;;
f053c89f 14878esac
503d2be0 14879fi
f053c89f
CY
14880
14881
e9a63f04
GM
14882as_nl='
14883'
14884export as_nl
14885# Printing a long string crashes Solaris 7 /usr/bin/printf.
14886as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14887as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14888as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
14889# Prefer a ksh shell builtin over an external printf program on Solaris,
14890# but without wasting forks for bash or zsh.
14891if test -z "$BASH_VERSION$ZSH_VERSION" \
14892 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14893 as_echo='print -r --'
14894 as_echo_n='print -rn --'
14895elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
14896 as_echo='printf %s\n'
14897 as_echo_n='printf %s'
14898else
14899 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14900 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14901 as_echo_n='/usr/ucb/echo -n'
7bbec45b 14902 else
e9a63f04
GM
14903 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14904 as_echo_n_body='eval
14905 arg=$1;
eb697db5 14906 case $arg in #(
e9a63f04
GM
14907 *"$as_nl"*)
14908 expr "X$arg" : "X\\(.*\\)$as_nl";
14909 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14910 esac;
14911 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14912 '
14913 export as_echo_n_body
14914 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 14915 fi
e9a63f04
GM
14916 export as_echo_body
14917 as_echo='sh -c $as_echo_body as_echo'
14918fi
14919
14920# The user is always right.
14921if test "${PATH_SEPARATOR+set}" != set; then
14922 PATH_SEPARATOR=:
14923 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14924 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14925 PATH_SEPARATOR=';'
14926 }
503d2be0
AS
14927fi
14928
6bae0ccf 14929
ca81d7a0
JD
14930# IFS
14931# We need space, tab and new line, in precisely that order. Quoting is
14932# there to prevent editors from complaining about space-tab.
14933# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14934# splitting by setting IFS to empty value.)
ca81d7a0
JD
14935IFS=" "" $as_nl"
14936
14937# Find who we are. Look in the path if we contain no directory separator.
eb697db5 14938case $0 in #((
ca81d7a0
JD
14939 *[\\/]* ) as_myself=$0 ;;
14940 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14941for as_dir in $PATH
14942do
14943 IFS=$as_save_IFS
14944 test -z "$as_dir" && as_dir=.
eb697db5
DN
14945 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14946 done
ca81d7a0
JD
14947IFS=$as_save_IFS
14948
14949 ;;
14950esac
14951# We did not find ourselves, most probably we were run as `sh COMMAND'
14952# in which case we are not to be found in the path.
14953if test "x$as_myself" = x; then
14954 as_myself=$0
14955fi
14956if test ! -f "$as_myself"; then
e9a63f04 14957 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 14958 exit 1
ca81d7a0
JD
14959fi
14960
eb697db5
DN
14961# Unset variables that we do not need and which cause bugs (e.g. in
14962# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14963# suppresses any "Segmentation fault" message there. '((' could
14964# trigger a bug in pdksh 5.2.14.
14965for as_var in BASH_ENV ENV MAIL MAILPATH
14966do eval test x\${$as_var+set} = xset \
14967 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 14968done
6bae0ccf
DL
14969PS1='$ '
14970PS2='> '
14971PS4='+ '
14972
14973# NLS nuisances.
e9a63f04
GM
14974LC_ALL=C
14975export LC_ALL
14976LANGUAGE=C
14977export LANGUAGE
6bae0ccf 14978
eb697db5
DN
14979# CDPATH.
14980(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14981
14982
14983# as_fn_error ERROR [LINENO LOG_FD]
14984# ---------------------------------
14985# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14986# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14987# script with status $?, using 1 if that was 0.
14988as_fn_error ()
14989{
14990 as_status=$?; test $as_status -eq 0 && as_status=1
14991 if test "$3"; then
14992 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14993 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14994 fi
14995 $as_echo "$as_me: error: $1" >&2
14996 as_fn_exit $as_status
14997} # as_fn_error
14998
14999
15000# as_fn_set_status STATUS
15001# -----------------------
15002# Set $? to STATUS, without forking.
15003as_fn_set_status ()
15004{
15005 return $1
15006} # as_fn_set_status
15007
15008# as_fn_exit STATUS
15009# -----------------
15010# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15011as_fn_exit ()
15012{
15013 set +e
15014 as_fn_set_status $1
15015 exit $1
15016} # as_fn_exit
15017
15018# as_fn_unset VAR
15019# ---------------
15020# Portably unset VAR.
15021as_fn_unset ()
15022{
15023 { eval $1=; unset $1;}
15024}
15025as_unset=as_fn_unset
15026# as_fn_append VAR VALUE
15027# ----------------------
15028# Append the text in VALUE to the end of the definition contained in VAR. Take
15029# advantage of any shell optimizations that allow amortized linear growth over
15030# repeated appends, instead of the typical quadratic growth present in naive
15031# implementations.
15032if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15033 eval 'as_fn_append ()
15034 {
15035 eval $1+=\$2
15036 }'
15037else
15038 as_fn_append ()
15039 {
15040 eval $1=\$$1\$2
15041 }
15042fi # as_fn_append
15043
15044# as_fn_arith ARG...
15045# ------------------
15046# Perform arithmetic evaluation on the ARGs, and store the result in the
15047# global $as_val. Take advantage of shells that can avoid forks. The arguments
15048# must be portable across $(()) and expr.
15049if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15050 eval 'as_fn_arith ()
15051 {
15052 as_val=$(( $* ))
15053 }'
15054else
15055 as_fn_arith ()
15056 {
15057 as_val=`expr "$@" || test $? -eq 1`
15058 }
15059fi # as_fn_arith
15060
15061
ca81d7a0
JD
15062if expr a : '\(a\)' >/dev/null 2>&1 &&
15063 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
15064 as_expr=expr
15065else
15066 as_expr=false
15067fi
15068
ca81d7a0 15069if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
15070 as_basename=basename
15071else
15072 as_basename=false
15073fi
c0d27fcc 15074
eb697db5
DN
15075if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15076 as_dirname=dirname
15077else
15078 as_dirname=false
15079fi
c0d27fcc 15080
ca81d7a0 15081as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
15082$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15083 X"$0" : 'X\(//\)$' \| \
ca81d7a0 15084 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 15085$as_echo X/"$0" |
ca81d7a0
JD
15086 sed '/^.*\/\([^/][^/]*\)\/*$/{
15087 s//\1/
15088 q
15089 }
15090 /^X\/\(\/\/\)$/{
15091 s//\1/
15092 q
15093 }
15094 /^X\/\(\/\).*/{
15095 s//\1/
15096 q
15097 }
15098 s/.*/./; q'`
c0d27fcc 15099
eb697db5
DN
15100# Avoid depending upon Character Ranges.
15101as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15102as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15103as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15104as_cr_digits='0123456789'
15105as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
15106
15107ECHO_C= ECHO_N= ECHO_T=
eb697db5 15108case `echo -n x` in #(((((
ca81d7a0 15109-n*)
eb697db5 15110 case `echo 'xy\c'` in
ca81d7a0 15111 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
eb697db5
DN
15112 xy) ECHO_C='\c';;
15113 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15114 ECHO_T=' ';;
ca81d7a0
JD
15115 esac;;
15116*)
15117 ECHO_N='-n';;
c0d27fcc 15118esac
503d2be0
AS
15119
15120rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
15121if test -d conf$$.dir; then
15122 rm -f conf$$.dir/conf$$.file
15123else
15124 rm -f conf$$.dir
e9a63f04
GM
15125 mkdir conf$$.dir 2>/dev/null
15126fi
15127if (echo >conf$$.file) 2>/dev/null; then
15128 if ln -s conf$$.file conf$$ 2>/dev/null; then
15129 as_ln_s='ln -s'
15130 # ... but there are two gotchas:
15131 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15132 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
15133 # In both cases, we have to default to `cp -p'.
15134 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
15135 as_ln_s='cp -p'
15136 elif ln conf$$.file conf$$ 2>/dev/null; then
15137 as_ln_s=ln
15138 else
503d2be0 15139 as_ln_s='cp -p'
e9a63f04 15140 fi
503d2be0
AS
15141else
15142 as_ln_s='cp -p'
15143fi
ca81d7a0
JD
15144rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15145rmdir conf$$.dir 2>/dev/null
503d2be0 15146
eb697db5
DN
15147
15148# as_fn_mkdir_p
15149# -------------
15150# Create "$as_dir" as a directory, including parents if necessary.
15151as_fn_mkdir_p ()
15152{
15153
15154 case $as_dir in #(
15155 -*) as_dir=./$as_dir;;
15156 esac
15157 test -d "$as_dir" || eval $as_mkdir_p || {
15158 as_dirs=
15159 while :; do
15160 case $as_dir in #(
15161 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15162 *) as_qdir=$as_dir;;
15163 esac
15164 as_dirs="'$as_qdir' $as_dirs"
15165 as_dir=`$as_dirname -- "$as_dir" ||
15166$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15167 X"$as_dir" : 'X\(//\)[^/]' \| \
15168 X"$as_dir" : 'X\(//\)$' \| \
15169 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15170$as_echo X"$as_dir" |
15171 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15172 s//\1/
15173 q
15174 }
15175 /^X\(\/\/\)[^/].*/{
15176 s//\1/
15177 q
15178 }
15179 /^X\(\/\/\)$/{
15180 s//\1/
15181 q
15182 }
15183 /^X\(\/\).*/{
15184 s//\1/
15185 q
15186 }
15187 s/.*/./; q'`
15188 test -d "$as_dir" && break
15189 done
15190 test -z "$as_dirs" || eval "mkdir $as_dirs"
15191 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
15192
15193
15194} # as_fn_mkdir_p
6bae0ccf 15195if mkdir -p . 2>/dev/null; then
eb697db5 15196 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 15197else
edfaf76d 15198 test -d ./-p && rmdir ./-p
6bae0ccf
DL
15199 as_mkdir_p=false
15200fi
15201
f053c89f
CY
15202if test -x / >/dev/null 2>&1; then
15203 as_test_x='test -x'
ca81d7a0 15204else
f053c89f
CY
15205 if ls -dL / >/dev/null 2>&1; then
15206 as_ls_L_option=L
15207 else
15208 as_ls_L_option=
15209 fi
15210 as_test_x='
15211 eval sh -c '\''
15212 if test -d "$1"; then
e9a63f04 15213 test -d "$1/.";
f053c89f 15214 else
eb697db5 15215 case $1 in #(
e9a63f04 15216 -*)set "./$1";;
f053c89f 15217 esac;
eb697db5 15218 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
15219 ???[sx]*):;;*)false;;esac;fi
15220 '\'' sh
15221 '
ca81d7a0 15222fi
f053c89f 15223as_executable_p=$as_test_x
503d2be0 15224
c0d27fcc 15225# Sed expression to map a string onto a valid CPP name.
edfaf76d 15226as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
15227
15228# Sed expression to map a string onto a valid variable name.
edfaf76d 15229as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 15230
503d2be0 15231
503d2be0 15232exec 6>&1
eb697db5
DN
15233## ----------------------------------- ##
15234## Main body of $CONFIG_STATUS script. ##
15235## ----------------------------------- ##
15236_ASEOF
15237test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 15238
eb697db5
DN
15239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15240# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 15241# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
15242# values after options handling.
15243ac_log="
49a62e8a 15244This file was extended by emacs $as_me 24.0.50, which was
eb697db5 15245generated by GNU Autoconf 2.65. Invocation command line was
c0d27fcc
MR
15246
15247 CONFIG_FILES = $CONFIG_FILES
15248 CONFIG_HEADERS = $CONFIG_HEADERS
15249 CONFIG_LINKS = $CONFIG_LINKS
15250 CONFIG_COMMANDS = $CONFIG_COMMANDS
15251 $ $0 $@
15252
ca81d7a0
JD
15253on `(hostname || uname -n) 2>/dev/null | sed 1q`
15254"
15255
503d2be0
AS
15256_ACEOF
15257
3de25479
JV
15258case $ac_config_files in *"
15259"*) set x $ac_config_files; shift; ac_config_files=$*;;
15260esac
15261
15262case $ac_config_headers in *"
15263"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15264esac
15265
15266
e9a63f04 15267cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 15268# Files that config.status was made for.
ca81d7a0
JD
15269config_files="$ac_config_files"
15270config_headers="$ac_config_headers"
15271config_commands="$ac_config_commands"
503d2be0 15272
ca81d7a0 15273_ACEOF
503d2be0 15274
e9a63f04 15275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 15276ac_cs_usage="\
eb697db5
DN
15277\`$as_me' instantiates files and other configuration actions
15278from templates according to the current configuration. Unless the files
15279and actions are specified as TAGs, all are instantiated by default.
503d2be0 15280
eb697db5 15281Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
15282
15283 -h, --help print this help, then exit
f053c89f 15284 -V, --version print version number and configuration settings, then exit
eb697db5 15285 --config print configuration, then exit
3de25479
JV
15286 -q, --quiet, --silent
15287 do not print progress messages
503d2be0
AS
15288 -d, --debug don't remove temporary files
15289 --recheck update $as_me by reconfiguring in the same conditions
3de25479 15290 --file=FILE[:TEMPLATE]
e9a63f04 15291 instantiate the configuration file FILE
3de25479 15292 --header=FILE[:TEMPLATE]
e9a63f04 15293 instantiate the configuration header FILE
503d2be0
AS
15294
15295Configuration files:
15296$config_files
15297
15298Configuration headers:
15299$config_headers
15300
15301Configuration commands:
15302$config_commands
15303
eb697db5 15304Report bugs to the package provider."
503d2be0 15305
ca81d7a0 15306_ACEOF
e9a63f04 15307cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
eb697db5 15308ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 15309ac_cs_version="\\
49a62e8a 15310emacs config.status 24.0.50
eb697db5
DN
15311configured by $0, generated by GNU Autoconf 2.65,
15312 with options \\"\$ac_cs_config\\"
503d2be0 15313
eb697db5 15314Copyright (C) 2009 Free Software Foundation, Inc.
503d2be0
AS
15315This config.status script is free software; the Free Software Foundation
15316gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
15317
15318ac_pwd='$ac_pwd'
15319srcdir='$srcdir'
15320INSTALL='$INSTALL'
e9a63f04 15321test -n "\$AWK" || AWK=awk
c0d27fcc 15322_ACEOF
503d2be0 15323
e9a63f04
GM
15324cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15325# The default lists apply if the user does not specify any file.
503d2be0
AS
15326ac_need_defaults=:
15327while test $# != 0
ba4481b5 15328do
503d2be0
AS
15329 case $1 in
15330 --*=*)
ca81d7a0
JD
15331 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15332 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
15333 ac_shift=:
15334 ;;
ca81d7a0 15335 *)
6bae0ccf
DL
15336 ac_option=$1
15337 ac_optarg=$2
15338 ac_shift=shift
503d2be0 15339 ;;
503d2be0
AS
15340 esac
15341
6bae0ccf 15342 case $ac_option in
503d2be0 15343 # Handling of the options.
19650fd6
AS
15344 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15345 ac_cs_recheck=: ;;
ca81d7a0 15346 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 15347 $as_echo "$ac_cs_version"; exit ;;
eb697db5
DN
15348 --config | --confi | --conf | --con | --co | --c )
15349 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 15350 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
15351 debug=: ;;
15352 --file | --fil | --fi | --f )
6bae0ccf 15353 $ac_shift
e9a63f04
GM
15354 case $ac_optarg in
15355 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15356 esac
eb697db5 15357 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
15358 ac_need_defaults=false;;
15359 --header | --heade | --head | --hea )
6bae0ccf 15360 $ac_shift
e9a63f04
GM
15361 case $ac_optarg in
15362 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15363 esac
eb697db5 15364 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 15365 ac_need_defaults=false;;
ca81d7a0
JD
15366 --he | --h)
15367 # Conflict between --help and --header
eb697db5
DN
15368 as_fn_error "ambiguous option: \`$1'
15369Try \`$0 --help' for more information.";;
ca81d7a0 15370 --help | --hel | -h )
e9a63f04 15371 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
15372 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15373 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15374 ac_cs_silent=: ;;
503d2be0
AS
15375
15376 # This is an error.
eb697db5
DN
15377 -*) as_fn_error "unrecognized option: \`$1'
15378Try \`$0 --help' for more information." ;;
503d2be0 15379
eb697db5 15380 *) as_fn_append ac_config_targets " $1"
ca81d7a0 15381 ac_need_defaults=false ;;
503d2be0 15382
ba4481b5 15383 esac
503d2be0 15384 shift
ba4481b5
DL
15385done
15386
19650fd6
AS
15387ac_configure_extra_args=
15388
15389if $ac_cs_silent; then
15390 exec 6>/dev/null
15391 ac_configure_extra_args="$ac_configure_extra_args --silent"
15392fi
15393
15394_ACEOF
e9a63f04 15395cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 15396if \$ac_cs_recheck; then
e9a63f04
GM
15397 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15398 shift
15399 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15400 CONFIG_SHELL='$SHELL'
ca81d7a0 15401 export CONFIG_SHELL
e9a63f04 15402 exec "\$@"
19650fd6
AS
15403fi
15404
503d2be0 15405_ACEOF
e9a63f04 15406cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15407exec 5>>config.log
15408{
15409 echo
15410 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15411## Running $as_me. ##
15412_ASBOX
e9a63f04 15413 $as_echo "$ac_log"
ca81d7a0 15414} >&5
ba4481b5 15415
ca81d7a0 15416_ACEOF
e9a63f04 15417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 15418#
ca81d7a0 15419# INIT-COMMANDS
503d2be0 15420#
81ac4f35 15421GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
503d2be0 15422
c0d27fcc
MR
15423_ACEOF
15424
e9a63f04 15425cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15426
15427# Handling of arguments.
503d2be0
AS
15428for ac_config_target in $ac_config_targets
15429do
ca81d7a0
JD
15430 case $ac_config_target in
15431 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
15432 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
981f8c13 15433 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
ca81d7a0 15434 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
15435 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
15436 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
15437 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
15438 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
81ac4f35 15439 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
f657c21b 15440 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 15441 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
15442 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
15443 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15444
eb697db5 15445 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 15446 esac
ba4481b5 15447done
503d2be0 15448
ca81d7a0 15449
503d2be0
AS
15450# If the user did not use the arguments to specify the items to instantiate,
15451# then the envvar interface is used. Set only those that are not.
15452# We use the long form for the default assignment because of an extremely
15453# bizarre bug on SunOS 4.1.3.
15454if $ac_need_defaults; then
15455 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15456 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15457 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 15458fi
503d2be0 15459
19650fd6 15460# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 15461# simply because there is no reason against having it here, and in addition,
19650fd6 15462# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
15463# Hook for its removal unless debugging.
15464# Note that there is a small window in which the directory will not be cleaned:
15465# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
15466$debug ||
15467{
ca81d7a0
JD
15468 tmp=
15469 trap 'exit_status=$?
15470 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15471' 0
eb697db5 15472 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 15473}
503d2be0 15474# Create a (secure) tmp directory for tmp files.
19650fd6 15475
503d2be0 15476{
ca81d7a0 15477 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
15478 test -n "$tmp" && test -d "$tmp"
15479} ||
15480{
ca81d7a0
JD
15481 tmp=./conf$$-$RANDOM
15482 (umask 077 && mkdir "$tmp")
eb697db5 15483} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 15484
e9a63f04
GM
15485# Set up the scripts for CONFIG_FILES section.
15486# No need to generate them if there are no CONFIG_FILES.
15487# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
15488if test -n "$CONFIG_FILES"; then
15489
648b8e6d
GM
15490if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15491 ac_cs_awk_getline=:
15492 ac_cs_awk_pipe_init=
15493 ac_cs_awk_read_file='
15494 while ((getline aline < (F[key])) > 0)
15495 print(aline)
15496 close(F[key])'
15497 ac_cs_awk_pipe_fini=
15498else
15499 ac_cs_awk_getline=false
15500 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15501 ac_cs_awk_read_file='
15502 print "|#_!!_#|"
15503 print "cat " F[key] " &&"
15504 '$ac_cs_awk_pipe_init
15505 # The final `:' finishes the AND list.
15506 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15507fi
eb697db5
DN
15508ac_cr=`echo X | tr X '\015'`
15509# On cygwin, bash can eat \r inside `` if the user requested igncr.
15510# But we know of no other shell where ac_cr would be empty at this
15511# point, so we can use a bashism as a fallback.
15512if test "x$ac_cr" = x; then
15513 eval ac_cr=\$\'\\r\'
15514fi
e9a63f04
GM
15515ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15516if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
eb697db5 15517 ac_cs_awk_cr='\r'
e9a63f04
GM
15518else
15519 ac_cs_awk_cr=$ac_cr
ca81d7a0 15520fi
503d2be0 15521
e9a63f04 15522echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 15523_ACEOF
503d2be0 15524
648b8e6d
GM
15525# Create commands to substitute file output variables.
15526{
15527 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15528 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15529 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15530 echo "_ACAWK" &&
15531 echo "_ACEOF"
15532} >conf$$files.sh &&
15533. ./conf$$files.sh ||
eb697db5 15534 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
648b8e6d 15535rm -f conf$$files.sh
ca81d7a0 15536
e9a63f04
GM
15537{
15538 echo "cat >conf$$subs.awk <<_ACEOF" &&
15539 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15540 echo "_ACEOF"
15541} >conf$$subs.sh ||
eb697db5 15542 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15543ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ca81d7a0
JD
15544ac_delim='%!_!# '
15545for ac_last_try in false false false false false :; do
e9a63f04 15546 . ./conf$$subs.sh ||
eb697db5 15547 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15548
3de25479
JV
15549 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15550 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
15551 break
15552 elif $ac_last_try; then
eb697db5 15553 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
15554 else
15555 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 15556 fi
ca81d7a0 15557done
e9a63f04
GM
15558rm -f conf$$subs.sh
15559
15560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15561cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15562_ACEOF
15563sed -n '
15564h
15565s/^/S["/; s/!.*/"]=/
15566p
15567g
15568s/^[^!]*!//
15569:repl
15570t repl
15571s/'"$ac_delim"'$//
15572t delim
15573:nl
15574h
eb697db5 15575s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15576t more1
15577s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15578p
15579n
15580b repl
15581:more1
15582s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15583p
15584g
15585s/.\{148\}//
15586t nl
15587:delim
15588h
eb697db5 15589s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15590t more2
15591s/["\\]/\\&/g; s/^/"/; s/$/"/
15592p
15593b
15594:more2
15595s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15596p
15597g
15598s/.\{148\}//
15599t delim
15600' <conf$$subs.awk | sed '
15601/^[^""]/{
15602 N
15603 s/\n//
15604}
15605' >>$CONFIG_STATUS || ac_write_fail=1
15606rm -f conf$$subs.awk
15607cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15608_ACAWK
15609cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15610 for (key in S) S_is_set[key] = 1
15611 FS = "\a"
648b8e6d 15612 \$ac_cs_awk_pipe_init
e9a63f04
GM
15613}
15614{
15615 line = $ 0
15616 nfields = split(line, field, "@")
15617 substed = 0
15618 len = length(field[1])
15619 for (i = 2; i < nfields; i++) {
15620 key = field[i]
15621 keylen = length(key)
15622 if (S_is_set[key]) {
15623 value = S[key]
15624 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15625 len += length(value) + length(field[++i])
15626 substed = 1
15627 } else
15628 len += 1 + keylen
15629 }
648b8e6d
GM
15630 if (nfields == 3 && !substed) {
15631 key = field[2]
15632 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15633 \$ac_cs_awk_read_file
15634 next
15635 }
15636 }
e9a63f04
GM
15637 print line
15638}
648b8e6d 15639\$ac_cs_awk_pipe_fini
e9a63f04 15640_ACAWK
ca81d7a0 15641_ACEOF
e9a63f04
GM
15642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15643if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15644 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15645else
15646 cat
15647fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
eb697db5 15648 || as_fn_error "could not setup config files machinery" "$LINENO" 5
c0d27fcc 15649_ACEOF
ca81d7a0 15650
ca81d7a0
JD
15651# VPATH may cause trouble with some makes, so we remove $(srcdir),
15652# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15653# trailing colons and then remove the whole line if VPATH becomes empty
15654# (actually we leave an empty line to preserve line numbers).
15655if test "x$srcdir" = x.; then
15656 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15657s/:*\$(srcdir):*/:/
15658s/:*\${srcdir}:*/:/
15659s/:*@srcdir@:*/:/
15660s/^\([^=]*=[ ]*\):*/\1/
15661s/:*$//
15662s/^[^=]*=[ ]*$//
15663}'
15664fi
15665
e9a63f04 15666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15667fi # test -n "$CONFIG_FILES"
15668
e9a63f04
GM
15669# Set up the scripts for CONFIG_HEADERS section.
15670# No need to generate them if there are no CONFIG_HEADERS.
15671# This happens for instance with `./config.status Makefile'.
15672if test -n "$CONFIG_HEADERS"; then
15673cat >"$tmp/defines.awk" <<\_ACAWK ||
15674BEGIN {
15675_ACEOF
dc2933eb 15676
e9a63f04
GM
15677# Transform confdefs.h into an awk script `defines.awk', embedded as
15678# here-document in config.status, that substitutes the proper values into
15679# config.h.in to produce config.h.
15680
15681# Create a delimiter string that does not exist in confdefs.h, to ease
15682# handling of long lines.
15683ac_delim='%!_!# '
15684for ac_last_try in false false :; do
15685 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15686 if test -z "$ac_t"; then
15687 break
15688 elif $ac_last_try; then
eb697db5 15689 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
15690 else
15691 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15692 fi
15693done
15694
15695# For the awk script, D is an array of macro values keyed by name,
15696# likewise P contains macro parameters if any. Preserve backslash
15697# newline sequences.
15698
15699ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15700sed -n '
15701s/.\{148\}/&'"$ac_delim"'/g
15702t rset
15703:rset
15704s/^[ ]*#[ ]*define[ ][ ]*/ /
15705t def
15706d
15707:def
15708s/\\$//
15709t bsnl
15710s/["\\]/\\&/g
15711s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15712D["\1"]=" \3"/p
15713s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15714d
15715:bsnl
15716s/["\\]/\\&/g
15717s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15718D["\1"]=" \3\\\\\\n"\\/p
15719t cont
15720s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15721t cont
15722d
15723:cont
15724n
15725s/.\{148\}/&'"$ac_delim"'/g
15726t clear
15727:clear
15728s/\\$//
15729t bsnlc
15730s/["\\]/\\&/g; s/^/"/; s/$/"/p
15731d
15732:bsnlc
15733s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15734b cont
15735' <confdefs.h | sed '
15736s/'"$ac_delim"'/"\\\
15737"/g' >>$CONFIG_STATUS || ac_write_fail=1
15738
15739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15740 for (key in D) D_is_set[key] = 1
15741 FS = "\a"
15742}
15743/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15744 line = \$ 0
15745 split(line, arg, " ")
15746 if (arg[1] == "#") {
15747 defundef = arg[2]
15748 mac1 = arg[3]
15749 } else {
15750 defundef = substr(arg[1], 2)
15751 mac1 = arg[2]
15752 }
15753 split(mac1, mac2, "(") #)
15754 macro = mac2[1]
3de25479 15755 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
15756 if (D_is_set[macro]) {
15757 # Preserve the white space surrounding the "#".
e9a63f04
GM
15758 print prefix "define", macro P[macro] D[macro]
15759 next
15760 } else {
15761 # Replace #undef with comments. This is necessary, for example,
15762 # in the case of _POSIX_SOURCE, which is predefined and required
15763 # on some systems where configure will not decide to define it.
15764 if (defundef == "undef") {
3de25479 15765 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
15766 next
15767 }
15768 }
15769}
15770{ print }
15771_ACAWK
15772_ACEOF
15773cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
eb697db5 15774 as_fn_error "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
15775fi # test -n "$CONFIG_HEADERS"
15776
15777
15778eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15779shift
15780for ac_tag
ca81d7a0
JD
15781do
15782 case $ac_tag in
15783 :[FHLC]) ac_mode=$ac_tag; continue;;
15784 esac
15785 case $ac_mode$ac_tag in
15786 :[FHL]*:*);;
eb697db5 15787 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
15788 :[FH]-) ac_tag=-:-;;
15789 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15790 esac
15791 ac_save_IFS=$IFS
15792 IFS=:
15793 set x $ac_tag
15794 IFS=$ac_save_IFS
15795 shift
15796 ac_file=$1
15797 shift
15798
15799 case $ac_mode in
15800 :L) ac_source=$1;;
15801 :[FH])
15802 ac_file_inputs=
15803 for ac_f
15804 do
15805 case $ac_f in
15806 -) ac_f="$tmp/stdin";;
15807 *) # Look for the file first in the build tree, then in the source tree
15808 # (if the path is not absolute). The absolute path cannot be DOS-style,
15809 # because $ac_f cannot contain `:'.
15810 test -f "$ac_f" ||
15811 case $ac_f in
15812 [\\/$]*) false;;
15813 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15814 esac ||
eb697db5 15815 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 15816 esac
e9a63f04 15817 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
eb697db5 15818 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
15819 done
15820
15821 # Let's still pretend it is `configure' which instantiates (i.e., don't
15822 # use $as_me), people would be surprised to read:
15823 # /* config.h. Generated by config.status. */
e9a63f04
GM
15824 configure_input='Generated from '`
15825 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15826 `' by configure.'
ca81d7a0
JD
15827 if test x"$ac_file" != x-; then
15828 configure_input="$ac_file. $configure_input"
eb697db5 15829 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 15830$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 15831 fi
e9a63f04
GM
15832 # Neutralize special characters interpreted by sed in replacement strings.
15833 case $configure_input in #(
15834 *\&* | *\|* | *\\* )
15835 ac_sed_conf_input=`$as_echo "$configure_input" |
15836 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15837 *) ac_sed_conf_input=$configure_input;;
15838 esac
ca81d7a0
JD
15839
15840 case $ac_tag in
e9a63f04 15841 *:-:* | *:-) cat >"$tmp/stdin" \
eb697db5 15842 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
15843 esac
15844 ;;
ba4481b5
DL
15845 esac
15846
ca81d7a0 15847 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 15848$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
15849 X"$ac_file" : 'X\(//\)[^/]' \| \
15850 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 15851 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 15852$as_echo X"$ac_file" |
ca81d7a0
JD
15853 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15854 s//\1/
15855 q
15856 }
15857 /^X\(\/\/\)[^/].*/{
15858 s//\1/
15859 q
15860 }
15861 /^X\(\/\/\)$/{
15862 s//\1/
15863 q
15864 }
15865 /^X\(\/\).*/{
15866 s//\1/
15867 q
15868 }
15869 s/.*/./; q'`
eb697db5 15870 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 15871 ac_builddir=.
98418dba 15872
ca81d7a0
JD
15873case "$ac_dir" in
15874.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15875*)
e9a63f04 15876 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 15877 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 15878 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
15879 case $ac_top_builddir_sub in
15880 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15881 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15882 esac ;;
15883esac
15884ac_abs_top_builddir=$ac_pwd
15885ac_abs_builddir=$ac_pwd$ac_dir_suffix
15886# for backward compatibility:
15887ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
15888
15889case $srcdir in
ca81d7a0 15890 .) # We are building in place.
c0d27fcc 15891 ac_srcdir=.
ca81d7a0
JD
15892 ac_top_srcdir=$ac_top_builddir_sub
15893 ac_abs_top_srcdir=$ac_pwd ;;
15894 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 15895 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
15896 ac_top_srcdir=$srcdir
15897 ac_abs_top_srcdir=$srcdir ;;
15898 *) # Relative name.
15899 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15900 ac_top_srcdir=$ac_top_build_prefix$srcdir
15901 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 15902esac
ca81d7a0 15903ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 15904
c0d27fcc 15905
ca81d7a0
JD
15906 case $ac_mode in
15907 :F)
15908 #
15909 # CONFIG_FILE
15910 #
ba4481b5 15911
503d2be0
AS
15912 case $INSTALL in
15913 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 15914 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 15915 esac
ca81d7a0 15916_ACEOF
ba4481b5 15917
e9a63f04 15918cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15919# If the template does not know about datarootdir, expand it.
15920# FIXME: This hack should be removed a few years after 2.60.
15921ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
15922ac_sed_dataroot='
15923/datarootdir/ {
ca81d7a0
JD
15924 p
15925 q
15926}
15927/@datadir@/p
15928/@docdir@/p
15929/@infodir@/p
15930/@localedir@/p
eb697db5 15931/@mandir@/p'
e9a63f04 15932case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
15933*datarootdir*) ac_datarootdir_seen=yes;;
15934*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
eb697db5 15935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 15936$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 15937_ACEOF
e9a63f04 15938cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
15939 ac_datarootdir_hack='
15940 s&@datadir@&$datadir&g
15941 s&@docdir@&$docdir&g
15942 s&@infodir@&$infodir&g
15943 s&@localedir@&$localedir&g
15944 s&@mandir@&$mandir&g
eb697db5 15945 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 15946esac
c0d27fcc 15947_ACEOF
ca81d7a0
JD
15948
15949# Neutralize VPATH when `$srcdir' = `.'.
15950# Shell code in configure.ac might set extrasub.
15951# FIXME: do we really want to maintain this feature?
e9a63f04
GM
15952cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15953ac_sed_extra="$ac_vpsub
503d2be0 15954$extrasub
c0d27fcc 15955_ACEOF
e9a63f04 15956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
15957:t
15958/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 15959s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 15960s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 15961s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
15962s&@srcdir@&$ac_srcdir&;t t
15963s&@abs_srcdir@&$ac_abs_srcdir&;t t
15964s&@top_srcdir@&$ac_top_srcdir&;t t
15965s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15966s&@builddir@&$ac_builddir&;t t
15967s&@abs_builddir@&$ac_abs_builddir&;t t
15968s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15969s&@INSTALL@&$ac_INSTALL&;t t
15970$ac_datarootdir_hack
e9a63f04 15971"
648b8e6d
GM
15972eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15973if $ac_cs_awk_getline; then
15974 $AWK -f "$tmp/subs.awk"
15975else
15976 $AWK -f "$tmp/subs.awk" | $SHELL
15977fi >$tmp/out \
eb697db5 15978 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15979
15980test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15981 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15982 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
eb697db5 15983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0 15984which seems to be undefined. Please make sure it is defined." >&5
e9a63f04 15985$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0
JD
15986which seems to be undefined. Please make sure it is defined." >&2;}
15987
15988 rm -f "$tmp/stdin"
503d2be0 15989 case $ac_file in
e9a63f04
GM
15990 -) cat "$tmp/out" && rm -f "$tmp/out";;
15991 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15992 esac \
eb697db5 15993 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15994 ;;
15995 :H)
15996 #
15997 # CONFIG_HEADER
15998 #
503d2be0 15999 if test x"$ac_file" != x-; then
e9a63f04
GM
16000 {
16001 $as_echo "/* $configure_input */" \
16002 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
16003 } >"$tmp/config.h" \
eb697db5 16004 || as_fn_error "could not create $ac_file" "$LINENO" 5
e9a63f04 16005 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
eb697db5 16006 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 16007$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 16008 else
e9a63f04
GM
16009 rm -f "$ac_file"
16010 mv "$tmp/config.h" "$ac_file" \
eb697db5 16011 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba4481b5 16012 fi
503d2be0 16013 else
e9a63f04
GM
16014 $as_echo "/* $configure_input */" \
16015 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
eb697db5 16016 || as_fn_error "could not create -" "$LINENO" 5
ba4481b5 16017 fi
ca81d7a0 16018 ;;
edfaf76d 16019
eb697db5 16020 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 16021$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
16022 ;;
16023 esac
ba4481b5 16024
c0d27fcc 16025
ca81d7a0
JD
16026 case $ac_file$ac_mode in
16027 "default":C)
ba4481b5
DL
16028
16029### Make the necessary directories, if they don't exist.
16030for dir in etc lisp ; do
16031 test -d ${dir} || mkdir ${dir}
16032done
16033
ba4481b5 16034echo creating src/epaths.h
4aa6b955 16035${MAKE-make} epaths-force
ba4481b5 16036
503d2be0 16037if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 16038 echo creating src/.gdbinit
503d2be0 16039 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
16040fi
16041
503d2be0 16042 ;;
ca81d7a0 16043
503d2be0 16044 esac
ca81d7a0 16045done # for ac_tag
503d2be0 16046
ba4481b5 16047
eb697db5 16048as_fn_exit 0
c0d27fcc 16049_ACEOF
503d2be0
AS
16050ac_clean_files=$ac_clean_files_save
16051
e9a63f04 16052test $ac_write_fail = 0 ||
eb697db5 16053 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 16054
c0d27fcc 16055
503d2be0
AS
16056# configure is writing to config.log, and then calls config.status.
16057# config.status does its own redirection, appending to config.log.
16058# Unfortunately, on DOS this fails, as config.log is still kept open
16059# by configure, so config.status won't be able to write to it; its
16060# output is simply discarded. So we exec the FD to /dev/null,
16061# effectively closing config.log, so it can be properly (re)opened and
16062# appended to by config.status. When coming back to configure, we
16063# need to make the FD available again.
16064if test "$no_create" != yes; then
16065 ac_cs_success=:
19650fd6
AS
16066 ac_config_status_args=
16067 test "$silent" = yes &&
16068 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 16069 exec 5>/dev/null
19650fd6 16070 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
16071 exec 5>>config.log
16072 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16073 # would make configure fail if this is the last instruction.
eb697db5 16074 $ac_cs_success || as_fn_exit $?
503d2be0 16075fi
e9a63f04 16076if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
eb697db5 16077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
3de25479 16078$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 16079fi
f5f47add 16080
c0d27fcc 16081