* emacs-lisp/smie.el (comment-string-strip): Declare function.
[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
08b47d3d 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
a4f64981 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
a4f64981 486else
eb697db5 487 as_ln_s='cp -p'
a4f64981 488fi
eb697db5
DN
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
a5edbe4a 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
5929fbe7 497fi
e6df49e4 498
eb697db5
DN
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
5929fbe7 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 '
5929fbe7 519fi
eb697db5 520as_executable_p=$as_test_x
e6df49e4 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'"
a4f64981 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'"
a4f64981 527
5929fbe7 528
eb697db5
DN
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
5929fbe7
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
c24fa7dc
MB
595ac_header_list=
596ac_func_list=
eb697db5 597ac_subst_vars='LTLIBOBJS
5929fbe7 598WINDOW_SUPPORT
eb697db5
DN
599TOOLTIP_SUPPORT
600MOUSE_SUPPORT
601LIB_GCC
602LINKER
603POST_EDIT_LDFLAGS
604PRE_EDIT_LDFLAGS
605LD_SWITCH_SYSTEM_TEMACS
606POST_ALLOC_OBJ
607PRE_ALLOC_OBJ
608CYGWIN_OBJ
609RALLOC_OBJ
610OLDXMENU_DEPS
611LIBX_OTHER
612LIBXMENU
613OLDXMENU
614OLDXMENU_TARGET
615LIBXT_OTHER
616TOOLKIT_LIBW
617WIDGET_OBJ
618XOBJ
619XMENU_OBJ
620FONT_OBJ
621OTHER_FILES
622GNU_OBJC_CFLAGS
623ns_appsrc
624ns_appresdir
625ns_appbindir
626ns_appdir
627opsysfile
628machfile
629X_TOOLKIT_TYPE
630C_SWITCH_X_SYSTEM
631C_SWITCH_X_SITE
632LD_SWITCH_X_SITE
633gameuser
634gamedir
635bitmapdir
636archlibdir
637etcdir
638x_default_search_path
639lisppath
640locallisppath
641lispdir
642srcdir
643canonical
644configuration
645version
646KRB4LIB
647DESLIB
648KRB5LIB
649CRYPTOLIB
650COM_ERRLIB
651LIBRESOLV
652LIBHESIOD
653TERMCAP_OBJ
654LIBS_TERMCAP
655GETOPTOBJS
656GETOPT_H
657GETLOADAVG_LIBS
658KMEM_GROUP
659NEED_SETGID
660LIBOBJS
661BLESSMAIL_TARGET
662LIBS_MAIL
663liblockfile
664ALLOCA
665LIBXSM
666LIBGPM
667LIBGIF
668LIBTIFF
669LIBPNG
670LIBJPEG
671LIBXPM
672FREETYPE_LIBS
673FREETYPE_CFLAGS
674M17N_FLT_LIBS
675M17N_FLT_CFLAGS
676LIBOTF_LIBS
677LIBOTF_CFLAGS
678XFT_LIBS
679XFT_CFLAGS
680FONTCONFIG_LIBS
681FONTCONFIG_CFLAGS
682LIBXMU
683LIBXTR6
684LIBSELINUX_LIBS
685GCONF_LIBS
686GCONF_CFLAGS
687DBUS_OBJ
688DBUS_LIBS
689DBUS_CFLAGS
690GTK_OBJ
691GTK_LIBS
692GTK_CFLAGS
693RSVG_LIBS
694RSVG_CFLAGS
695VMLIMIT_OBJ
696GMALLOC_OBJ
697HAVE_XSERVER
698LIB_STANDARD
699NS_SUPPORT
700NS_OBJ
701TEMACS_LDFLAGS2
702LD_SWITCH_X_SITE_AUX_RPATH
703LD_SWITCH_X_SITE_AUX
704XMKMF
705DEPFLAGS
706MKDEPDIR
707SET_MAKE
708CFLAGS_SOUND
709ALSA_LIBS
710ALSA_CFLAGS
711PKG_CONFIG
712LIBSOUND
713START_FILES
714LIB_MATH
715CRT_DIR
716LIBS_SYSTEM
717C_SWITCH_SYSTEM
718UNEXEC_OBJ
719C_SWITCH_MACHINE
720LD_SWITCH_SYSTEM
721cannot_dump
722MAKEINFO
723GZIP_PROG
724INSTALL_INFO
725RANLIB
726INSTALL_DATA
727INSTALL_SCRIPT
728INSTALL_PROGRAM
729EGREP
730GREP
731CPP
732OBJEXT
733EXEEXT
734ac_ct_CC
735CPPFLAGS
736LDFLAGS
737CFLAGS
738CC
739host_os
740host_vendor
741host_cpu
742host
743build_os
744build_vendor
745build_cpu
746build
747MAINT
748target_alias
749host_alias
750build_alias
751LIBS
752ECHO_T
753ECHO_N
754ECHO_C
755DEFS
756mandir
757localedir
758libdir
759psdir
760pdfdir
761dvidir
762htmldir
763infodir
764docdir
765oldincludedir
766includedir
767localstatedir
768sharedstatedir
769sysconfdir
770datadir
771datarootdir
772libexecdir
773sbindir
774bindir
775program_transform_name
776prefix
777exec_prefix
778PACKAGE_URL
779PACKAGE_BUGREPORT
780PACKAGE_STRING
781PACKAGE_VERSION
782PACKAGE_TARNAME
783PACKAGE_NAME
784PATH_SEPARATOR
785SHELL'
786ac_subst_files='deps_frag
787ns_frag'
788ac_user_opts='
789enable_option_checking
790with_pop
791with_kerberos
792with_kerberos5
793with_hesiod
794with_mmdf
795with_mail_unlink
796with_mailhost
797with_sound
798with_sync_input
799with_x_toolkit
800with_xpm
801with_jpeg
802with_tiff
803with_gif
804with_png
805with_rsvg
806with_xft
807with_libotf
808with_m17n_flt
809with_toolkit_scroll_bars
810with_xaw3d
811with_xim
812with_ns
813with_gpm
814with_dbus
815with_gconf
816with_selinux
817with_makeinfo
818with_pkg_config_prog
819with_crt_dir
820with_gnustep_conf
821enable_ns_self_contained
822enable_asserts
823enable_maintainer_mode
824enable_locallisppath
825enable_checking
826enable_profiling
827enable_autodepend
828enable_largefile
829with_x
830'
831 ac_precious_vars='build_alias
832host_alias
833target_alias
834CC
835CFLAGS
836LDFLAGS
837LIBS
838CPPFLAGS
839CPP
840XMKMF'
a4f64981 841
5929fbe7 842
eb697db5
DN
843# Initialize some variables set by options.
844ac_init_help=
845ac_init_version=false
846ac_unrecognized_opts=
847ac_unrecognized_sep=
848# The variables have the same names as the options, with
849# dashes changed to underlines.
850cache_file=/dev/null
851exec_prefix=NONE
852no_create=
853no_recursion=
854prefix=NONE
855program_prefix=NONE
856program_suffix=NONE
857program_transform_name=s,x,x,
858silent=
859site=
860srcdir=
861verbose=
862x_includes=NONE
863x_libraries=NONE
5929fbe7 864
eb697db5
DN
865# Installation directory options.
866# These are left unexpanded so users can "make install exec_prefix=/foo"
867# and all the variables that are supposed to be based on exec_prefix
868# by default will actually change.
869# Use braces instead of parens because sh, perl, etc. also accept them.
870# (The list follows the same order as the GNU Coding Standards.)
871bindir='${exec_prefix}/bin'
872sbindir='${exec_prefix}/sbin'
873libexecdir='${exec_prefix}/libexec'
874datarootdir='${prefix}/share'
875datadir='${datarootdir}'
876sysconfdir='${prefix}/etc'
877sharedstatedir='${prefix}/com'
878localstatedir='${prefix}/var'
879includedir='${prefix}/include'
880oldincludedir='/usr/include'
881docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
882infodir='${datarootdir}/info'
883htmldir='${docdir}'
884dvidir='${docdir}'
885pdfdir='${docdir}'
886psdir='${docdir}'
887libdir='${exec_prefix}/lib'
888localedir='${datarootdir}/locale'
889mandir='${datarootdir}/man'
5929fbe7 890
eb697db5
DN
891ac_prev=
892ac_dashdash=
893for ac_option
894do
895 # If the previous option needs an argument, assign it.
896 if test -n "$ac_prev"; then
897 eval $ac_prev=\$ac_option
898 ac_prev=
899 continue
900 fi
a4f64981 901
eb697db5
DN
902 case $ac_option in
903 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
904 *) ac_optarg=yes ;;
905 esac
a4f64981 906
eb697db5 907 # Accept the important Cygnus configure options, so we can diagnose typos.
a4f64981 908
eb697db5
DN
909 case $ac_dashdash$ac_option in
910 --)
911 ac_dashdash=yes ;;
a4f64981 912
eb697db5
DN
913 -bindir | --bindir | --bindi | --bind | --bin | --bi)
914 ac_prev=bindir ;;
915 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
916 bindir=$ac_optarg ;;
a4f64981 917
eb697db5
DN
918 -build | --build | --buil | --bui | --bu)
919 ac_prev=build_alias ;;
920 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
921 build_alias=$ac_optarg ;;
a4f64981 922
eb697db5
DN
923 -cache-file | --cache-file | --cache-fil | --cache-fi \
924 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
925 ac_prev=cache_file ;;
926 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
927 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
928 cache_file=$ac_optarg ;;
5929fbe7 929
eb697db5
DN
930 --config-cache | -C)
931 cache_file=config.cache ;;
8c5ff6dd 932
eb697db5
DN
933 -datadir | --datadir | --datadi | --datad)
934 ac_prev=datadir ;;
935 -datadir=* | --datadir=* | --datadi=* | --datad=*)
936 datadir=$ac_optarg ;;
8c5ff6dd 937
eb697db5
DN
938 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
939 | --dataroo | --dataro | --datar)
940 ac_prev=datarootdir ;;
941 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
942 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
943 datarootdir=$ac_optarg ;;
5929fbe7 944
eb697db5
DN
945 -disable-* | --disable-*)
946 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
947 # Reject names that are not valid shell variable names.
948 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
949 as_fn_error "invalid feature name: $ac_useropt"
950 ac_useropt_orig=$ac_useropt
951 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
952 case $ac_user_opts in
953 *"
954"enable_$ac_useropt"
955"*) ;;
956 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
957 ac_unrecognized_sep=', ';;
958 esac
959 eval enable_$ac_useropt=no ;;
5929fbe7 960
eb697db5
DN
961 -docdir | --docdir | --docdi | --doc | --do)
962 ac_prev=docdir ;;
963 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
964 docdir=$ac_optarg ;;
8c5ff6dd 965
eb697db5
DN
966 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
967 ac_prev=dvidir ;;
968 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
969 dvidir=$ac_optarg ;;
8c5ff6dd 970
eb697db5
DN
971 -enable-* | --enable-*)
972 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
973 # Reject names that are not valid shell variable names.
974 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
975 as_fn_error "invalid feature name: $ac_useropt"
976 ac_useropt_orig=$ac_useropt
977 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
978 case $ac_user_opts in
979 *"
980"enable_$ac_useropt"
981"*) ;;
982 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
983 ac_unrecognized_sep=', ';;
984 esac
985 eval enable_$ac_useropt=\$ac_optarg ;;
648b8e6d 986
eb697db5
DN
987 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
988 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
989 | --exec | --exe | --ex)
990 ac_prev=exec_prefix ;;
991 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
992 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
993 | --exec=* | --exe=* | --ex=*)
994 exec_prefix=$ac_optarg ;;
648b8e6d 995
eb697db5
DN
996 -gas | --gas | --ga | --g)
997 # Obsolete; use --with-gas.
998 with_gas=yes ;;
648b8e6d 999
eb697db5
DN
1000 -help | --help | --hel | --he | -h)
1001 ac_init_help=long ;;
1002 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1003 ac_init_help=recursive ;;
1004 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1005 ac_init_help=short ;;
648b8e6d 1006
eb697db5
DN
1007 -host | --host | --hos | --ho)
1008 ac_prev=host_alias ;;
1009 -host=* | --host=* | --hos=* | --ho=*)
1010 host_alias=$ac_optarg ;;
8c5ff6dd 1011
eb697db5
DN
1012 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1013 ac_prev=htmldir ;;
1014 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1015 | --ht=*)
1016 htmldir=$ac_optarg ;;
a4f64981 1017
eb697db5
DN
1018 -includedir | --includedir | --includedi | --included | --include \
1019 | --includ | --inclu | --incl | --inc)
1020 ac_prev=includedir ;;
1021 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1022 | --includ=* | --inclu=* | --incl=* | --inc=*)
1023 includedir=$ac_optarg ;;
a4f64981 1024
eb697db5
DN
1025 -infodir | --infodir | --infodi | --infod | --info | --inf)
1026 ac_prev=infodir ;;
1027 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1028 infodir=$ac_optarg ;;
7186fb09 1029
eb697db5
DN
1030 -libdir | --libdir | --libdi | --libd)
1031 ac_prev=libdir ;;
1032 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1033 libdir=$ac_optarg ;;
e6df49e4 1034
eb697db5
DN
1035 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1036 | --libexe | --libex | --libe)
1037 ac_prev=libexecdir ;;
1038 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1039 | --libexe=* | --libex=* | --libe=*)
1040 libexecdir=$ac_optarg ;;
a4f64981 1041
eb697db5
DN
1042 -localedir | --localedir | --localedi | --localed | --locale)
1043 ac_prev=localedir ;;
1044 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1045 localedir=$ac_optarg ;;
1046
1047 -localstatedir | --localstatedir | --localstatedi | --localstated \
1048 | --localstate | --localstat | --localsta | --localst | --locals)
1049 ac_prev=localstatedir ;;
1050 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1051 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1052 localstatedir=$ac_optarg ;;
a4f64981 1053
eb697db5
DN
1054 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1055 ac_prev=mandir ;;
1056 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1057 mandir=$ac_optarg ;;
49ebbd65 1058
eb697db5
DN
1059 -nfp | --nfp | --nf)
1060 # Obsolete; use --without-fp.
1061 with_fp=no ;;
a4f64981 1062
eb697db5
DN
1063 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1064 | --no-cr | --no-c | -n)
1065 no_create=yes ;;
1066
1067 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1068 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1069 no_recursion=yes ;;
a4f64981 1070
eb697db5
DN
1071 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1072 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1073 | --oldin | --oldi | --old | --ol | --o)
1074 ac_prev=oldincludedir ;;
1075 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1076 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1077 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1078 oldincludedir=$ac_optarg ;;
e6df49e4 1079
eb697db5
DN
1080 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1081 ac_prev=prefix ;;
1082 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1083 prefix=$ac_optarg ;;
a4f64981 1084
eb697db5
DN
1085 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1086 | --program-pre | --program-pr | --program-p)
1087 ac_prev=program_prefix ;;
1088 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1089 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1090 program_prefix=$ac_optarg ;;
5929fbe7 1091
eb697db5
DN
1092 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1093 | --program-suf | --program-su | --program-s)
1094 ac_prev=program_suffix ;;
1095 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1096 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1097 program_suffix=$ac_optarg ;;
5929fbe7 1098
eb697db5
DN
1099 -program-transform-name | --program-transform-name \
1100 | --program-transform-nam | --program-transform-na \
1101 | --program-transform-n | --program-transform- \
1102 | --program-transform | --program-transfor \
1103 | --program-transfo | --program-transf \
1104 | --program-trans | --program-tran \
1105 | --progr-tra | --program-tr | --program-t)
1106 ac_prev=program_transform_name ;;
1107 -program-transform-name=* | --program-transform-name=* \
1108 | --program-transform-nam=* | --program-transform-na=* \
1109 | --program-transform-n=* | --program-transform-=* \
1110 | --program-transform=* | --program-transfor=* \
1111 | --program-transfo=* | --program-transf=* \
1112 | --program-trans=* | --program-tran=* \
1113 | --progr-tra=* | --program-tr=* | --program-t=*)
1114 program_transform_name=$ac_optarg ;;
5929fbe7 1115
eb697db5
DN
1116 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1117 ac_prev=pdfdir ;;
1118 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1119 pdfdir=$ac_optarg ;;
5929fbe7 1120
eb697db5
DN
1121 -psdir | --psdir | --psdi | --psd | --ps)
1122 ac_prev=psdir ;;
1123 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1124 psdir=$ac_optarg ;;
5929fbe7 1125
eb697db5
DN
1126 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1127 | -silent | --silent | --silen | --sile | --sil)
1128 silent=yes ;;
a4f64981 1129
eb697db5
DN
1130 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1131 ac_prev=sbindir ;;
1132 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1133 | --sbi=* | --sb=*)
1134 sbindir=$ac_optarg ;;
0c309b80 1135
eb697db5
DN
1136 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1137 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1138 | --sharedst | --shareds | --shared | --share | --shar \
1139 | --sha | --sh)
1140 ac_prev=sharedstatedir ;;
1141 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1142 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1143 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1144 | --sha=* | --sh=*)
1145 sharedstatedir=$ac_optarg ;;
5929fbe7 1146
eb697db5
DN
1147 -site | --site | --sit)
1148 ac_prev=site ;;
1149 -site=* | --site=* | --sit=*)
1150 site=$ac_optarg ;;
5929fbe7 1151
eb697db5
DN
1152 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1153 ac_prev=srcdir ;;
1154 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1155 srcdir=$ac_optarg ;;
a4f64981 1156
eb697db5
DN
1157 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1158 | --syscon | --sysco | --sysc | --sys | --sy)
1159 ac_prev=sysconfdir ;;
1160 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1161 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1162 sysconfdir=$ac_optarg ;;
a4f64981 1163
eb697db5
DN
1164 -target | --target | --targe | --targ | --tar | --ta | --t)
1165 ac_prev=target_alias ;;
1166 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1167 target_alias=$ac_optarg ;;
a4f64981 1168
eb697db5
DN
1169 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1170 verbose=yes ;;
a4f64981 1171
eb697db5
DN
1172 -version | --version | --versio | --versi | --vers | -V)
1173 ac_init_version=: ;;
a4f64981 1174
eb697db5
DN
1175 -with-* | --with-*)
1176 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1177 # Reject names that are not valid shell variable names.
1178 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1179 as_fn_error "invalid package name: $ac_useropt"
1180 ac_useropt_orig=$ac_useropt
1181 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1182 case $ac_user_opts in
1183 *"
1184"with_$ac_useropt"
1185"*) ;;
1186 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1187 ac_unrecognized_sep=', ';;
1188 esac
1189 eval with_$ac_useropt=\$ac_optarg ;;
1190
1191 -without-* | --without-*)
1192 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1193 # Reject names that are not valid shell variable names.
1194 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1195 as_fn_error "invalid package name: $ac_useropt"
1196 ac_useropt_orig=$ac_useropt
1197 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198 case $ac_user_opts in
1199 *"
1200"with_$ac_useropt"
1201"*) ;;
1202 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1203 ac_unrecognized_sep=', ';;
1204 esac
1205 eval with_$ac_useropt=no ;;
e6df49e4 1206
eb697db5
DN
1207 --x)
1208 # Obsolete; use --with-x.
1209 with_x=yes ;;
a4f64981 1210
eb697db5
DN
1211 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1212 | --x-incl | --x-inc | --x-in | --x-i)
1213 ac_prev=x_includes ;;
1214 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1215 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1216 x_includes=$ac_optarg ;;
a4f64981 1217
eb697db5
DN
1218 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1219 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1220 ac_prev=x_libraries ;;
1221 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1222 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1223 x_libraries=$ac_optarg ;;
a4f64981 1224
eb697db5
DN
1225 -*) as_fn_error "unrecognized option: \`$ac_option'
1226Try \`$0 --help' for more information."
1227 ;;
a4f64981 1228
eb697db5
DN
1229 *=*)
1230 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1231 # Reject names that are not valid shell variable names.
1232 case $ac_envvar in #(
1233 '' | [0-9]* | *[!_$as_cr_alnum]* )
1234 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1235 esac
1236 eval $ac_envvar=\$ac_optarg
1237 export $ac_envvar ;;
a4f64981 1238
eb697db5
DN
1239 *)
1240 # FIXME: should be removed in autoconf 3.0.
1241 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1242 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1243 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1244 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1245 ;;
a4f64981 1246
eb697db5
DN
1247 esac
1248done
15e12598 1249
eb697db5
DN
1250if test -n "$ac_prev"; then
1251 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1252 as_fn_error "missing argument to $ac_option"
5929fbe7 1253fi
e6df49e4 1254
eb697db5
DN
1255if test -n "$ac_unrecognized_opts"; then
1256 case $enable_option_checking in
1257 no) ;;
1258 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1259 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1260 esac
e6df49e4 1261fi
15e12598 1262
eb697db5
DN
1263# Check all directory arguments for consistency.
1264for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1265 datadir sysconfdir sharedstatedir localstatedir includedir \
1266 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1267 libdir localedir mandir
1268do
1269 eval ac_val=\$$ac_var
1270 # Remove trailing slashes.
1271 case $ac_val in
1272 */ )
1273 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1274 eval $ac_var=\$ac_val;;
1275 esac
1276 # Be sure to have absolute directory names.
1277 case $ac_val in
1278 [\\/$]* | ?:[\\/]* ) continue;;
1279 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1280 esac
1281 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1282done
a4f64981 1283
eb697db5
DN
1284# There might be people who depend on the old broken behavior: `$host'
1285# used to hold the argument of --host etc.
1286# FIXME: To remove some day.
1287build=$build_alias
1288host=$host_alias
1289target=$target_alias
5929fbe7 1290
eb697db5
DN
1291# FIXME: To remove some day.
1292if test "x$host_alias" != x; then
1293 if test "x$build_alias" = x; then
1294 cross_compiling=maybe
1295 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1296 If a cross compiler is detected then cross compile mode will be used." >&2
1297 elif test "x$build_alias" != "x$host_alias"; then
1298 cross_compiling=yes
1299 fi
49ebbd65 1300fi
15e12598 1301
eb697db5
DN
1302ac_tool_prefix=
1303test -n "$host_alias" && ac_tool_prefix=$host_alias-
a4f64981 1304
eb697db5 1305test "$silent" = yes && exec 6>/dev/null
a5edbe4a 1306
15e12598 1307
eb697db5
DN
1308ac_pwd=`pwd` && test -n "$ac_pwd" &&
1309ac_ls_di=`ls -di .` &&
1310ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1311 as_fn_error "working directory cannot be determined"
1312test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1313 as_fn_error "pwd does not report name of working directory"
e6df49e4 1314
8c5ff6dd 1315
eb697db5
DN
1316# Find the source files, if location was not specified.
1317if test -z "$srcdir"; then
1318 ac_srcdir_defaulted=yes
1319 # Try the directory containing this script, then the parent directory.
1320 ac_confdir=`$as_dirname -- "$as_myself" ||
1321$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1322 X"$as_myself" : 'X\(//\)[^/]' \| \
1323 X"$as_myself" : 'X\(//\)$' \| \
1324 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1325$as_echo X"$as_myself" |
1326 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1327 s//\1/
1328 q
1329 }
1330 /^X\(\/\/\)[^/].*/{
1331 s//\1/
1332 q
1333 }
1334 /^X\(\/\/\)$/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\).*/{
1339 s//\1/
1340 q
1341 }
1342 s/.*/./; q'`
1343 srcdir=$ac_confdir
1344 if test ! -r "$srcdir/$ac_unique_file"; then
1345 srcdir=..
1346 fi
5929fbe7 1347else
eb697db5 1348 ac_srcdir_defaulted=no
5929fbe7 1349fi
eb697db5
DN
1350if test ! -r "$srcdir/$ac_unique_file"; then
1351 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1352 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1353fi
1354ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1355ac_abs_confdir=`(
1356 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1357 pwd)`
1358# When building in place, set srcdir=.
1359if test "$ac_abs_confdir" = "$ac_pwd"; then
1360 srcdir=.
49ebbd65 1361fi
eb697db5
DN
1362# Remove unnecessary trailing slashes from srcdir.
1363# Double slashes in file names in object file debugging info
1364# mess up M-x gdb in Emacs.
1365case $srcdir in
1366*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1367esac
1368for ac_var in $ac_precious_vars; do
1369 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1370 eval ac_env_${ac_var}_value=\$${ac_var}
1371 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1372 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1373done
a4f64981 1374
eb697db5
DN
1375#
1376# Report the --help message.
1377#
1378if test "$ac_init_help" = "long"; then
1379 # Omit some internal or obsolete options to make the list less imposing.
1380 # This message is too long to be a string in the A/UX 3.1 sh.
1381 cat <<_ACEOF
1382\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
8c5ff6dd 1383
eb697db5 1384Usage: $0 [OPTION]... [VAR=VALUE]...
a4f64981 1385
eb697db5
DN
1386To assign environment variables (e.g., CC, CFLAGS...), specify them as
1387VAR=VALUE. See below for descriptions of some of the useful variables.
a4f64981 1388
eb697db5 1389Defaults for the options are specified in brackets.
a4f64981 1390
eb697db5
DN
1391Configuration:
1392 -h, --help display this help and exit
1393 --help=short display options specific to this package
1394 --help=recursive display the short help of all the included packages
1395 -V, --version display version information and exit
1396 -q, --quiet, --silent do not print \`checking...' messages
1397 --cache-file=FILE cache test results in FILE [disabled]
1398 -C, --config-cache alias for \`--cache-file=config.cache'
1399 -n, --no-create do not create output files
1400 --srcdir=DIR find the sources in DIR [configure dir or \`..']
a4f64981 1401
eb697db5
DN
1402Installation directories:
1403 --prefix=PREFIX install architecture-independent files in PREFIX
1404 [$ac_default_prefix]
1405 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1406 [PREFIX]
298b8a34 1407
eb697db5
DN
1408By default, \`make install' will install all the files in
1409\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1410an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1411for instance \`--prefix=\$HOME'.
a4f64981 1412
eb697db5 1413For better control, use the options below.
a4f64981 1414
eb697db5
DN
1415Fine tuning of the installation directories:
1416 --bindir=DIR user executables [EPREFIX/bin]
1417 --sbindir=DIR system admin executables [EPREFIX/sbin]
1418 --libexecdir=DIR program executables [EPREFIX/libexec]
1419 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1420 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1421 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1422 --libdir=DIR object code libraries [EPREFIX/lib]
1423 --includedir=DIR C header files [PREFIX/include]
1424 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1425 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1426 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1427 --infodir=DIR info documentation [DATAROOTDIR/info]
1428 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1429 --mandir=DIR man documentation [DATAROOTDIR/man]
1430 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1431 --htmldir=DIR html documentation [DOCDIR]
1432 --dvidir=DIR dvi documentation [DOCDIR]
1433 --pdfdir=DIR pdf documentation [DOCDIR]
1434 --psdir=DIR ps documentation [DOCDIR]
1435_ACEOF
15e12598 1436
eb697db5 1437 cat <<\_ACEOF
e6df49e4 1438
eb697db5
DN
1439Program names:
1440 --program-prefix=PREFIX prepend PREFIX to installed program names
1441 --program-suffix=SUFFIX append SUFFIX to installed program names
1442 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
a4f64981 1443
eb697db5
DN
1444X features:
1445 --x-includes=DIR X include files are in DIR
1446 --x-libraries=DIR X library files are in DIR
a4f64981 1447
eb697db5
DN
1448System types:
1449 --build=BUILD configure for building on BUILD [guessed]
1450 --host=HOST cross-compile to build programs to run on HOST [BUILD]
8c5ff6dd 1451_ACEOF
eb697db5 1452fi
a4f64981 1453
eb697db5
DN
1454if test -n "$ac_init_help"; then
1455 case $ac_init_help in
1456 short | recursive ) echo "Configuration of emacs 24.0.50:";;
1457 esac
1458 cat <<\_ACEOF
e6df49e4 1459
eb697db5
DN
1460Optional Features:
1461 --disable-option-checking ignore unrecognized --enable/--with options
1462 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1463 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1464 --disable-ns-self-contained
1465 disable self contained build under NeXTstep
1466 --enable-asserts compile code with asserts enabled
1467 --enable-maintainer-mode
1468 enable make rules and dependencies not useful (and
1469 sometimes confusing) to the casual installer
1470 --enable-locallisppath=PATH
1471 directories Emacs should search for lisp files
1472 specific to this site
1473 --enable-checking[=LIST]
1474 enable expensive run-time checks. With LIST, enable
1475 only specific categories of checks. Categories are:
1476 all,yes,no. Flags are: stringbytes, stringoverrun,
1477 stringfreelist, xmallocoverrun, conslist
1478 --enable-profiling build emacs with profiling support. This might not
1479 work on all platforms
1480 --enable-autodepend automatically generate dependencies to .h-files.
1481 Requires GNU Make and Gcc. Enabled if GNU Make and
1482 Gcc is found
1483 --disable-largefile omit support for large files
1484
1485Optional Packages:
1486 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1487 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1488 --without-pop don't support POP mail retrieval with movemail
1489 --with-kerberos support Kerberos-authenticated POP
1490 --with-kerberos5 support Kerberos version 5 authenticated POP
1491 --with-hesiod support Hesiod to get the POP server host
1492 --with-mmdf support MMDF mailboxes
1493 --with-mail-unlink unlink, rather than empty, mail spool after reading
1494 --with-mailhost=HOSTNAME
1495 string giving default POP mail host
1496 --without-sound don't compile with sound support
1497 --without-sync-input process async input synchronously
1498 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, lucid or
1499 athena, motif, no)
1500 --without-xpm don't compile with XPM image support
1501 --without-jpeg don't compile with JPEG image support
1502 --without-tiff don't compile with TIFF image support
1503 --without-gif don't compile with GIF image support
1504 --without-png don't compile with PNG image support
1505 --without-rsvg don't compile with SVG image support
1506 --without-xft don't use XFT for anti aliased fonts
1507 --without-libotf don't use libotf for OpenType font support
1508 --without-m17n-flt don't use m17n-flt for text shaping
1509 --without-toolkit-scroll-bars
1510 don't use Motif or Xaw3d scroll bars
1511 --without-xaw3d don't use Xaw3d
1512 --without-xim don't use X11 XIM
1513 --with-ns use nextstep (Cocoa or GNUstep) windowing system
1514 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1515 console
1516 --without-dbus don't compile with D-Bus support
1517 --without-gconf don't compile with GConf support
1518 --without-selinux don't compile with SELinux support
1519 --without-makeinfo don't require makeinfo for building manuals
1520 --with-pkg-config-prog=PATH
1521 path to pkg-config for finding GTK and librsvg
1522 --with-crt-dir=DIR directory containing crtn.o etc. The default is
1523 /usr/lib, or /usr/lib64 on some platforms.
1524 --with-gnustep-conf=PATH
1525 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1526 or /etc/GNUstep/GNUstep.conf
1527 --with-x use the X Window System
e6df49e4 1528
eb697db5
DN
1529Some influential environment variables:
1530 CC C compiler command
1531 CFLAGS C compiler flags
1532 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1533 nonstandard directory <lib dir>
1534 LIBS libraries to pass to the linker, e.g. -l<library>
1535 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1536 you have headers in a nonstandard directory <include dir>
1537 CPP C preprocessor
1538 XMKMF Path to xmkmf, Makefile generator for X Window System
e6df49e4 1539
eb697db5
DN
1540Use these variables to override the choices made by `configure' or to help
1541it to find libraries and programs with nonstandard names/locations.
49ebbd65 1542
eb697db5 1543Report bugs to the package provider.
5929fbe7 1544_ACEOF
eb697db5 1545ac_status=$?
15e12598 1546fi
49ebbd65 1547
eb697db5
DN
1548if test "$ac_init_help" = "recursive"; then
1549 # If there are subdirs, report their specific --help.
1550 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1551 test -d "$ac_dir" ||
1552 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1553 continue
1554 ac_builddir=.
8c5ff6dd 1555
eb697db5
DN
1556case "$ac_dir" in
1557.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558*)
1559 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1560 # A ".." for each directory in $ac_dir_suffix.
1561 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1562 case $ac_top_builddir_sub in
1563 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1565 esac ;;
1566esac
1567ac_abs_top_builddir=$ac_pwd
1568ac_abs_builddir=$ac_pwd$ac_dir_suffix
1569# for backward compatibility:
1570ac_top_builddir=$ac_top_build_prefix
e6df49e4 1571
eb697db5
DN
1572case $srcdir in
1573 .) # We are building in place.
1574 ac_srcdir=.
1575 ac_top_srcdir=$ac_top_builddir_sub
1576 ac_abs_top_srcdir=$ac_pwd ;;
1577 [\\/]* | ?:[\\/]* ) # Absolute name.
1578 ac_srcdir=$srcdir$ac_dir_suffix;
1579 ac_top_srcdir=$srcdir
1580 ac_abs_top_srcdir=$srcdir ;;
1581 *) # Relative name.
1582 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1583 ac_top_srcdir=$ac_top_build_prefix$srcdir
1584 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1585esac
1586ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15e12598 1587
eb697db5
DN
1588 cd "$ac_dir" || { ac_status=$?; continue; }
1589 # Check for guested configure.
1590 if test -f "$ac_srcdir/configure.gnu"; then
1591 echo &&
1592 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1593 elif test -f "$ac_srcdir/configure"; then
1594 echo &&
1595 $SHELL "$ac_srcdir/configure" --help=recursive
1596 else
1597 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1598 fi || ac_status=$?
1599 cd "$ac_pwd" || { ac_status=$?; break; }
1600 done
1601fi
a4f64981 1602
eb697db5
DN
1603test -n "$ac_init_help" && exit $ac_status
1604if $ac_init_version; then
1605 cat <<\_ACEOF
1606emacs configure 24.0.50
1607generated by GNU Autoconf 2.65
a4f64981 1608
eb697db5
DN
1609Copyright (C) 2009 Free Software Foundation, Inc.
1610This configure script is free software; the Free Software Foundation
1611gives unlimited permission to copy, distribute and modify it.
5929fbe7 1612_ACEOF
eb697db5 1613 exit
a4f64981 1614fi
8c5ff6dd 1615
eb697db5
DN
1616## ------------------------ ##
1617## Autoconf initialization. ##
1618## ------------------------ ##
a4f64981 1619
eb697db5
DN
1620# ac_fn_c_try_compile LINENO
1621# --------------------------
1622# Try to compile conftest.$ac_ext, and return whether this succeeded.
1623ac_fn_c_try_compile ()
5929fbe7 1624{
eb697db5
DN
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 rm -f conftest.$ac_objext
1627 if { { ac_try="$ac_compile"
5929fbe7
GM
1628case "(($ac_try" in
1629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1630 *) ac_try_echo=$ac_try;;
1631esac
eb697db5
DN
1632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1633$as_echo "$ac_try_echo"; } >&5
1634 (eval "$ac_compile") 2>conftest.err
5929fbe7 1635 ac_status=$?
eb697db5
DN
1636 if test -s conftest.err; then
1637 grep -v '^ *+' conftest.err >conftest.er1
1638 cat conftest.er1 >&5
1639 mv -f conftest.er1 conftest.err
1640 fi
1641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1642 test $ac_status = 0; } && {
5929fbe7
GM
1643 test -z "$ac_c_werror_flag" ||
1644 test ! -s conftest.err
eb697db5
DN
1645 } && test -s conftest.$ac_objext; then :
1646 ac_retval=0
8c5ff6dd 1647else
5929fbe7
GM
1648 $as_echo "$as_me: failed program was:" >&5
1649sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1650
eb697db5 1651 ac_retval=1
5929fbe7 1652fi
eb697db5
DN
1653 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1654 as_fn_set_status $ac_retval
1655
1656} # ac_fn_c_try_compile
1657
1658# ac_fn_c_try_link LINENO
1659# -----------------------
1660# Try to link conftest.$ac_ext, and return whether this succeeded.
1661ac_fn_c_try_link ()
1662{
1663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1664 rm -f conftest.$ac_objext conftest$ac_exeext
1665 if { { ac_try="$ac_link"
5929fbe7
GM
1666case "(($ac_try" in
1667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1668 *) ac_try_echo=$ac_try;;
1669esac
eb697db5
DN
1670eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1671$as_echo "$ac_try_echo"; } >&5
1672 (eval "$ac_link") 2>conftest.err
5929fbe7 1673 ac_status=$?
eb697db5
DN
1674 if test -s conftest.err; then
1675 grep -v '^ *+' conftest.err >conftest.er1
1676 cat conftest.er1 >&5
1677 mv -f conftest.er1 conftest.err
1678 fi
1679 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1680 test $ac_status = 0; } && {
5929fbe7
GM
1681 test -z "$ac_c_werror_flag" ||
1682 test ! -s conftest.err
eb697db5
DN
1683 } && test -s conftest$ac_exeext && {
1684 test "$cross_compiling" = yes ||
1685 $as_test_x conftest$ac_exeext
1686 }; then :
1687 ac_retval=0
5929fbe7
GM
1688else
1689 $as_echo "$as_me: failed program was:" >&5
1690sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1691
eb697db5 1692 ac_retval=1
cd03c74a 1693fi
eb697db5
DN
1694 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1695 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1696 # interfere with the next link command; also delete a directory that is
1697 # left behind by Apple's compiler. We do this before executing the actions.
1698 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1699 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1700 as_fn_set_status $ac_retval
08b47d3d 1701
eb697db5 1702} # ac_fn_c_try_link
08b47d3d 1703
eb697db5
DN
1704# ac_fn_c_try_cpp LINENO
1705# ----------------------
1706# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1707ac_fn_c_try_cpp ()
1708{
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 if { { ac_try="$ac_cpp conftest.$ac_ext"
5929fbe7
GM
1711case "(($ac_try" in
1712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1713 *) ac_try_echo=$ac_try;;
1714esac
eb697db5
DN
1715eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1716$as_echo "$ac_try_echo"; } >&5
1717 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
5929fbe7 1718 ac_status=$?
eb697db5
DN
1719 if test -s conftest.err; then
1720 grep -v '^ *+' conftest.err >conftest.er1
1721 cat conftest.er1 >&5
1722 mv -f conftest.er1 conftest.err
1723 fi
1724 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1725 test $ac_status = 0; } >/dev/null && {
5929fbe7
GM
1726 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1727 test ! -s conftest.err
eb697db5
DN
1728 }; then :
1729 ac_retval=0
5929fbe7
GM
1730else
1731 $as_echo "$as_me: failed program was:" >&5
1732sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1733
eb697db5
DN
1734 ac_retval=1
1735fi
1736 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1737 as_fn_set_status $ac_retval
1738
1739} # ac_fn_c_try_cpp
1740
1741# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1742# -------------------------------------------------------
1743# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1744# the include files in INCLUDES and setting the cache variable VAR
1745# accordingly.
1746ac_fn_c_check_header_mongrel ()
1747{
1748 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1751$as_echo_n "checking for $2... " >&6; }
1752if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1753 $as_echo_n "(cached) " >&6
1754fi
1755eval ac_res=\$$3
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1757$as_echo "$ac_res" >&6; }
1758else
1759 # Is the header compilable?
1760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1761$as_echo_n "checking $2 usability... " >&6; }
1762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1763/* end confdefs.h. */
1764$4
1765#include <$2>
1766_ACEOF
1767if ac_fn_c_try_compile "$LINENO"; then :
1768 ac_header_compiler=yes
1769else
1770 ac_header_compiler=no
8c5ff6dd 1771fi
eb697db5
DN
1772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1774$as_echo "$ac_header_compiler" >&6; }
e6df49e4 1775
eb697db5
DN
1776# Is the header present?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1778$as_echo_n "checking $2 presence... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h. */
1781#include <$2>
1782_ACEOF
1783if ac_fn_c_try_cpp "$LINENO"; then :
1784 ac_header_preproc=yes
1785else
1786 ac_header_preproc=no
1787fi
5929fbe7 1788rm -f conftest.err conftest.$ac_ext
eb697db5 1789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
5929fbe7 1790$as_echo "$ac_header_preproc" >&6; }
a4f64981 1791
5929fbe7 1792# So? What about this header?
eb697db5 1793case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
5929fbe7 1794 yes:no: )
eb697db5
DN
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1796$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1798$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
5929fbe7
GM
1799 ;;
1800 no:yes:* )
eb697db5
DN
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1802$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1804$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1806$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1808$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1810$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
5929fbe7
GM
1811 ;;
1812esac
eb697db5
DN
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1814$as_echo_n "checking for $2... " >&6; }
1815if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7
GM
1816 $as_echo_n "(cached) " >&6
1817else
eb697db5 1818 eval "$3=\$ac_header_compiler"
8c5ff6dd 1819fi
eb697db5
DN
1820eval ac_res=\$$3
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5929fbe7 1822$as_echo "$ac_res" >&6; }
a4f64981 1823fi
eb697db5 1824 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a4f64981 1825
eb697db5 1826} # ac_fn_c_check_header_mongrel
5929fbe7 1827
eb697db5
DN
1828# ac_fn_c_try_run LINENO
1829# ----------------------
1830# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1831# that executables *can* be run.
1832ac_fn_c_try_run ()
5929fbe7 1833{
eb697db5
DN
1834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835 if { { ac_try="$ac_link"
5929fbe7
GM
1836case "(($ac_try" in
1837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1838 *) ac_try_echo=$ac_try;;
1839esac
eb697db5
DN
1840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1841$as_echo "$ac_try_echo"; } >&5
1842 (eval "$ac_link") 2>&5
5929fbe7 1843 ac_status=$?
eb697db5
DN
1844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1845 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1846 { { case "(($ac_try" in
1847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1848 *) ac_try_echo=$ac_try;;
1849esac
1850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1851$as_echo "$ac_try_echo"; } >&5
1852 (eval "$ac_try") 2>&5
1853 ac_status=$?
1854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1855 test $ac_status = 0; }; }; then :
1856 ac_retval=0
8c5ff6dd 1857else
eb697db5
DN
1858 $as_echo "$as_me: program exited with status $ac_status" >&5
1859 $as_echo "$as_me: failed program was:" >&5
5929fbe7 1860sed 's/^/| /' conftest.$ac_ext >&5
15e12598 1861
eb697db5 1862 ac_retval=$ac_status
5929fbe7 1863fi
eb697db5
DN
1864 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1865 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1866 as_fn_set_status $ac_retval
1867
1868} # ac_fn_c_try_run
8c5ff6dd 1869
eb697db5
DN
1870# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1871# -------------------------------------------------------
1872# Tests whether HEADER exists and can be compiled using the include files in
1873# INCLUDES, setting the cache variable VAR accordingly.
1874ac_fn_c_check_header_compile ()
1875{
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1878$as_echo_n "checking for $2... " >&6; }
1879if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1880 $as_echo_n "(cached) " >&6
1881else
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883/* end confdefs.h. */
1884$4
1885#include <$2>
1886_ACEOF
1887if ac_fn_c_try_compile "$LINENO"; then :
1888 eval "$3=yes"
1889else
1890 eval "$3=no"
1891fi
1892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 1893fi
eb697db5
DN
1894eval ac_res=\$$3
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5929fbe7 1896$as_echo "$ac_res" >&6; }
eb697db5 1897 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
15e12598 1898
eb697db5 1899} # ac_fn_c_check_header_compile
e6df49e4 1900
eb697db5
DN
1901# ac_fn_c_check_decl LINENO SYMBOL VAR
1902# ------------------------------------
1903# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
1904ac_fn_c_check_decl ()
1905{
1906 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
1908$as_echo_n "checking whether $2 is declared... " >&6; }
1909if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7
GM
1910 $as_echo_n "(cached) " >&6
1911else
eb697db5 1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 1913/* end confdefs.h. */
eb697db5 1914$4
5929fbe7
GM
1915int
1916main ()
1917{
eb697db5
DN
1918#ifndef $2
1919 (void) $2;
1920#endif
e6df49e4 1921
eb697db5 1922 ;
5929fbe7
GM
1923 return 0;
1924}
1925_ACEOF
eb697db5
DN
1926if ac_fn_c_try_compile "$LINENO"; then :
1927 eval "$3=yes"
5929fbe7 1928else
eb697db5 1929 eval "$3=no"
5929fbe7 1930fi
eb697db5 1931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0c309b80 1932fi
eb697db5
DN
1933eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935$as_echo "$ac_res" >&6; }
1936 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
8c5ff6dd 1937
eb697db5 1938} # ac_fn_c_check_decl
0c309b80 1939
eb697db5
DN
1940# ac_fn_c_check_header_preproc LINENO HEADER VAR
1941# ----------------------------------------------
1942# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1943ac_fn_c_check_header_preproc ()
1944{
1945 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1947$as_echo_n "checking for $2... " >&6; }
1948if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1949 $as_echo_n "(cached) " >&6
1950else
1951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1952/* end confdefs.h. */
1953#include <$2>
1954_ACEOF
1955if ac_fn_c_try_cpp "$LINENO"; then :
1956 eval "$3=yes"
1957else
1958 eval "$3=no"
a4f64981 1959fi
eb697db5
DN
1960rm -f conftest.err conftest.$ac_ext
1961fi
1962eval ac_res=\$$3
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1964$as_echo "$ac_res" >&6; }
1965 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
e6df49e4 1966
eb697db5 1967} # ac_fn_c_check_header_preproc
a5edbe4a 1968
eb697db5
DN
1969# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1970# ----------------------------------------------------
1971# Tries to find if the field MEMBER exists in type AGGR, after including
1972# INCLUDES, setting cache variable VAR accordingly.
1973ac_fn_c_check_member ()
1974{
1975 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1977$as_echo_n "checking for $2.$3... " >&6; }
1978if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
1979 $as_echo_n "(cached) " >&6
1980else
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982/* end confdefs.h. */
1983$5
1984int
1985main ()
1986{
1987static $2 ac_aggr;
1988if (ac_aggr.$3)
1989return 0;
1990 ;
1991 return 0;
1992}
1993_ACEOF
1994if ac_fn_c_try_compile "$LINENO"; then :
1995 eval "$4=yes"
1996else
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$5
2000int
2001main ()
2002{
2003static $2 ac_aggr;
2004if (sizeof ac_aggr.$3)
2005return 0;
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 eval "$4=yes"
2012else
2013 eval "$4=no"
8c5ff6dd 2014fi
eb697db5 2015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 2016fi
eb697db5
DN
2017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2018fi
2019eval ac_res=\$$4
2020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2021$as_echo "$ac_res" >&6; }
2022 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a5edbe4a 2023
eb697db5 2024} # ac_fn_c_check_member
106c6f74 2025
eb697db5
DN
2026# ac_fn_c_check_func LINENO FUNC VAR
2027# ----------------------------------
2028# Tests whether FUNC exists, setting the cache variable VAR accordingly
2029ac_fn_c_check_func ()
2030{
2031 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2033$as_echo_n "checking for $2... " >&6; }
2034if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7
GM
2035 $as_echo_n "(cached) " >&6
2036else
eb697db5 2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 2038/* end confdefs.h. */
eb697db5
DN
2039/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2040 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2041#define $2 innocuous_$2
2042
2043/* System header to define __stub macros and hopefully few prototypes,
2044 which can conflict with char $2 (); below.
2045 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2046 <limits.h> exists even on freestanding compilers. */
2047
2048#ifdef __STDC__
2049# include <limits.h>
2050#else
2051# include <assert.h>
2052#endif
2053
2054#undef $2
8c5ff6dd 2055
5929fbe7
GM
2056/* Override any GCC internal prototype to avoid an error.
2057 Use char because int might match the return type of a GCC
2058 builtin and then its argument prototype would still apply. */
2059#ifdef __cplusplus
2060extern "C"
2061#endif
eb697db5
DN
2062char $2 ();
2063/* The GNU C library defines this for functions which it implements
2064 to always fail with ENOSYS. Some functions are actually named
2065 something starting with __ and the normal name is an alias. */
2066#if defined __stub_$2 || defined __stub___$2
2067choke me
2068#endif
2069
5929fbe7
GM
2070int
2071main ()
2072{
eb697db5 2073return $2 ();
5929fbe7
GM
2074 ;
2075 return 0;
2076}
2077_ACEOF
eb697db5
DN
2078if ac_fn_c_try_link "$LINENO"; then :
2079 eval "$3=yes"
5929fbe7 2080else
eb697db5
DN
2081 eval "$3=no"
2082fi
2083rm -f core conftest.err conftest.$ac_objext \
2084 conftest$ac_exeext conftest.$ac_ext
2085fi
2086eval ac_res=\$$3
2087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2088$as_echo "$ac_res" >&6; }
2089 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2090
2091} # ac_fn_c_check_func
2092
2093# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2094# -------------------------------------------
2095# Tests whether TYPE exists after having included INCLUDES, setting cache
2096# variable VAR accordingly.
2097ac_fn_c_check_type ()
2098{
2099 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2101$as_echo_n "checking for $2... " >&6; }
2102if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2103 $as_echo_n "(cached) " >&6
2104else
2105 eval "$3=no"
2106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112if (sizeof ($2))
2113 return 0;
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
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 :
e6df49e4 2132
eb697db5
DN
2133else
2134 eval "$3=yes"
2135fi
2136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2137fi
2138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 2139fi
eb697db5
DN
2140eval ac_res=\$$3
2141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2142$as_echo "$ac_res" >&6; }
2143 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2144
2145} # ac_fn_c_check_type
2146cat >config.log <<_ACEOF
2147This file contains any messages produced by compilers while
2148running configure, to aid debugging if configure makes a mistake.
2149
2150It was created by emacs $as_me 24.0.50, which was
2151generated by GNU Autoconf 2.65. Invocation command line was
2152
2153 $ $0 $@
2154
2155_ACEOF
2156exec 5>>config.log
2157{
2158cat <<_ASUNAME
2159## --------- ##
2160## Platform. ##
2161## --------- ##
2162
2163hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2164uname -m = `(uname -m) 2>/dev/null || echo unknown`
2165uname -r = `(uname -r) 2>/dev/null || echo unknown`
2166uname -s = `(uname -s) 2>/dev/null || echo unknown`
2167uname -v = `(uname -v) 2>/dev/null || echo unknown`
2168
2169/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2170/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2171
2172/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2173/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2174/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2175/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2176/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2177/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2178/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2179
2180_ASUNAME
2181
2182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2183for as_dir in $PATH
2184do
2185 IFS=$as_save_IFS
2186 test -z "$as_dir" && as_dir=.
2187 $as_echo "PATH: $as_dir"
2188 done
2189IFS=$as_save_IFS
2190
2191} >&5
2192
2193cat >&5 <<_ACEOF
2194
2195
2196## ----------- ##
2197## Core tests. ##
2198## ----------- ##
2199
2200_ACEOF
2201
2202
2203# Keep a trace of the command line.
2204# Strip out --no-create and --no-recursion so they do not pile up.
2205# Strip out --silent because we don't want to record it for future runs.
2206# Also quote any args containing shell meta-characters.
2207# Make two passes to allow for proper duplicate-argument suppression.
2208ac_configure_args=
2209ac_configure_args0=
2210ac_configure_args1=
2211ac_must_keep_next=false
2212for ac_pass in 1 2
2213do
2214 for ac_arg
2215 do
2216 case $ac_arg in
2217 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2218 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2219 | -silent | --silent | --silen | --sile | --sil)
2220 continue ;;
2221 *\'*)
2222 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2223 esac
2224 case $ac_pass in
2225 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2226 2)
2227 as_fn_append ac_configure_args1 " '$ac_arg'"
2228 if test $ac_must_keep_next = true; then
2229 ac_must_keep_next=false # Got value, back to normal.
2230 else
2231 case $ac_arg in
2232 *=* | --config-cache | -C | -disable-* | --disable-* \
2233 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2234 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2235 | -with-* | --with-* | -without-* | --without-* | --x)
2236 case "$ac_configure_args0 " in
2237 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2238 esac
2239 ;;
2240 -* ) ac_must_keep_next=true ;;
2241 esac
2242 fi
2243 as_fn_append ac_configure_args " '$ac_arg'"
2244 ;;
2245 esac
2246 done
2247done
2248{ ac_configure_args0=; unset ac_configure_args0;}
2249{ ac_configure_args1=; unset ac_configure_args1;}
2250
2251# When interrupted or exit'd, cleanup temporary files, and complete
2252# config.log. We remove comments because anyway the quotes in there
2253# would cause problems or look ugly.
2254# WARNING: Use '\'' to represent an apostrophe within the trap.
2255# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2256trap 'exit_status=$?
2257 # Save into config.log some information that might help in debugging.
2258 {
2259 echo
2260
2261 cat <<\_ASBOX
2262## ---------------- ##
2263## Cache variables. ##
2264## ---------------- ##
2265_ASBOX
2266 echo
2267 # The following way of writing the cache mishandles newlines in values,
2268(
2269 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2270 eval ac_val=\$$ac_var
2271 case $ac_val in #(
2272 *${as_nl}*)
2273 case $ac_var in #(
2274 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2275$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2276 esac
2277 case $ac_var in #(
2278 _ | IFS | as_nl) ;; #(
2279 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2280 *) { eval $ac_var=; unset $ac_var;} ;;
2281 esac ;;
2282 esac
2283 done
2284 (set) 2>&1 |
2285 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2286 *${as_nl}ac_space=\ *)
2287 sed -n \
2288 "s/'\''/'\''\\\\'\'''\''/g;
2289 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2290 ;; #(
2291 *)
2292 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2293 ;;
2294 esac |
2295 sort
2296)
2297 echo
08b47d3d 2298
eb697db5
DN
2299 cat <<\_ASBOX
2300## ----------------- ##
2301## Output variables. ##
2302## ----------------- ##
2303_ASBOX
2304 echo
2305 for ac_var in $ac_subst_vars
2306 do
2307 eval ac_val=\$$ac_var
2308 case $ac_val in
2309 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2310 esac
2311 $as_echo "$ac_var='\''$ac_val'\''"
2312 done | sort
2313 echo
a5edbe4a 2314
eb697db5
DN
2315 if test -n "$ac_subst_files"; then
2316 cat <<\_ASBOX
2317## ------------------- ##
2318## File substitutions. ##
2319## ------------------- ##
2320_ASBOX
2321 echo
2322 for ac_var in $ac_subst_files
2323 do
2324 eval ac_val=\$$ac_var
2325 case $ac_val in
2326 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2327 esac
2328 $as_echo "$ac_var='\''$ac_val'\''"
2329 done | sort
2330 echo
2331 fi
a5edbe4a 2332
eb697db5
DN
2333 if test -s confdefs.h; then
2334 cat <<\_ASBOX
2335## ----------- ##
2336## confdefs.h. ##
2337## ----------- ##
2338_ASBOX
2339 echo
2340 cat confdefs.h
2341 echo
2342 fi
2343 test "$ac_signal" != 0 &&
2344 $as_echo "$as_me: caught signal $ac_signal"
2345 $as_echo "$as_me: exit $exit_status"
2346 } >&5
2347 rm -f core *.core core.conftest.* &&
2348 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2349 exit $exit_status
2350' 0
2351for ac_signal in 1 2 13 15; do
2352 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2353done
2354ac_signal=0
cd03c74a 2355
eb697db5
DN
2356# confdefs.h avoids OS command line length limits that DEFS can exceed.
2357rm -f -r conftest* confdefs.h
a5edbe4a 2358
eb697db5 2359$as_echo "/* confdefs.h */" > confdefs.h
a4f64981 2360
eb697db5 2361# Predefined preprocessor variables.
8c5ff6dd 2362
eb697db5
DN
2363cat >>confdefs.h <<_ACEOF
2364#define PACKAGE_NAME "$PACKAGE_NAME"
5929fbe7 2365_ACEOF
8c5ff6dd 2366
eb697db5
DN
2367cat >>confdefs.h <<_ACEOF
2368#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2369_ACEOF
8c5ff6dd 2370
eb697db5
DN
2371cat >>confdefs.h <<_ACEOF
2372#define PACKAGE_VERSION "$PACKAGE_VERSION"
5929fbe7 2373_ACEOF
8c5ff6dd 2374
eb697db5
DN
2375cat >>confdefs.h <<_ACEOF
2376#define PACKAGE_STRING "$PACKAGE_STRING"
5929fbe7 2377_ACEOF
8c5ff6dd 2378
eb697db5
DN
2379cat >>confdefs.h <<_ACEOF
2380#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2381_ACEOF
8c5ff6dd 2382
eb697db5
DN
2383cat >>confdefs.h <<_ACEOF
2384#define PACKAGE_URL "$PACKAGE_URL"
5929fbe7 2385_ACEOF
8c5ff6dd 2386
8c5ff6dd 2387
eb697db5
DN
2388# Let the site file select an alternate cache file if it wants to.
2389# Prefer an explicitly selected file to automatically selected ones.
2390ac_site_file1=NONE
2391ac_site_file2=NONE
2392if test -n "$CONFIG_SITE"; then
2393 ac_site_file1=$CONFIG_SITE
2394elif test "x$prefix" != xNONE; then
2395 ac_site_file1=$prefix/share/config.site
2396 ac_site_file2=$prefix/etc/config.site
2397else
2398 ac_site_file1=$ac_default_prefix/share/config.site
2399 ac_site_file2=$ac_default_prefix/etc/config.site
5929fbe7 2400fi
eb697db5
DN
2401for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2402do
2403 test "x$ac_site_file" = xNONE && continue
2404 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2406$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2407 sed 's/^/| /' "$ac_site_file" >&5
2408 . "$ac_site_file"
2409 fi
2410done
49ebbd65 2411
eb697db5
DN
2412if test -r "$cache_file"; then
2413 # Some versions of bash will fail to source /dev/null (special files
2414 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2415 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2416 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2417$as_echo "$as_me: loading cache $cache_file" >&6;}
2418 case $cache_file in
2419 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2420 *) . "./$cache_file";;
2421 esac
2422 fi
5929fbe7 2423else
eb697db5
DN
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2425$as_echo "$as_me: creating cache $cache_file" >&6;}
2426 >$cache_file
2427fi
49ebbd65 2428
eb697db5
DN
2429as_fn_append ac_header_list " stdlib.h"
2430as_fn_append ac_header_list " unistd.h"
2431as_fn_append ac_header_list " sys/param.h"
2432as_fn_append ac_header_list " sys/time.h"
2433as_fn_append ac_func_list " alarm"
2434# Check that the precious variables saved in the cache have kept the same
2435# value.
2436ac_cache_corrupted=false
2437for ac_var in $ac_precious_vars; do
2438 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2439 eval ac_new_set=\$ac_env_${ac_var}_set
2440 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2441 eval ac_new_val=\$ac_env_${ac_var}_value
2442 case $ac_old_set,$ac_new_set in
2443 set,)
2444 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2445$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2446 ac_cache_corrupted=: ;;
2447 ,set)
2448 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2449$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2450 ac_cache_corrupted=: ;;
2451 ,);;
2452 *)
2453 if test "x$ac_old_val" != "x$ac_new_val"; then
2454 # differences in whitespace do not lead to failure.
2455 ac_old_val_w=`echo x $ac_old_val`
2456 ac_new_val_w=`echo x $ac_new_val`
2457 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2458 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2459$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2460 ac_cache_corrupted=:
2461 else
2462 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2463$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2464 eval $ac_var=\$ac_old_val
2465 fi
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2467$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2469$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2470 fi;;
2471 esac
2472 # Pass precious variables to config.status.
2473 if test "$ac_new_set" = set; then
2474 case $ac_new_val in
2475 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2476 *) ac_arg=$ac_var=$ac_new_val ;;
2477 esac
2478 case " $ac_configure_args " in
2479 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2480 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
8c5ff6dd 2481 esac
eb697db5
DN
2482 fi
2483done
2484if $ac_cache_corrupted; then
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2487 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2488$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2489 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2490fi
2491## -------------------- ##
2492## Main body of script. ##
2493## -------------------- ##
2494
2495ac_ext=c
2496ac_cpp='$CPP $CPPFLAGS'
2497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2499ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 2500
e6df49e4 2501
eb697db5 2502ac_config_headers="$ac_config_headers src/config.h:src/config.in"
49ebbd65 2503
a4f64981 2504
a4f64981 2505
eb697db5
DN
2506test "$program_prefix" != NONE &&
2507 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2508# Use a double $ so make ignores it.
2509test "$program_suffix" != NONE &&
2510 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2511# Double any \ or $.
2512# By default was `s,x,x', remove it if useless.
2513ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2514program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
a4f64981 2515
49ebbd65 2516
eb697db5
DN
2517lispdir='${datadir}/emacs/${version}/lisp'
2518locallisppath='${datadir}/emacs/${version}/site-lisp:'\
2519'${datadir}/emacs/site-lisp'
2520lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
2521etcdir='${datadir}/emacs/${version}/etc'
2522archlibdir='${libexecdir}/emacs/${version}/${configuration}'
2523docdir='${datadir}/emacs/${version}/etc'
2524gamedir='${localstatedir}/games/emacs'
49ebbd65 2525
eb697db5 2526gameuser=games
49ebbd65 2527
49ebbd65 2528
a4f64981 2529
eb697db5
DN
2530
2531# Check whether --with-pop was given.
2532if test "${with_pop+set}" = set; then :
2533 withval=$with_pop;
5929fbe7 2534else
eb697db5
DN
2535 with_pop=yes
2536fi
2537
2538if test "$with_pop" = yes; then
2539 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
a4f64981 2540
5929fbe7
GM
2541fi
2542
5929fbe7 2543
eb697db5
DN
2544# Check whether --with-kerberos was given.
2545if test "${with_kerberos+set}" = set; then :
2546 withval=$with_kerberos;
5929fbe7 2547else
eb697db5
DN
2548 with_kerberos=no
2549fi
2550
2551if test "$with_kerberos" != no; then
2552 $as_echo "#define KERBEROS 1" >>confdefs.h
9452ded1 2553
5929fbe7 2554fi
a4f64981 2555
15e12598 2556
eb697db5
DN
2557# Check whether --with-kerberos5 was given.
2558if test "${with_kerberos5+set}" = set; then :
2559 withval=$with_kerberos5;
5929fbe7 2560else
eb697db5 2561 with_kerberos5=no
a4f64981
GM
2562fi
2563
eb697db5
DN
2564if test "${with_kerberos5}" != no; then
2565 if test "${with_kerberos}" = no; then
2566 with_kerberos=yes
2567 $as_echo "#define KERBEROS 1" >>confdefs.h
a4f64981 2568
5929fbe7 2569 fi
a5edbe4a 2570
eb697db5 2571$as_echo "#define KERBEROS5 1" >>confdefs.h
a4f64981 2572
eb697db5 2573fi
a4f64981 2574
a5edbe4a 2575
eb697db5
DN
2576# Check whether --with-hesiod was given.
2577if test "${with_hesiod+set}" = set; then :
2578 withval=$with_hesiod;
49ebbd65 2579else
eb697db5
DN
2580 with_hesiod=no
2581fi
5929fbe7 2582
eb697db5 2583if test "$with_hesiod" != no; then
5929fbe7 2584
eb697db5 2585$as_echo "#define HESIOD 1" >>confdefs.h
5929fbe7 2586
eb697db5 2587fi
5929fbe7 2588
5929fbe7 2589
eb697db5
DN
2590# Check whether --with-mmdf was given.
2591if test "${with_mmdf+set}" = set; then :
2592 withval=$with_mmdf;
8c5ff6dd 2593else
eb697db5 2594 with_mmdf=no
15e12598 2595fi
5929fbe7 2596
eb697db5 2597if test "$with_mmdf" != no; then
a5edbe4a 2598
eb697db5 2599$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
a5edbe4a 2600
8c5ff6dd 2601fi
5929fbe7 2602
5929fbe7 2603
eb697db5
DN
2604# Check whether --with-mail-unlink was given.
2605if test "${with_mail_unlink+set}" = set; then :
2606 withval=$with_mail_unlink;
8c5ff6dd 2607else
eb697db5 2608 with_mail_unlink=no
8c5ff6dd 2609fi
5929fbe7 2610
eb697db5
DN
2611if test "$with_mail_unlink" != no; then
2612
2613$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
2614
8c5ff6dd 2615fi
a5edbe4a 2616
5929fbe7 2617
eb697db5
DN
2618# Check whether --with-mailhost was given.
2619if test "${with_mailhost+set}" = set; then :
2620 withval=$with_mailhost;
2621cat >>confdefs.h <<_ACEOF
2622#define MAILHOST "$withval"
5929fbe7
GM
2623_ACEOF
2624
8c5ff6dd 2625fi
a4f64981 2626
5929fbe7 2627
5929fbe7 2628
eb697db5
DN
2629# Check whether --with-sound was given.
2630if test "${with_sound+set}" = set; then :
2631 withval=$with_sound;
2632else
2633 with_sound=yes
2634fi
5929fbe7 2635
5929fbe7 2636
a4f64981 2637
eb697db5
DN
2638# Check whether --with-sync-input was given.
2639if test "${with_sync_input+set}" = set; then :
2640 withval=$with_sync_input;
8c5ff6dd 2641else
eb697db5 2642 with_sync_input=yes
8c5ff6dd 2643fi
a4f64981 2644
eb697db5 2645if test "$with_sync_input" = yes; then
a4f64981 2646
eb697db5 2647$as_echo "#define SYNC_INPUT 1" >>confdefs.h
5929fbe7 2648
eb697db5 2649fi
5929fbe7 2650
5929fbe7 2651
eb697db5
DN
2652# Check whether --with-x-toolkit was given.
2653if test "${with_x_toolkit+set}" = set; then :
2654 withval=$with_x_toolkit; case "${withval}" in
2655 y | ye | yes ) val=gtk ;;
2656 n | no ) val=no ;;
2657 l | lu | luc | luci | lucid ) val=lucid ;;
2658 a | at | ath | athe | athen | athena ) val=athena ;;
2659 m | mo | mot | moti | motif ) val=motif ;;
2660 g | gt | gtk ) val=gtk ;;
2661 * )
2662as_fn_error "\`--with-x-toolkit=$withval' is invalid;
2663this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
2664\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
2665 ;;
2666 esac
2667 with_x_toolkit=$val
5929fbe7 2668
eb697db5 2669fi
5929fbe7 2670
5929fbe7
GM
2671
2672
eb697db5
DN
2673# Check whether --with-xpm was given.
2674if test "${with_xpm+set}" = set; then :
2675 withval=$with_xpm;
2676else
2677 with_xpm=yes
2678fi
5929fbe7 2679
5929fbe7 2680
eb697db5
DN
2681# Check whether --with-jpeg was given.
2682if test "${with_jpeg+set}" = set; then :
2683 withval=$with_jpeg;
2684else
2685 with_jpeg=yes
2686fi
5929fbe7
GM
2687
2688
eb697db5
DN
2689# Check whether --with-tiff was given.
2690if test "${with_tiff+set}" = set; then :
2691 withval=$with_tiff;
2692else
2693 with_tiff=yes
2694fi
5929fbe7
GM
2695
2696
eb697db5
DN
2697# Check whether --with-gif was given.
2698if test "${with_gif+set}" = set; then :
2699 withval=$with_gif;
2700else
2701 with_gif=yes
2702fi
5929fbe7 2703
5929fbe7 2704
eb697db5
DN
2705# Check whether --with-png was given.
2706if test "${with_png+set}" = set; then :
2707 withval=$with_png;
2708else
2709 with_png=yes
8c5ff6dd 2710fi
5929fbe7
GM
2711
2712
eb697db5
DN
2713# Check whether --with-rsvg was given.
2714if test "${with_rsvg+set}" = set; then :
2715 withval=$with_rsvg;
2716else
2717 with_rsvg=yes
2718fi
5929fbe7
GM
2719
2720
5929fbe7 2721
eb697db5
DN
2722# Check whether --with-xft was given.
2723if test "${with_xft+set}" = set; then :
2724 withval=$with_xft;
8c5ff6dd 2725else
eb697db5 2726 with_xft=yes
8c5ff6dd 2727fi
eb697db5
DN
2728
2729
2730# Check whether --with-libotf was given.
2731if test "${with_libotf+set}" = set; then :
2732 withval=$with_libotf;
8c5ff6dd 2733else
eb697db5 2734 with_libotf=yes
8c5ff6dd 2735fi
e6df49e4
GM
2736
2737
eb697db5
DN
2738# Check whether --with-m17n-flt was given.
2739if test "${with_m17n_flt+set}" = set; then :
2740 withval=$with_m17n_flt;
2741else
2742 with_m17n_flt=yes
2743fi
2744
5929fbe7 2745
5929fbe7 2746
eb697db5
DN
2747# Check whether --with-toolkit-scroll-bars was given.
2748if test "${with_toolkit_scroll_bars+set}" = set; then :
2749 withval=$with_toolkit_scroll_bars;
2750else
2751 with_toolkit_scroll_bars=yes
2752fi
5929fbe7 2753
5929fbe7 2754
eb697db5
DN
2755# Check whether --with-xaw3d was given.
2756if test "${with_xaw3d+set}" = set; then :
2757 withval=$with_xaw3d;
2758else
2759 with_xaw3d=yes
2760fi
5929fbe7 2761
5929fbe7 2762
eb697db5
DN
2763# Check whether --with-xim was given.
2764if test "${with_xim+set}" = set; then :
2765 withval=$with_xim;
2766else
2767 with_xim=yes
2768fi
5929fbe7
GM
2769
2770
eb697db5
DN
2771# Check whether --with-ns was given.
2772if test "${with_ns+set}" = set; then :
2773 withval=$with_ns;
2774else
2775 with_ns=no
2776fi
5929fbe7 2777
5929fbe7 2778
eb697db5
DN
2779
2780# Check whether --with-gpm was given.
2781if test "${with_gpm+set}" = set; then :
2782 withval=$with_gpm;
2783else
2784 with_gpm=yes
8c5ff6dd 2785fi
5929fbe7
GM
2786
2787
eb697db5
DN
2788# Check whether --with-dbus was given.
2789if test "${with_dbus+set}" = set; then :
2790 withval=$with_dbus;
2791else
2792 with_dbus=yes
2793fi
5929fbe7
GM
2794
2795
eb697db5
DN
2796# Check whether --with-gconf was given.
2797if test "${with_gconf+set}" = set; then :
2798 withval=$with_gconf;
2799else
2800 with_gconf=yes
2801fi
5929fbe7 2802
5929fbe7 2803
eb697db5
DN
2804# Check whether --with-selinux was given.
2805if test "${with_selinux+set}" = set; then :
2806 withval=$with_selinux;
8c5ff6dd 2807else
eb697db5
DN
2808 with_selinux=yes
2809fi
5929fbe7 2810
5929fbe7 2811
eb697db5
DN
2812## For the times when you want to build Emacs but don't have
2813## a suitable makeinfo, and can live without the manuals.
5929fbe7 2814
eb697db5
DN
2815# Check whether --with-makeinfo was given.
2816if test "${with_makeinfo+set}" = set; then :
2817 withval=$with_makeinfo;
2818else
2819 with_makeinfo=yes
2820fi
5929fbe7 2821
5929fbe7 2822
0c309b80 2823
eb697db5
DN
2824# Check whether --with-pkg-config-prog was given.
2825if test "${with_pkg_config_prog+set}" = set; then :
2826 withval=$with_pkg_config_prog;
8c5ff6dd 2827fi
5929fbe7 2828
eb697db5
DN
2829if test "X${with_pkg_config_prog}" != X; then
2830 if test "${with_pkg_config_prog}" != yes; then
2831 PKG_CONFIG="${with_pkg_config_prog}"
2832 fi
8c5ff6dd 2833fi
e6df49e4 2834
eb697db5 2835CRT_DIR=
a4f64981 2836
eb697db5
DN
2837# Check whether --with-crt-dir was given.
2838if test "${with_crt_dir+set}" = set; then :
2839 withval=$with_crt_dir;
2840fi
2841
2842CRT_DIR="${with_crt_dir}"
5929fbe7 2843
e6df49e4 2844
eb697db5
DN
2845# Check whether --with-gnustep-conf was given.
2846if test "${with_gnustep_conf+set}" = set; then :
2847 withval=$with_gnustep_conf;
15e12598 2848fi
e6df49e4 2849
eb697db5
DN
2850test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2851 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2852test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2853 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
e6df49e4 2854
eb697db5
DN
2855# Check whether --enable-ns-self-contained was given.
2856if test "${enable_ns_self_contained+set}" = set; then :
2857 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
2858else
2859 EN_NS_SELF_CONTAINED=yes
2860fi
e6df49e4 2861
5929fbe7 2862
eb697db5
DN
2863# Check whether --enable-asserts was given.
2864if test "${enable_asserts+set}" = set; then :
2865 enableval=$enable_asserts; USE_XASSERTS=$enableval
2866else
2867 USE_XASSERTS=no
2868fi
a4f64981
GM
2869
2870
eb697db5
DN
2871# Check whether --enable-maintainer-mode was given.
2872if test "${enable_maintainer_mode+set}" = set; then :
2873 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
5929fbe7 2874else
eb697db5
DN
2875 USE_MAINTAINER_MODE=no
2876fi
a4f64981 2877
eb697db5
DN
2878if test $USE_MAINTAINER_MODE = yes; then
2879 MAINT=
2880else
2881 MAINT=#
2882fi
e6df49e4 2883
5929fbe7 2884
eb697db5
DN
2885# Check whether --enable-locallisppath was given.
2886if test "${enable_locallisppath+set}" = set; then :
2887 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
2888 locallisppath=
2889elif test "${enableval}" != "yes"; then
2890 locallisppath=${enableval}
2891fi
2892fi
5929fbe7 2893
5929fbe7 2894
eb697db5
DN
2895# Check whether --enable-checking was given.
2896if test "${enable_checking+set}" = set; then :
2897 enableval=$enable_checking; ac_checking_flags="${enableval}"
2898fi
2899
2900IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2901for check in $ac_checking_flags
2902do
2903 case $check in
2904 # these set all the flags to specific states
2905 yes) ac_enable_checking=1 ;;
2906 no) ac_enable_checking= ;
2907 ac_gc_check_stringbytes= ;
2908 ac_gc_check_string_overrun= ;
2909 ac_gc_check_string_free_list= ;
2910 ac_xmalloc_overrun= ;
2911 ac_gc_check_cons_list= ;;
2912 all) ac_enable_checking=1 ;
2913 ac_gc_check_stringbytes=1 ;
2914 ac_gc_check_string_overrun=1 ;
2915 ac_gc_check_string_free_list=1 ;
2916 ac_xmalloc_overrun=1 ;
2917 ac_gc_check_cons_list=1 ;;
2918 # these enable particular checks
2919 stringbytes) ac_gc_check_stringbytes=1 ;;
2920 stringoverrun) ac_gc_check_string_overrun=1 ;;
2921 stringfreelist) ac_gc_check_string_free_list=1 ;;
2922 xmallocoverrun) ac_xmalloc_overrun=1 ;;
2923 conslist) ac_gc_check_cons_list=1 ;;
2924 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
2925 esac
2926done
2927IFS="$ac_save_IFS"
2928
2929if test x$ac_enable_checking != x ; then
2930
2931$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
2932
2933fi
2934if test x$ac_gc_check_stringbytes != x ; then
2935
2936$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
5929fbe7 2937
5929fbe7 2938fi
eb697db5
DN
2939if test x$ac_gc_check_stringoverrun != x ; then
2940
2941$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
5929fbe7 2942
5929fbe7 2943fi
eb697db5
DN
2944if test x$ac_gc_check_string_free_list != x ; then
2945
2946$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
2947
5929fbe7 2948fi
eb697db5 2949if test x$ac_xmalloc_overrun != x ; then
a4f64981 2950
eb697db5 2951$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
5929fbe7 2952
eb697db5
DN
2953fi
2954if test x$ac_gc_check_cons_list != x ; then
5929fbe7 2955
eb697db5 2956$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
5929fbe7 2957
eb697db5
DN
2958fi
2959
2960# Check whether --enable-profiling was given.
2961if test "${enable_profiling+set}" = set; then :
2962 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
2963fi
2964
2965if test x$ac_enable_profiling != x ; then
2966 PROFILING_CFLAGS="-DPROFILING=1 -pg"
2967 PROFILING_LDFLAGS="-pg"
5929fbe7 2968else
eb697db5
DN
2969 PROFILING_CFLAGS=
2970 PROFILING_LDFLAGS=
2971fi
a4f64981 2972
eb697db5
DN
2973# Check whether --enable-autodepend was given.
2974if test "${enable_autodepend+set}" = set; then :
2975 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
2976else
2977 ac_enable_autodepend=yes
2978fi
8c5ff6dd 2979
eb697db5
DN
2980
2981#### Make srcdir absolute, if it isn't already. It's important to
2982#### avoid running the path through pwd unnecessarily, since pwd can
2983#### give you automounter prefixes, which can go away. We do all this
2984#### so Emacs can find its files when run uninstalled.
2985## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2986unset CDPATH
2987case "${srcdir}" in
2988 /* ) ;;
2989 . )
2990 ## We may be able to use the $PWD environment variable to make this
2991 ## absolute. But sometimes PWD is inaccurate.
2992 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2993 ## but that tested only for a well-formed and valid PWD,
2994 ## it did not object when PWD was well-formed and valid but just wrong.
2995 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
2996 then
2997 srcdir="$PWD"
2998 else
2999 srcdir="`(cd ${srcdir}; pwd)`"
3000 fi
3001 ;;
3002 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
a4f64981 3003esac
e6df49e4 3004
eb697db5
DN
3005#### Check if the source directory already has a configured system in it.
3006if test `pwd` != `(cd ${srcdir} && pwd)` \
3007 && test -f "${srcdir}/src/config.h" ; then
3008 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
3009 as a build directory right now; it has been configured in its own
3010 right. To configure in another directory as well, you MUST
3011 use GNU make. If you do not have GNU make, then you must
3012 now do \`make distclean' in ${srcdir},
3013 and then run $0 again." >&5
3014$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
3015 as a build directory right now; it has been configured in its own
3016 right. To configure in another directory as well, you MUST
3017 use GNU make. If you do not have GNU make, then you must
3018 now do \`make distclean' in ${srcdir},
3019 and then run $0 again." >&2;}
5929fbe7
GM
3020fi
3021
eb697db5
DN
3022#### Given the configuration name, set machfile and opsysfile to the
3023#### names of the m/*.h and s/*.h files we should use.
3024
3025### Canonicalize the configuration name.
3026
3027ac_aux_dir=
3028for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3029 for ac_t in install-sh install.sh shtool; do
3030 if test -f "$ac_dir/$ac_t"; then
3031 ac_aux_dir=$ac_dir
3032 ac_install_sh="$ac_aux_dir/$ac_t -c"
3033 break 2
3034 fi
3035 done
3036done
3037if test -z "$ac_aux_dir"; then
3038 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5929fbe7 3039fi
eb697db5
DN
3040
3041# These three variables are undocumented and unsupported,
3042# and are intended to be withdrawn in a future Autoconf release.
3043# They can cause serious problems if a builder's source tree is in a directory
3044# whose full name contains unusual characters.
3045ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3046ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3047ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3048
3049
3050# Make sure we can run config.sub.
3051$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3052 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3053
3054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3055$as_echo_n "checking build system type... " >&6; }
3056if test "${ac_cv_build+set}" = set; then :
3057 $as_echo_n "(cached) " >&6
8c5ff6dd 3058else
eb697db5
DN
3059 ac_build_alias=$build_alias
3060test "x$ac_build_alias" = x &&
3061 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3062test "x$ac_build_alias" = x &&
3063 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3064ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3065 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3066
15e12598 3067fi
eb697db5
DN
3068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3069$as_echo "$ac_cv_build" >&6; }
3070case $ac_cv_build in
3071*-*-*) ;;
3072*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3073esac
3074build=$ac_cv_build
3075ac_save_IFS=$IFS; IFS='-'
3076set x $ac_cv_build
3077shift
3078build_cpu=$1
3079build_vendor=$2
3080shift; shift
3081# Remember, the first character of IFS is used to create $*,
3082# except with old shells:
3083build_os=$*
3084IFS=$ac_save_IFS
3085case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15e12598 3086
5929fbe7 3087
eb697db5
DN
3088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3089$as_echo_n "checking host system type... " >&6; }
3090if test "${ac_cv_host+set}" = set; then :
5929fbe7
GM
3091 $as_echo_n "(cached) " >&6
3092else
eb697db5
DN
3093 if test "x$host_alias" = x; then
3094 ac_cv_host=$ac_cv_build
3095else
3096 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3097 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3098fi
5929fbe7 3099
eb697db5
DN
3100fi
3101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3102$as_echo "$ac_cv_host" >&6; }
3103case $ac_cv_host in
3104*-*-*) ;;
3105*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3106esac
3107host=$ac_cv_host
3108ac_save_IFS=$IFS; IFS='-'
3109set x $ac_cv_host
3110shift
3111host_cpu=$1
3112host_vendor=$2
3113shift; shift
3114# Remember, the first character of IFS is used to create $*,
3115# except with old shells:
3116host_os=$*
3117IFS=$ac_save_IFS
3118case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5929fbe7 3119
5929fbe7 3120
eb697db5
DN
3121canonical=$host
3122configuration=${host_alias-${build_alias-$host}}
5929fbe7 3123
5929fbe7 3124
5929fbe7 3125
eb697db5
DN
3126### If you add support for a new configuration, add code to this
3127### switch statement to recognize your configuration name and select
3128### the appropriate operating system and machine description files.
8c5ff6dd 3129
eb697db5
DN
3130### You would hope that you could choose an m/*.h file pretty much
3131### based on the machine portion of the configuration name, and an s/*.h
3132### file based on the operating system portion. However, it turns out
3133### that each m/*.h file is pretty manufacturer-specific - for
3134### example mips.h is MIPS
3135### So we basically have to have a special case for each
3136### configuration name.
3137###
3138### As far as handling version numbers on operating systems is
3139### concerned, make sure things will fail in a fixable way. If
3140### /etc/MACHINES doesn't say anything about version numbers, be
3141### prepared to handle anything reasonably. If version numbers
3142### matter, be sure /etc/MACHINES says something about it.
3143
3144machine='' opsys='' unported=no
3145case "${canonical}" in
3146
3147 ## FreeBSD ports
3148 *-*-freebsd* )
3149 opsys=freebsd
3150 case "${canonical}" in
3151 alpha*) machine=alpha ;;
3152 amd64-*|x86_64-*) machine=amdx86-64 ;;
3153 arm*) machine=arm ;;
3154 ia64-*) machine=ia64 ;;
3155 i[3456]86-*) machine=intel386 ;;
3156 powerpc-*) machine=macppc ;;
3157 sparc-*) machine=sparc ;;
3158 sparc64-*) machine=sparc ;;
3159 esac
3160 ;;
5929fbe7 3161
eb697db5
DN
3162 ## FreeBSD kernel + glibc based userland
3163 *-*-kfreebsd*gnu* )
3164 opsys=gnu-kfreebsd
3165 case "${canonical}" in
3166 alpha*) machine=alpha ;;
3167 amd64-*|x86_64-*) machine=amdx86-64 ;;
3168 ia64-*) machine=ia64 ;;
3169 i[3456]86-*) machine=intel386 ;;
3170 powerpc-*) machine=macppc ;;
3171 sparc-*) machine=sparc ;;
3172 sparc64-*) machine=sparc ;;
3173 esac
3174 ;;
5929fbe7 3175
eb697db5
DN
3176 ## NetBSD ports
3177 *-*-netbsd* )
3178 opsys=netbsd
3179 case "${canonical}" in
3180 alpha*) machine=alpha ;;
3181 x86_64-*) machine=amdx86-64 ;;
3182 arm-*) machine=arm ;;
3183 hppa-*) machine=hp800 ;;
3184 i[3456]86-*) machine=intel386 ;;
3185 m68k-*) machine=m68k ;;
3186 powerpc-*) machine=macppc ;;
3187 mips-*) machine=mips ;;
3188 mipse[bl]-*) machine=mips ;;
3189 sparc*-) machine=sparc ;;
3190 vax-*) machine=vax ;;
3191 esac
3192 ;;
e6df49e4 3193
eb697db5
DN
3194 ## OpenBSD ports
3195 *-*-openbsd* )
3196 opsys=openbsd
3197 case "${canonical}" in
3198 alpha*) machine=alpha ;;
3199 x86_64-*) machine=amdx86-64 ;;
3200 arm-*) machine=arm ;;
3201 hppa-*) machine=hp800 ;;
3202 i386-*) machine=intel386 ;;
3203 powerpc-*) machine=macppc ;;
3204 sparc*) machine=sparc ;;
3205 vax-*) machine=vax ;;
3206 esac
3207 ;;
e6df49e4 3208
eb697db5
DN
3209 alpha*-*-linux-gnu* )
3210 machine=alpha opsys=gnu-linux
3211 ;;
e6df49e4 3212
eb697db5
DN
3213 arm*-*-linux-gnu* )
3214 machine=arm opsys=gnu-linux
3215 ;;
5929fbe7 3216
eb697db5
DN
3217 ## Apple Darwin / Mac OS X
3218 *-apple-darwin* )
3219 case "${canonical}" in
3220 i[3456]86-* ) machine=intel386 ;;
3221 powerpc-* ) machine=macppc ;;
3222 x86_64-* ) machine=amdx86-64 ;;
3223 * ) unported=yes ;;
3224 esac
3225 opsys=darwin
3226 # Define CPP as follows to make autoconf work correctly.
3227 CPP="${CC-cc} -E -no-cpp-precomp"
3228 # Use fink packages if available.
3229 if test -d /sw/include && test -d /sw/lib; then
3230 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3231 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3232 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3233 fi
3234 ;;
5929fbe7 3235
eb697db5
DN
3236 ## HP 9000 series 700 and 800, running HP/UX
3237 hppa*-hp-hpux10.2* )
3238 machine=hp800 opsys=hpux10-20
3239 ;;
3240 hppa*-hp-hpux1[1-9]* )
3241 machine=hp800 opsys=hpux11
3242 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
3243 ;;
5929fbe7 3244
eb697db5
DN
3245 hppa*-*-linux-gnu* )
3246 machine=hp800 opsys=gnu-linux
3247 ;;
5929fbe7 3248
eb697db5
DN
3249 ## IBM machines
3250 s390-*-linux-gnu* )
3251 machine=ibms390 opsys=gnu-linux
3252 ;;
3253 s390x-*-linux-gnu* )
3254 machine=ibms390x opsys=gnu-linux
3255 ;;
3256 rs6000-ibm-aix4.[23]* )
3257 machine=ibmrs6000 opsys=aix4-2
3258 ;;
3259 powerpc-ibm-aix4.[23]* )
3260 machine=ibmrs6000 opsys=aix4-2
3261 ;;
3262 rs6000-ibm-aix[56]* )
3263 machine=ibmrs6000 opsys=aix4-2
3264 ;;
3265 powerpc-ibm-aix[56]* )
3266 machine=ibmrs6000 opsys=aix4-2
3267 ;;
5929fbe7 3268
eb697db5
DN
3269 ## Macintosh PowerPC
3270 powerpc*-*-linux-gnu* )
3271 machine=macppc opsys=gnu-linux
3272 ;;
5929fbe7 3273
eb697db5
DN
3274 ## Silicon Graphics machines
3275 ## Iris 4D
3276 mips-sgi-irix6.5 )
3277 machine=iris4d opsys=irix6-5
3278 # Without defining _LANGUAGE_C, things get masked out in the headers
3279 # so that, for instance, grepping for `free' in stdlib.h fails and
3280 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3281 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
3282 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
3283 ;;
5929fbe7 3284
eb697db5
DN
3285 ## Suns
3286 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3287 machine=sparc opsys=gnu-linux
3288 ;;
15e12598 3289
eb697db5
DN
3290 *-sun-solaris* \
3291 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3292 | x86_64-*-solaris2* | x86_64-*-sunos5*)
3293 case "${canonical}" in
3294 i[3456]86-*-* ) machine=intel386 ;;
3295 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
3296 sparc* ) machine=sparc ;;
3297 * ) unported=yes ;;
3298 esac
3299 case "${canonical}" in
3300 *-sunos5.6* | *-solaris2.6* )
3301 opsys=sol2-6
3302 NON_GNU_CPP=/usr/ccs/lib/cpp
3303 RANLIB="ar -ts"
3304 ;;
3305 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
3306 opsys=sol2-6
3307 emacs_check_sunpro_c=yes
3308 NON_GNU_CPP=/usr/ccs/lib/cpp
3309 ;;
3310 *-sunos5* | *-solaris* )
3311 opsys=sol2-10
3312 emacs_check_sunpro_c=yes
3313 NON_GNU_CPP=/usr/ccs/lib/cpp
3314 ;;
3315 esac
3316 ## Watch out for a compiler that we know will not work.
3317 case "${canonical}" in
3318 *-solaris* | *-sunos5* )
3319 if [ "x$CC" = x/usr/ucb/cc ]; then
3320 ## /usr/ucb/cc doesn't work;
3321 ## we should find some other compiler that does work.
3322 unset CC
3323 fi
3324 ;;
3325 *) ;;
3326 esac
3327 ;;
5929fbe7 3328
eb697db5
DN
3329 ## IA-64
3330 ia64*-*-linux* )
3331 machine=ia64 opsys=gnu-linux
3332 ;;
aaa36002 3333
eb697db5
DN
3334 ## Intel 386 machines where we don't care about the manufacturer.
3335 i[3456]86-*-* )
3336 machine=intel386
3337 case "${canonical}" in
3338 *-cygwin ) opsys=cygwin ;;
3339 *-darwin* ) opsys=darwin
3340 CPP="${CC-cc} -E -no-cpp-precomp"
3341 ;;
3342 *-linux-gnu* ) opsys=gnu-linux ;;
3343 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3344 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3345 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3346 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3347 esac
3348 ;;
5929fbe7 3349
eb697db5
DN
3350 ## m68k Linux-based GNU system
3351 m68k-*-linux-gnu* )
3352 machine=m68k opsys=gnu-linux
3353 ;;
5929fbe7 3354
eb697db5
DN
3355 ## Mips Linux-based GNU system
3356 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3357 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
3358 machine=mips opsys=gnu-linux
3359 ;;
5929fbe7 3360
eb697db5
DN
3361 ## AMD x86-64 Linux-based GNU system
3362 x86_64-*-linux-gnu* )
3363 machine=amdx86-64 opsys=gnu-linux
3364 ;;
5929fbe7 3365
eb697db5
DN
3366 ## Tensilica Xtensa Linux-based GNU system
3367 xtensa*-*-linux-gnu* )
3368 machine=xtensa opsys=gnu-linux
3369 ;;
5929fbe7 3370
eb697db5
DN
3371 ## SuperH Linux-based GNU system
3372 sh[34]*-*-linux-gnu* )
3373 machine=sh3 opsys=gnu-linux
3374 ;;
5929fbe7 3375
eb697db5
DN
3376 * )
3377 unported=yes
3378 ;;
5929fbe7 3379esac
aaa36002 3380
eb697db5
DN
3381### If the code above didn't choose an operating system, just choose
3382### an operating system based on the configuration name. You really
3383### only want to use this when you have no idea what the right
3384### operating system is; if you know what operating systems a machine
3385### runs, it's cleaner to make it explicit in the case statement
3386### above.
3387if test x"${opsys}" = x; then
3388 case "${canonical}" in
3389 *-gnu* ) opsys=gnu ;;
3390 * )
3391 unported=yes
3392 ;;
3393 esac
5929fbe7 3394fi
aaa36002 3395
5929fbe7 3396
5929fbe7 3397
eb697db5
DN
3398if test $unported = yes; then
3399 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
3400Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
5929fbe7
GM
3401fi
3402
eb697db5
DN
3403machfile="m/${machine}.h"
3404opsysfile="s/${opsys}.h"
5929fbe7 3405
5929fbe7 3406
eb697db5
DN
3407#### Choose a compiler.
3408test -n "$CC" && cc_specified=yes
3409
3410# Save the value of CFLAGS that the user specified.
3411SPECIFIED_CFLAGS="$CFLAGS"
3412
3413ac_ext=c
3414ac_cpp='$CPP $CPPFLAGS'
3415ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3416ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3417ac_compiler_gnu=$ac_cv_c_compiler_gnu
3418if test -n "$ac_tool_prefix"; then
3419 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3420set dummy ${ac_tool_prefix}gcc; ac_word=$2
3421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3422$as_echo_n "checking for $ac_word... " >&6; }
3423if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3424 $as_echo_n "(cached) " >&6
3425else
eb697db5
DN
3426 if test -n "$CC"; then
3427 ac_cv_prog_CC="$CC" # Let the user override the test.
3428else
3429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3430for as_dir in $PATH
3431do
3432 IFS=$as_save_IFS
3433 test -z "$as_dir" && as_dir=.
3434 for ac_exec_ext in '' $ac_executable_extensions; do
3435 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3436 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3437 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3438 break 2
3439 fi
3440done
3441 done
3442IFS=$as_save_IFS
5929fbe7
GM
3443
3444fi
eb697db5
DN
3445fi
3446CC=$ac_cv_prog_CC
3447if test -n "$CC"; then
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3449$as_echo "$CC" >&6; }
3450else
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3452$as_echo "no" >&6; }
5929fbe7 3453fi
7186fb09 3454
08b47d3d 3455
eb697db5
DN
3456fi
3457if test -z "$ac_cv_prog_CC"; then
3458 ac_ct_CC=$CC
3459 # Extract the first word of "gcc", so it can be a program name with args.
3460set dummy gcc; ac_word=$2
3461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3462$as_echo_n "checking for $ac_word... " >&6; }
3463if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5929fbe7 3464 $as_echo_n "(cached) " >&6
8c5ff6dd 3465else
eb697db5
DN
3466 if test -n "$ac_ct_CC"; then
3467 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3468else
eb697db5
DN
3469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3470for as_dir in $PATH
3471do
3472 IFS=$as_save_IFS
3473 test -z "$as_dir" && as_dir=.
3474 for ac_exec_ext in '' $ac_executable_extensions; do
3475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3476 ac_cv_prog_ac_ct_CC="gcc"
3477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3478 break 2
3479 fi
3480done
3481 done
3482IFS=$as_save_IFS
5929fbe7 3483
8c5ff6dd 3484fi
8c5ff6dd 3485fi
eb697db5
DN
3486ac_ct_CC=$ac_cv_prog_ac_ct_CC
3487if test -n "$ac_ct_CC"; then
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3489$as_echo "$ac_ct_CC" >&6; }
3490else
3491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3492$as_echo "no" >&6; }
8c5ff6dd 3493fi
5929fbe7 3494
eb697db5
DN
3495 if test "x$ac_ct_CC" = x; then
3496 CC=""
3497 else
3498 case $cross_compiling:$ac_tool_warned in
3499yes:)
3500{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3502ac_tool_warned=yes ;;
3503esac
3504 CC=$ac_ct_CC
8c5ff6dd 3505 fi
eb697db5
DN
3506else
3507 CC="$ac_cv_prog_CC"
8c5ff6dd 3508fi
e6df49e4 3509
eb697db5
DN
3510if test -z "$CC"; then
3511 if test -n "$ac_tool_prefix"; then
3512 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3513set dummy ${ac_tool_prefix}cc; ac_word=$2
3514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3515$as_echo_n "checking for $ac_word... " >&6; }
eb697db5
DN
3516if test "${ac_cv_prog_CC+set}" = set; then :
3517 $as_echo_n "(cached) " >&6
3518else
3519 if test -n "$CC"; then
3520 ac_cv_prog_CC="$CC" # Let the user override the test.
3521else
3522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3523for as_dir in $PATH
a4f64981 3524do
5929fbe7
GM
3525 IFS=$as_save_IFS
3526 test -z "$as_dir" && as_dir=.
eb697db5 3527 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3528 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3529 ac_cv_prog_CC="${ac_tool_prefix}cc"
3530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3531 break 2
3532 fi
a4f64981 3533done
eb697db5 3534 done
5929fbe7 3535IFS=$as_save_IFS
9452ded1 3536
5929fbe7 3537fi
eb697db5
DN
3538fi
3539CC=$ac_cv_prog_CC
3540if test -n "$CC"; then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3542$as_echo "$CC" >&6; }
5929fbe7 3543else
eb697db5 3544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3545$as_echo "no" >&6; }
8c5ff6dd 3546fi
cd03c74a 3547
9452ded1 3548
5929fbe7 3549 fi
eb697db5
DN
3550fi
3551if test -z "$CC"; then
3552 # Extract the first word of "cc", so it can be a program name with args.
3553set dummy cc; ac_word=$2
3554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3555$as_echo_n "checking for $ac_word... " >&6; }
3556if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3557 $as_echo_n "(cached) " >&6
3558else
eb697db5
DN
3559 if test -n "$CC"; then
3560 ac_cv_prog_CC="$CC" # Let the user override the test.
8c5ff6dd 3561else
eb697db5
DN
3562 ac_prog_rejected=no
3563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3564for as_dir in $PATH
3565do
3566 IFS=$as_save_IFS
3567 test -z "$as_dir" && as_dir=.
3568 for ac_exec_ext in '' $ac_executable_extensions; do
3569 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3570 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3571 ac_prog_rejected=yes
3572 continue
3573 fi
3574 ac_cv_prog_CC="cc"
3575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3576 break 2
3577 fi
3578done
3579 done
3580IFS=$as_save_IFS
e6df49e4 3581
eb697db5
DN
3582if test $ac_prog_rejected = yes; then
3583 # We found a bogon in the path, so make sure we never use it.
3584 set dummy $ac_cv_prog_CC
3585 shift
3586 if test $# != 0; then
3587 # We chose a different compiler from the bogus one.
3588 # However, it has the same basename, so the bogon will be chosen
3589 # first if we set CC to just the basename; use the full file name.
3590 shift
3591 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3592 fi
8c5ff6dd 3593fi
8c5ff6dd 3594fi
8c5ff6dd 3595fi
eb697db5
DN
3596CC=$ac_cv_prog_CC
3597if test -n "$CC"; then
3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3599$as_echo "$CC" >&6; }
3600else
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3602$as_echo "no" >&6; }
8c5ff6dd 3603fi
cd03c74a 3604
8c5ff6dd 3605
eb697db5
DN
3606fi
3607if test -z "$CC"; then
3608 if test -n "$ac_tool_prefix"; then
3609 for ac_prog in cl.exe
3610 do
3611 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3612set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3614$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3615if test "${ac_cv_prog_CC+set}" = set; then :
a5edbe4a 3616 $as_echo_n "(cached) " >&6
a5edbe4a 3617else
eb697db5
DN
3618 if test -n "$CC"; then
3619 ac_cv_prog_CC="$CC" # Let the user override the test.
3620else
3621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3622for as_dir in $PATH
8c5ff6dd 3623do
5929fbe7
GM
3624 IFS=$as_save_IFS
3625 test -z "$as_dir" && as_dir=.
eb697db5 3626 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3627 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3628 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3630 break 2
3631 fi
3632done
eb697db5 3633 done
5929fbe7 3634IFS=$as_save_IFS
8c5ff6dd 3635
8c5ff6dd 3636fi
eb697db5
DN
3637fi
3638CC=$ac_cv_prog_CC
3639if test -n "$CC"; then
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3641$as_echo "$CC" >&6; }
8c5ff6dd 3642else
eb697db5 3643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3644$as_echo "no" >&6; }
8c5ff6dd 3645fi
a4f64981 3646
a4f64981 3647
eb697db5
DN
3648 test -n "$CC" && break
3649 done
3650fi
3651if test -z "$CC"; then
3652 ac_ct_CC=$CC
3653 for ac_prog in cl.exe
3654do
3655 # Extract the first word of "$ac_prog", so it can be a program name with args.
3656set dummy $ac_prog; ac_word=$2
3657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3658$as_echo_n "checking for $ac_word... " >&6; }
3659if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5929fbe7 3660 $as_echo_n "(cached) " >&6
a4f64981 3661else
eb697db5
DN
3662 if test -n "$ac_ct_CC"; then
3663 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3664else
eb697db5
DN
3665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3666for as_dir in $PATH
3667do
3668 IFS=$as_save_IFS
3669 test -z "$as_dir" && as_dir=.
3670 for ac_exec_ext in '' $ac_executable_extensions; do
3671 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3672 ac_cv_prog_ac_ct_CC="$ac_prog"
3673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3674 break 2
3675 fi
3676done
3677 done
3678IFS=$as_save_IFS
a4f64981 3679
5929fbe7 3680fi
5929fbe7 3681fi
eb697db5
DN
3682ac_ct_CC=$ac_cv_prog_ac_ct_CC
3683if test -n "$ac_ct_CC"; then
3684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3685$as_echo "$ac_ct_CC" >&6; }
8c5ff6dd 3686else
eb697db5
DN
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3688$as_echo "no" >&6; }
8c5ff6dd 3689fi
a4f64981 3690
5929fbe7 3691
eb697db5
DN
3692 test -n "$ac_ct_CC" && break
3693done
5929fbe7 3694
eb697db5
DN
3695 if test "x$ac_ct_CC" = x; then
3696 CC=""
3697 else
3698 case $cross_compiling:$ac_tool_warned in
3699yes:)
3700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3702ac_tool_warned=yes ;;
3703esac
3704 CC=$ac_ct_CC
3705 fi
8c5ff6dd 3706fi
a4f64981 3707
eb697db5 3708fi
8c5ff6dd 3709
5929fbe7 3710
eb697db5
DN
3711test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3713as_fn_error "no acceptable C compiler found in \$PATH
3714See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 3715
eb697db5
DN
3716# Provide some information about the compiler.
3717$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3718set X $ac_compile
3719ac_compiler=$2
3720for ac_option in --version -v -V -qversion; do
3721 { { ac_try="$ac_compiler $ac_option >&5"
5929fbe7
GM
3722case "(($ac_try" in
3723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3724 *) ac_try_echo=$ac_try;;
3725esac
eb697db5
DN
3726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3727$as_echo "$ac_try_echo"; } >&5
3728 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5929fbe7 3729 ac_status=$?
eb697db5
DN
3730 if test -s conftest.err; then
3731 sed '10a\
3732... rest of stderr output deleted ...
3733 10q' conftest.err >conftest.er1
3734 cat conftest.er1 >&5
5929fbe7 3735 fi
eb697db5
DN
3736 rm -f conftest.er1 conftest.err
3737 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3738 test $ac_status = 0; }
3739done
a4f64981 3740
eb697db5 3741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 3742/* end confdefs.h. */
8c5ff6dd 3743
5929fbe7
GM
3744int
3745main ()
3746{
3747
3748 ;
3749 return 0;
3750}
3751_ACEOF
eb697db5
DN
3752ac_clean_files_save=$ac_clean_files
3753ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3754# Try to create an executable without -o first, disregard a.out.
3755# It will help us diagnose broken compilers, and finding out an intuition
3756# of exeext.
3757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3758$as_echo_n "checking whether the C compiler works... " >&6; }
3759ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3760
3761# The possible output files:
3762ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3763
3764ac_rmfiles=
3765for ac_file in $ac_files
3766do
3767 case $ac_file in
3768 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3769 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3770 esac
3771done
3772rm -f $ac_rmfiles
3773
3774if { { ac_try="$ac_link_default"
5929fbe7
GM
3775case "(($ac_try" in
3776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3777 *) ac_try_echo=$ac_try;;
3778esac
eb697db5
DN
3779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3780$as_echo "$ac_try_echo"; } >&5
3781 (eval "$ac_link_default") 2>&5
5929fbe7 3782 ac_status=$?
eb697db5
DN
3783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3784 test $ac_status = 0; }; then :
3785 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3786# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3787# in a Makefile. We should not override ac_cv_exeext if it was cached,
3788# so that the user can short-circuit this test for compilers unknown to
3789# Autoconf.
3790for ac_file in $ac_files ''
3791do
3792 test -f "$ac_file" || continue
3793 case $ac_file in
3794 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3795 ;;
3796 [ab].out )
3797 # We found the default executable, but exeext='' is most
3798 # certainly right.
3799 break;;
3800 *.* )
3801 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3802 then :; else
3803 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3804 fi
3805 # We set ac_cv_exeext here because the later test for it is not
3806 # safe: cross compilers may not add the suffix if given an `-o'
3807 # argument, so we may need to know it at that point already.
3808 # Even if this section looks crufty: it has the advantage of
3809 # actually working.
3810 break;;
3811 * )
3812 break;;
3813 esac
3814done
3815test "$ac_cv_exeext" = no && ac_cv_exeext=
5929fbe7 3816
eb697db5
DN
3817else
3818 ac_file=''
49ebbd65 3819fi
eb697db5
DN
3820if test -z "$ac_file"; then :
3821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3822$as_echo "no" >&6; }
3823$as_echo "$as_me: failed program was:" >&5
3824sed 's/^/| /' conftest.$ac_ext >&5
49ebbd65 3825
eb697db5
DN
3826{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3828{ as_fn_set_status 77
3829as_fn_error "C compiler cannot create executables
3830See \`config.log' for more details." "$LINENO" 5; }; }
3831else
3832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3833$as_echo "yes" >&6; }
8c5ff6dd 3834fi
eb697db5
DN
3835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3836$as_echo_n "checking for C compiler default output file name... " >&6; }
3837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3838$as_echo "$ac_file" >&6; }
3839ac_exeext=$ac_cv_exeext
e6df49e4 3840
eb697db5
DN
3841rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3842ac_clean_files=$ac_clean_files_save
3843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3844$as_echo_n "checking for suffix of executables... " >&6; }
3845if { { ac_try="$ac_link"
3846case "(($ac_try" in
3847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3848 *) ac_try_echo=$ac_try;;
3849esac
3850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3851$as_echo "$ac_try_echo"; } >&5
3852 (eval "$ac_link") 2>&5
3853 ac_status=$?
3854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3855 test $ac_status = 0; }; then :
3856 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3857# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3858# work properly (i.e., refer to `conftest.exe'), while it won't with
3859# `rm'.
3860for ac_file in conftest.exe conftest conftest.*; do
3861 test -f "$ac_file" || continue
3862 case $ac_file in
3863 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3864 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3865 break;;
3866 * ) break;;
3867 esac
3868done
3869else
3870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3872as_fn_error "cannot compute suffix of executables: cannot compile and link
3873See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 3874fi
eb697db5
DN
3875rm -f conftest conftest$ac_cv_exeext
3876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3877$as_echo "$ac_cv_exeext" >&6; }
49ebbd65 3878
eb697db5
DN
3879rm -f conftest.$ac_ext
3880EXEEXT=$ac_cv_exeext
3881ac_exeext=$EXEEXT
3882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 3883/* end confdefs.h. */
eb697db5 3884#include <stdio.h>
5929fbe7
GM
3885int
3886main ()
3887{
eb697db5
DN
3888FILE *f = fopen ("conftest.out", "w");
3889 return ferror (f) || fclose (f) != 0;
49ebbd65 3890
5929fbe7
GM
3891 ;
3892 return 0;
3893}
3894_ACEOF
eb697db5
DN
3895ac_clean_files="$ac_clean_files conftest.out"
3896# Check that the compiler produces executables we can run. If not, either
3897# the compiler is broken, or we cross compile.
3898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3899$as_echo_n "checking whether we are cross compiling... " >&6; }
3900if test "$cross_compiling" != yes; then
3901 { { ac_try="$ac_link"
5929fbe7
GM
3902case "(($ac_try" in
3903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904 *) ac_try_echo=$ac_try;;
3905esac
eb697db5
DN
3906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3907$as_echo "$ac_try_echo"; } >&5
3908 (eval "$ac_link") 2>&5
5929fbe7 3909 ac_status=$?
eb697db5
DN
3910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3911 test $ac_status = 0; }
3912 if { ac_try='./conftest$ac_cv_exeext'
3913 { { case "(($ac_try" in
3914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3915 *) ac_try_echo=$ac_try;;
3916esac
3917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3918$as_echo "$ac_try_echo"; } >&5
3919 (eval "$ac_try") 2>&5
3920 ac_status=$?
3921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3922 test $ac_status = 0; }; }; then
3923 cross_compiling=no
5929fbe7 3924 else
eb697db5
DN
3925 if test "$cross_compiling" = maybe; then
3926 cross_compiling=yes
3927 else
3928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3930as_fn_error "cannot run C compiled programs.
3931If you meant to cross compile, use \`--host'.
3932See \`config.log' for more details." "$LINENO" 5; }
3933 fi
5929fbe7 3934 fi
eb697db5
DN
3935fi
3936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3937$as_echo "$cross_compiling" >&6; }
5929fbe7 3938
eb697db5
DN
3939rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3940ac_clean_files=$ac_clean_files_save
3941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3942$as_echo_n "checking for suffix of object files... " >&6; }
3943if test "${ac_cv_objext+set}" = set; then :
a4f64981 3944 $as_echo_n "(cached) " >&6
a4f64981 3945else
eb697db5 3946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 3947/* end confdefs.h. */
8c5ff6dd
KR
3948
3949int
3950main ()
3951{
eb697db5 3952
8c5ff6dd
KR
3953 ;
3954 return 0;
3955}
a4f64981 3956_ACEOF
eb697db5
DN
3957rm -f conftest.o conftest.obj
3958if { { ac_try="$ac_compile"
5929fbe7
GM
3959case "(($ac_try" in
3960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3961 *) ac_try_echo=$ac_try;;
3962esac
eb697db5
DN
3963eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3964$as_echo "$ac_try_echo"; } >&5
3965 (eval "$ac_compile") 2>&5
5929fbe7 3966 ac_status=$?
eb697db5
DN
3967 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3968 test $ac_status = 0; }; then :
3969 for ac_file in conftest.o conftest.obj conftest.*; do
3970 test -f "$ac_file" || continue;
3971 case $ac_file in
3972 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3973 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3974 break;;
3975 esac
3976done
a4f64981 3977else
5929fbe7
GM
3978 $as_echo "$as_me: failed program was:" >&5
3979sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 3980
eb697db5
DN
3981{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3983as_fn_error "cannot compute suffix of object files: cannot compile
3984See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 3985fi
eb697db5 3986rm -f conftest.$ac_cv_objext conftest.$ac_ext
5929fbe7 3987fi
eb697db5
DN
3988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3989$as_echo "$ac_cv_objext" >&6; }
3990OBJEXT=$ac_cv_objext
3991ac_objext=$OBJEXT
3992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3993$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3994if test "${ac_cv_c_compiler_gnu+set}" = set; then :
3995 $as_echo_n "(cached) " >&6
3996else
3997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3998/* end confdefs.h. */
8c5ff6dd 3999
eb697db5
DN
4000int
4001main ()
4002{
4003#ifndef __GNUC__
4004 choke me
4005#endif
5929fbe7 4006
eb697db5
DN
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011if ac_fn_c_try_compile "$LINENO"; then :
4012 ac_compiler_gnu=yes
4013else
4014 ac_compiler_gnu=no
8c5ff6dd 4015fi
eb697db5
DN
4016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4017ac_cv_c_compiler_gnu=$ac_compiler_gnu
a4f64981 4018
a4f64981 4019fi
eb697db5
DN
4020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4021$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4022if test $ac_compiler_gnu = yes; then
4023 GCC=yes
4024else
4025 GCC=
4026fi
4027ac_test_CFLAGS=${CFLAGS+set}
4028ac_save_CFLAGS=$CFLAGS
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4030$as_echo_n "checking whether $CC accepts -g... " >&6; }
4031if test "${ac_cv_prog_cc_g+set}" = set; then :
5929fbe7 4032 $as_echo_n "(cached) " >&6
08b47d3d 4033else
eb697db5
DN
4034 ac_save_c_werror_flag=$ac_c_werror_flag
4035 ac_c_werror_flag=yes
4036 ac_cv_prog_cc_g=no
4037 CFLAGS="-g"
4038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0c309b80 4039/* end confdefs.h. */
8c5ff6dd 4040
9452ded1
DN
4041int
4042main ()
4043{
eb697db5 4044
5929fbe7 4045 ;
9452ded1
DN
4046 return 0;
4047}
0c309b80 4048_ACEOF
eb697db5
DN
4049if ac_fn_c_try_compile "$LINENO"; then :
4050 ac_cv_prog_cc_g=yes
8c5ff6dd 4051else
eb697db5
DN
4052 CFLAGS=""
4053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4054/* end confdefs.h. */
a4f64981 4055
eb697db5
DN
4056int
4057main ()
4058{
cd03c74a 4059
eb697db5
DN
4060 ;
4061 return 0;
4062}
a4f64981 4063_ACEOF
eb697db5 4064if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 4065
eb697db5
DN
4066else
4067 ac_c_werror_flag=$ac_save_c_werror_flag
4068 CFLAGS="-g"
4069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4070/* end confdefs.h. */
a5edbe4a 4071
eb697db5
DN
4072int
4073main ()
4074{
e6df49e4 4075
eb697db5
DN
4076 ;
4077 return 0;
4078}
4079_ACEOF
4080if ac_fn_c_try_compile "$LINENO"; then :
4081 ac_cv_prog_cc_g=yes
4082fi
4083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4084fi
4085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4086fi
4087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4088 ac_c_werror_flag=$ac_save_c_werror_flag
4089fi
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4091$as_echo "$ac_cv_prog_cc_g" >&6; }
4092if test "$ac_test_CFLAGS" = set; then
4093 CFLAGS=$ac_save_CFLAGS
4094elif test $ac_cv_prog_cc_g = yes; then
4095 if test "$GCC" = yes; then
4096 CFLAGS="-g -O2"
4097 else
4098 CFLAGS="-g"
4099 fi
4100else
4101 if test "$GCC" = yes; then
4102 CFLAGS="-O2"
4103 else
4104 CFLAGS=
5929fbe7
GM
4105 fi
4106fi
eb697db5
DN
4107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4108$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4109if test "${ac_cv_prog_cc_c89+set}" = set; then :
5929fbe7
GM
4110 $as_echo_n "(cached) " >&6
4111else
eb697db5
DN
4112 ac_cv_prog_cc_c89=no
4113ac_save_CC=$CC
4114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4115/* end confdefs.h. */
eb697db5
DN
4116#include <stdarg.h>
4117#include <stdio.h>
4118#include <sys/types.h>
4119#include <sys/stat.h>
4120/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4121struct buf { int x; };
4122FILE * (*rcsopen) (struct buf *, struct stat *, int);
4123static char *e (p, i)
4124 char **p;
4125 int i;
5929fbe7 4126{
eb697db5
DN
4127 return p[i];
4128}
4129static char *f (char * (*g) (char **, int), char **p, ...)
4130{
4131 char *s;
4132 va_list v;
4133 va_start (v,p);
4134 s = g (p, va_arg (v,int));
4135 va_end (v);
4136 return s;
5929fbe7 4137}
e6df49e4 4138
eb697db5
DN
4139/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4140 function prototypes and stuff, but not '\xHH' hex character constants.
4141 These don't provoke an error unfortunately, instead are silently treated
4142 as 'x'. The following induces an error, until -std is added to get
4143 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4144 array size at least. It's necessary to write '\x00'==0 to get something
4145 that's true only with -std. */
4146int osf4_cc_array ['\x00' == 0 ? 1 : -1];
e6df49e4 4147
eb697db5
DN
4148/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4149 inside strings and character constants. */
4150#define FOO(x) 'x'
4151int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
49ebbd65 4152
eb697db5
DN
4153int test (int i, double x);
4154struct s1 {int (*f) (int a);};
4155struct s2 {int (*f) (double a);};
4156int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4157int argc;
4158char **argv;
5929fbe7
GM
4159int
4160main ()
4161{
eb697db5 4162return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5929fbe7
GM
4163 ;
4164 return 0;
4165}
4166_ACEOF
eb697db5
DN
4167for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4168 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4169do
4170 CC="$ac_save_CC $ac_arg"
4171 if ac_fn_c_try_compile "$LINENO"; then :
4172 ac_cv_prog_cc_c89=$ac_arg
4173fi
4174rm -f core conftest.err conftest.$ac_objext
4175 test "x$ac_cv_prog_cc_c89" != "xno" && break
4176done
4177rm -f conftest.$ac_ext
4178CC=$ac_save_CC
49ebbd65 4179
5929fbe7 4180fi
eb697db5
DN
4181# AC_CACHE_VAL
4182case "x$ac_cv_prog_cc_c89" in
4183 x)
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4185$as_echo "none needed" >&6; } ;;
4186 xno)
4187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4188$as_echo "unsupported" >&6; } ;;
4189 *)
4190 CC="$CC $ac_cv_prog_cc_c89"
4191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4192$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4193esac
4194if test "x$ac_cv_prog_cc_c89" != xno; then :
e6df49e4 4195
5929fbe7 4196fi
eb697db5
DN
4197
4198ac_ext=c
4199ac_cpp='$CPP $CPPFLAGS'
4200ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4201ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4202ac_compiler_gnu=$ac_cv_c_compiler_gnu
4203
4204
4205# On Suns, sometimes $CPP names a directory.
4206if test -n "$CPP" && test -d "$CPP"; then
4207 CPP=
5929fbe7 4208fi
a4f64981 4209
eb697db5
DN
4210## If not using gcc, and on Solaris, and no CPP specified, see if
4211## using a Sun compiler, which needs -Xs to prevent whitespace.
4212if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4213 test x"$CPP" = x; then
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
4215$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
4216
4217if test "${emacs_cv_sunpro_c+set}" = set; then :
a4f64981
GM
4218 $as_echo_n "(cached) " >&6
4219else
eb697db5 4220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd03c74a 4221/* end confdefs.h. */
eb697db5 4222
15e12598
VB
4223int
4224main ()
4225{
eb697db5
DN
4226#ifndef __SUNPRO_C
4227fail;
4228#endif
4229
15e12598
VB
4230 ;
4231 return 0;
4232}
0c309b80 4233_ACEOF
eb697db5
DN
4234if ac_fn_c_try_link "$LINENO"; then :
4235 emacs_cv_sunpro_c=yes
aaa36002 4236else
eb697db5 4237 emacs_cv_sunpro_c=no
a4f64981 4238fi
eb697db5
DN
4239rm -f core conftest.err conftest.$ac_objext \
4240 conftest$ac_exeext conftest.$ac_ext
5929fbe7 4241fi
a4f64981 4242
eb697db5
DN
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
4244$as_echo "$emacs_cv_sunpro_c" >&6; }
a4f64981 4245
eb697db5
DN
4246 if test x"$emacs_cv_sunpro_c" = xyes; then
4247 NON_GNU_CPP="$CC -E -Xs"
4248 fi
4249fi
a4f64981 4250
eb697db5
DN
4251#### Some systems specify a CPP to use unless we are using GCC.
4252#### Now that we know whether we are using GCC, we can decide whether
4253#### to use that one.
4254if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4255then
4256 CPP="$NON_GNU_CPP"
4257fi
a4f64981 4258
eb697db5
DN
4259#### Some systems specify a CC to use unless we are using GCC.
4260#### Now that we know whether we are using GCC, we can decide whether
4261#### to use that one.
4262if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4263 test x$cc_specified != xyes
4264then
4265 CC="$NON_GNU_CC"
4266fi
a4f64981 4267
eb697db5
DN
4268if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4269then
4270 CC="$CC $GCC_TEST_OPTIONS"
4271fi
8c5ff6dd 4272
eb697db5
DN
4273if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4274then
4275 CC="$CC $NON_GCC_TEST_OPTIONS"
5929fbe7
GM
4276fi
4277
eb697db5
DN
4278ac_ext=c
4279ac_cpp='$CPP $CPPFLAGS'
4280ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4281ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4282ac_compiler_gnu=$ac_cv_c_compiler_gnu
4283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4284$as_echo_n "checking how to run the C preprocessor... " >&6; }
4285# On Suns, sometimes $CPP names a directory.
4286if test -n "$CPP" && test -d "$CPP"; then
4287 CPP=
4288fi
4289if test -z "$CPP"; then
4290 if test "${ac_cv_prog_CPP+set}" = set; then :
4291 $as_echo_n "(cached) " >&6
4292else
4293 # Double quotes because CPP needs to be expanded
4294 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4295 do
4296 ac_preproc_ok=false
4297for ac_c_preproc_warn_flag in '' yes
4298do
4299 # Use a header file that comes with gcc, so configuring glibc
4300 # with a fresh cross-compiler works.
4301 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4302 # <limits.h> exists even on freestanding compilers.
4303 # On the NeXT, cc -E runs the code through the compiler's parser,
4304 # not just through cpp. "Syntax error" is here to catch this case.
4305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 4306/* end confdefs.h. */
eb697db5
DN
4307#ifdef __STDC__
4308# include <limits.h>
4309#else
4310# include <assert.h>
4311#endif
4312 Syntax error
49ebbd65 4313_ACEOF
eb697db5
DN
4314if ac_fn_c_try_cpp "$LINENO"; then :
4315
4316else
4317 # Broken: fails on valid input.
4318continue
4319fi
4320rm -f conftest.err conftest.$ac_ext
5929fbe7 4321
eb697db5
DN
4322 # OK, works on sane cases. Now check whether nonexistent headers
4323 # can be detected and how.
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325/* end confdefs.h. */
4326#include <ac_nonexistent.h>
5929fbe7 4327_ACEOF
eb697db5
DN
4328if ac_fn_c_try_cpp "$LINENO"; then :
4329 # Broken: success on invalid input.
4330continue
8c5ff6dd 4331else
eb697db5
DN
4332 # Passes both tests.
4333ac_preproc_ok=:
4334break
8c5ff6dd 4335fi
eb697db5 4336rm -f conftest.err conftest.$ac_ext
5929fbe7 4337
eb697db5
DN
4338done
4339# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4340rm -f conftest.err conftest.$ac_ext
4341if $ac_preproc_ok; then :
4342 break
4343fi
5929fbe7 4344
eb697db5
DN
4345 done
4346 ac_cv_prog_CPP=$CPP
5929fbe7 4347
eb697db5
DN
4348fi
4349 CPP=$ac_cv_prog_CPP
4350else
4351 ac_cv_prog_CPP=$CPP
4352fi
4353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4354$as_echo "$CPP" >&6; }
4355ac_preproc_ok=false
4356for ac_c_preproc_warn_flag in '' yes
4357do
4358 # Use a header file that comes with gcc, so configuring glibc
4359 # with a fresh cross-compiler works.
4360 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4361 # <limits.h> exists even on freestanding compilers.
4362 # On the NeXT, cc -E runs the code through the compiler's parser,
4363 # not just through cpp. "Syntax error" is here to catch this case.
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365/* end confdefs.h. */
4366#ifdef __STDC__
4367# include <limits.h>
4368#else
4369# include <assert.h>
4370#endif
4371 Syntax error
5929fbe7 4372_ACEOF
eb697db5 4373if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4374
eb697db5
DN
4375else
4376 # Broken: fails on valid input.
4377continue
8c5ff6dd 4378fi
eb697db5 4379rm -f conftest.err conftest.$ac_ext
8c5ff6dd 4380
eb697db5
DN
4381 # OK, works on sane cases. Now check whether nonexistent headers
4382 # can be detected and how.
4383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 4384/* end confdefs.h. */
eb697db5 4385#include <ac_nonexistent.h>
8c5ff6dd 4386_ACEOF
eb697db5
DN
4387if ac_fn_c_try_cpp "$LINENO"; then :
4388 # Broken: success on invalid input.
4389continue
a5edbe4a 4390else
eb697db5
DN
4391 # Passes both tests.
4392ac_preproc_ok=:
4393break
4394fi
4395rm -f conftest.err conftest.$ac_ext
e6df49e4 4396
eb697db5
DN
4397done
4398# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4399rm -f conftest.err conftest.$ac_ext
4400if $ac_preproc_ok; then :
cd03c74a 4401
eb697db5
DN
4402else
4403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4405as_fn_error "C preprocessor \"$CPP\" fails sanity check
4406See \`config.log' for more details." "$LINENO" 5; }
a4f64981 4407fi
e6df49e4 4408
eb697db5
DN
4409ac_ext=c
4410ac_cpp='$CPP $CPPFLAGS'
4411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4413ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 4414
a5edbe4a 4415
eb697db5
DN
4416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4417$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4418if test "${ac_cv_path_GREP+set}" = set; then :
4419 $as_echo_n "(cached) " >&6
4420else
4421 if test -z "$GREP"; then
4422 ac_path_GREP_found=false
4423 # Loop through the user's path and test for each of PROGNAME-LIST
4424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4425for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4426do
4427 IFS=$as_save_IFS
4428 test -z "$as_dir" && as_dir=.
4429 for ac_prog in grep ggrep; do
4430 for ac_exec_ext in '' $ac_executable_extensions; do
4431 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4432 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4433# Check for GNU ac_path_GREP and select it if it is found.
4434 # Check for GNU $ac_path_GREP
4435case `"$ac_path_GREP" --version 2>&1` in
4436*GNU*)
4437 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4438*)
4439 ac_count=0
4440 $as_echo_n 0123456789 >"conftest.in"
4441 while :
4442 do
4443 cat "conftest.in" "conftest.in" >"conftest.tmp"
4444 mv "conftest.tmp" "conftest.in"
4445 cp "conftest.in" "conftest.nl"
4446 $as_echo 'GREP' >> "conftest.nl"
4447 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4448 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4449 as_fn_arith $ac_count + 1 && ac_count=$as_val
4450 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4451 # Best one so far, save it but keep looking for a better one
4452 ac_cv_path_GREP="$ac_path_GREP"
4453 ac_path_GREP_max=$ac_count
4454 fi
4455 # 10*(2^10) chars as input seems more than enough
4456 test $ac_count -gt 10 && break
4457 done
4458 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4459esac
a5edbe4a 4460
eb697db5
DN
4461 $ac_path_GREP_found && break 3
4462 done
4463 done
4464 done
4465IFS=$as_save_IFS
4466 if test -z "$ac_cv_path_GREP"; then
4467 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5929fbe7 4468 fi
eb697db5
DN
4469else
4470 ac_cv_path_GREP=$GREP
cd03c74a 4471fi
0c309b80 4472
eb697db5
DN
4473fi
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4475$as_echo "$ac_cv_path_GREP" >&6; }
4476 GREP="$ac_cv_path_GREP"
15e12598 4477
8c5ff6dd 4478
eb697db5
DN
4479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4480$as_echo_n "checking for egrep... " >&6; }
4481if test "${ac_cv_path_EGREP+set}" = set; then :
8c5ff6dd 4482 $as_echo_n "(cached) " >&6
aaa36002 4483else
eb697db5
DN
4484 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4485 then ac_cv_path_EGREP="$GREP -E"
4486 else
4487 if test -z "$EGREP"; then
4488 ac_path_EGREP_found=false
4489 # Loop through the user's path and test for each of PROGNAME-LIST
8c5ff6dd 4490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 4491for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8c5ff6dd
KR
4492do
4493 IFS=$as_save_IFS
4494 test -z "$as_dir" && as_dir=.
eb697db5
DN
4495 for ac_prog in egrep; do
4496 for ac_exec_ext in '' $ac_executable_extensions; do
4497 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4498 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4499# Check for GNU ac_path_EGREP and select it if it is found.
4500 # Check for GNU $ac_path_EGREP
4501case `"$ac_path_EGREP" --version 2>&1` in
4502*GNU*)
4503 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4504*)
4505 ac_count=0
4506 $as_echo_n 0123456789 >"conftest.in"
4507 while :
4508 do
4509 cat "conftest.in" "conftest.in" >"conftest.tmp"
4510 mv "conftest.tmp" "conftest.in"
4511 cp "conftest.in" "conftest.nl"
4512 $as_echo 'EGREP' >> "conftest.nl"
4513 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4514 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4515 as_fn_arith $ac_count + 1 && ac_count=$as_val
4516 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4517 # Best one so far, save it but keep looking for a better one
4518 ac_cv_path_EGREP="$ac_path_EGREP"
4519 ac_path_EGREP_max=$ac_count
4520 fi
4521 # 10*(2^10) chars as input seems more than enough
4522 test $ac_count -gt 10 && break
4523 done
4524 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4525esac
4526
4527 $ac_path_EGREP_found && break 3
4528 done
4529 done
4530 done
5929fbe7 4531IFS=$as_save_IFS
eb697db5
DN
4532 if test -z "$ac_cv_path_EGREP"; then
4533 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4534 fi
4535else
4536 ac_cv_path_EGREP=$EGREP
4537fi
5929fbe7 4538
eb697db5 4539 fi
5929fbe7 4540fi
eb697db5
DN
4541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4542$as_echo "$ac_cv_path_EGREP" >&6; }
4543 EGREP="$ac_cv_path_EGREP"
4544
4545
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4547$as_echo_n "checking for ANSI C header files... " >&6; }
4548if test "${ac_cv_header_stdc+set}" = set; then :
4549 $as_echo_n "(cached) " >&6
4550else
4551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4552/* end confdefs.h. */
4553#include <stdlib.h>
4554#include <stdarg.h>
4555#include <string.h>
4556#include <float.h>
4557
4558int
4559main ()
4560{
4561
4562 ;
4563 return 0;
4564}
4565_ACEOF
4566if ac_fn_c_try_compile "$LINENO"; then :
4567 ac_cv_header_stdc=yes
5929fbe7 4568else
eb697db5 4569 ac_cv_header_stdc=no
5929fbe7 4570fi
eb697db5 4571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 4572
eb697db5
DN
4573if test $ac_cv_header_stdc = yes; then
4574 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4576/* end confdefs.h. */
4577#include <string.h>
15e12598 4578
eb697db5
DN
4579_ACEOF
4580if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4581 $EGREP "memchr" >/dev/null 2>&1; then :
a4f64981 4582
eb697db5
DN
4583else
4584 ac_cv_header_stdc=no
4585fi
4586rm -f conftest*
5929fbe7 4587
eb697db5 4588fi
5929fbe7 4589
eb697db5
DN
4590if test $ac_cv_header_stdc = yes; then
4591 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4593/* end confdefs.h. */
4594#include <stdlib.h>
5929fbe7 4595
eb697db5
DN
4596_ACEOF
4597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4598 $EGREP "free" >/dev/null 2>&1; then :
5929fbe7 4599
eb697db5
DN
4600else
4601 ac_cv_header_stdc=no
4602fi
4603rm -f conftest*
5929fbe7 4604
eb697db5 4605fi
5929fbe7 4606
eb697db5
DN
4607if test $ac_cv_header_stdc = yes; then
4608 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4609 if test "$cross_compiling" = yes; then :
4610 :
4611else
4612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4613/* end confdefs.h. */
4614#include <ctype.h>
4615#include <stdlib.h>
4616#if ((' ' & 0x0FF) == 0x020)
4617# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4618# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4619#else
4620# define ISLOWER(c) \
4621 (('a' <= (c) && (c) <= 'i') \
4622 || ('j' <= (c) && (c) <= 'r') \
4623 || ('s' <= (c) && (c) <= 'z'))
4624# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4625#endif
5929fbe7 4626
eb697db5
DN
4627#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4628int
4629main ()
4630{
4631 int i;
4632 for (i = 0; i < 256; i++)
4633 if (XOR (islower (i), ISLOWER (i))
4634 || toupper (i) != TOUPPER (i))
4635 return 2;
4636 return 0;
4637}
4638_ACEOF
4639if ac_fn_c_try_run "$LINENO"; then :
a4f64981 4640
eb697db5
DN
4641else
4642 ac_cv_header_stdc=no
4643fi
4644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4645 conftest.$ac_objext conftest.beam conftest.$ac_ext
4646fi
aaa36002 4647
eb697db5
DN
4648fi
4649fi
4650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4651$as_echo "$ac_cv_header_stdc" >&6; }
4652if test $ac_cv_header_stdc = yes; then
cd03c74a 4653
eb697db5 4654$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a5edbe4a 4655
eb697db5 4656fi
5929fbe7 4657
eb697db5
DN
4658# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4659for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4660 inttypes.h stdint.h unistd.h
4661do :
4662 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4663ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4664"
4665eval as_val=\$$as_ac_Header
4666 if test "x$as_val" = x""yes; then :
4667 cat >>confdefs.h <<_ACEOF
4668#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4669_ACEOF
4670
4671fi
5929fbe7 4672
5929fbe7 4673done
a5edbe4a 4674
5929fbe7
GM
4675
4676
eb697db5
DN
4677 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4678if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4679 MINIX=yes
4680else
4681 MINIX=
4682fi
5929fbe7 4683
5929fbe7 4684
eb697db5 4685 if test "$MINIX" = yes; then
5929fbe7 4686
eb697db5 4687$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5929fbe7 4688
5929fbe7 4689
eb697db5 4690$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5929fbe7
GM
4691
4692
eb697db5 4693$as_echo "#define _MINIX 1" >>confdefs.h
5929fbe7 4694
5929fbe7
GM
4695 fi
4696
5929fbe7 4697
eb697db5
DN
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4699$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4700if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5929fbe7
GM
4701 $as_echo_n "(cached) " >&6
4702else
eb697db5 4703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7
GM
4704/* end confdefs.h. */
4705
eb697db5
DN
4706# define __EXTENSIONS__ 1
4707 $ac_includes_default
5929fbe7
GM
4708int
4709main ()
4710{
eb697db5 4711
5929fbe7
GM
4712 ;
4713 return 0;
4714}
4715_ACEOF
eb697db5
DN
4716if ac_fn_c_try_compile "$LINENO"; then :
4717 ac_cv_safe_to_define___extensions__=yes
5929fbe7 4718else
eb697db5 4719 ac_cv_safe_to_define___extensions__=no
e6df49e4 4720fi
eb697db5 4721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9452ded1 4722fi
eb697db5
DN
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4724$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4725 test $ac_cv_safe_to_define___extensions__ = yes &&
4726 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
8c5ff6dd 4727
eb697db5 4728 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
a4f64981 4729
eb697db5 4730 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
a4f64981 4731
eb697db5 4732 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5929fbe7 4733
eb697db5 4734 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
a4f64981
GM
4735
4736
a4f64981 4737
eb697db5
DN
4738### Use -Wno-pointer-sign if the compiler supports it
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
4740$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
4741SAVE_CFLAGS="$CFLAGS"
4742CFLAGS="$CFLAGS -Wno-pointer-sign"
4743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4744/* end confdefs.h. */
e6df49e4 4745
eb697db5
DN
4746int
4747main ()
4748{
4749
4750 ;
4751 return 0;
4752}
4753_ACEOF
4754if ac_fn_c_try_compile "$LINENO"; then :
4755 has_option=yes
5929fbe7 4756else
eb697db5 4757 has_option=no
cd03c74a 4758fi
eb697db5
DN
4759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4760if test $has_option = yes; then
4761 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
5929fbe7 4762fi
eb697db5
DN
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4764$as_echo "$has_option" >&6; }
4765CFLAGS="$SAVE_CFLAGS"
4766unset has_option
4767unset SAVE_CFLAGS
4768
4769### Use -Wdeclaration-after-statement if the compiler supports it
4770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
4771$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4772SAVE_CFLAGS="$CFLAGS"
4773CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4775/* end confdefs.h. */
aaa36002 4776
5929fbe7
GM
4777int
4778main ()
4779{
eb697db5 4780
5929fbe7
GM
4781 ;
4782 return 0;
4783}
4784_ACEOF
eb697db5
DN
4785if ac_fn_c_try_compile "$LINENO"; then :
4786 has_option=yes
7186fb09 4787else
eb697db5
DN
4788 has_option=no
4789fi
4790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4791if test $has_option = yes; then
4792 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
4793fi
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4795$as_echo "$has_option" >&6; }
4796CFLAGS="$SAVE_CFLAGS"
4797unset has_option
4798unset SAVE_CFLAGS
4799
4800#### Some other nice autoconf tests.
e6df49e4 4801
eb697db5
DN
4802ac_ext=c
4803ac_cpp='$CPP $CPPFLAGS'
4804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4806ac_compiler_gnu=$ac_cv_c_compiler_gnu
4807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4808$as_echo_n "checking how to run the C preprocessor... " >&6; }
4809# On Suns, sometimes $CPP names a directory.
4810if test -n "$CPP" && test -d "$CPP"; then
4811 CPP=
5929fbe7 4812fi
eb697db5
DN
4813if test -z "$CPP"; then
4814 if test "${ac_cv_prog_CPP+set}" = set; then :
4815 $as_echo_n "(cached) " >&6
4816else
4817 # Double quotes because CPP needs to be expanded
4818 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4819 do
4820 ac_preproc_ok=false
4821for ac_c_preproc_warn_flag in '' yes
4822do
4823 # Use a header file that comes with gcc, so configuring glibc
4824 # with a fresh cross-compiler works.
4825 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4826 # <limits.h> exists even on freestanding compilers.
4827 # On the NeXT, cc -E runs the code through the compiler's parser,
4828 # not just through cpp. "Syntax error" is here to catch this case.
4829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4830/* end confdefs.h. */
4831#ifdef __STDC__
4832# include <limits.h>
4833#else
4834# include <assert.h>
4835#endif
4836 Syntax error
4837_ACEOF
4838if ac_fn_c_try_cpp "$LINENO"; then :
15e12598 4839
eb697db5
DN
4840else
4841 # Broken: fails on valid input.
4842continue
8c5ff6dd 4843fi
eb697db5
DN
4844rm -f conftest.err conftest.$ac_ext
4845
4846 # OK, works on sane cases. Now check whether nonexistent headers
4847 # can be detected and how.
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849/* end confdefs.h. */
4850#include <ac_nonexistent.h>
4851_ACEOF
4852if ac_fn_c_try_cpp "$LINENO"; then :
4853 # Broken: success on invalid input.
4854continue
4855else
4856 # Passes both tests.
4857ac_preproc_ok=:
4858break
a4f64981 4859fi
eb697db5 4860rm -f conftest.err conftest.$ac_ext
e6df49e4 4861
eb697db5
DN
4862done
4863# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4864rm -f conftest.err conftest.$ac_ext
4865if $ac_preproc_ok; then :
4866 break
5929fbe7 4867fi
8c5ff6dd 4868
eb697db5
DN
4869 done
4870 ac_cv_prog_CPP=$CPP
aaa36002 4871
eb697db5
DN
4872fi
4873 CPP=$ac_cv_prog_CPP
4874else
4875 ac_cv_prog_CPP=$CPP
4876fi
4877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4878$as_echo "$CPP" >&6; }
4879ac_preproc_ok=false
4880for ac_c_preproc_warn_flag in '' yes
4881do
4882 # Use a header file that comes with gcc, so configuring glibc
4883 # with a fresh cross-compiler works.
4884 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4885 # <limits.h> exists even on freestanding compilers.
4886 # On the NeXT, cc -E runs the code through the compiler's parser,
4887 # not just through cpp. "Syntax error" is here to catch this case.
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889/* end confdefs.h. */
4890#ifdef __STDC__
4891# include <limits.h>
4892#else
4893# include <assert.h>
4894#endif
4895 Syntax error
4896_ACEOF
4897if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4898
eb697db5
DN
4899else
4900 # Broken: fails on valid input.
4901continue
4902fi
4903rm -f conftest.err conftest.$ac_ext
5929fbe7 4904
eb697db5
DN
4905 # OK, works on sane cases. Now check whether nonexistent headers
4906 # can be detected and how.
4907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4908/* end confdefs.h. */
4909#include <ac_nonexistent.h>
5929fbe7 4910_ACEOF
eb697db5
DN
4911if ac_fn_c_try_cpp "$LINENO"; then :
4912 # Broken: success on invalid input.
4913continue
4914else
4915 # Passes both tests.
4916ac_preproc_ok=:
4917break
4918fi
4919rm -f conftest.err conftest.$ac_ext
5929fbe7 4920
eb697db5
DN
4921done
4922# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4923rm -f conftest.err conftest.$ac_ext
4924if $ac_preproc_ok; then :
5929fbe7 4925
eb697db5
DN
4926else
4927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4929as_fn_error "C preprocessor \"$CPP\" fails sanity check
4930See \`config.log' for more details." "$LINENO" 5; }
4931fi
5929fbe7 4932
eb697db5
DN
4933ac_ext=c
4934ac_cpp='$CPP $CPPFLAGS'
4935ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4936ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4937ac_compiler_gnu=$ac_cv_c_compiler_gnu
4938
4939# Find a good install program. We prefer a C program (faster),
4940# so one script is as good as another. But avoid the broken or
4941# incompatible versions:
4942# SysV /etc/install, /usr/sbin/install
4943# SunOS /usr/etc/install
4944# IRIX /sbin/install
4945# AIX /bin/install
4946# AmigaOS /C/install, which installs bootblocks on floppy discs
4947# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4948# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4949# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4950# OS/2's system install, which has a completely different semantic
4951# ./install, which can be erroneously created by make from ./install.sh.
4952# Reject install programs that cannot install multiple files.
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4954$as_echo_n "checking for a BSD-compatible install... " >&6; }
4955if test -z "$INSTALL"; then
4956if test "${ac_cv_path_install+set}" = set; then :
4957 $as_echo_n "(cached) " >&6
4958else
4959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
4964 # Account for people who put trailing slashes in PATH elements.
4965case $as_dir/ in #((
4966 ./ | .// | /[cC]/* | \
4967 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4968 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4969 /usr/ucb/* ) ;;
4970 *)
4971 # OSF1 and SCO ODT 3.0 have their own names for install.
4972 # Don't use installbsd from OSF since it installs stuff as root
4973 # by default.
4974 for ac_prog in ginstall scoinst install; do
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4977 if test $ac_prog = install &&
4978 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4979 # AIX install. It has an incompatible calling convention.
4980 :
4981 elif test $ac_prog = install &&
4982 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4983 # program-specific install script used by HP pwplus--don't use.
4984 :
4985 else
4986 rm -rf conftest.one conftest.two conftest.dir
4987 echo one > conftest.one
4988 echo two > conftest.two
4989 mkdir conftest.dir
4990 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4991 test -s conftest.one && test -s conftest.two &&
4992 test -s conftest.dir/conftest.one &&
4993 test -s conftest.dir/conftest.two
4994 then
4995 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4996 break 3
4997 fi
4998 fi
4999 fi
5000 done
5001 done
5002 ;;
5003esac
15e12598 5004
eb697db5
DN
5005 done
5006IFS=$as_save_IFS
8c5ff6dd 5007
eb697db5 5008rm -rf conftest.one conftest.two conftest.dir
8c5ff6dd 5009
eb697db5
DN
5010fi
5011 if test "${ac_cv_path_install+set}" = set; then
5012 INSTALL=$ac_cv_path_install
5013 else
5014 # As a last resort, use the slow shell script. Don't cache a
5015 # value for INSTALL within a source directory, because that will
5016 # break other packages using the cache if that directory is
5017 # removed, or if the value is a relative name.
5018 INSTALL=$ac_install_sh
5019 fi
5020fi
5021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5022$as_echo "$INSTALL" >&6; }
cd03c74a 5023
eb697db5
DN
5024# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5025# It thinks the first close brace ends the variable substitution.
5026test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
15e12598 5027
eb697db5 5028test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
15e12598 5029
eb697db5 5030test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
a4f64981 5031
eb697db5
DN
5032if test "x$RANLIB" = x; then
5033 if test -n "$ac_tool_prefix"; then
5034 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5035set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8c5ff6dd 5037$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5038if test "${ac_cv_prog_RANLIB+set}" = set; then :
7186fb09
GM
5039 $as_echo_n "(cached) " >&6
5040else
eb697db5
DN
5041 if test -n "$RANLIB"; then
5042 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5043else
5044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8c5ff6dd
KR
5045for as_dir in $PATH
5046do
5047 IFS=$as_save_IFS
5048 test -z "$as_dir" && as_dir=.
eb697db5 5049 for ac_exec_ext in '' $ac_executable_extensions; do
8c5ff6dd 5050 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5051 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8c5ff6dd
KR
5053 break 2
5054 fi
5055done
eb697db5 5056 done
8c5ff6dd 5057IFS=$as_save_IFS
a4f64981 5058
e6df49e4 5059fi
eb697db5
DN
5060fi
5061RANLIB=$ac_cv_prog_RANLIB
5062if test -n "$RANLIB"; then
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5064$as_echo "$RANLIB" >&6; }
a4f64981 5065else
eb697db5 5066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8c5ff6dd 5067$as_echo "no" >&6; }
a4f64981
GM
5068fi
5069
a4f64981 5070
eb697db5
DN
5071fi
5072if test -z "$ac_cv_prog_RANLIB"; then
5073 ac_ct_RANLIB=$RANLIB
5074 # Extract the first word of "ranlib", so it can be a program name with args.
5075set dummy ranlib; ac_word=$2
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
5078if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5079 $as_echo_n "(cached) " >&6
5080else
5081 if test -n "$ac_ct_RANLIB"; then
5082 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
5089 for ac_exec_ext in '' $ac_executable_extensions; do
5090 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5091 ac_cv_prog_ac_ct_RANLIB="ranlib"
5092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093 break 2
5094 fi
5095done
5096 done
5097IFS=$as_save_IFS
8c5ff6dd 5098
eb697db5
DN
5099fi
5100fi
5101ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5102if test -n "$ac_ct_RANLIB"; then
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5104$as_echo "$ac_ct_RANLIB" >&6; }
5105else
5106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5107$as_echo "no" >&6; }
eb697db5 5108fi
e6df49e4 5109
eb697db5
DN
5110 if test "x$ac_ct_RANLIB" = x; then
5111 RANLIB=":"
5112 else
5113 case $cross_compiling:$ac_tool_warned in
5114yes:)
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5117ac_tool_warned=yes ;;
5118esac
5119 RANLIB=$ac_ct_RANLIB
5120 fi
5121else
5122 RANLIB="$ac_cv_prog_RANLIB"
5123fi
a5edbe4a 5124
eb697db5 5125fi
15e12598 5126
eb697db5
DN
5127## Although we're running on an amd64 kernel, we're actually compiling for
5128## the x86 architecture. The user should probably have provided an
5129## explicit --build to `configure', but if everything else than the kernel
5130## is running in i386 mode, we can help them out.
5131if test "$machine" = "amdx86-64"; then
5132 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
5133if test "x$ac_cv_have_decl_i386" = x""yes; then :
15e12598 5134
eb697db5 5135fi
cd03c74a 5136
eb697db5
DN
5137 if test "$ac_cv_have_decl_i386" = "yes"; then
5138 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
5139 machine=intel386
5140 machfile="m/${machine}.h"
5929fbe7 5141 fi
eb697db5 5142fi
49ebbd65 5143
eb697db5
DN
5144# Extract the first word of "install-info", so it can be a program name with args.
5145set dummy install-info; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5929fbe7
GM
5149 $as_echo_n "(cached) " >&6
5150else
eb697db5
DN
5151 case $INSTALL_INFO in
5152 [\\/]* | ?:[\\/]*)
5153 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5154 ;;
5155 *)
5156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157for as_dir in $PATH
5158do
5159 IFS=$as_save_IFS
5160 test -z "$as_dir" && as_dir=.
5161 for ac_exec_ext in '' $ac_executable_extensions; do
5162 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5163 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5165 break 2
5166 fi
5167done
5168 done
5169IFS=$as_save_IFS
8c5ff6dd 5170
eb697db5 5171 ;;
a4f64981 5172esac
eb697db5
DN
5173fi
5174INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5175if test -n "$INSTALL_INFO"; then
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5177$as_echo "$INSTALL_INFO" >&6; }
5178else
5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180$as_echo "no" >&6; }
5929fbe7 5181fi
49ebbd65 5182
08b47d3d 5183
eb697db5
DN
5184# Extract the first word of "install-info", so it can be a program name with args.
5185set dummy install-info; ac_word=$2
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 5187$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5188if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5929fbe7
GM
5189 $as_echo_n "(cached) " >&6
5190else
eb697db5 5191 case $INSTALL_INFO in
5929fbe7 5192 [\\/]* | ?:[\\/]*)
eb697db5 5193 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5929fbe7
GM
5194 ;;
5195 *)
5196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 5197for as_dir in /usr/sbin
5929fbe7
GM
5198do
5199 IFS=$as_save_IFS
5200 test -z "$as_dir" && as_dir=.
eb697db5 5201 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 5202 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5203 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5204 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7 5205 break 2
8c5ff6dd 5206 fi
5929fbe7 5207done
eb697db5 5208 done
5929fbe7
GM
5209IFS=$as_save_IFS
5210
5929fbe7
GM
5211 ;;
5212esac
5213fi
eb697db5
DN
5214INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5215if test -n "$INSTALL_INFO"; then
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5217$as_echo "$INSTALL_INFO" >&6; }
5929fbe7 5218else
eb697db5 5219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5220$as_echo "no" >&6; }
8c5ff6dd 5221fi
08b47d3d 5222
08b47d3d 5223
eb697db5
DN
5224# Extract the first word of "install-info", so it can be a program name with args.
5225set dummy install-info; ac_word=$2
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5227$as_echo_n "checking for $ac_word... " >&6; }
5228if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5229 $as_echo_n "(cached) " >&6
5230else
5231 case $INSTALL_INFO in
5232 [\\/]* | ?:[\\/]*)
5233 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5234 ;;
5235 *)
5236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5237for as_dir in /sbin
5238do
5239 IFS=$as_save_IFS
5240 test -z "$as_dir" && as_dir=.
5241 for ac_exec_ext in '' $ac_executable_extensions; do
5242 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5243 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5245 break 2
5929fbe7 5246 fi
eb697db5
DN
5247done
5248 done
5249IFS=$as_save_IFS
08b47d3d 5250
eb697db5
DN
5251 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5252 ;;
5253esac
5254fi
5255INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5256if test -n "$INSTALL_INFO"; then
5257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5258$as_echo "$INSTALL_INFO" >&6; }
8c5ff6dd 5259else
eb697db5
DN
5260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5261$as_echo "no" >&6; }
a4f64981 5262fi
08b47d3d 5263
5929fbe7 5264
eb697db5
DN
5265# Extract the first word of "gzip", so it can be a program name with args.
5266set dummy gzip; ac_word=$2
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5268$as_echo_n "checking for $ac_word... " >&6; }
5269if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
5929fbe7 5270 $as_echo_n "(cached) " >&6
5929fbe7 5271else
eb697db5
DN
5272 case $GZIP_PROG in
5273 [\\/]* | ?:[\\/]*)
5274 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
5275 ;;
5276 *)
5277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5278for as_dir in $PATH
5279do
5280 IFS=$as_save_IFS
5281 test -z "$as_dir" && as_dir=.
5282 for ac_exec_ext in '' $ac_executable_extensions; do
5283 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5284 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
5285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5286 break 2
5287 fi
5288done
5289 done
5290IFS=$as_save_IFS
5929fbe7 5291
eb697db5 5292 ;;
8c5ff6dd 5293esac
eb697db5
DN
5294fi
5295GZIP_PROG=$ac_cv_path_GZIP_PROG
5296if test -n "$GZIP_PROG"; then
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
5298$as_echo "$GZIP_PROG" >&6; }
5929fbe7 5299else
eb697db5
DN
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5301$as_echo "no" >&6; }
5929fbe7
GM
5302fi
5303
5929fbe7 5304
5929fbe7 5305
8c5ff6dd 5306
eb697db5
DN
5307## Need makeinfo >= 4.6 (?) to build the manuals.
5308# Extract the first word of "makeinfo", so it can be a program name with args.
5309set dummy makeinfo; ac_word=$2
5310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5311$as_echo_n "checking for $ac_word... " >&6; }
5312if test "${ac_cv_path_MAKEINFO+set}" = set; then :
5929fbe7
GM
5313 $as_echo_n "(cached) " >&6
5314else
eb697db5
DN
5315 case $MAKEINFO in
5316 [\\/]* | ?:[\\/]*)
5317 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5318 ;;
5319 *)
5320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5321for as_dir in $PATH
5322do
5323 IFS=$as_save_IFS
5324 test -z "$as_dir" && as_dir=.
5325 for ac_exec_ext in '' $ac_executable_extensions; do
5326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5327 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5328 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5329 break 2
5330 fi
5331done
5332 done
5333IFS=$as_save_IFS
5929fbe7 5334
eb697db5
DN
5335 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5336 ;;
a4f64981 5337esac
eb697db5
DN
5338fi
5339MAKEINFO=$ac_cv_path_MAKEINFO
5340if test -n "$MAKEINFO"; then
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
5342$as_echo "$MAKEINFO" >&6; }
5929fbe7 5343else
eb697db5
DN
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5345$as_echo "no" >&6; }
5346fi
e6df49e4 5347
eb697db5
DN
5348
5349if test "$MAKEINFO" != "no" && \
5350 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
5351 MAKEINFO=no
5929fbe7 5352fi
e6df49e4 5353
eb697db5
DN
5354## Makeinfo is unusual. For a released Emacs, the manuals are
5355## pre-built, and not deleted by the normal clean rules. makeinfo is
5356## therefore in the category of "special tools" not normally required, which
5357## configure does not have to check for (eg autoconf itself).
5358## In a Bazaar checkout on the other hand, the manuals are not included.
5359## So makeinfo is a requirement to build from Bazaar, and configure
5360## should test for it as it does for any other build requirement.
5361## We use the presence of $srcdir/info/emacs to distinguish a release,
5362## with pre-built manuals, from a Bazaar checkout.
5363if test "$MAKEINFO" = "no"; then
5364 if test "x${with_makeinfo}" = "xno"; then
5365 MAKEINFO=off
5366 elif test ! -e $srcdir/info/emacs; then
5367 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
5368source tree does not seem to have pre-built manuals in the \`info' directory.
5369Either install a suitable version of makeinfo, or re-run configure
5370with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
5371 fi
5929fbe7 5372fi
eb697db5
DN
5373
5374
5375if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5376then
5377 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5929fbe7 5378fi
e6df49e4 5379
eb697db5
DN
5380if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5381then
5382 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5929fbe7 5383fi
e6df49e4
GM
5384
5385
eb697db5
DN
5386late_LDFLAGS=$LDFLAGS
5387if test "$GCC" = yes; then
5388 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5389else
5390 LDFLAGS="$LDFLAGS -znocombreloc"
5391fi
e6df49e4 5392
eb697db5
DN
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
5394$as_echo_n "checking for -znocombreloc... " >&6; }
5395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5396/* end confdefs.h. */
5397main(){return 0;}
5929fbe7 5398_ACEOF
eb697db5
DN
5399if ac_fn_c_try_link "$LINENO"; then :
5400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5401$as_echo "yes" >&6; }
a4f64981 5402else
eb697db5
DN
5403 LDFLAGS=$late_LDFLAGS
5404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5405$as_echo "no" >&6; }
8c5ff6dd 5406fi
eb697db5
DN
5407rm -f core conftest.err conftest.$ac_objext \
5408 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 5409
eb697db5 5410#### Extract some information from the operating system and machine files.
8c5ff6dd 5411
eb697db5
DN
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine- and system-dependent files to find out
5413 - which libraries the lib-src programs will want, and
5414 - whether the GNU malloc routines are usable..." >&5
5415$as_echo "$as_me: checking the machine- and system-dependent files to find out
5416 - which libraries the lib-src programs will want, and
5417 - whether the GNU malloc routines are usable..." >&6;}
8c5ff6dd 5418
eb697db5
DN
5419### First figure out CFLAGS (which we use for running the compiler here)
5420### and REAL_CFLAGS (which we use for real compilation).
5421### The two are the same except on a few systems, where they are made
5422### different to work around various lossages. For example,
5423### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5424### as implying static linking.
8c5ff6dd 5425
eb697db5
DN
5426### If the CFLAGS env var is specified, we use that value
5427### instead of the default.
8c5ff6dd 5428
eb697db5
DN
5429### It's not important that this name contain the PID; you can't run
5430### two configures in the same directory and have anything work
5431### anyway.
5432tempcname="conftest.c"
8c5ff6dd 5433
eb697db5
DN
5434echo '
5435#include "'${srcdir}'/src/'${opsysfile}'"
5436#include "'${srcdir}'/src/'${machfile}'"
8c5ff6dd 5437
eb697db5 5438configure___ LIBX=-lX11
8c5ff6dd 5439
eb697db5
DN
5440#ifdef CANNOT_DUMP
5441configure___ cannot_dump=yes
5442#else
5443configure___ cannot_dump=no
5444#endif
8c5ff6dd 5445
eb697db5
DN
5446#ifdef SYSTEM_MALLOC
5447configure___ system_malloc=yes
5448#else
5449configure___ system_malloc=no
5450#endif
5929fbe7 5451
eb697db5
DN
5452#ifdef USE_MMAP_FOR_BUFFERS
5453configure___ use_mmap_for_buffers=yes
5454#else
5455configure___ use_mmap_for_buffers=no
5456#endif
a4f64981 5457
eb697db5
DN
5458#ifndef C_OPTIMIZE_SWITCH
5459#ifdef __GNUC__
5460#define C_OPTIMIZE_SWITCH -O2
5461#else
5462#define C_OPTIMIZE_SWITCH -O
5463#endif
5464#endif
8c5ff6dd 5465
eb697db5
DN
5466#ifndef C_WARNINGS_SWITCH
5467#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5468#endif
8c5ff6dd 5469
eb697db5 5470#ifdef THIS_IS_CONFIGURE
5929fbe7 5471
eb697db5
DN
5472/* Get the CFLAGS for tests in configure. */
5473#ifdef __GNUC__
5474configure___ CFLAGS=-g C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5475#else
5476configure___ CFLAGS='${SPECIFIED_CFLAGS}'
5477#endif
5478
5479#else /* not THIS_IS_CONFIGURE */
5480
5481/* Get the CFLAGS for real compilation. */
5482#ifdef __GNUC__
5483configure___ REAL_CFLAGS=-g C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
5484#else
5485configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}'
5486#endif
5487
5488#endif /* not THIS_IS_CONFIGURE */
5489' > ${tempcname}
5490
5491LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
5492
5493# The value of CPP is a quoted variable reference, so we need to do this
5494# to get its actual value...
5495CPP=`eval "echo $CPP"`
5496eval `${CPP} -Isrc ${tempcname} \
5497 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5498if test "x$SPECIFIED_CFLAGS" = x; then
5499 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5500 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5929fbe7 5501else
eb697db5 5502 REAL_CFLAGS="$CFLAGS"
5929fbe7 5503fi
eb697db5 5504rm ${tempcname}
5929fbe7 5505
e6df49e4 5506
eb697db5
DN
5507
5508
5509UNEXEC_OBJ=unexelf.o
5510case "$opsys" in
5511 aix4-2)
5512 UNEXEC_OBJ=unexaix.o
5513 ;;
5514 cygwin)
5515 UNEXEC_OBJ=unexcw.o
5516 ;;
5517 darwin)
5518 UNEXEC_OBJ=unexmacosx.o
5519 ;;
5520 hpux10-20 | hpux11)
5521 UNEXEC_OBJ=unexhp9k800.o
5522 ;;
5523 sol2-10)
5524 # Use the Solaris dldump() function, called from unexsol.c, to dump
5525 # emacs, instead of the generic ELF dump code found in unexelf.c.
5526 # The resulting binary has a complete symbol table, and is better
5527 # for debugging and other observability tools (debuggers, pstack, etc).
5528 #
5529 # If you encounter a problem using dldump(), please consider sending
5530 # a message to the OpenSolaris tools-linking mailing list:
5531 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
5532 #
5533 # It is likely that dldump() works with older Solaris too, but this has
5534 # not been tested, so for now this change is for Solaris 10 or newer.
5535 UNEXEC_OBJ=unexsol.o
5536 ;;
5929fbe7 5537esac
5929fbe7 5538
eb697db5
DN
5539LD_SWITCH_SYSTEM=
5540case "$opsys" in
5541 freebsd)
5542 ## Let `ld' find image libs and similar things in /usr/local/lib.
5543 ## The system compiler, GCC, has apparently been modified to not
5544 ## look there, contrary to what a stock GCC would do.
5545 LD_SWITCH_SYSTEM=-L/usr/local/lib
5546 ;;
5929fbe7 5547
eb697db5
DN
5548 gnu-linux)
5549 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
5550 test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0"
5551 ;;
e6df49e4 5552
eb697db5
DN
5553 netbsd)
5554 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
5555 ;;
8c5ff6dd 5556
eb697db5
DN
5557 openbsd)
5558 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
5559 ## otherwise Emacs dumps core on elf systems.
5560 LD_SWITCH_SYSTEM="-Z"
5561 ;;
5562esac
8c5ff6dd
KR
5563
5564
eb697db5 5565ac_link="$ac_link $LD_SWITCH_SYSTEM"
8c5ff6dd 5566
eb697db5
DN
5567## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
5568## which has not been defined yet. When this was handled with cpp,
5569## it was expanded to null when configure sourced the s/*.h file.
5570## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
5571## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
5572## (or somesuch), but because it is supposed to go at the _front_
5573## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
5574## Compare with the gnu-linux case below, which added to the end
5575## of LD_SWITCH_SYSTEM, and so can instead go at the front of
5576## LD_SWITCH_SYSTEM_TEMACS.
5577case "$opsys" in
5578 netbsd|openbsd)
5579 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
5580 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
5581esac
8c5ff6dd 5582
8c5ff6dd 5583
eb697db5
DN
5584C_SWITCH_MACHINE=
5585if test "$machine" = "alpha"; then
5586 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
5587if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8c5ff6dd 5588
5929fbe7 5589fi
8c5ff6dd 5590
eb697db5
DN
5591 if test "$ac_cv_have_decl___ELF__" = "yes"; then
5592 ## With ELF, make sure that all common symbols get allocated to in the
5593 ## data section. Otherwise, the dump of temacs may miss variables in
5594 ## the shared library that have been initialized. For example, with
5595 ## GNU libc, __malloc_initialized would normally be resolved to the
5596 ## shared library's .bss section, which is fatal.
5597 if test "x$GCC" = "xyes"; then
5598 C_SWITCH_MACHINE="-fno-common"
5599 else
5600 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
5601 fi
5602 else
5603 UNEXEC_OBJ=unexalpha.o
8c5ff6dd 5604 fi
15e12598 5605fi
8c5ff6dd 5606
8c5ff6dd 5607
8c5ff6dd 5608
8c5ff6dd 5609
eb697db5
DN
5610C_SWITCH_SYSTEM=
5611## Some programs in src produce warnings saying certain subprograms
5612## are too complex and need a MAXMEM value greater than 2000 for
5613## additional optimization. --nils@exp-math.uni-essen.de
5614test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
5615 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
5616## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
5617## It is redundant in glibc2, since we define _GNU_SOURCE.
a4f64981 5618
e6df49e4 5619
8c5ff6dd 5620
eb697db5
DN
5621LIBS_SYSTEM=
5622case "$opsys" in
5623 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
5624 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
5929fbe7 5625
eb697db5 5626 freebsd) LIBS_SYSTEM="-lutil" ;;
e6df49e4 5627
eb697db5 5628 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8c5ff6dd 5629
eb697db5 5630 sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;;
e6df49e4 5631
eb697db5
DN
5632 ## Motif needs -lgen.
5633 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
5929fbe7 5634esac
eb697db5
DN
5635
5636
5637
5638### Make sure subsequent tests use flags consistent with the build flags.
5639
5640if test x"${OVERRIDE_CPPFLAGS}" != x; then
5641 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5929fbe7 5642else
eb697db5 5643 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
15e12598 5644fi
e6df49e4 5645
a4f64981 5646
eb697db5
DN
5647
5648# Check whether --enable-largefile was given.
5649if test "${enable_largefile+set}" = set; then :
5650 enableval=$enable_largefile;
a4f64981
GM
5651fi
5652
eb697db5 5653if test "$enable_largefile" != no; then
a4f64981 5654
eb697db5
DN
5655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5656$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5657if test "${ac_cv_sys_largefile_CC+set}" = set; then :
a4f64981
GM
5658 $as_echo_n "(cached) " >&6
5659else
eb697db5
DN
5660 ac_cv_sys_largefile_CC=no
5661 if test "$GCC" != yes; then
5662 ac_save_CC=$CC
5663 while :; do
5664 # IRIX 6.2 and later do not support large files by default,
5665 # so use the C compiler's -n32 option if that helps.
5666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5667/* end confdefs.h. */
eb697db5
DN
5668#include <sys/types.h>
5669 /* Check that off_t can represent 2**63 - 1 correctly.
5670 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5671 since some C++ compilers masquerading as C compilers
5672 incorrectly reject 9223372036854775807. */
5673#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5674 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5675 && LARGE_OFF_T % 2147483647 == 1)
5676 ? 1 : -1];
a4f64981
GM
5677int
5678main ()
5679{
eb697db5 5680
a4f64981
GM
5681 ;
5682 return 0;
5683}
5684_ACEOF
eb697db5
DN
5685 if ac_fn_c_try_compile "$LINENO"; then :
5686 break
15e12598 5687fi
eb697db5
DN
5688rm -f core conftest.err conftest.$ac_objext
5689 CC="$CC -n32"
5690 if ac_fn_c_try_compile "$LINENO"; then :
5691 ac_cv_sys_largefile_CC=' -n32'; break
5929fbe7 5692fi
eb697db5
DN
5693rm -f core conftest.err conftest.$ac_objext
5694 break
5695 done
5696 CC=$ac_save_CC
5697 rm -f conftest.$ac_ext
5698 fi
a4f64981 5699fi
eb697db5
DN
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5701$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5702 if test "$ac_cv_sys_largefile_CC" != no; then
5703 CC=$CC$ac_cv_sys_largefile_CC
5704 fi
a4f64981 5705
eb697db5
DN
5706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5707$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5708if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5709 $as_echo_n "(cached) " >&6
5710else
5711 while :; do
5712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5713/* end confdefs.h. */
5714#include <sys/types.h>
5715 /* Check that off_t can represent 2**63 - 1 correctly.
5716 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5717 since some C++ compilers masquerading as C compilers
5718 incorrectly reject 9223372036854775807. */
5719#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5721 && LARGE_OFF_T % 2147483647 == 1)
5722 ? 1 : -1];
5723int
5724main ()
5725{
8c5ff6dd 5726
eb697db5
DN
5727 ;
5728 return 0;
5729}
5929fbe7 5730_ACEOF
eb697db5
DN
5731if ac_fn_c_try_compile "$LINENO"; then :
5732 ac_cv_sys_file_offset_bits=no; break
5733fi
5734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5736/* end confdefs.h. */
eb697db5
DN
5737#define _FILE_OFFSET_BITS 64
5738#include <sys/types.h>
5739 /* Check that off_t can represent 2**63 - 1 correctly.
5740 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5741 since some C++ compilers masquerading as C compilers
5742 incorrectly reject 9223372036854775807. */
5743#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5744 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5745 && LARGE_OFF_T % 2147483647 == 1)
5746 ? 1 : -1];
5747int
5748main ()
5749{
a5edbe4a 5750
eb697db5
DN
5751 ;
5752 return 0;
5753}
5754_ACEOF
5755if ac_fn_c_try_compile "$LINENO"; then :
5756 ac_cv_sys_file_offset_bits=64; break
a4f64981 5757fi
eb697db5
DN
5758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5759 ac_cv_sys_file_offset_bits=unknown
5760 break
5761done
5762fi
5763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5764$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5765case $ac_cv_sys_file_offset_bits in #(
5766 no | unknown) ;;
5767 *)
5768cat >>confdefs.h <<_ACEOF
5769#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5770_ACEOF
5771;;
5929fbe7 5772esac
eb697db5
DN
5773rm -rf conftest*
5774 if test $ac_cv_sys_file_offset_bits = unknown; then
5775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5776$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5777if test "${ac_cv_sys_large_files+set}" = set; then :
5929fbe7 5778 $as_echo_n "(cached) " >&6
a4f64981 5779else
eb697db5
DN
5780 while :; do
5781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5782/* end confdefs.h. */
5783#include <sys/types.h>
5784 /* Check that off_t can represent 2**63 - 1 correctly.
5785 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5786 since some C++ compilers masquerading as C compilers
5787 incorrectly reject 9223372036854775807. */
5788#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5789 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5790 && LARGE_OFF_T % 2147483647 == 1)
5791 ? 1 : -1];
5792int
5793main ()
5794{
8c5ff6dd 5795
eb697db5
DN
5796 ;
5797 return 0;
5798}
5929fbe7 5799_ACEOF
eb697db5
DN
5800if ac_fn_c_try_compile "$LINENO"; then :
5801 ac_cv_sys_large_files=no; break
5802fi
5803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 5805/* end confdefs.h. */
eb697db5
DN
5806#define _LARGE_FILES 1
5807#include <sys/types.h>
5808 /* Check that off_t can represent 2**63 - 1 correctly.
5809 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5810 since some C++ compilers masquerading as C compilers
5811 incorrectly reject 9223372036854775807. */
5812#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5813 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5814 && LARGE_OFF_T % 2147483647 == 1)
5815 ? 1 : -1];
8c5ff6dd
KR
5816int
5817main ()
5818{
eb697db5 5819
8c5ff6dd
KR
5820 ;
5821 return 0;
5822}
5823_ACEOF
eb697db5
DN
5824if ac_fn_c_try_compile "$LINENO"; then :
5825 ac_cv_sys_large_files=1; break
8c5ff6dd 5826fi
eb697db5
DN
5827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5828 ac_cv_sys_large_files=unknown
5829 break
5830done
5929fbe7 5831fi
eb697db5
DN
5832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5833$as_echo "$ac_cv_sys_large_files" >&6; }
5834case $ac_cv_sys_large_files in #(
5835 no | unknown) ;;
5836 *)
5837cat >>confdefs.h <<_ACEOF
5838#define _LARGE_FILES $ac_cv_sys_large_files
5839_ACEOF
5840;;
5841esac
5842rm -rf conftest*
5843 fi
e6df49e4 5844fi
a5edbe4a 5845
5929fbe7
GM
5846
5847
eb697db5
DN
5848## If user specified a crt-dir, use that unconditionally.
5849if test "X$CRT_DIR" = "X"; then
5929fbe7 5850
eb697db5
DN
5851 case "$canonical" in
5852 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
5853 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5854 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5855 ## For anything else (eg /usr/lib32), it is up the user to specify
5856 ## the location (bug#5655).
5857 ## Test for crtn.o, not just the directory, because sometimes the
5858 ## directory exists but does not have the relevant files (bug#1287).
5859 ## FIXME better to test for binary compatibility somehow.
5860 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5861 ;;
5929fbe7 5862
eb697db5
DN
5863 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
5864 esac
e6df49e4 5865
eb697db5
DN
5866 case "$opsys" in
5867 hpux10-20) CRT_DIR=/lib ;;
5868 esac
15e12598 5869
eb697db5
DN
5870 ## Default is /usr/lib.
5871 test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
8c5ff6dd 5872
15e12598 5873else
eb697db5
DN
5874
5875 ## Some platforms don't use any of these files, so it is not
5876 ## appropriate to put this test outside the if block.
5877 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
5878 as_fn_error "crt*.o not found in specified location." "$LINENO" 5
5879
5880fi
5881
5882
5883
5884LIB_MATH=-lm
5885LIB_STANDARD=
5886START_FILES=
5887
5888case $opsys in
5889 cygwin )
5890 LIB_MATH=
5891 START_FILES='ecrt0.o'
5892 ;;
5893 darwin )
5894 ## Adding -lm confuses the dynamic linker, so omit it.
5895 LIB_MATH=
5896 START_FILES='pre-crt0.o'
5897 ;;
5898 freebsd )
5899 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5900 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5901 ;;
5902 gnu-linux | gnu-kfreebsd )
5903 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
5904 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
5905 ;;
5906 hpux10-20 | hpux11 )
5907 LIB_STANDARD=-lc
5908 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
5909 ;;
5910 netbsd | openbsd )
5911 if test -f $CRT_DIR/crti.o; then
5912 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5913 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5914 else
5915 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
5916 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
5917 fi
5918 ;;
5929fbe7 5919esac
5929fbe7 5920
5929fbe7 5921
5929fbe7 5922
5929fbe7 5923
a4f64981 5924
5929fbe7 5925
e6df49e4 5926
eb697db5
DN
5927if test "${with_sound}" != "no"; then
5928 # Sound support for GNU/Linux and the free BSDs.
5929 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5930do :
5931 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5932ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5933eval as_val=\$$as_ac_Header
5934 if test "x$as_val" = x""yes; then :
5935 cat >>confdefs.h <<_ACEOF
5936#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5937_ACEOF
e6df49e4 5938
5929fbe7 5939fi
eb697db5
DN
5940
5941done
5942
5943 # Emulation library used on NetBSD.
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5945$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
5946if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
a4f64981 5947 $as_echo_n "(cached) " >&6
a4f64981 5948else
5929fbe7 5949 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
5950LIBS="-lossaudio $LIBS"
5951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5952/* end confdefs.h. */
8c5ff6dd 5953
5929fbe7
GM
5954/* Override any GCC internal prototype to avoid an error.
5955 Use char because int might match the return type of a GCC
5956 builtin and then its argument prototype would still apply. */
5957#ifdef __cplusplus
5958extern "C"
5959#endif
eb697db5 5960char _oss_ioctl ();
8c5ff6dd
KR
5961int
5962main ()
5963{
eb697db5 5964return _oss_ioctl ();
8c5ff6dd
KR
5965 ;
5966 return 0;
5967}
a4f64981 5968_ACEOF
eb697db5
DN
5969if ac_fn_c_try_link "$LINENO"; then :
5970 ac_cv_lib_ossaudio__oss_ioctl=yes
a4f64981 5971else
eb697db5 5972 ac_cv_lib_ossaudio__oss_ioctl=no
a5edbe4a 5973fi
eb697db5
DN
5974rm -f core conftest.err conftest.$ac_objext \
5975 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
5976LIBS=$ac_check_lib_save_LIBS
5977fi
eb697db5
DN
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
5979$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
5980if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
5981 LIBSOUND=-lossaudio
5929fbe7 5982else
eb697db5 5983 LIBSOUND=
8c5ff6dd 5984fi
a4f64981 5985
8c5ff6dd
KR
5986
5987
eb697db5
DN
5988 ALSA_REQUIRED=1.0.0
5989 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8c5ff6dd 5990
eb697db5
DN
5991 succeeded=no
5992
5993 # Extract the first word of "pkg-config", so it can be a program name with args.
5994set dummy pkg-config; ac_word=$2
5995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5996$as_echo_n "checking for $ac_word... " >&6; }
5997if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8c5ff6dd
KR
5998 $as_echo_n "(cached) " >&6
5999else
eb697db5
DN
6000 case $PKG_CONFIG in
6001 [\\/]* | ?:[\\/]*)
6002 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6003 ;;
6004 *)
6005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6006for as_dir in $PATH
6007do
6008 IFS=$as_save_IFS
6009 test -z "$as_dir" && as_dir=.
6010 for ac_exec_ext in '' $ac_executable_extensions; do
6011 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6012 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6014 break 2
6015 fi
6016done
6017 done
6018IFS=$as_save_IFS
5929fbe7 6019
eb697db5
DN
6020 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6021 ;;
5929fbe7 6022esac
a4f64981 6023fi
eb697db5
DN
6024PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6025if test -n "$PKG_CONFIG"; then
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6027$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 6028else
eb697db5
DN
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
8c5ff6dd 6031fi
15e12598
VB
6032
6033
6034
eb697db5
DN
6035 if test "$PKG_CONFIG" = "no" ; then
6036 HAVE_ALSA=no
6037 else
6038 PKG_CONFIG_MIN_VERSION=0.9.0
6039 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
6041$as_echo_n "checking for $ALSA_MODULES... " >&6; }
5929fbe7 6042
eb697db5
DN
6043 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6045$as_echo "yes" >&6; }
6046 succeeded=yes
e6df49e4 6047
eb697db5
DN
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
6049$as_echo_n "checking ALSA_CFLAGS... " >&6; }
6050 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
6052$as_echo "$ALSA_CFLAGS" >&6; }
4e569696 6053
eb697db5
DN
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
6055$as_echo_n "checking ALSA_LIBS... " >&6; }
6056 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
6058$as_echo "$ALSA_LIBS" >&6; }
6059 else
6060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
6062 ALSA_CFLAGS=""
6063 ALSA_LIBS=""
6064 ## If we have a custom action on failure, don't print errors, but
6065 ## do set a variable so people can do so.
6066 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5929fbe7 6067
eb697db5
DN
6068 fi
6069
6070
6071
6072 else
6073 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6074 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6075 fi
5929fbe7 6076 fi
4e569696 6077
eb697db5
DN
6078 if test $succeeded = yes; then
6079 HAVE_ALSA=yes
6080 else
6081 HAVE_ALSA=no
6082 fi
6083
6084 if test $HAVE_ALSA = yes; then
6085 SAVE_CFLAGS="$CFLAGS"
6086 SAVE_LDFLAGS="$LDFLAGS"
6087 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6088 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6090/* end confdefs.h. */
eb697db5
DN
6091#include <asoundlib.h>
6092int
6093main ()
6094{
6095snd_lib_error_set_handler (0);
6096 ;
6097 return 0;
6098}
6099_ACEOF
6100if ac_fn_c_try_compile "$LINENO"; then :
6101 emacs_alsa_normal=yes
8c5ff6dd 6102else
eb697db5 6103 emacs_alsa_normal=no
8c5ff6dd 6104fi
5929fbe7 6105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6106 if test "$emacs_alsa_normal" != yes; then
6107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6108/* end confdefs.h. */
eb697db5
DN
6109#include <alsa/asoundlib.h>
6110int
6111main ()
6112{
6113snd_lib_error_set_handler (0);
6114 ;
6115 return 0;
6116}
5929fbe7 6117_ACEOF
eb697db5
DN
6118if ac_fn_c_try_compile "$LINENO"; then :
6119 emacs_alsa_subdir=yes
5929fbe7 6120else
eb697db5 6121 emacs_alsa_subdir=no
8c5ff6dd 6122fi
eb697db5
DN
6123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6124 if test "$emacs_alsa_subdir" != yes; then
6125 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
6126 fi
6127 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6128 fi
e6df49e4 6129
eb697db5
DN
6130 CFLAGS="$SAVE_CFLAGS"
6131 LDFLAGS="$SAVE_LDFLAGS"
6132 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6133 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
e6df49e4 6134
eb697db5 6135$as_echo "#define HAVE_ALSA 1" >>confdefs.h
e6df49e4 6136
eb697db5 6137 fi
e6df49e4 6138
5929fbe7 6139fi
eb697db5
DN
6140
6141for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6142 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
6143 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
6144 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
6145 sys/utsname.h pwd.h utmp.h
6146do :
6147 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6148ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6149eval as_val=\$$as_ac_Header
6150 if test "x$as_val" = x""yes; then :
6151 cat >>confdefs.h <<_ACEOF
6152#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5929fbe7 6153_ACEOF
15e12598 6154
eb697db5
DN
6155fi
6156
6157done
6158
6159
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
6161$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
6162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6163/* end confdefs.h. */
6164#include <sys/personality.h>
8c5ff6dd
KR
6165int
6166main ()
6167{
eb697db5 6168personality (PER_LINUX32)
8c5ff6dd
KR
6169 ;
6170 return 0;
6171}
6172_ACEOF
eb697db5
DN
6173if ac_fn_c_try_compile "$LINENO"; then :
6174 emacs_cv_personality_linux32=yes
8c5ff6dd 6175else
eb697db5 6176 emacs_cv_personality_linux32=no
5929fbe7 6177fi
eb697db5
DN
6178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
6180$as_echo "$emacs_cv_personality_linux32" >&6; }
08b47d3d 6181
eb697db5 6182if test $emacs_cv_personality_linux32 = yes; then
08b47d3d 6183
eb697db5 6184$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
08b47d3d 6185
eb697db5 6186fi
a4f64981 6187
eb697db5
DN
6188for ac_header in term.h
6189do :
6190 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6191if test "x$ac_cv_header_term_h" = x""yes; then :
6192 cat >>confdefs.h <<_ACEOF
6193#define HAVE_TERM_H 1
5929fbe7 6194_ACEOF
a4f64981 6195
8c5ff6dd 6196fi
a4f64981 6197
eb697db5 6198done
a4f64981 6199
eb697db5
DN
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6201$as_echo_n "checking for ANSI C header files... " >&6; }
6202if test "${ac_cv_header_stdc+set}" = set; then :
8c5ff6dd
KR
6203 $as_echo_n "(cached) " >&6
6204else
eb697db5 6205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6206/* end confdefs.h. */
eb697db5
DN
6207#include <stdlib.h>
6208#include <stdarg.h>
6209#include <string.h>
6210#include <float.h>
6211
6212int
6213main ()
6214{
6215
6216 ;
6217 return 0;
6218}
8c5ff6dd 6219_ACEOF
eb697db5
DN
6220if ac_fn_c_try_compile "$LINENO"; then :
6221 ac_cv_header_stdc=yes
8c5ff6dd 6222else
eb697db5 6223 ac_cv_header_stdc=no
8c5ff6dd 6224fi
5929fbe7 6225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 6226
eb697db5
DN
6227if test $ac_cv_header_stdc = yes; then
6228 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6230/* end confdefs.h. */
eb697db5
DN
6231#include <string.h>
6232
5929fbe7 6233_ACEOF
eb697db5
DN
6234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6235 $EGREP "memchr" >/dev/null 2>&1; then :
6236
5929fbe7 6237else
eb697db5
DN
6238 ac_cv_header_stdc=no
6239fi
6240rm -f conftest*
a4f64981 6241
8c5ff6dd 6242fi
a4f64981 6243
eb697db5
DN
6244if test $ac_cv_header_stdc = yes; then
6245 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6247/* end confdefs.h. */
6248#include <stdlib.h>
a4f64981 6249
eb697db5
DN
6250_ACEOF
6251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6252 $EGREP "free" >/dev/null 2>&1; then :
a4f64981 6253
5929fbe7 6254else
eb697db5 6255 ac_cv_header_stdc=no
5929fbe7 6256fi
eb697db5 6257rm -f conftest*
a4f64981 6258
8c5ff6dd 6259fi
a4f64981 6260
eb697db5
DN
6261if test $ac_cv_header_stdc = yes; then
6262 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6263 if test "$cross_compiling" = yes; then :
6264 :
6265else
6266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6267/* end confdefs.h. */
6268#include <ctype.h>
6269#include <stdlib.h>
6270#if ((' ' & 0x0FF) == 0x020)
6271# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6272# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6273#else
6274# define ISLOWER(c) \
6275 (('a' <= (c) && (c) <= 'i') \
6276 || ('j' <= (c) && (c) <= 'r') \
6277 || ('s' <= (c) && (c) <= 'z'))
6278# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6279#endif
6280
6281#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6282int
6283main ()
6284{
6285 int i;
6286 for (i = 0; i < 256; i++)
6287 if (XOR (islower (i), ISLOWER (i))
6288 || toupper (i) != TOUPPER (i))
6289 return 2;
6290 return 0;
6291}
8c5ff6dd 6292_ACEOF
eb697db5
DN
6293if ac_fn_c_try_run "$LINENO"; then :
6294
6295else
6296 ac_cv_header_stdc=no
6297fi
6298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6299 conftest.$ac_objext conftest.beam conftest.$ac_ext
6300fi
a4f64981 6301
8c5ff6dd 6302fi
eb697db5
DN
6303fi
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6305$as_echo "$ac_cv_header_stdc" >&6; }
6306if test $ac_cv_header_stdc = yes; then
a4f64981 6307
eb697db5 6308$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a4f64981 6309
eb697db5 6310fi
a4f64981 6311
eb697db5
DN
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
6313$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
6314if test "${ac_cv_header_time+set}" = set; then :
6315 $as_echo_n "(cached) " >&6
6316else
6317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6318/* end confdefs.h. */
6319#include <sys/types.h>
6320#include <sys/time.h>
6321#include <time.h>
a4f64981 6322
eb697db5
DN
6323int
6324main ()
6325{
6326if ((struct tm *) 0)
6327return 0;
6328 ;
6329 return 0;
6330}
8c5ff6dd 6331_ACEOF
eb697db5
DN
6332if ac_fn_c_try_compile "$LINENO"; then :
6333 ac_cv_header_time=yes
6334else
6335 ac_cv_header_time=no
6336fi
6337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6338fi
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
6340$as_echo "$ac_cv_header_time" >&6; }
6341if test $ac_cv_header_time = yes; then
6342
6343$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
6344
6345fi
a4f64981 6346
eb697db5
DN
6347ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6348if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6349 ac_have_decl=1
6350else
6351 ac_have_decl=0
6352fi
a4f64981 6353
eb697db5
DN
6354cat >>confdefs.h <<_ACEOF
6355#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
5929fbe7 6356_ACEOF
a4f64981 6357
eb697db5
DN
6358if test $ac_cv_have_decl_sys_siglist != yes; then
6359 # For Tru64, at least:
6360 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6361if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6362 ac_have_decl=1
6363else
6364 ac_have_decl=0
6365fi
5929fbe7 6366
eb697db5
DN
6367cat >>confdefs.h <<_ACEOF
6368#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
5929fbe7
GM
6369_ACEOF
6370
eb697db5 6371 if test $ac_cv_have_decl___sys_siglist = yes; then
5929fbe7 6372
eb697db5 6373$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
a4f64981 6374
5929fbe7 6375 fi
5929fbe7 6376fi
eb697db5
DN
6377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
6378$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
6379if test "${ac_cv_header_sys_wait_h+set}" = set; then :
5929fbe7 6380 $as_echo_n "(cached) " >&6
5929fbe7 6381else
eb697db5 6382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6383/* end confdefs.h. */
eb697db5
DN
6384#include <sys/types.h>
6385#include <sys/wait.h>
6386#ifndef WEXITSTATUS
6387# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6388#endif
6389#ifndef WIFEXITED
6390# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6391#endif
6392
6393int
6394main ()
6395{
6396 int s;
6397 wait (&s);
6398 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6399 ;
6400 return 0;
6401}
5929fbe7 6402_ACEOF
eb697db5
DN
6403if ac_fn_c_try_compile "$LINENO"; then :
6404 ac_cv_header_sys_wait_h=yes
5929fbe7 6405else
eb697db5 6406 ac_cv_header_sys_wait_h=no
5929fbe7 6407fi
5929fbe7 6408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6409fi
6410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
6411$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6412if test $ac_cv_header_sys_wait_h = yes; then
a4f64981 6413
eb697db5 6414$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
a4f64981 6415
5929fbe7 6416fi
a4f64981 6417
a4f64981 6418
eb697db5
DN
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
6420$as_echo_n "checking for struct utimbuf... " >&6; }
6421if test "${emacs_cv_struct_utimbuf+set}" = set; then :
5929fbe7 6422 $as_echo_n "(cached) " >&6
8c5ff6dd 6423else
eb697db5
DN
6424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6425/* end confdefs.h. */
6426#ifdef TIME_WITH_SYS_TIME
6427#include <sys/time.h>
6428#include <time.h>
6429#else
6430#ifdef HAVE_SYS_TIME_H
6431#include <sys/time.h>
6432#else
6433#include <time.h>
6434#endif
6435#endif
6436#ifdef HAVE_UTIME_H
6437#include <utime.h>
6438#endif
6439int
6440main ()
6441{
6442static struct utimbuf x; x.actime = x.modtime;
6443 ;
6444 return 0;
6445}
6446_ACEOF
6447if ac_fn_c_try_compile "$LINENO"; then :
6448 emacs_cv_struct_utimbuf=yes
6449else
6450 emacs_cv_struct_utimbuf=no
6451fi
6452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6453fi
eb697db5
DN
6454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
6455$as_echo "$emacs_cv_struct_utimbuf" >&6; }
6456if test $emacs_cv_struct_utimbuf = yes; then
6457
6458$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
a4f64981 6459
5929fbe7 6460fi
eb697db5
DN
6461
6462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6463$as_echo_n "checking return type of signal handlers... " >&6; }
6464if test "${ac_cv_type_signal+set}" = set; then :
8c5ff6dd
KR
6465 $as_echo_n "(cached) " >&6
6466else
eb697db5 6467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6468/* end confdefs.h. */
eb697db5
DN
6469#include <sys/types.h>
6470#include <signal.h>
a4f64981 6471
8c5ff6dd
KR
6472int
6473main ()
6474{
eb697db5 6475return *(signal (0, 0)) (0) == 1;
8c5ff6dd
KR
6476 ;
6477 return 0;
6478}
6479_ACEOF
eb697db5
DN
6480if ac_fn_c_try_compile "$LINENO"; then :
6481 ac_cv_type_signal=int
8c5ff6dd 6482else
eb697db5 6483 ac_cv_type_signal=void
5929fbe7 6484fi
eb697db5 6485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929fbe7 6486fi
eb697db5
DN
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6488$as_echo "$ac_cv_type_signal" >&6; }
5929fbe7 6489
eb697db5
DN
6490cat >>confdefs.h <<_ACEOF
6491#define RETSIGTYPE $ac_cv_type_signal
5929fbe7
GM
6492_ACEOF
6493
a4f64981 6494
5929fbe7 6495
eb697db5
DN
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
6497$as_echo_n "checking for speed_t... " >&6; }
6498if test "${emacs_cv_speed_t+set}" = set; then :
e6df49e4
GM
6499 $as_echo_n "(cached) " >&6
6500else
eb697db5 6501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 6502/* end confdefs.h. */
eb697db5 6503#include <termios.h>
8c5ff6dd
KR
6504int
6505main ()
6506{
eb697db5 6507speed_t x = 1;
8c5ff6dd
KR
6508 ;
6509 return 0;
6510}
6511_ACEOF
eb697db5
DN
6512if ac_fn_c_try_compile "$LINENO"; then :
6513 emacs_cv_speed_t=yes
8c5ff6dd 6514else
eb697db5 6515 emacs_cv_speed_t=no
8c5ff6dd 6516fi
eb697db5 6517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6518fi
eb697db5
DN
6519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
6520$as_echo "$emacs_cv_speed_t" >&6; }
6521if test $emacs_cv_speed_t = yes; then
8c5ff6dd 6522
eb697db5 6523$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
91e84f96 6524
8c5ff6dd
KR
6525fi
6526
eb697db5
DN
6527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
6528$as_echo_n "checking for struct timeval... " >&6; }
6529if test "${emacs_cv_struct_timeval+set}" = set; then :
8c5ff6dd
KR
6530 $as_echo_n "(cached) " >&6
6531else
eb697db5 6532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6533/* end confdefs.h. */
eb697db5
DN
6534#ifdef TIME_WITH_SYS_TIME
6535#include <sys/time.h>
6536#include <time.h>
6537#else
6538#ifdef HAVE_SYS_TIME_H
6539#include <sys/time.h>
6540#else
6541#include <time.h>
6542#endif
6543#endif
49ebbd65
DN
6544int
6545main ()
6546{
eb697db5 6547static struct timeval x; x.tv_sec = x.tv_usec;
49ebbd65
DN
6548 ;
6549 return 0;
6550}
6551_ACEOF
eb697db5
DN
6552if ac_fn_c_try_compile "$LINENO"; then :
6553 emacs_cv_struct_timeval=yes
6554else
6555 emacs_cv_struct_timeval=no
6556fi
6557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6558fi
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
6560$as_echo "$emacs_cv_struct_timeval" >&6; }
6561HAVE_TIMEVAL=$emacs_cv_struct_timeval
6562if test $emacs_cv_struct_timeval = yes; then
6563
6564$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
6565
6566fi
6567
6568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
6569$as_echo_n "checking for struct exception... " >&6; }
6570if test "${emacs_cv_struct_exception+set}" = set; then :
6571 $as_echo_n "(cached) " >&6
6572else
6573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6574/* end confdefs.h. */
6575#include <math.h>
6576int
6577main ()
6578{
6579static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
6580 ;
6581 return 0;
6582}
6583_ACEOF
6584if ac_fn_c_try_compile "$LINENO"; then :
6585 emacs_cv_struct_exception=yes
8c5ff6dd 6586else
eb697db5
DN
6587 emacs_cv_struct_exception=no
6588fi
6589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6590fi
6591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
6592$as_echo "$emacs_cv_struct_exception" >&6; }
6593HAVE_EXCEPTION=$emacs_cv_struct_exception
6594if test $emacs_cv_struct_exception != yes; then
6595
6596$as_echo "#define NO_MATHERR 1" >>confdefs.h
91e84f96 6597
08b47d3d 6598fi
91e84f96 6599
eb697db5
DN
6600for ac_header in sys/socket.h
6601do :
6602 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6603if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
6604 cat >>confdefs.h <<_ACEOF
6605#define HAVE_SYS_SOCKET_H 1
6606_ACEOF
6607
5929fbe7 6608fi
91e84f96 6609
eb697db5
DN
6610done
6611
6612for ac_header in net/if.h
6613do :
6614 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
6615#if HAVE_SYS_SOCKET_H
6616#include <sys/socket.h>
6617#endif
6618"
6619if test "x$ac_cv_header_net_if_h" = x""yes; then :
6620 cat >>confdefs.h <<_ACEOF
6621#define HAVE_NET_IF_H 1
5929fbe7 6622_ACEOF
91e84f96 6623
5929fbe7 6624fi
8c5ff6dd 6625
eb697db5
DN
6626done
6627
6628
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
6630$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
6631if test "${ac_cv_struct_tm+set}" = set; then :
15e12598 6632 $as_echo_n "(cached) " >&6
15e12598 6633else
eb697db5 6634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 6635/* end confdefs.h. */
eb697db5
DN
6636#include <sys/types.h>
6637#include <time.h>
a5edbe4a 6638
8c5ff6dd
KR
6639int
6640main ()
6641{
eb697db5
DN
6642struct tm tm;
6643 int *p = &tm.tm_sec;
6644 return !p;
8c5ff6dd
KR
6645 ;
6646 return 0;
6647}
6648_ACEOF
eb697db5
DN
6649if ac_fn_c_try_compile "$LINENO"; then :
6650 ac_cv_struct_tm=time.h
a4f64981 6651else
eb697db5
DN
6652 ac_cv_struct_tm=sys/time.h
6653fi
6654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15e12598 6655fi
eb697db5
DN
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
6657$as_echo "$ac_cv_struct_tm" >&6; }
6658if test $ac_cv_struct_tm = sys/time.h; then
6659
6660$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
a4f64981 6661
8c5ff6dd 6662fi
91e84f96 6663
eb697db5
DN
6664ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
6665#include <$ac_cv_struct_tm>
6666
6667"
6668if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
a4f64981 6669
eb697db5
DN
6670cat >>confdefs.h <<_ACEOF
6671#define HAVE_STRUCT_TM_TM_ZONE 1
5929fbe7 6672_ACEOF
a4f64981
GM
6673
6674
eb697db5 6675fi
a4f64981 6676
eb697db5 6677if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
a4f64981 6678
eb697db5 6679$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
15e12598 6680
15e12598 6681else
eb697db5
DN
6682 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6683"
6684if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6685 ac_have_decl=1
8c5ff6dd 6686else
eb697db5 6687 ac_have_decl=0
8c5ff6dd 6688fi
49ebbd65 6689
eb697db5
DN
6690cat >>confdefs.h <<_ACEOF
6691#define HAVE_DECL_TZNAME $ac_have_decl
6692_ACEOF
6693
6694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6695$as_echo_n "checking for tzname... " >&6; }
6696if test "${ac_cv_var_tzname+set}" = set; then :
5929fbe7
GM
6697 $as_echo_n "(cached) " >&6
6698else
eb697db5 6699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6700/* end confdefs.h. */
eb697db5
DN
6701#include <time.h>
6702#if !HAVE_DECL_TZNAME
6703extern char *tzname[];
5929fbe7
GM
6704#endif
6705
a4f64981
GM
6706int
6707main ()
6708{
eb697db5 6709return tzname[0][0];
a4f64981
GM
6710 ;
6711 return 0;
6712}
6713_ACEOF
eb697db5
DN
6714if ac_fn_c_try_link "$LINENO"; then :
6715 ac_cv_var_tzname=yes
a4f64981 6716else
eb697db5
DN
6717 ac_cv_var_tzname=no
6718fi
6719rm -f core conftest.err conftest.$ac_objext \
6720 conftest$ac_exeext conftest.$ac_ext
6721fi
6722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6723$as_echo "$ac_cv_var_tzname" >&6; }
6724 if test $ac_cv_var_tzname = yes; then
5929fbe7 6725
eb697db5
DN
6726$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6727
6728 fi
a4f64981 6729fi
aaa36002 6730
eb697db5
DN
6731ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6732"
6733if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
6734
6735$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
6736
15e12598 6737fi
eb697db5
DN
6738
6739ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6740#if HAVE_SYS_SOCKET_H
6741#include <sys/socket.h>
6742#endif
6743#if HAVE_NET_IF_H
6744#include <net/if.h>
6745#endif
6746"
6747if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
aaa36002 6748
5929fbe7 6749cat >>confdefs.h <<_ACEOF
eb697db5 6750#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
5929fbe7
GM
6751_ACEOF
6752
cd03c74a 6753
8c5ff6dd 6754fi
eb697db5
DN
6755ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6756#if HAVE_SYS_SOCKET_H
6757#include <sys/socket.h>
6758#endif
6759#if HAVE_NET_IF_H
6760#include <net/if.h>
6761#endif
6762"
6763if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
49ebbd65 6764
eb697db5
DN
6765cat >>confdefs.h <<_ACEOF
6766#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
5929fbe7 6767_ACEOF
49ebbd65 6768
aaa36002 6769
8c5ff6dd 6770fi
eb697db5
DN
6771ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6772#if HAVE_SYS_SOCKET_H
6773#include <sys/socket.h>
6774#endif
6775#if HAVE_NET_IF_H
6776#include <net/if.h>
6777#endif
6778"
6779if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
6780
6781cat >>confdefs.h <<_ACEOF
6782#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
6783_ACEOF
aaa36002 6784
5929fbe7 6785
8c5ff6dd 6786fi
eb697db5
DN
6787ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6788#if HAVE_SYS_SOCKET_H
6789#include <sys/socket.h>
6790#endif
6791#if HAVE_NET_IF_H
6792#include <net/if.h>
6793#endif
6794"
6795if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
cd03c74a 6796
5929fbe7 6797cat >>confdefs.h <<_ACEOF
eb697db5 6798#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
5929fbe7 6799_ACEOF
49ebbd65 6800
7186fb09 6801
8c5ff6dd 6802fi
eb697db5
DN
6803ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6804#if HAVE_SYS_SOCKET_H
6805#include <sys/socket.h>
6806#endif
6807#if HAVE_NET_IF_H
6808#include <net/if.h>
6809#endif
6810"
6811if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
6812
6813cat >>confdefs.h <<_ACEOF
6814#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
6815_ACEOF
7186fb09 6816
5929fbe7 6817
8c5ff6dd
KR
6818fi
6819
5929fbe7 6820
5929fbe7 6821
eb697db5
DN
6822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6823$as_echo_n "checking for function prototypes... " >&6; }
6824if test "$ac_cv_prog_cc_c89" != no; then
6825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6826$as_echo "yes" >&6; }
5929fbe7 6827
eb697db5 6828$as_echo "#define PROTOTYPES 1" >>confdefs.h
5929fbe7 6829
5929fbe7 6830
eb697db5 6831$as_echo "#define __PROTOTYPES 1" >>confdefs.h
5929fbe7 6832
eb697db5
DN
6833else
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6835$as_echo "no" >&6; }
8c5ff6dd 6836fi
15e12598 6837
eb697db5
DN
6838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6839$as_echo_n "checking for working volatile... " >&6; }
6840if test "${ac_cv_c_volatile+set}" = set; then :
5929fbe7
GM
6841 $as_echo_n "(cached) " >&6
6842else
eb697db5 6843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6844/* end confdefs.h. */
5929fbe7 6845
8c5ff6dd
KR
6846int
6847main ()
a4f64981 6848{
eb697db5
DN
6849
6850volatile int x;
6851int * volatile y = (int *) 0;
6852return !x && !y;
8c5ff6dd
KR
6853 ;
6854 return 0;
a4f64981 6855}
8c5ff6dd 6856_ACEOF
eb697db5
DN
6857if ac_fn_c_try_compile "$LINENO"; then :
6858 ac_cv_c_volatile=yes
8c5ff6dd 6859else
eb697db5 6860 ac_cv_c_volatile=no
8c5ff6dd 6861fi
eb697db5 6862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6863fi
eb697db5
DN
6864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6865$as_echo "$ac_cv_c_volatile" >&6; }
6866if test $ac_cv_c_volatile = no; then
9452ded1 6867
eb697db5 6868$as_echo "#define volatile /**/" >>confdefs.h
5929fbe7 6869
8c5ff6dd 6870fi
eb697db5
DN
6871
6872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6873$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6874if test "${ac_cv_c_const+set}" = set; then :
5929fbe7
GM
6875 $as_echo_n "(cached) " >&6
6876else
eb697db5 6877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7
GM
6878/* end confdefs.h. */
6879
5929fbe7
GM
6880int
6881main ()
6882{
eb697db5
DN
6883/* FIXME: Include the comments suggested by Paul. */
6884#ifndef __cplusplus
6885 /* Ultrix mips cc rejects this. */
6886 typedef int charset[2];
6887 const charset cs;
6888 /* SunOS 4.1.1 cc rejects this. */
6889 char const *const *pcpcc;
6890 char **ppc;
6891 /* NEC SVR4.0.2 mips cc rejects this. */
6892 struct point {int x, y;};
6893 static struct point const zero = {0,0};
6894 /* AIX XL C 1.02.0.0 rejects this.
6895 It does not let you subtract one const X* pointer from another in
6896 an arm of an if-expression whose if-part is not a constant
6897 expression */
6898 const char *g = "string";
6899 pcpcc = &g + (g ? g-g : 0);
6900 /* HPUX 7.0 cc rejects these. */
6901 ++pcpcc;
6902 ppc = (char**) pcpcc;
6903 pcpcc = (char const *const *) ppc;
6904 { /* SCO 3.2v4 cc rejects this. */
6905 char *t;
6906 char const *s = 0 ? (char *) 0 : (char const *) 0;
6907
6908 *t++ = 0;
6909 if (s) return 0;
6910 }
6911 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6912 int x[] = {25, 17};
6913 const int *foo = &x[0];
6914 ++foo;
6915 }
6916 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6917 typedef const int *iptr;
6918 iptr p = 0;
6919 ++p;
6920 }
6921 { /* AIX XL C 1.02.0.0 rejects this saying
6922 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6923 struct s { int j; const int *ap[3]; };
6924 struct s *b; b->j = 5;
6925 }
6926 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6927 const int foo = 10;
6928 if (!foo) return 0;
6929 }
6930 return !cs[0] && !zero.x;
6931#endif
6932
5929fbe7
GM
6933 ;
6934 return 0;
6935}
6936_ACEOF
eb697db5
DN
6937if ac_fn_c_try_compile "$LINENO"; then :
6938 ac_cv_c_const=yes
8c5ff6dd 6939else
eb697db5 6940 ac_cv_c_const=no
8c5ff6dd 6941fi
eb697db5 6942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6943fi
eb697db5
DN
6944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6945$as_echo "$ac_cv_c_const" >&6; }
6946if test $ac_cv_c_const = no; then
91e84f96 6947
eb697db5 6948$as_echo "#define const /**/" >>confdefs.h
08b47d3d 6949
8c5ff6dd 6950fi
91e84f96 6951
eb697db5
DN
6952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
6953$as_echo_n "checking for void * support... " >&6; }
6954if test "${emacs_cv_void_star+set}" = set; then :
5929fbe7 6955 $as_echo_n "(cached) " >&6
8c5ff6dd 6956else
eb697db5 6957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6958/* end confdefs.h. */
8c5ff6dd 6959
8c5ff6dd
KR
6960int
6961main ()
6962{
eb697db5 6963void * foo;
8c5ff6dd
KR
6964 ;
6965 return 0;
a4f64981 6966}
a5edbe4a 6967_ACEOF
eb697db5
DN
6968if ac_fn_c_try_compile "$LINENO"; then :
6969 emacs_cv_void_star=yes
15e12598 6970else
eb697db5 6971 emacs_cv_void_star=no
a4f64981 6972fi
eb697db5 6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 6974fi
eb697db5
DN
6975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
6976$as_echo "$emacs_cv_void_star" >&6; }
6977if test $emacs_cv_void_star = yes; then
6978 $as_echo "#define POINTER_TYPE void" >>confdefs.h
6979
6980else
6981 $as_echo "#define POINTER_TYPE char" >>confdefs.h
15e12598
VB
6982
6983fi
15e12598 6984
a4f64981 6985
eb697db5
DN
6986
6987
6988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6989$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6990set x ${MAKE-make}
6991ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6992if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7 6993 $as_echo_n "(cached) " >&6
5929fbe7 6994else
eb697db5
DN
6995 cat >conftest.make <<\_ACEOF
6996SHELL = /bin/sh
6997all:
6998 @echo '@@@%%%=$(MAKE)=@@@%%%'
5929fbe7 6999_ACEOF
eb697db5
DN
7000# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7001case `${MAKE-make} -f conftest.make 2>/dev/null` in
7002 *@@@%%%=?*=@@@%%%*)
7003 eval ac_cv_prog_make_${ac_make}_set=yes;;
7004 *)
7005 eval ac_cv_prog_make_${ac_make}_set=no;;
5929fbe7 7006esac
eb697db5
DN
7007rm -f conftest.make
7008fi
7009if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7011$as_echo "yes" >&6; }
7012 SET_MAKE=
5929fbe7 7013else
eb697db5
DN
7014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7015$as_echo "no" >&6; }
7016 SET_MAKE="MAKE=${MAKE-make}"
5929fbe7 7017fi
8c5ff6dd
KR
7018
7019
eb697db5
DN
7020DEPFLAGS=
7021MKDEPDIR=":"
7022deps_frag=deps.mk
7023if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
7024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
7025$as_echo_n "checking whether we are using GNU Make... " >&6; }
7026 HAVE_GNU_MAKE=no
7027 testval=`make --version 2>/dev/null | grep 'GNU Make'`
7028 if test "x$testval" != x; then
7029 HAVE_GNU_MAKE=yes
7030 else
7031 ac_enable_autodepend=no
7032 fi
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
7034$as_echo "$HAVE_GNU_MAKE" >&6; }
7035 if test $HAVE_GNU_MAKE = yes; then
7036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
7037$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
7038 SAVE_CFLAGS="$CFLAGS"
7039 CFLAGS="$CFLAGS -MMD -MF deps.d"
7040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7041/* end confdefs.h. */
eb697db5
DN
7042
7043int
7044main ()
7045{
7046
7047 ;
7048 return 0;
7049}
8c5ff6dd 7050_ACEOF
eb697db5 7051if ac_fn_c_try_compile "$LINENO"; then :
8c5ff6dd 7052
eb697db5
DN
7053else
7054 ac_enable_autodepend=no
7055fi
7056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7057 CFLAGS="$SAVE_CFLAGS"
7058 test -f deps.d || ac_enable_autodepend=no
7059 rm -rf deps.d
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
7061$as_echo "$ac_enable_autodepend" >&6; }
7062 fi
7063 if test $ac_enable_autodepend = yes; then
7064 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
7065 ## In parallel builds, another make might create depdir between
7066 ## the first test and mkdir, so stick another test on the end.
7067 ## Or use mkinstalldirs? mkdir -p is not portable.
7068 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
7069 deps_frag=autodeps.mk
7070 fi
8c5ff6dd 7071fi
eb697db5 7072deps_frag=$srcdir/src/$deps_frag
a4f64981 7073
a4f64981 7074
a4f64981 7075
eb697db5
DN
7076
7077
7078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
7079$as_echo_n "checking for long file names... " >&6; }
7080if test "${ac_cv_sys_long_file_names+set}" = set; then :
5929fbe7
GM
7081 $as_echo_n "(cached) " >&6
7082else
eb697db5
DN
7083 ac_cv_sys_long_file_names=yes
7084# Test for long file names in all the places we know might matter:
7085# . the current directory, where building will happen
7086# $prefix/lib where we will be installing things
7087# $exec_prefix/lib likewise
7088# $TMPDIR if set, where it might want to write temporary files
7089# /tmp where it might want to write temporary files
7090# /var/tmp likewise
7091# /usr/tmp likewise
7092for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
7093 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
7094 # in the usual case where exec_prefix is '${prefix}'.
7095 case $ac_dir in #(
7096 . | /* | ?:[\\/]*) ;; #(
7097 *) continue;;
7098 esac
7099 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
7100 ac_xdir=$ac_dir/cf$$
7101 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
7102 ac_tf1=$ac_xdir/conftest9012345
7103 ac_tf2=$ac_xdir/conftest9012346
7104 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
7105 ac_cv_sys_long_file_names=no
7106 rm -f -r "$ac_xdir" 2>/dev/null
7107 test $ac_cv_sys_long_file_names = no && break
7108done
5929fbe7 7109fi
eb697db5
DN
7110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
7111$as_echo "$ac_cv_sys_long_file_names" >&6; }
7112if test $ac_cv_sys_long_file_names = yes; then
7113
7114$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
49ebbd65 7115
5929fbe7 7116fi
a4f64981 7117
eb697db5
DN
7118
7119#### Choose a window system.
7120
7121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
7122$as_echo_n "checking for X... " >&6; }
7123
7124
7125# Check whether --with-x was given.
7126if test "${with_x+set}" = set; then :
7127 withval=$with_x;
7128fi
7129
7130# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7131if test "x$with_x" = xno; then
7132 # The user explicitly disabled X.
7133 have_x=disabled
7134else
7135 case $x_includes,$x_libraries in #(
7136 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
7137 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
7138 $as_echo_n "(cached) " >&6
7139else
7140 # One or both of the vars are not set, and there is no cached value.
7141ac_x_includes=no ac_x_libraries=no
7142rm -f -r conftest.dir
7143if mkdir conftest.dir; then
7144 cd conftest.dir
7145 cat >Imakefile <<'_ACEOF'
7146incroot:
7147 @echo incroot='${INCROOT}'
7148usrlibdir:
7149 @echo usrlibdir='${USRLIBDIR}'
7150libdir:
7151 @echo libdir='${LIBDIR}'
7152_ACEOF
7153 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
7154 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7155 for ac_var in incroot usrlibdir libdir; do
7156 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7157 done
7158 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7159 for ac_extension in a so sl dylib la dll; do
7160 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7161 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7162 ac_im_usrlibdir=$ac_im_libdir; break
7163 fi
7164 done
7165 # Screen out bogus values from the imake configuration. They are
7166 # bogus both because they are the default anyway, and because
7167 # using them would break gcc on systems where it needs fixed includes.
7168 case $ac_im_incroot in
7169 /usr/include) ac_x_includes= ;;
7170 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7171 esac
7172 case $ac_im_usrlibdir in
7173 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
7174 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7175 esac
7176 fi
7177 cd ..
7178 rm -f -r conftest.dir
5929fbe7 7179fi
8c5ff6dd 7180
eb697db5
DN
7181# Standard set of common directories for X headers.
7182# Check X11 before X11Rn because it is often a symlink to the current release.
7183ac_x_header_dirs='
7184/usr/X11/include
7185/usr/X11R7/include
7186/usr/X11R6/include
7187/usr/X11R5/include
7188/usr/X11R4/include
7189
7190/usr/include/X11
7191/usr/include/X11R7
7192/usr/include/X11R6
7193/usr/include/X11R5
7194/usr/include/X11R4
8c5ff6dd 7195
eb697db5
DN
7196/usr/local/X11/include
7197/usr/local/X11R7/include
7198/usr/local/X11R6/include
7199/usr/local/X11R5/include
7200/usr/local/X11R4/include
8c5ff6dd 7201
eb697db5
DN
7202/usr/local/include/X11
7203/usr/local/include/X11R7
7204/usr/local/include/X11R6
7205/usr/local/include/X11R5
7206/usr/local/include/X11R4
8c5ff6dd 7207
eb697db5
DN
7208/usr/X386/include
7209/usr/x386/include
7210/usr/XFree86/include/X11
8c5ff6dd 7211
eb697db5
DN
7212/usr/include
7213/usr/local/include
7214/usr/unsupported/include
7215/usr/athena/include
7216/usr/local/x11r5/include
7217/usr/lpp/Xamples/include
8c5ff6dd 7218
eb697db5
DN
7219/usr/openwin/include
7220/usr/openwin/share/include'
8c5ff6dd 7221
eb697db5
DN
7222if test "$ac_x_includes" = no; then
7223 # Guess where to find include files, by looking for Xlib.h.
7224 # First, try using that file with no special directory specified.
7225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7226/* end confdefs.h. */
7227#include <X11/Xlib.h>
e6df49e4 7228_ACEOF
eb697db5
DN
7229if ac_fn_c_try_cpp "$LINENO"; then :
7230 # We can compile using X headers with no special include directory.
7231ac_x_includes=
7232else
7233 for ac_dir in $ac_x_header_dirs; do
7234 if test -r "$ac_dir/X11/Xlib.h"; then
7235 ac_x_includes=$ac_dir
7236 break
7237 fi
7238done
7239fi
7240rm -f conftest.err conftest.$ac_ext
7241fi # $ac_x_includes = no
49ebbd65 7242
eb697db5
DN
7243if test "$ac_x_libraries" = no; then
7244 # Check for the libraries.
7245 # See if we find them without any special options.
7246 # Don't add to $LIBS permanently.
7247 ac_save_LIBS=$LIBS
7248 LIBS="-lX11 $LIBS"
7249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7250/* end confdefs.h. */
7251#include <X11/Xlib.h>
7252int
7253main ()
7254{
7255XrmInitialize ()
7256 ;
7257 return 0;
7258}
5929fbe7 7259_ACEOF
eb697db5
DN
7260if ac_fn_c_try_link "$LINENO"; then :
7261 LIBS=$ac_save_LIBS
7262# We can link X programs with no special library path.
7263ac_x_libraries=
7264else
7265 LIBS=$ac_save_LIBS
7266for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7267do
7268 # Don't even attempt the hair of trying to link an X program!
7269 for ac_extension in a so sl dylib la dll; do
7270 if test -r "$ac_dir/libX11.$ac_extension"; then
7271 ac_x_libraries=$ac_dir
7272 break 2
7273 fi
7274 done
7275done
7276fi
7277rm -f core conftest.err conftest.$ac_objext \
7278 conftest$ac_exeext conftest.$ac_ext
7279fi # $ac_x_libraries = no
8c5ff6dd 7280
eb697db5
DN
7281case $ac_x_includes,$ac_x_libraries in #(
7282 no,* | *,no | *\'*)
7283 # Didn't find X, or a directory has "'" in its name.
7284 ac_cv_have_x="have_x=no";; #(
7285 *)
7286 # Record where we found X for the cache.
7287 ac_cv_have_x="have_x=yes\
7288 ac_x_includes='$ac_x_includes'\
7289 ac_x_libraries='$ac_x_libraries'"
5929fbe7 7290esac
eb697db5
DN
7291fi
7292;; #(
7293 *) have_x=yes;;
7294 esac
7295 eval "$ac_cv_have_x"
7296fi # $with_x != no
49ebbd65 7297
eb697db5
DN
7298if test "$have_x" != yes; then
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7300$as_echo "$have_x" >&6; }
7301 no_x=yes
7302else
7303 # If each of the values was on the command line, it overrides each guess.
7304 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7305 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7306 # Update the cache value to reflect the command line values.
7307 ac_cv_have_x="have_x=yes\
7308 ac_x_includes='$x_includes'\
7309 ac_x_libraries='$x_libraries'"
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7311$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
7312fi
8c5ff6dd 7313
eb697db5
DN
7314if test "$no_x" = yes; then
7315 window_system=none
7316else
7317 window_system=x11
7318fi
15e12598 7319
eb697db5
DN
7320## Workaround for bug in autoconf <= 2.62.
7321## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7322## No need to do anything special for these standard directories.
7323if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
15e12598 7324
eb697db5 7325 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
15e12598 7326
eb697db5 7327fi
91e84f96 7328
eb697db5
DN
7329LD_SWITCH_X_SITE_AUX=
7330LD_SWITCH_X_SITE_AUX_RPATH=
7331if test "${x_libraries}" != NONE; then
7332 if test -n "${x_libraries}"; then
7333 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7334 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7335 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
7336 fi
7337 x_default_search_path=""
7338 x_search_path=${x_libraries}
7339 if test -z "${x_search_path}"; then
7340 x_search_path=/usr/lib
7341 fi
7342 for x_library in `echo ${x_search_path}: | \
7343 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7344 x_search_path="\
7345${x_library}/X11/%L/%T/%N%C%S:\
7346${x_library}/X11/%l/%T/%N%C%S:\
7347${x_library}/X11/%T/%N%C%S:\
7348${x_library}/X11/%L/%T/%N%S:\
7349${x_library}/X11/%l/%T/%N%S:\
7350${x_library}/X11/%T/%N%S"
7351 if test x"${x_default_search_path}" = x; then
7352 x_default_search_path=${x_search_path}
7353 else
7354 x_default_search_path="${x_search_path}:${x_default_search_path}"
7355 fi
7356 done
7357fi
e6df49e4 7358
15e12598 7359
15e12598 7360
eb697db5
DN
7361if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7362 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
7363fi
8c5ff6dd 7364
eb697db5
DN
7365if test x"${x_includes}" = x; then
7366 bitmapdir=/usr/include/X11/bitmaps
7367else
7368 # accumulate include directories that have X11 bitmap subdirectories
7369 bmd_acc="dummyval"
7370 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7371 if test -d "${bmd}/X11/bitmaps"; then
7372 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7373 fi
7374 if test -d "${bmd}/bitmaps"; then
7375 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7376 fi
7377 done
7378 if test ${bmd_acc} != "dummyval"; then
7379 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7380 fi
7381fi
8c5ff6dd 7382
eb697db5
DN
7383HAVE_NS=no
7384NS_IMPL_COCOA=no
7385NS_IMPL_GNUSTEP=no
7386tmp_CPPFLAGS="$CPPFLAGS"
7387tmp_CFLAGS="$CFLAGS"
7388CPPFLAGS="$CPPFLAGS -x objective-c"
7389CFLAGS="$CFLAGS -x objective-c"
7390TEMACS_LDFLAGS2="\${LDFLAGS}"
7391if test "${with_ns}" != no; then
7392 if test "${opsys}" = darwin; then
7393 NS_IMPL_COCOA=yes
7394 ns_appdir=`pwd`/nextstep/Emacs.app/
7395 ns_appbindir=${ns_appdir}Contents/MacOS/
7396 ns_appresdir=${ns_appdir}Contents/Resources
7397 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7398 elif test -f $GNUSTEP_CONFIG_FILE; then
7399 NS_IMPL_GNUSTEP=yes
7400 ns_appdir=`pwd`/nextstep/Emacs.app/
7401 ns_appbindir=${ns_appdir}
7402 ns_appresdir=${ns_appdir}Resources
7403 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7404 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7405 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7406 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
7407 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
7408 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
7409 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
7410 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
7411 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
7412 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7413 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7414 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7415 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
7416 LIB_STANDARD=
7417 START_FILES=
7418 TEMACS_LDFLAGS2=
7419 fi
7420 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7421if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7422 HAVE_NS=yes
7423else
7424 as_fn_error "\`--with-ns' was specified, but the include
7425 files are missing or cannot be compiled." "$LINENO" 5
7426fi
8c5ff6dd
KR
7427
7428
eb697db5
DN
7429 NS_HAVE_NSINTEGER=yes
7430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7431/* end confdefs.h. */
7432#include <Foundation/NSObjCRuntime.h>
7433int
7434main ()
7435{
7436NSInteger i;
7437 ;
7438 return 0;
7439}
7440_ACEOF
7441if ac_fn_c_try_compile "$LINENO"; then :
7442 ns_have_nsinteger=yes
7443else
7444 ns_have_nsinteger=no
7445fi
7446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7447 if test $ns_have_nsinteger = no; then
7448 NS_HAVE_NSINTEGER=no
7449 fi
7450fi
15e12598 7451
15e12598 7452
eb697db5
DN
7453ns_frag=/dev/null
7454NS_OBJ=
7455NS_SUPPORT=
7456if test "${HAVE_NS}" = yes; then
7457 window_system=nextstep
7458 with_xft=no
7459 # set up packaging dirs
7460 exec_prefix=${ns_appbindir}
7461 libexecdir=${ns_appbindir}/libexec
7462 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7463 prefix=${ns_appresdir}
7464 fi
7465 ns_frag=$srcdir/src/ns.mk
7466 NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
7467 NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc"
7468fi
7469CFLAGS="$tmp_CFLAGS"
7470CPPFLAGS="$tmp_CPPFLAGS"
15e12598 7471
15e12598 7472
a4f64981 7473
8c5ff6dd
KR
7474
7475
eb697db5
DN
7476case "${window_system}" in
7477 x11 )
7478 HAVE_X_WINDOWS=yes
7479 HAVE_X11=yes
7480 case "${with_x_toolkit}" in
7481 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7482 motif ) USE_X_TOOLKIT=MOTIF ;;
7483 gtk ) with_gtk=yes
7484 USE_X_TOOLKIT=none ;;
7485 no ) USE_X_TOOLKIT=none ;;
7486 * ) USE_X_TOOLKIT=maybe ;;
7487 esac
7488 ;;
7489 nextstep | none )
7490 HAVE_X_WINDOWS=no
7491 HAVE_X11=no
7492 USE_X_TOOLKIT=none
7493 ;;
7494esac
8c5ff6dd 7495
eb697db5
DN
7496if test "$window_system" = none && test "X$with_x" != "Xno"; then
7497 # Extract the first word of "X", so it can be a program name with args.
7498set dummy X; ac_word=$2
7499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7500$as_echo_n "checking for $ac_word... " >&6; }
7501if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
7502 $as_echo_n "(cached) " >&6
7503else
7504 if test -n "$HAVE_XSERVER"; then
7505 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
7506else
7507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7508for as_dir in $PATH
7509do
7510 IFS=$as_save_IFS
7511 test -z "$as_dir" && as_dir=.
7512 for ac_exec_ext in '' $ac_executable_extensions; do
7513 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7514 ac_cv_prog_HAVE_XSERVER="true"
7515 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7516 break 2
7517 fi
7518done
7519 done
7520IFS=$as_save_IFS
8c5ff6dd 7521
eb697db5
DN
7522 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
7523fi
7524fi
7525HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7526if test -n "$HAVE_XSERVER"; then
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7528$as_echo "$HAVE_XSERVER" >&6; }
7529else
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531$as_echo "no" >&6; }
7532fi
8c5ff6dd 7533
8c5ff6dd 7534
eb697db5
DN
7535 if test "$HAVE_XSERVER" = true ||
7536 test -n "$DISPLAY" ||
7537 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
7538 as_fn_error "You seem to be running X, but no X development libraries
7539were found. You should install the relevant development files for X
7540and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7541sure you have development files for image handling, i.e.
7542tiff, gif, jpeg, png and xpm.
7543If you are sure you want Emacs compiled without X window support, pass
7544 --without-x
7545to configure." "$LINENO" 5
7546 fi
7547fi
8c5ff6dd 7548
eb697db5
DN
7549### If we're using X11, we should use the X menu package.
7550HAVE_MENUS=no
7551case ${HAVE_X11} in
7552 yes ) HAVE_MENUS=yes ;;
7553esac
8c5ff6dd 7554
eb697db5
DN
7555# Do the opsystem or machine files prohibit the use of the GNU malloc?
7556# Assume not, until told otherwise.
7557GNU_MALLOC=yes
7558doug_lea_malloc=yes
7559ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7560if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
8c5ff6dd 7561
eb697db5
DN
7562else
7563 doug_lea_malloc=no
7564fi
8c5ff6dd 7565
eb697db5
DN
7566ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7567if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
8c5ff6dd 7568
eb697db5
DN
7569else
7570 doug_lea_malloc=no
7571fi
8c5ff6dd 7572
eb697db5
DN
7573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7574$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7575if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
7576 $as_echo_n "(cached) " >&6
7577else
7578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7579/* end confdefs.h. */
7580extern void (* __after_morecore_hook)();
7581int
7582main ()
7583{
7584__after_morecore_hook = 0
7585 ;
7586 return 0;
7587}
7588_ACEOF
7589if ac_fn_c_try_link "$LINENO"; then :
7590 emacs_cv_var___after_morecore_hook=yes
7591else
7592 emacs_cv_var___after_morecore_hook=no
7593fi
7594rm -f core conftest.err conftest.$ac_objext \
7595 conftest$ac_exeext conftest.$ac_ext
7596fi
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7598$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7599if test $emacs_cv_var___after_morecore_hook = no; then
7600 doug_lea_malloc=no
7601fi
8c5ff6dd 7602
eb697db5
DN
7603if test "${system_malloc}" = "yes"; then
7604 GNU_MALLOC=no
7605 GNU_MALLOC_reason="
7606 (The GNU allocators don't work with this system configuration.)"
7607 GMALLOC_OBJ=
7608 VMLIMIT_OBJ=
7609else
7610 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
7611 VMLIMIT_OBJ=vm-limit.o
7612fi
0c309b80 7613
8c5ff6dd 7614
8c5ff6dd 7615
eb697db5
DN
7616if test "$doug_lea_malloc" = "yes" ; then
7617 if test "$GNU_MALLOC" = yes ; then
7618 GNU_MALLOC_reason="
7619 (Using Doug Lea's new malloc from the GNU C Library.)"
7620 fi
8c5ff6dd 7621
eb697db5 7622$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
8c5ff6dd 7623
a4f64981 7624
eb697db5
DN
7625 ## Use mmap directly for allocating larger buffers.
7626 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
7627 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
7628 ## Does the AC_FUNC_MMAP test below make this check unecessary?
7629 case "$opsys" in
7630 gnu*) REL_ALLOC=no ;;
7631 esac
7632fi
49ebbd65 7633
eb697db5
DN
7634if test x"${REL_ALLOC}" = x; then
7635 REL_ALLOC=${GNU_MALLOC}
7636fi
8c5ff6dd 7637
8c5ff6dd 7638
8c5ff6dd 7639
8c5ff6dd 7640
7186fb09 7641
eb697db5
DN
7642 for ac_header in $ac_header_list
7643do :
7644 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7645ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7646"
7647eval as_val=\$$as_ac_Header
7648 if test "x$as_val" = x""yes; then :
7649 cat >>confdefs.h <<_ACEOF
7650#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7651_ACEOF
15e12598 7652
eb697db5 7653fi
8c5ff6dd 7654
eb697db5 7655done
8c5ff6dd
KR
7656
7657
8c5ff6dd 7658
8c5ff6dd 7659
15e12598 7660
8c5ff6dd
KR
7661
7662
8c5ff6dd 7663
eb697db5
DN
7664for ac_func in getpagesize
7665do :
7666 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7667if test "x$ac_cv_func_getpagesize" = x""yes; then :
7668 cat >>confdefs.h <<_ACEOF
7669#define HAVE_GETPAGESIZE 1
7670_ACEOF
8c5ff6dd 7671
eb697db5
DN
7672fi
7673done
8c5ff6dd 7674
eb697db5
DN
7675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7676$as_echo_n "checking for working mmap... " >&6; }
7677if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7678 $as_echo_n "(cached) " >&6
7679else
7680 if test "$cross_compiling" = yes; then :
7681 ac_cv_func_mmap_fixed_mapped=no
7682else
7683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7684/* end confdefs.h. */
7685$ac_includes_default
7686/* malloc might have been renamed as rpl_malloc. */
7687#undef malloc
8c5ff6dd 7688
eb697db5
DN
7689/* Thanks to Mike Haertel and Jim Avera for this test.
7690 Here is a matrix of mmap possibilities:
7691 mmap private not fixed
7692 mmap private fixed at somewhere currently unmapped
7693 mmap private fixed at somewhere already mapped
7694 mmap shared not fixed
7695 mmap shared fixed at somewhere currently unmapped
7696 mmap shared fixed at somewhere already mapped
7697 For private mappings, we should verify that changes cannot be read()
7698 back from the file, nor mmap's back from the file at a different
7699 address. (There have been systems where private was not correctly
7700 implemented like the infamous i386 svr4.0, and systems where the
7701 VM page cache was not coherent with the file system buffer cache
7702 like early versions of FreeBSD and possibly contemporary NetBSD.)
7703 For shared mappings, we should conversely verify that changes get
7704 propagated back to all the places they're supposed to be.
8c5ff6dd 7705
eb697db5
DN
7706 Grep wants private fixed already mapped.
7707 The main things grep needs to know about mmap are:
7708 * does it exist and is it safe to write into the mmap'd area
7709 * how to use it (BSD variants) */
8c5ff6dd 7710
eb697db5
DN
7711#include <fcntl.h>
7712#include <sys/mman.h>
8c5ff6dd 7713
eb697db5
DN
7714#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7715char *malloc ();
7716#endif
8c5ff6dd 7717
eb697db5
DN
7718/* This mess was copied from the GNU getpagesize.h. */
7719#ifndef HAVE_GETPAGESIZE
7720# ifdef _SC_PAGESIZE
7721# define getpagesize() sysconf(_SC_PAGESIZE)
7722# else /* no _SC_PAGESIZE */
7723# ifdef HAVE_SYS_PARAM_H
7724# include <sys/param.h>
7725# ifdef EXEC_PAGESIZE
7726# define getpagesize() EXEC_PAGESIZE
7727# else /* no EXEC_PAGESIZE */
7728# ifdef NBPG
7729# define getpagesize() NBPG * CLSIZE
7730# ifndef CLSIZE
7731# define CLSIZE 1
7732# endif /* no CLSIZE */
7733# else /* no NBPG */
7734# ifdef NBPC
7735# define getpagesize() NBPC
7736# else /* no NBPC */
7737# ifdef PAGESIZE
7738# define getpagesize() PAGESIZE
7739# endif /* PAGESIZE */
7740# endif /* no NBPC */
7741# endif /* no NBPG */
7742# endif /* no EXEC_PAGESIZE */
7743# else /* no HAVE_SYS_PARAM_H */
7744# define getpagesize() 8192 /* punt totally */
7745# endif /* no HAVE_SYS_PARAM_H */
7746# endif /* no _SC_PAGESIZE */
8c5ff6dd 7747
eb697db5 7748#endif /* no HAVE_GETPAGESIZE */
8c5ff6dd 7749
eb697db5
DN
7750int
7751main ()
7752{
7753 char *data, *data2, *data3;
7754 int i, pagesize;
7755 int fd, fd2;
8c5ff6dd 7756
eb697db5 7757 pagesize = getpagesize ();
8c5ff6dd 7758
eb697db5
DN
7759 /* First, make a file with some known garbage in it. */
7760 data = (char *) malloc (pagesize);
7761 if (!data)
7762 return 1;
7763 for (i = 0; i < pagesize; ++i)
7764 *(data + i) = rand ();
7765 umask (0);
7766 fd = creat ("conftest.mmap", 0600);
7767 if (fd < 0)
7768 return 2;
7769 if (write (fd, data, pagesize) != pagesize)
7770 return 3;
7771 close (fd);
8c5ff6dd 7772
eb697db5
DN
7773 /* Next, check that the tail of a page is zero-filled. File must have
7774 non-zero length, otherwise we risk SIGBUS for entire page. */
7775 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7776 if (fd2 < 0)
7777 return 4;
7778 data2 = "";
7779 if (write (fd2, data2, 1) != 1)
7780 return 5;
7781 data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7782 if (data2 == MAP_FAILED)
7783 return 6;
7784 for (i = 0; i < pagesize; ++i)
7785 if (*(data2 + i))
7786 return 7;
7787 close (fd2);
7788 if (munmap (data2, pagesize))
7789 return 8;
8c5ff6dd 7790
eb697db5
DN
7791 /* Next, try to mmap the file at a fixed address which already has
7792 something else allocated at it. If we can, also make sure that
7793 we see the same garbage. */
7794 fd = open ("conftest.mmap", O_RDWR);
7795 if (fd < 0)
7796 return 9;
7797 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7798 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7799 return 10;
7800 for (i = 0; i < pagesize; ++i)
7801 if (*(data + i) != *(data2 + i))
7802 return 11;
8c5ff6dd 7803
eb697db5
DN
7804 /* Finally, make sure that changes to the mapped area do not
7805 percolate back to the file as seen by read(). (This is a bug on
7806 some variants of i386 svr4.0.) */
7807 for (i = 0; i < pagesize; ++i)
7808 *(data2 + i) = *(data2 + i) + 1;
7809 data3 = (char *) malloc (pagesize);
7810 if (!data3)
7811 return 12;
7812 if (read (fd, data3, pagesize) != pagesize)
7813 return 13;
7814 for (i = 0; i < pagesize; ++i)
7815 if (*(data + i) != *(data3 + i))
7816 return 14;
7817 close (fd);
7818 return 0;
7819}
7820_ACEOF
7821if ac_fn_c_try_run "$LINENO"; then :
7822 ac_cv_func_mmap_fixed_mapped=yes
7823else
7824 ac_cv_func_mmap_fixed_mapped=no
7825fi
7826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7827 conftest.$ac_objext conftest.beam conftest.$ac_ext
7828fi
8c5ff6dd 7829
eb697db5
DN
7830fi
7831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7832$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7833if test $ac_cv_func_mmap_fixed_mapped = yes; then
8c5ff6dd 7834
eb697db5 7835$as_echo "#define HAVE_MMAP 1" >>confdefs.h
8c5ff6dd 7836
eb697db5
DN
7837fi
7838rm -f conftest.mmap conftest.txt
8c5ff6dd 7839
eb697db5
DN
7840if test $use_mmap_for_buffers = yes; then
7841 REL_ALLOC=no
7842fi
8c5ff6dd 7843
eb697db5 7844LIBS="$LIBS_SYSTEM $LIBS"
5929fbe7 7845
eb697db5
DN
7846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
7847$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7848if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
5929fbe7 7849 $as_echo_n "(cached) " >&6
8c5ff6dd 7850else
eb697db5
DN
7851 ac_check_lib_save_LIBS=$LIBS
7852LIBS="-ldnet $LIBS"
7853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7854/* end confdefs.h. */
8c5ff6dd 7855
5929fbe7
GM
7856/* Override any GCC internal prototype to avoid an error.
7857 Use char because int might match the return type of a GCC
7858 builtin and then its argument prototype would still apply. */
7859#ifdef __cplusplus
7860extern "C"
7861#endif
eb697db5 7862char dnet_ntoa ();
5929fbe7
GM
7863int
7864main ()
7865{
eb697db5 7866return dnet_ntoa ();
5929fbe7
GM
7867 ;
7868 return 0;
7869}
7870_ACEOF
eb697db5
DN
7871if ac_fn_c_try_link "$LINENO"; then :
7872 ac_cv_lib_dnet_dnet_ntoa=yes
5929fbe7 7873else
eb697db5 7874 ac_cv_lib_dnet_dnet_ntoa=no
5929fbe7 7875fi
eb697db5
DN
7876rm -f core conftest.err conftest.$ac_objext \
7877 conftest$ac_exeext conftest.$ac_ext
7878LIBS=$ac_check_lib_save_LIBS
5929fbe7 7879fi
eb697db5
DN
7880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7881$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7882if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
5929fbe7 7883 cat >>confdefs.h <<_ACEOF
eb697db5 7884#define HAVE_LIBDNET 1
5929fbe7 7885_ACEOF
aaa36002 7886
eb697db5 7887 LIBS="-ldnet $LIBS"
5929fbe7 7888
a4f64981 7889fi
5929fbe7 7890
a4f64981 7891
eb697db5
DN
7892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
7893$as_echo_n "checking for main in -lXbsd... " >&6; }
7894if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
5929fbe7 7895 $as_echo_n "(cached) " >&6
5929fbe7 7896else
eb697db5
DN
7897 ac_check_lib_save_LIBS=$LIBS
7898LIBS="-lXbsd $LIBS"
7899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7900/* end confdefs.h. */
a4f64981 7901
a4f64981 7902
eb697db5
DN
7903int
7904main ()
7905{
7906return main ();
7907 ;
7908 return 0;
7909}
5929fbe7 7910_ACEOF
eb697db5
DN
7911if ac_fn_c_try_link "$LINENO"; then :
7912 ac_cv_lib_Xbsd_main=yes
a4f64981 7913else
eb697db5 7914 ac_cv_lib_Xbsd_main=no
8c5ff6dd 7915fi
eb697db5
DN
7916rm -f core conftest.err conftest.$ac_objext \
7917 conftest$ac_exeext conftest.$ac_ext
7918LIBS=$ac_check_lib_save_LIBS
5929fbe7 7919fi
eb697db5
DN
7920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
7921$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
7922if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
7923 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
8c5ff6dd 7924fi
a4f64981 7925
8c5ff6dd 7926
eb697db5
DN
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
7928$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
7929if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
15e12598
VB
7930 $as_echo_n "(cached) " >&6
7931else
eb697db5
DN
7932 ac_check_lib_save_LIBS=$LIBS
7933LIBS="-lpthreads $LIBS"
7934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 7935/* end confdefs.h. */
e6df49e4
GM
7936
7937/* Override any GCC internal prototype to avoid an error.
7938 Use char because int might match the return type of a GCC
7939 builtin and then its argument prototype would still apply. */
7940#ifdef __cplusplus
eb697db5 7941extern "C"
5929fbe7 7942#endif
eb697db5 7943char cma_open ();
aaa36002
DN
7944int
7945main ()
7946{
eb697db5 7947return cma_open ();
aaa36002
DN
7948 ;
7949 return 0;
7950}
7186fb09 7951_ACEOF
eb697db5
DN
7952if ac_fn_c_try_link "$LINENO"; then :
7953 ac_cv_lib_pthreads_cma_open=yes
7186fb09 7954else
eb697db5 7955 ac_cv_lib_pthreads_cma_open=no
cd03c74a 7956fi
eb697db5
DN
7957rm -f core conftest.err conftest.$ac_objext \
7958 conftest$ac_exeext conftest.$ac_ext
7959LIBS=$ac_check_lib_save_LIBS
49ebbd65 7960fi
eb697db5
DN
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
7962$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
7963if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
5929fbe7 7964 cat >>confdefs.h <<_ACEOF
eb697db5 7965#define HAVE_LIBPTHREADS 1
5929fbe7
GM
7966_ACEOF
7967
eb697db5 7968 LIBS="-lpthreads $LIBS"
5929fbe7 7969
eb697db5 7970fi
5929fbe7
GM
7971
7972
eb697db5
DN
7973## Note: when using cpp in s/aix4.2.h, this definition depended on
7974## HAVE_LIBPTHREADS. That was not defined earlier in configure when
7975## the system file was sourced. Hence the value of LIBS_SYSTEM
7976## added to LIBS in configure would never contain the pthreads part,
7977## but the value used in Makefiles might. FIXME?
7978##
7979## -lpthreads seems to be necessary for Xlib in X11R6, and should
7980## be harmless on older versions of X where it happens to exist.
7981test "$opsys" = "aix4-2" && \
7982 test $ac_cv_lib_pthreads_cma_open = yes && \
7983 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
5929fbe7
GM
7984
7985
eb697db5
DN
7986case ${host_os} in
7987aix*)
7988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
7989$as_echo_n "checking for -bbigtoc option... " >&6; }
7990if test "${gdb_cv_bigtoc+set}" = set; then :
7186fb09 7991 $as_echo_n "(cached) " >&6
a5edbe4a 7992else
a4f64981 7993
eb697db5
DN
7994 case $GCC in
7995 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
7996 *) gdb_cv_bigtoc=-bbigtoc ;;
7997 esac
a4f64981 7998
eb697db5
DN
7999 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8001/* end confdefs.h. */
8c5ff6dd 8002
eb697db5
DN
8003int
8004main ()
8005{
8006int i;
8007 ;
8008 return 0;
8009}
8010_ACEOF
8011if ac_fn_c_try_link "$LINENO"; then :
8c5ff6dd 8012
eb697db5
DN
8013else
8014 gdb_cv_bigtoc=
8015fi
8016rm -f core conftest.err conftest.$ac_objext \
8017 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 8018
eb697db5
DN
8019fi
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
8021$as_echo "$gdb_cv_bigtoc" >&6; }
8022 ;;
8023esac
8c5ff6dd 8024
eb697db5
DN
8025# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
8026# used for the tests that follow. We set them back to REAL_CFLAGS and
8027# REAL_CPPFLAGS later on.
8c5ff6dd 8028
eb697db5 8029REAL_CPPFLAGS="$CPPFLAGS"
8c5ff6dd 8030
eb697db5
DN
8031if test "${HAVE_X11}" = "yes"; then
8032 DEFS="$C_SWITCH_X_SITE $DEFS"
8033 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
8034 LIBS="$LIBX $LIBS"
8035 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
8036 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
8c5ff6dd 8037
eb697db5
DN
8038 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
8039 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
8040 # but it's more convenient here to set LD_RUN_PATH
8041 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
8042 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8043 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
8044 export LD_RUN_PATH
8045 fi
8c5ff6dd 8046
eb697db5
DN
8047 if test "${opsys}" = "gnu-linux"; then
8048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
8049$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
8050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8051/* end confdefs.h. */
8c5ff6dd 8052
eb697db5
DN
8053int
8054main ()
5929fbe7 8055{
eb697db5
DN
8056XOpenDisplay ("foo");
8057 ;
8058 return 0;
5929fbe7 8059}
eb697db5
DN
8060_ACEOF
8061if ac_fn_c_try_link "$LINENO"; then :
8062 xlinux_first_failure=no
8063else
8064 xlinux_first_failure=yes
8065fi
8066rm -f core conftest.err conftest.$ac_objext \
8067 conftest$ac_exeext conftest.$ac_ext
8068 if test "${xlinux_first_failure}" = "yes"; then
8069 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
8070 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
8071 OLD_CPPFLAGS="$CPPFLAGS"
8072 OLD_LIBS="$LIBS"
8073 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
8074 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
8075 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
8076 LIBS="$LIBS -b i486-linuxaout"
8077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8078/* end confdefs.h. */
8c5ff6dd 8079
eb697db5
DN
8080int
8081main ()
5929fbe7 8082{
eb697db5
DN
8083XOpenDisplay ("foo");
8084 ;
8085 return 0;
5929fbe7 8086}
eb697db5
DN
8087_ACEOF
8088if ac_fn_c_try_link "$LINENO"; then :
8089 xlinux_second_failure=no
8090else
8091 xlinux_second_failure=yes
8092fi
8093rm -f core conftest.err conftest.$ac_objext \
8094 conftest$ac_exeext conftest.$ac_ext
8095 if test "${xlinux_second_failure}" = "yes"; then
8096 # If we get the same failure with -b, there is no use adding -b.
8097 # So take it out. This plays safe.
8098 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
8099 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
8100 CPPFLAGS="$OLD_CPPFLAGS"
8101 LIBS="$OLD_LIBS"
8102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8103$as_echo "no" >&6; }
8104 else
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8106$as_echo "yes" >&6; }
8107 fi
8108 else
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110$as_echo "no" >&6; }
8111 fi
8112 fi
8c5ff6dd 8113
eb697db5
DN
8114 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
8115 # header files included from there.
8116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
8117$as_echo_n "checking for Xkb... " >&6; }
8118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8119/* end confdefs.h. */
8120#include <X11/Xlib.h>
8121#include <X11/XKBlib.h>
5929fbe7
GM
8122int
8123main ()
8124{
eb697db5
DN
8125XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
8126 ;
8127 return 0;
5929fbe7
GM
8128}
8129_ACEOF
eb697db5
DN
8130if ac_fn_c_try_link "$LINENO"; then :
8131 emacs_xkb=yes
a4f64981 8132else
eb697db5 8133 emacs_xkb=no
5929fbe7 8134fi
eb697db5
DN
8135rm -f core conftest.err conftest.$ac_objext \
8136 conftest$ac_exeext conftest.$ac_ext
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
8138$as_echo "$emacs_xkb" >&6; }
8139 if test $emacs_xkb = yes; then
a4f64981 8140
eb697db5 8141$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
a4f64981 8142
eb697db5 8143 fi
a4f64981 8144
eb697db5
DN
8145 for ac_func in XrmSetDatabase XScreenResourceString \
8146XScreenNumberOfScreen XSetWMProtocols
8147do :
8148 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8149ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8150eval as_val=\$$as_ac_var
8151 if test "x$as_val" = x""yes; then :
8152 cat >>confdefs.h <<_ACEOF
8153#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5929fbe7 8154_ACEOF
a4f64981 8155
5929fbe7 8156fi
eb697db5 8157done
a4f64981 8158
eb697db5 8159fi
8c5ff6dd 8160
eb697db5
DN
8161if test "${window_system}" = "x11"; then
8162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
8163$as_echo_n "checking X11 version 6... " >&6; }
8164 if test "${emacs_cv_x11_version_6+set}" = set; then :
a4f64981
GM
8165 $as_echo_n "(cached) " >&6
8166else
eb697db5 8167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 8168/* end confdefs.h. */
eb697db5 8169#include <X11/Xlib.h>
9452ded1
DN
8170int
8171main ()
8172{
eb697db5
DN
8173#if XlibSpecificationRelease < 6
8174fail;
8175#endif
8176
9452ded1
DN
8177 ;
8178 return 0;
8179}
0c309b80 8180_ACEOF
eb697db5
DN
8181if ac_fn_c_try_link "$LINENO"; then :
8182 emacs_cv_x11_version_6=yes
7186fb09 8183else
eb697db5
DN
8184 emacs_cv_x11_version_6=no
8185fi
8186rm -f core conftest.err conftest.$ac_objext \
8187 conftest$ac_exeext conftest.$ac_ext
8188fi
8189
8190 if test $emacs_cv_x11_version_6 = yes; then
8191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8192$as_echo "6 or newer" >&6; }
8193
8194$as_echo "#define HAVE_X11R6 1" >>confdefs.h
5929fbe7 8195
eb697db5
DN
8196 else
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8198$as_echo "before 6" >&6; }
8199 fi
aaa36002 8200fi
5929fbe7 8201
eb697db5
DN
8202
8203### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
8204HAVE_RSVG=no
8205if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
8206 if test "${with_rsvg}" != "no"; then
8207 RSVG_REQUIRED=2.11.0
8208 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
8209
8210
8211 succeeded=no
8212
8213 # Extract the first word of "pkg-config", so it can be a program name with args.
8214set dummy pkg-config; ac_word=$2
8215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8216$as_echo_n "checking for $ac_word... " >&6; }
8217if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8218 $as_echo_n "(cached) " >&6
8219else
8220 case $PKG_CONFIG in
8221 [\\/]* | ?:[\\/]*)
8222 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8223 ;;
8224 *)
8225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8226for as_dir in $PATH
8227do
8228 IFS=$as_save_IFS
8229 test -z "$as_dir" && as_dir=.
8230 for ac_exec_ext in '' $ac_executable_extensions; do
8231 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8232 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8234 break 2
8235 fi
8236done
8237 done
8238IFS=$as_save_IFS
8239
8240 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8241 ;;
8242esac
aaa36002 8243fi
eb697db5
DN
8244PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8245if test -n "$PKG_CONFIG"; then
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8247$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 8248else
eb697db5
DN
8249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8250$as_echo "no" >&6; }
a4f64981
GM
8251fi
8252
8c5ff6dd 8253
e6df49e4 8254
eb697db5
DN
8255 if test "$PKG_CONFIG" = "no" ; then
8256 :
8257 else
8258 PKG_CONFIG_MIN_VERSION=0.9.0
8259 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8261$as_echo_n "checking for $RSVG_MODULE... " >&6; }
8262
8263 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8265$as_echo "yes" >&6; }
8266 succeeded=yes
8267
8268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8269$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8270 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8272$as_echo "$RSVG_CFLAGS" >&6; }
8273
8274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8275$as_echo_n "checking RSVG_LIBS... " >&6; }
8276 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8278$as_echo "$RSVG_LIBS" >&6; }
8279 else
8280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8281$as_echo "no" >&6; }
8282 RSVG_CFLAGS=""
8283 RSVG_LIBS=""
8284 ## If we have a custom action on failure, don't print errors, but
8285 ## do set a variable so people can do so.
8286 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
8287
8288 fi
8289
8290
8291
8292 else
8293 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8294 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8295 fi
8296 fi
8297
8298 if test $succeeded = yes; then
8299 :
8300 else
8301 :
8302 fi
7186fb09 8303
a5edbe4a 8304
a5edbe4a 8305
91e84f96 8306
eb697db5
DN
8307 if test ".${RSVG_CFLAGS}" != "."; then
8308 HAVE_RSVG=yes
7186fb09 8309
eb697db5 8310$as_echo "#define HAVE_RSVG 1" >>confdefs.h
7186fb09 8311
eb697db5
DN
8312 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8313 LIBS="$RSVG_LIBS $LIBS"
8314 fi
8315 fi
a4f64981 8316fi
08b47d3d 8317
eb697db5
DN
8318
8319HAVE_GTK=no
8320if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8321 GLIB_REQUIRED=2.6
8322 GTK_REQUIRED=2.6
8323 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
5929fbe7
GM
8324
8325
eb697db5 8326 succeeded=no
5929fbe7 8327
eb697db5
DN
8328 # Extract the first word of "pkg-config", so it can be a program name with args.
8329set dummy pkg-config; ac_word=$2
8330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8331$as_echo_n "checking for $ac_word... " >&6; }
8332if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981 8333 $as_echo_n "(cached) " >&6
a4f64981 8334else
eb697db5
DN
8335 case $PKG_CONFIG in
8336 [\\/]* | ?:[\\/]*)
8337 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8338 ;;
8339 *)
8340 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8341for as_dir in $PATH
8342do
8343 IFS=$as_save_IFS
8344 test -z "$as_dir" && as_dir=.
8345 for ac_exec_ext in '' $ac_executable_extensions; do
8346 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8347 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8348 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8349 break 2
8350 fi
8351done
8352 done
8353IFS=$as_save_IFS
8c5ff6dd 8354
eb697db5
DN
8355 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8356 ;;
5929fbe7 8357esac
eb697db5
DN
8358fi
8359PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8360if test -n "$PKG_CONFIG"; then
8361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8362$as_echo "$PKG_CONFIG" >&6; }
a4f64981 8363else
eb697db5
DN
8364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8365$as_echo "no" >&6; }
a4f64981 8366fi
5929fbe7 8367
9452ded1 8368
a4f64981 8369
eb697db5
DN
8370 if test "$PKG_CONFIG" = "no" ; then
8371 pkg_check_gtk=no
8372 else
8373 PKG_CONFIG_MIN_VERSION=0.9.0
8374 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8376$as_echo_n "checking for $GTK_MODULES... " >&6; }
a4f64981 8377
eb697db5
DN
8378 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8380$as_echo "yes" >&6; }
8381 succeeded=yes
a4f64981 8382
eb697db5
DN
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8384$as_echo_n "checking GTK_CFLAGS... " >&6; }
8385 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8387$as_echo "$GTK_CFLAGS" >&6; }
91e84f96 8388
eb697db5
DN
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8390$as_echo_n "checking GTK_LIBS... " >&6; }
8391 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8393$as_echo "$GTK_LIBS" >&6; }
8394 else
8395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8396$as_echo "no" >&6; }
8397 GTK_CFLAGS=""
8398 GTK_LIBS=""
8399 ## If we have a custom action on failure, don't print errors, but
8400 ## do set a variable so people can do so.
8401 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8732a4e9 8402
eb697db5 8403 fi
8732a4e9 8404
5929fbe7 8405
9452ded1 8406
eb697db5
DN
8407 else
8408 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8409 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8410 fi
8411 fi
8412
8413 if test $succeeded = yes; then
8414 pkg_check_gtk=yes
8415 else
8416 pkg_check_gtk=no
8417 fi
5929fbe7 8418
eb697db5
DN
8419 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
8420 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
8421 fi
8c5ff6dd 8422fi
5929fbe7 8423
8c5ff6dd 8424
eb697db5
DN
8425GTK_OBJ=
8426if test x"$pkg_check_gtk" = xyes; then
91e84f96 8427
8c5ff6dd 8428
8c5ff6dd 8429
eb697db5
DN
8430 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8431 CFLAGS="$CFLAGS $GTK_CFLAGS"
8432 LIBS="$GTK_LIBS $LIBS"
8433 GTK_COMPILES=no
8434 for ac_func in gtk_main
8435do :
8436 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8437if test "x$ac_cv_func_gtk_main" = x""yes; then :
8438 cat >>confdefs.h <<_ACEOF
8439#define HAVE_GTK_MAIN 1
8440_ACEOF
8441 GTK_COMPILES=yes
5929fbe7 8442fi
eb697db5 8443done
8c5ff6dd 8444
eb697db5
DN
8445 if test "${GTK_COMPILES}" != "yes"; then
8446 if test "$USE_X_TOOLKIT" != "maybe"; then
8447 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
8448 fi
8449 else
8450 HAVE_GTK=yes
5929fbe7 8451
eb697db5 8452$as_echo "#define USE_GTK 1" >>confdefs.h
91e84f96 8453
eb697db5
DN
8454 GTK_OBJ=gtkutil.o
8455 USE_X_TOOLKIT=none
8456 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
8457 :
8458 else
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
8460 closing open displays. This is no problem if you just use
8461 one display, but if you use more than one and close one of them
8462 Emacs may crash." >&5
8463$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
8464 closing open displays. This is no problem if you just use
8465 one display, but if you use more than one and close one of them
8466 Emacs may crash." >&2;}
8467 sleep 3
8468 fi
8469 fi
8c5ff6dd 8470
a4f64981 8471fi
08b47d3d 8472
15e12598
VB
8473
8474
eb697db5 8475if test "${HAVE_GTK}" = "yes"; then
15e12598 8476
eb697db5
DN
8477 if test "$with_toolkit_scroll_bars" != no; then
8478 with_toolkit_scroll_bars=yes
8479 fi
a4f64981 8480
eb697db5
DN
8481 HAVE_GTK_MULTIDISPLAY=no
8482 for ac_func in gdk_display_open
8483do :
8484 ac_fn_c_check_func "$LINENO" "gdk_display_open" "ac_cv_func_gdk_display_open"
8485if test "x$ac_cv_func_gdk_display_open" = x""yes; then :
8486 cat >>confdefs.h <<_ACEOF
8487#define HAVE_GDK_DISPLAY_OPEN 1
8488_ACEOF
8489 HAVE_GTK_MULTIDISPLAY=yes
8490fi
8491done
a4f64981 8492
eb697db5 8493 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
8c5ff6dd 8494
eb697db5 8495$as_echo "#define HAVE_GTK_MULTIDISPLAY 1" >>confdefs.h
8c5ff6dd 8496
eb697db5 8497 fi
8c5ff6dd 8498
eb697db5
DN
8499 HAVE_GTK_FILE_SELECTION=no
8500 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
8501#include <gtk/gtk.h>
8502"
8503if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
8504 HAVE_GTK_FILE_SELECTION=yes
5929fbe7 8505else
eb697db5 8506 HAVE_GTK_FILE_SELECTION=no
5929fbe7 8507fi
91e84f96 8508
eb697db5
DN
8509 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
8510 for ac_func in gtk_file_selection_new
8511do :
8512 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
8513if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
5929fbe7 8514 cat >>confdefs.h <<_ACEOF
eb697db5 8515#define HAVE_GTK_FILE_SELECTION_NEW 1
5929fbe7 8516_ACEOF
eb697db5 8517 HAVE_GTK_FILE_SELECTION=yes
5929fbe7 8518else
eb697db5
DN
8519 HAVE_GTK_FILE_SELECTION=no
8520fi
8521done
91e84f96 8522
eb697db5 8523 fi
8c5ff6dd 8524
eb697db5
DN
8525 HAVE_GTK_FILE_CHOOSER=no
8526 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_CHOOSER" "ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" "$ac_includes_default
8527#include <gtk/gtk.h>
8528"
8529if test "x$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" = x""yes; then :
8530 HAVE_GTK_FILE_CHOOSER=yes
5929fbe7 8531else
eb697db5 8532 HAVE_GTK_FILE_CHOOSER=no
5929fbe7
GM
8533fi
8534
eb697db5
DN
8535 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8536 for ac_func in gtk_file_chooser_dialog_new
8537do :
8538 ac_fn_c_check_func "$LINENO" "gtk_file_chooser_dialog_new" "ac_cv_func_gtk_file_chooser_dialog_new"
8539if test "x$ac_cv_func_gtk_file_chooser_dialog_new" = x""yes; then :
8540 cat >>confdefs.h <<_ACEOF
8541#define HAVE_GTK_FILE_CHOOSER_DIALOG_NEW 1
5929fbe7 8542_ACEOF
eb697db5 8543 HAVE_GTK_FILE_CHOOSER=yes
15e12598 8544else
eb697db5 8545 HAVE_GTK_FILE_CHOOSER=no
8c5ff6dd 8546fi
eb697db5 8547done
5929fbe7 8548
eb697db5 8549 fi
5929fbe7 8550
eb697db5
DN
8551 if test "$HAVE_GTK_FILE_SELECTION" = yes \
8552 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
5929fbe7 8553
eb697db5 8554$as_echo "#define HAVE_GTK_FILE_BOTH 1" >>confdefs.h
5929fbe7 8555
eb697db5 8556 fi
91e84f96 8557
eb697db5
DN
8558 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8559 HAVE_GTK_AND_PTHREAD=no
8560 for ac_header in pthread.h
8561do :
8562 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8563if test "x$ac_cv_header_pthread_h" = x""yes; then :
8564 cat >>confdefs.h <<_ACEOF
8565#define HAVE_PTHREAD_H 1
5929fbe7
GM
8566_ACEOF
8567
eb697db5 8568fi
5929fbe7 8569
eb697db5
DN
8570done
8571
8572 if test "$ac_cv_header_pthread_h"; then
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
8574$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
8575if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
8c5ff6dd
KR
8576 $as_echo_n "(cached) " >&6
8577else
8578 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
8579LIBS="-lpthread $LIBS"
8580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 8581/* end confdefs.h. */
8c5ff6dd
KR
8582
8583/* Override any GCC internal prototype to avoid an error.
8584 Use char because int might match the return type of a GCC
8585 builtin and then its argument prototype would still apply. */
8586#ifdef __cplusplus
8587extern "C"
8588#endif
eb697db5 8589char pthread_self ();
a4f64981
GM
8590int
8591main ()
8592{
eb697db5 8593return pthread_self ();
a4f64981
GM
8594 ;
8595 return 0;
8596}
8597_ACEOF
eb697db5
DN
8598if ac_fn_c_try_link "$LINENO"; then :
8599 ac_cv_lib_pthread_pthread_self=yes
a4f64981 8600else
eb697db5 8601 ac_cv_lib_pthread_pthread_self=no
8c5ff6dd 8602fi
eb697db5
DN
8603rm -f core conftest.err conftest.$ac_objext \
8604 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
8605LIBS=$ac_check_lib_save_LIBS
8606fi
eb697db5
DN
8607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
8608$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
8609if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
8610 HAVE_GTK_AND_PTHREAD=yes
8611fi
91e84f96 8612
eb697db5
DN
8613 fi
8614 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
8615 case "${canonical}" in
8616 *-hpux*) ;;
8617 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
8618 esac
91e84f96 8619
eb697db5 8620$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
cd03c74a 8621
eb697db5
DN
8622 fi
8623 fi
5929fbe7 8624fi
49ebbd65 8625
eb697db5
DN
8626HAVE_DBUS=no
8627DBUS_OBJ=
8628if test "${with_dbus}" = "yes"; then
15e12598 8629
eb697db5 8630 succeeded=no
a4f64981 8631
eb697db5
DN
8632 # Extract the first word of "pkg-config", so it can be a program name with args.
8633set dummy pkg-config; ac_word=$2
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635$as_echo_n "checking for $ac_word... " >&6; }
8636if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
8637 $as_echo_n "(cached) " >&6
8638else
eb697db5
DN
8639 case $PKG_CONFIG in
8640 [\\/]* | ?:[\\/]*)
8641 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8642 ;;
8643 *)
8644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645for as_dir in $PATH
8646do
8647 IFS=$as_save_IFS
8648 test -z "$as_dir" && as_dir=.
8649 for ac_exec_ext in '' $ac_executable_extensions; do
8650 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8651 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8652 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653 break 2
8654 fi
8655done
8656 done
8657IFS=$as_save_IFS
8658
8659 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8660 ;;
a4f64981 8661esac
eb697db5
DN
8662fi
8663PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8664if test -n "$PKG_CONFIG"; then
8665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8666$as_echo "$PKG_CONFIG" >&6; }
91e84f96 8667else
eb697db5
DN
8668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8669$as_echo "no" >&6; }
5929fbe7 8670fi
a4f64981 8671
49ebbd65 8672
eb697db5
DN
8673
8674 if test "$PKG_CONFIG" = "no" ; then
8675 HAVE_DBUS=no
8676 else
8677 PKG_CONFIG_MIN_VERSION=0.9.0
8678 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
8680$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
8681
8682 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
8683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8684$as_echo "yes" >&6; }
8685 succeeded=yes
8686
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
8688$as_echo_n "checking DBUS_CFLAGS... " >&6; }
8689 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
8691$as_echo "$DBUS_CFLAGS" >&6; }
8692
8693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
8694$as_echo_n "checking DBUS_LIBS... " >&6; }
8695 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
8697$as_echo "$DBUS_LIBS" >&6; }
8698 else
8699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8700$as_echo "no" >&6; }
8701 DBUS_CFLAGS=""
8702 DBUS_LIBS=""
8703 ## If we have a custom action on failure, don't print errors, but
8704 ## do set a variable so people can do so.
8705 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
8706
8707 fi
8708
8709
8710
8711 else
8712 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8713 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8714 fi
8715 fi
8716
8717 if test $succeeded = yes; then
8718 HAVE_DBUS=yes
8719 else
8720 HAVE_DBUS=no
8721 fi
8722
8723 if test "$HAVE_DBUS" = yes; then
8724 LIBS="$LIBS $DBUS_LIBS"
8725
8726$as_echo "#define HAVE_DBUS 1" >>confdefs.h
8727
8728 for ac_func in dbus_watch_get_unix_fd
8729do :
8730 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
8731if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
8732 cat >>confdefs.h <<_ACEOF
8733#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
5929fbe7 8734_ACEOF
eb697db5
DN
8735
8736fi
8737done
8738
8739 DBUS_OBJ=dbusbind.o
8740 fi
8741fi
8742
8743
8744HAVE_GCONF=no
8745if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
8746
8747 succeeded=no
8748
8749 # Extract the first word of "pkg-config", so it can be a program name with args.
8750set dummy pkg-config; ac_word=$2
8751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8752$as_echo_n "checking for $ac_word... " >&6; }
8753if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8754 $as_echo_n "(cached) " >&6
8755else
8756 case $PKG_CONFIG in
8757 [\\/]* | ?:[\\/]*)
8758 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8759 ;;
8760 *)
8761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8762for as_dir in $PATH
8763do
8764 IFS=$as_save_IFS
8765 test -z "$as_dir" && as_dir=.
8766 for ac_exec_ext in '' $ac_executable_extensions; do
8767 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8768 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8770 break 2
8771 fi
8772done
8773 done
8774IFS=$as_save_IFS
8775
8776 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8777 ;;
5929fbe7 8778esac
eb697db5
DN
8779fi
8780PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8781if test -n "$PKG_CONFIG"; then
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8783$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 8784else
eb697db5
DN
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8786$as_echo "no" >&6; }
8787fi
8788
8789
8790
8791 if test "$PKG_CONFIG" = "no" ; then
8792 HAVE_GCONF=no
8793 else
8794 PKG_CONFIG_MIN_VERSION=0.9.0
8795 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
8797$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
8798
8799 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8801$as_echo "yes" >&6; }
8802 succeeded=yes
8803
8804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
8805$as_echo_n "checking GCONF_CFLAGS... " >&6; }
8806 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
8808$as_echo "$GCONF_CFLAGS" >&6; }
8809
8810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
8811$as_echo_n "checking GCONF_LIBS... " >&6; }
8812 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
8814$as_echo "$GCONF_LIBS" >&6; }
8815 else
8816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8817$as_echo "no" >&6; }
8818 GCONF_CFLAGS=""
8819 GCONF_LIBS=""
8820 ## If we have a custom action on failure, don't print errors, but
8821 ## do set a variable so people can do so.
8822 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
cd03c74a 8823
eb697db5 8824 fi
49ebbd65 8825
e6df49e4 8826
49ebbd65 8827
eb697db5
DN
8828 else
8829 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8830 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8831 fi
8832 fi
cd03c74a 8833
eb697db5
DN
8834 if test $succeeded = yes; then
8835 HAVE_GCONF=yes
8836 else
8837 HAVE_GCONF=no
8838 fi
49ebbd65 8839
eb697db5 8840 if test "$HAVE_GCONF" = yes; then
a4f64981 8841
eb697db5 8842$as_echo "#define HAVE_GCONF 1" >>confdefs.h
8c5ff6dd 8843
eb697db5
DN
8844 fi
8845fi
8846
8847HAVE_LIBSELINUX=no
8848LIBSELINUX_LIBS=
8849if test "${with_selinux}" = "yes"; then
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
8851$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
8852if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
15e12598 8853 $as_echo_n "(cached) " >&6
49ebbd65 8854else
eb697db5
DN
8855 ac_check_lib_save_LIBS=$LIBS
8856LIBS="-lselinux $LIBS"
8857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8858/* end confdefs.h. */
15e12598
VB
8859
8860/* Override any GCC internal prototype to avoid an error.
8861 Use char because int might match the return type of a GCC
8862 builtin and then its argument prototype would still apply. */
8863#ifdef __cplusplus
8864extern "C"
8865#endif
eb697db5 8866char lgetfilecon ();
91e84f96
GM
8867int
8868main ()
8869{
eb697db5 8870return lgetfilecon ();
91e84f96
GM
8871 ;
8872 return 0;
8873}
8874_ACEOF
eb697db5
DN
8875if ac_fn_c_try_link "$LINENO"; then :
8876 ac_cv_lib_selinux_lgetfilecon=yes
91e84f96 8877else
eb697db5 8878 ac_cv_lib_selinux_lgetfilecon=no
a4f64981 8879fi
eb697db5
DN
8880rm -f core conftest.err conftest.$ac_objext \
8881 conftest$ac_exeext conftest.$ac_ext
8882LIBS=$ac_check_lib_save_LIBS
15e12598 8883fi
eb697db5
DN
8884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
8885$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
8886if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
8887 HAVE_LIBSELINUX=yes
8888else
8889 HAVE_LIBSELINUX=no
5929fbe7 8890fi
a4f64981 8891
eb697db5 8892 if test "$HAVE_LIBSELINUX" = yes; then
15e12598 8893
eb697db5 8894$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
e6df49e4 8895
eb697db5
DN
8896 LIBSELINUX_LIBS=-lselinux
8897 fi
5929fbe7 8898fi
e6df49e4 8899
eb697db5
DN
8900
8901HAVE_XAW3D=no
8902LUCID_LIBW=
8903if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
8904 if test "$with_xaw3d" != no; then
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
8906$as_echo_n "checking for xaw3d... " >&6; }
8907 if test "${emacs_cv_xaw3d+set}" = set; then :
a4f64981
GM
8908 $as_echo_n "(cached) " >&6
8909else
eb697db5 8910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 8911/* end confdefs.h. */
5929fbe7 8912
eb697db5
DN
8913#include <X11/Intrinsic.h>
8914#include <X11/Xaw3d/Simple.h>
8915int
8916main ()
8917{
5929fbe7 8918
eb697db5
DN
8919 ;
8920 return 0;
8921}
5929fbe7 8922_ACEOF
eb697db5
DN
8923if ac_fn_c_try_link "$LINENO"; then :
8924 emacs_cv_xaw3d=yes
a4f64981 8925else
eb697db5 8926 emacs_cv_xaw3d=no
a4f64981 8927fi
eb697db5
DN
8928rm -f core conftest.err conftest.$ac_objext \
8929 conftest$ac_exeext conftest.$ac_ext
5929fbe7 8930fi
8c5ff6dd 8931
eb697db5
DN
8932 else
8933 emacs_cv_xaw3d=no
8934 fi
8935 if test $emacs_cv_xaw3d = yes; then
8936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
8937$as_echo "yes; using Lucid toolkit" >&6; }
8938 USE_X_TOOLKIT=LUCID
8939 HAVE_XAW3D=yes
8940 LUCID_LIBW=-lXaw3d
8c5ff6dd 8941
eb697db5 8942$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
5929fbe7 8943
eb697db5
DN
8944 else
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8946$as_echo "no" >&6; }
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
8948$as_echo_n "checking for libXaw... " >&6; }
8949 if test "${emacs_cv_xaw+set}" = set; then :
5929fbe7 8950 $as_echo_n "(cached) " >&6
5929fbe7 8951else
eb697db5 8952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 8953/* end confdefs.h. */
5929fbe7 8954
eb697db5
DN
8955#include <X11/Intrinsic.h>
8956#include <X11/Xaw/Simple.h>
8957int
8958main ()
8959{
5929fbe7 8960
eb697db5
DN
8961 ;
8962 return 0;
8963}
5929fbe7 8964_ACEOF
eb697db5
DN
8965if ac_fn_c_try_link "$LINENO"; then :
8966 emacs_cv_xaw=yes
5929fbe7 8967else
eb697db5
DN
8968 emacs_cv_xaw=no
8969fi
8970rm -f core conftest.err conftest.$ac_objext \
8971 conftest$ac_exeext conftest.$ac_ext
8972fi
5929fbe7 8973
eb697db5
DN
8974 if test $emacs_cv_xaw = yes; then
8975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
8976$as_echo "yes; using Lucid toolkit" >&6; }
8977 USE_X_TOOLKIT=LUCID
8978 LUCID_LIBW=-lXaw
8979 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
8980 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
8981 else
8982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
8983$as_echo "no; do not use toolkit by default" >&6; }
8984 USE_X_TOOLKIT=none
8985 fi
8986 fi
5929fbe7 8987fi
8c5ff6dd 8988
eb697db5 8989X_TOOLKIT_TYPE=$USE_X_TOOLKIT
a4f64981 8990
eb697db5
DN
8991LIBXTR6=
8992if test "${USE_X_TOOLKIT}" != "none"; then
8993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
8994$as_echo_n "checking X11 toolkit version... " >&6; }
8995 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
8996 $as_echo_n "(cached) " >&6
8997else
8998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8999/* end confdefs.h. */
9000#include <X11/Intrinsic.h>
9001int
9002main ()
9003{
9004#if XtSpecificationRelease < 6
9005fail;
9006#endif
aaa36002 9007
eb697db5
DN
9008 ;
9009 return 0;
9010}
9011_ACEOF
9012if ac_fn_c_try_link "$LINENO"; then :
9013 emacs_cv_x11_toolkit_version_6=yes
5929fbe7 9014else
eb697db5 9015 emacs_cv_x11_toolkit_version_6=no
5929fbe7 9016fi
eb697db5
DN
9017rm -f core conftest.err conftest.$ac_objext \
9018 conftest$ac_exeext conftest.$ac_ext
5929fbe7 9019fi
15e12598 9020
eb697db5
DN
9021 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
9022 if test $emacs_cv_x11_toolkit_version_6 = yes; then
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
9024$as_echo "6 or newer" >&6; }
15e12598 9025
eb697db5 9026$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
15e12598 9027
eb697db5
DN
9028 LIBXTR6="-lSM -lICE"
9029 case "$opsys" in
9030 ## Use libw.a along with X11R6 Xt.
9031 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
9032 esac
9033 else
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
9035$as_echo "before 6" >&6; }
9036 fi
5929fbe7 9037
eb697db5
DN
9038 OLDLIBS="$LIBS"
9039 if test x$HAVE_X11XTR6 = xyes; then
9040 LIBS="-lXt -lSM -lICE $LIBS"
9041 else
9042 LIBS="-lXt $LIBS"
9043 fi
9044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
9045$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
9046if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
5929fbe7 9047 $as_echo_n "(cached) " >&6
5929fbe7 9048else
eb697db5
DN
9049 ac_check_lib_save_LIBS=$LIBS
9050LIBS="-lXmu $LIBS"
9051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9052/* end confdefs.h. */
eb697db5
DN
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
9060char XmuConvertStandardSelection ();
9061int
9062main ()
9063{
9064return XmuConvertStandardSelection ();
9065 ;
9066 return 0;
9067}
5929fbe7 9068_ACEOF
eb697db5
DN
9069if ac_fn_c_try_link "$LINENO"; then :
9070 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
5929fbe7 9071else
eb697db5 9072 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
8c5ff6dd 9073fi
eb697db5
DN
9074rm -f core conftest.err conftest.$ac_objext \
9075 conftest$ac_exeext conftest.$ac_ext
9076LIBS=$ac_check_lib_save_LIBS
9077fi
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
9079$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
9080if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
9081 cat >>confdefs.h <<_ACEOF
9082#define HAVE_LIBXMU 1
5929fbe7 9083_ACEOF
a4f64981 9084
eb697db5
DN
9085 LIBS="-lXmu $LIBS"
9086
5929fbe7 9087fi
a4f64981 9088
eb697db5
DN
9089 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
9090fi
a4f64981 9091
a4f64981 9092
eb697db5
DN
9093LIBXMU=-lXmu
9094case "$machine" in
9095 ## These machines don't supply Xmu.
9096 hpux* | aix4-2 )
9097 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
5929fbe7
GM
9098 ;;
9099esac
eb697db5
DN
9100
9101
9102# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
9103if test "${HAVE_X11}" = "yes"; then
9104 if test "${USE_X_TOOLKIT}" != "none"; then
9105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
9106$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
9107if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
5929fbe7
GM
9108 $as_echo_n "(cached) " >&6
9109else
eb697db5
DN
9110 ac_check_lib_save_LIBS=$LIBS
9111LIBS="-lXext $LIBS"
9112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9113/* end confdefs.h. */
49ebbd65 9114
eb697db5
DN
9115/* Override any GCC internal prototype to avoid an error.
9116 Use char because int might match the return type of a GCC
9117 builtin and then its argument prototype would still apply. */
9118#ifdef __cplusplus
9119extern "C"
9120#endif
9121char XShapeQueryExtension ();
9122int
9123main ()
9124{
9125return XShapeQueryExtension ();
9126 ;
9127 return 0;
9128}
9129_ACEOF
9130if ac_fn_c_try_link "$LINENO"; then :
9131 ac_cv_lib_Xext_XShapeQueryExtension=yes
9132else
9133 ac_cv_lib_Xext_XShapeQueryExtension=no
9134fi
9135rm -f core conftest.err conftest.$ac_objext \
9136 conftest$ac_exeext conftest.$ac_ext
9137LIBS=$ac_check_lib_save_LIBS
5929fbe7 9138fi
eb697db5
DN
9139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
9140$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
9141if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
5929fbe7 9142 cat >>confdefs.h <<_ACEOF
eb697db5 9143#define HAVE_LIBXEXT 1
5929fbe7 9144_ACEOF
15e12598 9145
eb697db5 9146 LIBS="-lXext $LIBS"
a4f64981 9147
5929fbe7 9148fi
8c5ff6dd 9149
eb697db5
DN
9150 fi
9151fi
8c5ff6dd 9152
eb697db5
DN
9153LIBXP=
9154if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
9156$as_echo_n "checking for Motif version 2.1... " >&6; }
9157if test "${emacs_cv_motif_version_2_1+set}" = set; then :
91e84f96
GM
9158 $as_echo_n "(cached) " >&6
9159else
eb697db5 9160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9161/* end confdefs.h. */
eb697db5
DN
9162#include <Xm/Xm.h>
9163int
9164main ()
9165{
9166#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
9167int x = 5;
9168#else
9169Motif version prior to 2.1.
9170#endif
9171 ;
9172 return 0;
9173}
91e84f96 9174_ACEOF
eb697db5
DN
9175if ac_fn_c_try_compile "$LINENO"; then :
9176 emacs_cv_motif_version_2_1=yes
91e84f96 9177else
eb697db5 9178 emacs_cv_motif_version_2_1=no
91e84f96 9179fi
5929fbe7 9180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9181fi
9182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
9183$as_echo "$emacs_cv_motif_version_2_1" >&6; }
9184 if test $emacs_cv_motif_version_2_1 = yes; then
9185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
9186$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
9187if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
9188 $as_echo_n "(cached) " >&6
9189else
9190 ac_check_lib_save_LIBS=$LIBS
9191LIBS="-lXp $LIBS"
9192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9193/* end confdefs.h. */
a4f64981 9194
eb697db5
DN
9195/* Override any GCC internal prototype to avoid an error.
9196 Use char because int might match the return type of a GCC
9197 builtin and then its argument prototype would still apply. */
9198#ifdef __cplusplus
9199extern "C"
9200#endif
9201char XpCreateContext ();
9202int
9203main ()
9204{
9205return XpCreateContext ();
9206 ;
9207 return 0;
9208}
5929fbe7 9209_ACEOF
eb697db5
DN
9210if ac_fn_c_try_link "$LINENO"; then :
9211 ac_cv_lib_Xp_XpCreateContext=yes
9212else
9213 ac_cv_lib_Xp_XpCreateContext=no
9214fi
9215rm -f core conftest.err conftest.$ac_objext \
9216 conftest$ac_exeext conftest.$ac_ext
9217LIBS=$ac_check_lib_save_LIBS
9218fi
9219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
9220$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
9221if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
9222 LIBXP=-lXp
9223fi
9224
9225 else
9226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
9227$as_echo_n "checking for LessTif where some systems put it... " >&6; }
9228if test "${emacs_cv_lesstif+set}" = set; then :
9229 $as_echo_n "(cached) " >&6
9230else
9231 # We put this in CFLAGS temporarily to precede other -I options
9232 # that might be in CFLAGS temporarily.
9233 # We put this in CPPFLAGS where it precedes the other -I options.
9234 OLD_CPPFLAGS=$CPPFLAGS
9235 OLD_CFLAGS=$CFLAGS
9236 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
9237 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
9238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9239/* end confdefs.h. */
eb697db5
DN
9240#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
9241int
9242main ()
9243{
9244int x = 5;
9245 ;
9246 return 0;
9247}
a4f64981 9248_ACEOF
eb697db5
DN
9249if ac_fn_c_try_compile "$LINENO"; then :
9250 emacs_cv_lesstif=yes
8c5ff6dd 9251else
eb697db5
DN
9252 emacs_cv_lesstif=no
9253fi
9254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9255fi
9256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
9257$as_echo "$emacs_cv_lesstif" >&6; }
9258 if test $emacs_cv_lesstif = yes; then
9259 # Make sure this -I option remains in CPPFLAGS after it is set
9260 # back to REAL_CPPFLAGS.
9261 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
9262 # have those other -I options anyway. Ultimately, having this
9263 # directory ultimately in CPPFLAGS will be enough.
9264 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
9265 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
9266 else
9267 CFLAGS=$OLD_CFLAGS
9268 CPPFLAGS=$OLD_CPPFLAGS
9269 fi
9270 fi
5929fbe7 9271fi
cd03c74a 9272
49ebbd65 9273
eb697db5
DN
9274USE_TOOLKIT_SCROLL_BARS=no
9275if test "${with_toolkit_scroll_bars}" != "no"; then
9276 if test "${USE_X_TOOLKIT}" != "none"; then
9277 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9278 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9279
eb697db5
DN
9280 HAVE_XAW3D=no
9281 USE_TOOLKIT_SCROLL_BARS=yes
9282 elif test "${HAVE_XAW3D}" = "yes"; then
9283 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9284
9285 USE_TOOLKIT_SCROLL_BARS=yes
9286 fi
9287 elif test "${HAVE_GTK}" = "yes"; then
9288 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9289
9290 USE_TOOLKIT_SCROLL_BARS=yes
9291 elif test "${HAVE_NS}" = "yes"; then
9292 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9293
eb697db5
DN
9294 USE_TOOLKIT_SCROLL_BARS=yes
9295 fi
5929fbe7 9296fi
eb697db5
DN
9297
9298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9299/* end confdefs.h. */
91e84f96 9300
eb697db5
DN
9301 #include <X11/Xlib.h>
9302 #include <X11/Xresource.h>
91e84f96
GM
9303int
9304main ()
9305{
eb697db5 9306XIMProc callback;
91e84f96
GM
9307 ;
9308 return 0;
9309}
9310_ACEOF
eb697db5
DN
9311if ac_fn_c_try_compile "$LINENO"; then :
9312 HAVE_XIM=yes
9313
9314$as_echo "#define HAVE_XIM 1" >>confdefs.h
9315
5929fbe7 9316else
eb697db5
DN
9317 HAVE_XIM=no
9318fi
9319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929fbe7 9320
eb697db5
DN
9321
9322if test "${with_xim}" != "no"; then
9323
9324$as_echo "#define USE_XIM 1" >>confdefs.h
9325
9326fi
9327
9328
9329if test "${HAVE_XIM}" != "no"; then
9330 late_CFLAGS=$CFLAGS
9331 if test "$GCC" = yes; then
9332 CFLAGS="$CFLAGS --pedantic-errors"
9333 fi
9334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9335/* end confdefs.h. */
5929fbe7 9336
eb697db5
DN
9337#include <X11/Xlib.h>
9338#include <X11/Xresource.h>
5929fbe7
GM
9339int
9340main ()
9341{
eb697db5
DN
9342Display *display;
9343XrmDatabase db;
9344char *res_name;
9345char *res_class;
9346XIMProc callback;
9347XPointer *client_data;
9348#ifndef __GNUC__
9349/* If we're not using GCC, it's probably not XFree86, and this is
9350 probably right, but we can't use something like --pedantic-errors. */
9351extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9352 char*, XIMProc, XPointer*);
9353#endif
9354(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9355 client_data);
5929fbe7
GM
9356 ;
9357 return 0;
9358}
9359_ACEOF
eb697db5
DN
9360if ac_fn_c_try_compile "$LINENO"; then :
9361 emacs_cv_arg6_star=yes
5929fbe7 9362fi
5929fbe7 9363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9364 if test "$emacs_cv_arg6_star" = yes; then
9365 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
5929fbe7 9366
eb697db5
DN
9367 else
9368 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
9369
9370 fi
9371 CFLAGS=$late_CFLAGS
8c5ff6dd 9372fi
5929fbe7 9373
eb697db5
DN
9374### Start of font-backend (under any platform) section.
9375# (nothing here yet -- this is a placeholder)
9376### End of font-backend (under any platform) section.
5929fbe7 9377
eb697db5
DN
9378### Start of font-backend (under X11) section.
9379if test "${HAVE_X11}" = "yes"; then
5929fbe7 9380
eb697db5
DN
9381 succeeded=no
9382
9383 # Extract the first word of "pkg-config", so it can be a program name with args.
9384set dummy pkg-config; ac_word=$2
9385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9386$as_echo_n "checking for $ac_word... " >&6; }
9387if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9388 $as_echo_n "(cached) " >&6
9389else
9390 case $PKG_CONFIG in
9391 [\\/]* | ?:[\\/]*)
9392 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9393 ;;
9394 *)
9395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9396for as_dir in $PATH
9397do
9398 IFS=$as_save_IFS
9399 test -z "$as_dir" && as_dir=.
9400 for ac_exec_ext in '' $ac_executable_extensions; do
9401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9402 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9404 break 2
9405 fi
9406done
9407 done
9408IFS=$as_save_IFS
5929fbe7 9409
eb697db5
DN
9410 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9411 ;;
9412esac
9413fi
9414PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9415if test -n "$PKG_CONFIG"; then
9416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9417$as_echo "$PKG_CONFIG" >&6; }
9418else
9419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9420$as_echo "no" >&6; }
8c5ff6dd 9421fi
91e84f96 9422
5929fbe7 9423
91e84f96 9424
eb697db5
DN
9425 if test "$PKG_CONFIG" = "no" ; then
9426 HAVE_FC=no
9427 else
9428 PKG_CONFIG_MIN_VERSION=0.9.0
9429 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
9431$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
8c5ff6dd 9432
eb697db5
DN
9433 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
9434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9435$as_echo "yes" >&6; }
9436 succeeded=yes
8c5ff6dd 9437
eb697db5
DN
9438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
9439$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
9440 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
9442$as_echo "$FONTCONFIG_CFLAGS" >&6; }
8c5ff6dd 9443
eb697db5
DN
9444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
9445$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
9446 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
9448$as_echo "$FONTCONFIG_LIBS" >&6; }
9449 else
9450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9451$as_echo "no" >&6; }
9452 FONTCONFIG_CFLAGS=""
9453 FONTCONFIG_LIBS=""
9454 ## If we have a custom action on failure, don't print errors, but
9455 ## do set a variable so people can do so.
9456 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
9457
9458 fi
9459
9460
9461
9462 else
9463 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9464 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9465 fi
9466 fi
9467
9468 if test $succeeded = yes; then
9469 HAVE_FC=yes
9470 else
9471 HAVE_FC=no
9472 fi
9473
9474
9475 ## Use -lXft if available, unless `--with-xft=no'.
9476 HAVE_XFT=maybe
9477 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
9478 with_xft="no";
9479 fi
9480 if test "x${with_xft}" != "xno"; then
9481
9482
9483 succeeded=no
9484
9485 # Extract the first word of "pkg-config", so it can be a program name with args.
9486set dummy pkg-config; ac_word=$2
9487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9488$as_echo_n "checking for $ac_word... " >&6; }
9489if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
9490 $as_echo_n "(cached) " >&6
9491else
eb697db5
DN
9492 case $PKG_CONFIG in
9493 [\\/]* | ?:[\\/]*)
9494 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9495 ;;
9496 *)
9497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9498for as_dir in $PATH
9499do
9500 IFS=$as_save_IFS
9501 test -z "$as_dir" && as_dir=.
9502 for ac_exec_ext in '' $ac_executable_extensions; do
9503 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9504 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9506 break 2
9507 fi
9508done
9509 done
9510IFS=$as_save_IFS
9511
9512 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9513 ;;
9514esac
9515fi
9516PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9517if test -n "$PKG_CONFIG"; then
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9519$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 9520else
eb697db5
DN
9521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9522$as_echo "no" >&6; }
15e12598 9523fi
8c5ff6dd 9524
8c5ff6dd 9525
15e12598 9526
eb697db5
DN
9527 if test "$PKG_CONFIG" = "no" ; then
9528 HAVE_XFT=no
9529 else
9530 PKG_CONFIG_MIN_VERSION=0.9.0
9531 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
9533$as_echo_n "checking for xft >= 0.13.0... " >&6; }
9534
9535 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9537$as_echo "yes" >&6; }
9538 succeeded=yes
9539
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
9541$as_echo_n "checking XFT_CFLAGS... " >&6; }
9542 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
9544$as_echo "$XFT_CFLAGS" >&6; }
9545
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
9547$as_echo_n "checking XFT_LIBS... " >&6; }
9548 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
9550$as_echo "$XFT_LIBS" >&6; }
9551 else
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553$as_echo "no" >&6; }
9554 XFT_CFLAGS=""
9555 XFT_LIBS=""
9556 ## If we have a custom action on failure, don't print errors, but
9557 ## do set a variable so people can do so.
9558 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
8c5ff6dd 9559
eb697db5 9560 fi
8c5ff6dd 9561
5929fbe7
GM
9562
9563
eb697db5
DN
9564 else
9565 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9566 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9567 fi
9568 fi
5929fbe7 9569
eb697db5
DN
9570 if test $succeeded = yes; then
9571 :
9572 else
9573 HAVE_XFT=no
9574 fi
9575
9576 ## Because xftfont.c uses XRenderQueryExtension, we also
9577 ## need to link to -lXrender.
9578 HAVE_XRENDER=no
9579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
9580$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
9581if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
e6df49e4
GM
9582 $as_echo_n "(cached) " >&6
9583else
eb697db5
DN
9584 ac_check_lib_save_LIBS=$LIBS
9585LIBS="-lXrender $LIBS"
9586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 9587/* end confdefs.h. */
eb697db5
DN
9588
9589/* Override any GCC internal prototype to avoid an error.
9590 Use char because int might match the return type of a GCC
9591 builtin and then its argument prototype would still apply. */
9592#ifdef __cplusplus
9593extern "C"
9594#endif
9595char XRenderQueryExtension ();
5929fbe7
GM
9596int
9597main ()
9598{
eb697db5 9599return XRenderQueryExtension ();
5929fbe7
GM
9600 ;
9601 return 0;
9602}
9603_ACEOF
eb697db5
DN
9604if ac_fn_c_try_link "$LINENO"; then :
9605 ac_cv_lib_Xrender_XRenderQueryExtension=yes
5929fbe7 9606else
eb697db5
DN
9607 ac_cv_lib_Xrender_XRenderQueryExtension=no
9608fi
9609rm -f core conftest.err conftest.$ac_objext \
9610 conftest$ac_exeext conftest.$ac_ext
9611LIBS=$ac_check_lib_save_LIBS
9612fi
9613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
9614$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
9615if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
9616 HAVE_XRENDER=yes
5929fbe7
GM
9617fi
9618
eb697db5
DN
9619 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
9620 OLD_CPPFLAGS="$CPPFLAGS"
9621 OLD_CFLAGS="$CFLAGS"
9622 OLD_LIBS="$LIBS"
9623 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
9624 CFLAGS="$CFLAGS $XFT_CFLAGS"
9625 XFT_LIBS="-lXrender $XFT_LIBS"
9626 LIBS="$XFT_LIBS $LIBS"
9627 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
9628if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
9629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
9630$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
9631if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
9632 $as_echo_n "(cached) " >&6
9633else
9634 ac_check_lib_save_LIBS=$LIBS
9635LIBS="-lXft $XFT_LIBS $LIBS"
9636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9637/* end confdefs.h. */
eb697db5
DN
9638
9639/* Override any GCC internal prototype to avoid an error.
9640 Use char because int might match the return type of a GCC
9641 builtin and then its argument prototype would still apply. */
9642#ifdef __cplusplus
9643extern "C"
9644#endif
9645char XftFontOpen ();
e6df49e4
GM
9646int
9647main ()
8c5ff6dd 9648{
eb697db5 9649return XftFontOpen ();
8c5ff6dd
KR
9650 ;
9651 return 0;
9652}
9653_ACEOF
eb697db5
DN
9654if ac_fn_c_try_link "$LINENO"; then :
9655 ac_cv_lib_Xft_XftFontOpen=yes
e6df49e4 9656else
eb697db5 9657 ac_cv_lib_Xft_XftFontOpen=no
15e12598 9658fi
eb697db5
DN
9659rm -f core conftest.err conftest.$ac_objext \
9660 conftest$ac_exeext conftest.$ac_ext
9661LIBS=$ac_check_lib_save_LIBS
15e12598 9662fi
eb697db5
DN
9663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
9664$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
9665if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
9666 HAVE_XFT=yes
15e12598 9667fi
91e84f96 9668
eb697db5 9669fi
8c5ff6dd 9670
5929fbe7
GM
9671
9672
eb697db5 9673 if test "${HAVE_XFT}" = "yes"; then
5929fbe7 9674
eb697db5 9675$as_echo "#define HAVE_XFT 1" >>confdefs.h
5929fbe7
GM
9676
9677
eb697db5
DN
9678 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
9679 else
9680 CPPFLAGS="$OLD_CPPFLAGS"
9681 CFLAGS="$OLD_CFLAGS"
9682 LIBS="$OLD_LIBS"
9683 fi # "${HAVE_XFT}" = "yes"
9684 fi # "$HAVE_XFT" != no
9685 fi # "x${with_xft}" != "xno"
5929fbe7 9686
eb697db5
DN
9687 if test "$HAVE_XFT" != "yes"; then
9688 HAVE_XFT=no
9689 fi
5929fbe7
GM
9690
9691
eb697db5
DN
9692 HAVE_FREETYPE=no
9693 ## We used to allow building with FreeType and without Xft.
9694 ## However, the ftx font backend driver is not in good shape.
9695 if test "${HAVE_XFT}" = "yes"; then
9696 HAVE_FREETYPE=yes
9697 FONTCONFIG_CFLAGS=
9698 FONTCONFIG_LIBS=
9699 fi
5929fbe7 9700
eb697db5
DN
9701 HAVE_LIBOTF=no
9702 if test "${HAVE_FREETYPE}" = "yes"; then
5929fbe7 9703
eb697db5 9704$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
5929fbe7 9705
eb697db5 9706 if test "${with_libotf}" != "no"; then
5929fbe7 9707
eb697db5 9708 succeeded=no
5929fbe7 9709
eb697db5
DN
9710 # Extract the first word of "pkg-config", so it can be a program name with args.
9711set dummy pkg-config; ac_word=$2
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713$as_echo_n "checking for $ac_word... " >&6; }
9714if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981
GM
9715 $as_echo_n "(cached) " >&6
9716else
eb697db5
DN
9717 case $PKG_CONFIG in
9718 [\\/]* | ?:[\\/]*)
9719 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9720 ;;
9721 *)
9722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723for as_dir in $PATH
9724do
9725 IFS=$as_save_IFS
9726 test -z "$as_dir" && as_dir=.
9727 for ac_exec_ext in '' $ac_executable_extensions; do
9728 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9729 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731 break 2
9732 fi
9733done
9734 done
9735IFS=$as_save_IFS
9736
9737 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9738 ;;
5929fbe7 9739esac
eb697db5
DN
9740fi
9741PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9742if test -n "$PKG_CONFIG"; then
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9744$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 9745else
eb697db5
DN
9746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
5929fbe7
GM
9748fi
9749
5929fbe7 9750
91e84f96 9751
eb697db5
DN
9752 if test "$PKG_CONFIG" = "no" ; then
9753 HAVE_LIBOTF=no
9754 else
9755 PKG_CONFIG_MIN_VERSION=0.9.0
9756 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
9758$as_echo_n "checking for libotf... " >&6; }
91e84f96 9759
eb697db5
DN
9760 if $PKG_CONFIG --exists "libotf" 2>&5; then
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9762$as_echo "yes" >&6; }
9763 succeeded=yes
91e84f96 9764
eb697db5
DN
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
9766$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
9767 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
9769$as_echo "$LIBOTF_CFLAGS" >&6; }
8c5ff6dd 9770
eb697db5
DN
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
9772$as_echo_n "checking LIBOTF_LIBS... " >&6; }
9773 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
9775$as_echo "$LIBOTF_LIBS" >&6; }
9776 else
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
9779 LIBOTF_CFLAGS=""
9780 LIBOTF_LIBS=""
9781 ## If we have a custom action on failure, don't print errors, but
9782 ## do set a variable so people can do so.
9783 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
5929fbe7 9784
eb697db5 9785 fi
15e12598 9786
15e12598
VB
9787
9788
eb697db5
DN
9789 else
9790 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9791 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9792 fi
9793 fi
8c5ff6dd 9794
eb697db5
DN
9795 if test $succeeded = yes; then
9796 HAVE_LIBOTF=yes
9797 else
9798 HAVE_LIBOTF=no
9799 fi
5929fbe7 9800
eb697db5 9801 if test "$HAVE_LIBOTF" = "yes"; then
5929fbe7 9802
eb697db5 9803$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
5929fbe7 9804
eb697db5
DN
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
9806$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
9807if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
9808 $as_echo_n "(cached) " >&6
9809else
9810 ac_check_lib_save_LIBS=$LIBS
9811LIBS="-lotf $LIBS"
9812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9813/* end confdefs.h. */
91e84f96
GM
9814
9815/* Override any GCC internal prototype to avoid an error.
9816 Use char because int might match the return type of a GCC
9817 builtin and then its argument prototype would still apply. */
9818#ifdef __cplusplus
9819extern "C"
9820#endif
eb697db5 9821char OTF_get_variation_glyphs ();
91e84f96 9822int
49ebbd65
DN
9823main ()
9824{
eb697db5 9825return OTF_get_variation_glyphs ();
49ebbd65
DN
9826 ;
9827 return 0;
9828}
15e12598 9829_ACEOF
eb697db5
DN
9830if ac_fn_c_try_link "$LINENO"; then :
9831 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
a4f64981 9832else
eb697db5 9833 ac_cv_lib_otf_OTF_get_variation_glyphs=no
8c5ff6dd 9834fi
eb697db5
DN
9835rm -f core conftest.err conftest.$ac_objext \
9836 conftest$ac_exeext conftest.$ac_ext
9837LIBS=$ac_check_lib_save_LIBS
5929fbe7 9838fi
eb697db5
DN
9839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
9840$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
9841if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
9842 HAVE_OTF_GET_VARIATION_GLYPHS=yes
5929fbe7 9843else
eb697db5 9844 HAVE_OTF_GET_VARIATION_GLYPHS=no
5929fbe7 9845fi
8c5ff6dd 9846
eb697db5 9847 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
5929fbe7 9848
eb697db5 9849$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
a4f64981 9850
eb697db5
DN
9851 fi
9852 fi
9853 fi
9854 fi
a4f64981 9855
eb697db5
DN
9856 HAVE_M17N_FLT=no
9857 if test "${HAVE_LIBOTF}" = yes; then
9858 if test "${with_m17n_flt}" != "no"; then
a4f64981 9859
eb697db5 9860 succeeded=no
a4f64981 9861
eb697db5
DN
9862 # Extract the first word of "pkg-config", so it can be a program name with args.
9863set dummy pkg-config; ac_word=$2
9864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9865$as_echo_n "checking for $ac_word... " >&6; }
9866if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
9867 $as_echo_n "(cached) " >&6
9868else
eb697db5
DN
9869 case $PKG_CONFIG in
9870 [\\/]* | ?:[\\/]*)
9871 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9872 ;;
9873 *)
9874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9875for as_dir in $PATH
9876do
9877 IFS=$as_save_IFS
9878 test -z "$as_dir" && as_dir=.
9879 for ac_exec_ext in '' $ac_executable_extensions; do
9880 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9881 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9883 break 2
9884 fi
9885done
9886 done
9887IFS=$as_save_IFS
5929fbe7 9888
eb697db5
DN
9889 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9890 ;;
5929fbe7 9891esac
5929fbe7 9892fi
eb697db5
DN
9893PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9894if test -n "$PKG_CONFIG"; then
9895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9896$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 9897else
eb697db5
DN
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9899$as_echo "no" >&6; }
8c5ff6dd
KR
9900fi
9901
5929fbe7 9902
5929fbe7 9903
eb697db5
DN
9904 if test "$PKG_CONFIG" = "no" ; then
9905 HAVE_M17N_FLT=no
9906 else
9907 PKG_CONFIG_MIN_VERSION=0.9.0
9908 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
9910$as_echo_n "checking for m17n-flt... " >&6; }
9911
9912 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
9913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9914$as_echo "yes" >&6; }
9915 succeeded=yes
9916
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
9918$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
9919 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
9921$as_echo "$M17N_FLT_CFLAGS" >&6; }
9922
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
9924$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
9925 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
9927$as_echo "$M17N_FLT_LIBS" >&6; }
9928 else
9929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930$as_echo "no" >&6; }
9931 M17N_FLT_CFLAGS=""
9932 M17N_FLT_LIBS=""
9933 ## If we have a custom action on failure, don't print errors, but
9934 ## do set a variable so people can do so.
9935 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
9936
9937 fi
9938
5929fbe7 9939
15e12598 9940
eb697db5
DN
9941 else
9942 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9943 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9944 fi
9945 fi
15e12598 9946
eb697db5
DN
9947 if test $succeeded = yes; then
9948 HAVE_M17N_FLT=yes
9949 else
9950 HAVE_M17N_FLT=no
5929fbe7 9951 fi
15e12598 9952
eb697db5 9953 if test "$HAVE_M17N_FLT" = "yes"; then
5929fbe7 9954
eb697db5 9955$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
5929fbe7 9956
eb697db5
DN
9957 fi
9958 fi
9959 fi
9960else
9961 HAVE_XFT=no
9962 HAVE_FREETYPE=no
9963 HAVE_LIBOTF=no
9964 HAVE_M17N_FLT=no
9965fi
5929fbe7 9966
eb697db5 9967### End of font-backend (under X11) section.
5929fbe7 9968
5929fbe7 9969
5929fbe7
GM
9970
9971
9972
5929fbe7 9973
5929fbe7
GM
9974
9975
9976
9977
eb697db5
DN
9978### Use -lXpm if available, unless `--with-xpm=no'.
9979HAVE_XPM=no
9980LIBXPM=
9981if test "${HAVE_X11}" = "yes"; then
9982 if test "${with_xpm}" != "no"; then
9983 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
9984if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
9986$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
9987if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
8c5ff6dd
KR
9988 $as_echo_n "(cached) " >&6
9989else
eb697db5
DN
9990 ac_check_lib_save_LIBS=$LIBS
9991LIBS="-lXpm -lX11 $LIBS"
9992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9993/* end confdefs.h. */
eb697db5
DN
9994
9995/* Override any GCC internal prototype to avoid an error.
9996 Use char because int might match the return type of a GCC
9997 builtin and then its argument prototype would still apply. */
9998#ifdef __cplusplus
9999extern "C"
10000#endif
10001char XpmReadFileToPixmap ();
7186fb09
GM
10002int
10003main ()
10004{
eb697db5 10005return XpmReadFileToPixmap ();
a4f64981
GM
10006 ;
10007 return 0;
7186fb09 10008}
0c309b80 10009_ACEOF
eb697db5
DN
10010if ac_fn_c_try_link "$LINENO"; then :
10011 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
aaa36002 10012else
eb697db5
DN
10013 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
10014fi
10015rm -f core conftest.err conftest.$ac_objext \
10016 conftest$ac_exeext conftest.$ac_ext
10017LIBS=$ac_check_lib_save_LIBS
10018fi
10019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
10020$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
10021if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
10022 HAVE_XPM=yes
10023fi
5929fbe7 10024
8c5ff6dd 10025fi
5929fbe7 10026
5929fbe7 10027
eb697db5
DN
10028 if test "${HAVE_XPM}" = "yes"; then
10029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
10030$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
10031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10032/* end confdefs.h. */
10033#include "X11/xpm.h"
10034#ifndef XpmReturnAllocPixels
10035no_return_alloc_pixels
10036#endif
8c5ff6dd 10037
5929fbe7 10038_ACEOF
eb697db5
DN
10039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10040 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
10041 HAVE_XPM=no
10042else
10043 HAVE_XPM=yes
15e12598 10044fi
eb697db5 10045rm -f conftest*
8c5ff6dd 10046
5929fbe7 10047
eb697db5
DN
10048 if test "${HAVE_XPM}" = "yes"; then
10049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10050$as_echo "yes" >&6; }
10051 else
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054 fi
10055 fi
10056 fi
5929fbe7 10057
eb697db5 10058 if test "${HAVE_XPM}" = "yes"; then
5929fbe7 10059
eb697db5 10060$as_echo "#define HAVE_XPM 1" >>confdefs.h
5929fbe7 10061
eb697db5
DN
10062 LIBXPM=-lXpm
10063 fi
10064fi
5929fbe7 10065
eb697db5
DN
10066
10067### Use -ljpeg if available, unless `--with-jpeg=no'.
10068HAVE_JPEG=no
10069LIBJPEG=
10070if test "${HAVE_X11}" = "yes"; then
10071 if test "${with_jpeg}" != "no"; then
10072 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
10073if test "x$ac_cv_header_jerror_h" = x""yes; then :
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
10075$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
10076if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
10077 $as_echo_n "(cached) " >&6
10078else
10079 ac_check_lib_save_LIBS=$LIBS
10080LIBS="-ljpeg $LIBS"
10081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10082/* end confdefs.h. */
5929fbe7
GM
10083
10084/* Override any GCC internal prototype to avoid an error.
10085 Use char because int might match the return type of a GCC
10086 builtin and then its argument prototype would still apply. */
10087#ifdef __cplusplus
10088extern "C"
10089#endif
eb697db5 10090char jpeg_destroy_compress ();
08b47d3d
JD
10091int
10092main ()
10093{
eb697db5 10094return jpeg_destroy_compress ();
08b47d3d
JD
10095 ;
10096 return 0;
10097}
7186fb09 10098_ACEOF
eb697db5
DN
10099if ac_fn_c_try_link "$LINENO"; then :
10100 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
cd03c74a 10101else
eb697db5
DN
10102 ac_cv_lib_jpeg_jpeg_destroy_compress=no
10103fi
10104rm -f core conftest.err conftest.$ac_objext \
10105 conftest$ac_exeext conftest.$ac_ext
10106LIBS=$ac_check_lib_save_LIBS
10107fi
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
10109$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
10110if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
10111 HAVE_JPEG=yes
10112fi
10113
10114fi
10115
10116
10117 fi
10118
10119 if test "${HAVE_JPEG}" = "yes"; then
10120 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
10121
10122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10123/* end confdefs.h. */
10124#include <jpeglib.h>
10125 version=JPEG_LIB_VERSION
10126
10127_ACEOF
10128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10129 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
10130 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
8c5ff6dd 10131
eb697db5
DN
10132else
10133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
10134$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
10135 HAVE_JPEG=no
5929fbe7 10136fi
eb697db5 10137rm -f conftest*
8c5ff6dd 10138
eb697db5
DN
10139 fi
10140 if test "${HAVE_JPEG}" = "yes"; then
10141 LIBJPEG=-ljpeg
10142 fi
5929fbe7 10143fi
eb697db5
DN
10144
10145
10146### Use -lpng if available, unless `--with-png=no'.
10147HAVE_PNG=no
10148LIBPNG=
10149if test "${HAVE_X11}" = "yes"; then
10150 if test "${with_png}" != "no"; then
10151 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
10152 # in /usr/include/libpng.
10153 for ac_header in png.h libpng/png.h
10154do :
10155 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10156ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10157eval as_val=\$$as_ac_Header
10158 if test "x$as_val" = x""yes; then :
5929fbe7 10159 cat >>confdefs.h <<_ACEOF
eb697db5 10160#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5929fbe7 10161_ACEOF
8c5ff6dd 10162
eb697db5
DN
10163fi
10164
10165done
10166
10167 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
10169$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
10170if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
a5edbe4a
GM
10171 $as_echo_n "(cached) " >&6
10172else
5929fbe7 10173 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10174LIBS="-lpng -lz -lm $LIBS"
10175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10176/* end confdefs.h. */
8c5ff6dd 10177
5929fbe7
GM
10178/* Override any GCC internal prototype to avoid an error.
10179 Use char because int might match the return type of a GCC
10180 builtin and then its argument prototype would still apply. */
10181#ifdef __cplusplus
10182extern "C"
10183#endif
eb697db5 10184char png_get_channels ();
5929fbe7
GM
10185int
10186main ()
10187{
eb697db5 10188return png_get_channels ();
5929fbe7
GM
10189 ;
10190 return 0;
10191}
8c5ff6dd 10192_ACEOF
eb697db5
DN
10193if ac_fn_c_try_link "$LINENO"; then :
10194 ac_cv_lib_png_png_get_channels=yes
8c5ff6dd 10195else
eb697db5
DN
10196 ac_cv_lib_png_png_get_channels=no
10197fi
10198rm -f core conftest.err conftest.$ac_objext \
10199 conftest$ac_exeext conftest.$ac_ext
10200LIBS=$ac_check_lib_save_LIBS
10201fi
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
10203$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
10204if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
10205 HAVE_PNG=yes
8c5ff6dd 10206fi
5929fbe7 10207
eb697db5
DN
10208 fi
10209 fi
10210
10211 if test "${HAVE_PNG}" = "yes"; then
8c5ff6dd 10212
eb697db5 10213$as_echo "#define HAVE_PNG 1" >>confdefs.h
8c5ff6dd 10214
eb697db5
DN
10215 LIBPNG="-lpng -lz -lm"
10216 fi
8c5ff6dd
KR
10217fi
10218
5929fbe7 10219
eb697db5
DN
10220### Use -ltiff if available, unless `--with-tiff=no'.
10221HAVE_TIFF=no
10222LIBTIFF=
10223if test "${HAVE_X11}" = "yes"; then
10224 if test "${with_tiff}" != "no"; then
10225 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
10226if test "x$ac_cv_header_tiffio_h" = x""yes; then :
10227 tifflibs="-lz -lm"
10228 # At least one tiff package requires the jpeg library.
10229 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
10231$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
10232if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
8c5ff6dd
KR
10233 $as_echo_n "(cached) " >&6
10234else
eb697db5
DN
10235 ac_check_lib_save_LIBS=$LIBS
10236LIBS="-ltiff $tifflibs $LIBS"
10237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a5edbe4a 10238/* end confdefs.h. */
5929fbe7
GM
10239
10240/* Override any GCC internal prototype to avoid an error.
10241 Use char because int might match the return type of a GCC
10242 builtin and then its argument prototype would still apply. */
10243#ifdef __cplusplus
10244extern "C"
10245#endif
eb697db5 10246char TIFFGetVersion ();
a5edbe4a
GM
10247int
10248main ()
10249{
eb697db5 10250return TIFFGetVersion ();
5929fbe7
GM
10251 ;
10252 return 0;
a5edbe4a 10253}
08b47d3d 10254_ACEOF
eb697db5
DN
10255if ac_fn_c_try_link "$LINENO"; then :
10256 ac_cv_lib_tiff_TIFFGetVersion=yes
49ebbd65 10257else
eb697db5 10258 ac_cv_lib_tiff_TIFFGetVersion=no
8c5ff6dd 10259fi
eb697db5
DN
10260rm -f core conftest.err conftest.$ac_objext \
10261 conftest$ac_exeext conftest.$ac_ext
10262LIBS=$ac_check_lib_save_LIBS
10263fi
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
10265$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
10266if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
10267 HAVE_TIFF=yes
49ebbd65 10268fi
8c5ff6dd 10269
49ebbd65 10270fi
8c5ff6dd
KR
10271
10272
eb697db5 10273 fi
8c5ff6dd 10274
eb697db5 10275 if test "${HAVE_TIFF}" = "yes"; then
5929fbe7 10276
eb697db5
DN
10277$as_echo "#define HAVE_TIFF 1" >>confdefs.h
10278
10279 LIBTIFF=-ltiff
10280 fi
10281fi
5929fbe7 10282
5929fbe7 10283
eb697db5
DN
10284### Use -lgif or -lungif if available, unless `--with-gif=no'.
10285HAVE_GIF=no
10286LIBGIF=
10287if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
10288 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
10289if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
10290 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10291# Earlier versions can crash Emacs.
10292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
10293$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
10294if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
10295 $as_echo_n "(cached) " >&6
10296else
10297 ac_check_lib_save_LIBS=$LIBS
10298LIBS="-lgif $LIBS"
10299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10300/* end confdefs.h. */
cd03c74a 10301
e6df49e4
GM
10302/* Override any GCC internal prototype to avoid an error.
10303 Use char because int might match the return type of a GCC
10304 builtin and then its argument prototype would still apply. */
10305#ifdef __cplusplus
10306extern "C"
10307#endif
eb697db5 10308char EGifPutExtensionLast ();
e6df49e4
GM
10309int
10310main ()
10311{
eb697db5 10312return EGifPutExtensionLast ();
e6df49e4
GM
10313 ;
10314 return 0;
10315}
a5edbe4a 10316_ACEOF
eb697db5
DN
10317if ac_fn_c_try_link "$LINENO"; then :
10318 ac_cv_lib_gif_EGifPutExtensionLast=yes
15e12598 10319else
eb697db5 10320 ac_cv_lib_gif_EGifPutExtensionLast=no
15e12598 10321fi
eb697db5
DN
10322rm -f core conftest.err conftest.$ac_objext \
10323 conftest$ac_exeext conftest.$ac_ext
10324LIBS=$ac_check_lib_save_LIBS
10325fi
10326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
10327$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
10328if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
10329 HAVE_GIF=yes
10330else
10331 HAVE_GIF=maybe
15e12598 10332fi
15e12598 10333
8c5ff6dd 10334fi
49ebbd65 10335
49ebbd65 10336
eb697db5
DN
10337
10338 if test "$HAVE_GIF" = yes; then
10339 LIBGIF=-lgif
10340 elif test "$HAVE_GIF" = maybe; then
10341# If gif_lib.h but no libgif, try libungif.
10342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10343$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10344if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
8c5ff6dd
KR
10345 $as_echo_n "(cached) " >&6
10346else
eb697db5
DN
10347 ac_check_lib_save_LIBS=$LIBS
10348LIBS="-lungif $LIBS"
10349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10350/* end confdefs.h. */
15e12598 10351
a4f64981
GM
10352/* Override any GCC internal prototype to avoid an error.
10353 Use char because int might match the return type of a GCC
10354 builtin and then its argument prototype would still apply. */
10355#ifdef __cplusplus
10356extern "C"
10357#endif
eb697db5 10358char EGifPutExtensionLast ();
a4f64981
GM
10359int
10360main ()
10361{
eb697db5 10362return EGifPutExtensionLast ();
a4f64981
GM
10363 ;
10364 return 0;
10365}
e6df49e4 10366_ACEOF
eb697db5
DN
10367if ac_fn_c_try_link "$LINENO"; then :
10368 ac_cv_lib_ungif_EGifPutExtensionLast=yes
a4f64981 10369else
eb697db5 10370 ac_cv_lib_ungif_EGifPutExtensionLast=no
e6df49e4 10371fi
eb697db5
DN
10372rm -f core conftest.err conftest.$ac_objext \
10373 conftest$ac_exeext conftest.$ac_ext
10374LIBS=$ac_check_lib_save_LIBS
a4f64981 10375fi
eb697db5
DN
10376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10377$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10378if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10379 HAVE_GIF=yes
e6df49e4 10380else
eb697db5 10381 HAVE_GIF=no
5929fbe7 10382fi
8c5ff6dd 10383
eb697db5
DN
10384 test "$HAVE_GIF" = yes && LIBGIF=-lungif
10385 fi
5929fbe7 10386
eb697db5 10387 if test "${HAVE_GIF}" = "yes"; then
5929fbe7 10388
eb697db5 10389$as_echo "#define HAVE_GIF 1" >>confdefs.h
5929fbe7 10390
eb697db5
DN
10391 fi
10392fi
5929fbe7 10393
5929fbe7 10394
eb697db5
DN
10395if test "${HAVE_X11}" = "yes"; then
10396 MISSING=""
10397 WITH_NO=""
10398 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
10399 MISSING="libXpm" && WITH_NO="--with-xpm=no"
10400 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
10401 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
10402 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
10403 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
10404 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
10405 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
10406 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
10407 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
10408
10409 if test "X${MISSING}" != X; then
10410 as_fn_error "The following required libraries were not found:
10411 $MISSING
10412Maybe some development libraries/packages are missing?
10413If you don't want to link with them give
10414 $WITH_NO
10415as options to configure" "$LINENO" 5
10416 fi
10417fi
5929fbe7 10418
eb697db5
DN
10419### Use -lgpm if available, unless `--with-gpm=no'.
10420HAVE_GPM=no
10421LIBGPM=
10422MOUSE_SUPPORT=
10423if test "${with_gpm}" != "no"; then
10424 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
10425if test "x$ac_cv_header_gpm_h" = x""yes; then :
10426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
10427$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
10428if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
a4f64981 10429 $as_echo_n "(cached) " >&6
15e12598 10430else
eb697db5
DN
10431 ac_check_lib_save_LIBS=$LIBS
10432LIBS="-lgpm $LIBS"
10433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 10434/* end confdefs.h. */
eb697db5
DN
10435
10436/* Override any GCC internal prototype to avoid an error.
10437 Use char because int might match the return type of a GCC
10438 builtin and then its argument prototype would still apply. */
10439#ifdef __cplusplus
10440extern "C"
10441#endif
10442char Gpm_Open ();
a4f64981
GM
10443int
10444main ()
15e12598 10445{
eb697db5 10446return Gpm_Open ();
a4f64981
GM
10447 ;
10448 return 0;
15e12598 10449}
a4f64981 10450_ACEOF
eb697db5
DN
10451if ac_fn_c_try_link "$LINENO"; then :
10452 ac_cv_lib_gpm_Gpm_Open=yes
a4f64981 10453else
eb697db5
DN
10454 ac_cv_lib_gpm_Gpm_Open=no
10455fi
10456rm -f core conftest.err conftest.$ac_objext \
10457 conftest$ac_exeext conftest.$ac_ext
10458LIBS=$ac_check_lib_save_LIBS
10459fi
10460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10461$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
10462if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
10463 HAVE_GPM=yes
10464fi
5929fbe7 10465
a4f64981 10466fi
5929fbe7 10467
eb697db5
DN
10468
10469
10470 if test "${HAVE_GPM}" = "yes"; then
10471
10472$as_echo "#define HAVE_GPM 1" >>confdefs.h
10473
10474 LIBGPM=-lgpm
10475 ## May be reset below.
10476 MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
10477 fi
a4f64981 10478fi
15e12598 10479
8c5ff6dd 10480
eb697db5
DN
10481ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
10482if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
8c5ff6dd 10483
eb697db5 10484$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
8c5ff6dd 10485
eb697db5 10486fi
298b8a34 10487
15e12598 10488
15e12598 10489
eb697db5
DN
10490C_SWITCH_X_SYSTEM=
10491### Use NeXTstep API to implement GUI.
10492if test "${HAVE_NS}" = "yes"; then
8c5ff6dd 10493
eb697db5 10494$as_echo "#define HAVE_NS 1" >>confdefs.h
8c5ff6dd 10495
eb697db5 10496 if test "${NS_IMPL_COCOA}" = "yes"; then
5929fbe7 10497
eb697db5 10498$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
8c5ff6dd 10499
eb697db5
DN
10500 GNU_OBJC_CFLAGS=
10501 fi
10502 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
8c5ff6dd 10503
eb697db5 10504$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
8c5ff6dd 10505
eb697db5
DN
10506 # See also .m.o rule in Makefile.in */
10507 # FIXME: are all these flags really needed? Document here why. */
10508 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
10509 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
10510 fi
10511 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
8c5ff6dd 10512
eb697db5 10513$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
8c5ff6dd 10514
eb697db5
DN
10515 fi
10516 # We also have mouse menus.
10517 HAVE_MENUS=yes
10518 OTHER_FILES=ns-app
10519fi
8c5ff6dd 10520
8c5ff6dd 10521
eb697db5
DN
10522### Use session management (-lSM -lICE) if available
10523HAVE_X_SM=no
10524LIBXSM=
10525if test "${HAVE_X11}" = "yes"; then
10526 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10527if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
10529$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
10530if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
10531 $as_echo_n "(cached) " >&6
10532else
10533 ac_check_lib_save_LIBS=$LIBS
10534LIBS="-lSM -lICE $LIBS"
10535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10536/* end confdefs.h. */
eb697db5
DN
10537
10538/* Override any GCC internal prototype to avoid an error.
10539 Use char because int might match the return type of a GCC
10540 builtin and then its argument prototype would still apply. */
10541#ifdef __cplusplus
10542extern "C"
10543#endif
10544char SmcOpenConnection ();
5929fbe7
GM
10545int
10546main ()
10547{
eb697db5 10548return SmcOpenConnection ();
5929fbe7
GM
10549 ;
10550 return 0;
10551}
10552_ACEOF
eb697db5
DN
10553if ac_fn_c_try_link "$LINENO"; then :
10554 ac_cv_lib_SM_SmcOpenConnection=yes
5929fbe7 10555else
eb697db5
DN
10556 ac_cv_lib_SM_SmcOpenConnection=no
10557fi
10558rm -f core conftest.err conftest.$ac_objext \
10559 conftest$ac_exeext conftest.$ac_ext
10560LIBS=$ac_check_lib_save_LIBS
10561fi
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
10563$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
10564if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
10565 HAVE_X_SM=yes
10566fi
8c5ff6dd 10567
5929fbe7 10568fi
8c5ff6dd 10569
eb697db5
DN
10570
10571
10572 if test "${HAVE_X_SM}" = "yes"; then
10573
10574$as_echo "#define HAVE_X_SM 1" >>confdefs.h
10575
10576 LIBXSM="-lSM -lICE"
10577 case "$LIBS" in
10578 *-lSM*) ;;
10579 *) LIBS="$LIBXSM $LIBS" ;;
10580 esac
10581 fi
10582fi
10583
10584
10585# If netdb.h doesn't declare h_errno, we must declare it by hand.
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
10587$as_echo_n "checking whether netdb declares h_errno... " >&6; }
10588if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
10589 $as_echo_n "(cached) " >&6
10590else
10591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10592/* end confdefs.h. */
eb697db5 10593#include <netdb.h>
5929fbe7
GM
10594int
10595main ()
10596{
eb697db5 10597return h_errno;
5929fbe7
GM
10598 ;
10599 return 0;
10600}
10601_ACEOF
eb697db5
DN
10602if ac_fn_c_try_link "$LINENO"; then :
10603 emacs_cv_netdb_declares_h_errno=yes
5929fbe7 10604else
eb697db5 10605 emacs_cv_netdb_declares_h_errno=no
5929fbe7 10606fi
eb697db5
DN
10607rm -f core conftest.err conftest.$ac_objext \
10608 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 10609fi
eb697db5
DN
10610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
10611$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
10612if test $emacs_cv_netdb_declares_h_errno = yes; then
8c5ff6dd 10613
eb697db5 10614$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
8c5ff6dd
KR
10615
10616fi
10617
eb697db5
DN
10618# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10619# for constant arguments. Useless!
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10621$as_echo_n "checking for working alloca.h... " >&6; }
10622if test "${ac_cv_working_alloca_h+set}" = set; then :
5929fbe7
GM
10623 $as_echo_n "(cached) " >&6
10624else
eb697db5 10625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10626/* end confdefs.h. */
eb697db5
DN
10627#include <alloca.h>
10628int
10629main ()
10630{
10631char *p = (char *) alloca (2 * sizeof (int));
10632 if (p) return 0;
10633 ;
10634 return 0;
10635}
10636_ACEOF
10637if ac_fn_c_try_link "$LINENO"; then :
10638 ac_cv_working_alloca_h=yes
10639else
10640 ac_cv_working_alloca_h=no
10641fi
10642rm -f core conftest.err conftest.$ac_objext \
10643 conftest$ac_exeext conftest.$ac_ext
10644fi
10645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10646$as_echo "$ac_cv_working_alloca_h" >&6; }
10647if test $ac_cv_working_alloca_h = yes; then
10648
10649$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10650
10651fi
10652
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10654$as_echo_n "checking for alloca... " >&6; }
10655if test "${ac_cv_func_alloca_works+set}" = set; then :
10656 $as_echo_n "(cached) " >&6
10657else
10658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10659/* end confdefs.h. */
10660#ifdef __GNUC__
10661# define alloca __builtin_alloca
10662#else
10663# ifdef _MSC_VER
10664# include <malloc.h>
10665# define alloca _alloca
10666# else
10667# ifdef HAVE_ALLOCA_H
10668# include <alloca.h>
10669# else
10670# ifdef _AIX
10671 #pragma alloca
10672# else
10673# ifndef alloca /* predefined by HP cc +Olibcalls */
10674char *alloca ();
10675# endif
10676# endif
10677# endif
10678# endif
5929fbe7 10679#endif
8c5ff6dd 10680
5929fbe7
GM
10681int
10682main ()
10683{
eb697db5
DN
10684char *p = (char *) alloca (1);
10685 if (p) return 0;
5929fbe7
GM
10686 ;
10687 return 0;
10688}
8c5ff6dd 10689_ACEOF
eb697db5
DN
10690if ac_fn_c_try_link "$LINENO"; then :
10691 ac_cv_func_alloca_works=yes
5929fbe7 10692else
eb697db5 10693 ac_cv_func_alloca_works=no
8c5ff6dd 10694fi
eb697db5
DN
10695rm -f core conftest.err conftest.$ac_objext \
10696 conftest$ac_exeext conftest.$ac_ext
5929fbe7 10697fi
eb697db5
DN
10698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10699$as_echo "$ac_cv_func_alloca_works" >&6; }
10700
10701if test $ac_cv_func_alloca_works = yes; then
10702
10703$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10704
8c5ff6dd 10705else
eb697db5
DN
10706 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10707# that cause trouble. Some versions do not even contain alloca or
10708# contain a buggy version. If you still want to use their alloca,
10709# use ar to extract alloca.o from them instead of compiling alloca.c.
10710
10711ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10712
10713$as_echo "#define C_ALLOCA 1" >>confdefs.h
10714
10715
10716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10717$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10718if test "${ac_cv_os_cray+set}" = set; then :
5929fbe7 10719 $as_echo_n "(cached) " >&6
8c5ff6dd 10720else
eb697db5 10721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10722/* end confdefs.h. */
eb697db5
DN
10723#if defined CRAY && ! defined CRAY2
10724webecray
8c5ff6dd 10725#else
eb697db5 10726wenotbecray
8c5ff6dd
KR
10727#endif
10728
eb697db5
DN
10729_ACEOF
10730if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10731 $EGREP "webecray" >/dev/null 2>&1; then :
10732 ac_cv_os_cray=yes
10733else
10734 ac_cv_os_cray=no
10735fi
10736rm -f conftest*
8c5ff6dd 10737
eb697db5
DN
10738fi
10739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10740$as_echo "$ac_cv_os_cray" >&6; }
10741if test $ac_cv_os_cray = yes; then
10742 for ac_func in _getb67 GETB67 getb67; do
10743 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10744ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10745eval as_val=\$$as_ac_var
10746 if test "x$as_val" = x""yes; then :
15e12598 10747
eb697db5
DN
10748cat >>confdefs.h <<_ACEOF
10749#define CRAY_STACKSEG_END $ac_func
5929fbe7 10750_ACEOF
15e12598 10751
eb697db5 10752 break
5929fbe7 10753fi
15e12598 10754
eb697db5 10755 done
5929fbe7 10756fi
eb697db5
DN
10757
10758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10759$as_echo_n "checking stack direction for C alloca... " >&6; }
10760if test "${ac_cv_c_stack_direction+set}" = set; then :
5929fbe7
GM
10761 $as_echo_n "(cached) " >&6
10762else
eb697db5
DN
10763 if test "$cross_compiling" = yes; then :
10764 ac_cv_c_stack_direction=0
10765else
10766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10767/* end confdefs.h. */
eb697db5
DN
10768$ac_includes_default
10769int
10770find_stack_direction ()
10771{
10772 static char *addr = 0;
10773 auto char dummy;
10774 if (addr == 0)
10775 {
10776 addr = &dummy;
10777 return find_stack_direction ();
10778 }
10779 else
10780 return (&dummy > addr) ? 1 : -1;
10781}
15e12598 10782
5929fbe7
GM
10783int
10784main ()
a4f64981 10785{
eb697db5 10786 return find_stack_direction () < 0;
7186fb09 10787}
5929fbe7 10788_ACEOF
eb697db5
DN
10789if ac_fn_c_try_run "$LINENO"; then :
10790 ac_cv_c_stack_direction=1
5929fbe7 10791else
eb697db5
DN
10792 ac_cv_c_stack_direction=-1
10793fi
10794rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10795 conftest.$ac_objext conftest.beam conftest.$ac_ext
10796fi
49ebbd65 10797
5929fbe7 10798fi
eb697db5
DN
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10800$as_echo "$ac_cv_c_stack_direction" >&6; }
10801cat >>confdefs.h <<_ACEOF
10802#define STACK_DIRECTION $ac_cv_c_stack_direction
10803_ACEOF
10804
15e12598 10805
5929fbe7 10806fi
eb697db5
DN
10807
10808
10809if test x"$ac_cv_func_alloca_works" != xyes; then
10810 as_fn_error "a system implementation of alloca is required " "$LINENO" 5
10811fi
10812
10813# fmod, logb, and frexp are found in -lm on most systems.
10814# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
10816$as_echo_n "checking for sqrt in -lm... " >&6; }
10817if test "${ac_cv_lib_m_sqrt+set}" = set; then :
5929fbe7
GM
10818 $as_echo_n "(cached) " >&6
10819else
10820 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10821LIBS="-lm $LIBS"
10822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10823/* end confdefs.h. */
e6df49e4 10824
5929fbe7
GM
10825/* Override any GCC internal prototype to avoid an error.
10826 Use char because int might match the return type of a GCC
10827 builtin and then its argument prototype would still apply. */
10828#ifdef __cplusplus
10829extern "C"
10830#endif
eb697db5 10831char sqrt ();
a4f64981
GM
10832int
10833main ()
10834{
eb697db5 10835return sqrt ();
5929fbe7
GM
10836 ;
10837 return 0;
a4f64981 10838}
e6df49e4 10839_ACEOF
eb697db5
DN
10840if ac_fn_c_try_link "$LINENO"; then :
10841 ac_cv_lib_m_sqrt=yes
a4f64981 10842else
eb697db5 10843 ac_cv_lib_m_sqrt=no
8c5ff6dd 10844fi
eb697db5
DN
10845rm -f core conftest.err conftest.$ac_objext \
10846 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
10847LIBS=$ac_check_lib_save_LIBS
10848fi
eb697db5
DN
10849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
10850$as_echo "$ac_cv_lib_m_sqrt" >&6; }
10851if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
10852 cat >>confdefs.h <<_ACEOF
10853#define HAVE_LIBM 1
10854_ACEOF
15e12598 10855
eb697db5 10856 LIBS="-lm $LIBS"
8c5ff6dd 10857
5929fbe7 10858fi
8c5ff6dd 10859
8c5ff6dd 10860
eb697db5
DN
10861# Check for mail-locking functions in a "mail" library. Probably this should
10862# have the same check as for liblockfile below.
10863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
10864$as_echo_n "checking for maillock in -lmail... " >&6; }
10865if test "${ac_cv_lib_mail_maillock+set}" = set; then :
5929fbe7
GM
10866 $as_echo_n "(cached) " >&6
10867else
eb697db5
DN
10868 ac_check_lib_save_LIBS=$LIBS
10869LIBS="-lmail $LIBS"
10870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10871/* end confdefs.h. */
15e12598 10872
5929fbe7
GM
10873/* Override any GCC internal prototype to avoid an error.
10874 Use char because int might match the return type of a GCC
10875 builtin and then its argument prototype would still apply. */
10876#ifdef __cplusplus
10877extern "C"
10878#endif
eb697db5 10879char maillock ();
5929fbe7
GM
10880int
10881main ()
10882{
eb697db5 10883return maillock ();
5929fbe7
GM
10884 ;
10885 return 0;
10886}
a4f64981 10887_ACEOF
eb697db5
DN
10888if ac_fn_c_try_link "$LINENO"; then :
10889 ac_cv_lib_mail_maillock=yes
5929fbe7 10890else
eb697db5 10891 ac_cv_lib_mail_maillock=no
8c5ff6dd 10892fi
eb697db5
DN
10893rm -f core conftest.err conftest.$ac_objext \
10894 conftest$ac_exeext conftest.$ac_ext
10895LIBS=$ac_check_lib_save_LIBS
5929fbe7 10896fi
eb697db5
DN
10897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
10898$as_echo "$ac_cv_lib_mail_maillock" >&6; }
10899if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
10900 have_mail=yes
5929fbe7 10901else
eb697db5
DN
10902 have_mail=no
10903fi
10904
10905if test $have_mail = yes; then
10906 LIBS_MAIL=-lmail
10907 LIBS="$LIBS_MAIL $LIBS"
10908
10909$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
10910
10911else
10912 LIBS_MAIL=
10913fi
10914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
10915$as_echo_n "checking for maillock in -llockfile... " >&6; }
10916if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
e9a63f04 10917 $as_echo_n "(cached) " >&6
98418dba 10918else
0ca10bb7 10919 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10920LIBS="-llockfile $LIBS"
10921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10922/* end confdefs.h. */
ca81d7a0 10923
0ca10bb7
RC
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 maillock ();
0ca10bb7
RC
10931int
10932main ()
10933{
eb697db5 10934return maillock ();
0ca10bb7
RC
10935 ;
10936 return 0;
10937}
503d2be0 10938_ACEOF
eb697db5
DN
10939if ac_fn_c_try_link "$LINENO"; then :
10940 ac_cv_lib_lockfile_maillock=yes
503d2be0 10941else
eb697db5 10942 ac_cv_lib_lockfile_maillock=no
a21616bd 10943fi
eb697db5
DN
10944rm -f core conftest.err conftest.$ac_objext \
10945 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
10946LIBS=$ac_check_lib_save_LIBS
10947fi
eb697db5
DN
10948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
10949$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
10950if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
10951 have_lockfile=yes
5929fbe7 10952else
eb697db5
DN
10953 have_lockfile=no
10954fi
10955
10956if test $have_lockfile = yes; then
10957 LIBS_MAIL=-llockfile
10958 LIBS="$LIBS_MAIL $LIBS"
10959
10960$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
10961
10962else
10963# If we have the shared liblockfile, assume we must use it for mail
10964# locking (e.g. Debian). If we couldn't link against liblockfile
10965# (no liblockfile.a installed), ensure that we don't need to.
10966 # Extract the first word of "liblockfile.so", so it can be a program name with args.
10967set dummy liblockfile.so; ac_word=$2
10968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10969$as_echo_n "checking for $ac_word... " >&6; }
10970if test "${ac_cv_prog_liblockfile+set}" = set; then :
10971 $as_echo_n "(cached) " >&6
10972else
10973 if test -n "$liblockfile"; then
10974 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
10975else
10976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10977as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
10978for as_dir in $as_dummy
10979do
10980 IFS=$as_save_IFS
10981 test -z "$as_dir" && as_dir=.
10982 for ac_exec_ext in '' $ac_executable_extensions; do
10983 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10984 ac_cv_prog_liblockfile="yes"
10985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10986 break 2
10987 fi
10988done
10989 done
10990IFS=$as_save_IFS
10991
10992 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
10993fi
10994fi
10995liblockfile=$ac_cv_prog_liblockfile
10996if test -n "$liblockfile"; then
10997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
10998$as_echo "$liblockfile" >&6; }
10999else
11000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11001$as_echo "no" >&6; }
11002fi
11003
11004
11005 if test $ac_cv_prog_liblockfile = yes; then
11006 as_fn_error "Shared liblockfile found but can't link against it.
11007This probably means that movemail could lose mail.
11008There may be a \`development' package to install containing liblockfile." "$LINENO" 5
11009 fi
11010fi
11011for ac_func in touchlock
11012do :
11013 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
11014if test "x$ac_cv_func_touchlock" = x""yes; then :
11015 cat >>confdefs.h <<_ACEOF
11016#define HAVE_TOUCHLOCK 1
11017_ACEOF
11018
11019fi
11020done
11021
11022for ac_header in maillock.h
11023do :
11024 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
11025if test "x$ac_cv_header_maillock_h" = x""yes; then :
11026 cat >>confdefs.h <<_ACEOF
11027#define HAVE_MAILLOCK_H 1
11028_ACEOF
11029
11030fi
11031
11032done
11033
11034
11035
11036## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
11037## interlock access to the mail spool. The alternative is a lock file named
11038## /usr/spool/mail/$USER.lock.
11039mail_lock=no
11040case "$opsys" in
11041 aix4-2) mail_lock="lockf" ;;
11042
11043 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
11044
11045 ## On GNU/Linux systems, both methods are used by various mail programs.
11046 ## I assume most people are using newer mailers that have heard of flock.
11047 ## Change this if you need to.
11048 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
11049 ## configure gets the right answers, and that means *NOT* using flock.
11050 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
11051 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
11052 ## Debian maintainer hasn't provided a clean fix for Emacs.
11053 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
11054 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
11055 ## correct logic. -- fx
11056 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
11057 ## liblockfile is a Free Software replacement for libmail, used on
11058 ## Debian systems and elsewhere. -rfr.
11059 gnu-*)
11060 mail_lock="flock"
11061 if test $have_mail = yes || test $have_lockfile = yes; then
11062 test $ac_cv_header_maillock_h = yes && mail_lock=no
11063 fi
11064 ;;
11065esac
11066
11067BLESSMAIL_TARGET=
11068case "$mail_lock" in
11069 flock)
11070$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
11071 ;;
11072
11073 lockf)
11074$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
11075 ;;
11076
11077 *) BLESSMAIL_TARGET="need-blessmail" ;;
11078esac
11079
11080
11081
11082for ac_func in gethostname getdomainname dup2 \
11083rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
11084random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
11085strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11086utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
11087__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
11088sendto recvfrom getsockopt setsockopt getsockname getpeername \
11089gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
11090memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
11091cfmakeraw cfsetspeed isnan copysign
11092do :
11093 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11094ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11095eval as_val=\$$as_ac_var
11096 if test "x$as_val" = x""yes; then :
11097 cat >>confdefs.h <<_ACEOF
11098#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11099_ACEOF
11100
11101fi
11102done
11103
11104
11105for ac_header in sys/un.h
11106do :
11107 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
11108if test "x$ac_cv_header_sys_un_h" = x""yes; then :
11109 cat >>confdefs.h <<_ACEOF
11110#define HAVE_SYS_UN_H 1
11111_ACEOF
11112
11113fi
11114
11115done
11116
11117
11118
11119
11120
11121
11122
11123 for ac_func in $ac_func_list
11124do :
11125 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11126ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11127eval as_val=\$$as_ac_var
11128 if test "x$as_val" = x""yes; then :
11129 cat >>confdefs.h <<_ACEOF
11130#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11131_ACEOF
11132
5929fbe7 11133fi
eb697db5
DN
11134done
11135
11136
11137
11138
11139
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
11141$as_echo_n "checking for working mktime... " >&6; }
11142if test "${ac_cv_func_working_mktime+set}" = set; then :
11143 $as_echo_n "(cached) " >&6
11144else
11145 if test "$cross_compiling" = yes; then :
11146 ac_cv_func_working_mktime=no
11147else
11148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11149/* end confdefs.h. */
11150/* Test program from Paul Eggert and Tony Leneis. */
11151#ifdef TIME_WITH_SYS_TIME
11152# include <sys/time.h>
11153# include <time.h>
11154#else
11155# ifdef HAVE_SYS_TIME_H
11156# include <sys/time.h>
11157# else
11158# include <time.h>
11159# endif
11160#endif
11161
11162#include <limits.h>
11163#include <stdlib.h>
11164
11165#ifdef HAVE_UNISTD_H
11166# include <unistd.h>
11167#endif
11168
11169#ifndef HAVE_ALARM
11170# define alarm(X) /* empty */
11171#endif
11172
11173/* Work around redefinition to rpl_putenv by other config tests. */
11174#undef putenv
11175
11176static time_t time_t_max;
11177static time_t time_t_min;
11178
11179/* Values we'll use to set the TZ environment variable. */
11180static char *tz_strings[] = {
11181 (char *) 0, "TZ=GMT0", "TZ=JST-9",
11182 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11183};
11184#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5929fbe7 11185
eb697db5
DN
11186/* Return 0 if mktime fails to convert a date in the spring-forward gap.
11187 Based on a problem report from Andreas Jaeger. */
11188static int
11189spring_forward_gap ()
11190{
11191 /* glibc (up to about 1998-10-07) failed this test. */
11192 struct tm tm;
5929fbe7 11193
eb697db5
DN
11194 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11195 instead of "TZ=America/Vancouver" in order to detect the bug even
11196 on systems that don't support the Olson extension, or don't have the
11197 full zoneinfo tables installed. */
11198 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
5929fbe7 11199
eb697db5
DN
11200 tm.tm_year = 98;
11201 tm.tm_mon = 3;
11202 tm.tm_mday = 5;
11203 tm.tm_hour = 2;
11204 tm.tm_min = 0;
11205 tm.tm_sec = 0;
11206 tm.tm_isdst = -1;
11207 return mktime (&tm) != (time_t) -1;
11208}
5929fbe7 11209
eb697db5
DN
11210static int
11211mktime_test1 (now)
11212 time_t now;
11213{
11214 struct tm *lt;
11215 return ! (lt = localtime (&now)) || mktime (lt) == now;
11216}
e6df49e4 11217
eb697db5
DN
11218static int
11219mktime_test (now)
11220 time_t now;
11221{
11222 return (mktime_test1 (now)
11223 && mktime_test1 ((time_t) (time_t_max - now))
11224 && mktime_test1 ((time_t) (time_t_min + now)));
11225}
5929fbe7 11226
eb697db5
DN
11227static int
11228irix_6_4_bug ()
11229{
11230 /* Based on code from Ariel Faigon. */
11231 struct tm tm;
11232 tm.tm_year = 96;
11233 tm.tm_mon = 3;
11234 tm.tm_mday = 0;
11235 tm.tm_hour = 0;
11236 tm.tm_min = 0;
11237 tm.tm_sec = 0;
11238 tm.tm_isdst = -1;
11239 mktime (&tm);
11240 return tm.tm_mon == 2 && tm.tm_mday == 31;
11241}
5929fbe7 11242
eb697db5
DN
11243static int
11244bigtime_test (j)
11245 int j;
11246{
11247 struct tm tm;
11248 time_t now;
11249 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11250 now = mktime (&tm);
11251 if (now != (time_t) -1)
11252 {
11253 struct tm *lt = localtime (&now);
11254 if (! (lt
11255 && lt->tm_year == tm.tm_year
11256 && lt->tm_mon == tm.tm_mon
11257 && lt->tm_mday == tm.tm_mday
11258 && lt->tm_hour == tm.tm_hour
11259 && lt->tm_min == tm.tm_min
11260 && lt->tm_sec == tm.tm_sec
11261 && lt->tm_yday == tm.tm_yday
11262 && lt->tm_wday == tm.tm_wday
11263 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11264 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11265 return 0;
11266 }
11267 return 1;
11268}
5929fbe7 11269
eb697db5
DN
11270static int
11271year_2050_test ()
11272{
11273 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
11274 ignoring leap seconds. */
11275 unsigned long int answer = 2527315200UL;
15e12598 11276
eb697db5
DN
11277 struct tm tm;
11278 time_t t;
11279 tm.tm_year = 2050 - 1900;
11280 tm.tm_mon = 2 - 1;
11281 tm.tm_mday = 1;
11282 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
11283 tm.tm_isdst = -1;
a4f64981 11284
eb697db5
DN
11285 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11286 instead of "TZ=America/Vancouver" in order to detect the bug even
11287 on systems that don't support the Olson extension, or don't have the
11288 full zoneinfo tables installed. */
11289 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8c5ff6dd 11290
eb697db5 11291 t = mktime (&tm);
5929fbe7 11292
eb697db5
DN
11293 /* Check that the result is either a failure, or close enough
11294 to the correct answer that we can assume the discrepancy is
11295 due to leap seconds. */
11296 return (t == (time_t) -1
11297 || (0 < t && answer - 120 <= t && t <= answer + 120));
11298}
21287a21
CY
11299
11300int
11301main ()
11302{
eb697db5
DN
11303 time_t t, delta;
11304 int i, j;
5929fbe7 11305
eb697db5
DN
11306 /* This test makes some buggy mktime implementations loop.
11307 Give up after 60 seconds; a mktime slower than that
11308 isn't worth using anyway. */
11309 alarm (60);
bf89cb4d 11310
eb697db5
DN
11311 for (;;)
11312 {
11313 t = (time_t_max << 1) + 1;
11314 if (t <= time_t_max)
11315 break;
11316 time_t_max = t;
11317 }
11318 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
5929fbe7 11319
eb697db5
DN
11320 delta = time_t_max / 997; /* a suitable prime number */
11321 for (i = 0; i < N_STRINGS; i++)
11322 {
11323 if (tz_strings[i])
11324 putenv (tz_strings[i]);
5929fbe7 11325
eb697db5
DN
11326 for (t = 0; t <= time_t_max - delta; t += delta)
11327 if (! mktime_test (t))
11328 return 1;
11329 if (! (mktime_test ((time_t) 1)
11330 && mktime_test ((time_t) (60 * 60))
11331 && mktime_test ((time_t) (60 * 60 * 24))))
11332 return 1;
21287a21 11333
eb697db5
DN
11334 for (j = 1; ; j <<= 1)
11335 if (! bigtime_test (j))
11336 return 1;
11337 else if (INT_MAX / 2 < j)
11338 break;
11339 if (! bigtime_test (INT_MAX))
11340 return 1;
11341 }
11342 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
9452ded1
DN
11343}
11344_ACEOF
eb697db5
DN
11345if ac_fn_c_try_run "$LINENO"; then :
11346 ac_cv_func_working_mktime=yes
21287a21 11347else
eb697db5
DN
11348 ac_cv_func_working_mktime=no
11349fi
11350rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11351 conftest.$ac_objext conftest.beam conftest.$ac_ext
11352fi
11353
11354fi
11355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
11356$as_echo "$ac_cv_func_working_mktime" >&6; }
11357if test $ac_cv_func_working_mktime = no; then
11358 case " $LIBOBJS " in
11359 *" mktime.$ac_objext "* ) ;;
11360 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
11361 ;;
11362esac
11363
11364fi
11365
11366if test "$ac_cv_func_working_mktime" = no; then
5929fbe7 11367
eb697db5 11368$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
5929fbe7 11369
21287a21 11370fi
eb697db5
DN
11371
11372ac_have_func=no # yes means we've found a way to get the load average.
11373
11374# Make sure getloadavg.c is where it belongs, at configure-time.
11375test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
11376 as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
11377
11378ac_save_LIBS=$LIBS
11379
11380# Check for getloadavg, but be sure not to touch the cache variable.
11381(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11382if test "x$ac_cv_func_getloadavg" = x""yes; then :
11383 exit 0
5929fbe7 11384else
eb697db5 11385 exit 1
21287a21 11386fi
eb697db5 11387) && ac_have_func=yes
21287a21 11388
eb697db5
DN
11389# On HPUX9, an unprivileged user can get load averages through this function.
11390for ac_func in pstat_getdynamic
11391do :
11392 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
11393if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
11394 cat >>confdefs.h <<_ACEOF
11395#define HAVE_PSTAT_GETDYNAMIC 1
5929fbe7
GM
11396_ACEOF
11397
eb697db5
DN
11398fi
11399done
11400
11401
11402# Solaris has libkstat which does not require root.
11403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
11404$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
11405if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
e9a63f04 11406 $as_echo_n "(cached) " >&6
21287a21 11407else
0ca10bb7 11408 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11409LIBS="-lkstat $LIBS"
11410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11411/* end confdefs.h. */
21287a21 11412
0ca10bb7
RC
11413/* Override any GCC internal prototype to avoid an error.
11414 Use char because int might match the return type of a GCC
11415 builtin and then its argument prototype would still apply. */
11416#ifdef __cplusplus
11417extern "C"
15e12598 11418#endif
eb697db5 11419char kstat_open ();
15e12598
VB
11420int
11421main ()
11422{
eb697db5 11423return kstat_open ();
15e12598
VB
11424 ;
11425 return 0;
11426}
11427_ACEOF
eb697db5
DN
11428if ac_fn_c_try_link "$LINENO"; then :
11429 ac_cv_lib_kstat_kstat_open=yes
0ca10bb7 11430else
eb697db5 11431 ac_cv_lib_kstat_kstat_open=no
0ca10bb7 11432fi
eb697db5
DN
11433rm -f core conftest.err conftest.$ac_objext \
11434 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
11435LIBS=$ac_check_lib_save_LIBS
11436fi
eb697db5
DN
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
11438$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
11439if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
11440 cat >>confdefs.h <<_ACEOF
11441#define HAVE_LIBKSTAT 1
11442_ACEOF
6da23aaa 11443
eb697db5 11444 LIBS="-lkstat $LIBS"
a4f64981 11445
eb697db5 11446fi
5929fbe7 11447
eb697db5
DN
11448test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
11449
11450# Some systems with -lutil have (and need) -lkvm as well, some do not.
11451# On Solaris, -lkvm requires nlist from -lelf, so check that first
11452# to get the right answer into the cache.
11453# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11454if test $ac_have_func = no; then
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
11456$as_echo_n "checking for elf_begin in -lelf... " >&6; }
11457if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
0ca10bb7
RC
11458 $as_echo_n "(cached) " >&6
11459else
11460 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11461LIBS="-lelf $LIBS"
11462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11463/* end confdefs.h. */
21287a21 11464
0ca10bb7
RC
11465/* Override any GCC internal prototype to avoid an error.
11466 Use char because int might match the return type of a GCC
11467 builtin and then its argument prototype would still apply. */
11468#ifdef __cplusplus
11469extern "C"
11470#endif
eb697db5 11471char elf_begin ();
21287a21
CY
11472int
11473main ()
11474{
eb697db5 11475return elf_begin ();
21287a21
CY
11476 ;
11477 return 0;
11478}
11479_ACEOF
eb697db5
DN
11480if ac_fn_c_try_link "$LINENO"; then :
11481 ac_cv_lib_elf_elf_begin=yes
bf89cb4d 11482else
eb697db5 11483 ac_cv_lib_elf_elf_begin=no
0c309b80 11484fi
eb697db5
DN
11485rm -f core conftest.err conftest.$ac_objext \
11486 conftest$ac_exeext conftest.$ac_ext
7186fb09 11487LIBS=$ac_check_lib_save_LIBS
9452ded1 11488fi
eb697db5
DN
11489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
11490$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
11491if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
11492 LIBS="-lelf $LIBS"
8c5ff6dd
KR
11493fi
11494
eb697db5
DN
11495fi
11496if test $ac_have_func = no; then
11497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
11498$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
11499if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
7186fb09
GM
11500 $as_echo_n "(cached) " >&6
11501else
aaa36002 11502 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11503LIBS="-lkvm $LIBS"
11504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11505/* end confdefs.h. */
7186fb09 11506
aaa36002
DN
11507/* Override any GCC internal prototype to avoid an error.
11508 Use char because int might match the return type of a GCC
11509 builtin and then its argument prototype would still apply. */
11510#ifdef __cplusplus
11511extern "C"
11512#endif
eb697db5 11513char kvm_open ();
8732a4e9
MB
11514int
11515main ()
11516{
eb697db5 11517return kvm_open ();
0c309b80
GM
11518 ;
11519 return 0;
11520}
11521_ACEOF
eb697db5
DN
11522if ac_fn_c_try_link "$LINENO"; then :
11523 ac_cv_lib_kvm_kvm_open=yes
7186fb09 11524else
eb697db5 11525 ac_cv_lib_kvm_kvm_open=no
cd03c74a 11526fi
eb697db5
DN
11527rm -f core conftest.err conftest.$ac_objext \
11528 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11529LIBS=$ac_check_lib_save_LIBS
a4f64981 11530fi
eb697db5
DN
11531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
11532$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
11533if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
11534 LIBS="-lkvm $LIBS"
8c5ff6dd 11535fi
8c5ff6dd 11536
eb697db5
DN
11537 # Check for the 4.4BSD definition of getloadavg.
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
11539$as_echo_n "checking for getloadavg in -lutil... " >&6; }
11540if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
5929fbe7 11541 $as_echo_n "(cached) " >&6
8c5ff6dd 11542else
5929fbe7 11543 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11544LIBS="-lutil $LIBS"
11545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11546/* end confdefs.h. */
8c5ff6dd 11547
5929fbe7
GM
11548/* Override any GCC internal prototype to avoid an error.
11549 Use char because int might match the return type of a GCC
11550 builtin and then its argument prototype would still apply. */
11551#ifdef __cplusplus
11552extern "C"
11553#endif
eb697db5 11554char getloadavg ();
5929fbe7
GM
11555int
11556main ()
11557{
eb697db5 11558return getloadavg ();
5929fbe7
GM
11559 ;
11560 return 0;
11561}
11562_ACEOF
eb697db5
DN
11563if ac_fn_c_try_link "$LINENO"; then :
11564 ac_cv_lib_util_getloadavg=yes
49ebbd65 11565else
eb697db5 11566 ac_cv_lib_util_getloadavg=no
8c5ff6dd 11567fi
eb697db5
DN
11568rm -f core conftest.err conftest.$ac_objext \
11569 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11570LIBS=$ac_check_lib_save_LIBS
8c5ff6dd 11571fi
eb697db5
DN
11572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
11573$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
11574if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
11575 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8c5ff6dd 11576fi
8c5ff6dd 11577
eb697db5 11578fi
8c5ff6dd 11579
eb697db5
DN
11580if test $ac_have_func = no; then
11581 # There is a commonly available library for RS/6000 AIX.
11582 # Since it is not a standard part of AIX, it might be installed locally.
11583 ac_getloadavg_LIBS=$LIBS
11584 LIBS="-L/usr/local/lib $LIBS"
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
11586$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
11587if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
8c5ff6dd
KR
11588 $as_echo_n "(cached) " >&6
11589else
5929fbe7 11590 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11591LIBS="-lgetloadavg $LIBS"
11592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 11593/* end confdefs.h. */
5929fbe7
GM
11594
11595/* Override any GCC internal prototype to avoid an error.
11596 Use char because int might match the return type of a GCC
11597 builtin and then its argument prototype would still apply. */
11598#ifdef __cplusplus
11599extern "C"
11600#endif
eb697db5 11601char getloadavg ();
8c5ff6dd
KR
11602int
11603main ()
11604{
eb697db5 11605return getloadavg ();
8c5ff6dd
KR
11606 ;
11607 return 0;
11608}
a4f64981 11609_ACEOF
eb697db5
DN
11610if ac_fn_c_try_link "$LINENO"; then :
11611 ac_cv_lib_getloadavg_getloadavg=yes
5929fbe7 11612else
eb697db5 11613 ac_cv_lib_getloadavg_getloadavg=no
5929fbe7 11614fi
eb697db5
DN
11615rm -f core conftest.err conftest.$ac_objext \
11616 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11617LIBS=$ac_check_lib_save_LIBS
8c5ff6dd 11618fi
eb697db5
DN
11619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
11620$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
11621if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
11622 LIBS="-lgetloadavg $LIBS"
5929fbe7 11623else
eb697db5 11624 LIBS=$ac_getloadavg_LIBS
5929fbe7
GM
11625fi
11626
eb697db5 11627fi
5929fbe7 11628
eb697db5
DN
11629# Make sure it is really in the library, if we think we found it,
11630# otherwise set up the replacement function.
11631for ac_func in getloadavg
11632do :
11633 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11634if test "x$ac_cv_func_getloadavg" = x""yes; then :
11635 cat >>confdefs.h <<_ACEOF
11636#define HAVE_GETLOADAVG 1
5929fbe7
GM
11637_ACEOF
11638
eb697db5
DN
11639else
11640 case " $LIBOBJS " in
11641 *" getloadavg.$ac_objext "* ) ;;
11642 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
11643 ;;
11644esac
11645
11646
11647$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
11648
11649# Figure out what our getloadavg.c needs.
11650ac_have_func=no
11651ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
11652if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
11653 ac_have_func=yes
11654
11655$as_echo "#define DGUX 1" >>confdefs.h
11656
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
11658$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
11659if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
5929fbe7
GM
11660 $as_echo_n "(cached) " >&6
11661else
11662 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11663LIBS="-ldgc $LIBS"
11664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 11665/* end confdefs.h. */
5929fbe7
GM
11666
11667/* Override any GCC internal prototype to avoid an error.
11668 Use char because int might match the return type of a GCC
11669 builtin and then its argument prototype would still apply. */
11670#ifdef __cplusplus
11671extern "C"
11672#endif
eb697db5 11673char dg_sys_info ();
a4f64981
GM
11674int
11675main ()
11676{
eb697db5 11677return dg_sys_info ();
15e12598
VB
11678 ;
11679 return 0;
11680}
e6df49e4 11681_ACEOF
eb697db5
DN
11682if ac_fn_c_try_link "$LINENO"; then :
11683 ac_cv_lib_dgc_dg_sys_info=yes
5929fbe7 11684else
eb697db5 11685 ac_cv_lib_dgc_dg_sys_info=no
49ebbd65 11686fi
eb697db5
DN
11687rm -f core conftest.err conftest.$ac_objext \
11688 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
11689LIBS=$ac_check_lib_save_LIBS
11690fi
eb697db5
DN
11691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
11692$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
11693if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
11694 cat >>confdefs.h <<_ACEOF
11695#define HAVE_LIBDGC 1
11696_ACEOF
11697
11698 LIBS="-ldgc $LIBS"
11699
5929fbe7 11700fi
a5edbe4a 11701
eb697db5 11702fi
49ebbd65
DN
11703
11704
15e12598 11705
eb697db5
DN
11706ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11707if test "x$ac_cv_header_locale_h" = x""yes; then :
a4f64981 11708
5929fbe7 11709fi
eb697db5
DN
11710
11711
11712for ac_func in setlocale
11713do :
11714 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
11715if test "x$ac_cv_func_setlocale" = x""yes; then :
11716 cat >>confdefs.h <<_ACEOF
11717#define HAVE_SETLOCALE 1
5929fbe7 11718_ACEOF
a4f64981 11719
5929fbe7 11720fi
eb697db5 11721done
a4f64981 11722
a4f64981 11723
eb697db5
DN
11724# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
11725# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
11726# Irix 4.0.5F has the header but not the library.
11727if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
11728 ac_have_func=yes
11729
11730$as_echo "#define SVR4 1" >>confdefs.h
cd03c74a 11731
5929fbe7 11732fi
8c5ff6dd 11733
eb697db5
DN
11734if test $ac_have_func = no; then
11735 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
11736if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
11737 ac_have_func=yes
8c5ff6dd 11738
eb697db5
DN
11739$as_echo "#define UMAX 1" >>confdefs.h
11740
11741
11742$as_echo "#define UMAX4_3 1" >>confdefs.h
8c5ff6dd 11743
5929fbe7 11744fi
eb697db5
DN
11745
11746
11747fi
11748
11749if test $ac_have_func = no; then
11750 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
11751if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
11752 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
11753
11754fi
11755
8c5ff6dd 11756
5929fbe7 11757fi
eb697db5
DN
11758
11759if test $ac_have_func = no; then
11760 for ac_header in mach/mach.h
11761do :
11762 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
11763if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
8c5ff6dd 11764 cat >>confdefs.h <<_ACEOF
eb697db5 11765#define HAVE_MACH_MACH_H 1
5929fbe7 11766_ACEOF
e6df49e4 11767
eb697db5
DN
11768fi
11769
11770done
8c5ff6dd 11771
eb697db5
DN
11772fi
11773
11774for ac_header in nlist.h
11775do :
11776 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
11777if test "x$ac_cv_header_nlist_h" = x""yes; then :
11778 cat >>confdefs.h <<_ACEOF
11779#define HAVE_NLIST_H 1
a4f64981 11780_ACEOF
eb697db5
DN
11781 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
11782"
11783if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
cd03c74a 11784
eb697db5
DN
11785cat >>confdefs.h <<_ACEOF
11786#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
5929fbe7 11787_ACEOF
5929fbe7 11788
eb697db5
DN
11789
11790$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
11791
8c5ff6dd 11792fi
49ebbd65 11793
eb697db5 11794
5929fbe7 11795fi
8c5ff6dd 11796
eb697db5
DN
11797done
11798
8c5ff6dd 11799fi
eb697db5 11800done
8c5ff6dd 11801
eb697db5
DN
11802
11803# Some definitions of getloadavg require that the program be installed setgid.
11804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
11805$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
11806if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
11807 $as_echo_n "(cached) " >&6
11808else
11809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11810/* end confdefs.h. */
11811#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
11812#ifdef LDAV_PRIVILEGED
11813Yowza Am I SETGID yet
11814#endif
5929fbe7 11815_ACEOF
eb697db5
DN
11816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11817 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
11818 ac_cv_func_getloadavg_setgid=yes
11819else
11820 ac_cv_func_getloadavg_setgid=no
11821fi
11822rm -f conftest*
11823
11824fi
11825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
11826$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
11827if test $ac_cv_func_getloadavg_setgid = yes; then
11828 NEED_SETGID=true
8c5ff6dd 11829
eb697db5 11830$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
8c5ff6dd 11831
eb697db5
DN
11832else
11833 NEED_SETGID=false
5929fbe7 11834fi
eb697db5
DN
11835
11836if test $ac_cv_func_getloadavg_setgid = yes; then
11837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
11838$as_echo_n "checking group of /dev/kmem... " >&6; }
11839if test "${ac_cv_group_kmem+set}" = set; then :
5929fbe7 11840 $as_echo_n "(cached) " >&6
a5edbe4a 11841else
eb697db5
DN
11842 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
11843 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
11844 # If we got an error (system does not support symlinks), try without -L.
11845 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
11846 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
11847 | sed -ne 's/[ ][ ]*/ /g;
11848 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
11849 / /s/.* //;p;'`
11850
11851fi
11852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
11853$as_echo "$ac_cv_group_kmem" >&6; }
11854 KMEM_GROUP=$ac_cv_group_kmem
11855fi
11856if test "x$ac_save_LIBS" = x; then
11857 GETLOADAVG_LIBS=$LIBS
11858else
11859 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
11860fi
11861LIBS=$ac_save_LIBS
11862
11863
5929fbe7 11864
eb697db5
DN
11865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11866$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11867if test "${ac_cv_sys_largefile_source+set}" = set; then :
11868 $as_echo_n "(cached) " >&6
11869else
11870 while :; do
11871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11872/* end confdefs.h. */
11873#include <sys/types.h> /* for off_t */
11874 #include <stdio.h>
8c5ff6dd
KR
11875int
11876main ()
11877{
eb697db5
DN
11878int (*fp) (FILE *, off_t, int) = fseeko;
11879 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5929fbe7
GM
11880 ;
11881 return 0;
11882}
11883_ACEOF
eb697db5
DN
11884if ac_fn_c_try_link "$LINENO"; then :
11885 ac_cv_sys_largefile_source=no; break
11886fi
11887rm -f core conftest.err conftest.$ac_objext \
11888 conftest$ac_exeext conftest.$ac_ext
11889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11890/* end confdefs.h. */
eb697db5
DN
11891#define _LARGEFILE_SOURCE 1
11892#include <sys/types.h> /* for off_t */
11893 #include <stdio.h>
5929fbe7
GM
11894int
11895main ()
11896{
eb697db5
DN
11897int (*fp) (FILE *, off_t, int) = fseeko;
11898 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
8c5ff6dd
KR
11899 ;
11900 return 0;
11901}
08b47d3d 11902_ACEOF
eb697db5
DN
11903if ac_fn_c_try_link "$LINENO"; then :
11904 ac_cv_sys_largefile_source=1; break
11905fi
11906rm -f core conftest.err conftest.$ac_objext \
11907 conftest$ac_exeext conftest.$ac_ext
11908 ac_cv_sys_largefile_source=unknown
11909 break
11910done
11911fi
11912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11913$as_echo "$ac_cv_sys_largefile_source" >&6; }
11914case $ac_cv_sys_largefile_source in #(
11915 no | unknown) ;;
11916 *)
11917cat >>confdefs.h <<_ACEOF
11918#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11919_ACEOF
11920;;
5929fbe7 11921esac
eb697db5 11922rm -rf conftest*
a4f64981 11923
eb697db5
DN
11924# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11925# in glibc 2.1.3, but that breaks too many other things.
11926# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11927if test $ac_cv_sys_largefile_source != unknown; then
49ebbd65 11928
eb697db5 11929$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
e6df49e4 11930
5929fbe7 11931fi
8c5ff6dd
KR
11932
11933
eb697db5
DN
11934# Configure getopt.
11935# getopt.m4 serial 10
8c5ff6dd 11936
eb697db5
DN
11937# The getopt module assume you want GNU getopt, with getopt_long etc,
11938# rather than vanilla POSIX getopt. This means your your code should
11939# always include <getopt.h> for the getopt prototypes.
15e12598 11940
15e12598 11941
a4f64981 11942
8c5ff6dd 11943
5929fbe7 11944
5929fbe7 11945
5929fbe7 11946
e6df49e4 11947
49ebbd65 11948
a4f64981 11949
e6df49e4 11950
eb697db5
DN
11951# Prerequisites of lib/getopt*.
11952
11953
11954
11955
11956 GETOPT_H=
11957 for ac_header in getopt.h
11958do :
11959 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11960if test "x$ac_cv_header_getopt_h" = x""yes; then :
11961 cat >>confdefs.h <<_ACEOF
11962#define HAVE_GETOPT_H 1
11963_ACEOF
11964
5929fbe7 11965else
eb697db5 11966 GETOPT_H=getopt.h
5929fbe7 11967fi
a4f64981 11968
eb697db5
DN
11969done
11970
11971 if test -z "$GETOPT_H"; then
11972 for ac_func in getopt_long_only
11973do :
11974 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11975if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
8c5ff6dd 11976 cat >>confdefs.h <<_ACEOF
eb697db5 11977#define HAVE_GETOPT_LONG_ONLY 1
8c5ff6dd 11978_ACEOF
e6df49e4 11979
8c5ff6dd 11980else
eb697db5
DN
11981 GETOPT_H=getopt.h
11982fi
11983done
5929fbe7 11984
eb697db5
DN
11985 fi
11986
11987 if test -z "$GETOPT_H"; then
11988 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
11989"
11990if test "x$ac_cv_have_decl_optreset" = x""yes; then :
11991 GETOPT_H=getopt.h
11992fi
11993
11994 fi
11995
11996 if test -z "$GETOPT_H"; then
11997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11998$as_echo_n "checking for working GNU getopt function... " >&6; }
11999if test "${gl_cv_func_gnu_getopt+set}" = set; then :
a4f64981 12000 $as_echo_n "(cached) " >&6
eb697db5
DN
12001else
12002 if test "$cross_compiling" = yes; then :
12003 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
12004"
12005if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
12006 gl_cv_func_gnu_getopt=no
12007else
12008 gl_cv_func_gnu_getopt=yes
5929fbe7 12009fi
eb697db5 12010
a4f64981 12011else
eb697db5 12012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12013/* end confdefs.h. */
eb697db5
DN
12014#include <getopt.h>
12015int
12016main ()
12017{
12018
12019 char *myargv[3];
12020 myargv[0] = "conftest";
12021 myargv[1] = "-+";
12022 myargv[2] = 0;
12023 return getopt (2, myargv, "+a") != '?';
12024
12025 ;
12026 return 0;
12027}
5929fbe7 12028_ACEOF
eb697db5
DN
12029if ac_fn_c_try_run "$LINENO"; then :
12030 gl_cv_func_gnu_getopt=yes
5929fbe7 12031else
eb697db5
DN
12032 gl_cv_func_gnu_getopt=no
12033fi
12034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12035 conftest.$ac_objext conftest.beam conftest.$ac_ext
12036fi
8c5ff6dd 12037
5929fbe7 12038fi
eb697db5
DN
12039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
12040$as_echo "$gl_cv_func_gnu_getopt" >&6; }
12041 if test "$gl_cv_func_gnu_getopt" = "no"; then
12042 GETOPT_H=getopt.h
12043 fi
12044 fi
5929fbe7 12045
5929fbe7 12046
a4f64981 12047
eb697db5 12048 if test -n "$GETOPT_H"; then :
8c5ff6dd
KR
12049
12050
eb697db5 12051 GETOPT_H=getopt.h
a5edbe4a 12052
eb697db5 12053$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
15e12598 12054
49ebbd65 12055
15e12598 12056
eb697db5
DN
12057 :
12058 GETOPTOBJS='getopt.o getopt1.o'
a4f64981 12059
8c5ff6dd 12060fi
e6df49e4 12061
e6df49e4 12062
eb697db5
DN
12063
12064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
12065$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
12066if test "${ac_cv_func_getpgrp_void+set}" = set; then :
12067 $as_echo_n "(cached) " >&6
12068else
12069 # Use it with a single arg.
12070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12071/* end confdefs.h. */
eb697db5
DN
12072$ac_includes_default
12073int
12074main ()
12075{
12076getpgrp (0);
12077 ;
12078 return 0;
12079}
12080_ACEOF
12081if ac_fn_c_try_compile "$LINENO"; then :
12082 ac_cv_func_getpgrp_void=no
5929fbe7 12083else
eb697db5
DN
12084 ac_cv_func_getpgrp_void=yes
12085fi
12086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 12087
5929fbe7 12088fi
eb697db5
DN
12089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
12090$as_echo "$ac_cv_func_getpgrp_void" >&6; }
12091if test $ac_cv_func_getpgrp_void = yes; then
8c5ff6dd 12092
eb697db5 12093$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
a4f64981 12094
eb697db5 12095fi
8c5ff6dd 12096
eb697db5
DN
12097
12098for ac_func in strftime
12099do :
12100 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
12101if test "x$ac_cv_func_strftime" = x""yes; then :
12102 cat >>confdefs.h <<_ACEOF
12103#define HAVE_STRFTIME 1
12104_ACEOF
12105
12106else
12107 # strftime is in -lintl on SCO UNIX.
12108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
12109$as_echo_n "checking for strftime in -lintl... " >&6; }
12110if test "${ac_cv_lib_intl_strftime+set}" = set; then :
a4f64981
GM
12111 $as_echo_n "(cached) " >&6
12112else
eb697db5
DN
12113 ac_check_lib_save_LIBS=$LIBS
12114LIBS="-lintl $LIBS"
12115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12116/* end confdefs.h. */
12117
12118/* Override any GCC internal prototype to avoid an error.
12119 Use char because int might match the return type of a GCC
12120 builtin and then its argument prototype would still apply. */
12121#ifdef __cplusplus
12122extern "C"
12123#endif
12124char strftime ();
12125int
12126main ()
12127{
12128return strftime ();
12129 ;
12130 return 0;
12131}
12132_ACEOF
12133if ac_fn_c_try_link "$LINENO"; then :
12134 ac_cv_lib_intl_strftime=yes
12135else
12136 ac_cv_lib_intl_strftime=no
12137fi
12138rm -f core conftest.err conftest.$ac_objext \
12139 conftest$ac_exeext conftest.$ac_ext
12140LIBS=$ac_check_lib_save_LIBS
12141fi
12142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
12143$as_echo "$ac_cv_lib_intl_strftime" >&6; }
12144if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
12145 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
12146
12147LIBS="-lintl $LIBS"
5929fbe7 12148fi
e6df49e4 12149
5929fbe7 12150fi
eb697db5
DN
12151done
12152
12153
12154# UNIX98 PTYs.
12155for ac_func in grantpt
12156do :
12157 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
12158if test "x$ac_cv_func_grantpt" = x""yes; then :
5929fbe7 12159 cat >>confdefs.h <<_ACEOF
eb697db5 12160#define HAVE_GRANTPT 1
a4f64981 12161_ACEOF
5929fbe7 12162
a4f64981 12163fi
5929fbe7
GM
12164done
12165
8c5ff6dd 12166
eb697db5
DN
12167# PTY-related GNU extensions.
12168for ac_func in getpt
12169do :
12170 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
12171if test "x$ac_cv_func_getpt" = x""yes; then :
12172 cat >>confdefs.h <<_ACEOF
12173#define HAVE_GETPT 1
12174_ACEOF
8c5ff6dd 12175
5929fbe7 12176fi
5929fbe7 12177done
8c5ff6dd 12178
5929fbe7 12179
eb697db5
DN
12180# Check this now, so that we will NOT find the above functions in ncurses.
12181# That is because we have not set up to link ncurses in lib-src.
12182# It's better to believe a function is not available
12183# than to expect to find it in ncurses.
12184# Also we need tputs and friends to be able to build at all.
12185have_tputs_et_al=true
12186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
12187$as_echo_n "checking for library containing tputs... " >&6; }
12188if test "${ac_cv_search_tputs+set}" = set; then :
5929fbe7 12189 $as_echo_n "(cached) " >&6
5929fbe7 12190else
eb697db5
DN
12191 ac_func_search_save_LIBS=$LIBS
12192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12193/* end confdefs.h. */
eb697db5
DN
12194
12195/* Override any GCC internal prototype to avoid an error.
12196 Use char because int might match the return type of a GCC
12197 builtin and then its argument prototype would still apply. */
12198#ifdef __cplusplus
12199extern "C"
12200#endif
12201char tputs ();
12202int
12203main ()
12204{
12205return tputs ();
12206 ;
12207 return 0;
12208}
5929fbe7 12209_ACEOF
eb697db5
DN
12210for ac_lib in '' ncurses terminfo termcap; do
12211 if test -z "$ac_lib"; then
12212 ac_res="none required"
12213 else
12214 ac_res=-l$ac_lib
12215 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12216 fi
12217 if ac_fn_c_try_link "$LINENO"; then :
12218 ac_cv_search_tputs=$ac_res
12219fi
12220rm -f core conftest.err conftest.$ac_objext \
12221 conftest$ac_exeext
12222 if test "${ac_cv_search_tputs+set}" = set; then :
12223 break
12224fi
12225done
12226if test "${ac_cv_search_tputs+set}" = set; then :
12227
5929fbe7 12228else
eb697db5
DN
12229 ac_cv_search_tputs=no
12230fi
12231rm conftest.$ac_ext
12232LIBS=$ac_func_search_save_LIBS
12233fi
12234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
12235$as_echo "$ac_cv_search_tputs" >&6; }
12236ac_res=$ac_cv_search_tputs
12237if test "$ac_res" != no; then :
12238 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
a4f64981 12239
eb697db5
DN
12240else
12241 have_tputs_et_al=false
5929fbe7 12242fi
8c5ff6dd 12243
eb697db5
DN
12244if test "$have_tputs_et_al" != true; then
12245 as_fn_error "I couldn't find termcap functions (tputs and friends).
12246Maybe some development libraries/packages are missing? Try installing
12247libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
12248fi
12249# Must define this when any termcap library is found.
8c5ff6dd 12250
eb697db5
DN
12251$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
12252
12253## FIXME This was the cpp logic, but I am not sure it is right.
12254## The above test has not necessarily found libncurses.
12255HAVE_LIBNCURSES=yes
12256
12257## Use terminfo instead of termcap?
12258## Note only system files NOT using terminfo are:
12259## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
12260## darwin|gnu without ncurses.
12261TERMINFO=no
12262LIBS_TERMCAP=
12263case "$opsys" in
12264 ## cygwin: Fewer environment variables to go wrong, more terminal types.
12265 ## hpux10-20: Use the system provided termcap(3) library.
12266 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
12267 ## is necessary. Otherwise Emacs dumps core when run -nw.
12268 aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
12269
12270 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
12271 ## The ncurses library has been moved out of the System framework in
12272 ## Mac OS X 10.2. So if configure detects it, set the command-line
12273 ## option to use it.
12274 darwin|gnu*)
12275 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
12276 if test "x$HAVE_LIBNCURSES" = "xyes"; then
12277 TERMINFO=yes
12278 LIBS_TERMCAP="-lncurses"
12279 fi
12280 ;;
12281
12282 freebsd)
12283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
12284$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
12285 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
12286 $as_echo_n "(cached) " >&6
12287else
12288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12289/* end confdefs.h. */
eb697db5
DN
12290#include <osreldate.h>
12291int
12292main ()
12293{
12294#if __FreeBSD_version < 400000
12295fail;
12296#endif
12297
12298 ;
12299 return 0;
12300}
5929fbe7 12301_ACEOF
eb697db5
DN
12302if ac_fn_c_try_link "$LINENO"; then :
12303 emacs_cv_freebsd_terminfo=yes
5929fbe7 12304else
eb697db5
DN
12305 emacs_cv_freebsd_terminfo=no
12306fi
12307rm -f core conftest.err conftest.$ac_objext \
12308 conftest$ac_exeext conftest.$ac_ext
5929fbe7 12309fi
8c5ff6dd
KR
12310
12311
eb697db5
DN
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
12313$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
12314
12315 if test $emacs_cv_freebsd_terminfo = yes; then
12316 TERMINFO=yes
12317 LIBS_TERMCAP="-lncurses"
12318 else
12319 LIBS_TERMCAP="-ltermcap"
12320 fi
5929fbe7 12321 ;;
8c5ff6dd 12322
eb697db5
DN
12323 netbsd)
12324 if test $ac_cv_search_tputs = -lterminfo; then
12325 TERMINFO=yes
12326 LIBS_TERMCAP="-lterminfo"
12327 else
12328 LIBS_TERMCAP="-ltermcap"
12329 fi
5929fbe7 12330 ;;
eb697db5 12331
5929fbe7 12332esac
a4f64981 12333
eb697db5
DN
12334case "$opsys" in
12335 ## hpux: Make sure we get select from libc rather than from libcurses
12336 ## because libcurses on HPUX 10.10 has a broken version of select.
12337 ## We used to use -lc -lcurses, but this may be cleaner.
12338 hpux*) LIBS_TERMCAP="-ltermcap" ;;
a4f64981 12339
eb697db5
DN
12340 openbsd) LIBS_TERMCAP="-lncurses" ;;
12341
12342 ## Must use system termcap, if we use any termcap. It does special things.
12343 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
12344esac
12345
12346TERMCAP_OBJ=tparam.o
12347if test $TERMINFO = yes; then
12348
12349$as_echo "#define TERMINFO 1" >>confdefs.h
8c5ff6dd 12350
5929fbe7 12351
eb697db5
DN
12352 ## Default used to be -ltermcap. Add a case above if need something else.
12353 test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
12354
12355 TERMCAP_OBJ=terminfo.o
8c5ff6dd 12356fi
5929fbe7 12357
5929fbe7 12358
eb697db5
DN
12359
12360
12361# Do we have res_init, for detecting changes in /etc/resolv.conf?
12362resolv=no
12363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364/* end confdefs.h. */
12365#include <netinet/in.h>
12366#include <arpa/nameser.h>
12367#include <resolv.h>
12368int
12369main ()
12370{
12371return res_init();
12372 ;
12373 return 0;
12374}
5929fbe7 12375_ACEOF
eb697db5
DN
12376if ac_fn_c_try_link "$LINENO"; then :
12377 have_res_init=yes
12378else
12379 have_res_init=no
12380fi
12381rm -f core conftest.err conftest.$ac_objext \
12382 conftest$ac_exeext conftest.$ac_ext
12383if test "$have_res_init" = no; then
12384 OLIBS="$LIBS"
12385 LIBS="$LIBS -lresolv"
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
12387$as_echo_n "checking for res_init with -lresolv... " >&6; }
12388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12389/* end confdefs.h. */
eb697db5
DN
12390#include <netinet/in.h>
12391#include <arpa/nameser.h>
12392#include <resolv.h>
12393int
12394main ()
12395{
12396return res_init();
12397 ;
12398 return 0;
12399}
aaa36002 12400_ACEOF
eb697db5
DN
12401if ac_fn_c_try_link "$LINENO"; then :
12402 have_res_init=yes
7186fb09 12403else
eb697db5
DN
12404 have_res_init=no
12405fi
12406rm -f core conftest.err conftest.$ac_objext \
12407 conftest$ac_exeext conftest.$ac_ext
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
12409$as_echo "$have_res_init" >&6; }
12410 if test "$have_res_init" = yes ; then
12411 resolv=yes
12412 fi
12413 LIBS="$OLIBS"
6da23aaa 12414fi
bf89cb4d 12415
eb697db5 12416if test "$have_res_init" = yes; then
ca81d7a0 12417
eb697db5 12418$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
7186fb09 12419
6da23aaa 12420fi
ca81d7a0 12421
eb697db5
DN
12422# Do we need the Hesiod library to provide the support routines?
12423LIBHESIOD=
12424if test "$with_hesiod" != no ; then
12425 # Don't set $LIBS here -- see comments above. FIXME which comments?
12426 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
12427if test "x$ac_cv_func_res_send" = x""yes; then :
7186fb09 12428
aaa36002 12429else
eb697db5
DN
12430 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
12431if test "x$ac_cv_func___res_send" = x""yes; then :
6da23aaa 12432
eb697db5
DN
12433else
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
12435$as_echo_n "checking for res_send in -lresolv... " >&6; }
12436if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
6da23aaa
EZ
12437 $as_echo_n "(cached) " >&6
12438else
eb697db5
DN
12439 ac_check_lib_save_LIBS=$LIBS
12440LIBS="-lresolv $LIBS"
12441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12442/* end confdefs.h. */
eb697db5
DN
12443
12444/* Override any GCC internal prototype to avoid an error.
12445 Use char because int might match the return type of a GCC
12446 builtin and then its argument prototype would still apply. */
12447#ifdef __cplusplus
12448extern "C"
12449#endif
12450char res_send ();
12451int
12452main ()
12453{
12454return res_send ();
12455 ;
12456 return 0;
12457}
7186fb09 12458_ACEOF
eb697db5
DN
12459if ac_fn_c_try_link "$LINENO"; then :
12460 ac_cv_lib_resolv_res_send=yes
7186fb09 12461else
eb697db5 12462 ac_cv_lib_resolv_res_send=no
8c5ff6dd 12463fi
eb697db5
DN
12464rm -f core conftest.err conftest.$ac_objext \
12465 conftest$ac_exeext conftest.$ac_ext
12466LIBS=$ac_check_lib_save_LIBS
12467fi
12468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
12469$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
12470if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
12471 resolv=yes
12472else
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
12474$as_echo_n "checking for __res_send in -lresolv... " >&6; }
12475if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
12476 $as_echo_n "(cached) " >&6
12477else
12478 ac_check_lib_save_LIBS=$LIBS
12479LIBS="-lresolv $LIBS"
12480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12481/* end confdefs.h. */
eb697db5
DN
12482
12483/* Override any GCC internal prototype to avoid an error.
12484 Use char because int might match the return type of a GCC
12485 builtin and then its argument prototype would still apply. */
12486#ifdef __cplusplus
12487extern "C"
12488#endif
12489char __res_send ();
12490int
12491main ()
12492{
12493return __res_send ();
12494 ;
12495 return 0;
12496}
5929fbe7 12497_ACEOF
eb697db5
DN
12498if ac_fn_c_try_link "$LINENO"; then :
12499 ac_cv_lib_resolv___res_send=yes
9452ded1 12500else
eb697db5 12501 ac_cv_lib_resolv___res_send=no
aaa36002 12502fi
eb697db5
DN
12503rm -f core conftest.err conftest.$ac_objext \
12504 conftest$ac_exeext conftest.$ac_ext
12505LIBS=$ac_check_lib_save_LIBS
aaa36002 12506fi
eb697db5
DN
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
12508$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
12509if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
12510 resolv=yes
aaa36002 12511fi
7186fb09 12512
9452ded1 12513fi
7186fb09 12514
aaa36002 12515fi
7186fb09 12516
aaa36002 12517fi
7186fb09 12518
eb697db5
DN
12519 if test "$resolv" = yes ; then
12520 RESOLVLIB=-lresolv
12521 else
12522 RESOLVLIB=
aaa36002 12523 fi
eb697db5
DN
12524 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
12525if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
aaa36002 12526
eb697db5
DN
12527else
12528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
12529$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
12530if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
7186fb09 12531 $as_echo_n "(cached) " >&6
ba4481b5 12532else
eb697db5
DN
12533 ac_check_lib_save_LIBS=$LIBS
12534LIBS="-lhesiod $RESOLVLIB $LIBS"
12535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12536/* end confdefs.h. */
5929fbe7 12537
eb697db5
DN
12538/* Override any GCC internal prototype to avoid an error.
12539 Use char because int might match the return type of a GCC
12540 builtin and then its argument prototype would still apply. */
12541#ifdef __cplusplus
12542extern "C"
12543#endif
12544char hes_getmailhost ();
12545int
12546main ()
12547{
12548return hes_getmailhost ();
12549 ;
12550 return 0;
12551}
5929fbe7 12552_ACEOF
eb697db5
DN
12553if ac_fn_c_try_link "$LINENO"; then :
12554 ac_cv_lib_hesiod_hes_getmailhost=yes
12555else
12556 ac_cv_lib_hesiod_hes_getmailhost=no
e6df49e4 12557fi
eb697db5
DN
12558rm -f core conftest.err conftest.$ac_objext \
12559 conftest$ac_exeext conftest.$ac_ext
12560LIBS=$ac_check_lib_save_LIBS
12561fi
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
12563$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
12564if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
12565 hesiod=yes
5929fbe7 12566else
eb697db5 12567 :
8c5ff6dd 12568fi
a5edbe4a 12569
5929fbe7 12570fi
cd03c74a 12571
8732a4e9 12572
eb697db5 12573 if test x"$hesiod" = xyes; then
49ebbd65 12574
eb697db5 12575$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
a5edbe4a 12576
eb697db5
DN
12577 LIBHESIOD=-lhesiod
12578 fi
12579fi
e6df49e4 12580
a4f64981 12581
eb697db5
DN
12582# Do we need libresolv (due to res_init or Hesiod)?
12583if test "$resolv" = yes ; then
49ebbd65 12584
eb697db5 12585$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
15e12598 12586
eb697db5
DN
12587 LIBRESOLV=-lresolv
12588else
12589 LIBRESOLV=
12590fi
8c5ff6dd 12591
e6df49e4 12592
eb697db5
DN
12593# These tell us which Kerberos-related libraries to use.
12594COM_ERRLIB=
12595CRYPTOLIB=
12596KRB5LIB=
12597DESLIB=
12598KRB4LIB=
5929fbe7 12599
eb697db5
DN
12600if test "${with_kerberos}" != no; then
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
12602$as_echo_n "checking for com_err in -lcom_err... " >&6; }
12603if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
49ebbd65 12604 $as_echo_n "(cached) " >&6
cd03c74a 12605else
8c5ff6dd 12606 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12607LIBS="-lcom_err $LIBS"
12608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 12609/* end confdefs.h. */
8c5ff6dd
KR
12610
12611/* Override any GCC internal prototype to avoid an error.
12612 Use char because int might match the return type of a GCC
12613 builtin and then its argument prototype would still apply. */
12614#ifdef __cplusplus
12615extern "C"
12616#endif
eb697db5 12617char com_err ();
8c5ff6dd
KR
12618int
12619main ()
a4f64981 12620{
eb697db5 12621return com_err ();
8c5ff6dd
KR
12622 ;
12623 return 0;
49ebbd65 12624}
a5edbe4a 12625_ACEOF
eb697db5
DN
12626if ac_fn_c_try_link "$LINENO"; then :
12627 ac_cv_lib_com_err_com_err=yes
49ebbd65 12628else
eb697db5 12629 ac_cv_lib_com_err_com_err=no
8c5ff6dd 12630fi
eb697db5
DN
12631rm -f core conftest.err conftest.$ac_objext \
12632 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 12633LIBS=$ac_check_lib_save_LIBS
49ebbd65 12634fi
eb697db5
DN
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
12636$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
12637if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
12638 have_com_err=yes
12639else
12640 have_com_err=no
5929fbe7 12641fi
49ebbd65 12642
eb697db5
DN
12643 if test $have_com_err = yes; then
12644 COM_ERRLIB=-lcom_err
12645 LIBS="$COM_ERRLIB $LIBS"
5929fbe7 12646
eb697db5
DN
12647$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
12648
12649 fi
12650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
12651$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
12652if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
8c5ff6dd 12653 $as_echo_n "(cached) " >&6
15e12598 12654else
eb697db5
DN
12655 ac_check_lib_save_LIBS=$LIBS
12656LIBS="-lcrypto $LIBS"
12657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12658/* end confdefs.h. */
eb697db5
DN
12659
12660/* Override any GCC internal prototype to avoid an error.
12661 Use char because int might match the return type of a GCC
12662 builtin and then its argument prototype would still apply. */
12663#ifdef __cplusplus
12664extern "C"
12665#endif
12666char mit_des_cbc_encrypt ();
12667int
12668main ()
5929fbe7 12669{
eb697db5
DN
12670return mit_des_cbc_encrypt ();
12671 ;
12672 return 0;
8c5ff6dd 12673}
a4f64981 12674_ACEOF
eb697db5
DN
12675if ac_fn_c_try_link "$LINENO"; then :
12676 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
8c5ff6dd 12677else
eb697db5 12678 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
8c5ff6dd 12679fi
eb697db5
DN
12680rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
12682LIBS=$ac_check_lib_save_LIBS
12683fi
12684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
12685$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
12686if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
12687 have_crypto=yes
12688else
12689 have_crypto=no
a4f64981 12690fi
15e12598 12691
eb697db5
DN
12692 if test $have_crypto = yes; then
12693 CRYPTOLIB=-lcrypto
12694 LIBS="$CRYPTOLIB $LIBS"
12695
12696$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
e6df49e4 12697
eb697db5
DN
12698 fi
12699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
12700$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
12701if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
12702 $as_echo_n "(cached) " >&6
8c5ff6dd 12703else
eb697db5
DN
12704 ac_check_lib_save_LIBS=$LIBS
12705LIBS="-lk5crypto $LIBS"
12706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12707/* end confdefs.h. */
8c5ff6dd 12708
eb697db5
DN
12709/* Override any GCC internal prototype to avoid an error.
12710 Use char because int might match the return type of a GCC
12711 builtin and then its argument prototype would still apply. */
12712#ifdef __cplusplus
12713extern "C"
12714#endif
12715char mit_des_cbc_encrypt ();
12716int
12717main ()
12718{
12719return mit_des_cbc_encrypt ();
12720 ;
12721 return 0;
12722}
5929fbe7 12723_ACEOF
eb697db5
DN
12724if ac_fn_c_try_link "$LINENO"; then :
12725 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
12726else
12727 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
12728fi
12729rm -f core conftest.err conftest.$ac_objext \
12730 conftest$ac_exeext conftest.$ac_ext
12731LIBS=$ac_check_lib_save_LIBS
12732fi
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
12734$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
12735if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
12736 have_k5crypto=yes
12737else
12738 have_k5crypto=no
5929fbe7 12739fi
8c5ff6dd 12740
eb697db5
DN
12741 if test $have_k5crypto = yes; then
12742 CRYPTOLIB=-lk5crypto
12743 LIBS="$CRYPTOLIB $LIBS"
5929fbe7 12744
eb697db5
DN
12745$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
12746
12747 fi
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
12749$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
12750if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
8c5ff6dd
KR
12751 $as_echo_n "(cached) " >&6
12752else
eb697db5
DN
12753 ac_check_lib_save_LIBS=$LIBS
12754LIBS="-lkrb5 $LIBS"
12755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12756/* end confdefs.h. */
5929fbe7 12757
eb697db5
DN
12758/* Override any GCC internal prototype to avoid an error.
12759 Use char because int might match the return type of a GCC
12760 builtin and then its argument prototype would still apply. */
12761#ifdef __cplusplus
12762extern "C"
5929fbe7 12763#endif
eb697db5
DN
12764char krb5_init_context ();
12765int
12766main ()
12767{
12768return krb5_init_context ();
12769 ;
12770 return 0;
12771}
12772_ACEOF
12773if ac_fn_c_try_link "$LINENO"; then :
12774 ac_cv_lib_krb5_krb5_init_context=yes
12775else
12776 ac_cv_lib_krb5_krb5_init_context=no
12777fi
12778rm -f core conftest.err conftest.$ac_objext \
12779 conftest$ac_exeext conftest.$ac_ext
12780LIBS=$ac_check_lib_save_LIBS
12781fi
12782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
12783$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
12784if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
12785 have_krb5=yes
12786else
12787 have_krb5=no
12788fi
12789
12790 if test $have_krb5=yes; then
12791 KRB5LIB=-lkrb5
12792 LIBS="$KRB5LIB $LIBS"
12793
12794$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
5929fbe7 12795
eb697db5
DN
12796 fi
12797 if test "${with_kerberos5}" = no; then
12798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
12799$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
12800if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
12801 $as_echo_n "(cached) " >&6
12802else
12803 ac_check_lib_save_LIBS=$LIBS
12804LIBS="-ldes425 $LIBS"
12805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12806/* end confdefs.h. */
aaa36002
DN
12807
12808/* Override any GCC internal prototype to avoid an error.
12809 Use char because int might match the return type of a GCC
12810 builtin and then its argument prototype would still apply. */
12811#ifdef __cplusplus
12812extern "C"
7186fb09 12813#endif
eb697db5 12814char des_cbc_encrypt ();
0ca10bb7
RC
12815int
12816main ()
12817{
eb697db5 12818return des_cbc_encrypt ();
0ca10bb7
RC
12819 ;
12820 return 0;
12821}
12822_ACEOF
eb697db5
DN
12823if ac_fn_c_try_link "$LINENO"; then :
12824 ac_cv_lib_des425_des_cbc_encrypt=yes
8c5ff6dd 12825else
eb697db5 12826 ac_cv_lib_des425_des_cbc_encrypt=no
a4f64981 12827fi
eb697db5
DN
12828rm -f core conftest.err conftest.$ac_objext \
12829 conftest$ac_exeext conftest.$ac_ext
12830LIBS=$ac_check_lib_save_LIBS
5929fbe7 12831fi
eb697db5
DN
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
12833$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
12834if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
12835 have_des425=yes
12836else
12837 have_des425=no
5929fbe7 12838fi
8c5ff6dd 12839
eb697db5
DN
12840 if test $have_des425 = yes; then
12841 DESLIB=-ldes425
12842 LIBS="$DESLIB $LIBS"
12843
12844$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
12845
12846 else
12847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
12848$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
12849if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
12850 $as_echo_n "(cached) " >&6
12851else
eb697db5
DN
12852 ac_check_lib_save_LIBS=$LIBS
12853LIBS="-ldes $LIBS"
12854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12855/* end confdefs.h. */
edfaf76d 12856
eb697db5
DN
12857/* Override any GCC internal prototype to avoid an error.
12858 Use char because int might match the return type of a GCC
12859 builtin and then its argument prototype would still apply. */
12860#ifdef __cplusplus
12861extern "C"
503d2be0 12862#endif
eb697db5 12863char des_cbc_encrypt ();
19650fd6
AS
12864int
12865main ()
12866{
eb697db5 12867return des_cbc_encrypt ();
503d2be0
AS
12868 ;
12869 return 0;
12870}
12871_ACEOF
eb697db5
DN
12872if ac_fn_c_try_link "$LINENO"; then :
12873 ac_cv_lib_des_des_cbc_encrypt=yes
8c5ff6dd 12874else
eb697db5 12875 ac_cv_lib_des_des_cbc_encrypt=no
a4f64981 12876fi
eb697db5
DN
12877rm -f core conftest.err conftest.$ac_objext \
12878 conftest$ac_exeext conftest.$ac_ext
12879LIBS=$ac_check_lib_save_LIBS
12880fi
12881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
12882$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
12883if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
12884 have_des=yes
12885else
12886 have_des=no
5929fbe7 12887fi
e6df49e4 12888
eb697db5
DN
12889 if test $have_des = yes; then
12890 DESLIB=-ldes
12891 LIBS="$DESLIB $LIBS"
a4f64981 12892
eb697db5 12893$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
5929fbe7 12894
eb697db5
DN
12895 fi
12896 fi
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
12898$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
12899if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
e9a63f04 12900 $as_echo_n "(cached) " >&6
ba4481b5 12901else
eb697db5
DN
12902 ac_check_lib_save_LIBS=$LIBS
12903LIBS="-lkrb4 $LIBS"
12904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12905/* end confdefs.h. */
ba4481b5 12906
0ca10bb7
RC
12907/* Override any GCC internal prototype to avoid an error.
12908 Use char because int might match the return type of a GCC
12909 builtin and then its argument prototype would still apply. */
12910#ifdef __cplusplus
12911extern "C"
a3f08d9e 12912#endif
eb697db5 12913char krb_get_cred ();
503d2be0
AS
12914int
12915main ()
12916{
eb697db5 12917return krb_get_cred ();
503d2be0
AS
12918 ;
12919 return 0;
12920}
12921_ACEOF
eb697db5
DN
12922if ac_fn_c_try_link "$LINENO"; then :
12923 ac_cv_lib_krb4_krb_get_cred=yes
bf89cb4d 12924else
eb697db5 12925 ac_cv_lib_krb4_krb_get_cred=no
91e84f96 12926fi
eb697db5
DN
12927rm -f core conftest.err conftest.$ac_objext \
12928 conftest$ac_exeext conftest.$ac_ext
12929LIBS=$ac_check_lib_save_LIBS
91e84f96 12930fi
eb697db5
DN
12931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
12932$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
12933if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
12934 have_krb4=yes
bf89cb4d 12935else
eb697db5 12936 have_krb4=no
91e84f96
GM
12937fi
12938
eb697db5
DN
12939 if test $have_krb4 = yes; then
12940 KRB4LIB=-lkrb4
12941 LIBS="$KRB4LIB $LIBS"
12942
12943$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
12944
12945 else
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
12947$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
12948if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
bf89cb4d 12949 $as_echo_n "(cached) " >&6
bf89cb4d 12950else
eb697db5
DN
12951 ac_check_lib_save_LIBS=$LIBS
12952LIBS="-lkrb $LIBS"
12953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12954/* end confdefs.h. */
a4f64981 12955
eb697db5
DN
12956/* Override any GCC internal prototype to avoid an error.
12957 Use char because int might match the return type of a GCC
12958 builtin and then its argument prototype would still apply. */
12959#ifdef __cplusplus
12960extern "C"
12961#endif
12962char krb_get_cred ();
12963int
12964main ()
12965{
12966return krb_get_cred ();
12967 ;
12968 return 0;
12969}
5929fbe7 12970_ACEOF
eb697db5
DN
12971if ac_fn_c_try_link "$LINENO"; then :
12972 ac_cv_lib_krb_krb_get_cred=yes
5929fbe7 12973else
eb697db5 12974 ac_cv_lib_krb_krb_get_cred=no
a4f64981 12975fi
eb697db5
DN
12976rm -f core conftest.err conftest.$ac_objext \
12977 conftest$ac_exeext conftest.$ac_ext
12978LIBS=$ac_check_lib_save_LIBS
5929fbe7 12979fi
eb697db5
DN
12980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
12981$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
12982if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
12983 have_krb=yes
91e84f96 12984else
eb697db5 12985 have_krb=no
6da23aaa 12986fi
0ca10bb7 12987
eb697db5
DN
12988 if test $have_krb = yes; then
12989 KRB4LIB=-lkrb
12990 LIBS="$KRB4LIB $LIBS"
2d2b6695 12991
eb697db5 12992$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
ca81d7a0 12993
eb697db5
DN
12994 fi
12995 fi
12996 fi
ca81d7a0 12997
eb697db5
DN
12998 if test "${with_kerberos5}" != no; then
12999 for ac_header in krb5.h
13000do :
13001 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
13002if test "x$ac_cv_header_krb5_h" = x""yes; then :
13003 cat >>confdefs.h <<_ACEOF
13004#define HAVE_KRB5_H 1
6da23aaa 13005_ACEOF
eb697db5
DN
13006 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
13007"
13008if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
13009
13010cat >>confdefs.h <<_ACEOF
13011#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 13012_ACEOF
2d2b6695 13013
eb697db5 13014
2d2b6695 13015fi
eb697db5
DN
13016ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
13017"
13018if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
6da23aaa 13019
eb697db5
DN
13020cat >>confdefs.h <<_ACEOF
13021#define HAVE_KRB5_ERROR_E_TEXT 1
13022_ACEOF
0ca10bb7 13023
0ca10bb7 13024
bf89cb4d 13025fi
2d2b6695
KS
13026
13027fi
13028
eb697db5
DN
13029done
13030
13031 else
13032 for ac_header in des.h
13033do :
13034 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
13035if test "x$ac_cv_header_des_h" = x""yes; then :
13036 cat >>confdefs.h <<_ACEOF
13037#define HAVE_DES_H 1
13038_ACEOF
8c5ff6dd 13039
eb697db5
DN
13040else
13041 for ac_header in kerberosIV/des.h
13042do :
13043 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
13044if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
13045 cat >>confdefs.h <<_ACEOF
13046#define HAVE_KERBEROSIV_DES_H 1
13047_ACEOF
6da23aaa 13048
eb697db5
DN
13049else
13050 for ac_header in kerberos/des.h
13051do :
13052 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
13053if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
13054 cat >>confdefs.h <<_ACEOF
13055#define HAVE_KERBEROS_DES_H 1
6da23aaa 13056_ACEOF
3d9fec71 13057
3d9fec71
DL
13058fi
13059
eb697db5 13060done
0ca10bb7 13061
0ca10bb7 13062fi
6da23aaa 13063
eb697db5
DN
13064done
13065
0ca10bb7 13066fi
6da23aaa 13067
eb697db5 13068done
6da23aaa 13069
eb697db5
DN
13070 for ac_header in krb.h
13071do :
13072 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
13073if test "x$ac_cv_header_krb_h" = x""yes; then :
13074 cat >>confdefs.h <<_ACEOF
13075#define HAVE_KRB_H 1
6da23aaa 13076_ACEOF
eb697db5
DN
13077
13078else
13079 for ac_header in kerberosIV/krb.h
13080do :
13081 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
13082if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
13083 cat >>confdefs.h <<_ACEOF
13084#define HAVE_KERBEROSIV_KRB_H 1
6da23aaa 13085_ACEOF
eb697db5 13086
6da23aaa 13087else
eb697db5
DN
13088 for ac_header in kerberos/krb.h
13089do :
13090 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
13091if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
13092 cat >>confdefs.h <<_ACEOF
13093#define HAVE_KERBEROS_KRB_H 1
13094_ACEOF
0ca10bb7 13095
0ca10bb7
RC
13096fi
13097
eb697db5 13098done
15e12598 13099
a4f64981 13100fi
eb697db5
DN
13101
13102done
8c5ff6dd 13103
5929fbe7 13104fi
eb697db5
DN
13105
13106done
13107
13108 fi
13109 for ac_header in com_err.h
13110do :
13111 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
13112if test "x$ac_cv_header_com_err_h" = x""yes; then :
6da23aaa 13113 cat >>confdefs.h <<_ACEOF
eb697db5 13114#define HAVE_COM_ERR_H 1
0ca10bb7
RC
13115_ACEOF
13116
13117fi
0ca10bb7 13118
6da23aaa
EZ
13119done
13120
eb697db5 13121fi
6da23aaa 13122
6da23aaa 13123
91e84f96 13124
6da23aaa 13125
6da23aaa 13126
6da23aaa
EZ
13127
13128
eb697db5
DN
13129# Solaris requires -lintl if you want strerror (which calls dgettext)
13130# to return localized messages.
13131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
13132$as_echo_n "checking for dgettext in -lintl... " >&6; }
13133if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
6da23aaa
EZ
13134 $as_echo_n "(cached) " >&6
13135else
eb697db5
DN
13136 ac_check_lib_save_LIBS=$LIBS
13137LIBS="-lintl $LIBS"
13138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13139/* end confdefs.h. */
eb697db5
DN
13140
13141/* Override any GCC internal prototype to avoid an error.
13142 Use char because int might match the return type of a GCC
13143 builtin and then its argument prototype would still apply. */
13144#ifdef __cplusplus
13145extern "C"
13146#endif
13147char dgettext ();
91e84f96
GM
13148int
13149main ()
6da23aaa 13150{
eb697db5 13151return dgettext ();
91e84f96
GM
13152 ;
13153 return 0;
6da23aaa
EZ
13154}
13155_ACEOF
eb697db5
DN
13156if ac_fn_c_try_link "$LINENO"; then :
13157 ac_cv_lib_intl_dgettext=yes
13158else
13159 ac_cv_lib_intl_dgettext=no
13160fi
13161rm -f core conftest.err conftest.$ac_objext \
13162 conftest$ac_exeext conftest.$ac_ext
13163LIBS=$ac_check_lib_save_LIBS
13164fi
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
13166$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
13167if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
13168 cat >>confdefs.h <<_ACEOF
13169#define HAVE_LIBINTL 1
8c5ff6dd 13170_ACEOF
eb697db5
DN
13171
13172 LIBS="-lintl $LIBS"
13173
13174fi
13175
13176
13177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
13178$as_echo_n "checking whether localtime caches TZ... " >&6; }
13179if test "${emacs_cv_localtime_cache+set}" = set; then :
13180 $as_echo_n "(cached) " >&6
13181else
13182 if test x$ac_cv_func_tzset = xyes; then
13183if test "$cross_compiling" = yes; then :
13184 # If we have tzset, assume the worst when cross-compiling.
13185emacs_cv_localtime_cache=yes
13186else
13187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 13188/* end confdefs.h. */
eb697db5
DN
13189#include <time.h>
13190extern char **environ;
13191unset_TZ ()
13192{
13193 char **from, **to;
13194 for (to = from = environ; (*to = *from); from++)
13195 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
13196 to++;
13197}
13198char TZ_GMT0[] = "TZ=GMT0";
13199char TZ_PST8[] = "TZ=PST8";
13200main()
13201{
13202 time_t now = time ((time_t *) 0);
13203 int hour_GMT0, hour_unset;
13204 if (putenv (TZ_GMT0) != 0)
13205 exit (1);
13206 hour_GMT0 = localtime (&now)->tm_hour;
13207 unset_TZ ();
13208 hour_unset = localtime (&now)->tm_hour;
13209 if (putenv (TZ_PST8) != 0)
13210 exit (1);
13211 if (localtime (&now)->tm_hour == hour_GMT0)
13212 exit (1);
13213 unset_TZ ();
13214 if (localtime (&now)->tm_hour != hour_unset)
13215 exit (1);
13216 exit (0);
13217}
13218_ACEOF
13219if ac_fn_c_try_run "$LINENO"; then :
13220 emacs_cv_localtime_cache=no
13221else
13222 emacs_cv_localtime_cache=yes
13223fi
13224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13225 conftest.$ac_objext conftest.beam conftest.$ac_ext
13226fi
13227
13228else
13229 # If we lack tzset, report that localtime does not cache TZ,
13230 # since we can't invalidate the cache if we don't have tzset.
13231 emacs_cv_localtime_cache=no
13232fi
13233fi
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
13235$as_echo "$emacs_cv_localtime_cache" >&6; }
13236if test $emacs_cv_localtime_cache = yes; then
13237
13238$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
13239
13240fi
13241
13242if test "x$HAVE_TIMEVAL" = xyes; then
13243 for ac_func in gettimeofday
13244do :
13245 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13246if test "x$ac_cv_func_gettimeofday" = x""yes; then :
13247 cat >>confdefs.h <<_ACEOF
13248#define HAVE_GETTIMEOFDAY 1
13249_ACEOF
13250
13251fi
13252done
13253
13254 if test $ac_cv_func_gettimeofday = yes; then
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
13256$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
13257if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
13258 $as_echo_n "(cached) " >&6
13259else
13260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261/* end confdefs.h. */
13262
13263#ifdef TIME_WITH_SYS_TIME
13264#include <sys/time.h>
13265#include <time.h>
13266#else
13267#ifdef HAVE_SYS_TIME_H
13268#include <sys/time.h>
13269#else
13270#include <time.h>
13271#endif
13272#endif
aaa36002
DN
13273int
13274main ()
a4f64981 13275{
eb697db5
DN
13276struct timeval time;
13277 gettimeofday (&time, 0);
aaa36002
DN
13278 ;
13279 return 0;
eb697db5
DN
13280}
13281_ACEOF
13282if ac_fn_c_try_compile "$LINENO"; then :
13283 emacs_cv_gettimeofday_two_arguments=yes
e9a63f04 13284else
eb697db5 13285 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 13286fi
e9a63f04 13287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
13288fi
13289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
13290$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
13291 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 13292
eb697db5 13293$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 13294
eb697db5
DN
13295 fi
13296 fi
647847ea 13297fi
ca81d7a0 13298
eb697db5
DN
13299ok_so_far=yes
13300ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13301if test "x$ac_cv_func_socket" = x""yes; then :
13302
5929fbe7 13303else
eb697db5
DN
13304 ok_so_far=no
13305fi
503d2be0 13306
eb697db5
DN
13307if test $ok_so_far = yes; then
13308 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
13309if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
647847ea 13310
eb697db5
DN
13311else
13312 ok_so_far=no
647847ea
DL
13313fi
13314
c0d27fcc 13315
c0d27fcc 13316fi
eb697db5
DN
13317if test $ok_so_far = yes; then
13318 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
13319if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
5929fbe7 13320
eb697db5
DN
13321else
13322 ok_so_far=no
c0d27fcc 13323fi
ca81d7a0 13324
19650fd6 13325
647847ea 13326fi
eb697db5 13327if test $ok_so_far = yes; then
ca81d7a0 13328
eb697db5 13329$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
ca81d7a0 13330
647847ea 13331fi
c0d27fcc 13332
eb697db5
DN
13333for ac_header in sys/ioctl.h
13334do :
13335 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
13336if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 13337 cat >>confdefs.h <<_ACEOF
eb697db5 13338#define HAVE_SYS_IOCTL_H 1
c0d27fcc 13339_ACEOF
647847ea 13340
73b77ee5 13341fi
c0d27fcc 13342
503d2be0 13343done
73b77ee5 13344
c0d27fcc 13345
eb697db5 13346if test -f /usr/lpp/X11/bin/smt.exp; then
15e12598 13347
eb697db5 13348$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
8c5ff6dd 13349
eb697db5 13350fi
49ebbd65 13351
eb697db5
DN
13352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
13353$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
13354if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
13355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13356$as_echo "yes" >&6; }
15e12598 13357
eb697db5 13358$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
8c5ff6dd 13359
eb697db5
DN
13360else
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13362$as_echo "no" >&6; }
13363fi
13364
13365ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13366if test "x$ac_cv_type_pid_t" = x""yes; then :
15e12598 13367
5929fbe7 13368else
8c5ff6dd 13369
eb697db5
DN
13370cat >>confdefs.h <<_ACEOF
13371#define pid_t int
13372_ACEOF
13373
a4f64981 13374fi
8c5ff6dd 13375
eb697db5
DN
13376for ac_header in vfork.h
13377do :
13378 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13379if test "x$ac_cv_header_vfork_h" = x""yes; then :
13380 cat >>confdefs.h <<_ACEOF
13381#define HAVE_VFORK_H 1
13382_ACEOF
13383
5929fbe7 13384fi
eb697db5
DN
13385
13386done
13387
13388for ac_func in fork vfork
13389do :
13390 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13391ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13392eval as_val=\$$as_ac_var
13393 if test "x$as_val" = x""yes; then :
c0d27fcc 13394 cat >>confdefs.h <<_ACEOF
e9a63f04 13395#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13396_ACEOF
503d2be0 13397
fa0b693c 13398fi
503d2be0 13399done
fa0b693c 13400
503d2be0 13401if test "x$ac_cv_func_fork" = xyes; then
eb697db5 13402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
e9a63f04 13403$as_echo_n "checking for working fork... " >&6; }
eb697db5 13404if test "${ac_cv_func_fork_works+set}" = set; then :
e9a63f04 13405 $as_echo_n "(cached) " >&6
fa0b693c 13406else
eb697db5 13407 if test "$cross_compiling" = yes; then :
503d2be0
AS
13408 ac_cv_func_fork_works=cross
13409else
eb697db5 13410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
13411/* end confdefs.h. */
13412$ac_includes_default
13413int
13414main ()
13415{
13416
13417 /* By Ruediger Kuhlmann. */
13418 return fork () < 0;
13419
13420 ;
13421 return 0;
13422}
503d2be0 13423_ACEOF
eb697db5 13424if ac_fn_c_try_run "$LINENO"; then :
503d2be0
AS
13425 ac_cv_func_fork_works=yes
13426else
eb697db5 13427 ac_cv_func_fork_works=no
503d2be0 13428fi
eb697db5
DN
13429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13430 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 13431fi
ca81d7a0 13432
503d2be0 13433fi
eb697db5 13434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
e9a63f04 13435$as_echo "$ac_cv_func_fork_works" >&6; }
503d2be0 13436
6bae0ccf
DL
13437else
13438 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
13439fi
13440if test "x$ac_cv_func_fork_works" = xcross; then
13441 case $host in
13442 *-*-amigaos* | *-*-msdosdjgpp*)
13443 # Override, as these systems have only a dummy fork() stub
13444 ac_cv_func_fork_works=no
13445 ;;
13446 *)
13447 ac_cv_func_fork_works=yes
13448 ;;
13449 esac
eb697db5 13450 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
e9a63f04 13451$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 13452fi
73b77ee5 13453ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 13454if test "x$ac_cv_func_vfork" = xyes; then
eb697db5 13455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
e9a63f04 13456$as_echo_n "checking for working vfork... " >&6; }
eb697db5 13457if test "${ac_cv_func_vfork_works+set}" = set; then :
e9a63f04 13458 $as_echo_n "(cached) " >&6
503d2be0 13459else
eb697db5 13460 if test "$cross_compiling" = yes; then :
503d2be0 13461 ac_cv_func_vfork_works=cross
fa0b693c 13462else
eb697db5 13463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13464/* end confdefs.h. */
73b77ee5 13465/* Thanks to Paul Eggert for this test. */
ca81d7a0 13466$ac_includes_default
19650fd6 13467#include <sys/wait.h>
f053c89f 13468#ifdef HAVE_VFORK_H
503d2be0 13469# include <vfork.h>
73b77ee5
GM
13470#endif
13471/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
13472 argument registers are propagated back to the parent. The compiler
13473 is told about this with #include <vfork.h>, but some compilers
13474 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13475 static variable whose address is put into a register that is
13476 clobbered by the vfork. */
19650fd6 13477static void
fa0b693c 13478#ifdef __cplusplus
73b77ee5 13479sparc_address_test (int arg)
503d2be0 13480# else
73b77ee5 13481sparc_address_test (arg) int arg;
fa0b693c 13482#endif
fa0b693c 13483{
73b77ee5
GM
13484 static pid_t child;
13485 if (!child) {
13486 child = vfork ();
13487 if (child < 0) {
13488 perror ("vfork");
13489 _exit(2);
13490 }
13491 if (!child) {
13492 arg = getpid();
13493 write(-1, "", 0);
13494 _exit (arg);
13495 }
13496 }
13497}
503d2be0
AS
13498
13499int
13500main ()
13501{
73b77ee5
GM
13502 pid_t parent = getpid ();
13503 pid_t child;
fa0b693c 13504
19650fd6 13505 sparc_address_test (0);
fa0b693c 13506
73b77ee5 13507 child = vfork ();
fa0b693c 13508
73b77ee5 13509 if (child == 0) {
503d2be0
AS
13510 /* Here is another test for sparc vfork register problems. This
13511 test uses lots of local variables, at least as many local
13512 variables as main has allocated so far including compiler
13513 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13514 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13515 reuse the register of parent for one of the local variables,
13516 since it will think that parent can't possibly be used any more
13517 in this routine. Assigning to the local variable will thus
13518 munge parent in the parent process. */
73b77ee5
GM
13519 pid_t
13520 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13521 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13522 /* Convince the compiler that p..p7 are live; otherwise, it might
13523 use the same hardware register for all 8 local variables. */
13524 if (p != p1 || p != p2 || p != p3 || p != p4
13525 || p != p5 || p != p6 || p != p7)
13526 _exit(1);
fa0b693c 13527
503d2be0
AS
13528 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13529 from child file descriptors. If the child closes a descriptor
13530 before it execs or exits, this munges the parent's descriptor
13531 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
13532 _exit(close(fileno(stdout)) != 0);
13533 } else {
13534 int status;
13535 struct stat st;
13536
13537 while (wait(&status) != child)
13538 ;
ca81d7a0 13539 return (
73b77ee5
GM
13540 /* Was there some problem with vforking? */
13541 child < 0
13542
13543 /* Did the child fail? (This shouldn't happen.) */
13544 || status
13545
13546 /* Did the vfork/compiler bug occur? */
13547 || parent != getpid()
fa0b693c 13548
73b77ee5
GM
13549 /* Did the file descriptor bug occur? */
13550 || fstat(fileno(stdout), &st) != 0
13551 );
13552 }
13553}
503d2be0 13554_ACEOF
eb697db5 13555if ac_fn_c_try_run "$LINENO"; then :
73b77ee5 13556 ac_cv_func_vfork_works=yes
fa0b693c 13557else
eb697db5 13558 ac_cv_func_vfork_works=no
503d2be0 13559fi
eb697db5
DN
13560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13561 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa0b693c 13562fi
ca81d7a0 13563
fa0b693c 13564fi
eb697db5 13565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
e9a63f04 13566$as_echo "$ac_cv_func_vfork_works" >&6; }
fa0b693c 13567
503d2be0
AS
13568fi;
13569if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 13570 ac_cv_func_vfork_works=$ac_cv_func_vfork
eb697db5 13571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
e9a63f04 13572$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
13573fi
13574
503d2be0
AS
13575if test "x$ac_cv_func_vfork_works" = xyes; then
13576
eb697db5 13577$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
503d2be0
AS
13578
13579else
13580
eb697db5 13581$as_echo "#define vfork fork" >>confdefs.h
fa0b693c
GM
13582
13583fi
503d2be0
AS
13584if test "x$ac_cv_func_fork_works" = xyes; then
13585
eb697db5 13586$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fa0b693c 13587
503d2be0 13588fi
647847ea 13589
c0d27fcc 13590
eb697db5 13591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
e9a63f04 13592$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
eb697db5 13593if test "${emacs_cv_langinfo_codeset+set}" = set; then :
e9a63f04 13594 $as_echo_n "(cached) " >&6
6a3a24fa 13595else
eb697db5 13596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13597/* end confdefs.h. */
6a3a24fa
JD
13598#include <langinfo.h>
13599int
13600main ()
13601{
13602char* cs = nl_langinfo(CODESET);
15e12598
VB
13603 ;
13604 return 0;
8c5ff6dd 13605}
eb697db5
DN
13606_ACEOF
13607if ac_fn_c_try_link "$LINENO"; then :
13608 emacs_cv_langinfo_codeset=yes
5929fbe7 13609else
eb697db5 13610 emacs_cv_langinfo_codeset=no
8c5ff6dd 13611fi
eb697db5
DN
13612rm -f core conftest.err conftest.$ac_objext \
13613 conftest$ac_exeext conftest.$ac_ext
a4f64981 13614
eb697db5
DN
13615fi
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
13617$as_echo "$emacs_cv_langinfo_codeset" >&6; }
13618if test $emacs_cv_langinfo_codeset = yes; then
5929fbe7 13619
eb697db5 13620$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
e9a63f04 13621
8730a8da 13622fi
dc2933eb 13623
eb697db5
DN
13624ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13625if test "x$ac_cv_type_size_t" = x""yes; then :
503d2be0 13626
c0d27fcc
MR
13627cat >>confdefs.h <<_ACEOF
13628#define HAVE_SIZE_T 1
13629_ACEOF
13630
8730a8da
DL
13631
13632fi
13633
c0d27fcc 13634
eb697db5 13635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
e9a63f04 13636$as_echo_n "checking for mbstate_t... " >&6; }
eb697db5 13637if test "${ac_cv_type_mbstate_t+set}" = set; then :
e9a63f04 13638 $as_echo_n "(cached) " >&6
973a76b1 13639else
eb697db5 13640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13641/* end confdefs.h. */
973a76b1
DL
13642$ac_includes_default
13643# include <wchar.h>
13644int
13645main ()
13646{
13647mbstate_t x; return sizeof x;
13648 ;
13649 return 0;
13650}
13651_ACEOF
eb697db5 13652if ac_fn_c_try_compile "$LINENO"; then :
973a76b1
DL
13653 ac_cv_type_mbstate_t=yes
13654else
eb697db5 13655 ac_cv_type_mbstate_t=no
973a76b1 13656fi
ca81d7a0 13657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 13658fi
eb697db5 13659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
e9a63f04 13660$as_echo "$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
13661 if test $ac_cv_type_mbstate_t = yes; then
13662
eb697db5 13663$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
973a76b1
DL
13664
13665 else
13666
eb697db5 13667$as_echo "#define mbstate_t int" >>confdefs.h
973a76b1
DL
13668
13669 fi
13670
eb697db5 13671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
e9a63f04 13672$as_echo_n "checking for C restrict keyword... " >&6; }
eb697db5 13673if test "${emacs_cv_c_restrict+set}" = set; then :
e9a63f04 13674 $as_echo_n "(cached) " >&6
22044edf 13675else
eb697db5 13676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13677/* end confdefs.h. */
22044edf
DL
13678void fred (int *restrict x);
13679int
13680main ()
13681{
b936fae4 13682
22044edf
DL
13683 ;
13684 return 0;
13685}
c0d27fcc 13686_ACEOF
eb697db5 13687if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13688 emacs_cv_c_restrict=yes
13689else
eb697db5 13690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13691/* end confdefs.h. */
22044edf
DL
13692void fred (int *__restrict x);
13693int
13694main ()
13695{
c0d27fcc 13696
22044edf
DL
13697 ;
13698 return 0;
13699}
c0d27fcc 13700_ACEOF
eb697db5 13701if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13702 emacs_cv_c_restrict=__restrict
13703else
eb697db5 13704 emacs_cv_c_restrict=no
ba4481b5 13705fi
ca81d7a0 13706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13707fi
ca81d7a0 13708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13709fi
eb697db5 13710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
e9a63f04 13711$as_echo "$emacs_cv_c_restrict" >&6; }
22044edf
DL
13712case "$emacs_cv_c_restrict" in
13713 yes) emacs_restrict=restrict;;
13714 no) emacs_restrict="";;
13715 *) emacs_restrict="$emacs_cv_c_restrict";;
13716esac
13717if test "$emacs_restrict" != __restrict; then
b936fae4 13718
22044edf
DL
13719cat >>confdefs.h <<_ACEOF
13720#define __restrict $emacs_restrict
c0d27fcc 13721_ACEOF
ba4481b5
DL
13722
13723fi
ba4481b5 13724
eb697db5 13725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
e9a63f04 13726$as_echo_n "checking for C restricted array declarations... " >&6; }
eb697db5 13727if test "${emacs_cv_c_restrict_arr+set}" = set; then :
e9a63f04 13728 $as_echo_n "(cached) " >&6
22044edf 13729else
eb697db5 13730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13731/* end confdefs.h. */
22044edf
DL
13732void fred (int x[__restrict]);
13733int
13734main ()
13735{
b936fae4 13736
22044edf
DL
13737 ;
13738 return 0;
13739}
c0d27fcc 13740_ACEOF
eb697db5 13741if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13742 emacs_cv_c_restrict_arr=yes
13743else
eb697db5 13744 emacs_cv_c_restrict_arr=no
ba4481b5 13745fi
ca81d7a0 13746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 13747fi
eb697db5 13748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
e9a63f04 13749$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22044edf 13750if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 13751
eb697db5 13752$as_echo "#define __restrict_arr __restrict" >>confdefs.h
ba4481b5 13753
ba4481b5
DL
13754fi
13755
c0d27fcc 13756
c0d27fcc 13757
22044edf
DL
13758# Set up the CFLAGS for real compilation, so we can substitute it.
13759CFLAGS="$REAL_CFLAGS"
13760CPPFLAGS="$REAL_CPPFLAGS"
13761
9978c06c
CY
13762## Hack to detect a buggy GCC version.
13763if test "x$GCC" = xyes \
13764 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
13765 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
13766 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
eb697db5 13767 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
9978c06c
CY
13768fi
13769
22044edf 13770#### Find out which version of Emacs this is.
8c5ff6dd 13771version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \
22044edf
DL
13772 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
13773if test x"${version}" = x; then
eb697db5 13774 as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5
22044edf 13775fi
879de935 13776if test x"${version}" != x"$PACKAGE_VERSION"; then
eb697db5 13777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5
8c5ff6dd 13778$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;}
879de935 13779fi
22044edf
DL
13780
13781### Specify what sort of things we'll be editing into Makefile and config.h.
13782### Use configuration here uncanonicalized to avoid exceeding size limits.
13783
13784
4286c48d 13785## Unused?
22044edf
DL
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
22044edf 13805
4286c48d
GM
13806## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
13807## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
13808## end of LIBX_BASE, but nothing ever set it.
22044edf
DL
13809
13810
13811
13812
c82a7244 13813## Used in lwlib/Makefile.in.
22044edf
DL
13814
13815
6a3a24fa 13816
06b62770
AR
13817
13818
13819
48fad8e8
DN
13820
13821
5e159d07
CY
13822
13823
edfda783 13824
91231421 13825
22044edf
DL
13826cat >>confdefs.h <<_ACEOF
13827#define EMACS_CONFIGURATION "${canonical}"
13828_ACEOF
13829
13830
13831cat >>confdefs.h <<_ACEOF
13832#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
13833_ACEOF
13834
13835
13836cat >>confdefs.h <<_ACEOF
13837#define config_machfile "${machfile}"
13838_ACEOF
13839
13840
13841cat >>confdefs.h <<_ACEOF
13842#define config_opsysfile "${opsysfile}"
13843_ACEOF
13844
13845
e765bf58
JD
13846XMENU_OBJ=
13847XOBJ=
5929fbe7 13848FONT_OBJ=
22044edf
DL
13849if test "${HAVE_X_WINDOWS}" = "yes" ; then
13850
eb697db5 13851$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
22044edf 13852
e765bf58
JD
13853 XMENU_OBJ=xmenu.o
13854 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
5929fbe7
GM
13855 FONT_OBJ=xfont.o
13856 if test "$HAVE_XFT" = "yes"; then
13857 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
13858 elif test "$HAVE_FREETYPE" = "yes"; then
13859 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
13860 fi
13861
22044edf 13862fi
e765bf58
JD
13863
13864
13865
5929fbe7 13866
7186fb09 13867WIDGET_OBJ=
c82a7244 13868MOTIF_LIBW=
22044edf 13869if test "${USE_X_TOOLKIT}" != "none" ; then
7186fb09 13870 WIDGET_OBJ=widget.o
22044edf 13871
eb697db5 13872$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
22044edf 13873
39dd4d52 13874 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5 13875
eb697db5 13876$as_echo "#define USE_LUCID 1" >>confdefs.h
73d798d5 13877
39dd4d52 13878 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5 13879
eb697db5 13880$as_echo "#define USE_MOTIF 1" >>confdefs.h
73d798d5 13881
c82a7244
GM
13882 MOTIF_LIBW=-lXm
13883 case "$opsys" in
13884 gnu-linux)
13885 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
13886 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
13887 ;;
13888
13889 unixware)
13890 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
13891 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
13892 MOTIF_LIBW="MOTIF_LIBW -lXimp"
13893 ;;
13894
13895 aix4-2)
13896 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
13897 MOTIF_LIBW="$MOTIF_LIBW -li18n"
13898 ;;
13899 esac
13900 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
73d798d5 13901 fi
22044edf 13902fi
7186fb09 13903
c82a7244 13904
718a19c8 13905TOOLKIT_LIBW=
c82a7244
GM
13906case "$USE_X_TOOLKIT" in
13907 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
13908 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
718a19c8 13909 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
c82a7244
GM
13910esac
13911
13912
a5edbe4a
GM
13913if test "$USE_X_TOOLKIT" = "none"; then
13914 LIBXT_OTHER="\$(LIBXSM)"
8b44daa0 13915 OLDXMENU_TARGET="really-oldXMenu"
a5edbe4a
GM
13916else
13917 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
8b44daa0 13918 OLDXMENU_TARGET="really-lwlib"
a5edbe4a
GM
13919fi
13920
13921
718a19c8
GM
13922## The X Menu stuff is present in the X10 distribution, but missing
13923## from X11. If we have X10, just use the installed library;
13924## otherwise, use our own copy.
22044edf
DL
13925if test "${HAVE_X11}" = "yes" ; then
13926
eb697db5 13927$as_echo "#define HAVE_X11 1" >>confdefs.h
22044edf 13928
718a19c8
GM
13929
13930 if test "$USE_X_TOOLKIT" = "none"; then
13931 OLDXMENU="\${oldXMenudir}libXMenu11.a"
13932 else
13933 OLDXMENU="\${lwlibdir}liblw.a"
13934 fi
13935 LIBXMENU="\$(OLDXMENU)"
a5edbe4a 13936 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16455a85 13937 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
718a19c8 13938else
298b8a34
GM
13939 ## For a syntactically valid Makefile; not actually used for anything.
13940 ## See comments in src/Makefile.in.
13941 OLDXMENU=nothing
1dea46de
GM
13942 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
13943 if test "${HAVE_X_WINDOWS}" = "yes"; then
13944 LIBXMENU="-lXMenu"
13945 else
13946 LIBXMENU=
13947 fi
a5edbe4a 13948 LIBX_OTHER=
16455a85 13949 OLDXMENU_DEPS=
22044edf 13950fi
718a19c8 13951
4286c48d 13952if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
298b8a34
GM
13953 OLDXMENU_TARGET=
13954 OLDXMENU=nothing
718a19c8 13955 LIBXMENU=
16455a85 13956 OLDXMENU_DEPS=
718a19c8
GM
13957fi
13958
13959
13960
13961
a5edbe4a 13962
16455a85 13963
298b8a34 13964
22044edf
DL
13965if test "${HAVE_MENUS}" = "yes" ; then
13966
eb697db5 13967$as_echo "#define HAVE_MENUS 1" >>confdefs.h
22044edf
DL
13968
13969fi
4f91d9c8 13970
22044edf
DL
13971if test "${GNU_MALLOC}" = "yes" ; then
13972
eb697db5 13973$as_echo "#define GNU_MALLOC 1" >>confdefs.h
22044edf
DL
13974
13975fi
4f91d9c8
GM
13976
13977RALLOC_OBJ=
22044edf
DL
13978if test "${REL_ALLOC}" = "yes" ; then
13979
eb697db5 13980$as_echo "#define REL_ALLOC 1" >>confdefs.h
22044edf 13981
4f91d9c8
GM
13982
13983 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
22044edf
DL
13984fi
13985
718a19c8 13986
718a19c8
GM
13987if test "$opsys" = "cygwin"; then
13988 CYGWIN_OBJ="sheap.o"
13989 ## Cygwin differs because of its unexec().
7acac9f4 13990 PRE_ALLOC_OBJ=
4f91d9c8 13991 POST_ALLOC_OBJ=lastfile.o
718a19c8
GM
13992else
13993 CYGWIN_OBJ=
7acac9f4 13994 PRE_ALLOC_OBJ=lastfile.o
4f91d9c8 13995 POST_ALLOC_OBJ=
718a19c8
GM
13996fi
13997
106c6f74 13998
22044edf
DL
13999
14000
c0d27fcc 14001
ede4834a
GM
14002case "$opsys" in
14003 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
14004
14005 darwin)
a0c06748
GM
14006 ## The -headerpad option tells ld (see man page) to leave room at the
14007 ## end of the header for adding load commands. Needed for dumping.
14008 ## 0x690 is the total size of 30 segment load commands (at 56
14009 ## each); under Cocoa 31 commands are required.
14010 if test "$HAVE_NS" = "yes"; then
14011 libs_nsgui="-framework AppKit"
14012 headerpad_extra=6C8
14013 else
14014 libs_nsgui=
14015 headerpad_extra=690
14016 fi
14017 LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
14018
14019 ## This is here because src/Makefile.in did some extra fiddling around
14020 ## with LD_SWITCH_SYSTEM. The cpp logic was:
14021 ## #ifndef LD_SWITCH_SYSTEM
14022 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
14023 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
14024 ## not using gcc, darwin system not on an alpha (ie darwin, since
14025 ## darwin + alpha does not occur).
14026 ## Because this was done in src/Makefile.in, the resulting part of
14027 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
14028 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
14029 ## rather than LD_SWITCH_SYSTEM.
14030 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
14031 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
14032 ;;
14033
14034 ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
14035 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
14036 ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
14037 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
14038 ## had different values in configure (in ac_link) and src/Makefile.in.
14039 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
14040 gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
ede4834a
GM
14041
14042 *) LD_SWITCH_SYSTEM_TEMACS= ;;
14043esac
14044
a25e81b3 14045if test "$NS_IMPL_GNUSTEP" = "yes"; then
7dddde4b
GM
14046 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
14047fi
14048
14049
ede4834a
GM
14050
14051
ebbc2619
GM
14052LINKER=
14053ORDINARY_LINK=
14054case "$opsys" in
14055 ## gnu: GNU needs its own crt0.
14056 aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
14057
14058 cygwin) LINKER="\$(CC)" ;;
14059
14060 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
14061 ## library search parth, i.e. it won't search /usr/lib for libc and
14062 ## friends. Using -nostartfiles instead avoids this problem, and
14063 ## will also work on earlier NetBSD releases.
14064 netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;;
14065
14066 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
14067 ## MkLinux/LinuxPPC needs this.
14068 ## ibms390x only supports opsys = gnu-linux so it can be added here.
14069 gnu-*)
14070 case "$machine" in
14071 macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;;
14072 esac
14073 ;;
14074esac
14075
90278cb6
GM
14076
14077PRE_EDIT_LDFLAGS=
14078POST_EDIT_LDFLAGS=
ebbc2619
GM
14079if test "x$ORDINARY_LINK" = "xyes"; then
14080
14081 LINKER="\$(CC)"
14082
eb697db5 14083$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
ebbc2619
GM
14084
14085
14086## The system files defining neither ORDINARY_LINK nor LINKER are:
14087## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*.
14088elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
14089
14090 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
14091 ## places that are difficult to figure out at make time. Fortunately,
14092 ## these same versions allow you to pass arbitrary flags on to the
14093 ## linker, so there is no reason not to use it as a linker.
14094 ##
14095 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
14096 ## searching for libraries in its internal directories, so we have to
14097 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
14098 LINKER="\$(CC) -nostdlib"
14099 ## GCC passes any argument prefixed with -Xlinker directly to the linker.
14100 ## See prefix-args.c for an explanation of why we do not do this with the
14101 ## shell''s ``for'' construct. Note that sane people do not have '.' in
14102 ## their paths, so we must use ./prefix-args.
14103 ## TODO either make prefix-args check ORDINARY_LINK internally,
90278cb6
GM
14104 ## or remove it altogether (bug#6184), removing the need for this hack.
14105 PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker'
14106 POST_EDIT_LDFLAGS='`'
ebbc2619
GM
14107fi
14108
14109
90278cb6 14110
ebbc2619 14111test "x$LINKER" = "x" && LINKER=ld
81ac4f35 14112## FIXME? What setting of EDIT_LDFLAGS should this have?
ebbc2619
GM
14113test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
14114
14115
14116
14117
81ac4f35
GM
14118## FIXME? The logic here is not precisely the same as that above.
14119## There is no check here for a pre-defined LINKER.
14120## Should we only be setting LIB_GCC if LD ~ -nostdlib?
057886a3 14121LIB_GCC=
ebbc2619 14122if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
057886a3
GM
14123
14124 case "$opsys" in
14125 ## cygwin: don't link against static libgcc.
14126 cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
14127
14128 gnu-*)
14129 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
14130 ## build on ARM EABI under GNU/Linux. (Bug#5518)
14131 ## Note that m/arm.h never bothered to undefine LIB_GCC first.
14132 if test "$machine" = "arm"; then
14133 LIB_GCC="-lgcc_s"
14134 else
14135 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
14136 ## immediately undefine it again and redefine it to empty.
14137 ## Was the C_SWITCH_X_SITE part really necessary?
3536f993 14138## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
057886a3
GM
14139 LIB_GCC=
14140 fi
14141 ;;
14142
14143 ## Ask GCC where to find libgcc.a.
3536f993 14144 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
057886a3
GM
14145 esac
14146fi
14147
14148
372b4090
GM
14149TOOLTIP_SUPPORT=
14150WINDOW_SUPPORT=
14151## If we're using X11/GNUstep, define some consequences.
14152if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
14153
eb697db5 14154$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
372b4090
GM
14155
14156
eb697db5 14157$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
372b4090
GM
14158
14159 MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
14160 TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
14161
14162 WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
14163 test "$HAVE_X_WINDOWS" = "yes" && \
14164 WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
14165
14166fi
14167
14168
14169
14170
14171
e6df49e4
GM
14172
14173
ba4481b5 14174#### Report on what we decided to do.
488dd4c4
JD
14175#### Report GTK as a toolkit, even if it doesn't use Xt.
14176#### It makes printing result more understandable as using GTK sets
14177#### toolkit_scroll_bars to yes by default.
14178if test "${HAVE_GTK}" = "yes"; then
14179 USE_X_TOOLKIT=GTK
14180fi
14181
ba4481b5
DL
14182echo "
14183Configured for \`${canonical}'.
14184
14185 Where should the build process find the source code? ${srcdir}
14186 What operating system and machine description files should Emacs use?
14187 \`${opsysfile}' and \`${machfile}'
14188 What compiler should emacs be built with? ${CC} ${CFLAGS}
14189 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 14190 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 14191 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 14192 What window system should Emacs use? ${window_system}
8e967cf7 14193 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
14194
14195if test -n "${x_includes}"; then
14196echo " Where do we find X Windows header files? ${x_includes}"
14197else
14198echo " Where do we find X Windows header files? Standard dirs"
14199fi
14200if test -n "${x_libraries}"; then
14201echo " Where do we find X Windows libraries? ${x_libraries}"
14202else
14203echo " Where do we find X Windows libraries? Standard dirs"
14204fi
14205
14206echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
14207echo " Does Emacs use -lXpm? ${HAVE_XPM}"
14208echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
14209echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
91e84f96 14210echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
ba4481b5 14211echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 14212echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 14213echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 14214echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
637fa988 14215echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
022c122a 14216echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
2ee27f27 14217
edfda783
AR
14218echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
14219echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
14220echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
14221echo " Does Emacs use -lxft? ${HAVE_XFT}"
14222
8d87199b 14223echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
14224echo
14225
d0098f13
JD
14226if test $USE_XASSERTS = yes; then
14227 echo " Compiling with asserts turned on."
d0098f13 14228 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 14229fi
05cf15c6 14230
ca34d75a
JD
14231echo
14232
06b62770
AR
14233if test "$HAVE_NS" = "yes"; then
14234 echo
14235 echo "You must run \"make install\" in order to test the built application.
14236The installed application will go to nextstep/Emacs.app and can be
14237run or moved from there."
14238 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
14239 echo "The application will be fully self-contained."
14240 else
14241 echo "The lisp resources for the application will be installed under ${prefix}.
14242You may need to run \"make install\" with sudo. The application will fail
14243to run if these resources are not installed."
14244 fi
14245 echo
14246fi
14247
131e4133
MA
14248if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
14249 echo "D-Bus integration has been tested for GNU/Linux only."
14250 echo
14251fi
14252
05cf15c6 14253
ba4481b5
DL
14254# Remove any trailing slashes in these variables.
14255test "${prefix}" != NONE &&
14256 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
14257test "${exec_prefix}" != NONE &&
14258 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
14259
81ac4f35 14260ac_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
14261
14262ac_config_commands="$ac_config_commands default"
14263
503d2be0 14264cat >confcache <<\_ACEOF
ba4481b5
DL
14265# This file is a shell script that caches the results of configure
14266# tests run on this system so they can be shared between configure
503d2be0
AS
14267# scripts and configure runs, see configure's option --config-cache.
14268# It is not useful on other systems. If it contains results you don't
14269# want to keep, you may remove or edit it.
ba4481b5 14270#
503d2be0
AS
14271# config.status only pays attention to the cache file if you give it
14272# the --recheck option to rerun configure.
ba4481b5 14273#
6bae0ccf 14274# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
14275# loading this file, other *unset* `ac_cv_foo' will be assigned the
14276# following values.
14277
14278_ACEOF
14279
ba4481b5
DL
14280# The following way of writing the cache mishandles newlines in values,
14281# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 14282# So, we kill variables containing newlines.
ba4481b5
DL
14283# Ultrix sh set writes to stderr and can't be redirected directly,
14284# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
14285(
14286 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14287 eval ac_val=\$$ac_var
14288 case $ac_val in #(
14289 *${as_nl}*)
14290 case $ac_var in #(
eb697db5
DN
14291 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14292$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
14293 esac
14294 case $ac_var in #(
14295 _ | IFS | as_nl) ;; #(
e9a63f04 14296 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
eb697db5 14297 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
14298 esac ;;
14299 esac
14300 done
14301
503d2be0 14302 (set) 2>&1 |
ca81d7a0
JD
14303 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14304 *${as_nl}ac_space=\ *)
eb697db5
DN
14305 # `set' does not quote correctly, so add quotes: double-quote
14306 # substitution turns \\\\ into \\, and sed turns \\ into \.
503d2be0 14307 sed -n \
edfaf76d
LK
14308 "s/'/'\\\\''/g;
14309 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 14310 ;; #(
503d2be0
AS
14311 *)
14312 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 14313 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 14314 ;;
ca81d7a0
JD
14315 esac |
14316 sort
14317) |
503d2be0 14318 sed '
ca81d7a0 14319 /^ac_cv_env_/b end
503d2be0 14320 t clear
ca81d7a0 14321 :clear
503d2be0
AS
14322 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14323 t end
ca81d7a0
JD
14324 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14325 :end' >>confcache
14326if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14327 if test -w "$cache_file"; then
14328 test "x$cache_file" != "x/dev/null" &&
eb697db5 14329 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
e9a63f04 14330$as_echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 14331 cat confcache >$cache_file
ba4481b5 14332 else
eb697db5 14333 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
e9a63f04 14334$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
14335 fi
14336fi
14337rm -f confcache
14338
ba4481b5
DL
14339test "x$prefix" = xNONE && prefix=$ac_default_prefix
14340# Let make expand exec_prefix.
14341test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14342
ba4481b5
DL
14343DEFS=-DHAVE_CONFIG_H
14344
6bae0ccf
DL
14345ac_libobjs=
14346ac_ltlibobjs=
14347for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14348 # 1. Remove the extension, and $U if already installed.
ca81d7a0 14349 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 14350 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
14351 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14352 # will be set to the directory where LIBOBJS objects are built.
eb697db5
DN
14353 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14354 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
14355done
14356LIBOBJS=$ac_libobjs
14357
14358LTLIBOBJS=$ac_ltlibobjs
14359
14360
c0d27fcc 14361
ba4481b5 14362: ${CONFIG_STATUS=./config.status}
e9a63f04 14363ac_write_fail=0
503d2be0
AS
14364ac_clean_files_save=$ac_clean_files
14365ac_clean_files="$ac_clean_files $CONFIG_STATUS"
eb697db5 14366{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 14367$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
eb697db5
DN
14368as_write_fail=0
14369cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 14370#! $SHELL
c0d27fcc 14371# Generated by $as_me.
ba4481b5 14372# Run this file to recreate the current configuration.
ba4481b5 14373# Compiler output produced by configure, useful for debugging
503d2be0 14374# configure, is in config.log if it exists.
ba4481b5 14375
503d2be0 14376debug=false
19650fd6
AS
14377ac_cs_recheck=false
14378ac_cs_silent=false
5929fbe7 14379
eb697db5
DN
14380SHELL=\${CONFIG_SHELL-$SHELL}
14381export SHELL
14382_ASEOF
14383cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14384## -------------------- ##
14385## M4sh Initialization. ##
14386## -------------------- ##
c0d27fcc 14387
f053c89f
CY
14388# Be more Bourne compatible
14389DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 14390if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
14391 emulate sh
14392 NULLCMD=:
e9a63f04 14393 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
14394 # is contrary to our usage. Disable this feature.
14395 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
14396 setopt NO_GLOB_SUBST
14397else
eb697db5
DN
14398 case `(set -o) 2>/dev/null` in #(
14399 *posix*) :
14400 set -o posix ;; #(
14401 *) :
14402 ;;
f053c89f 14403esac
503d2be0 14404fi
f053c89f
CY
14405
14406
e9a63f04
GM
14407as_nl='
14408'
14409export as_nl
14410# Printing a long string crashes Solaris 7 /usr/bin/printf.
14411as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14412as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14413as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
14414# Prefer a ksh shell builtin over an external printf program on Solaris,
14415# but without wasting forks for bash or zsh.
14416if test -z "$BASH_VERSION$ZSH_VERSION" \
14417 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14418 as_echo='print -r --'
14419 as_echo_n='print -rn --'
14420elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
14421 as_echo='printf %s\n'
14422 as_echo_n='printf %s'
14423else
14424 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14425 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14426 as_echo_n='/usr/ucb/echo -n'
7bbec45b 14427 else
e9a63f04
GM
14428 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14429 as_echo_n_body='eval
14430 arg=$1;
eb697db5 14431 case $arg in #(
e9a63f04
GM
14432 *"$as_nl"*)
14433 expr "X$arg" : "X\\(.*\\)$as_nl";
14434 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14435 esac;
14436 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14437 '
14438 export as_echo_n_body
14439 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 14440 fi
e9a63f04
GM
14441 export as_echo_body
14442 as_echo='sh -c $as_echo_body as_echo'
14443fi
14444
14445# The user is always right.
14446if test "${PATH_SEPARATOR+set}" != set; then
14447 PATH_SEPARATOR=:
14448 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14449 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14450 PATH_SEPARATOR=';'
14451 }
503d2be0
AS
14452fi
14453
6bae0ccf 14454
ca81d7a0
JD
14455# IFS
14456# We need space, tab and new line, in precisely that order. Quoting is
14457# there to prevent editors from complaining about space-tab.
14458# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14459# splitting by setting IFS to empty value.)
ca81d7a0
JD
14460IFS=" "" $as_nl"
14461
14462# Find who we are. Look in the path if we contain no directory separator.
eb697db5 14463case $0 in #((
ca81d7a0
JD
14464 *[\\/]* ) as_myself=$0 ;;
14465 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14466for as_dir in $PATH
14467do
14468 IFS=$as_save_IFS
14469 test -z "$as_dir" && as_dir=.
eb697db5
DN
14470 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14471 done
ca81d7a0
JD
14472IFS=$as_save_IFS
14473
14474 ;;
14475esac
14476# We did not find ourselves, most probably we were run as `sh COMMAND'
14477# in which case we are not to be found in the path.
14478if test "x$as_myself" = x; then
14479 as_myself=$0
14480fi
14481if test ! -f "$as_myself"; then
e9a63f04 14482 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 14483 exit 1
ca81d7a0
JD
14484fi
14485
eb697db5
DN
14486# Unset variables that we do not need and which cause bugs (e.g. in
14487# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14488# suppresses any "Segmentation fault" message there. '((' could
14489# trigger a bug in pdksh 5.2.14.
14490for as_var in BASH_ENV ENV MAIL MAILPATH
14491do eval test x\${$as_var+set} = xset \
14492 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 14493done
6bae0ccf
DL
14494PS1='$ '
14495PS2='> '
14496PS4='+ '
14497
14498# NLS nuisances.
e9a63f04
GM
14499LC_ALL=C
14500export LC_ALL
14501LANGUAGE=C
14502export LANGUAGE
6bae0ccf 14503
eb697db5
DN
14504# CDPATH.
14505(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14506
14507
14508# as_fn_error ERROR [LINENO LOG_FD]
14509# ---------------------------------
14510# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14511# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14512# script with status $?, using 1 if that was 0.
14513as_fn_error ()
14514{
14515 as_status=$?; test $as_status -eq 0 && as_status=1
14516 if test "$3"; then
14517 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14518 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14519 fi
14520 $as_echo "$as_me: error: $1" >&2
14521 as_fn_exit $as_status
14522} # as_fn_error
14523
14524
14525# as_fn_set_status STATUS
14526# -----------------------
14527# Set $? to STATUS, without forking.
14528as_fn_set_status ()
14529{
14530 return $1
14531} # as_fn_set_status
14532
14533# as_fn_exit STATUS
14534# -----------------
14535# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14536as_fn_exit ()
14537{
14538 set +e
14539 as_fn_set_status $1
14540 exit $1
14541} # as_fn_exit
14542
14543# as_fn_unset VAR
14544# ---------------
14545# Portably unset VAR.
14546as_fn_unset ()
14547{
14548 { eval $1=; unset $1;}
14549}
14550as_unset=as_fn_unset
14551# as_fn_append VAR VALUE
14552# ----------------------
14553# Append the text in VALUE to the end of the definition contained in VAR. Take
14554# advantage of any shell optimizations that allow amortized linear growth over
14555# repeated appends, instead of the typical quadratic growth present in naive
14556# implementations.
14557if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14558 eval 'as_fn_append ()
14559 {
14560 eval $1+=\$2
14561 }'
14562else
14563 as_fn_append ()
14564 {
14565 eval $1=\$$1\$2
14566 }
14567fi # as_fn_append
14568
14569# as_fn_arith ARG...
14570# ------------------
14571# Perform arithmetic evaluation on the ARGs, and store the result in the
14572# global $as_val. Take advantage of shells that can avoid forks. The arguments
14573# must be portable across $(()) and expr.
14574if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14575 eval 'as_fn_arith ()
14576 {
14577 as_val=$(( $* ))
14578 }'
14579else
14580 as_fn_arith ()
14581 {
14582 as_val=`expr "$@" || test $? -eq 1`
14583 }
14584fi # as_fn_arith
14585
14586
ca81d7a0
JD
14587if expr a : '\(a\)' >/dev/null 2>&1 &&
14588 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
14589 as_expr=expr
14590else
14591 as_expr=false
14592fi
14593
ca81d7a0 14594if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
14595 as_basename=basename
14596else
14597 as_basename=false
14598fi
c0d27fcc 14599
eb697db5
DN
14600if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14601 as_dirname=dirname
14602else
14603 as_dirname=false
14604fi
c0d27fcc 14605
ca81d7a0 14606as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
14607$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14608 X"$0" : 'X\(//\)$' \| \
ca81d7a0 14609 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 14610$as_echo X/"$0" |
ca81d7a0
JD
14611 sed '/^.*\/\([^/][^/]*\)\/*$/{
14612 s//\1/
14613 q
14614 }
14615 /^X\/\(\/\/\)$/{
14616 s//\1/
14617 q
14618 }
14619 /^X\/\(\/\).*/{
14620 s//\1/
14621 q
14622 }
14623 s/.*/./; q'`
c0d27fcc 14624
eb697db5
DN
14625# Avoid depending upon Character Ranges.
14626as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14627as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14628as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14629as_cr_digits='0123456789'
14630as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
14631
14632ECHO_C= ECHO_N= ECHO_T=
eb697db5 14633case `echo -n x` in #(((((
ca81d7a0 14634-n*)
eb697db5 14635 case `echo 'xy\c'` in
ca81d7a0 14636 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
eb697db5
DN
14637 xy) ECHO_C='\c';;
14638 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14639 ECHO_T=' ';;
ca81d7a0
JD
14640 esac;;
14641*)
14642 ECHO_N='-n';;
c0d27fcc 14643esac
503d2be0
AS
14644
14645rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
14646if test -d conf$$.dir; then
14647 rm -f conf$$.dir/conf$$.file
14648else
14649 rm -f conf$$.dir
e9a63f04
GM
14650 mkdir conf$$.dir 2>/dev/null
14651fi
14652if (echo >conf$$.file) 2>/dev/null; then
14653 if ln -s conf$$.file conf$$ 2>/dev/null; then
14654 as_ln_s='ln -s'
14655 # ... but there are two gotchas:
14656 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14657 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14658 # In both cases, we have to default to `cp -p'.
14659 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14660 as_ln_s='cp -p'
14661 elif ln conf$$.file conf$$ 2>/dev/null; then
14662 as_ln_s=ln
14663 else
503d2be0 14664 as_ln_s='cp -p'
e9a63f04 14665 fi
503d2be0
AS
14666else
14667 as_ln_s='cp -p'
14668fi
ca81d7a0
JD
14669rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14670rmdir conf$$.dir 2>/dev/null
503d2be0 14671
eb697db5
DN
14672
14673# as_fn_mkdir_p
14674# -------------
14675# Create "$as_dir" as a directory, including parents if necessary.
14676as_fn_mkdir_p ()
14677{
14678
14679 case $as_dir in #(
14680 -*) as_dir=./$as_dir;;
14681 esac
14682 test -d "$as_dir" || eval $as_mkdir_p || {
14683 as_dirs=
14684 while :; do
14685 case $as_dir in #(
14686 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14687 *) as_qdir=$as_dir;;
14688 esac
14689 as_dirs="'$as_qdir' $as_dirs"
14690 as_dir=`$as_dirname -- "$as_dir" ||
14691$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14692 X"$as_dir" : 'X\(//\)[^/]' \| \
14693 X"$as_dir" : 'X\(//\)$' \| \
14694 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14695$as_echo X"$as_dir" |
14696 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14697 s//\1/
14698 q
14699 }
14700 /^X\(\/\/\)[^/].*/{
14701 s//\1/
14702 q
14703 }
14704 /^X\(\/\/\)$/{
14705 s//\1/
14706 q
14707 }
14708 /^X\(\/\).*/{
14709 s//\1/
14710 q
14711 }
14712 s/.*/./; q'`
14713 test -d "$as_dir" && break
14714 done
14715 test -z "$as_dirs" || eval "mkdir $as_dirs"
14716 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14717
14718
14719} # as_fn_mkdir_p
6bae0ccf 14720if mkdir -p . 2>/dev/null; then
eb697db5 14721 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 14722else
edfaf76d 14723 test -d ./-p && rmdir ./-p
6bae0ccf
DL
14724 as_mkdir_p=false
14725fi
14726
f053c89f
CY
14727if test -x / >/dev/null 2>&1; then
14728 as_test_x='test -x'
ca81d7a0 14729else
f053c89f
CY
14730 if ls -dL / >/dev/null 2>&1; then
14731 as_ls_L_option=L
14732 else
14733 as_ls_L_option=
14734 fi
14735 as_test_x='
14736 eval sh -c '\''
14737 if test -d "$1"; then
e9a63f04 14738 test -d "$1/.";
f053c89f 14739 else
eb697db5 14740 case $1 in #(
e9a63f04 14741 -*)set "./$1";;
f053c89f 14742 esac;
eb697db5 14743 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
14744 ???[sx]*):;;*)false;;esac;fi
14745 '\'' sh
14746 '
ca81d7a0 14747fi
f053c89f 14748as_executable_p=$as_test_x
503d2be0 14749
c0d27fcc 14750# Sed expression to map a string onto a valid CPP name.
edfaf76d 14751as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
14752
14753# Sed expression to map a string onto a valid variable name.
edfaf76d 14754as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 14755
503d2be0 14756
503d2be0 14757exec 6>&1
eb697db5
DN
14758## ----------------------------------- ##
14759## Main body of $CONFIG_STATUS script. ##
14760## ----------------------------------- ##
14761_ASEOF
14762test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 14763
eb697db5
DN
14764cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14765# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 14766# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
14767# values after options handling.
14768ac_log="
49a62e8a 14769This file was extended by emacs $as_me 24.0.50, which was
eb697db5 14770generated by GNU Autoconf 2.65. Invocation command line was
c0d27fcc
MR
14771
14772 CONFIG_FILES = $CONFIG_FILES
14773 CONFIG_HEADERS = $CONFIG_HEADERS
14774 CONFIG_LINKS = $CONFIG_LINKS
14775 CONFIG_COMMANDS = $CONFIG_COMMANDS
14776 $ $0 $@
14777
ca81d7a0
JD
14778on `(hostname || uname -n) 2>/dev/null | sed 1q`
14779"
14780
503d2be0
AS
14781_ACEOF
14782
eb697db5
DN
14783case $ac_config_files in *"
14784"*) set x $ac_config_files; shift; ac_config_files=$*;;
14785esac
14786
14787case $ac_config_headers in *"
14788"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14789esac
14790
14791
e9a63f04 14792cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14793# Files that config.status was made for.
ca81d7a0
JD
14794config_files="$ac_config_files"
14795config_headers="$ac_config_headers"
14796config_commands="$ac_config_commands"
503d2be0 14797
ca81d7a0 14798_ACEOF
503d2be0 14799
e9a63f04 14800cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 14801ac_cs_usage="\
eb697db5
DN
14802\`$as_me' instantiates files and other configuration actions
14803from templates according to the current configuration. Unless the files
14804and actions are specified as TAGs, all are instantiated by default.
503d2be0 14805
eb697db5 14806Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
14807
14808 -h, --help print this help, then exit
f053c89f 14809 -V, --version print version number and configuration settings, then exit
eb697db5
DN
14810 --config print configuration, then exit
14811 -q, --quiet, --silent
14812 do not print progress messages
503d2be0
AS
14813 -d, --debug don't remove temporary files
14814 --recheck update $as_me by reconfiguring in the same conditions
eb697db5 14815 --file=FILE[:TEMPLATE]
e9a63f04 14816 instantiate the configuration file FILE
eb697db5 14817 --header=FILE[:TEMPLATE]
e9a63f04 14818 instantiate the configuration header FILE
503d2be0
AS
14819
14820Configuration files:
14821$config_files
14822
14823Configuration headers:
14824$config_headers
14825
14826Configuration commands:
14827$config_commands
14828
eb697db5 14829Report bugs to the package provider."
503d2be0 14830
ca81d7a0 14831_ACEOF
e9a63f04 14832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
eb697db5 14833ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 14834ac_cs_version="\\
49a62e8a 14835emacs config.status 24.0.50
eb697db5
DN
14836configured by $0, generated by GNU Autoconf 2.65,
14837 with options \\"\$ac_cs_config\\"
503d2be0 14838
eb697db5 14839Copyright (C) 2009 Free Software Foundation, Inc.
503d2be0
AS
14840This config.status script is free software; the Free Software Foundation
14841gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
14842
14843ac_pwd='$ac_pwd'
14844srcdir='$srcdir'
14845INSTALL='$INSTALL'
e9a63f04 14846test -n "\$AWK" || AWK=awk
c0d27fcc 14847_ACEOF
503d2be0 14848
e9a63f04
GM
14849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14850# The default lists apply if the user does not specify any file.
503d2be0
AS
14851ac_need_defaults=:
14852while test $# != 0
ba4481b5 14853do
503d2be0
AS
14854 case $1 in
14855 --*=*)
ca81d7a0
JD
14856 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14857 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
14858 ac_shift=:
14859 ;;
ca81d7a0 14860 *)
6bae0ccf
DL
14861 ac_option=$1
14862 ac_optarg=$2
14863 ac_shift=shift
503d2be0 14864 ;;
503d2be0
AS
14865 esac
14866
6bae0ccf 14867 case $ac_option in
503d2be0 14868 # Handling of the options.
19650fd6
AS
14869 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14870 ac_cs_recheck=: ;;
ca81d7a0 14871 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 14872 $as_echo "$ac_cs_version"; exit ;;
eb697db5
DN
14873 --config | --confi | --conf | --con | --co | --c )
14874 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 14875 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
14876 debug=: ;;
14877 --file | --fil | --fi | --f )
6bae0ccf 14878 $ac_shift
e9a63f04
GM
14879 case $ac_optarg in
14880 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14881 esac
eb697db5 14882 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
14883 ac_need_defaults=false;;
14884 --header | --heade | --head | --hea )
6bae0ccf 14885 $ac_shift
e9a63f04
GM
14886 case $ac_optarg in
14887 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14888 esac
eb697db5 14889 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 14890 ac_need_defaults=false;;
ca81d7a0
JD
14891 --he | --h)
14892 # Conflict between --help and --header
eb697db5
DN
14893 as_fn_error "ambiguous option: \`$1'
14894Try \`$0 --help' for more information.";;
ca81d7a0 14895 --help | --hel | -h )
e9a63f04 14896 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
14897 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14898 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14899 ac_cs_silent=: ;;
503d2be0
AS
14900
14901 # This is an error.
eb697db5
DN
14902 -*) as_fn_error "unrecognized option: \`$1'
14903Try \`$0 --help' for more information." ;;
503d2be0 14904
eb697db5 14905 *) as_fn_append ac_config_targets " $1"
ca81d7a0 14906 ac_need_defaults=false ;;
503d2be0 14907
ba4481b5 14908 esac
503d2be0 14909 shift
ba4481b5
DL
14910done
14911
19650fd6
AS
14912ac_configure_extra_args=
14913
14914if $ac_cs_silent; then
14915 exec 6>/dev/null
14916 ac_configure_extra_args="$ac_configure_extra_args --silent"
14917fi
14918
14919_ACEOF
e9a63f04 14920cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 14921if \$ac_cs_recheck; then
e9a63f04
GM
14922 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14923 shift
14924 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14925 CONFIG_SHELL='$SHELL'
ca81d7a0 14926 export CONFIG_SHELL
e9a63f04 14927 exec "\$@"
19650fd6
AS
14928fi
14929
503d2be0 14930_ACEOF
e9a63f04 14931cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14932exec 5>>config.log
14933{
14934 echo
14935 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14936## Running $as_me. ##
14937_ASBOX
e9a63f04 14938 $as_echo "$ac_log"
ca81d7a0 14939} >&5
ba4481b5 14940
ca81d7a0 14941_ACEOF
e9a63f04 14942cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14943#
ca81d7a0 14944# INIT-COMMANDS
503d2be0 14945#
81ac4f35 14946GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
503d2be0 14947
c0d27fcc
MR
14948_ACEOF
14949
e9a63f04 14950cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14951
14952# Handling of arguments.
503d2be0
AS
14953for ac_config_target in $ac_config_targets
14954do
ca81d7a0
JD
14955 case $ac_config_target in
14956 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
14957 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
981f8c13 14958 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
ca81d7a0 14959 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
14960 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
14961 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
14962 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
14963 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
81ac4f35 14964 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
f657c21b 14965 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 14966 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
14967 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
14968 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14969
eb697db5 14970 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 14971 esac
ba4481b5 14972done
503d2be0 14973
ca81d7a0 14974
503d2be0
AS
14975# If the user did not use the arguments to specify the items to instantiate,
14976# then the envvar interface is used. Set only those that are not.
14977# We use the long form for the default assignment because of an extremely
14978# bizarre bug on SunOS 4.1.3.
14979if $ac_need_defaults; then
14980 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14981 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14982 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 14983fi
503d2be0 14984
19650fd6 14985# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 14986# simply because there is no reason against having it here, and in addition,
19650fd6 14987# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
14988# Hook for its removal unless debugging.
14989# Note that there is a small window in which the directory will not be cleaned:
14990# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
14991$debug ||
14992{
ca81d7a0
JD
14993 tmp=
14994 trap 'exit_status=$?
14995 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14996' 0
eb697db5 14997 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 14998}
503d2be0 14999# Create a (secure) tmp directory for tmp files.
19650fd6 15000
503d2be0 15001{
ca81d7a0 15002 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
15003 test -n "$tmp" && test -d "$tmp"
15004} ||
15005{
ca81d7a0
JD
15006 tmp=./conf$$-$RANDOM
15007 (umask 077 && mkdir "$tmp")
eb697db5 15008} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 15009
e9a63f04
GM
15010# Set up the scripts for CONFIG_FILES section.
15011# No need to generate them if there are no CONFIG_FILES.
15012# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
15013if test -n "$CONFIG_FILES"; then
15014
648b8e6d
GM
15015if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15016 ac_cs_awk_getline=:
15017 ac_cs_awk_pipe_init=
15018 ac_cs_awk_read_file='
15019 while ((getline aline < (F[key])) > 0)
15020 print(aline)
15021 close(F[key])'
15022 ac_cs_awk_pipe_fini=
15023else
15024 ac_cs_awk_getline=false
15025 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15026 ac_cs_awk_read_file='
15027 print "|#_!!_#|"
15028 print "cat " F[key] " &&"
15029 '$ac_cs_awk_pipe_init
15030 # The final `:' finishes the AND list.
15031 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15032fi
eb697db5
DN
15033ac_cr=`echo X | tr X '\015'`
15034# On cygwin, bash can eat \r inside `` if the user requested igncr.
15035# But we know of no other shell where ac_cr would be empty at this
15036# point, so we can use a bashism as a fallback.
15037if test "x$ac_cr" = x; then
15038 eval ac_cr=\$\'\\r\'
15039fi
e9a63f04
GM
15040ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15041if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
eb697db5 15042 ac_cs_awk_cr='\r'
e9a63f04
GM
15043else
15044 ac_cs_awk_cr=$ac_cr
ca81d7a0 15045fi
503d2be0 15046
e9a63f04 15047echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 15048_ACEOF
503d2be0 15049
648b8e6d
GM
15050# Create commands to substitute file output variables.
15051{
15052 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15053 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15054 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15055 echo "_ACAWK" &&
15056 echo "_ACEOF"
15057} >conf$$files.sh &&
15058. ./conf$$files.sh ||
eb697db5 15059 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
648b8e6d 15060rm -f conf$$files.sh
ca81d7a0 15061
e9a63f04
GM
15062{
15063 echo "cat >conf$$subs.awk <<_ACEOF" &&
15064 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15065 echo "_ACEOF"
15066} >conf$$subs.sh ||
eb697db5 15067 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15068ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ca81d7a0
JD
15069ac_delim='%!_!# '
15070for ac_last_try in false false false false false :; do
e9a63f04 15071 . ./conf$$subs.sh ||
eb697db5 15072 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15073
eb697db5
DN
15074 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15075 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
15076 break
15077 elif $ac_last_try; then
eb697db5 15078 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
15079 else
15080 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 15081 fi
ca81d7a0 15082done
e9a63f04
GM
15083rm -f conf$$subs.sh
15084
15085cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15086cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15087_ACEOF
15088sed -n '
15089h
15090s/^/S["/; s/!.*/"]=/
15091p
15092g
15093s/^[^!]*!//
15094:repl
15095t repl
15096s/'"$ac_delim"'$//
15097t delim
15098:nl
15099h
eb697db5 15100s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15101t more1
15102s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15103p
15104n
15105b repl
15106:more1
15107s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15108p
15109g
15110s/.\{148\}//
15111t nl
15112:delim
15113h
eb697db5 15114s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15115t more2
15116s/["\\]/\\&/g; s/^/"/; s/$/"/
15117p
15118b
15119:more2
15120s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15121p
15122g
15123s/.\{148\}//
15124t delim
15125' <conf$$subs.awk | sed '
15126/^[^""]/{
15127 N
15128 s/\n//
15129}
15130' >>$CONFIG_STATUS || ac_write_fail=1
15131rm -f conf$$subs.awk
15132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15133_ACAWK
15134cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15135 for (key in S) S_is_set[key] = 1
15136 FS = "\a"
648b8e6d 15137 \$ac_cs_awk_pipe_init
e9a63f04
GM
15138}
15139{
15140 line = $ 0
15141 nfields = split(line, field, "@")
15142 substed = 0
15143 len = length(field[1])
15144 for (i = 2; i < nfields; i++) {
15145 key = field[i]
15146 keylen = length(key)
15147 if (S_is_set[key]) {
15148 value = S[key]
15149 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15150 len += length(value) + length(field[++i])
15151 substed = 1
15152 } else
15153 len += 1 + keylen
15154 }
648b8e6d
GM
15155 if (nfields == 3 && !substed) {
15156 key = field[2]
15157 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15158 \$ac_cs_awk_read_file
15159 next
15160 }
15161 }
e9a63f04
GM
15162 print line
15163}
648b8e6d 15164\$ac_cs_awk_pipe_fini
e9a63f04 15165_ACAWK
ca81d7a0 15166_ACEOF
e9a63f04
GM
15167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15168if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15169 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15170else
15171 cat
15172fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
eb697db5 15173 || as_fn_error "could not setup config files machinery" "$LINENO" 5
c0d27fcc 15174_ACEOF
ca81d7a0 15175
ca81d7a0
JD
15176# VPATH may cause trouble with some makes, so we remove $(srcdir),
15177# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15178# trailing colons and then remove the whole line if VPATH becomes empty
15179# (actually we leave an empty line to preserve line numbers).
15180if test "x$srcdir" = x.; then
15181 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15182s/:*\$(srcdir):*/:/
15183s/:*\${srcdir}:*/:/
15184s/:*@srcdir@:*/:/
15185s/^\([^=]*=[ ]*\):*/\1/
15186s/:*$//
15187s/^[^=]*=[ ]*$//
15188}'
15189fi
15190
e9a63f04 15191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15192fi # test -n "$CONFIG_FILES"
15193
e9a63f04
GM
15194# Set up the scripts for CONFIG_HEADERS section.
15195# No need to generate them if there are no CONFIG_HEADERS.
15196# This happens for instance with `./config.status Makefile'.
15197if test -n "$CONFIG_HEADERS"; then
15198cat >"$tmp/defines.awk" <<\_ACAWK ||
15199BEGIN {
15200_ACEOF
dc2933eb 15201
e9a63f04
GM
15202# Transform confdefs.h into an awk script `defines.awk', embedded as
15203# here-document in config.status, that substitutes the proper values into
15204# config.h.in to produce config.h.
15205
15206# Create a delimiter string that does not exist in confdefs.h, to ease
15207# handling of long lines.
15208ac_delim='%!_!# '
15209for ac_last_try in false false :; do
15210 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15211 if test -z "$ac_t"; then
15212 break
15213 elif $ac_last_try; then
eb697db5 15214 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
15215 else
15216 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15217 fi
15218done
15219
15220# For the awk script, D is an array of macro values keyed by name,
15221# likewise P contains macro parameters if any. Preserve backslash
15222# newline sequences.
15223
15224ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15225sed -n '
15226s/.\{148\}/&'"$ac_delim"'/g
15227t rset
15228:rset
15229s/^[ ]*#[ ]*define[ ][ ]*/ /
15230t def
15231d
15232:def
15233s/\\$//
15234t bsnl
15235s/["\\]/\\&/g
15236s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15237D["\1"]=" \3"/p
15238s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15239d
15240:bsnl
15241s/["\\]/\\&/g
15242s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15243D["\1"]=" \3\\\\\\n"\\/p
15244t cont
15245s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15246t cont
15247d
15248:cont
15249n
15250s/.\{148\}/&'"$ac_delim"'/g
15251t clear
15252:clear
15253s/\\$//
15254t bsnlc
15255s/["\\]/\\&/g; s/^/"/; s/$/"/p
15256d
15257:bsnlc
15258s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15259b cont
15260' <confdefs.h | sed '
15261s/'"$ac_delim"'/"\\\
15262"/g' >>$CONFIG_STATUS || ac_write_fail=1
15263
15264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15265 for (key in D) D_is_set[key] = 1
15266 FS = "\a"
15267}
15268/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15269 line = \$ 0
15270 split(line, arg, " ")
15271 if (arg[1] == "#") {
15272 defundef = arg[2]
15273 mac1 = arg[3]
15274 } else {
15275 defundef = substr(arg[1], 2)
15276 mac1 = arg[2]
15277 }
15278 split(mac1, mac2, "(") #)
15279 macro = mac2[1]
eb697db5 15280 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
15281 if (D_is_set[macro]) {
15282 # Preserve the white space surrounding the "#".
e9a63f04
GM
15283 print prefix "define", macro P[macro] D[macro]
15284 next
15285 } else {
15286 # Replace #undef with comments. This is necessary, for example,
15287 # in the case of _POSIX_SOURCE, which is predefined and required
15288 # on some systems where configure will not decide to define it.
15289 if (defundef == "undef") {
eb697db5 15290 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
15291 next
15292 }
15293 }
15294}
15295{ print }
15296_ACAWK
15297_ACEOF
15298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
eb697db5 15299 as_fn_error "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
15300fi # test -n "$CONFIG_HEADERS"
15301
15302
15303eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15304shift
15305for ac_tag
ca81d7a0
JD
15306do
15307 case $ac_tag in
15308 :[FHLC]) ac_mode=$ac_tag; continue;;
15309 esac
15310 case $ac_mode$ac_tag in
15311 :[FHL]*:*);;
eb697db5 15312 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
15313 :[FH]-) ac_tag=-:-;;
15314 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15315 esac
15316 ac_save_IFS=$IFS
15317 IFS=:
15318 set x $ac_tag
15319 IFS=$ac_save_IFS
15320 shift
15321 ac_file=$1
15322 shift
15323
15324 case $ac_mode in
15325 :L) ac_source=$1;;
15326 :[FH])
15327 ac_file_inputs=
15328 for ac_f
15329 do
15330 case $ac_f in
15331 -) ac_f="$tmp/stdin";;
15332 *) # Look for the file first in the build tree, then in the source tree
15333 # (if the path is not absolute). The absolute path cannot be DOS-style,
15334 # because $ac_f cannot contain `:'.
15335 test -f "$ac_f" ||
15336 case $ac_f in
15337 [\\/$]*) false;;
15338 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15339 esac ||
eb697db5 15340 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 15341 esac
e9a63f04 15342 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
eb697db5 15343 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
15344 done
15345
15346 # Let's still pretend it is `configure' which instantiates (i.e., don't
15347 # use $as_me), people would be surprised to read:
15348 # /* config.h. Generated by config.status. */
e9a63f04
GM
15349 configure_input='Generated from '`
15350 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15351 `' by configure.'
ca81d7a0
JD
15352 if test x"$ac_file" != x-; then
15353 configure_input="$ac_file. $configure_input"
eb697db5 15354 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 15355$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 15356 fi
e9a63f04
GM
15357 # Neutralize special characters interpreted by sed in replacement strings.
15358 case $configure_input in #(
15359 *\&* | *\|* | *\\* )
15360 ac_sed_conf_input=`$as_echo "$configure_input" |
15361 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15362 *) ac_sed_conf_input=$configure_input;;
15363 esac
ca81d7a0
JD
15364
15365 case $ac_tag in
e9a63f04 15366 *:-:* | *:-) cat >"$tmp/stdin" \
eb697db5 15367 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
15368 esac
15369 ;;
ba4481b5
DL
15370 esac
15371
ca81d7a0 15372 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 15373$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
15374 X"$ac_file" : 'X\(//\)[^/]' \| \
15375 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 15376 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 15377$as_echo X"$ac_file" |
ca81d7a0
JD
15378 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15379 s//\1/
15380 q
15381 }
15382 /^X\(\/\/\)[^/].*/{
15383 s//\1/
15384 q
15385 }
15386 /^X\(\/\/\)$/{
15387 s//\1/
15388 q
15389 }
15390 /^X\(\/\).*/{
15391 s//\1/
15392 q
15393 }
15394 s/.*/./; q'`
eb697db5 15395 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 15396 ac_builddir=.
98418dba 15397
ca81d7a0
JD
15398case "$ac_dir" in
15399.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15400*)
e9a63f04 15401 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 15402 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 15403 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
15404 case $ac_top_builddir_sub in
15405 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15406 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15407 esac ;;
15408esac
15409ac_abs_top_builddir=$ac_pwd
15410ac_abs_builddir=$ac_pwd$ac_dir_suffix
15411# for backward compatibility:
15412ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
15413
15414case $srcdir in
ca81d7a0 15415 .) # We are building in place.
c0d27fcc 15416 ac_srcdir=.
ca81d7a0
JD
15417 ac_top_srcdir=$ac_top_builddir_sub
15418 ac_abs_top_srcdir=$ac_pwd ;;
15419 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 15420 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
15421 ac_top_srcdir=$srcdir
15422 ac_abs_top_srcdir=$srcdir ;;
15423 *) # Relative name.
15424 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15425 ac_top_srcdir=$ac_top_build_prefix$srcdir
15426 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 15427esac
ca81d7a0 15428ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 15429
c0d27fcc 15430
ca81d7a0
JD
15431 case $ac_mode in
15432 :F)
15433 #
15434 # CONFIG_FILE
15435 #
ba4481b5 15436
503d2be0
AS
15437 case $INSTALL in
15438 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 15439 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 15440 esac
ca81d7a0 15441_ACEOF
ba4481b5 15442
e9a63f04 15443cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15444# If the template does not know about datarootdir, expand it.
15445# FIXME: This hack should be removed a few years after 2.60.
15446ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
15447ac_sed_dataroot='
15448/datarootdir/ {
ca81d7a0
JD
15449 p
15450 q
15451}
15452/@datadir@/p
15453/@docdir@/p
15454/@infodir@/p
15455/@localedir@/p
eb697db5 15456/@mandir@/p'
e9a63f04 15457case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
15458*datarootdir*) ac_datarootdir_seen=yes;;
15459*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
eb697db5 15460 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 15461$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 15462_ACEOF
e9a63f04 15463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
15464 ac_datarootdir_hack='
15465 s&@datadir@&$datadir&g
15466 s&@docdir@&$docdir&g
15467 s&@infodir@&$infodir&g
15468 s&@localedir@&$localedir&g
15469 s&@mandir@&$mandir&g
eb697db5 15470 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 15471esac
c0d27fcc 15472_ACEOF
ca81d7a0
JD
15473
15474# Neutralize VPATH when `$srcdir' = `.'.
15475# Shell code in configure.ac might set extrasub.
15476# FIXME: do we really want to maintain this feature?
e9a63f04
GM
15477cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15478ac_sed_extra="$ac_vpsub
503d2be0 15479$extrasub
c0d27fcc 15480_ACEOF
e9a63f04 15481cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
15482:t
15483/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 15484s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 15485s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 15486s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
15487s&@srcdir@&$ac_srcdir&;t t
15488s&@abs_srcdir@&$ac_abs_srcdir&;t t
15489s&@top_srcdir@&$ac_top_srcdir&;t t
15490s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15491s&@builddir@&$ac_builddir&;t t
15492s&@abs_builddir@&$ac_abs_builddir&;t t
15493s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15494s&@INSTALL@&$ac_INSTALL&;t t
15495$ac_datarootdir_hack
e9a63f04 15496"
648b8e6d
GM
15497eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15498if $ac_cs_awk_getline; then
15499 $AWK -f "$tmp/subs.awk"
15500else
15501 $AWK -f "$tmp/subs.awk" | $SHELL
15502fi >$tmp/out \
eb697db5 15503 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15504
15505test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15506 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15507 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
eb697db5 15508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0 15509which seems to be undefined. Please make sure it is defined." >&5
e9a63f04 15510$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0
JD
15511which seems to be undefined. Please make sure it is defined." >&2;}
15512
15513 rm -f "$tmp/stdin"
503d2be0 15514 case $ac_file in
e9a63f04
GM
15515 -) cat "$tmp/out" && rm -f "$tmp/out";;
15516 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15517 esac \
eb697db5 15518 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15519 ;;
15520 :H)
15521 #
15522 # CONFIG_HEADER
15523 #
503d2be0 15524 if test x"$ac_file" != x-; then
e9a63f04
GM
15525 {
15526 $as_echo "/* $configure_input */" \
15527 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15528 } >"$tmp/config.h" \
eb697db5 15529 || as_fn_error "could not create $ac_file" "$LINENO" 5
e9a63f04 15530 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
eb697db5 15531 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 15532$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 15533 else
e9a63f04
GM
15534 rm -f "$ac_file"
15535 mv "$tmp/config.h" "$ac_file" \
eb697db5 15536 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba4481b5 15537 fi
503d2be0 15538 else
e9a63f04
GM
15539 $as_echo "/* $configure_input */" \
15540 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
eb697db5 15541 || as_fn_error "could not create -" "$LINENO" 5
ba4481b5 15542 fi
ca81d7a0 15543 ;;
edfaf76d 15544
eb697db5 15545 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 15546$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
15547 ;;
15548 esac
ba4481b5 15549
c0d27fcc 15550
ca81d7a0
JD
15551 case $ac_file$ac_mode in
15552 "default":C)
ba4481b5
DL
15553
15554### Make the necessary directories, if they don't exist.
15555for dir in etc lisp ; do
15556 test -d ${dir} || mkdir ${dir}
15557done
15558
ba4481b5 15559echo creating src/epaths.h
4aa6b955 15560${MAKE-make} epaths-force
ba4481b5 15561
bf3126f6 15562if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 15563 echo creating src/.gdbinit
503d2be0 15564 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
15565fi
15566
503d2be0 15567 ;;
ca81d7a0 15568
503d2be0 15569 esac
ca81d7a0 15570done # for ac_tag
503d2be0 15571
ba4481b5 15572
eb697db5 15573as_fn_exit 0
c0d27fcc 15574_ACEOF
503d2be0
AS
15575ac_clean_files=$ac_clean_files_save
15576
e9a63f04 15577test $ac_write_fail = 0 ||
eb697db5 15578 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15579
c0d27fcc 15580
503d2be0
AS
15581# configure is writing to config.log, and then calls config.status.
15582# config.status does its own redirection, appending to config.log.
15583# Unfortunately, on DOS this fails, as config.log is still kept open
15584# by configure, so config.status won't be able to write to it; its
15585# output is simply discarded. So we exec the FD to /dev/null,
15586# effectively closing config.log, so it can be properly (re)opened and
15587# appended to by config.status. When coming back to configure, we
15588# need to make the FD available again.
15589if test "$no_create" != yes; then
15590 ac_cs_success=:
19650fd6
AS
15591 ac_config_status_args=
15592 test "$silent" = yes &&
15593 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 15594 exec 5>/dev/null
19650fd6 15595 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
15596 exec 5>>config.log
15597 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15598 # would make configure fail if this is the last instruction.
eb697db5 15599 $ac_cs_success || as_fn_exit $?
503d2be0 15600fi
e9a63f04 15601if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
eb697db5
DN
15602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15603$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 15604fi
f5f47add 15605
c0d27fcc 15606