Add declarations to header files.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
9164c0e4 3# Generated by GNU Autoconf 2.66 for emacs 24.0.50.
eb697db5 4#
ba4481b5 5#
ca81d7a0 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9164c0e4
AS
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
8# Foundation, Inc.
eb697db5
DN
9#
10#
ba4481b5
DL
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
eb697db5
DN
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
503d2be0 16
f053c89f
CY
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
20 emulate sh
21 NULLCMD=:
e9a63f04 22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
25 setopt NO_GLOB_SUBST
26else
eb697db5
DN
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
f053c89f 32esac
503d2be0 33fi
f053c89f
CY
34
35
e9a63f04
GM
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
7bbec45b 56 else
e9a63f04
GM
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
eb697db5 60 case $arg in #(
e9a63f04
GM
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 69 fi
e9a63f04
GM
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
503d2be0
AS
81fi
82
6bae0ccf 83
ca81d7a0
JD
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
ca81d7a0
JD
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
eb697db5 92case $0 in #((
ca81d7a0
JD
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
eb697db5
DN
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
ca81d7a0
JD
101IFS=$as_save_IFS
102
103 ;;
104esac
105# We did not find ourselves, most probably we were run as `sh COMMAND'
106# in which case we are not to be found in the path.
107if test "x$as_myself" = x; then
108 as_myself=$0
109fi
110if test ! -f "$as_myself"; then
e9a63f04 111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 112 exit 1
ca81d7a0
JD
113fi
114
eb697db5
DN
115# Unset variables that we do not need and which cause bugs (e.g. in
116# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117# suppresses any "Segmentation fault" message there. '((' could
118# trigger a bug in pdksh 5.2.14.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 122done
6bae0ccf
DL
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
e9a63f04
GM
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
6bae0ccf 132
eb697db5
DN
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150esac
151fi
152"
153 as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167 exitcode=1; echo positional parameters were not saved.
168fi
169test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177else
178 as_have_required=no
179fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200fi
201fi
202 done;;
203 esac
204 as_found=false
205done
206$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209fi; }
210IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
222fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232$0: including any error possibly output before this
233$0: message. Then install a modern shell, or manually run
234$0: the script under such a shell if you do have one."
235 fi
236 exit 1
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254 { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_fn_set_status ()
262{
263 return $1
264} # as_fn_set_status
265
266# as_fn_exit STATUS
267# -----------------
268# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269as_fn_exit ()
270{
271 set +e
272 as_fn_set_status $1
273 exit $1
274} # as_fn_exit
275
276# as_fn_mkdir_p
277# -------------
278# Create "$as_dir" as a directory, including parents if necessary.
279as_fn_mkdir_p ()
280{
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298$as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
9164c0e4 319 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
eb697db5
DN
320
321
322} # as_fn_mkdir_p
323# as_fn_append VAR VALUE
324# ----------------------
325# Append the text in VALUE to the end of the definition contained in VAR. Take
326# advantage of any shell optimizations that allow amortized linear growth over
327# repeated appends, instead of the typical quadratic growth present in naive
328# implementations.
329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339fi # as_fn_append
340
341# as_fn_arith ARG...
342# ------------------
343# Perform arithmetic evaluation on the ARGs, and store the result in the
344# global $as_val. Take advantage of shells that can avoid forks. The arguments
345# must be portable across $(()) and expr.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356fi # as_fn_arith
357
358
9164c0e4
AS
359# as_fn_error STATUS ERROR [LINENO LOG_FD]
360# ----------------------------------------
eb697db5
DN
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9164c0e4 363# script with STATUS, using 1 if that was 0.
eb697db5
DN
364as_fn_error ()
365{
9164c0e4
AS
366 as_status=$1; test $as_status -eq 0 && as_status=1
367 if test "$4"; then
368 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
eb697db5 370 fi
9164c0e4 371 $as_echo "$as_me: error: $2" >&2
eb697db5
DN
372 as_fn_exit $as_status
373} # as_fn_error
374
ca81d7a0
JD
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
377 as_expr=expr
378else
379 as_expr=false
380fi
381
ca81d7a0 382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
383 as_basename=basename
384else
385 as_basename=false
386fi
c0d27fcc 387
eb697db5
DN
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390else
391 as_dirname=false
392fi
c0d27fcc 393
ca81d7a0 394as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
ca81d7a0 397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 398$as_echo X/"$0" |
ca81d7a0
JD
399 sed '/^.*\/\([^/][^/]*\)\/*$/{
400 s//\1/
401 q
402 }
403 /^X\/\(\/\/\)$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\).*/{
408 s//\1/
409 q
410 }
411 s/.*/./; q'`
c0d27fcc 412
eb697db5
DN
413# Avoid depending upon Character Ranges.
414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417as_cr_digits='0123456789'
418as_cr_alnum=$as_cr_Letters$as_cr_digits
6bae0ccf 419
c0d27fcc 420
eb697db5
DN
421 as_lineno_1=$LINENO as_lineno_1a=$LINENO
422 as_lineno_2=$LINENO as_lineno_2a=$LINENO
423 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
426 sed -n '
427 p
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
433 b
434 :lineno
435 N
436 :loop
437 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438 t loop
439 s/-\n.*//
440 ' >$as_me.lineno &&
441 chmod +x "$as_me.lineno" ||
442 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
c0d27fcc 443
eb697db5
DN
444 # Don't try to exec as it changes $[0], causing all sort of problems
445 # (the dirname of $[0] is not the place where we might find the
446 # original and so on. Autoconf is especially sensitive to this).
447 . "./$as_me.lineno"
448 # Exit status is that of the last command.
449 exit
ca81d7a0 450}
c0d27fcc 451
eb697db5
DN
452ECHO_C= ECHO_N= ECHO_T=
453case `echo -n x` in #(((((
454-n*)
455 case `echo 'xy\c'` in
456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
457 xy) ECHO_C='\c';;
458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
459 ECHO_T=' ';;
460 esac;;
461*)
462 ECHO_N='-n';;
463esac
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.
9164c0e4 533# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
5929fbe7
GM
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
503d2be0 536
503d2be0
AS
537#
538# Initializations.
539#
ba4481b5 540ac_default_prefix=/usr/local
ca81d7a0 541ac_clean_files=
6bae0ccf 542ac_config_libobj_dir=.
ca81d7a0 543LIBOBJS=
503d2be0
AS
544cross_compiling=no
545subdirs=
c0d27fcc
MR
546MFLAGS=
547MAKEFLAGS=
503d2be0 548
c0d27fcc 549# Identity of this package.
9cf8f393
JD
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
49a62e8a
GM
552PACKAGE_VERSION='24.0.50'
553PACKAGE_STRING='emacs 24.0.50'
9cf8f393 554PACKAGE_BUGREPORT=''
eb697db5 555PACKAGE_URL=''
c0d27fcc 556
503d2be0
AS
557ac_unique_file="src/lisp.h"
558# Factoring default headers for most tests.
559ac_includes_default="\
560#include <stdio.h>
f053c89f 561#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
562# include <sys/types.h>
563#endif
f053c89f 564#ifdef HAVE_SYS_STAT_H
503d2be0
AS
565# include <sys/stat.h>
566#endif
f053c89f 567#ifdef STDC_HEADERS
503d2be0
AS
568# include <stdlib.h>
569# include <stddef.h>
570#else
f053c89f 571# ifdef HAVE_STDLIB_H
503d2be0
AS
572# include <stdlib.h>
573# endif
574#endif
f053c89f
CY
575#ifdef HAVE_STRING_H
576# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
577# include <memory.h>
578# endif
579# include <string.h>
580#endif
f053c89f 581#ifdef HAVE_STRINGS_H
503d2be0
AS
582# include <strings.h>
583#endif
f053c89f 584#ifdef HAVE_INTTYPES_H
503d2be0 585# include <inttypes.h>
503d2be0 586#endif
f053c89f 587#ifdef HAVE_STDINT_H
ca81d7a0 588# include <stdint.h>
503d2be0 589#endif
f053c89f 590#ifdef HAVE_UNISTD_H
503d2be0
AS
591# include <unistd.h>
592#endif"
ba4481b5 593
a51f4969 594ac_config_libobj_dir=src
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
eb697db5
DN
603LD_SWITCH_SYSTEM_TEMACS
604POST_ALLOC_OBJ
605PRE_ALLOC_OBJ
606CYGWIN_OBJ
607RALLOC_OBJ
608OLDXMENU_DEPS
609LIBX_OTHER
610LIBXMENU
611OLDXMENU
612OLDXMENU_TARGET
613LIBXT_OTHER
614TOOLKIT_LIBW
615WIDGET_OBJ
616XOBJ
617XMENU_OBJ
618FONT_OBJ
619OTHER_FILES
620GNU_OBJC_CFLAGS
621ns_appsrc
622ns_appresdir
623ns_appbindir
624ns_appdir
625opsysfile
626machfile
627X_TOOLKIT_TYPE
628C_SWITCH_X_SYSTEM
629C_SWITCH_X_SITE
630LD_SWITCH_X_SITE
631gameuser
632gamedir
633bitmapdir
634archlibdir
635etcdir
636x_default_search_path
637lisppath
638locallisppath
639lispdir
640srcdir
641canonical
642configuration
643version
644KRB4LIB
645DESLIB
646KRB5LIB
647CRYPTOLIB
648COM_ERRLIB
649LIBRESOLV
650LIBHESIOD
651TERMCAP_OBJ
652LIBS_TERMCAP
653GETOPTOBJS
654GETOPT_H
655GETLOADAVG_LIBS
656KMEM_GROUP
657NEED_SETGID
658LIBOBJS
659BLESSMAIL_TARGET
660LIBS_MAIL
661liblockfile
662ALLOCA
663LIBXSM
664LIBGPM
665LIBGIF
666LIBTIFF
667LIBPNG
668LIBJPEG
669LIBXPM
670FREETYPE_LIBS
671FREETYPE_CFLAGS
672M17N_FLT_LIBS
673M17N_FLT_CFLAGS
674LIBOTF_LIBS
675LIBOTF_CFLAGS
676XFT_LIBS
677XFT_CFLAGS
678FONTCONFIG_LIBS
679FONTCONFIG_CFLAGS
680LIBXMU
681LIBXTR6
682LIBSELINUX_LIBS
683GCONF_LIBS
684GCONF_CFLAGS
685DBUS_OBJ
686DBUS_LIBS
687DBUS_CFLAGS
688GTK_OBJ
689GTK_LIBS
690GTK_CFLAGS
691RSVG_LIBS
692RSVG_CFLAGS
693VMLIMIT_OBJ
694GMALLOC_OBJ
695HAVE_XSERVER
696LIB_STANDARD
697NS_SUPPORT
698NS_OBJ
699TEMACS_LDFLAGS2
700LD_SWITCH_X_SITE_AUX_RPATH
701LD_SWITCH_X_SITE_AUX
702XMKMF
703DEPFLAGS
704MKDEPDIR
705SET_MAKE
706CFLAGS_SOUND
707ALSA_LIBS
708ALSA_CFLAGS
709PKG_CONFIG
710LIBSOUND
711START_FILES
712LIB_MATH
713CRT_DIR
714LIBS_SYSTEM
715C_SWITCH_SYSTEM
716UNEXEC_OBJ
717C_SWITCH_MACHINE
718LD_SWITCH_SYSTEM
e7586c7a 719CANNOT_DUMP
eb697db5
DN
720MAKEINFO
721GZIP_PROG
722INSTALL_INFO
723RANLIB
724INSTALL_DATA
725INSTALL_SCRIPT
726INSTALL_PROGRAM
e6cfa7c3 727C_WARNINGS_SWITCH
eb697db5
DN
728EGREP
729GREP
730CPP
731OBJEXT
732EXEEXT
733ac_ct_CC
734CPPFLAGS
735LDFLAGS
736CFLAGS
737CC
738host_os
739host_vendor
740host_cpu
741host
742build_os
743build_vendor
744build_cpu
745build
e6cfa7c3
AS
746PROFILING_LDFLAGS
747PROFILING_CFLAGS
eb697db5 748MAINT
e547b051 749GZIP_INFO
eb697db5
DN
750target_alias
751host_alias
752build_alias
753LIBS
754ECHO_T
755ECHO_N
756ECHO_C
757DEFS
758mandir
759localedir
760libdir
761psdir
762pdfdir
763dvidir
764htmldir
765infodir
766docdir
767oldincludedir
768includedir
769localstatedir
770sharedstatedir
771sysconfdir
772datadir
773datarootdir
774libexecdir
775sbindir
776bindir
777program_transform_name
778prefix
779exec_prefix
780PACKAGE_URL
781PACKAGE_BUGREPORT
782PACKAGE_STRING
783PACKAGE_VERSION
784PACKAGE_TARNAME
785PACKAGE_NAME
786PATH_SEPARATOR
787SHELL'
788ac_subst_files='deps_frag
789ns_frag'
790ac_user_opts='
791enable_option_checking
792with_pop
793with_kerberos
794with_kerberos5
795with_hesiod
796with_mmdf
797with_mail_unlink
798with_mailhost
799with_sound
800with_sync_input
801with_x_toolkit
802with_xpm
803with_jpeg
804with_tiff
805with_gif
806with_png
807with_rsvg
808with_xft
809with_libotf
810with_m17n_flt
811with_toolkit_scroll_bars
812with_xaw3d
813with_xim
814with_ns
815with_gpm
816with_dbus
817with_gconf
818with_selinux
819with_makeinfo
e547b051 820with_compress_info
eb697db5
DN
821with_pkg_config_prog
822with_crt_dir
823with_gnustep_conf
824enable_ns_self_contained
825enable_asserts
826enable_maintainer_mode
827enable_locallisppath
828enable_checking
d9170db5 829enable_use_lisp_union_type
eb697db5
DN
830enable_profiling
831enable_autodepend
832enable_largefile
833with_x
834'
835 ac_precious_vars='build_alias
836host_alias
837target_alias
838CC
839CFLAGS
840LDFLAGS
841LIBS
842CPPFLAGS
843CPP
844XMKMF'
a4f64981 845
5929fbe7 846
eb697db5
DN
847# Initialize some variables set by options.
848ac_init_help=
849ac_init_version=false
850ac_unrecognized_opts=
851ac_unrecognized_sep=
852# The variables have the same names as the options, with
853# dashes changed to underlines.
854cache_file=/dev/null
855exec_prefix=NONE
856no_create=
857no_recursion=
858prefix=NONE
859program_prefix=NONE
860program_suffix=NONE
861program_transform_name=s,x,x,
862silent=
863site=
864srcdir=
865verbose=
866x_includes=NONE
867x_libraries=NONE
5929fbe7 868
eb697db5
DN
869# Installation directory options.
870# These are left unexpanded so users can "make install exec_prefix=/foo"
871# and all the variables that are supposed to be based on exec_prefix
872# by default will actually change.
873# Use braces instead of parens because sh, perl, etc. also accept them.
874# (The list follows the same order as the GNU Coding Standards.)
875bindir='${exec_prefix}/bin'
876sbindir='${exec_prefix}/sbin'
877libexecdir='${exec_prefix}/libexec'
878datarootdir='${prefix}/share'
879datadir='${datarootdir}'
880sysconfdir='${prefix}/etc'
881sharedstatedir='${prefix}/com'
882localstatedir='${prefix}/var'
883includedir='${prefix}/include'
884oldincludedir='/usr/include'
885docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
886infodir='${datarootdir}/info'
887htmldir='${docdir}'
888dvidir='${docdir}'
889pdfdir='${docdir}'
890psdir='${docdir}'
891libdir='${exec_prefix}/lib'
892localedir='${datarootdir}/locale'
893mandir='${datarootdir}/man'
5929fbe7 894
eb697db5
DN
895ac_prev=
896ac_dashdash=
897for ac_option
898do
899 # If the previous option needs an argument, assign it.
900 if test -n "$ac_prev"; then
901 eval $ac_prev=\$ac_option
902 ac_prev=
903 continue
904 fi
a4f64981 905
eb697db5
DN
906 case $ac_option in
907 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
908 *) ac_optarg=yes ;;
909 esac
a4f64981 910
eb697db5 911 # Accept the important Cygnus configure options, so we can diagnose typos.
a4f64981 912
eb697db5
DN
913 case $ac_dashdash$ac_option in
914 --)
915 ac_dashdash=yes ;;
a4f64981 916
eb697db5
DN
917 -bindir | --bindir | --bindi | --bind | --bin | --bi)
918 ac_prev=bindir ;;
919 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
920 bindir=$ac_optarg ;;
a4f64981 921
eb697db5
DN
922 -build | --build | --buil | --bui | --bu)
923 ac_prev=build_alias ;;
924 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
925 build_alias=$ac_optarg ;;
a4f64981 926
eb697db5
DN
927 -cache-file | --cache-file | --cache-fil | --cache-fi \
928 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
929 ac_prev=cache_file ;;
930 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
931 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
932 cache_file=$ac_optarg ;;
5929fbe7 933
eb697db5
DN
934 --config-cache | -C)
935 cache_file=config.cache ;;
8c5ff6dd 936
eb697db5
DN
937 -datadir | --datadir | --datadi | --datad)
938 ac_prev=datadir ;;
939 -datadir=* | --datadir=* | --datadi=* | --datad=*)
940 datadir=$ac_optarg ;;
8c5ff6dd 941
eb697db5
DN
942 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
943 | --dataroo | --dataro | --datar)
944 ac_prev=datarootdir ;;
945 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
946 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
947 datarootdir=$ac_optarg ;;
5929fbe7 948
eb697db5
DN
949 -disable-* | --disable-*)
950 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
951 # Reject names that are not valid shell variable names.
952 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
9164c0e4 953 as_fn_error $? "invalid feature name: $ac_useropt"
eb697db5
DN
954 ac_useropt_orig=$ac_useropt
955 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
956 case $ac_user_opts in
957 *"
958"enable_$ac_useropt"
959"*) ;;
960 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
961 ac_unrecognized_sep=', ';;
962 esac
963 eval enable_$ac_useropt=no ;;
5929fbe7 964
eb697db5
DN
965 -docdir | --docdir | --docdi | --doc | --do)
966 ac_prev=docdir ;;
967 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
968 docdir=$ac_optarg ;;
8c5ff6dd 969
eb697db5
DN
970 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
971 ac_prev=dvidir ;;
972 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
973 dvidir=$ac_optarg ;;
8c5ff6dd 974
eb697db5
DN
975 -enable-* | --enable-*)
976 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
977 # Reject names that are not valid shell variable names.
978 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
9164c0e4 979 as_fn_error $? "invalid feature name: $ac_useropt"
eb697db5
DN
980 ac_useropt_orig=$ac_useropt
981 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
982 case $ac_user_opts in
983 *"
984"enable_$ac_useropt"
985"*) ;;
986 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
987 ac_unrecognized_sep=', ';;
988 esac
989 eval enable_$ac_useropt=\$ac_optarg ;;
648b8e6d 990
eb697db5
DN
991 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
992 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
993 | --exec | --exe | --ex)
994 ac_prev=exec_prefix ;;
995 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
996 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
997 | --exec=* | --exe=* | --ex=*)
998 exec_prefix=$ac_optarg ;;
648b8e6d 999
eb697db5
DN
1000 -gas | --gas | --ga | --g)
1001 # Obsolete; use --with-gas.
1002 with_gas=yes ;;
648b8e6d 1003
eb697db5
DN
1004 -help | --help | --hel | --he | -h)
1005 ac_init_help=long ;;
1006 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1007 ac_init_help=recursive ;;
1008 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1009 ac_init_help=short ;;
648b8e6d 1010
eb697db5
DN
1011 -host | --host | --hos | --ho)
1012 ac_prev=host_alias ;;
1013 -host=* | --host=* | --hos=* | --ho=*)
1014 host_alias=$ac_optarg ;;
8c5ff6dd 1015
eb697db5
DN
1016 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1017 ac_prev=htmldir ;;
1018 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1019 | --ht=*)
1020 htmldir=$ac_optarg ;;
a4f64981 1021
eb697db5
DN
1022 -includedir | --includedir | --includedi | --included | --include \
1023 | --includ | --inclu | --incl | --inc)
1024 ac_prev=includedir ;;
1025 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1026 | --includ=* | --inclu=* | --incl=* | --inc=*)
1027 includedir=$ac_optarg ;;
a4f64981 1028
eb697db5
DN
1029 -infodir | --infodir | --infodi | --infod | --info | --inf)
1030 ac_prev=infodir ;;
1031 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1032 infodir=$ac_optarg ;;
7186fb09 1033
eb697db5
DN
1034 -libdir | --libdir | --libdi | --libd)
1035 ac_prev=libdir ;;
1036 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1037 libdir=$ac_optarg ;;
e6df49e4 1038
eb697db5
DN
1039 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1040 | --libexe | --libex | --libe)
1041 ac_prev=libexecdir ;;
1042 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1043 | --libexe=* | --libex=* | --libe=*)
1044 libexecdir=$ac_optarg ;;
a4f64981 1045
eb697db5
DN
1046 -localedir | --localedir | --localedi | --localed | --locale)
1047 ac_prev=localedir ;;
1048 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1049 localedir=$ac_optarg ;;
1050
1051 -localstatedir | --localstatedir | --localstatedi | --localstated \
1052 | --localstate | --localstat | --localsta | --localst | --locals)
1053 ac_prev=localstatedir ;;
1054 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1055 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1056 localstatedir=$ac_optarg ;;
a4f64981 1057
eb697db5
DN
1058 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1059 ac_prev=mandir ;;
1060 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1061 mandir=$ac_optarg ;;
49ebbd65 1062
eb697db5
DN
1063 -nfp | --nfp | --nf)
1064 # Obsolete; use --without-fp.
1065 with_fp=no ;;
a4f64981 1066
eb697db5
DN
1067 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1068 | --no-cr | --no-c | -n)
1069 no_create=yes ;;
1070
1071 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1072 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1073 no_recursion=yes ;;
a4f64981 1074
eb697db5
DN
1075 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1076 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1077 | --oldin | --oldi | --old | --ol | --o)
1078 ac_prev=oldincludedir ;;
1079 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1080 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1081 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1082 oldincludedir=$ac_optarg ;;
e6df49e4 1083
eb697db5
DN
1084 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1085 ac_prev=prefix ;;
1086 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1087 prefix=$ac_optarg ;;
a4f64981 1088
eb697db5
DN
1089 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1090 | --program-pre | --program-pr | --program-p)
1091 ac_prev=program_prefix ;;
1092 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1093 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1094 program_prefix=$ac_optarg ;;
5929fbe7 1095
eb697db5
DN
1096 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1097 | --program-suf | --program-su | --program-s)
1098 ac_prev=program_suffix ;;
1099 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1100 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1101 program_suffix=$ac_optarg ;;
5929fbe7 1102
eb697db5
DN
1103 -program-transform-name | --program-transform-name \
1104 | --program-transform-nam | --program-transform-na \
1105 | --program-transform-n | --program-transform- \
1106 | --program-transform | --program-transfor \
1107 | --program-transfo | --program-transf \
1108 | --program-trans | --program-tran \
1109 | --progr-tra | --program-tr | --program-t)
1110 ac_prev=program_transform_name ;;
1111 -program-transform-name=* | --program-transform-name=* \
1112 | --program-transform-nam=* | --program-transform-na=* \
1113 | --program-transform-n=* | --program-transform-=* \
1114 | --program-transform=* | --program-transfor=* \
1115 | --program-transfo=* | --program-transf=* \
1116 | --program-trans=* | --program-tran=* \
1117 | --progr-tra=* | --program-tr=* | --program-t=*)
1118 program_transform_name=$ac_optarg ;;
5929fbe7 1119
eb697db5
DN
1120 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1121 ac_prev=pdfdir ;;
1122 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1123 pdfdir=$ac_optarg ;;
5929fbe7 1124
eb697db5
DN
1125 -psdir | --psdir | --psdi | --psd | --ps)
1126 ac_prev=psdir ;;
1127 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1128 psdir=$ac_optarg ;;
5929fbe7 1129
eb697db5
DN
1130 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1131 | -silent | --silent | --silen | --sile | --sil)
1132 silent=yes ;;
a4f64981 1133
eb697db5
DN
1134 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1135 ac_prev=sbindir ;;
1136 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1137 | --sbi=* | --sb=*)
1138 sbindir=$ac_optarg ;;
0c309b80 1139
eb697db5
DN
1140 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1141 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1142 | --sharedst | --shareds | --shared | --share | --shar \
1143 | --sha | --sh)
1144 ac_prev=sharedstatedir ;;
1145 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1146 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1147 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1148 | --sha=* | --sh=*)
1149 sharedstatedir=$ac_optarg ;;
5929fbe7 1150
eb697db5
DN
1151 -site | --site | --sit)
1152 ac_prev=site ;;
1153 -site=* | --site=* | --sit=*)
1154 site=$ac_optarg ;;
5929fbe7 1155
eb697db5
DN
1156 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1157 ac_prev=srcdir ;;
1158 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1159 srcdir=$ac_optarg ;;
a4f64981 1160
eb697db5
DN
1161 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1162 | --syscon | --sysco | --sysc | --sys | --sy)
1163 ac_prev=sysconfdir ;;
1164 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1165 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1166 sysconfdir=$ac_optarg ;;
a4f64981 1167
eb697db5
DN
1168 -target | --target | --targe | --targ | --tar | --ta | --t)
1169 ac_prev=target_alias ;;
1170 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1171 target_alias=$ac_optarg ;;
a4f64981 1172
eb697db5
DN
1173 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1174 verbose=yes ;;
a4f64981 1175
eb697db5
DN
1176 -version | --version | --versio | --versi | --vers | -V)
1177 ac_init_version=: ;;
a4f64981 1178
eb697db5
DN
1179 -with-* | --with-*)
1180 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1181 # Reject names that are not valid shell variable names.
1182 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
9164c0e4 1183 as_fn_error $? "invalid package name: $ac_useropt"
eb697db5
DN
1184 ac_useropt_orig=$ac_useropt
1185 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1186 case $ac_user_opts in
1187 *"
1188"with_$ac_useropt"
1189"*) ;;
1190 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1191 ac_unrecognized_sep=', ';;
1192 esac
1193 eval with_$ac_useropt=\$ac_optarg ;;
1194
1195 -without-* | --without-*)
1196 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1197 # Reject names that are not valid shell variable names.
1198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
9164c0e4 1199 as_fn_error $? "invalid package name: $ac_useropt"
eb697db5
DN
1200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=no ;;
e6df49e4 1210
eb697db5
DN
1211 --x)
1212 # Obsolete; use --with-x.
1213 with_x=yes ;;
a4f64981 1214
eb697db5
DN
1215 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1216 | --x-incl | --x-inc | --x-in | --x-i)
1217 ac_prev=x_includes ;;
1218 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1219 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1220 x_includes=$ac_optarg ;;
a4f64981 1221
eb697db5
DN
1222 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1223 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1224 ac_prev=x_libraries ;;
1225 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1226 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1227 x_libraries=$ac_optarg ;;
a4f64981 1228
9164c0e4
AS
1229 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1230Try \`$0 --help' for more information"
eb697db5 1231 ;;
a4f64981 1232
eb697db5
DN
1233 *=*)
1234 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1235 # Reject names that are not valid shell variable names.
1236 case $ac_envvar in #(
1237 '' | [0-9]* | *[!_$as_cr_alnum]* )
9164c0e4 1238 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
eb697db5
DN
1239 esac
1240 eval $ac_envvar=\$ac_optarg
1241 export $ac_envvar ;;
a4f64981 1242
eb697db5
DN
1243 *)
1244 # FIXME: should be removed in autoconf 3.0.
1245 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1246 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1247 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1248 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1249 ;;
a4f64981 1250
eb697db5
DN
1251 esac
1252done
15e12598 1253
eb697db5
DN
1254if test -n "$ac_prev"; then
1255 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
9164c0e4 1256 as_fn_error $? "missing argument to $ac_option"
5929fbe7 1257fi
e6df49e4 1258
eb697db5
DN
1259if test -n "$ac_unrecognized_opts"; then
1260 case $enable_option_checking in
1261 no) ;;
9164c0e4 1262 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
eb697db5
DN
1263 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1264 esac
e6df49e4 1265fi
15e12598 1266
eb697db5
DN
1267# Check all directory arguments for consistency.
1268for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1269 datadir sysconfdir sharedstatedir localstatedir includedir \
1270 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1271 libdir localedir mandir
1272do
1273 eval ac_val=\$$ac_var
1274 # Remove trailing slashes.
1275 case $ac_val in
1276 */ )
1277 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1278 eval $ac_var=\$ac_val;;
1279 esac
1280 # Be sure to have absolute directory names.
1281 case $ac_val in
1282 [\\/$]* | ?:[\\/]* ) continue;;
1283 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1284 esac
9164c0e4 1285 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
eb697db5 1286done
a4f64981 1287
eb697db5
DN
1288# There might be people who depend on the old broken behavior: `$host'
1289# used to hold the argument of --host etc.
1290# FIXME: To remove some day.
1291build=$build_alias
1292host=$host_alias
1293target=$target_alias
5929fbe7 1294
eb697db5
DN
1295# FIXME: To remove some day.
1296if test "x$host_alias" != x; then
1297 if test "x$build_alias" = x; then
1298 cross_compiling=maybe
9164c0e4
AS
1299 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1300 If a cross compiler is detected then cross compile mode will be used" >&2
eb697db5
DN
1301 elif test "x$build_alias" != "x$host_alias"; then
1302 cross_compiling=yes
1303 fi
49ebbd65 1304fi
15e12598 1305
eb697db5
DN
1306ac_tool_prefix=
1307test -n "$host_alias" && ac_tool_prefix=$host_alias-
a4f64981 1308
eb697db5 1309test "$silent" = yes && exec 6>/dev/null
a5edbe4a 1310
15e12598 1311
eb697db5
DN
1312ac_pwd=`pwd` && test -n "$ac_pwd" &&
1313ac_ls_di=`ls -di .` &&
1314ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
9164c0e4 1315 as_fn_error $? "working directory cannot be determined"
eb697db5 1316test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
9164c0e4 1317 as_fn_error $? "pwd does not report name of working directory"
e6df49e4 1318
8c5ff6dd 1319
eb697db5
DN
1320# Find the source files, if location was not specified.
1321if test -z "$srcdir"; then
1322 ac_srcdir_defaulted=yes
1323 # Try the directory containing this script, then the parent directory.
1324 ac_confdir=`$as_dirname -- "$as_myself" ||
1325$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1326 X"$as_myself" : 'X\(//\)[^/]' \| \
1327 X"$as_myself" : 'X\(//\)$' \| \
1328 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1329$as_echo X"$as_myself" |
1330 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1331 s//\1/
1332 q
1333 }
1334 /^X\(\/\/\)[^/].*/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\/\)$/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\).*/{
1343 s//\1/
1344 q
1345 }
1346 s/.*/./; q'`
1347 srcdir=$ac_confdir
1348 if test ! -r "$srcdir/$ac_unique_file"; then
1349 srcdir=..
1350 fi
5929fbe7 1351else
eb697db5 1352 ac_srcdir_defaulted=no
5929fbe7 1353fi
eb697db5
DN
1354if test ! -r "$srcdir/$ac_unique_file"; then
1355 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
9164c0e4 1356 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
eb697db5
DN
1357fi
1358ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1359ac_abs_confdir=`(
9164c0e4 1360 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
eb697db5
DN
1361 pwd)`
1362# When building in place, set srcdir=.
1363if test "$ac_abs_confdir" = "$ac_pwd"; then
1364 srcdir=.
49ebbd65 1365fi
eb697db5
DN
1366# Remove unnecessary trailing slashes from srcdir.
1367# Double slashes in file names in object file debugging info
1368# mess up M-x gdb in Emacs.
1369case $srcdir in
1370*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1371esac
1372for ac_var in $ac_precious_vars; do
1373 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1374 eval ac_env_${ac_var}_value=\$${ac_var}
1375 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1376 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1377done
a4f64981 1378
eb697db5
DN
1379#
1380# Report the --help message.
1381#
1382if test "$ac_init_help" = "long"; then
1383 # Omit some internal or obsolete options to make the list less imposing.
1384 # This message is too long to be a string in the A/UX 3.1 sh.
1385 cat <<_ACEOF
1386\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
8c5ff6dd 1387
eb697db5 1388Usage: $0 [OPTION]... [VAR=VALUE]...
a4f64981 1389
eb697db5
DN
1390To assign environment variables (e.g., CC, CFLAGS...), specify them as
1391VAR=VALUE. See below for descriptions of some of the useful variables.
a4f64981 1392
eb697db5 1393Defaults for the options are specified in brackets.
a4f64981 1394
eb697db5
DN
1395Configuration:
1396 -h, --help display this help and exit
1397 --help=short display options specific to this package
1398 --help=recursive display the short help of all the included packages
1399 -V, --version display version information and exit
9164c0e4 1400 -q, --quiet, --silent do not print \`checking ...' messages
eb697db5
DN
1401 --cache-file=FILE cache test results in FILE [disabled]
1402 -C, --config-cache alias for \`--cache-file=config.cache'
1403 -n, --no-create do not create output files
1404 --srcdir=DIR find the sources in DIR [configure dir or \`..']
a4f64981 1405
eb697db5
DN
1406Installation directories:
1407 --prefix=PREFIX install architecture-independent files in PREFIX
1408 [$ac_default_prefix]
1409 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1410 [PREFIX]
298b8a34 1411
eb697db5
DN
1412By default, \`make install' will install all the files in
1413\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1414an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1415for instance \`--prefix=\$HOME'.
a4f64981 1416
eb697db5 1417For better control, use the options below.
a4f64981 1418
eb697db5
DN
1419Fine tuning of the installation directories:
1420 --bindir=DIR user executables [EPREFIX/bin]
1421 --sbindir=DIR system admin executables [EPREFIX/sbin]
1422 --libexecdir=DIR program executables [EPREFIX/libexec]
1423 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1424 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1425 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1426 --libdir=DIR object code libraries [EPREFIX/lib]
1427 --includedir=DIR C header files [PREFIX/include]
1428 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1429 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1430 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1431 --infodir=DIR info documentation [DATAROOTDIR/info]
1432 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1433 --mandir=DIR man documentation [DATAROOTDIR/man]
1434 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1435 --htmldir=DIR html documentation [DOCDIR]
1436 --dvidir=DIR dvi documentation [DOCDIR]
1437 --pdfdir=DIR pdf documentation [DOCDIR]
1438 --psdir=DIR ps documentation [DOCDIR]
1439_ACEOF
15e12598 1440
eb697db5 1441 cat <<\_ACEOF
e6df49e4 1442
eb697db5
DN
1443Program names:
1444 --program-prefix=PREFIX prepend PREFIX to installed program names
1445 --program-suffix=SUFFIX append SUFFIX to installed program names
1446 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
a4f64981 1447
eb697db5
DN
1448X features:
1449 --x-includes=DIR X include files are in DIR
1450 --x-libraries=DIR X library files are in DIR
a4f64981 1451
eb697db5
DN
1452System types:
1453 --build=BUILD configure for building on BUILD [guessed]
1454 --host=HOST cross-compile to build programs to run on HOST [BUILD]
8c5ff6dd 1455_ACEOF
eb697db5 1456fi
a4f64981 1457
eb697db5
DN
1458if test -n "$ac_init_help"; then
1459 case $ac_init_help in
1460 short | recursive ) echo "Configuration of emacs 24.0.50:";;
1461 esac
1462 cat <<\_ACEOF
e6df49e4 1463
eb697db5
DN
1464Optional Features:
1465 --disable-option-checking ignore unrecognized --enable/--with options
1466 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1467 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1468 --disable-ns-self-contained
1469 disable self contained build under NeXTstep
1470 --enable-asserts compile code with asserts enabled
1471 --enable-maintainer-mode
1472 enable make rules and dependencies not useful (and
1473 sometimes confusing) to the casual installer
1474 --enable-locallisppath=PATH
1475 directories Emacs should search for lisp files
1476 specific to this site
1477 --enable-checking[=LIST]
1478 enable expensive run-time checks. With LIST, enable
1479 only specific categories of checks. Categories are:
1480 all,yes,no. Flags are: stringbytes, stringoverrun,
1481 stringfreelist, xmallocoverrun, conslist
d9170db5
DN
1482 --enable-use-lisp-union-type
1483 use a union for the Lisp_Object data type. This is
1484 only useful for development for catching certain
1485 types of bugs.
eb697db5
DN
1486 --enable-profiling build emacs with profiling support. This might not
1487 work on all platforms
1488 --enable-autodepend automatically generate dependencies to .h-files.
1489 Requires GNU Make and Gcc. Enabled if GNU Make and
1490 Gcc is found
1491 --disable-largefile omit support for large files
1492
1493Optional Packages:
1494 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1495 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1496 --without-pop don't support POP mail retrieval with movemail
1497 --with-kerberos support Kerberos-authenticated POP
1498 --with-kerberos5 support Kerberos version 5 authenticated POP
1499 --with-hesiod support Hesiod to get the POP server host
1500 --with-mmdf support MMDF mailboxes
1501 --with-mail-unlink unlink, rather than empty, mail spool after reading
1502 --with-mailhost=HOSTNAME
1503 string giving default POP mail host
1504 --without-sound don't compile with sound support
1505 --without-sync-input process async input synchronously
e547b051
J
1506 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
1507 lucid or athena, motif, no)
eb697db5
DN
1508 --without-xpm don't compile with XPM image support
1509 --without-jpeg don't compile with JPEG image support
1510 --without-tiff don't compile with TIFF image support
1511 --without-gif don't compile with GIF image support
1512 --without-png don't compile with PNG image support
1513 --without-rsvg don't compile with SVG image support
1514 --without-xft don't use XFT for anti aliased fonts
1515 --without-libotf don't use libotf for OpenType font support
1516 --without-m17n-flt don't use m17n-flt for text shaping
1517 --without-toolkit-scroll-bars
1518 don't use Motif or Xaw3d scroll bars
1519 --without-xaw3d don't use Xaw3d
1520 --without-xim don't use X11 XIM
1521 --with-ns use nextstep (Cocoa or GNUstep) windowing system
1522 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1523 console
1524 --without-dbus don't compile with D-Bus support
1525 --without-gconf don't compile with GConf support
1526 --without-selinux don't compile with SELinux support
1527 --without-makeinfo don't require makeinfo for building manuals
e547b051 1528 --without-compress-info don't compress the installed Info pages
eb697db5
DN
1529 --with-pkg-config-prog=PATH
1530 path to pkg-config for finding GTK and librsvg
1531 --with-crt-dir=DIR directory containing crtn.o etc. The default is
1532 /usr/lib, or /usr/lib64 on some platforms.
1533 --with-gnustep-conf=PATH
1534 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1535 or /etc/GNUstep/GNUstep.conf
1536 --with-x use the X Window System
e6df49e4 1537
eb697db5
DN
1538Some influential environment variables:
1539 CC C compiler command
1540 CFLAGS C compiler flags
1541 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1542 nonstandard directory <lib dir>
1543 LIBS libraries to pass to the linker, e.g. -l<library>
1544 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1545 you have headers in a nonstandard directory <include dir>
1546 CPP C preprocessor
1547 XMKMF Path to xmkmf, Makefile generator for X Window System
e6df49e4 1548
eb697db5
DN
1549Use these variables to override the choices made by `configure' or to help
1550it to find libraries and programs with nonstandard names/locations.
49ebbd65 1551
eb697db5 1552Report bugs to the package provider.
5929fbe7 1553_ACEOF
eb697db5 1554ac_status=$?
15e12598 1555fi
49ebbd65 1556
eb697db5
DN
1557if test "$ac_init_help" = "recursive"; then
1558 # If there are subdirs, report their specific --help.
1559 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1560 test -d "$ac_dir" ||
1561 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1562 continue
1563 ac_builddir=.
8c5ff6dd 1564
eb697db5
DN
1565case "$ac_dir" in
1566.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1567*)
1568 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1569 # A ".." for each directory in $ac_dir_suffix.
1570 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1571 case $ac_top_builddir_sub in
1572 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1573 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1574 esac ;;
1575esac
1576ac_abs_top_builddir=$ac_pwd
1577ac_abs_builddir=$ac_pwd$ac_dir_suffix
1578# for backward compatibility:
1579ac_top_builddir=$ac_top_build_prefix
e6df49e4 1580
eb697db5
DN
1581case $srcdir in
1582 .) # We are building in place.
1583 ac_srcdir=.
1584 ac_top_srcdir=$ac_top_builddir_sub
1585 ac_abs_top_srcdir=$ac_pwd ;;
1586 [\\/]* | ?:[\\/]* ) # Absolute name.
1587 ac_srcdir=$srcdir$ac_dir_suffix;
1588 ac_top_srcdir=$srcdir
1589 ac_abs_top_srcdir=$srcdir ;;
1590 *) # Relative name.
1591 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1592 ac_top_srcdir=$ac_top_build_prefix$srcdir
1593 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1594esac
1595ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15e12598 1596
eb697db5
DN
1597 cd "$ac_dir" || { ac_status=$?; continue; }
1598 # Check for guested configure.
1599 if test -f "$ac_srcdir/configure.gnu"; then
1600 echo &&
1601 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1602 elif test -f "$ac_srcdir/configure"; then
1603 echo &&
1604 $SHELL "$ac_srcdir/configure" --help=recursive
1605 else
1606 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1607 fi || ac_status=$?
1608 cd "$ac_pwd" || { ac_status=$?; break; }
1609 done
1610fi
a4f64981 1611
eb697db5
DN
1612test -n "$ac_init_help" && exit $ac_status
1613if $ac_init_version; then
1614 cat <<\_ACEOF
1615emacs configure 24.0.50
9164c0e4 1616generated by GNU Autoconf 2.66
a4f64981 1617
9164c0e4 1618Copyright (C) 2010 Free Software Foundation, Inc.
eb697db5
DN
1619This configure script is free software; the Free Software Foundation
1620gives unlimited permission to copy, distribute and modify it.
5929fbe7 1621_ACEOF
eb697db5 1622 exit
a4f64981 1623fi
8c5ff6dd 1624
eb697db5
DN
1625## ------------------------ ##
1626## Autoconf initialization. ##
1627## ------------------------ ##
a4f64981 1628
eb697db5
DN
1629# ac_fn_c_try_compile LINENO
1630# --------------------------
1631# Try to compile conftest.$ac_ext, and return whether this succeeded.
1632ac_fn_c_try_compile ()
5929fbe7 1633{
eb697db5
DN
1634 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1635 rm -f conftest.$ac_objext
1636 if { { ac_try="$ac_compile"
5929fbe7
GM
1637case "(($ac_try" in
1638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1639 *) ac_try_echo=$ac_try;;
1640esac
eb697db5
DN
1641eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1642$as_echo "$ac_try_echo"; } >&5
1643 (eval "$ac_compile") 2>conftest.err
5929fbe7 1644 ac_status=$?
eb697db5
DN
1645 if test -s conftest.err; then
1646 grep -v '^ *+' conftest.err >conftest.er1
1647 cat conftest.er1 >&5
1648 mv -f conftest.er1 conftest.err
1649 fi
1650 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1651 test $ac_status = 0; } && {
5929fbe7
GM
1652 test -z "$ac_c_werror_flag" ||
1653 test ! -s conftest.err
eb697db5
DN
1654 } && test -s conftest.$ac_objext; then :
1655 ac_retval=0
8c5ff6dd 1656else
5929fbe7
GM
1657 $as_echo "$as_me: failed program was:" >&5
1658sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1659
eb697db5 1660 ac_retval=1
5929fbe7 1661fi
eb697db5
DN
1662 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1663 as_fn_set_status $ac_retval
1664
1665} # ac_fn_c_try_compile
1666
1667# ac_fn_c_try_link LINENO
1668# -----------------------
1669# Try to link conftest.$ac_ext, and return whether this succeeded.
1670ac_fn_c_try_link ()
1671{
1672 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1673 rm -f conftest.$ac_objext conftest$ac_exeext
1674 if { { ac_try="$ac_link"
5929fbe7
GM
1675case "(($ac_try" in
1676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1677 *) ac_try_echo=$ac_try;;
1678esac
eb697db5
DN
1679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1680$as_echo "$ac_try_echo"; } >&5
1681 (eval "$ac_link") 2>conftest.err
5929fbe7 1682 ac_status=$?
eb697db5
DN
1683 if test -s conftest.err; then
1684 grep -v '^ *+' conftest.err >conftest.er1
1685 cat conftest.er1 >&5
1686 mv -f conftest.er1 conftest.err
1687 fi
1688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1689 test $ac_status = 0; } && {
5929fbe7
GM
1690 test -z "$ac_c_werror_flag" ||
1691 test ! -s conftest.err
eb697db5
DN
1692 } && test -s conftest$ac_exeext && {
1693 test "$cross_compiling" = yes ||
1694 $as_test_x conftest$ac_exeext
1695 }; then :
1696 ac_retval=0
5929fbe7
GM
1697else
1698 $as_echo "$as_me: failed program was:" >&5
1699sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1700
eb697db5 1701 ac_retval=1
cd03c74a 1702fi
eb697db5
DN
1703 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1704 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1705 # interfere with the next link command; also delete a directory that is
1706 # left behind by Apple's compiler. We do this before executing the actions.
1707 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1708 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1709 as_fn_set_status $ac_retval
08b47d3d 1710
eb697db5 1711} # ac_fn_c_try_link
08b47d3d 1712
eb697db5
DN
1713# ac_fn_c_try_cpp LINENO
1714# ----------------------
1715# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_cpp ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 if { { ac_try="$ac_cpp conftest.$ac_ext"
5929fbe7
GM
1720case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
eb697db5
DN
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
5929fbe7 1727 ac_status=$?
eb697db5
DN
1728 if test -s conftest.err; then
1729 grep -v '^ *+' conftest.err >conftest.er1
1730 cat conftest.er1 >&5
1731 mv -f conftest.er1 conftest.err
1732 fi
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; } >/dev/null && {
5929fbe7
GM
1735 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1736 test ! -s conftest.err
eb697db5
DN
1737 }; then :
1738 ac_retval=0
5929fbe7
GM
1739else
1740 $as_echo "$as_me: failed program was:" >&5
1741sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1742
eb697db5
DN
1743 ac_retval=1
1744fi
1745 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1746 as_fn_set_status $ac_retval
1747
1748} # ac_fn_c_try_cpp
1749
1750# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1751# -------------------------------------------------------
1752# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1753# the include files in INCLUDES and setting the cache variable VAR
1754# accordingly.
1755ac_fn_c_check_header_mongrel ()
1756{
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9164c0e4 1758 if eval "test \"\${$3+set}\"" = set; then :
eb697db5
DN
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1760$as_echo_n "checking for $2... " >&6; }
9164c0e4 1761if eval "test \"\${$3+set}\"" = set; then :
eb697db5
DN
1762 $as_echo_n "(cached) " >&6
1763fi
1764eval ac_res=\$$3
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1766$as_echo "$ac_res" >&6; }
1767else
1768 # Is the header compilable?
1769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1770$as_echo_n "checking $2 usability... " >&6; }
1771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1772/* end confdefs.h. */
1773$4
1774#include <$2>
1775_ACEOF
1776if ac_fn_c_try_compile "$LINENO"; then :
1777 ac_header_compiler=yes
1778else
1779 ac_header_compiler=no
8c5ff6dd 1780fi
eb697db5
DN
1781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1783$as_echo "$ac_header_compiler" >&6; }
e6df49e4 1784
eb697db5
DN
1785# Is the header present?
1786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1787$as_echo_n "checking $2 presence... " >&6; }
1788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1789/* end confdefs.h. */
1790#include <$2>
1791_ACEOF
1792if ac_fn_c_try_cpp "$LINENO"; then :
1793 ac_header_preproc=yes
1794else
1795 ac_header_preproc=no
1796fi
5929fbe7 1797rm -f conftest.err conftest.$ac_ext
eb697db5 1798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
5929fbe7 1799$as_echo "$ac_header_preproc" >&6; }
a4f64981 1800
5929fbe7 1801# So? What about this header?
eb697db5 1802case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
5929fbe7 1803 yes:no: )
eb697db5
DN
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1805$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1807$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
5929fbe7
GM
1808 ;;
1809 no:yes:* )
eb697db5
DN
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1811$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1813$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1815$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1817$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1819$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
5929fbe7
GM
1820 ;;
1821esac
eb697db5
DN
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1823$as_echo_n "checking for $2... " >&6; }
9164c0e4 1824if eval "test \"\${$3+set}\"" = set; then :
5929fbe7
GM
1825 $as_echo_n "(cached) " >&6
1826else
eb697db5 1827 eval "$3=\$ac_header_compiler"
8c5ff6dd 1828fi
eb697db5
DN
1829eval ac_res=\$$3
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5929fbe7 1831$as_echo "$ac_res" >&6; }
a4f64981 1832fi
eb697db5 1833 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a4f64981 1834
eb697db5 1835} # ac_fn_c_check_header_mongrel
5929fbe7 1836
eb697db5
DN
1837# ac_fn_c_try_run LINENO
1838# ----------------------
1839# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1840# that executables *can* be run.
1841ac_fn_c_try_run ()
5929fbe7 1842{
eb697db5
DN
1843 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844 if { { ac_try="$ac_link"
5929fbe7
GM
1845case "(($ac_try" in
1846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1847 *) ac_try_echo=$ac_try;;
1848esac
eb697db5
DN
1849eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1850$as_echo "$ac_try_echo"; } >&5
1851 (eval "$ac_link") 2>&5
5929fbe7 1852 ac_status=$?
eb697db5
DN
1853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1854 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1855 { { case "(($ac_try" in
1856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1857 *) ac_try_echo=$ac_try;;
1858esac
1859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1860$as_echo "$ac_try_echo"; } >&5
1861 (eval "$ac_try") 2>&5
1862 ac_status=$?
1863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1864 test $ac_status = 0; }; }; then :
1865 ac_retval=0
8c5ff6dd 1866else
eb697db5
DN
1867 $as_echo "$as_me: program exited with status $ac_status" >&5
1868 $as_echo "$as_me: failed program was:" >&5
5929fbe7 1869sed 's/^/| /' conftest.$ac_ext >&5
15e12598 1870
eb697db5 1871 ac_retval=$ac_status
5929fbe7 1872fi
eb697db5
DN
1873 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1874 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1875 as_fn_set_status $ac_retval
1876
1877} # ac_fn_c_try_run
8c5ff6dd 1878
eb697db5
DN
1879# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1880# -------------------------------------------------------
1881# Tests whether HEADER exists and can be compiled using the include files in
1882# INCLUDES, setting the cache variable VAR accordingly.
1883ac_fn_c_check_header_compile ()
1884{
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887$as_echo_n "checking for $2... " >&6; }
9164c0e4 1888if eval "test \"\${$3+set}\"" = set; then :
eb697db5
DN
1889 $as_echo_n "(cached) " >&6
1890else
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894#include <$2>
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"; then :
1897 eval "$3=yes"
1898else
1899 eval "$3=no"
1900fi
1901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 1902fi
eb697db5
DN
1903eval ac_res=\$$3
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5929fbe7 1905$as_echo "$ac_res" >&6; }
eb697db5 1906 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
15e12598 1907
eb697db5 1908} # ac_fn_c_check_header_compile
e6df49e4 1909
9164c0e4
AS
1910# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1911# ---------------------------------------------
1912# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1913# accordingly.
eb697db5
DN
1914ac_fn_c_check_decl ()
1915{
1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9164c0e4
AS
1917 as_decl_name=`echo $2|sed 's/ *(.*//'`
1918 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1920$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1921if eval "test \"\${$3+set}\"" = set; then :
5929fbe7
GM
1922 $as_echo_n "(cached) " >&6
1923else
eb697db5 1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 1925/* end confdefs.h. */
eb697db5 1926$4
5929fbe7
GM
1927int
1928main ()
1929{
9164c0e4
AS
1930#ifndef $as_decl_name
1931#ifdef __cplusplus
1932 (void) $as_decl_use;
1933#else
1934 (void) $as_decl_name;
1935#endif
eb697db5 1936#endif
e6df49e4 1937
eb697db5 1938 ;
5929fbe7
GM
1939 return 0;
1940}
1941_ACEOF
eb697db5
DN
1942if ac_fn_c_try_compile "$LINENO"; then :
1943 eval "$3=yes"
5929fbe7 1944else
eb697db5 1945 eval "$3=no"
5929fbe7 1946fi
eb697db5 1947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0c309b80 1948fi
eb697db5
DN
1949eval ac_res=\$$3
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1951$as_echo "$ac_res" >&6; }
1952 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
8c5ff6dd 1953
eb697db5 1954} # ac_fn_c_check_decl
0c309b80 1955
eb697db5
DN
1956# ac_fn_c_check_header_preproc LINENO HEADER VAR
1957# ----------------------------------------------
1958# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1959ac_fn_c_check_header_preproc ()
1960{
1961 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1963$as_echo_n "checking for $2... " >&6; }
9164c0e4 1964if eval "test \"\${$3+set}\"" = set; then :
eb697db5
DN
1965 $as_echo_n "(cached) " >&6
1966else
1967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1968/* end confdefs.h. */
1969#include <$2>
1970_ACEOF
1971if ac_fn_c_try_cpp "$LINENO"; then :
1972 eval "$3=yes"
1973else
1974 eval "$3=no"
a4f64981 1975fi
eb697db5
DN
1976rm -f conftest.err conftest.$ac_ext
1977fi
1978eval ac_res=\$$3
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1980$as_echo "$ac_res" >&6; }
1981 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
e6df49e4 1982
eb697db5 1983} # ac_fn_c_check_header_preproc
a5edbe4a 1984
eb697db5
DN
1985# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1986# ----------------------------------------------------
1987# Tries to find if the field MEMBER exists in type AGGR, after including
1988# INCLUDES, setting cache variable VAR accordingly.
1989ac_fn_c_check_member ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1993$as_echo_n "checking for $2.$3... " >&6; }
9164c0e4 1994if eval "test \"\${$4+set}\"" = set; then :
eb697db5
DN
1995 $as_echo_n "(cached) " >&6
1996else
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$5
2000int
2001main ()
2002{
2003static $2 ac_aggr;
2004if (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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$5
2016int
2017main ()
2018{
2019static $2 ac_aggr;
2020if (sizeof ac_aggr.$3)
2021return 0;
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 eval "$4=yes"
2028else
2029 eval "$4=no"
8c5ff6dd 2030fi
eb697db5 2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 2032fi
eb697db5
DN
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034fi
2035eval ac_res=\$$4
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2037$as_echo "$ac_res" >&6; }
2038 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a5edbe4a 2039
eb697db5 2040} # ac_fn_c_check_member
106c6f74 2041
eb697db5
DN
2042# ac_fn_c_check_func LINENO FUNC VAR
2043# ----------------------------------
2044# Tests whether FUNC exists, setting the cache variable VAR accordingly
2045ac_fn_c_check_func ()
2046{
2047 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2049$as_echo_n "checking for $2... " >&6; }
9164c0e4 2050if eval "test \"\${$3+set}\"" = set; then :
5929fbe7
GM
2051 $as_echo_n "(cached) " >&6
2052else
eb697db5 2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 2054/* end confdefs.h. */
eb697db5
DN
2055/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2056 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2057#define $2 innocuous_$2
2058
2059/* System header to define __stub macros and hopefully few prototypes,
2060 which can conflict with char $2 (); below.
2061 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2062 <limits.h> exists even on freestanding compilers. */
2063
2064#ifdef __STDC__
2065# include <limits.h>
2066#else
2067# include <assert.h>
2068#endif
2069
2070#undef $2
8c5ff6dd 2071
5929fbe7
GM
2072/* Override any GCC internal prototype to avoid an error.
2073 Use char because int might match the return type of a GCC
2074 builtin and then its argument prototype would still apply. */
2075#ifdef __cplusplus
2076extern "C"
2077#endif
eb697db5
DN
2078char $2 ();
2079/* The GNU C library defines this for functions which it implements
2080 to always fail with ENOSYS. Some functions are actually named
2081 something starting with __ and the normal name is an alias. */
2082#if defined __stub_$2 || defined __stub___$2
2083choke me
2084#endif
2085
5929fbe7
GM
2086int
2087main ()
2088{
eb697db5 2089return $2 ();
5929fbe7
GM
2090 ;
2091 return 0;
2092}
2093_ACEOF
eb697db5
DN
2094if ac_fn_c_try_link "$LINENO"; then :
2095 eval "$3=yes"
5929fbe7 2096else
eb697db5
DN
2097 eval "$3=no"
2098fi
2099rm -f core conftest.err conftest.$ac_objext \
2100 conftest$ac_exeext conftest.$ac_ext
2101fi
2102eval ac_res=\$$3
2103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2104$as_echo "$ac_res" >&6; }
2105 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2106
2107} # ac_fn_c_check_func
2108
2109# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2110# -------------------------------------------
2111# Tests whether TYPE exists after having included INCLUDES, setting cache
2112# variable VAR accordingly.
2113ac_fn_c_check_type ()
2114{
2115 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2117$as_echo_n "checking for $2... " >&6; }
9164c0e4 2118if eval "test \"\${$3+set}\"" = set; then :
eb697db5
DN
2119 $as_echo_n "(cached) " >&6
2120else
2121 eval "$3=no"
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128if (sizeof ($2))
2129 return 0;
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141if (sizeof (($2)))
2142 return 0;
2143 ;
2144 return 0;
2145}
2146_ACEOF
2147if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 2148
eb697db5
DN
2149else
2150 eval "$3=yes"
2151fi
2152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 2155fi
eb697db5
DN
2156eval ac_res=\$$3
2157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2158$as_echo "$ac_res" >&6; }
2159 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2160
2161} # ac_fn_c_check_type
2162cat >config.log <<_ACEOF
2163This file contains any messages produced by compilers while
2164running configure, to aid debugging if configure makes a mistake.
2165
2166It was created by emacs $as_me 24.0.50, which was
9164c0e4 2167generated by GNU Autoconf 2.66. Invocation command line was
eb697db5
DN
2168
2169 $ $0 $@
2170
2171_ACEOF
2172exec 5>>config.log
2173{
2174cat <<_ASUNAME
2175## --------- ##
2176## Platform. ##
2177## --------- ##
2178
2179hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2180uname -m = `(uname -m) 2>/dev/null || echo unknown`
2181uname -r = `(uname -r) 2>/dev/null || echo unknown`
2182uname -s = `(uname -s) 2>/dev/null || echo unknown`
2183uname -v = `(uname -v) 2>/dev/null || echo unknown`
2184
2185/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2186/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2187
2188/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2189/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2190/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2191/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2192/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2193/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2194/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2195
2196_ASUNAME
2197
2198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2199for as_dir in $PATH
2200do
2201 IFS=$as_save_IFS
2202 test -z "$as_dir" && as_dir=.
2203 $as_echo "PATH: $as_dir"
2204 done
2205IFS=$as_save_IFS
2206
2207} >&5
2208
2209cat >&5 <<_ACEOF
2210
2211
2212## ----------- ##
2213## Core tests. ##
2214## ----------- ##
2215
2216_ACEOF
2217
2218
2219# Keep a trace of the command line.
2220# Strip out --no-create and --no-recursion so they do not pile up.
2221# Strip out --silent because we don't want to record it for future runs.
2222# Also quote any args containing shell meta-characters.
2223# Make two passes to allow for proper duplicate-argument suppression.
2224ac_configure_args=
2225ac_configure_args0=
2226ac_configure_args1=
2227ac_must_keep_next=false
2228for ac_pass in 1 2
2229do
2230 for ac_arg
2231 do
2232 case $ac_arg in
2233 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2234 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2235 | -silent | --silent | --silen | --sile | --sil)
2236 continue ;;
2237 *\'*)
2238 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2239 esac
2240 case $ac_pass in
2241 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2242 2)
2243 as_fn_append ac_configure_args1 " '$ac_arg'"
2244 if test $ac_must_keep_next = true; then
2245 ac_must_keep_next=false # Got value, back to normal.
2246 else
2247 case $ac_arg in
2248 *=* | --config-cache | -C | -disable-* | --disable-* \
2249 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2250 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2251 | -with-* | --with-* | -without-* | --without-* | --x)
2252 case "$ac_configure_args0 " in
2253 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2254 esac
2255 ;;
2256 -* ) ac_must_keep_next=true ;;
2257 esac
2258 fi
2259 as_fn_append ac_configure_args " '$ac_arg'"
2260 ;;
2261 esac
2262 done
2263done
2264{ ac_configure_args0=; unset ac_configure_args0;}
2265{ ac_configure_args1=; unset ac_configure_args1;}
2266
2267# When interrupted or exit'd, cleanup temporary files, and complete
2268# config.log. We remove comments because anyway the quotes in there
2269# would cause problems or look ugly.
2270# WARNING: Use '\'' to represent an apostrophe within the trap.
2271# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2272trap 'exit_status=$?
2273 # Save into config.log some information that might help in debugging.
2274 {
2275 echo
2276
9164c0e4 2277 $as_echo "## ---------------- ##
eb697db5 2278## Cache variables. ##
9164c0e4 2279## ---------------- ##"
eb697db5
DN
2280 echo
2281 # The following way of writing the cache mishandles newlines in values,
2282(
2283 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2284 eval ac_val=\$$ac_var
2285 case $ac_val in #(
2286 *${as_nl}*)
2287 case $ac_var in #(
2288 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2289$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2290 esac
2291 case $ac_var in #(
2292 _ | IFS | as_nl) ;; #(
2293 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2294 *) { eval $ac_var=; unset $ac_var;} ;;
2295 esac ;;
2296 esac
2297 done
2298 (set) 2>&1 |
2299 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2300 *${as_nl}ac_space=\ *)
2301 sed -n \
2302 "s/'\''/'\''\\\\'\'''\''/g;
2303 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2304 ;; #(
2305 *)
2306 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2307 ;;
2308 esac |
2309 sort
2310)
2311 echo
08b47d3d 2312
9164c0e4 2313 $as_echo "## ----------------- ##
eb697db5 2314## Output variables. ##
9164c0e4 2315## ----------------- ##"
eb697db5
DN
2316 echo
2317 for ac_var in $ac_subst_vars
2318 do
2319 eval ac_val=\$$ac_var
2320 case $ac_val in
2321 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2322 esac
2323 $as_echo "$ac_var='\''$ac_val'\''"
2324 done | sort
2325 echo
a5edbe4a 2326
eb697db5 2327 if test -n "$ac_subst_files"; then
9164c0e4 2328 $as_echo "## ------------------- ##
eb697db5 2329## File substitutions. ##
9164c0e4 2330## ------------------- ##"
eb697db5
DN
2331 echo
2332 for ac_var in $ac_subst_files
2333 do
2334 eval ac_val=\$$ac_var
2335 case $ac_val in
2336 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2337 esac
2338 $as_echo "$ac_var='\''$ac_val'\''"
2339 done | sort
2340 echo
2341 fi
a5edbe4a 2342
eb697db5 2343 if test -s confdefs.h; then
9164c0e4 2344 $as_echo "## ----------- ##
eb697db5 2345## confdefs.h. ##
9164c0e4 2346## ----------- ##"
eb697db5
DN
2347 echo
2348 cat confdefs.h
2349 echo
2350 fi
2351 test "$ac_signal" != 0 &&
2352 $as_echo "$as_me: caught signal $ac_signal"
2353 $as_echo "$as_me: exit $exit_status"
2354 } >&5
2355 rm -f core *.core core.conftest.* &&
2356 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2357 exit $exit_status
2358' 0
2359for ac_signal in 1 2 13 15; do
2360 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2361done
2362ac_signal=0
cd03c74a 2363
eb697db5
DN
2364# confdefs.h avoids OS command line length limits that DEFS can exceed.
2365rm -f -r conftest* confdefs.h
a5edbe4a 2366
eb697db5 2367$as_echo "/* confdefs.h */" > confdefs.h
a4f64981 2368
eb697db5 2369# Predefined preprocessor variables.
8c5ff6dd 2370
eb697db5
DN
2371cat >>confdefs.h <<_ACEOF
2372#define PACKAGE_NAME "$PACKAGE_NAME"
5929fbe7 2373_ACEOF
8c5ff6dd 2374
eb697db5
DN
2375cat >>confdefs.h <<_ACEOF
2376#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2377_ACEOF
8c5ff6dd 2378
eb697db5
DN
2379cat >>confdefs.h <<_ACEOF
2380#define PACKAGE_VERSION "$PACKAGE_VERSION"
5929fbe7 2381_ACEOF
8c5ff6dd 2382
eb697db5
DN
2383cat >>confdefs.h <<_ACEOF
2384#define PACKAGE_STRING "$PACKAGE_STRING"
5929fbe7 2385_ACEOF
8c5ff6dd 2386
eb697db5
DN
2387cat >>confdefs.h <<_ACEOF
2388#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2389_ACEOF
8c5ff6dd 2390
eb697db5
DN
2391cat >>confdefs.h <<_ACEOF
2392#define PACKAGE_URL "$PACKAGE_URL"
5929fbe7 2393_ACEOF
8c5ff6dd 2394
8c5ff6dd 2395
eb697db5
DN
2396# Let the site file select an alternate cache file if it wants to.
2397# Prefer an explicitly selected file to automatically selected ones.
2398ac_site_file1=NONE
2399ac_site_file2=NONE
2400if test -n "$CONFIG_SITE"; then
9164c0e4
AS
2401 # We do not want a PATH search for config.site.
2402 case $CONFIG_SITE in #((
2403 -*) ac_site_file1=./$CONFIG_SITE;;
2404 */*) ac_site_file1=$CONFIG_SITE;;
2405 *) ac_site_file1=./$CONFIG_SITE;;
2406 esac
eb697db5
DN
2407elif test "x$prefix" != xNONE; then
2408 ac_site_file1=$prefix/share/config.site
2409 ac_site_file2=$prefix/etc/config.site
2410else
2411 ac_site_file1=$ac_default_prefix/share/config.site
2412 ac_site_file2=$ac_default_prefix/etc/config.site
5929fbe7 2413fi
eb697db5
DN
2414for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2415do
2416 test "x$ac_site_file" = xNONE && continue
2417 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2418 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2419$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2420 sed 's/^/| /' "$ac_site_file" >&5
9164c0e4
AS
2421 . "$ac_site_file" \
2422 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2423$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2424as_fn_error $? "failed to load site script $ac_site_file
2425See \`config.log' for more details" "$LINENO" 5; }
eb697db5
DN
2426 fi
2427done
49ebbd65 2428
eb697db5
DN
2429if test -r "$cache_file"; then
2430 # Some versions of bash will fail to source /dev/null (special files
2431 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2432 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2433 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2434$as_echo "$as_me: loading cache $cache_file" >&6;}
2435 case $cache_file in
2436 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2437 *) . "./$cache_file";;
2438 esac
2439 fi
5929fbe7 2440else
eb697db5
DN
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2442$as_echo "$as_me: creating cache $cache_file" >&6;}
2443 >$cache_file
2444fi
49ebbd65 2445
eb697db5
DN
2446as_fn_append ac_header_list " stdlib.h"
2447as_fn_append ac_header_list " unistd.h"
2448as_fn_append ac_header_list " sys/param.h"
2449as_fn_append ac_header_list " sys/time.h"
2450as_fn_append ac_func_list " alarm"
2451# Check that the precious variables saved in the cache have kept the same
2452# value.
2453ac_cache_corrupted=false
2454for ac_var in $ac_precious_vars; do
2455 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2456 eval ac_new_set=\$ac_env_${ac_var}_set
2457 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2458 eval ac_new_val=\$ac_env_${ac_var}_value
2459 case $ac_old_set,$ac_new_set in
2460 set,)
2461 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2462$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2463 ac_cache_corrupted=: ;;
2464 ,set)
2465 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2466$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2467 ac_cache_corrupted=: ;;
2468 ,);;
2469 *)
2470 if test "x$ac_old_val" != "x$ac_new_val"; then
2471 # differences in whitespace do not lead to failure.
2472 ac_old_val_w=`echo x $ac_old_val`
2473 ac_new_val_w=`echo x $ac_new_val`
2474 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2475 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2476$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2477 ac_cache_corrupted=:
2478 else
2479 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2480$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2481 eval $ac_var=\$ac_old_val
2482 fi
2483 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2484$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2485 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2486$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2487 fi;;
2488 esac
2489 # Pass precious variables to config.status.
2490 if test "$ac_new_set" = set; then
2491 case $ac_new_val in
2492 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2493 *) ac_arg=$ac_var=$ac_new_val ;;
2494 esac
2495 case " $ac_configure_args " in
2496 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2497 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
8c5ff6dd 2498 esac
eb697db5
DN
2499 fi
2500done
2501if $ac_cache_corrupted; then
2502 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2503$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2504 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2505$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
9164c0e4 2506 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
eb697db5
DN
2507fi
2508## -------------------- ##
2509## Main body of script. ##
2510## -------------------- ##
2511
2512ac_ext=c
2513ac_cpp='$CPP $CPPFLAGS'
2514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2516ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 2517
e6df49e4 2518
eb697db5 2519ac_config_headers="$ac_config_headers src/config.h:src/config.in"
49ebbd65 2520
a4f64981 2521
a4f64981 2522
eb697db5
DN
2523test "$program_prefix" != NONE &&
2524 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2525# Use a double $ so make ignores it.
2526test "$program_suffix" != NONE &&
2527 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2528# Double any \ or $.
2529# By default was `s,x,x', remove it if useless.
2530ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2531program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
a4f64981 2532
49ebbd65 2533
eb697db5
DN
2534lispdir='${datadir}/emacs/${version}/lisp'
2535locallisppath='${datadir}/emacs/${version}/site-lisp:'\
2536'${datadir}/emacs/site-lisp'
2537lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
2538etcdir='${datadir}/emacs/${version}/etc'
2539archlibdir='${libexecdir}/emacs/${version}/${configuration}'
2540docdir='${datadir}/emacs/${version}/etc'
2541gamedir='${localstatedir}/games/emacs'
49ebbd65 2542
eb697db5 2543gameuser=games
49ebbd65 2544
49ebbd65 2545
a4f64981 2546
eb697db5
DN
2547
2548# Check whether --with-pop was given.
2549if test "${with_pop+set}" = set; then :
2550 withval=$with_pop;
5929fbe7 2551else
eb697db5
DN
2552 with_pop=yes
2553fi
2554
2555if test "$with_pop" = yes; then
2556 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
a4f64981 2557
5929fbe7
GM
2558fi
2559
5929fbe7 2560
eb697db5
DN
2561# Check whether --with-kerberos was given.
2562if test "${with_kerberos+set}" = set; then :
2563 withval=$with_kerberos;
5929fbe7 2564else
eb697db5
DN
2565 with_kerberos=no
2566fi
2567
2568if test "$with_kerberos" != no; then
2569 $as_echo "#define KERBEROS 1" >>confdefs.h
9452ded1 2570
5929fbe7 2571fi
a4f64981 2572
15e12598 2573
eb697db5
DN
2574# Check whether --with-kerberos5 was given.
2575if test "${with_kerberos5+set}" = set; then :
2576 withval=$with_kerberos5;
5929fbe7 2577else
eb697db5 2578 with_kerberos5=no
a4f64981
GM
2579fi
2580
eb697db5
DN
2581if test "${with_kerberos5}" != no; then
2582 if test "${with_kerberos}" = no; then
2583 with_kerberos=yes
2584 $as_echo "#define KERBEROS 1" >>confdefs.h
a4f64981 2585
5929fbe7 2586 fi
a5edbe4a 2587
eb697db5 2588$as_echo "#define KERBEROS5 1" >>confdefs.h
a4f64981 2589
eb697db5 2590fi
a4f64981 2591
a5edbe4a 2592
eb697db5
DN
2593# Check whether --with-hesiod was given.
2594if test "${with_hesiod+set}" = set; then :
2595 withval=$with_hesiod;
49ebbd65 2596else
eb697db5
DN
2597 with_hesiod=no
2598fi
5929fbe7 2599
eb697db5 2600if test "$with_hesiod" != no; then
5929fbe7 2601
eb697db5 2602$as_echo "#define HESIOD 1" >>confdefs.h
5929fbe7 2603
eb697db5 2604fi
5929fbe7 2605
5929fbe7 2606
eb697db5
DN
2607# Check whether --with-mmdf was given.
2608if test "${with_mmdf+set}" = set; then :
2609 withval=$with_mmdf;
8c5ff6dd 2610else
eb697db5 2611 with_mmdf=no
15e12598 2612fi
5929fbe7 2613
eb697db5 2614if test "$with_mmdf" != no; then
a5edbe4a 2615
eb697db5 2616$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
a5edbe4a 2617
8c5ff6dd 2618fi
5929fbe7 2619
5929fbe7 2620
eb697db5
DN
2621# Check whether --with-mail-unlink was given.
2622if test "${with_mail_unlink+set}" = set; then :
2623 withval=$with_mail_unlink;
8c5ff6dd 2624else
eb697db5 2625 with_mail_unlink=no
8c5ff6dd 2626fi
5929fbe7 2627
eb697db5
DN
2628if test "$with_mail_unlink" != no; then
2629
2630$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
2631
8c5ff6dd 2632fi
a5edbe4a 2633
5929fbe7 2634
eb697db5
DN
2635# Check whether --with-mailhost was given.
2636if test "${with_mailhost+set}" = set; then :
2637 withval=$with_mailhost;
2638cat >>confdefs.h <<_ACEOF
2639#define MAILHOST "$withval"
5929fbe7
GM
2640_ACEOF
2641
8c5ff6dd 2642fi
a4f64981 2643
5929fbe7 2644
5929fbe7 2645
eb697db5
DN
2646# Check whether --with-sound was given.
2647if test "${with_sound+set}" = set; then :
2648 withval=$with_sound;
2649else
2650 with_sound=yes
2651fi
5929fbe7 2652
5929fbe7 2653
a4f64981 2654
eb697db5
DN
2655# Check whether --with-sync-input was given.
2656if test "${with_sync_input+set}" = set; then :
2657 withval=$with_sync_input;
8c5ff6dd 2658else
eb697db5 2659 with_sync_input=yes
8c5ff6dd 2660fi
a4f64981 2661
eb697db5 2662if test "$with_sync_input" = yes; then
a4f64981 2663
eb697db5 2664$as_echo "#define SYNC_INPUT 1" >>confdefs.h
5929fbe7 2665
eb697db5 2666fi
5929fbe7 2667
5929fbe7 2668
eb697db5
DN
2669# Check whether --with-x-toolkit was given.
2670if test "${with_x_toolkit+set}" = set; then :
2671 withval=$with_x_toolkit; case "${withval}" in
2672 y | ye | yes ) val=gtk ;;
2673 n | no ) val=no ;;
2674 l | lu | luc | luci | lucid ) val=lucid ;;
2675 a | at | ath | athe | athen | athena ) val=athena ;;
2676 m | mo | mot | moti | motif ) val=motif ;;
2677 g | gt | gtk ) val=gtk ;;
e547b051 2678 gtk3 ) val=gtk3 ;;
eb697db5 2679 * )
9164c0e4 2680as_fn_error $? "\`--with-x-toolkit=$withval' is invalid;
e547b051
J
2681this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
2682\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
eb697db5
DN
2683 ;;
2684 esac
2685 with_x_toolkit=$val
5929fbe7 2686
eb697db5 2687fi
5929fbe7 2688
5929fbe7
GM
2689
2690
eb697db5
DN
2691# Check whether --with-xpm was given.
2692if test "${with_xpm+set}" = set; then :
2693 withval=$with_xpm;
2694else
2695 with_xpm=yes
2696fi
5929fbe7 2697
5929fbe7 2698
eb697db5
DN
2699# Check whether --with-jpeg was given.
2700if test "${with_jpeg+set}" = set; then :
2701 withval=$with_jpeg;
2702else
2703 with_jpeg=yes
2704fi
5929fbe7
GM
2705
2706
eb697db5
DN
2707# Check whether --with-tiff was given.
2708if test "${with_tiff+set}" = set; then :
2709 withval=$with_tiff;
2710else
2711 with_tiff=yes
2712fi
5929fbe7
GM
2713
2714
eb697db5
DN
2715# Check whether --with-gif was given.
2716if test "${with_gif+set}" = set; then :
2717 withval=$with_gif;
2718else
2719 with_gif=yes
2720fi
5929fbe7 2721
5929fbe7 2722
eb697db5
DN
2723# Check whether --with-png was given.
2724if test "${with_png+set}" = set; then :
2725 withval=$with_png;
2726else
2727 with_png=yes
8c5ff6dd 2728fi
5929fbe7
GM
2729
2730
eb697db5
DN
2731# Check whether --with-rsvg was given.
2732if test "${with_rsvg+set}" = set; then :
2733 withval=$with_rsvg;
2734else
2735 with_rsvg=yes
2736fi
5929fbe7
GM
2737
2738
5929fbe7 2739
eb697db5
DN
2740# Check whether --with-xft was given.
2741if test "${with_xft+set}" = set; then :
2742 withval=$with_xft;
8c5ff6dd 2743else
eb697db5 2744 with_xft=yes
8c5ff6dd 2745fi
eb697db5
DN
2746
2747
2748# Check whether --with-libotf was given.
2749if test "${with_libotf+set}" = set; then :
2750 withval=$with_libotf;
8c5ff6dd 2751else
eb697db5 2752 with_libotf=yes
8c5ff6dd 2753fi
e6df49e4
GM
2754
2755
eb697db5
DN
2756# Check whether --with-m17n-flt was given.
2757if test "${with_m17n_flt+set}" = set; then :
2758 withval=$with_m17n_flt;
2759else
2760 with_m17n_flt=yes
2761fi
2762
5929fbe7 2763
5929fbe7 2764
eb697db5
DN
2765# Check whether --with-toolkit-scroll-bars was given.
2766if test "${with_toolkit_scroll_bars+set}" = set; then :
2767 withval=$with_toolkit_scroll_bars;
2768else
2769 with_toolkit_scroll_bars=yes
2770fi
5929fbe7 2771
5929fbe7 2772
eb697db5
DN
2773# Check whether --with-xaw3d was given.
2774if test "${with_xaw3d+set}" = set; then :
2775 withval=$with_xaw3d;
2776else
2777 with_xaw3d=yes
2778fi
5929fbe7 2779
5929fbe7 2780
eb697db5
DN
2781# Check whether --with-xim was given.
2782if test "${with_xim+set}" = set; then :
2783 withval=$with_xim;
2784else
2785 with_xim=yes
2786fi
5929fbe7
GM
2787
2788
eb697db5
DN
2789# Check whether --with-ns was given.
2790if test "${with_ns+set}" = set; then :
2791 withval=$with_ns;
2792else
2793 with_ns=no
2794fi
5929fbe7 2795
5929fbe7 2796
eb697db5
DN
2797
2798# Check whether --with-gpm was given.
2799if test "${with_gpm+set}" = set; then :
2800 withval=$with_gpm;
2801else
2802 with_gpm=yes
8c5ff6dd 2803fi
5929fbe7
GM
2804
2805
eb697db5
DN
2806# Check whether --with-dbus was given.
2807if test "${with_dbus+set}" = set; then :
2808 withval=$with_dbus;
2809else
2810 with_dbus=yes
2811fi
5929fbe7
GM
2812
2813
eb697db5
DN
2814# Check whether --with-gconf was given.
2815if test "${with_gconf+set}" = set; then :
2816 withval=$with_gconf;
2817else
2818 with_gconf=yes
2819fi
5929fbe7 2820
5929fbe7 2821
eb697db5
DN
2822# Check whether --with-selinux was given.
2823if test "${with_selinux+set}" = set; then :
2824 withval=$with_selinux;
8c5ff6dd 2825else
eb697db5
DN
2826 with_selinux=yes
2827fi
5929fbe7 2828
5929fbe7 2829
eb697db5
DN
2830## For the times when you want to build Emacs but don't have
2831## a suitable makeinfo, and can live without the manuals.
5929fbe7 2832
eb697db5
DN
2833# Check whether --with-makeinfo was given.
2834if test "${with_makeinfo+set}" = set; then :
2835 withval=$with_makeinfo;
2836else
2837 with_makeinfo=yes
2838fi
5929fbe7 2839
5929fbe7 2840
e547b051
J
2841## This is an option because I do not know if all info/man support
2842## compressed files, nor how to test if they do so.
2843
2844# Check whether --with-compress-info was given.
2845if test "${with_compress_info+set}" = set; then :
2846 withval=$with_compress_info;
2847else
2848 with_compress_info=yes
2849fi
2850
2851if test $with_compress_info = yes; then
2852 GZIP_INFO=yes
2853else
2854 GZIP_INFO=
2855fi
2856
2857
0c309b80 2858
eb697db5
DN
2859# Check whether --with-pkg-config-prog was given.
2860if test "${with_pkg_config_prog+set}" = set; then :
2861 withval=$with_pkg_config_prog;
8c5ff6dd 2862fi
5929fbe7 2863
eb697db5
DN
2864if test "X${with_pkg_config_prog}" != X; then
2865 if test "${with_pkg_config_prog}" != yes; then
2866 PKG_CONFIG="${with_pkg_config_prog}"
2867 fi
8c5ff6dd 2868fi
e6df49e4 2869
eb697db5 2870CRT_DIR=
a4f64981 2871
eb697db5
DN
2872# Check whether --with-crt-dir was given.
2873if test "${with_crt_dir+set}" = set; then :
2874 withval=$with_crt_dir;
2875fi
2876
2877CRT_DIR="${with_crt_dir}"
5929fbe7 2878
e6df49e4 2879
eb697db5
DN
2880# Check whether --with-gnustep-conf was given.
2881if test "${with_gnustep_conf+set}" = set; then :
2882 withval=$with_gnustep_conf;
15e12598 2883fi
e6df49e4 2884
eb697db5
DN
2885test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2886 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2887test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2888 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
e6df49e4 2889
eb697db5
DN
2890# Check whether --enable-ns-self-contained was given.
2891if test "${enable_ns_self_contained+set}" = set; then :
2892 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
2893else
2894 EN_NS_SELF_CONTAINED=yes
2895fi
e6df49e4 2896
5929fbe7 2897
eb697db5
DN
2898# Check whether --enable-asserts was given.
2899if test "${enable_asserts+set}" = set; then :
2900 enableval=$enable_asserts; USE_XASSERTS=$enableval
2901else
2902 USE_XASSERTS=no
2903fi
a4f64981
GM
2904
2905
eb697db5
DN
2906# Check whether --enable-maintainer-mode was given.
2907if test "${enable_maintainer_mode+set}" = set; then :
2908 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
5929fbe7 2909else
eb697db5
DN
2910 USE_MAINTAINER_MODE=no
2911fi
a4f64981 2912
eb697db5
DN
2913if test $USE_MAINTAINER_MODE = yes; then
2914 MAINT=
2915else
2916 MAINT=#
2917fi
e6df49e4 2918
5929fbe7 2919
eb697db5
DN
2920# Check whether --enable-locallisppath was given.
2921if test "${enable_locallisppath+set}" = set; then :
2922 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
2923 locallisppath=
2924elif test "${enableval}" != "yes"; then
2925 locallisppath=${enableval}
2926fi
2927fi
5929fbe7 2928
5929fbe7 2929
eb697db5
DN
2930# Check whether --enable-checking was given.
2931if test "${enable_checking+set}" = set; then :
2932 enableval=$enable_checking; ac_checking_flags="${enableval}"
2933fi
2934
2935IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2936for check in $ac_checking_flags
2937do
2938 case $check in
2939 # these set all the flags to specific states
2940 yes) ac_enable_checking=1 ;;
2941 no) ac_enable_checking= ;
2942 ac_gc_check_stringbytes= ;
2943 ac_gc_check_string_overrun= ;
2944 ac_gc_check_string_free_list= ;
2945 ac_xmalloc_overrun= ;
2946 ac_gc_check_cons_list= ;;
2947 all) ac_enable_checking=1 ;
2948 ac_gc_check_stringbytes=1 ;
2949 ac_gc_check_string_overrun=1 ;
2950 ac_gc_check_string_free_list=1 ;
2951 ac_xmalloc_overrun=1 ;
2952 ac_gc_check_cons_list=1 ;;
2953 # these enable particular checks
2954 stringbytes) ac_gc_check_stringbytes=1 ;;
2955 stringoverrun) ac_gc_check_string_overrun=1 ;;
2956 stringfreelist) ac_gc_check_string_free_list=1 ;;
2957 xmallocoverrun) ac_xmalloc_overrun=1 ;;
2958 conslist) ac_gc_check_cons_list=1 ;;
9164c0e4 2959 *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;;
eb697db5
DN
2960 esac
2961done
2962IFS="$ac_save_IFS"
2963
2964if test x$ac_enable_checking != x ; then
2965
2966$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
2967
2968fi
2969if test x$ac_gc_check_stringbytes != x ; then
2970
2971$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
5929fbe7 2972
5929fbe7 2973fi
eb697db5
DN
2974if test x$ac_gc_check_stringoverrun != x ; then
2975
2976$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
5929fbe7 2977
5929fbe7 2978fi
eb697db5
DN
2979if test x$ac_gc_check_string_free_list != x ; then
2980
2981$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
2982
5929fbe7 2983fi
eb697db5 2984if test x$ac_xmalloc_overrun != x ; then
a4f64981 2985
eb697db5 2986$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
5929fbe7 2987
eb697db5
DN
2988fi
2989if test x$ac_gc_check_cons_list != x ; then
5929fbe7 2990
eb697db5 2991$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
5929fbe7 2992
eb697db5
DN
2993fi
2994
d9170db5
DN
2995# Check whether --enable-use-lisp-union-type was given.
2996if test "${enable_use_lisp_union_type+set}" = set; then :
2997 enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then
2998
2999$as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h
3000
3001fi
3002fi
3003
3004
3005
eb697db5
DN
3006# Check whether --enable-profiling was given.
3007if test "${enable_profiling+set}" = set; then :
3008 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
3009fi
3010
3011if test x$ac_enable_profiling != x ; then
3012 PROFILING_CFLAGS="-DPROFILING=1 -pg"
3013 PROFILING_LDFLAGS="-pg"
5929fbe7 3014else
eb697db5
DN
3015 PROFILING_CFLAGS=
3016 PROFILING_LDFLAGS=
3017fi
a4f64981 3018
e6cfa7c3
AS
3019
3020
eb697db5
DN
3021# Check whether --enable-autodepend was given.
3022if test "${enable_autodepend+set}" = set; then :
3023 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
3024else
3025 ac_enable_autodepend=yes
3026fi
8c5ff6dd 3027
eb697db5
DN
3028
3029#### Make srcdir absolute, if it isn't already. It's important to
3030#### avoid running the path through pwd unnecessarily, since pwd can
3031#### give you automounter prefixes, which can go away. We do all this
3032#### so Emacs can find its files when run uninstalled.
3033## Make sure CDPATH doesn't affect cd (in case PWD is relative).
3034unset CDPATH
3035case "${srcdir}" in
3036 /* ) ;;
3037 . )
3038 ## We may be able to use the $PWD environment variable to make this
3039 ## absolute. But sometimes PWD is inaccurate.
3040 ## Note: we used to use ${PWD} at the end instead of `pwd`,
3041 ## but that tested only for a well-formed and valid PWD,
3042 ## it did not object when PWD was well-formed and valid but just wrong.
3043 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
3044 then
3045 srcdir="$PWD"
3046 else
3047 srcdir="`(cd ${srcdir}; pwd)`"
3048 fi
3049 ;;
3050 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
a4f64981 3051esac
e6df49e4 3052
eb697db5
DN
3053#### Check if the source directory already has a configured system in it.
3054if test `pwd` != `(cd ${srcdir} && pwd)` \
3055 && test -f "${srcdir}/src/config.h" ; then
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
3057 as a build directory right now; it has been configured in its own
3058 right. To configure in another directory as well, you MUST
3059 use GNU make. If you do not have GNU make, then you must
3060 now do \`make distclean' in ${srcdir},
3061 and then run $0 again." >&5
3062$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
3063 as a build directory right now; it has been configured in its own
3064 right. To configure in another directory as well, you MUST
3065 use GNU make. If you do not have GNU make, then you must
3066 now do \`make distclean' in ${srcdir},
3067 and then run $0 again." >&2;}
5929fbe7
GM
3068fi
3069
eb697db5
DN
3070#### Given the configuration name, set machfile and opsysfile to the
3071#### names of the m/*.h and s/*.h files we should use.
3072
3073### Canonicalize the configuration name.
3074
3075ac_aux_dir=
3076for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
9164c0e4
AS
3077 if test -f "$ac_dir/install-sh"; then
3078 ac_aux_dir=$ac_dir
3079 ac_install_sh="$ac_aux_dir/install-sh -c"
3080 break
3081 elif test -f "$ac_dir/install.sh"; then
3082 ac_aux_dir=$ac_dir
3083 ac_install_sh="$ac_aux_dir/install.sh -c"
3084 break
3085 elif test -f "$ac_dir/shtool"; then
3086 ac_aux_dir=$ac_dir
3087 ac_install_sh="$ac_aux_dir/shtool install -c"
3088 break
3089 fi
eb697db5
DN
3090done
3091if test -z "$ac_aux_dir"; then
9164c0e4 3092 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5929fbe7 3093fi
eb697db5
DN
3094
3095# These three variables are undocumented and unsupported,
3096# and are intended to be withdrawn in a future Autoconf release.
3097# They can cause serious problems if a builder's source tree is in a directory
3098# whose full name contains unusual characters.
3099ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3100ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3101ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3102
3103
3104# Make sure we can run config.sub.
3105$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
9164c0e4 3106 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
eb697db5
DN
3107
3108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3109$as_echo_n "checking build system type... " >&6; }
3110if test "${ac_cv_build+set}" = set; then :
3111 $as_echo_n "(cached) " >&6
8c5ff6dd 3112else
eb697db5
DN
3113 ac_build_alias=$build_alias
3114test "x$ac_build_alias" = x &&
3115 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3116test "x$ac_build_alias" = x &&
9164c0e4 3117 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
eb697db5 3118ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
9164c0e4 3119 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
eb697db5 3120
15e12598 3121fi
eb697db5
DN
3122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3123$as_echo "$ac_cv_build" >&6; }
3124case $ac_cv_build in
3125*-*-*) ;;
9164c0e4 3126*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
eb697db5
DN
3127esac
3128build=$ac_cv_build
3129ac_save_IFS=$IFS; IFS='-'
3130set x $ac_cv_build
3131shift
3132build_cpu=$1
3133build_vendor=$2
3134shift; shift
3135# Remember, the first character of IFS is used to create $*,
3136# except with old shells:
3137build_os=$*
3138IFS=$ac_save_IFS
3139case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15e12598 3140
5929fbe7 3141
eb697db5
DN
3142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3143$as_echo_n "checking host system type... " >&6; }
3144if test "${ac_cv_host+set}" = set; then :
5929fbe7
GM
3145 $as_echo_n "(cached) " >&6
3146else
eb697db5
DN
3147 if test "x$host_alias" = x; then
3148 ac_cv_host=$ac_cv_build
3149else
3150 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
9164c0e4 3151 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
eb697db5 3152fi
5929fbe7 3153
eb697db5
DN
3154fi
3155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3156$as_echo "$ac_cv_host" >&6; }
3157case $ac_cv_host in
3158*-*-*) ;;
9164c0e4 3159*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
eb697db5
DN
3160esac
3161host=$ac_cv_host
3162ac_save_IFS=$IFS; IFS='-'
3163set x $ac_cv_host
3164shift
3165host_cpu=$1
3166host_vendor=$2
3167shift; shift
3168# Remember, the first character of IFS is used to create $*,
3169# except with old shells:
3170host_os=$*
3171IFS=$ac_save_IFS
3172case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5929fbe7 3173
5929fbe7 3174
eb697db5
DN
3175canonical=$host
3176configuration=${host_alias-${build_alias-$host}}
5929fbe7 3177
5929fbe7 3178
5929fbe7 3179
eb697db5
DN
3180### If you add support for a new configuration, add code to this
3181### switch statement to recognize your configuration name and select
3182### the appropriate operating system and machine description files.
8c5ff6dd 3183
eb697db5
DN
3184### You would hope that you could choose an m/*.h file pretty much
3185### based on the machine portion of the configuration name, and an s/*.h
3186### file based on the operating system portion. However, it turns out
3187### that each m/*.h file is pretty manufacturer-specific - for
3188### example mips.h is MIPS
3189### So we basically have to have a special case for each
3190### configuration name.
3191###
3192### As far as handling version numbers on operating systems is
3193### concerned, make sure things will fail in a fixable way. If
3194### /etc/MACHINES doesn't say anything about version numbers, be
3195### prepared to handle anything reasonably. If version numbers
3196### matter, be sure /etc/MACHINES says something about it.
3197
3198machine='' opsys='' unported=no
3199case "${canonical}" in
3200
3201 ## FreeBSD ports
3202 *-*-freebsd* )
3203 opsys=freebsd
3204 case "${canonical}" in
3205 alpha*) machine=alpha ;;
3206 amd64-*|x86_64-*) machine=amdx86-64 ;;
3207 arm*) machine=arm ;;
3208 ia64-*) machine=ia64 ;;
3209 i[3456]86-*) machine=intel386 ;;
3210 powerpc-*) machine=macppc ;;
3211 sparc-*) machine=sparc ;;
3212 sparc64-*) machine=sparc ;;
3213 esac
3214 ;;
5929fbe7 3215
eb697db5
DN
3216 ## FreeBSD kernel + glibc based userland
3217 *-*-kfreebsd*gnu* )
3218 opsys=gnu-kfreebsd
3219 case "${canonical}" in
3220 alpha*) machine=alpha ;;
3221 amd64-*|x86_64-*) machine=amdx86-64 ;;
3222 ia64-*) machine=ia64 ;;
3223 i[3456]86-*) machine=intel386 ;;
3224 powerpc-*) machine=macppc ;;
3225 sparc-*) machine=sparc ;;
3226 sparc64-*) machine=sparc ;;
3227 esac
3228 ;;
5929fbe7 3229
eb697db5
DN
3230 ## NetBSD ports
3231 *-*-netbsd* )
3232 opsys=netbsd
3233 case "${canonical}" in
3234 alpha*) machine=alpha ;;
3235 x86_64-*) machine=amdx86-64 ;;
3236 arm-*) machine=arm ;;
3237 hppa-*) machine=hp800 ;;
3238 i[3456]86-*) machine=intel386 ;;
3239 m68k-*) machine=m68k ;;
3240 powerpc-*) machine=macppc ;;
3241 mips-*) machine=mips ;;
3242 mipse[bl]-*) machine=mips ;;
3243 sparc*-) machine=sparc ;;
3244 vax-*) machine=vax ;;
3245 esac
3246 ;;
e6df49e4 3247
eb697db5
DN
3248 ## OpenBSD ports
3249 *-*-openbsd* )
3250 opsys=openbsd
3251 case "${canonical}" in
3252 alpha*) machine=alpha ;;
3253 x86_64-*) machine=amdx86-64 ;;
3254 arm-*) machine=arm ;;
3255 hppa-*) machine=hp800 ;;
3256 i386-*) machine=intel386 ;;
3257 powerpc-*) machine=macppc ;;
3258 sparc*) machine=sparc ;;
3259 vax-*) machine=vax ;;
3260 esac
3261 ;;
e6df49e4 3262
eb697db5
DN
3263 alpha*-*-linux-gnu* )
3264 machine=alpha opsys=gnu-linux
3265 ;;
e6df49e4 3266
eb697db5
DN
3267 arm*-*-linux-gnu* )
3268 machine=arm opsys=gnu-linux
3269 ;;
5929fbe7 3270
eb697db5
DN
3271 ## Apple Darwin / Mac OS X
3272 *-apple-darwin* )
3273 case "${canonical}" in
3274 i[3456]86-* ) machine=intel386 ;;
3275 powerpc-* ) machine=macppc ;;
3276 x86_64-* ) machine=amdx86-64 ;;
3277 * ) unported=yes ;;
3278 esac
3279 opsys=darwin
3280 # Define CPP as follows to make autoconf work correctly.
3281 CPP="${CC-cc} -E -no-cpp-precomp"
3282 # Use fink packages if available.
3283 if test -d /sw/include && test -d /sw/lib; then
3284 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3285 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3286 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3287 fi
3288 ;;
5929fbe7 3289
eb697db5
DN
3290 ## HP 9000 series 700 and 800, running HP/UX
3291 hppa*-hp-hpux10.2* )
3292 machine=hp800 opsys=hpux10-20
3293 ;;
3294 hppa*-hp-hpux1[1-9]* )
3295 machine=hp800 opsys=hpux11
3296 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
3297 ;;
5929fbe7 3298
eb697db5
DN
3299 hppa*-*-linux-gnu* )
3300 machine=hp800 opsys=gnu-linux
3301 ;;
5929fbe7 3302
eb697db5
DN
3303 ## IBM machines
3304 s390-*-linux-gnu* )
3305 machine=ibms390 opsys=gnu-linux
3306 ;;
3307 s390x-*-linux-gnu* )
3308 machine=ibms390x opsys=gnu-linux
3309 ;;
3310 rs6000-ibm-aix4.[23]* )
3311 machine=ibmrs6000 opsys=aix4-2
3312 ;;
3313 powerpc-ibm-aix4.[23]* )
3314 machine=ibmrs6000 opsys=aix4-2
3315 ;;
3316 rs6000-ibm-aix[56]* )
3317 machine=ibmrs6000 opsys=aix4-2
3318 ;;
3319 powerpc-ibm-aix[56]* )
3320 machine=ibmrs6000 opsys=aix4-2
3321 ;;
5929fbe7 3322
eb697db5
DN
3323 ## Macintosh PowerPC
3324 powerpc*-*-linux-gnu* )
3325 machine=macppc opsys=gnu-linux
3326 ;;
5929fbe7 3327
eb697db5
DN
3328 ## Silicon Graphics machines
3329 ## Iris 4D
3330 mips-sgi-irix6.5 )
3331 machine=iris4d opsys=irix6-5
3332 # Without defining _LANGUAGE_C, things get masked out in the headers
3333 # so that, for instance, grepping for `free' in stdlib.h fails and
3334 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3335 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
3336 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
3337 ;;
5929fbe7 3338
eb697db5
DN
3339 ## Suns
3340 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3341 machine=sparc opsys=gnu-linux
3342 ;;
15e12598 3343
eb697db5
DN
3344 *-sun-solaris* \
3345 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3346 | x86_64-*-solaris2* | x86_64-*-sunos5*)
3347 case "${canonical}" in
3348 i[3456]86-*-* ) machine=intel386 ;;
3349 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
3350 sparc* ) machine=sparc ;;
3351 * ) unported=yes ;;
3352 esac
3353 case "${canonical}" in
3354 *-sunos5.6* | *-solaris2.6* )
3355 opsys=sol2-6
3356 NON_GNU_CPP=/usr/ccs/lib/cpp
3357 RANLIB="ar -ts"
3358 ;;
3359 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
3360 opsys=sol2-6
3361 emacs_check_sunpro_c=yes
3362 NON_GNU_CPP=/usr/ccs/lib/cpp
3363 ;;
3364 *-sunos5* | *-solaris* )
3365 opsys=sol2-10
3366 emacs_check_sunpro_c=yes
3367 NON_GNU_CPP=/usr/ccs/lib/cpp
3368 ;;
3369 esac
3370 ## Watch out for a compiler that we know will not work.
3371 case "${canonical}" in
3372 *-solaris* | *-sunos5* )
3373 if [ "x$CC" = x/usr/ucb/cc ]; then
3374 ## /usr/ucb/cc doesn't work;
3375 ## we should find some other compiler that does work.
3376 unset CC
3377 fi
3378 ;;
3379 *) ;;
3380 esac
3381 ;;
5929fbe7 3382
eb697db5
DN
3383 ## IA-64
3384 ia64*-*-linux* )
3385 machine=ia64 opsys=gnu-linux
3386 ;;
aaa36002 3387
eb697db5
DN
3388 ## Intel 386 machines where we don't care about the manufacturer.
3389 i[3456]86-*-* )
3390 machine=intel386
3391 case "${canonical}" in
3392 *-cygwin ) opsys=cygwin ;;
3393 *-darwin* ) opsys=darwin
3394 CPP="${CC-cc} -E -no-cpp-precomp"
3395 ;;
3396 *-linux-gnu* ) opsys=gnu-linux ;;
3397 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3398 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3399 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3400 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3401 esac
3402 ;;
5929fbe7 3403
eb697db5
DN
3404 ## m68k Linux-based GNU system
3405 m68k-*-linux-gnu* )
3406 machine=m68k opsys=gnu-linux
3407 ;;
5929fbe7 3408
eb697db5
DN
3409 ## Mips Linux-based GNU system
3410 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3411 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
3412 machine=mips opsys=gnu-linux
3413 ;;
5929fbe7 3414
eb697db5
DN
3415 ## AMD x86-64 Linux-based GNU system
3416 x86_64-*-linux-gnu* )
3417 machine=amdx86-64 opsys=gnu-linux
3418 ;;
5929fbe7 3419
eb697db5
DN
3420 ## Tensilica Xtensa Linux-based GNU system
3421 xtensa*-*-linux-gnu* )
3422 machine=xtensa opsys=gnu-linux
3423 ;;
5929fbe7 3424
eb697db5
DN
3425 ## SuperH Linux-based GNU system
3426 sh[34]*-*-linux-gnu* )
3427 machine=sh3 opsys=gnu-linux
3428 ;;
5929fbe7 3429
eb697db5
DN
3430 * )
3431 unported=yes
3432 ;;
5929fbe7 3433esac
aaa36002 3434
eb697db5
DN
3435### If the code above didn't choose an operating system, just choose
3436### an operating system based on the configuration name. You really
3437### only want to use this when you have no idea what the right
3438### operating system is; if you know what operating systems a machine
3439### runs, it's cleaner to make it explicit in the case statement
3440### above.
3441if test x"${opsys}" = x; then
3442 case "${canonical}" in
3443 *-gnu* ) opsys=gnu ;;
3444 * )
3445 unported=yes
3446 ;;
3447 esac
5929fbe7 3448fi
aaa36002 3449
5929fbe7 3450
5929fbe7 3451
eb697db5 3452if test $unported = yes; then
9164c0e4 3453 as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems.
eb697db5 3454Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
5929fbe7
GM
3455fi
3456
eb697db5
DN
3457machfile="m/${machine}.h"
3458opsysfile="s/${opsys}.h"
5929fbe7 3459
5929fbe7 3460
eb697db5
DN
3461#### Choose a compiler.
3462test -n "$CC" && cc_specified=yes
3463
3464# Save the value of CFLAGS that the user specified.
3465SPECIFIED_CFLAGS="$CFLAGS"
3466
3467ac_ext=c
3468ac_cpp='$CPP $CPPFLAGS'
3469ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3470ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3471ac_compiler_gnu=$ac_cv_c_compiler_gnu
3472if test -n "$ac_tool_prefix"; then
3473 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3474set dummy ${ac_tool_prefix}gcc; ac_word=$2
3475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3476$as_echo_n "checking for $ac_word... " >&6; }
3477if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3478 $as_echo_n "(cached) " >&6
3479else
eb697db5
DN
3480 if test -n "$CC"; then
3481 ac_cv_prog_CC="$CC" # Let the user override the test.
3482else
3483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3484for as_dir in $PATH
3485do
3486 IFS=$as_save_IFS
3487 test -z "$as_dir" && as_dir=.
3488 for ac_exec_ext in '' $ac_executable_extensions; do
3489 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3490 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3491 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3492 break 2
3493 fi
3494done
3495 done
3496IFS=$as_save_IFS
5929fbe7
GM
3497
3498fi
eb697db5
DN
3499fi
3500CC=$ac_cv_prog_CC
3501if test -n "$CC"; then
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3503$as_echo "$CC" >&6; }
3504else
3505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3506$as_echo "no" >&6; }
5929fbe7 3507fi
7186fb09 3508
08b47d3d 3509
eb697db5
DN
3510fi
3511if test -z "$ac_cv_prog_CC"; then
3512 ac_ct_CC=$CC
3513 # Extract the first word of "gcc", so it can be a program name with args.
3514set dummy gcc; ac_word=$2
3515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3516$as_echo_n "checking for $ac_word... " >&6; }
3517if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5929fbe7 3518 $as_echo_n "(cached) " >&6
8c5ff6dd 3519else
eb697db5
DN
3520 if test -n "$ac_ct_CC"; then
3521 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3522else
eb697db5
DN
3523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3524for as_dir in $PATH
3525do
3526 IFS=$as_save_IFS
3527 test -z "$as_dir" && as_dir=.
3528 for ac_exec_ext in '' $ac_executable_extensions; do
3529 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3530 ac_cv_prog_ac_ct_CC="gcc"
3531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3532 break 2
3533 fi
3534done
3535 done
3536IFS=$as_save_IFS
5929fbe7 3537
8c5ff6dd 3538fi
8c5ff6dd 3539fi
eb697db5
DN
3540ac_ct_CC=$ac_cv_prog_ac_ct_CC
3541if test -n "$ac_ct_CC"; then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3543$as_echo "$ac_ct_CC" >&6; }
3544else
3545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3546$as_echo "no" >&6; }
8c5ff6dd 3547fi
5929fbe7 3548
eb697db5
DN
3549 if test "x$ac_ct_CC" = x; then
3550 CC=""
3551 else
3552 case $cross_compiling:$ac_tool_warned in
3553yes:)
3554{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3555$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3556ac_tool_warned=yes ;;
3557esac
3558 CC=$ac_ct_CC
8c5ff6dd 3559 fi
eb697db5
DN
3560else
3561 CC="$ac_cv_prog_CC"
8c5ff6dd 3562fi
e6df49e4 3563
eb697db5
DN
3564if test -z "$CC"; then
3565 if test -n "$ac_tool_prefix"; then
3566 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3567set dummy ${ac_tool_prefix}cc; ac_word=$2
3568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3569$as_echo_n "checking for $ac_word... " >&6; }
eb697db5
DN
3570if test "${ac_cv_prog_CC+set}" = set; then :
3571 $as_echo_n "(cached) " >&6
3572else
3573 if test -n "$CC"; then
3574 ac_cv_prog_CC="$CC" # Let the user override the test.
3575else
3576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3577for as_dir in $PATH
a4f64981 3578do
5929fbe7
GM
3579 IFS=$as_save_IFS
3580 test -z "$as_dir" && as_dir=.
eb697db5 3581 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3582 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3583 ac_cv_prog_CC="${ac_tool_prefix}cc"
3584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3585 break 2
3586 fi
a4f64981 3587done
eb697db5 3588 done
5929fbe7 3589IFS=$as_save_IFS
9452ded1 3590
5929fbe7 3591fi
eb697db5
DN
3592fi
3593CC=$ac_cv_prog_CC
3594if test -n "$CC"; then
3595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3596$as_echo "$CC" >&6; }
5929fbe7 3597else
eb697db5 3598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3599$as_echo "no" >&6; }
8c5ff6dd 3600fi
cd03c74a 3601
9452ded1 3602
5929fbe7 3603 fi
eb697db5
DN
3604fi
3605if test -z "$CC"; then
3606 # Extract the first word of "cc", so it can be a program name with args.
3607set dummy cc; ac_word=$2
3608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3609$as_echo_n "checking for $ac_word... " >&6; }
3610if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3611 $as_echo_n "(cached) " >&6
3612else
eb697db5
DN
3613 if test -n "$CC"; then
3614 ac_cv_prog_CC="$CC" # Let the user override the test.
8c5ff6dd 3615else
eb697db5
DN
3616 ac_prog_rejected=no
3617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618for as_dir in $PATH
3619do
3620 IFS=$as_save_IFS
3621 test -z "$as_dir" && as_dir=.
3622 for ac_exec_ext in '' $ac_executable_extensions; do
3623 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3624 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3625 ac_prog_rejected=yes
3626 continue
3627 fi
3628 ac_cv_prog_CC="cc"
3629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3630 break 2
3631 fi
3632done
3633 done
3634IFS=$as_save_IFS
e6df49e4 3635
eb697db5
DN
3636if test $ac_prog_rejected = yes; then
3637 # We found a bogon in the path, so make sure we never use it.
3638 set dummy $ac_cv_prog_CC
3639 shift
3640 if test $# != 0; then
3641 # We chose a different compiler from the bogus one.
3642 # However, it has the same basename, so the bogon will be chosen
3643 # first if we set CC to just the basename; use the full file name.
3644 shift
3645 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3646 fi
8c5ff6dd 3647fi
8c5ff6dd 3648fi
8c5ff6dd 3649fi
eb697db5
DN
3650CC=$ac_cv_prog_CC
3651if test -n "$CC"; then
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3653$as_echo "$CC" >&6; }
3654else
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3656$as_echo "no" >&6; }
8c5ff6dd 3657fi
cd03c74a 3658
8c5ff6dd 3659
eb697db5
DN
3660fi
3661if test -z "$CC"; then
3662 if test -n "$ac_tool_prefix"; then
3663 for ac_prog in cl.exe
3664 do
3665 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3666set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3668$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3669if test "${ac_cv_prog_CC+set}" = set; then :
a5edbe4a 3670 $as_echo_n "(cached) " >&6
a5edbe4a 3671else
eb697db5
DN
3672 if test -n "$CC"; then
3673 ac_cv_prog_CC="$CC" # Let the user override the test.
3674else
3675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3676for as_dir in $PATH
8c5ff6dd 3677do
5929fbe7
GM
3678 IFS=$as_save_IFS
3679 test -z "$as_dir" && as_dir=.
eb697db5 3680 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3681 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3682 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3683 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3684 break 2
3685 fi
3686done
eb697db5 3687 done
5929fbe7 3688IFS=$as_save_IFS
8c5ff6dd 3689
8c5ff6dd 3690fi
eb697db5
DN
3691fi
3692CC=$ac_cv_prog_CC
3693if test -n "$CC"; then
3694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3695$as_echo "$CC" >&6; }
8c5ff6dd 3696else
eb697db5 3697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3698$as_echo "no" >&6; }
8c5ff6dd 3699fi
a4f64981 3700
a4f64981 3701
eb697db5
DN
3702 test -n "$CC" && break
3703 done
3704fi
3705if test -z "$CC"; then
3706 ac_ct_CC=$CC
3707 for ac_prog in cl.exe
3708do
3709 # Extract the first word of "$ac_prog", so it can be a program name with args.
3710set dummy $ac_prog; ac_word=$2
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
3713if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5929fbe7 3714 $as_echo_n "(cached) " >&6
a4f64981 3715else
eb697db5
DN
3716 if test -n "$ac_ct_CC"; then
3717 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3718else
eb697db5
DN
3719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
3724 for ac_exec_ext in '' $ac_executable_extensions; do
3725 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3726 ac_cv_prog_ac_ct_CC="$ac_prog"
3727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3728 break 2
3729 fi
3730done
3731 done
3732IFS=$as_save_IFS
a4f64981 3733
5929fbe7 3734fi
5929fbe7 3735fi
eb697db5
DN
3736ac_ct_CC=$ac_cv_prog_ac_ct_CC
3737if test -n "$ac_ct_CC"; then
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3739$as_echo "$ac_ct_CC" >&6; }
8c5ff6dd 3740else
eb697db5
DN
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742$as_echo "no" >&6; }
8c5ff6dd 3743fi
a4f64981 3744
5929fbe7 3745
eb697db5
DN
3746 test -n "$ac_ct_CC" && break
3747done
5929fbe7 3748
eb697db5
DN
3749 if test "x$ac_ct_CC" = x; then
3750 CC=""
3751 else
3752 case $cross_compiling:$ac_tool_warned in
3753yes:)
3754{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3755$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3756ac_tool_warned=yes ;;
3757esac
3758 CC=$ac_ct_CC
3759 fi
8c5ff6dd 3760fi
a4f64981 3761
eb697db5 3762fi
8c5ff6dd 3763
5929fbe7 3764
eb697db5
DN
3765test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9164c0e4
AS
3767as_fn_error $? "no acceptable C compiler found in \$PATH
3768See \`config.log' for more details" "$LINENO" 5; }
5929fbe7 3769
eb697db5
DN
3770# Provide some information about the compiler.
3771$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3772set X $ac_compile
3773ac_compiler=$2
3774for ac_option in --version -v -V -qversion; do
3775 { { ac_try="$ac_compiler $ac_option >&5"
5929fbe7
GM
3776case "(($ac_try" in
3777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3778 *) ac_try_echo=$ac_try;;
3779esac
eb697db5
DN
3780eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3781$as_echo "$ac_try_echo"; } >&5
3782 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5929fbe7 3783 ac_status=$?
eb697db5
DN
3784 if test -s conftest.err; then
3785 sed '10a\
3786... rest of stderr output deleted ...
3787 10q' conftest.err >conftest.er1
3788 cat conftest.er1 >&5
5929fbe7 3789 fi
eb697db5
DN
3790 rm -f conftest.er1 conftest.err
3791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3792 test $ac_status = 0; }
3793done
a4f64981 3794
eb697db5 3795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 3796/* end confdefs.h. */
8c5ff6dd 3797
5929fbe7
GM
3798int
3799main ()
3800{
3801
3802 ;
3803 return 0;
3804}
3805_ACEOF
eb697db5
DN
3806ac_clean_files_save=$ac_clean_files
3807ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3808# Try to create an executable without -o first, disregard a.out.
3809# It will help us diagnose broken compilers, and finding out an intuition
3810# of exeext.
3811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3812$as_echo_n "checking whether the C compiler works... " >&6; }
3813ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3814
3815# The possible output files:
3816ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3817
3818ac_rmfiles=
3819for ac_file in $ac_files
3820do
3821 case $ac_file in
3822 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3823 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3824 esac
3825done
3826rm -f $ac_rmfiles
3827
3828if { { ac_try="$ac_link_default"
5929fbe7
GM
3829case "(($ac_try" in
3830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3831 *) ac_try_echo=$ac_try;;
3832esac
eb697db5
DN
3833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3834$as_echo "$ac_try_echo"; } >&5
3835 (eval "$ac_link_default") 2>&5
5929fbe7 3836 ac_status=$?
eb697db5
DN
3837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3838 test $ac_status = 0; }; then :
3839 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3840# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3841# in a Makefile. We should not override ac_cv_exeext if it was cached,
3842# so that the user can short-circuit this test for compilers unknown to
3843# Autoconf.
3844for ac_file in $ac_files ''
3845do
3846 test -f "$ac_file" || continue
3847 case $ac_file in
3848 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3849 ;;
3850 [ab].out )
3851 # We found the default executable, but exeext='' is most
3852 # certainly right.
3853 break;;
3854 *.* )
3855 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3856 then :; else
3857 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3858 fi
3859 # We set ac_cv_exeext here because the later test for it is not
3860 # safe: cross compilers may not add the suffix if given an `-o'
3861 # argument, so we may need to know it at that point already.
3862 # Even if this section looks crufty: it has the advantage of
3863 # actually working.
3864 break;;
3865 * )
3866 break;;
3867 esac
3868done
3869test "$ac_cv_exeext" = no && ac_cv_exeext=
5929fbe7 3870
eb697db5
DN
3871else
3872 ac_file=''
49ebbd65 3873fi
eb697db5
DN
3874if test -z "$ac_file"; then :
3875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3876$as_echo "no" >&6; }
3877$as_echo "$as_me: failed program was:" >&5
3878sed 's/^/| /' conftest.$ac_ext >&5
49ebbd65 3879
eb697db5
DN
3880{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9164c0e4
AS
3882as_fn_error 77 "C compiler cannot create executables
3883See \`config.log' for more details" "$LINENO" 5; }
eb697db5
DN
3884else
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3886$as_echo "yes" >&6; }
8c5ff6dd 3887fi
eb697db5
DN
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3889$as_echo_n "checking for C compiler default output file name... " >&6; }
3890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3891$as_echo "$ac_file" >&6; }
3892ac_exeext=$ac_cv_exeext
e6df49e4 3893
eb697db5
DN
3894rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3895ac_clean_files=$ac_clean_files_save
3896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3897$as_echo_n "checking for suffix of executables... " >&6; }
3898if { { ac_try="$ac_link"
3899case "(($ac_try" in
3900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3901 *) ac_try_echo=$ac_try;;
3902esac
3903eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3904$as_echo "$ac_try_echo"; } >&5
3905 (eval "$ac_link") 2>&5
3906 ac_status=$?
3907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3908 test $ac_status = 0; }; then :
3909 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3910# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3911# work properly (i.e., refer to `conftest.exe'), while it won't with
3912# `rm'.
3913for ac_file in conftest.exe conftest conftest.*; do
3914 test -f "$ac_file" || continue
3915 case $ac_file in
3916 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3917 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3918 break;;
3919 * ) break;;
3920 esac
3921done
3922else
3923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9164c0e4
AS
3925as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3926See \`config.log' for more details" "$LINENO" 5; }
5929fbe7 3927fi
eb697db5
DN
3928rm -f conftest conftest$ac_cv_exeext
3929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3930$as_echo "$ac_cv_exeext" >&6; }
49ebbd65 3931
eb697db5
DN
3932rm -f conftest.$ac_ext
3933EXEEXT=$ac_cv_exeext
3934ac_exeext=$EXEEXT
3935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 3936/* end confdefs.h. */
eb697db5 3937#include <stdio.h>
5929fbe7
GM
3938int
3939main ()
3940{
eb697db5
DN
3941FILE *f = fopen ("conftest.out", "w");
3942 return ferror (f) || fclose (f) != 0;
49ebbd65 3943
5929fbe7
GM
3944 ;
3945 return 0;
3946}
3947_ACEOF
eb697db5
DN
3948ac_clean_files="$ac_clean_files conftest.out"
3949# Check that the compiler produces executables we can run. If not, either
3950# the compiler is broken, or we cross compile.
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3952$as_echo_n "checking whether we are cross compiling... " >&6; }
3953if test "$cross_compiling" != yes; then
3954 { { ac_try="$ac_link"
5929fbe7
GM
3955case "(($ac_try" in
3956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3957 *) ac_try_echo=$ac_try;;
3958esac
eb697db5
DN
3959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3960$as_echo "$ac_try_echo"; } >&5
3961 (eval "$ac_link") 2>&5
5929fbe7 3962 ac_status=$?
eb697db5
DN
3963 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3964 test $ac_status = 0; }
3965 if { ac_try='./conftest$ac_cv_exeext'
3966 { { case "(($ac_try" in
3967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3968 *) ac_try_echo=$ac_try;;
3969esac
3970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3971$as_echo "$ac_try_echo"; } >&5
3972 (eval "$ac_try") 2>&5
3973 ac_status=$?
3974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3975 test $ac_status = 0; }; }; then
3976 cross_compiling=no
5929fbe7 3977 else
eb697db5
DN
3978 if test "$cross_compiling" = maybe; then
3979 cross_compiling=yes
3980 else
3981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9164c0e4 3983as_fn_error $? "cannot run C compiled programs.
eb697db5 3984If you meant to cross compile, use \`--host'.
9164c0e4 3985See \`config.log' for more details" "$LINENO" 5; }
eb697db5 3986 fi
5929fbe7 3987 fi
eb697db5
DN
3988fi
3989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3990$as_echo "$cross_compiling" >&6; }
5929fbe7 3991
eb697db5
DN
3992rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3993ac_clean_files=$ac_clean_files_save
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3995$as_echo_n "checking for suffix of object files... " >&6; }
3996if test "${ac_cv_objext+set}" = set; then :
a4f64981 3997 $as_echo_n "(cached) " >&6
a4f64981 3998else
eb697db5 3999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 4000/* end confdefs.h. */
8c5ff6dd
KR
4001
4002int
4003main ()
4004{
eb697db5 4005
8c5ff6dd
KR
4006 ;
4007 return 0;
4008}
a4f64981 4009_ACEOF
eb697db5
DN
4010rm -f conftest.o conftest.obj
4011if { { ac_try="$ac_compile"
5929fbe7
GM
4012case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
eb697db5
DN
4016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4017$as_echo "$ac_try_echo"; } >&5
4018 (eval "$ac_compile") 2>&5
5929fbe7 4019 ac_status=$?
eb697db5
DN
4020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4021 test $ac_status = 0; }; then :
4022 for ac_file in conftest.o conftest.obj conftest.*; do
4023 test -f "$ac_file" || continue;
4024 case $ac_file in
4025 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4026 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4027 break;;
4028 esac
4029done
a4f64981 4030else
5929fbe7
GM
4031 $as_echo "$as_me: failed program was:" >&5
4032sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 4033
eb697db5
DN
4034{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9164c0e4
AS
4036as_fn_error $? "cannot compute suffix of object files: cannot compile
4037See \`config.log' for more details" "$LINENO" 5; }
5929fbe7 4038fi
eb697db5 4039rm -f conftest.$ac_cv_objext conftest.$ac_ext
5929fbe7 4040fi
eb697db5
DN
4041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4042$as_echo "$ac_cv_objext" >&6; }
4043OBJEXT=$ac_cv_objext
4044ac_objext=$OBJEXT
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4046$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4047if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4048 $as_echo_n "(cached) " >&6
4049else
4050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4051/* end confdefs.h. */
8c5ff6dd 4052
eb697db5
DN
4053int
4054main ()
4055{
4056#ifndef __GNUC__
4057 choke me
4058#endif
5929fbe7 4059
eb697db5
DN
4060 ;
4061 return 0;
4062}
4063_ACEOF
4064if ac_fn_c_try_compile "$LINENO"; then :
4065 ac_compiler_gnu=yes
4066else
4067 ac_compiler_gnu=no
8c5ff6dd 4068fi
eb697db5
DN
4069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4070ac_cv_c_compiler_gnu=$ac_compiler_gnu
a4f64981 4071
a4f64981 4072fi
eb697db5
DN
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4074$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4075if test $ac_compiler_gnu = yes; then
4076 GCC=yes
4077else
4078 GCC=
4079fi
4080ac_test_CFLAGS=${CFLAGS+set}
4081ac_save_CFLAGS=$CFLAGS
4082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4083$as_echo_n "checking whether $CC accepts -g... " >&6; }
4084if test "${ac_cv_prog_cc_g+set}" = set; then :
5929fbe7 4085 $as_echo_n "(cached) " >&6
08b47d3d 4086else
eb697db5
DN
4087 ac_save_c_werror_flag=$ac_c_werror_flag
4088 ac_c_werror_flag=yes
4089 ac_cv_prog_cc_g=no
4090 CFLAGS="-g"
4091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0c309b80 4092/* end confdefs.h. */
8c5ff6dd 4093
9452ded1
DN
4094int
4095main ()
4096{
eb697db5 4097
5929fbe7 4098 ;
9452ded1
DN
4099 return 0;
4100}
0c309b80 4101_ACEOF
eb697db5
DN
4102if ac_fn_c_try_compile "$LINENO"; then :
4103 ac_cv_prog_cc_g=yes
8c5ff6dd 4104else
eb697db5
DN
4105 CFLAGS=""
4106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4107/* end confdefs.h. */
a4f64981 4108
eb697db5
DN
4109int
4110main ()
4111{
cd03c74a 4112
eb697db5
DN
4113 ;
4114 return 0;
4115}
a4f64981 4116_ACEOF
eb697db5 4117if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 4118
eb697db5
DN
4119else
4120 ac_c_werror_flag=$ac_save_c_werror_flag
4121 CFLAGS="-g"
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4123/* end confdefs.h. */
a5edbe4a 4124
eb697db5
DN
4125int
4126main ()
4127{
e6df49e4 4128
eb697db5
DN
4129 ;
4130 return 0;
4131}
4132_ACEOF
4133if ac_fn_c_try_compile "$LINENO"; then :
4134 ac_cv_prog_cc_g=yes
4135fi
4136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4137fi
4138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4139fi
4140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4141 ac_c_werror_flag=$ac_save_c_werror_flag
4142fi
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4144$as_echo "$ac_cv_prog_cc_g" >&6; }
4145if test "$ac_test_CFLAGS" = set; then
4146 CFLAGS=$ac_save_CFLAGS
4147elif test $ac_cv_prog_cc_g = yes; then
4148 if test "$GCC" = yes; then
4149 CFLAGS="-g -O2"
4150 else
4151 CFLAGS="-g"
4152 fi
4153else
4154 if test "$GCC" = yes; then
4155 CFLAGS="-O2"
4156 else
4157 CFLAGS=
5929fbe7
GM
4158 fi
4159fi
eb697db5
DN
4160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4161$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4162if test "${ac_cv_prog_cc_c89+set}" = set; then :
5929fbe7
GM
4163 $as_echo_n "(cached) " >&6
4164else
eb697db5
DN
4165 ac_cv_prog_cc_c89=no
4166ac_save_CC=$CC
4167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4168/* end confdefs.h. */
eb697db5
DN
4169#include <stdarg.h>
4170#include <stdio.h>
4171#include <sys/types.h>
4172#include <sys/stat.h>
4173/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4174struct buf { int x; };
4175FILE * (*rcsopen) (struct buf *, struct stat *, int);
4176static char *e (p, i)
4177 char **p;
4178 int i;
5929fbe7 4179{
eb697db5
DN
4180 return p[i];
4181}
4182static char *f (char * (*g) (char **, int), char **p, ...)
4183{
4184 char *s;
4185 va_list v;
4186 va_start (v,p);
4187 s = g (p, va_arg (v,int));
4188 va_end (v);
4189 return s;
5929fbe7 4190}
e6df49e4 4191
eb697db5
DN
4192/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4193 function prototypes and stuff, but not '\xHH' hex character constants.
4194 These don't provoke an error unfortunately, instead are silently treated
4195 as 'x'. The following induces an error, until -std is added to get
4196 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4197 array size at least. It's necessary to write '\x00'==0 to get something
4198 that's true only with -std. */
4199int osf4_cc_array ['\x00' == 0 ? 1 : -1];
e6df49e4 4200
eb697db5
DN
4201/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4202 inside strings and character constants. */
4203#define FOO(x) 'x'
4204int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
49ebbd65 4205
eb697db5
DN
4206int test (int i, double x);
4207struct s1 {int (*f) (int a);};
4208struct s2 {int (*f) (double a);};
4209int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4210int argc;
4211char **argv;
5929fbe7
GM
4212int
4213main ()
4214{
eb697db5 4215return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5929fbe7
GM
4216 ;
4217 return 0;
4218}
4219_ACEOF
eb697db5
DN
4220for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4221 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4222do
4223 CC="$ac_save_CC $ac_arg"
4224 if ac_fn_c_try_compile "$LINENO"; then :
4225 ac_cv_prog_cc_c89=$ac_arg
4226fi
4227rm -f core conftest.err conftest.$ac_objext
4228 test "x$ac_cv_prog_cc_c89" != "xno" && break
4229done
4230rm -f conftest.$ac_ext
4231CC=$ac_save_CC
49ebbd65 4232
5929fbe7 4233fi
eb697db5
DN
4234# AC_CACHE_VAL
4235case "x$ac_cv_prog_cc_c89" in
4236 x)
4237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4238$as_echo "none needed" >&6; } ;;
4239 xno)
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4241$as_echo "unsupported" >&6; } ;;
4242 *)
4243 CC="$CC $ac_cv_prog_cc_c89"
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4245$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4246esac
4247if test "x$ac_cv_prog_cc_c89" != xno; then :
e6df49e4 4248
5929fbe7 4249fi
eb697db5
DN
4250
4251ac_ext=c
4252ac_cpp='$CPP $CPPFLAGS'
4253ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4254ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4255ac_compiler_gnu=$ac_cv_c_compiler_gnu
4256
4257
4258# On Suns, sometimes $CPP names a directory.
4259if test -n "$CPP" && test -d "$CPP"; then
4260 CPP=
5929fbe7 4261fi
a4f64981 4262
eb697db5
DN
4263## If not using gcc, and on Solaris, and no CPP specified, see if
4264## using a Sun compiler, which needs -Xs to prevent whitespace.
4265if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4266 test x"$CPP" = x; then
4267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
4268$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
4269
4270if test "${emacs_cv_sunpro_c+set}" = set; then :
a4f64981
GM
4271 $as_echo_n "(cached) " >&6
4272else
eb697db5 4273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd03c74a 4274/* end confdefs.h. */
eb697db5 4275
15e12598
VB
4276int
4277main ()
4278{
eb697db5
DN
4279#ifndef __SUNPRO_C
4280fail;
4281#endif
4282
15e12598
VB
4283 ;
4284 return 0;
4285}
0c309b80 4286_ACEOF
eb697db5
DN
4287if ac_fn_c_try_link "$LINENO"; then :
4288 emacs_cv_sunpro_c=yes
aaa36002 4289else
eb697db5 4290 emacs_cv_sunpro_c=no
a4f64981 4291fi
eb697db5
DN
4292rm -f core conftest.err conftest.$ac_objext \
4293 conftest$ac_exeext conftest.$ac_ext
5929fbe7 4294fi
a4f64981 4295
eb697db5
DN
4296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
4297$as_echo "$emacs_cv_sunpro_c" >&6; }
a4f64981 4298
eb697db5
DN
4299 if test x"$emacs_cv_sunpro_c" = xyes; then
4300 NON_GNU_CPP="$CC -E -Xs"
4301 fi
4302fi
a4f64981 4303
eb697db5
DN
4304#### Some systems specify a CPP to use unless we are using GCC.
4305#### Now that we know whether we are using GCC, we can decide whether
4306#### to use that one.
4307if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4308then
4309 CPP="$NON_GNU_CPP"
4310fi
a4f64981 4311
eb697db5
DN
4312#### Some systems specify a CC to use unless we are using GCC.
4313#### Now that we know whether we are using GCC, we can decide whether
4314#### to use that one.
4315if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4316 test x$cc_specified != xyes
4317then
4318 CC="$NON_GNU_CC"
4319fi
a4f64981 4320
9164c0e4
AS
4321if test x$GCC = xyes; then
4322 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
4323else
4324 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
4325fi
4326
eb697db5
DN
4327ac_ext=c
4328ac_cpp='$CPP $CPPFLAGS'
4329ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4330ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4331ac_compiler_gnu=$ac_cv_c_compiler_gnu
4332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4333$as_echo_n "checking how to run the C preprocessor... " >&6; }
4334# On Suns, sometimes $CPP names a directory.
4335if test -n "$CPP" && test -d "$CPP"; then
4336 CPP=
4337fi
4338if test -z "$CPP"; then
4339 if test "${ac_cv_prog_CPP+set}" = set; then :
4340 $as_echo_n "(cached) " >&6
4341else
4342 # Double quotes because CPP needs to be expanded
4343 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4344 do
4345 ac_preproc_ok=false
4346for ac_c_preproc_warn_flag in '' yes
4347do
4348 # Use a header file that comes with gcc, so configuring glibc
4349 # with a fresh cross-compiler works.
4350 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4351 # <limits.h> exists even on freestanding compilers.
4352 # On the NeXT, cc -E runs the code through the compiler's parser,
4353 # not just through cpp. "Syntax error" is here to catch this case.
4354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 4355/* end confdefs.h. */
eb697db5
DN
4356#ifdef __STDC__
4357# include <limits.h>
4358#else
4359# include <assert.h>
4360#endif
4361 Syntax error
49ebbd65 4362_ACEOF
eb697db5
DN
4363if ac_fn_c_try_cpp "$LINENO"; then :
4364
4365else
4366 # Broken: fails on valid input.
4367continue
4368fi
4369rm -f conftest.err conftest.$ac_ext
5929fbe7 4370
eb697db5
DN
4371 # OK, works on sane cases. Now check whether nonexistent headers
4372 # can be detected and how.
4373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4374/* end confdefs.h. */
4375#include <ac_nonexistent.h>
5929fbe7 4376_ACEOF
eb697db5
DN
4377if ac_fn_c_try_cpp "$LINENO"; then :
4378 # Broken: success on invalid input.
4379continue
8c5ff6dd 4380else
eb697db5
DN
4381 # Passes both tests.
4382ac_preproc_ok=:
4383break
8c5ff6dd 4384fi
eb697db5 4385rm -f conftest.err conftest.$ac_ext
5929fbe7 4386
eb697db5
DN
4387done
4388# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4389rm -f conftest.err conftest.$ac_ext
4390if $ac_preproc_ok; then :
4391 break
4392fi
5929fbe7 4393
eb697db5
DN
4394 done
4395 ac_cv_prog_CPP=$CPP
5929fbe7 4396
eb697db5
DN
4397fi
4398 CPP=$ac_cv_prog_CPP
4399else
4400 ac_cv_prog_CPP=$CPP
4401fi
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4403$as_echo "$CPP" >&6; }
4404ac_preproc_ok=false
4405for ac_c_preproc_warn_flag in '' yes
4406do
4407 # Use a header file that comes with gcc, so configuring glibc
4408 # with a fresh cross-compiler works.
4409 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4410 # <limits.h> exists even on freestanding compilers.
4411 # On the NeXT, cc -E runs the code through the compiler's parser,
4412 # not just through cpp. "Syntax error" is here to catch this case.
4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4414/* end confdefs.h. */
4415#ifdef __STDC__
4416# include <limits.h>
4417#else
4418# include <assert.h>
4419#endif
4420 Syntax error
5929fbe7 4421_ACEOF
eb697db5 4422if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4423
eb697db5
DN
4424else
4425 # Broken: fails on valid input.
4426continue
8c5ff6dd 4427fi
eb697db5 4428rm -f conftest.err conftest.$ac_ext
8c5ff6dd 4429
eb697db5
DN
4430 # OK, works on sane cases. Now check whether nonexistent headers
4431 # can be detected and how.
4432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 4433/* end confdefs.h. */
eb697db5 4434#include <ac_nonexistent.h>
8c5ff6dd 4435_ACEOF
eb697db5
DN
4436if ac_fn_c_try_cpp "$LINENO"; then :
4437 # Broken: success on invalid input.
4438continue
a5edbe4a 4439else
eb697db5
DN
4440 # Passes both tests.
4441ac_preproc_ok=:
4442break
4443fi
4444rm -f conftest.err conftest.$ac_ext
e6df49e4 4445
eb697db5
DN
4446done
4447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4448rm -f conftest.err conftest.$ac_ext
4449if $ac_preproc_ok; then :
cd03c74a 4450
eb697db5
DN
4451else
4452 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9164c0e4
AS
4454as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4455See \`config.log' for more details" "$LINENO" 5; }
a4f64981 4456fi
e6df49e4 4457
eb697db5
DN
4458ac_ext=c
4459ac_cpp='$CPP $CPPFLAGS'
4460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4462ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 4463
a5edbe4a 4464
eb697db5
DN
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4466$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4467if test "${ac_cv_path_GREP+set}" = set; then :
4468 $as_echo_n "(cached) " >&6
4469else
4470 if test -z "$GREP"; then
4471 ac_path_GREP_found=false
4472 # Loop through the user's path and test for each of PROGNAME-LIST
4473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4474for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
4478 for ac_prog in grep ggrep; do
4479 for ac_exec_ext in '' $ac_executable_extensions; do
4480 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4481 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4482# Check for GNU ac_path_GREP and select it if it is found.
4483 # Check for GNU $ac_path_GREP
4484case `"$ac_path_GREP" --version 2>&1` in
4485*GNU*)
4486 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4487*)
4488 ac_count=0
4489 $as_echo_n 0123456789 >"conftest.in"
4490 while :
4491 do
4492 cat "conftest.in" "conftest.in" >"conftest.tmp"
4493 mv "conftest.tmp" "conftest.in"
4494 cp "conftest.in" "conftest.nl"
4495 $as_echo 'GREP' >> "conftest.nl"
4496 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4498 as_fn_arith $ac_count + 1 && ac_count=$as_val
4499 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4500 # Best one so far, save it but keep looking for a better one
4501 ac_cv_path_GREP="$ac_path_GREP"
4502 ac_path_GREP_max=$ac_count
4503 fi
4504 # 10*(2^10) chars as input seems more than enough
4505 test $ac_count -gt 10 && break
4506 done
4507 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508esac
a5edbe4a 4509
eb697db5
DN
4510 $ac_path_GREP_found && break 3
4511 done
4512 done
4513 done
4514IFS=$as_save_IFS
4515 if test -z "$ac_cv_path_GREP"; then
9164c0e4 4516 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5929fbe7 4517 fi
eb697db5
DN
4518else
4519 ac_cv_path_GREP=$GREP
cd03c74a 4520fi
0c309b80 4521
eb697db5
DN
4522fi
4523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4524$as_echo "$ac_cv_path_GREP" >&6; }
4525 GREP="$ac_cv_path_GREP"
15e12598 4526
8c5ff6dd 4527
eb697db5
DN
4528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4529$as_echo_n "checking for egrep... " >&6; }
4530if test "${ac_cv_path_EGREP+set}" = set; then :
8c5ff6dd 4531 $as_echo_n "(cached) " >&6
aaa36002 4532else
eb697db5
DN
4533 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4534 then ac_cv_path_EGREP="$GREP -E"
4535 else
4536 if test -z "$EGREP"; then
4537 ac_path_EGREP_found=false
4538 # Loop through the user's path and test for each of PROGNAME-LIST
8c5ff6dd 4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 4540for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8c5ff6dd
KR
4541do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
eb697db5
DN
4544 for ac_prog in egrep; do
4545 for ac_exec_ext in '' $ac_executable_extensions; do
4546 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4547 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4548# Check for GNU ac_path_EGREP and select it if it is found.
4549 # Check for GNU $ac_path_EGREP
4550case `"$ac_path_EGREP" --version 2>&1` in
4551*GNU*)
4552 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4553*)
4554 ac_count=0
4555 $as_echo_n 0123456789 >"conftest.in"
4556 while :
4557 do
4558 cat "conftest.in" "conftest.in" >"conftest.tmp"
4559 mv "conftest.tmp" "conftest.in"
4560 cp "conftest.in" "conftest.nl"
4561 $as_echo 'EGREP' >> "conftest.nl"
4562 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4563 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4564 as_fn_arith $ac_count + 1 && ac_count=$as_val
4565 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4566 # Best one so far, save it but keep looking for a better one
4567 ac_cv_path_EGREP="$ac_path_EGREP"
4568 ac_path_EGREP_max=$ac_count
4569 fi
4570 # 10*(2^10) chars as input seems more than enough
4571 test $ac_count -gt 10 && break
4572 done
4573 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4574esac
4575
4576 $ac_path_EGREP_found && break 3
4577 done
4578 done
4579 done
5929fbe7 4580IFS=$as_save_IFS
eb697db5 4581 if test -z "$ac_cv_path_EGREP"; then
9164c0e4 4582 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
eb697db5
DN
4583 fi
4584else
4585 ac_cv_path_EGREP=$EGREP
4586fi
5929fbe7 4587
eb697db5 4588 fi
5929fbe7 4589fi
eb697db5
DN
4590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4591$as_echo "$ac_cv_path_EGREP" >&6; }
4592 EGREP="$ac_cv_path_EGREP"
4593
4594
4595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4596$as_echo_n "checking for ANSI C header files... " >&6; }
4597if test "${ac_cv_header_stdc+set}" = set; then :
4598 $as_echo_n "(cached) " >&6
4599else
4600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4601/* end confdefs.h. */
4602#include <stdlib.h>
4603#include <stdarg.h>
4604#include <string.h>
4605#include <float.h>
4606
4607int
4608main ()
4609{
4610
4611 ;
4612 return 0;
4613}
4614_ACEOF
4615if ac_fn_c_try_compile "$LINENO"; then :
4616 ac_cv_header_stdc=yes
5929fbe7 4617else
eb697db5 4618 ac_cv_header_stdc=no
5929fbe7 4619fi
eb697db5 4620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 4621
eb697db5
DN
4622if test $ac_cv_header_stdc = yes; then
4623 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4625/* end confdefs.h. */
4626#include <string.h>
15e12598 4627
eb697db5
DN
4628_ACEOF
4629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4630 $EGREP "memchr" >/dev/null 2>&1; then :
a4f64981 4631
eb697db5
DN
4632else
4633 ac_cv_header_stdc=no
4634fi
4635rm -f conftest*
5929fbe7 4636
eb697db5 4637fi
5929fbe7 4638
eb697db5
DN
4639if test $ac_cv_header_stdc = yes; then
4640 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4642/* end confdefs.h. */
4643#include <stdlib.h>
5929fbe7 4644
eb697db5
DN
4645_ACEOF
4646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4647 $EGREP "free" >/dev/null 2>&1; then :
5929fbe7 4648
eb697db5
DN
4649else
4650 ac_cv_header_stdc=no
4651fi
4652rm -f conftest*
5929fbe7 4653
eb697db5 4654fi
5929fbe7 4655
eb697db5
DN
4656if test $ac_cv_header_stdc = yes; then
4657 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4658 if test "$cross_compiling" = yes; then :
4659 :
4660else
4661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4662/* end confdefs.h. */
4663#include <ctype.h>
4664#include <stdlib.h>
4665#if ((' ' & 0x0FF) == 0x020)
4666# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4667# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4668#else
4669# define ISLOWER(c) \
4670 (('a' <= (c) && (c) <= 'i') \
4671 || ('j' <= (c) && (c) <= 'r') \
4672 || ('s' <= (c) && (c) <= 'z'))
4673# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4674#endif
5929fbe7 4675
eb697db5
DN
4676#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4677int
4678main ()
4679{
4680 int i;
4681 for (i = 0; i < 256; i++)
4682 if (XOR (islower (i), ISLOWER (i))
4683 || toupper (i) != TOUPPER (i))
4684 return 2;
4685 return 0;
4686}
4687_ACEOF
4688if ac_fn_c_try_run "$LINENO"; then :
a4f64981 4689
eb697db5
DN
4690else
4691 ac_cv_header_stdc=no
4692fi
4693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4694 conftest.$ac_objext conftest.beam conftest.$ac_ext
4695fi
aaa36002 4696
eb697db5
DN
4697fi
4698fi
4699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4700$as_echo "$ac_cv_header_stdc" >&6; }
4701if test $ac_cv_header_stdc = yes; then
cd03c74a 4702
eb697db5 4703$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a5edbe4a 4704
eb697db5 4705fi
5929fbe7 4706
eb697db5
DN
4707# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4708for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4709 inttypes.h stdint.h unistd.h
4710do :
4711 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4712ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4713"
9164c0e4 4714if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb697db5
DN
4715 cat >>confdefs.h <<_ACEOF
4716#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4717_ACEOF
4718
4719fi
5929fbe7 4720
5929fbe7 4721done
a5edbe4a 4722
5929fbe7
GM
4723
4724
eb697db5
DN
4725 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4726if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4727 MINIX=yes
4728else
4729 MINIX=
4730fi
5929fbe7 4731
5929fbe7 4732
eb697db5 4733 if test "$MINIX" = yes; then
5929fbe7 4734
eb697db5 4735$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5929fbe7 4736
5929fbe7 4737
eb697db5 4738$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5929fbe7
GM
4739
4740
eb697db5 4741$as_echo "#define _MINIX 1" >>confdefs.h
5929fbe7 4742
5929fbe7
GM
4743 fi
4744
5929fbe7 4745
eb697db5
DN
4746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4747$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4748if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5929fbe7
GM
4749 $as_echo_n "(cached) " >&6
4750else
eb697db5 4751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7
GM
4752/* end confdefs.h. */
4753
eb697db5
DN
4754# define __EXTENSIONS__ 1
4755 $ac_includes_default
5929fbe7
GM
4756int
4757main ()
4758{
eb697db5 4759
5929fbe7
GM
4760 ;
4761 return 0;
4762}
4763_ACEOF
eb697db5
DN
4764if ac_fn_c_try_compile "$LINENO"; then :
4765 ac_cv_safe_to_define___extensions__=yes
5929fbe7 4766else
eb697db5 4767 ac_cv_safe_to_define___extensions__=no
e6df49e4 4768fi
eb697db5 4769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9452ded1 4770fi
eb697db5
DN
4771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4772$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4773 test $ac_cv_safe_to_define___extensions__ = yes &&
4774 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
8c5ff6dd 4775
eb697db5 4776 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
a4f64981 4777
eb697db5 4778 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
a4f64981 4779
eb697db5 4780 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5929fbe7 4781
eb697db5 4782 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
a4f64981
GM
4783
4784
a4f64981 4785
eb697db5
DN
4786### Use -Wno-pointer-sign if the compiler supports it
4787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
4788$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
4789SAVE_CFLAGS="$CFLAGS"
4790CFLAGS="$CFLAGS -Wno-pointer-sign"
4791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4792/* end confdefs.h. */
e6df49e4 4793
eb697db5
DN
4794int
4795main ()
4796{
4797
4798 ;
4799 return 0;
4800}
4801_ACEOF
4802if ac_fn_c_try_compile "$LINENO"; then :
4803 has_option=yes
5929fbe7 4804else
eb697db5 4805 has_option=no
cd03c74a 4806fi
eb697db5
DN
4807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4808if test $has_option = yes; then
4809 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
5929fbe7 4810fi
eb697db5
DN
4811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4812$as_echo "$has_option" >&6; }
4813CFLAGS="$SAVE_CFLAGS"
4814unset has_option
4815unset SAVE_CFLAGS
4816
4817### Use -Wdeclaration-after-statement if the compiler supports it
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
4819$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4820SAVE_CFLAGS="$CFLAGS"
4821CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4823/* end confdefs.h. */
aaa36002 4824
5929fbe7
GM
4825int
4826main ()
4827{
eb697db5 4828
5929fbe7
GM
4829 ;
4830 return 0;
4831}
4832_ACEOF
eb697db5
DN
4833if ac_fn_c_try_compile "$LINENO"; then :
4834 has_option=yes
7186fb09 4835else
eb697db5
DN
4836 has_option=no
4837fi
4838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4839if test $has_option = yes; then
4840 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
4841fi
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4843$as_echo "$has_option" >&6; }
4844CFLAGS="$SAVE_CFLAGS"
4845unset has_option
4846unset SAVE_CFLAGS
4847
45871610
DN
4848### Use -Wold-style-definition if the compiler supports it
4849# This can be removed when conversion to standard C is finished.
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5
4851$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; }
4852SAVE_CFLAGS="$CFLAGS"
4853CFLAGS="$CFLAGS -Wold-style-definition"
4854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4855/* end confdefs.h. */
4856
4857int
4858main ()
4859{
4860
4861 ;
4862 return 0;
4863}
4864_ACEOF
4865if ac_fn_c_try_compile "$LINENO"; then :
4866 has_option=yes
4867else
4868 has_option=no
4869fi
4870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871if test $has_option = yes; then
4872 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
4873fi
4874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4875$as_echo "$has_option" >&6; }
4876CFLAGS="$SAVE_CFLAGS"
4877unset has_option
4878unset SAVE_CFLAGS
4879
4880
e6cfa7c3 4881
eb697db5 4882#### Some other nice autoconf tests.
e6df49e4 4883
eb697db5
DN
4884ac_ext=c
4885ac_cpp='$CPP $CPPFLAGS'
4886ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4887ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4888ac_compiler_gnu=$ac_cv_c_compiler_gnu
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4890$as_echo_n "checking how to run the C preprocessor... " >&6; }
4891# On Suns, sometimes $CPP names a directory.
4892if test -n "$CPP" && test -d "$CPP"; then
4893 CPP=
5929fbe7 4894fi
eb697db5
DN
4895if test -z "$CPP"; then
4896 if test "${ac_cv_prog_CPP+set}" = set; then :
4897 $as_echo_n "(cached) " >&6
4898else
4899 # Double quotes because CPP needs to be expanded
4900 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4901 do
4902 ac_preproc_ok=false
4903for ac_c_preproc_warn_flag in '' yes
4904do
4905 # Use a header file that comes with gcc, so configuring glibc
4906 # with a fresh cross-compiler works.
4907 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4908 # <limits.h> exists even on freestanding compilers.
4909 # On the NeXT, cc -E runs the code through the compiler's parser,
4910 # not just through cpp. "Syntax error" is here to catch this case.
4911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4912/* end confdefs.h. */
4913#ifdef __STDC__
4914# include <limits.h>
4915#else
4916# include <assert.h>
4917#endif
4918 Syntax error
4919_ACEOF
4920if ac_fn_c_try_cpp "$LINENO"; then :
15e12598 4921
eb697db5
DN
4922else
4923 # Broken: fails on valid input.
4924continue
8c5ff6dd 4925fi
eb697db5
DN
4926rm -f conftest.err conftest.$ac_ext
4927
4928 # OK, works on sane cases. Now check whether nonexistent headers
4929 # can be detected and how.
4930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4931/* end confdefs.h. */
4932#include <ac_nonexistent.h>
4933_ACEOF
4934if ac_fn_c_try_cpp "$LINENO"; then :
4935 # Broken: success on invalid input.
4936continue
4937else
4938 # Passes both tests.
4939ac_preproc_ok=:
4940break
a4f64981 4941fi
eb697db5 4942rm -f conftest.err conftest.$ac_ext
e6df49e4 4943
eb697db5
DN
4944done
4945# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4946rm -f conftest.err conftest.$ac_ext
4947if $ac_preproc_ok; then :
4948 break
5929fbe7 4949fi
8c5ff6dd 4950
eb697db5
DN
4951 done
4952 ac_cv_prog_CPP=$CPP
aaa36002 4953
eb697db5
DN
4954fi
4955 CPP=$ac_cv_prog_CPP
4956else
4957 ac_cv_prog_CPP=$CPP
4958fi
4959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4960$as_echo "$CPP" >&6; }
4961ac_preproc_ok=false
4962for ac_c_preproc_warn_flag in '' yes
4963do
4964 # Use a header file that comes with gcc, so configuring glibc
4965 # with a fresh cross-compiler works.
4966 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4967 # <limits.h> exists even on freestanding compilers.
4968 # On the NeXT, cc -E runs the code through the compiler's parser,
4969 # not just through cpp. "Syntax error" is here to catch this case.
4970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4971/* end confdefs.h. */
4972#ifdef __STDC__
4973# include <limits.h>
4974#else
4975# include <assert.h>
4976#endif
4977 Syntax error
4978_ACEOF
4979if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4980
eb697db5
DN
4981else
4982 # Broken: fails on valid input.
4983continue
4984fi
4985rm -f conftest.err conftest.$ac_ext
5929fbe7 4986
eb697db5
DN
4987 # OK, works on sane cases. Now check whether nonexistent headers
4988 # can be detected and how.
4989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4990/* end confdefs.h. */
4991#include <ac_nonexistent.h>
5929fbe7 4992_ACEOF
eb697db5
DN
4993if ac_fn_c_try_cpp "$LINENO"; then :
4994 # Broken: success on invalid input.
4995continue
4996else
4997 # Passes both tests.
4998ac_preproc_ok=:
4999break
5000fi
5001rm -f conftest.err conftest.$ac_ext
5929fbe7 5002
eb697db5
DN
5003done
5004# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5005rm -f conftest.err conftest.$ac_ext
5006if $ac_preproc_ok; then :
5929fbe7 5007
eb697db5
DN
5008else
5009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9164c0e4
AS
5011as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5012See \`config.log' for more details" "$LINENO" 5; }
eb697db5 5013fi
5929fbe7 5014
eb697db5
DN
5015ac_ext=c
5016ac_cpp='$CPP $CPPFLAGS'
5017ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5018ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5019ac_compiler_gnu=$ac_cv_c_compiler_gnu
5020
5021# Find a good install program. We prefer a C program (faster),
5022# so one script is as good as another. But avoid the broken or
5023# incompatible versions:
5024# SysV /etc/install, /usr/sbin/install
5025# SunOS /usr/etc/install
5026# IRIX /sbin/install
5027# AIX /bin/install
5028# AmigaOS /C/install, which installs bootblocks on floppy discs
5029# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5030# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5031# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5032# OS/2's system install, which has a completely different semantic
5033# ./install, which can be erroneously created by make from ./install.sh.
5034# Reject install programs that cannot install multiple files.
5035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5036$as_echo_n "checking for a BSD-compatible install... " >&6; }
5037if test -z "$INSTALL"; then
5038if test "${ac_cv_path_install+set}" = set; then :
5039 $as_echo_n "(cached) " >&6
5040else
5041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042for as_dir in $PATH
5043do
5044 IFS=$as_save_IFS
5045 test -z "$as_dir" && as_dir=.
5046 # Account for people who put trailing slashes in PATH elements.
5047case $as_dir/ in #((
5048 ./ | .// | /[cC]/* | \
5049 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5050 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5051 /usr/ucb/* ) ;;
5052 *)
5053 # OSF1 and SCO ODT 3.0 have their own names for install.
5054 # Don't use installbsd from OSF since it installs stuff as root
5055 # by default.
5056 for ac_prog in ginstall scoinst install; do
5057 for ac_exec_ext in '' $ac_executable_extensions; do
5058 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5059 if test $ac_prog = install &&
5060 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5061 # AIX install. It has an incompatible calling convention.
5062 :
5063 elif test $ac_prog = install &&
5064 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5065 # program-specific install script used by HP pwplus--don't use.
5066 :
5067 else
5068 rm -rf conftest.one conftest.two conftest.dir
5069 echo one > conftest.one
5070 echo two > conftest.two
5071 mkdir conftest.dir
5072 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5073 test -s conftest.one && test -s conftest.two &&
5074 test -s conftest.dir/conftest.one &&
5075 test -s conftest.dir/conftest.two
5076 then
5077 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5078 break 3
5079 fi
5080 fi
5081 fi
5082 done
5083 done
5084 ;;
5085esac
15e12598 5086
eb697db5
DN
5087 done
5088IFS=$as_save_IFS
8c5ff6dd 5089
eb697db5 5090rm -rf conftest.one conftest.two conftest.dir
8c5ff6dd 5091
eb697db5
DN
5092fi
5093 if test "${ac_cv_path_install+set}" = set; then
5094 INSTALL=$ac_cv_path_install
5095 else
5096 # As a last resort, use the slow shell script. Don't cache a
5097 # value for INSTALL within a source directory, because that will
5098 # break other packages using the cache if that directory is
5099 # removed, or if the value is a relative name.
5100 INSTALL=$ac_install_sh
5101 fi
5102fi
5103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5104$as_echo "$INSTALL" >&6; }
cd03c74a 5105
eb697db5
DN
5106# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5107# It thinks the first close brace ends the variable substitution.
5108test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
15e12598 5109
eb697db5 5110test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
15e12598 5111
eb697db5 5112test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
a4f64981 5113
eb697db5
DN
5114if test "x$RANLIB" = x; then
5115 if test -n "$ac_tool_prefix"; then
5116 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5117set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8c5ff6dd 5119$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5120if test "${ac_cv_prog_RANLIB+set}" = set; then :
7186fb09
GM
5121 $as_echo_n "(cached) " >&6
5122else
eb697db5
DN
5123 if test -n "$RANLIB"; then
5124 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5125else
5126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8c5ff6dd
KR
5127for as_dir in $PATH
5128do
5129 IFS=$as_save_IFS
5130 test -z "$as_dir" && as_dir=.
eb697db5 5131 for ac_exec_ext in '' $ac_executable_extensions; do
8c5ff6dd 5132 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5133 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8c5ff6dd
KR
5135 break 2
5136 fi
5137done
eb697db5 5138 done
8c5ff6dd 5139IFS=$as_save_IFS
a4f64981 5140
e6df49e4 5141fi
eb697db5
DN
5142fi
5143RANLIB=$ac_cv_prog_RANLIB
5144if test -n "$RANLIB"; then
5145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5146$as_echo "$RANLIB" >&6; }
a4f64981 5147else
eb697db5 5148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8c5ff6dd 5149$as_echo "no" >&6; }
a4f64981
GM
5150fi
5151
a4f64981 5152
eb697db5
DN
5153fi
5154if test -z "$ac_cv_prog_RANLIB"; then
5155 ac_ct_RANLIB=$RANLIB
5156 # Extract the first word of "ranlib", so it can be a program name with args.
5157set dummy ranlib; ac_word=$2
5158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5159$as_echo_n "checking for $ac_word... " >&6; }
5160if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5161 $as_echo_n "(cached) " >&6
5162else
5163 if test -n "$ac_ct_RANLIB"; then
5164 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5165else
5166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5167for as_dir in $PATH
5168do
5169 IFS=$as_save_IFS
5170 test -z "$as_dir" && as_dir=.
5171 for ac_exec_ext in '' $ac_executable_extensions; do
5172 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5173 ac_cv_prog_ac_ct_RANLIB="ranlib"
5174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5175 break 2
5176 fi
5177done
5178 done
5179IFS=$as_save_IFS
8c5ff6dd 5180
eb697db5
DN
5181fi
5182fi
5183ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5184if test -n "$ac_ct_RANLIB"; then
5185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5186$as_echo "$ac_ct_RANLIB" >&6; }
5187else
5188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5189$as_echo "no" >&6; }
eb697db5 5190fi
e6df49e4 5191
eb697db5
DN
5192 if test "x$ac_ct_RANLIB" = x; then
5193 RANLIB=":"
5194 else
5195 case $cross_compiling:$ac_tool_warned in
5196yes:)
5197{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5198$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5199ac_tool_warned=yes ;;
5200esac
5201 RANLIB=$ac_ct_RANLIB
5202 fi
5203else
5204 RANLIB="$ac_cv_prog_RANLIB"
5205fi
a5edbe4a 5206
eb697db5 5207fi
15e12598 5208
eb697db5
DN
5209## Although we're running on an amd64 kernel, we're actually compiling for
5210## the x86 architecture. The user should probably have provided an
5211## explicit --build to `configure', but if everything else than the kernel
5212## is running in i386 mode, we can help them out.
5213if test "$machine" = "amdx86-64"; then
5214 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
5215if test "x$ac_cv_have_decl_i386" = x""yes; then :
15e12598 5216
eb697db5 5217fi
cd03c74a 5218
eb697db5
DN
5219 if test "$ac_cv_have_decl_i386" = "yes"; then
5220 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
5221 machine=intel386
5222 machfile="m/${machine}.h"
5929fbe7 5223 fi
eb697db5 5224fi
49ebbd65 5225
eb697db5
DN
5226# Extract the first word of "install-info", so it can be a program name with args.
5227set dummy install-info; ac_word=$2
5228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5229$as_echo_n "checking for $ac_word... " >&6; }
5230if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5929fbe7
GM
5231 $as_echo_n "(cached) " >&6
5232else
eb697db5
DN
5233 case $INSTALL_INFO in
5234 [\\/]* | ?:[\\/]*)
5235 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5236 ;;
5237 *)
5238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239for as_dir in $PATH
5240do
5241 IFS=$as_save_IFS
5242 test -z "$as_dir" && as_dir=.
5243 for ac_exec_ext in '' $ac_executable_extensions; do
5244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5245 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5247 break 2
5248 fi
5249done
5250 done
5251IFS=$as_save_IFS
8c5ff6dd 5252
eb697db5 5253 ;;
a4f64981 5254esac
eb697db5
DN
5255fi
5256INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5257if test -n "$INSTALL_INFO"; then
5258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5259$as_echo "$INSTALL_INFO" >&6; }
5260else
5261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5262$as_echo "no" >&6; }
5929fbe7 5263fi
49ebbd65 5264
08b47d3d 5265
eb697db5
DN
5266# Extract the first word of "install-info", so it can be a program name with args.
5267set dummy install-info; ac_word=$2
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 5269$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5270if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5929fbe7
GM
5271 $as_echo_n "(cached) " >&6
5272else
eb697db5 5273 case $INSTALL_INFO in
5929fbe7 5274 [\\/]* | ?:[\\/]*)
eb697db5 5275 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5929fbe7
GM
5276 ;;
5277 *)
5278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 5279for as_dir in /usr/sbin
5929fbe7
GM
5280do
5281 IFS=$as_save_IFS
5282 test -z "$as_dir" && as_dir=.
eb697db5 5283 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 5284 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5285 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7 5287 break 2
8c5ff6dd 5288 fi
5929fbe7 5289done
eb697db5 5290 done
5929fbe7
GM
5291IFS=$as_save_IFS
5292
5929fbe7
GM
5293 ;;
5294esac
5295fi
eb697db5
DN
5296INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5297if test -n "$INSTALL_INFO"; then
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5299$as_echo "$INSTALL_INFO" >&6; }
5929fbe7 5300else
eb697db5 5301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5302$as_echo "no" >&6; }
8c5ff6dd 5303fi
08b47d3d 5304
08b47d3d 5305
eb697db5
DN
5306# Extract the first word of "install-info", so it can be a program name with args.
5307set dummy install-info; ac_word=$2
5308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5309$as_echo_n "checking for $ac_word... " >&6; }
5310if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5311 $as_echo_n "(cached) " >&6
5312else
5313 case $INSTALL_INFO in
5314 [\\/]* | ?:[\\/]*)
5315 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5316 ;;
5317 *)
5318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5319for as_dir in /sbin
5320do
5321 IFS=$as_save_IFS
5322 test -z "$as_dir" && as_dir=.
5323 for ac_exec_ext in '' $ac_executable_extensions; do
5324 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5325 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5327 break 2
5929fbe7 5328 fi
eb697db5
DN
5329done
5330 done
5331IFS=$as_save_IFS
08b47d3d 5332
eb697db5
DN
5333 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5334 ;;
5335esac
5336fi
5337INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5338if test -n "$INSTALL_INFO"; then
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5340$as_echo "$INSTALL_INFO" >&6; }
8c5ff6dd 5341else
eb697db5
DN
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5343$as_echo "no" >&6; }
a4f64981 5344fi
08b47d3d 5345
5929fbe7 5346
eb697db5
DN
5347# Extract the first word of "gzip", so it can be a program name with args.
5348set dummy gzip; ac_word=$2
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5350$as_echo_n "checking for $ac_word... " >&6; }
5351if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
5929fbe7 5352 $as_echo_n "(cached) " >&6
5929fbe7 5353else
eb697db5
DN
5354 case $GZIP_PROG in
5355 [\\/]* | ?:[\\/]*)
5356 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
5357 ;;
5358 *)
5359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5360for as_dir in $PATH
5361do
5362 IFS=$as_save_IFS
5363 test -z "$as_dir" && as_dir=.
5364 for ac_exec_ext in '' $ac_executable_extensions; do
5365 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5366 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
5367 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5368 break 2
5369 fi
5370done
5371 done
5372IFS=$as_save_IFS
5929fbe7 5373
eb697db5 5374 ;;
8c5ff6dd 5375esac
eb697db5
DN
5376fi
5377GZIP_PROG=$ac_cv_path_GZIP_PROG
5378if test -n "$GZIP_PROG"; then
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
5380$as_echo "$GZIP_PROG" >&6; }
5929fbe7 5381else
eb697db5
DN
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5929fbe7
GM
5384fi
5385
5929fbe7 5386
5929fbe7 5387
8c5ff6dd 5388
eb697db5
DN
5389## Need makeinfo >= 4.6 (?) to build the manuals.
5390# Extract the first word of "makeinfo", so it can be a program name with args.
5391set dummy makeinfo; ac_word=$2
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5393$as_echo_n "checking for $ac_word... " >&6; }
5394if test "${ac_cv_path_MAKEINFO+set}" = set; then :
5929fbe7
GM
5395 $as_echo_n "(cached) " >&6
5396else
eb697db5
DN
5397 case $MAKEINFO in
5398 [\\/]* | ?:[\\/]*)
5399 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5400 ;;
5401 *)
5402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5403for as_dir in $PATH
5404do
5405 IFS=$as_save_IFS
5406 test -z "$as_dir" && as_dir=.
5407 for ac_exec_ext in '' $ac_executable_extensions; do
5408 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5409 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5411 break 2
5412 fi
5413done
5414 done
5415IFS=$as_save_IFS
5929fbe7 5416
eb697db5
DN
5417 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5418 ;;
a4f64981 5419esac
eb697db5
DN
5420fi
5421MAKEINFO=$ac_cv_path_MAKEINFO
5422if test -n "$MAKEINFO"; then
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
5424$as_echo "$MAKEINFO" >&6; }
5929fbe7 5425else
eb697db5
DN
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427$as_echo "no" >&6; }
5428fi
e6df49e4 5429
eb697db5
DN
5430
5431if test "$MAKEINFO" != "no" && \
5432 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
5433 MAKEINFO=no
5929fbe7 5434fi
e6df49e4 5435
eb697db5
DN
5436## Makeinfo is unusual. For a released Emacs, the manuals are
5437## pre-built, and not deleted by the normal clean rules. makeinfo is
5438## therefore in the category of "special tools" not normally required, which
5439## configure does not have to check for (eg autoconf itself).
5440## In a Bazaar checkout on the other hand, the manuals are not included.
5441## So makeinfo is a requirement to build from Bazaar, and configure
5442## should test for it as it does for any other build requirement.
5443## We use the presence of $srcdir/info/emacs to distinguish a release,
5444## with pre-built manuals, from a Bazaar checkout.
5445if test "$MAKEINFO" = "no"; then
5446 if test "x${with_makeinfo}" = "xno"; then
5447 MAKEINFO=off
5448 elif test ! -e $srcdir/info/emacs; then
9164c0e4 5449 as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your
eb697db5
DN
5450source tree does not seem to have pre-built manuals in the \`info' directory.
5451Either install a suitable version of makeinfo, or re-run configure
5452with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
5453 fi
5929fbe7 5454fi
eb697db5
DN
5455
5456
5457if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5458then
f4981b7e 5459 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5929fbe7 5460fi
e6df49e4 5461
eb697db5
DN
5462if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5463then
f4981b7e 5464 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5929fbe7 5465fi
e6df49e4
GM
5466
5467
eb697db5
DN
5468late_LDFLAGS=$LDFLAGS
5469if test "$GCC" = yes; then
5470 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5471else
5472 LDFLAGS="$LDFLAGS -znocombreloc"
5473fi
e6df49e4 5474
eb697db5
DN
5475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
5476$as_echo_n "checking for -znocombreloc... " >&6; }
5477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5478/* end confdefs.h. */
5479main(){return 0;}
5929fbe7 5480_ACEOF
eb697db5
DN
5481if ac_fn_c_try_link "$LINENO"; then :
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5483$as_echo "yes" >&6; }
a4f64981 5484else
eb697db5
DN
5485 LDFLAGS=$late_LDFLAGS
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487$as_echo "no" >&6; }
8c5ff6dd 5488fi
eb697db5
DN
5489rm -f core conftest.err conftest.$ac_objext \
5490 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 5491
e7586c7a
GM
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"`
8c5ff6dd 5496
8c5ff6dd 5497
e7586c7a
GM
5498CANNOT_DUMP=no
5499case "$opsys" in
5500 your-opsys-here)
5501 CANNOT_DUMP=yes
5502
5503$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
5504
5505 ;;
5506esac
5507
eb697db5
DN
5508
5509
5510UNEXEC_OBJ=unexelf.o
5511case "$opsys" in
52eeb591 5512 # MSDOS uses unexcoff.o
d734dbbd 5513 # MSWindows uses unexw32.o
eb697db5
DN
5514 aix4-2)
5515 UNEXEC_OBJ=unexaix.o
5516 ;;
5517 cygwin)
5518 UNEXEC_OBJ=unexcw.o
5519 ;;
5520 darwin)
5521 UNEXEC_OBJ=unexmacosx.o
5522 ;;
5523 hpux10-20 | hpux11)
5524 UNEXEC_OBJ=unexhp9k800.o
5525 ;;
5526 sol2-10)
5527 # Use the Solaris dldump() function, called from unexsol.c, to dump
5528 # emacs, instead of the generic ELF dump code found in unexelf.c.
5529 # The resulting binary has a complete symbol table, and is better
5530 # for debugging and other observability tools (debuggers, pstack, etc).
5531 #
5532 # If you encounter a problem using dldump(), please consider sending
5533 # a message to the OpenSolaris tools-linking mailing list:
5534 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
5535 #
5536 # It is likely that dldump() works with older Solaris too, but this has
5537 # not been tested, so for now this change is for Solaris 10 or newer.
5538 UNEXEC_OBJ=unexsol.o
5539 ;;
5929fbe7 5540esac
5929fbe7 5541
eb697db5
DN
5542LD_SWITCH_SYSTEM=
5543case "$opsys" in
5544 freebsd)
5545 ## Let `ld' find image libs and similar things in /usr/local/lib.
5546 ## The system compiler, GCC, has apparently been modified to not
5547 ## look there, contrary to what a stock GCC would do.
5548 LD_SWITCH_SYSTEM=-L/usr/local/lib
5549 ;;
5929fbe7 5550
eb697db5
DN
5551 gnu-linux)
5552 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
5553 test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0"
5554 ;;
e6df49e4 5555
eb697db5
DN
5556 netbsd)
5557 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
5558 ;;
8c5ff6dd 5559
eb697db5
DN
5560 openbsd)
5561 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
5562 ## otherwise Emacs dumps core on elf systems.
5563 LD_SWITCH_SYSTEM="-Z"
5564 ;;
5565esac
8c5ff6dd
KR
5566
5567
eb697db5 5568ac_link="$ac_link $LD_SWITCH_SYSTEM"
8c5ff6dd 5569
eb697db5
DN
5570## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
5571## which has not been defined yet. When this was handled with cpp,
5572## it was expanded to null when configure sourced the s/*.h file.
5573## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
5574## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
5575## (or somesuch), but because it is supposed to go at the _front_
5576## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
5577## Compare with the gnu-linux case below, which added to the end
5578## of LD_SWITCH_SYSTEM, and so can instead go at the front of
5579## LD_SWITCH_SYSTEM_TEMACS.
5580case "$opsys" in
5581 netbsd|openbsd)
5582 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
5583 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
5584esac
8c5ff6dd 5585
8c5ff6dd 5586
eb697db5
DN
5587C_SWITCH_MACHINE=
5588if test "$machine" = "alpha"; then
5589 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
5590if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8c5ff6dd 5591
5929fbe7 5592fi
8c5ff6dd 5593
eb697db5
DN
5594 if test "$ac_cv_have_decl___ELF__" = "yes"; then
5595 ## With ELF, make sure that all common symbols get allocated to in the
5596 ## data section. Otherwise, the dump of temacs may miss variables in
5597 ## the shared library that have been initialized. For example, with
5598 ## GNU libc, __malloc_initialized would normally be resolved to the
5599 ## shared library's .bss section, which is fatal.
5600 if test "x$GCC" = "xyes"; then
5601 C_SWITCH_MACHINE="-fno-common"
5602 else
9164c0e4 5603 as_fn_error $? "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
eb697db5
DN
5604 fi
5605 else
5606 UNEXEC_OBJ=unexalpha.o
8c5ff6dd 5607 fi
15e12598 5608fi
8c5ff6dd 5609
8c5ff6dd 5610
8c5ff6dd 5611
8c5ff6dd 5612
eb697db5
DN
5613C_SWITCH_SYSTEM=
5614## Some programs in src produce warnings saying certain subprograms
5615## are too complex and need a MAXMEM value greater than 2000 for
5616## additional optimization. --nils@exp-math.uni-essen.de
5617test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
5618 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
5619## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
5620## It is redundant in glibc2, since we define _GNU_SOURCE.
a4f64981 5621
e6df49e4 5622
8c5ff6dd 5623
eb697db5
DN
5624LIBS_SYSTEM=
5625case "$opsys" in
5626 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
5627 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
5929fbe7 5628
eb697db5 5629 freebsd) LIBS_SYSTEM="-lutil" ;;
e6df49e4 5630
eb697db5 5631 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8c5ff6dd 5632
eb697db5 5633 sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;;
e6df49e4 5634
eb697db5
DN
5635 ## Motif needs -lgen.
5636 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
5929fbe7 5637esac
eb697db5
DN
5638
5639
5640
5641### Make sure subsequent tests use flags consistent with the build flags.
5642
5643if test x"${OVERRIDE_CPPFLAGS}" != x; then
5644 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5929fbe7 5645else
eb697db5 5646 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
15e12598 5647fi
e6df49e4 5648
a4f64981 5649
eb697db5
DN
5650
5651# Check whether --enable-largefile was given.
5652if test "${enable_largefile+set}" = set; then :
5653 enableval=$enable_largefile;
a4f64981
GM
5654fi
5655
eb697db5 5656if test "$enable_largefile" != no; then
a4f64981 5657
eb697db5
DN
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5659$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5660if test "${ac_cv_sys_largefile_CC+set}" = set; then :
a4f64981
GM
5661 $as_echo_n "(cached) " >&6
5662else
eb697db5
DN
5663 ac_cv_sys_largefile_CC=no
5664 if test "$GCC" != yes; then
5665 ac_save_CC=$CC
5666 while :; do
5667 # IRIX 6.2 and later do not support large files by default,
5668 # so use the C compiler's -n32 option if that helps.
5669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5670/* end confdefs.h. */
eb697db5
DN
5671#include <sys/types.h>
5672 /* Check that off_t can represent 2**63 - 1 correctly.
5673 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5674 since some C++ compilers masquerading as C compilers
5675 incorrectly reject 9223372036854775807. */
5676#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5677 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5678 && LARGE_OFF_T % 2147483647 == 1)
5679 ? 1 : -1];
a4f64981
GM
5680int
5681main ()
5682{
eb697db5 5683
a4f64981
GM
5684 ;
5685 return 0;
5686}
5687_ACEOF
eb697db5
DN
5688 if ac_fn_c_try_compile "$LINENO"; then :
5689 break
15e12598 5690fi
eb697db5
DN
5691rm -f core conftest.err conftest.$ac_objext
5692 CC="$CC -n32"
5693 if ac_fn_c_try_compile "$LINENO"; then :
5694 ac_cv_sys_largefile_CC=' -n32'; break
5929fbe7 5695fi
eb697db5
DN
5696rm -f core conftest.err conftest.$ac_objext
5697 break
5698 done
5699 CC=$ac_save_CC
5700 rm -f conftest.$ac_ext
5701 fi
a4f64981 5702fi
eb697db5
DN
5703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5704$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5705 if test "$ac_cv_sys_largefile_CC" != no; then
5706 CC=$CC$ac_cv_sys_largefile_CC
5707 fi
a4f64981 5708
eb697db5
DN
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5710$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5711if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5712 $as_echo_n "(cached) " >&6
5713else
5714 while :; do
5715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5716/* end confdefs.h. */
5717#include <sys/types.h>
5718 /* Check that off_t can represent 2**63 - 1 correctly.
5719 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5720 since some C++ compilers masquerading as C compilers
5721 incorrectly reject 9223372036854775807. */
5722#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5723 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5724 && LARGE_OFF_T % 2147483647 == 1)
5725 ? 1 : -1];
5726int
5727main ()
5728{
8c5ff6dd 5729
eb697db5
DN
5730 ;
5731 return 0;
5732}
5929fbe7 5733_ACEOF
eb697db5
DN
5734if ac_fn_c_try_compile "$LINENO"; then :
5735 ac_cv_sys_file_offset_bits=no; break
5736fi
5737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5739/* end confdefs.h. */
eb697db5
DN
5740#define _FILE_OFFSET_BITS 64
5741#include <sys/types.h>
5742 /* Check that off_t can represent 2**63 - 1 correctly.
5743 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5744 since some C++ compilers masquerading as C compilers
5745 incorrectly reject 9223372036854775807. */
5746#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5747 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5748 && LARGE_OFF_T % 2147483647 == 1)
5749 ? 1 : -1];
5750int
5751main ()
5752{
a5edbe4a 5753
eb697db5
DN
5754 ;
5755 return 0;
5756}
5757_ACEOF
5758if ac_fn_c_try_compile "$LINENO"; then :
5759 ac_cv_sys_file_offset_bits=64; break
a4f64981 5760fi
eb697db5
DN
5761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5762 ac_cv_sys_file_offset_bits=unknown
5763 break
5764done
5765fi
5766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5767$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5768case $ac_cv_sys_file_offset_bits in #(
5769 no | unknown) ;;
5770 *)
5771cat >>confdefs.h <<_ACEOF
5772#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5773_ACEOF
5774;;
5929fbe7 5775esac
eb697db5
DN
5776rm -rf conftest*
5777 if test $ac_cv_sys_file_offset_bits = unknown; then
5778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5779$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5780if test "${ac_cv_sys_large_files+set}" = set; then :
5929fbe7 5781 $as_echo_n "(cached) " >&6
a4f64981 5782else
eb697db5
DN
5783 while :; do
5784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5785/* end confdefs.h. */
5786#include <sys/types.h>
5787 /* Check that off_t can represent 2**63 - 1 correctly.
5788 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5789 since some C++ compilers masquerading as C compilers
5790 incorrectly reject 9223372036854775807. */
5791#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5792 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5793 && LARGE_OFF_T % 2147483647 == 1)
5794 ? 1 : -1];
5795int
5796main ()
5797{
8c5ff6dd 5798
eb697db5
DN
5799 ;
5800 return 0;
5801}
5929fbe7 5802_ACEOF
eb697db5
DN
5803if ac_fn_c_try_compile "$LINENO"; then :
5804 ac_cv_sys_large_files=no; break
5805fi
5806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 5808/* end confdefs.h. */
eb697db5
DN
5809#define _LARGE_FILES 1
5810#include <sys/types.h>
5811 /* Check that off_t can represent 2**63 - 1 correctly.
5812 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5813 since some C++ compilers masquerading as C compilers
5814 incorrectly reject 9223372036854775807. */
5815#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5816 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5817 && LARGE_OFF_T % 2147483647 == 1)
5818 ? 1 : -1];
8c5ff6dd
KR
5819int
5820main ()
5821{
eb697db5 5822
8c5ff6dd
KR
5823 ;
5824 return 0;
5825}
5826_ACEOF
eb697db5
DN
5827if ac_fn_c_try_compile "$LINENO"; then :
5828 ac_cv_sys_large_files=1; break
8c5ff6dd 5829fi
eb697db5
DN
5830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5831 ac_cv_sys_large_files=unknown
5832 break
5833done
5929fbe7 5834fi
eb697db5
DN
5835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5836$as_echo "$ac_cv_sys_large_files" >&6; }
5837case $ac_cv_sys_large_files in #(
5838 no | unknown) ;;
5839 *)
5840cat >>confdefs.h <<_ACEOF
5841#define _LARGE_FILES $ac_cv_sys_large_files
5842_ACEOF
5843;;
5844esac
5845rm -rf conftest*
5846 fi
e6df49e4 5847fi
a5edbe4a 5848
5929fbe7
GM
5849
5850
eb697db5
DN
5851## If user specified a crt-dir, use that unconditionally.
5852if test "X$CRT_DIR" = "X"; then
5929fbe7 5853
eb697db5
DN
5854 case "$canonical" in
5855 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
5856 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5857 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5858 ## For anything else (eg /usr/lib32), it is up the user to specify
5859 ## the location (bug#5655).
5860 ## Test for crtn.o, not just the directory, because sometimes the
5861 ## directory exists but does not have the relevant files (bug#1287).
5862 ## FIXME better to test for binary compatibility somehow.
5863 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5864 ;;
5929fbe7 5865
eb697db5
DN
5866 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
5867 esac
e6df49e4 5868
eb697db5
DN
5869 case "$opsys" in
5870 hpux10-20) CRT_DIR=/lib ;;
5871 esac
15e12598 5872
eb697db5
DN
5873 ## Default is /usr/lib.
5874 test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
8c5ff6dd 5875
15e12598 5876else
eb697db5
DN
5877
5878 ## Some platforms don't use any of these files, so it is not
5879 ## appropriate to put this test outside the if block.
5880 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
9164c0e4 5881 as_fn_error $? "crt*.o not found in specified location." "$LINENO" 5
eb697db5
DN
5882
5883fi
5884
5885
5886
5887LIB_MATH=-lm
5888LIB_STANDARD=
5889START_FILES=
5890
5891case $opsys in
5892 cygwin )
5893 LIB_MATH=
921d40b4 5894 START_FILES='pre-crt0.o'
eb697db5
DN
5895 ;;
5896 darwin )
5897 ## Adding -lm confuses the dynamic linker, so omit it.
5898 LIB_MATH=
5899 START_FILES='pre-crt0.o'
5900 ;;
5901 freebsd )
5902 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5903 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5904 ;;
5905 gnu-linux | gnu-kfreebsd )
5906 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
5907 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
5908 ;;
5909 hpux10-20 | hpux11 )
5910 LIB_STANDARD=-lc
5911 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
5912 ;;
5913 netbsd | openbsd )
5914 if test -f $CRT_DIR/crti.o; then
5915 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5916 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5917 else
5918 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
5919 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
5920 fi
5921 ;;
5929fbe7 5922esac
5929fbe7 5923
5929fbe7 5924
5929fbe7 5925
5929fbe7 5926
a4f64981 5927
5929fbe7 5928
e6df49e4 5929
eb697db5
DN
5930if test "${with_sound}" != "no"; then
5931 # Sound support for GNU/Linux and the free BSDs.
5932 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5933do :
5934 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5935ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9164c0e4 5936if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb697db5
DN
5937 cat >>confdefs.h <<_ACEOF
5938#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5939_ACEOF
a46007e9 5940 have_sound_header=yes
5929fbe7 5941fi
eb697db5
DN
5942
5943done
5944
5945 # Emulation library used on NetBSD.
5946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5947$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
5948if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
a4f64981 5949 $as_echo_n "(cached) " >&6
a4f64981 5950else
5929fbe7 5951 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
5952LIBS="-lossaudio $LIBS"
5953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5954/* end confdefs.h. */
8c5ff6dd 5955
5929fbe7
GM
5956/* Override any GCC internal prototype to avoid an error.
5957 Use char because int might match the return type of a GCC
5958 builtin and then its argument prototype would still apply. */
5959#ifdef __cplusplus
5960extern "C"
5961#endif
eb697db5 5962char _oss_ioctl ();
8c5ff6dd
KR
5963int
5964main ()
5965{
eb697db5 5966return _oss_ioctl ();
8c5ff6dd
KR
5967 ;
5968 return 0;
5969}
a4f64981 5970_ACEOF
eb697db5
DN
5971if ac_fn_c_try_link "$LINENO"; then :
5972 ac_cv_lib_ossaudio__oss_ioctl=yes
a4f64981 5973else
eb697db5 5974 ac_cv_lib_ossaudio__oss_ioctl=no
a5edbe4a 5975fi
eb697db5
DN
5976rm -f core conftest.err conftest.$ac_objext \
5977 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
5978LIBS=$ac_check_lib_save_LIBS
5979fi
eb697db5
DN
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
5981$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
5982if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
5983 LIBSOUND=-lossaudio
5929fbe7 5984else
eb697db5 5985 LIBSOUND=
8c5ff6dd 5986fi
a4f64981 5987
8c5ff6dd
KR
5988
5989
eb697db5
DN
5990 ALSA_REQUIRED=1.0.0
5991 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8c5ff6dd 5992
eb697db5
DN
5993 succeeded=no
5994
5995 # Extract the first word of "pkg-config", so it can be a program name with args.
5996set dummy pkg-config; ac_word=$2
5997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5998$as_echo_n "checking for $ac_word... " >&6; }
5999if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8c5ff6dd
KR
6000 $as_echo_n "(cached) " >&6
6001else
eb697db5
DN
6002 case $PKG_CONFIG in
6003 [\\/]* | ?:[\\/]*)
6004 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6005 ;;
6006 *)
6007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010 IFS=$as_save_IFS
6011 test -z "$as_dir" && as_dir=.
6012 for ac_exec_ext in '' $ac_executable_extensions; do
6013 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6014 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6016 break 2
6017 fi
6018done
6019 done
6020IFS=$as_save_IFS
5929fbe7 6021
eb697db5
DN
6022 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6023 ;;
5929fbe7 6024esac
a4f64981 6025fi
eb697db5
DN
6026PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6027if test -n "$PKG_CONFIG"; then
6028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6029$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 6030else
eb697db5
DN
6031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6032$as_echo "no" >&6; }
8c5ff6dd 6033fi
15e12598
VB
6034
6035
6036
eb697db5
DN
6037 if test "$PKG_CONFIG" = "no" ; then
6038 HAVE_ALSA=no
6039 else
6040 PKG_CONFIG_MIN_VERSION=0.9.0
6041 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
6043$as_echo_n "checking for $ALSA_MODULES... " >&6; }
5929fbe7 6044
eb697db5
DN
6045 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6047$as_echo "yes" >&6; }
6048 succeeded=yes
e6df49e4 6049
eb697db5
DN
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
6051$as_echo_n "checking ALSA_CFLAGS... " >&6; }
6052 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
6054$as_echo "$ALSA_CFLAGS" >&6; }
4e569696 6055
eb697db5
DN
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
6057$as_echo_n "checking ALSA_LIBS... " >&6; }
6058 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
6060$as_echo "$ALSA_LIBS" >&6; }
6061 else
6062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063$as_echo "no" >&6; }
6064 ALSA_CFLAGS=""
6065 ALSA_LIBS=""
6066 ## If we have a custom action on failure, don't print errors, but
6067 ## do set a variable so people can do so.
6068 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5929fbe7 6069
eb697db5
DN
6070 fi
6071
6072
6073
6074 else
6075 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6076 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6077 fi
5929fbe7 6078 fi
4e569696 6079
eb697db5
DN
6080 if test $succeeded = yes; then
6081 HAVE_ALSA=yes
6082 else
6083 HAVE_ALSA=no
6084 fi
6085
6086 if test $HAVE_ALSA = yes; then
6087 SAVE_CFLAGS="$CFLAGS"
6088 SAVE_LDFLAGS="$LDFLAGS"
6089 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6090 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6092/* end confdefs.h. */
eb697db5
DN
6093#include <asoundlib.h>
6094int
6095main ()
6096{
6097snd_lib_error_set_handler (0);
6098 ;
6099 return 0;
6100}
6101_ACEOF
6102if ac_fn_c_try_compile "$LINENO"; then :
6103 emacs_alsa_normal=yes
8c5ff6dd 6104else
eb697db5 6105 emacs_alsa_normal=no
8c5ff6dd 6106fi
5929fbe7 6107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6108 if test "$emacs_alsa_normal" != yes; then
6109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6110/* end confdefs.h. */
eb697db5
DN
6111#include <alsa/asoundlib.h>
6112int
6113main ()
6114{
6115snd_lib_error_set_handler (0);
6116 ;
6117 return 0;
6118}
5929fbe7 6119_ACEOF
eb697db5
DN
6120if ac_fn_c_try_compile "$LINENO"; then :
6121 emacs_alsa_subdir=yes
5929fbe7 6122else
eb697db5 6123 emacs_alsa_subdir=no
8c5ff6dd 6124fi
eb697db5
DN
6125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6126 if test "$emacs_alsa_subdir" != yes; then
9164c0e4 6127 as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
eb697db5
DN
6128 fi
6129 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6130 fi
e6df49e4 6131
eb697db5
DN
6132 CFLAGS="$SAVE_CFLAGS"
6133 LDFLAGS="$SAVE_LDFLAGS"
6134 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6135 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
e6df49e4 6136
eb697db5 6137$as_echo "#define HAVE_ALSA 1" >>confdefs.h
e6df49e4 6138
eb697db5 6139 fi
e6df49e4 6140
a46007e9
GM
6141 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
6142 case "$opsys" in
6143 gnu-linux|freebsd|netbsd)
6144
6145$as_echo "#define HAVE_SOUND 1" >>confdefs.h
6146
6147 ;;
6148 esac
6149 fi
6150
6151
5929fbe7 6152fi
eb697db5
DN
6153
6154for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6155 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
6156 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
6157 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
1c97e857 6158 sys/utsname.h pwd.h utmp.h dirent.h
eb697db5
DN
6159do :
6160 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6161ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9164c0e4 6162if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb697db5
DN
6163 cat >>confdefs.h <<_ACEOF
6164#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5929fbe7 6165_ACEOF
15e12598 6166
eb697db5
DN
6167fi
6168
6169done
6170
6171
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
6173$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
6174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6175/* end confdefs.h. */
6176#include <sys/personality.h>
8c5ff6dd
KR
6177int
6178main ()
6179{
eb697db5 6180personality (PER_LINUX32)
8c5ff6dd
KR
6181 ;
6182 return 0;
6183}
6184_ACEOF
eb697db5
DN
6185if ac_fn_c_try_compile "$LINENO"; then :
6186 emacs_cv_personality_linux32=yes
8c5ff6dd 6187else
eb697db5 6188 emacs_cv_personality_linux32=no
5929fbe7 6189fi
eb697db5
DN
6190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
6192$as_echo "$emacs_cv_personality_linux32" >&6; }
08b47d3d 6193
eb697db5 6194if test $emacs_cv_personality_linux32 = yes; then
08b47d3d 6195
eb697db5 6196$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
08b47d3d 6197
eb697db5 6198fi
a4f64981 6199
eb697db5
DN
6200for ac_header in term.h
6201do :
6202 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6203if test "x$ac_cv_header_term_h" = x""yes; then :
6204 cat >>confdefs.h <<_ACEOF
6205#define HAVE_TERM_H 1
5929fbe7 6206_ACEOF
a4f64981 6207
8c5ff6dd 6208fi
a4f64981 6209
eb697db5 6210done
a4f64981 6211
eb697db5
DN
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6213$as_echo_n "checking for ANSI C header files... " >&6; }
6214if test "${ac_cv_header_stdc+set}" = set; then :
8c5ff6dd
KR
6215 $as_echo_n "(cached) " >&6
6216else
eb697db5 6217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6218/* end confdefs.h. */
eb697db5
DN
6219#include <stdlib.h>
6220#include <stdarg.h>
6221#include <string.h>
6222#include <float.h>
6223
6224int
6225main ()
6226{
6227
6228 ;
6229 return 0;
6230}
8c5ff6dd 6231_ACEOF
eb697db5
DN
6232if ac_fn_c_try_compile "$LINENO"; then :
6233 ac_cv_header_stdc=yes
8c5ff6dd 6234else
eb697db5 6235 ac_cv_header_stdc=no
8c5ff6dd 6236fi
5929fbe7 6237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 6238
eb697db5
DN
6239if test $ac_cv_header_stdc = yes; then
6240 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6242/* end confdefs.h. */
eb697db5
DN
6243#include <string.h>
6244
5929fbe7 6245_ACEOF
eb697db5
DN
6246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6247 $EGREP "memchr" >/dev/null 2>&1; then :
6248
5929fbe7 6249else
eb697db5
DN
6250 ac_cv_header_stdc=no
6251fi
6252rm -f conftest*
a4f64981 6253
8c5ff6dd 6254fi
a4f64981 6255
eb697db5
DN
6256if test $ac_cv_header_stdc = yes; then
6257 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6259/* end confdefs.h. */
6260#include <stdlib.h>
a4f64981 6261
eb697db5
DN
6262_ACEOF
6263if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6264 $EGREP "free" >/dev/null 2>&1; then :
a4f64981 6265
5929fbe7 6266else
eb697db5 6267 ac_cv_header_stdc=no
5929fbe7 6268fi
eb697db5 6269rm -f conftest*
a4f64981 6270
8c5ff6dd 6271fi
a4f64981 6272
eb697db5
DN
6273if test $ac_cv_header_stdc = yes; then
6274 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6275 if test "$cross_compiling" = yes; then :
6276 :
6277else
6278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6279/* end confdefs.h. */
6280#include <ctype.h>
6281#include <stdlib.h>
6282#if ((' ' & 0x0FF) == 0x020)
6283# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6284# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6285#else
6286# define ISLOWER(c) \
6287 (('a' <= (c) && (c) <= 'i') \
6288 || ('j' <= (c) && (c) <= 'r') \
6289 || ('s' <= (c) && (c) <= 'z'))
6290# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6291#endif
6292
6293#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6294int
6295main ()
6296{
6297 int i;
6298 for (i = 0; i < 256; i++)
6299 if (XOR (islower (i), ISLOWER (i))
6300 || toupper (i) != TOUPPER (i))
6301 return 2;
6302 return 0;
6303}
8c5ff6dd 6304_ACEOF
eb697db5
DN
6305if ac_fn_c_try_run "$LINENO"; then :
6306
6307else
6308 ac_cv_header_stdc=no
6309fi
6310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6311 conftest.$ac_objext conftest.beam conftest.$ac_ext
6312fi
a4f64981 6313
8c5ff6dd 6314fi
eb697db5
DN
6315fi
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6317$as_echo "$ac_cv_header_stdc" >&6; }
6318if test $ac_cv_header_stdc = yes; then
a4f64981 6319
eb697db5 6320$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a4f64981 6321
eb697db5 6322fi
a4f64981 6323
eb697db5
DN
6324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
6325$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
6326if test "${ac_cv_header_time+set}" = set; then :
6327 $as_echo_n "(cached) " >&6
6328else
6329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6330/* end confdefs.h. */
6331#include <sys/types.h>
6332#include <sys/time.h>
6333#include <time.h>
a4f64981 6334
eb697db5
DN
6335int
6336main ()
6337{
6338if ((struct tm *) 0)
6339return 0;
6340 ;
6341 return 0;
6342}
8c5ff6dd 6343_ACEOF
eb697db5
DN
6344if ac_fn_c_try_compile "$LINENO"; then :
6345 ac_cv_header_time=yes
6346else
6347 ac_cv_header_time=no
6348fi
6349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6350fi
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
6352$as_echo "$ac_cv_header_time" >&6; }
6353if test $ac_cv_header_time = yes; then
6354
6355$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
6356
6357fi
a4f64981 6358
eb697db5
DN
6359ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6360if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6361 ac_have_decl=1
6362else
6363 ac_have_decl=0
6364fi
a4f64981 6365
eb697db5
DN
6366cat >>confdefs.h <<_ACEOF
6367#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
5929fbe7 6368_ACEOF
a4f64981 6369
eb697db5
DN
6370if test $ac_cv_have_decl_sys_siglist != yes; then
6371 # For Tru64, at least:
6372 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6373if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6374 ac_have_decl=1
6375else
6376 ac_have_decl=0
6377fi
5929fbe7 6378
eb697db5
DN
6379cat >>confdefs.h <<_ACEOF
6380#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
5929fbe7
GM
6381_ACEOF
6382
eb697db5 6383 if test $ac_cv_have_decl___sys_siglist = yes; then
5929fbe7 6384
eb697db5 6385$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
a4f64981 6386
5929fbe7 6387 fi
5929fbe7 6388fi
eb697db5
DN
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
6390$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
6391if test "${ac_cv_header_sys_wait_h+set}" = set; then :
5929fbe7 6392 $as_echo_n "(cached) " >&6
5929fbe7 6393else
eb697db5 6394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6395/* end confdefs.h. */
eb697db5
DN
6396#include <sys/types.h>
6397#include <sys/wait.h>
6398#ifndef WEXITSTATUS
6399# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6400#endif
6401#ifndef WIFEXITED
6402# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6403#endif
6404
6405int
6406main ()
6407{
6408 int s;
6409 wait (&s);
6410 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6411 ;
6412 return 0;
6413}
5929fbe7 6414_ACEOF
eb697db5
DN
6415if ac_fn_c_try_compile "$LINENO"; then :
6416 ac_cv_header_sys_wait_h=yes
5929fbe7 6417else
eb697db5 6418 ac_cv_header_sys_wait_h=no
5929fbe7 6419fi
5929fbe7 6420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6421fi
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
6423$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6424if test $ac_cv_header_sys_wait_h = yes; then
a4f64981 6425
eb697db5 6426$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
a4f64981 6427
5929fbe7 6428fi
a4f64981 6429
a4f64981 6430
eb697db5
DN
6431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
6432$as_echo_n "checking for struct utimbuf... " >&6; }
6433if test "${emacs_cv_struct_utimbuf+set}" = set; then :
5929fbe7 6434 $as_echo_n "(cached) " >&6
8c5ff6dd 6435else
eb697db5
DN
6436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6437/* end confdefs.h. */
6438#ifdef TIME_WITH_SYS_TIME
6439#include <sys/time.h>
6440#include <time.h>
6441#else
6442#ifdef HAVE_SYS_TIME_H
6443#include <sys/time.h>
6444#else
6445#include <time.h>
6446#endif
6447#endif
6448#ifdef HAVE_UTIME_H
6449#include <utime.h>
6450#endif
6451int
6452main ()
6453{
6454static struct utimbuf x; x.actime = x.modtime;
6455 ;
6456 return 0;
6457}
6458_ACEOF
6459if ac_fn_c_try_compile "$LINENO"; then :
6460 emacs_cv_struct_utimbuf=yes
6461else
6462 emacs_cv_struct_utimbuf=no
6463fi
6464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6465fi
eb697db5
DN
6466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
6467$as_echo "$emacs_cv_struct_utimbuf" >&6; }
6468if test $emacs_cv_struct_utimbuf = yes; then
6469
6470$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
a4f64981 6471
5929fbe7 6472fi
eb697db5
DN
6473
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6475$as_echo_n "checking return type of signal handlers... " >&6; }
6476if test "${ac_cv_type_signal+set}" = set; then :
8c5ff6dd
KR
6477 $as_echo_n "(cached) " >&6
6478else
eb697db5 6479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6480/* end confdefs.h. */
eb697db5
DN
6481#include <sys/types.h>
6482#include <signal.h>
a4f64981 6483
8c5ff6dd
KR
6484int
6485main ()
6486{
eb697db5 6487return *(signal (0, 0)) (0) == 1;
8c5ff6dd
KR
6488 ;
6489 return 0;
6490}
6491_ACEOF
eb697db5
DN
6492if ac_fn_c_try_compile "$LINENO"; then :
6493 ac_cv_type_signal=int
8c5ff6dd 6494else
eb697db5 6495 ac_cv_type_signal=void
5929fbe7 6496fi
eb697db5 6497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929fbe7 6498fi
eb697db5
DN
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6500$as_echo "$ac_cv_type_signal" >&6; }
5929fbe7 6501
eb697db5
DN
6502cat >>confdefs.h <<_ACEOF
6503#define RETSIGTYPE $ac_cv_type_signal
5929fbe7
GM
6504_ACEOF
6505
a4f64981 6506
5929fbe7 6507
eb697db5
DN
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
6509$as_echo_n "checking for speed_t... " >&6; }
6510if test "${emacs_cv_speed_t+set}" = set; then :
e6df49e4
GM
6511 $as_echo_n "(cached) " >&6
6512else
eb697db5 6513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 6514/* end confdefs.h. */
eb697db5 6515#include <termios.h>
8c5ff6dd
KR
6516int
6517main ()
6518{
eb697db5 6519speed_t x = 1;
8c5ff6dd
KR
6520 ;
6521 return 0;
6522}
6523_ACEOF
eb697db5
DN
6524if ac_fn_c_try_compile "$LINENO"; then :
6525 emacs_cv_speed_t=yes
8c5ff6dd 6526else
eb697db5 6527 emacs_cv_speed_t=no
8c5ff6dd 6528fi
eb697db5 6529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6530fi
eb697db5
DN
6531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
6532$as_echo "$emacs_cv_speed_t" >&6; }
6533if test $emacs_cv_speed_t = yes; then
8c5ff6dd 6534
eb697db5 6535$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
91e84f96 6536
8c5ff6dd
KR
6537fi
6538
eb697db5
DN
6539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
6540$as_echo_n "checking for struct timeval... " >&6; }
6541if test "${emacs_cv_struct_timeval+set}" = set; then :
8c5ff6dd
KR
6542 $as_echo_n "(cached) " >&6
6543else
eb697db5 6544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6545/* end confdefs.h. */
eb697db5
DN
6546#ifdef TIME_WITH_SYS_TIME
6547#include <sys/time.h>
6548#include <time.h>
6549#else
6550#ifdef HAVE_SYS_TIME_H
6551#include <sys/time.h>
6552#else
6553#include <time.h>
6554#endif
6555#endif
49ebbd65
DN
6556int
6557main ()
6558{
eb697db5 6559static struct timeval x; x.tv_sec = x.tv_usec;
49ebbd65
DN
6560 ;
6561 return 0;
6562}
6563_ACEOF
eb697db5
DN
6564if ac_fn_c_try_compile "$LINENO"; then :
6565 emacs_cv_struct_timeval=yes
6566else
6567 emacs_cv_struct_timeval=no
6568fi
6569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6570fi
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
6572$as_echo "$emacs_cv_struct_timeval" >&6; }
6573HAVE_TIMEVAL=$emacs_cv_struct_timeval
6574if test $emacs_cv_struct_timeval = yes; then
6575
6576$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
6577
6578fi
6579
6580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
6581$as_echo_n "checking for struct exception... " >&6; }
6582if test "${emacs_cv_struct_exception+set}" = set; then :
6583 $as_echo_n "(cached) " >&6
6584else
6585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6586/* end confdefs.h. */
6587#include <math.h>
6588int
6589main ()
6590{
6591static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
6592 ;
6593 return 0;
6594}
6595_ACEOF
6596if ac_fn_c_try_compile "$LINENO"; then :
6597 emacs_cv_struct_exception=yes
8c5ff6dd 6598else
eb697db5
DN
6599 emacs_cv_struct_exception=no
6600fi
6601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6602fi
6603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
6604$as_echo "$emacs_cv_struct_exception" >&6; }
6605HAVE_EXCEPTION=$emacs_cv_struct_exception
6606if test $emacs_cv_struct_exception != yes; then
6607
6608$as_echo "#define NO_MATHERR 1" >>confdefs.h
91e84f96 6609
08b47d3d 6610fi
91e84f96 6611
eb697db5
DN
6612for ac_header in sys/socket.h
6613do :
6614 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6615if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
6616 cat >>confdefs.h <<_ACEOF
6617#define HAVE_SYS_SOCKET_H 1
6618_ACEOF
6619
5929fbe7 6620fi
91e84f96 6621
eb697db5
DN
6622done
6623
6624for ac_header in net/if.h
6625do :
6626 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
6627#if HAVE_SYS_SOCKET_H
6628#include <sys/socket.h>
6629#endif
6630"
6631if test "x$ac_cv_header_net_if_h" = x""yes; then :
6632 cat >>confdefs.h <<_ACEOF
6633#define HAVE_NET_IF_H 1
5929fbe7 6634_ACEOF
91e84f96 6635
5929fbe7 6636fi
8c5ff6dd 6637
eb697db5
DN
6638done
6639
6640
6641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
6642$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
6643if test "${ac_cv_struct_tm+set}" = set; then :
15e12598 6644 $as_echo_n "(cached) " >&6
15e12598 6645else
eb697db5 6646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 6647/* end confdefs.h. */
eb697db5
DN
6648#include <sys/types.h>
6649#include <time.h>
a5edbe4a 6650
8c5ff6dd
KR
6651int
6652main ()
6653{
eb697db5
DN
6654struct tm tm;
6655 int *p = &tm.tm_sec;
6656 return !p;
8c5ff6dd
KR
6657 ;
6658 return 0;
6659}
6660_ACEOF
eb697db5
DN
6661if ac_fn_c_try_compile "$LINENO"; then :
6662 ac_cv_struct_tm=time.h
a4f64981 6663else
eb697db5
DN
6664 ac_cv_struct_tm=sys/time.h
6665fi
6666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15e12598 6667fi
eb697db5
DN
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
6669$as_echo "$ac_cv_struct_tm" >&6; }
6670if test $ac_cv_struct_tm = sys/time.h; then
6671
6672$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
a4f64981 6673
8c5ff6dd 6674fi
91e84f96 6675
eb697db5
DN
6676ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
6677#include <$ac_cv_struct_tm>
6678
6679"
6680if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
a4f64981 6681
eb697db5
DN
6682cat >>confdefs.h <<_ACEOF
6683#define HAVE_STRUCT_TM_TM_ZONE 1
5929fbe7 6684_ACEOF
a4f64981
GM
6685
6686
eb697db5 6687fi
a4f64981 6688
eb697db5 6689if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
a4f64981 6690
eb697db5 6691$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
15e12598 6692
15e12598 6693else
eb697db5
DN
6694 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6695"
6696if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6697 ac_have_decl=1
8c5ff6dd 6698else
eb697db5 6699 ac_have_decl=0
8c5ff6dd 6700fi
49ebbd65 6701
eb697db5
DN
6702cat >>confdefs.h <<_ACEOF
6703#define HAVE_DECL_TZNAME $ac_have_decl
6704_ACEOF
6705
6706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6707$as_echo_n "checking for tzname... " >&6; }
6708if test "${ac_cv_var_tzname+set}" = set; then :
5929fbe7
GM
6709 $as_echo_n "(cached) " >&6
6710else
eb697db5 6711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6712/* end confdefs.h. */
eb697db5
DN
6713#include <time.h>
6714#if !HAVE_DECL_TZNAME
6715extern char *tzname[];
5929fbe7
GM
6716#endif
6717
a4f64981
GM
6718int
6719main ()
6720{
eb697db5 6721return tzname[0][0];
a4f64981
GM
6722 ;
6723 return 0;
6724}
6725_ACEOF
eb697db5
DN
6726if ac_fn_c_try_link "$LINENO"; then :
6727 ac_cv_var_tzname=yes
a4f64981 6728else
eb697db5
DN
6729 ac_cv_var_tzname=no
6730fi
6731rm -f core conftest.err conftest.$ac_objext \
6732 conftest$ac_exeext conftest.$ac_ext
6733fi
6734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6735$as_echo "$ac_cv_var_tzname" >&6; }
6736 if test $ac_cv_var_tzname = yes; then
5929fbe7 6737
eb697db5
DN
6738$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6739
6740 fi
a4f64981 6741fi
aaa36002 6742
eb697db5
DN
6743ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6744"
6745if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
6746
6747$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
6748
15e12598 6749fi
eb697db5
DN
6750
6751ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6752#if HAVE_SYS_SOCKET_H
6753#include <sys/socket.h>
6754#endif
6755#if HAVE_NET_IF_H
6756#include <net/if.h>
6757#endif
6758"
6759if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
aaa36002 6760
5929fbe7 6761cat >>confdefs.h <<_ACEOF
eb697db5 6762#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
5929fbe7
GM
6763_ACEOF
6764
cd03c74a 6765
8c5ff6dd 6766fi
eb697db5
DN
6767ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6768#if HAVE_SYS_SOCKET_H
6769#include <sys/socket.h>
6770#endif
6771#if HAVE_NET_IF_H
6772#include <net/if.h>
6773#endif
6774"
6775if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
49ebbd65 6776
eb697db5
DN
6777cat >>confdefs.h <<_ACEOF
6778#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
5929fbe7 6779_ACEOF
49ebbd65 6780
aaa36002 6781
8c5ff6dd 6782fi
eb697db5
DN
6783ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6784#if HAVE_SYS_SOCKET_H
6785#include <sys/socket.h>
6786#endif
6787#if HAVE_NET_IF_H
6788#include <net/if.h>
6789#endif
6790"
6791if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
6792
6793cat >>confdefs.h <<_ACEOF
6794#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
6795_ACEOF
aaa36002 6796
5929fbe7 6797
8c5ff6dd 6798fi
eb697db5
DN
6799ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6800#if HAVE_SYS_SOCKET_H
6801#include <sys/socket.h>
6802#endif
6803#if HAVE_NET_IF_H
6804#include <net/if.h>
6805#endif
6806"
6807if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
cd03c74a 6808
5929fbe7 6809cat >>confdefs.h <<_ACEOF
eb697db5 6810#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
5929fbe7 6811_ACEOF
49ebbd65 6812
7186fb09 6813
8c5ff6dd 6814fi
eb697db5
DN
6815ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6816#if HAVE_SYS_SOCKET_H
6817#include <sys/socket.h>
6818#endif
6819#if HAVE_NET_IF_H
6820#include <net/if.h>
6821#endif
6822"
6823if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
6824
6825cat >>confdefs.h <<_ACEOF
6826#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
6827_ACEOF
7186fb09 6828
5929fbe7 6829
8c5ff6dd
KR
6830fi
6831
5929fbe7 6832
5929fbe7 6833
eb697db5
DN
6834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6835$as_echo_n "checking for function prototypes... " >&6; }
6836if test "$ac_cv_prog_cc_c89" != no; then
6837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6838$as_echo "yes" >&6; }
5929fbe7 6839
eb697db5 6840$as_echo "#define PROTOTYPES 1" >>confdefs.h
5929fbe7 6841
5929fbe7 6842
eb697db5 6843$as_echo "#define __PROTOTYPES 1" >>confdefs.h
5929fbe7 6844
eb697db5
DN
6845else
6846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6847$as_echo "no" >&6; }
8c5ff6dd 6848fi
15e12598 6849
eb697db5
DN
6850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6851$as_echo_n "checking for working volatile... " >&6; }
6852if test "${ac_cv_c_volatile+set}" = set; then :
5929fbe7
GM
6853 $as_echo_n "(cached) " >&6
6854else
eb697db5 6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6856/* end confdefs.h. */
5929fbe7 6857
8c5ff6dd
KR
6858int
6859main ()
a4f64981 6860{
eb697db5
DN
6861
6862volatile int x;
6863int * volatile y = (int *) 0;
6864return !x && !y;
8c5ff6dd
KR
6865 ;
6866 return 0;
a4f64981 6867}
8c5ff6dd 6868_ACEOF
eb697db5
DN
6869if ac_fn_c_try_compile "$LINENO"; then :
6870 ac_cv_c_volatile=yes
8c5ff6dd 6871else
eb697db5 6872 ac_cv_c_volatile=no
8c5ff6dd 6873fi
eb697db5 6874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6875fi
eb697db5
DN
6876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6877$as_echo "$ac_cv_c_volatile" >&6; }
6878if test $ac_cv_c_volatile = no; then
9452ded1 6879
eb697db5 6880$as_echo "#define volatile /**/" >>confdefs.h
5929fbe7 6881
8c5ff6dd 6882fi
eb697db5
DN
6883
6884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6885$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6886if test "${ac_cv_c_const+set}" = set; then :
5929fbe7
GM
6887 $as_echo_n "(cached) " >&6
6888else
eb697db5 6889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7
GM
6890/* end confdefs.h. */
6891
5929fbe7
GM
6892int
6893main ()
6894{
eb697db5
DN
6895/* FIXME: Include the comments suggested by Paul. */
6896#ifndef __cplusplus
6897 /* Ultrix mips cc rejects this. */
6898 typedef int charset[2];
6899 const charset cs;
6900 /* SunOS 4.1.1 cc rejects this. */
6901 char const *const *pcpcc;
6902 char **ppc;
6903 /* NEC SVR4.0.2 mips cc rejects this. */
6904 struct point {int x, y;};
6905 static struct point const zero = {0,0};
6906 /* AIX XL C 1.02.0.0 rejects this.
6907 It does not let you subtract one const X* pointer from another in
6908 an arm of an if-expression whose if-part is not a constant
6909 expression */
6910 const char *g = "string";
6911 pcpcc = &g + (g ? g-g : 0);
6912 /* HPUX 7.0 cc rejects these. */
6913 ++pcpcc;
6914 ppc = (char**) pcpcc;
6915 pcpcc = (char const *const *) ppc;
6916 { /* SCO 3.2v4 cc rejects this. */
6917 char *t;
6918 char const *s = 0 ? (char *) 0 : (char const *) 0;
6919
6920 *t++ = 0;
6921 if (s) return 0;
6922 }
6923 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6924 int x[] = {25, 17};
6925 const int *foo = &x[0];
6926 ++foo;
6927 }
6928 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6929 typedef const int *iptr;
6930 iptr p = 0;
6931 ++p;
6932 }
6933 { /* AIX XL C 1.02.0.0 rejects this saying
6934 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6935 struct s { int j; const int *ap[3]; };
6936 struct s *b; b->j = 5;
6937 }
6938 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6939 const int foo = 10;
6940 if (!foo) return 0;
6941 }
6942 return !cs[0] && !zero.x;
6943#endif
6944
5929fbe7
GM
6945 ;
6946 return 0;
6947}
6948_ACEOF
eb697db5
DN
6949if ac_fn_c_try_compile "$LINENO"; then :
6950 ac_cv_c_const=yes
8c5ff6dd 6951else
eb697db5 6952 ac_cv_c_const=no
8c5ff6dd 6953fi
eb697db5 6954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6955fi
eb697db5
DN
6956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6957$as_echo "$ac_cv_c_const" >&6; }
6958if test $ac_cv_c_const = no; then
91e84f96 6959
eb697db5 6960$as_echo "#define const /**/" >>confdefs.h
08b47d3d 6961
8c5ff6dd 6962fi
91e84f96 6963
eb697db5
DN
6964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
6965$as_echo_n "checking for void * support... " >&6; }
6966if test "${emacs_cv_void_star+set}" = set; then :
5929fbe7 6967 $as_echo_n "(cached) " >&6
8c5ff6dd 6968else
eb697db5 6969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6970/* end confdefs.h. */
8c5ff6dd 6971
8c5ff6dd
KR
6972int
6973main ()
6974{
eb697db5 6975void * foo;
8c5ff6dd
KR
6976 ;
6977 return 0;
a4f64981 6978}
a5edbe4a 6979_ACEOF
eb697db5
DN
6980if ac_fn_c_try_compile "$LINENO"; then :
6981 emacs_cv_void_star=yes
15e12598 6982else
eb697db5 6983 emacs_cv_void_star=no
a4f64981 6984fi
eb697db5 6985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 6986fi
eb697db5
DN
6987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
6988$as_echo "$emacs_cv_void_star" >&6; }
6989if test $emacs_cv_void_star = yes; then
6990 $as_echo "#define POINTER_TYPE void" >>confdefs.h
6991
6992else
6993 $as_echo "#define POINTER_TYPE char" >>confdefs.h
15e12598
VB
6994
6995fi
15e12598 6996
a4f64981 6997
eb697db5
DN
6998
6999
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7001$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
7002set x ${MAKE-make}
7003ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9164c0e4 7004if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
5929fbe7 7005 $as_echo_n "(cached) " >&6
5929fbe7 7006else
eb697db5
DN
7007 cat >conftest.make <<\_ACEOF
7008SHELL = /bin/sh
7009all:
7010 @echo '@@@%%%=$(MAKE)=@@@%%%'
5929fbe7 7011_ACEOF
9164c0e4 7012# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
eb697db5
DN
7013case `${MAKE-make} -f conftest.make 2>/dev/null` in
7014 *@@@%%%=?*=@@@%%%*)
7015 eval ac_cv_prog_make_${ac_make}_set=yes;;
7016 *)
7017 eval ac_cv_prog_make_${ac_make}_set=no;;
5929fbe7 7018esac
eb697db5
DN
7019rm -f conftest.make
7020fi
7021if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7023$as_echo "yes" >&6; }
7024 SET_MAKE=
5929fbe7 7025else
eb697db5
DN
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7027$as_echo "no" >&6; }
7028 SET_MAKE="MAKE=${MAKE-make}"
5929fbe7 7029fi
8c5ff6dd
KR
7030
7031
eb697db5
DN
7032DEPFLAGS=
7033MKDEPDIR=":"
7034deps_frag=deps.mk
7035if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
7036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
7037$as_echo_n "checking whether we are using GNU Make... " >&6; }
7038 HAVE_GNU_MAKE=no
7039 testval=`make --version 2>/dev/null | grep 'GNU Make'`
7040 if test "x$testval" != x; then
7041 HAVE_GNU_MAKE=yes
7042 else
7043 ac_enable_autodepend=no
7044 fi
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
7046$as_echo "$HAVE_GNU_MAKE" >&6; }
7047 if test $HAVE_GNU_MAKE = yes; then
7048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
7049$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
7050 SAVE_CFLAGS="$CFLAGS"
7051 CFLAGS="$CFLAGS -MMD -MF deps.d"
7052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7053/* end confdefs.h. */
eb697db5
DN
7054
7055int
7056main ()
7057{
7058
7059 ;
7060 return 0;
7061}
8c5ff6dd 7062_ACEOF
eb697db5 7063if ac_fn_c_try_compile "$LINENO"; then :
8c5ff6dd 7064
eb697db5
DN
7065else
7066 ac_enable_autodepend=no
7067fi
7068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7069 CFLAGS="$SAVE_CFLAGS"
7070 test -f deps.d || ac_enable_autodepend=no
7071 rm -rf deps.d
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
7073$as_echo "$ac_enable_autodepend" >&6; }
7074 fi
7075 if test $ac_enable_autodepend = yes; then
7076 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
7077 ## In parallel builds, another make might create depdir between
7078 ## the first test and mkdir, so stick another test on the end.
7079 ## Or use mkinstalldirs? mkdir -p is not portable.
7080 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
7081 deps_frag=autodeps.mk
7082 fi
8c5ff6dd 7083fi
eb697db5 7084deps_frag=$srcdir/src/$deps_frag
a4f64981 7085
a4f64981 7086
a4f64981 7087
eb697db5
DN
7088
7089
7090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
7091$as_echo_n "checking for long file names... " >&6; }
7092if test "${ac_cv_sys_long_file_names+set}" = set; then :
5929fbe7
GM
7093 $as_echo_n "(cached) " >&6
7094else
eb697db5
DN
7095 ac_cv_sys_long_file_names=yes
7096# Test for long file names in all the places we know might matter:
7097# . the current directory, where building will happen
7098# $prefix/lib where we will be installing things
7099# $exec_prefix/lib likewise
7100# $TMPDIR if set, where it might want to write temporary files
7101# /tmp where it might want to write temporary files
7102# /var/tmp likewise
7103# /usr/tmp likewise
7104for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
7105 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
7106 # in the usual case where exec_prefix is '${prefix}'.
7107 case $ac_dir in #(
7108 . | /* | ?:[\\/]*) ;; #(
7109 *) continue;;
7110 esac
7111 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
7112 ac_xdir=$ac_dir/cf$$
7113 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
7114 ac_tf1=$ac_xdir/conftest9012345
7115 ac_tf2=$ac_xdir/conftest9012346
7116 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
7117 ac_cv_sys_long_file_names=no
7118 rm -f -r "$ac_xdir" 2>/dev/null
7119 test $ac_cv_sys_long_file_names = no && break
7120done
5929fbe7 7121fi
eb697db5
DN
7122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
7123$as_echo "$ac_cv_sys_long_file_names" >&6; }
7124if test $ac_cv_sys_long_file_names = yes; then
7125
7126$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
49ebbd65 7127
5929fbe7 7128fi
a4f64981 7129
eb697db5
DN
7130
7131#### Choose a window system.
7132
7133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
7134$as_echo_n "checking for X... " >&6; }
7135
7136
7137# Check whether --with-x was given.
7138if test "${with_x+set}" = set; then :
7139 withval=$with_x;
7140fi
7141
7142# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7143if test "x$with_x" = xno; then
7144 # The user explicitly disabled X.
7145 have_x=disabled
7146else
7147 case $x_includes,$x_libraries in #(
9164c0e4 7148 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
eb697db5
DN
7149 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
7150 $as_echo_n "(cached) " >&6
7151else
7152 # One or both of the vars are not set, and there is no cached value.
7153ac_x_includes=no ac_x_libraries=no
7154rm -f -r conftest.dir
7155if mkdir conftest.dir; then
7156 cd conftest.dir
7157 cat >Imakefile <<'_ACEOF'
7158incroot:
7159 @echo incroot='${INCROOT}'
7160usrlibdir:
7161 @echo usrlibdir='${USRLIBDIR}'
7162libdir:
7163 @echo libdir='${LIBDIR}'
7164_ACEOF
7165 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
9164c0e4 7166 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
eb697db5
DN
7167 for ac_var in incroot usrlibdir libdir; do
7168 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7169 done
7170 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7171 for ac_extension in a so sl dylib la dll; do
7172 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7173 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7174 ac_im_usrlibdir=$ac_im_libdir; break
7175 fi
7176 done
7177 # Screen out bogus values from the imake configuration. They are
7178 # bogus both because they are the default anyway, and because
7179 # using them would break gcc on systems where it needs fixed includes.
7180 case $ac_im_incroot in
7181 /usr/include) ac_x_includes= ;;
7182 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7183 esac
7184 case $ac_im_usrlibdir in
7185 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
7186 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7187 esac
7188 fi
7189 cd ..
7190 rm -f -r conftest.dir
5929fbe7 7191fi
8c5ff6dd 7192
eb697db5
DN
7193# Standard set of common directories for X headers.
7194# Check X11 before X11Rn because it is often a symlink to the current release.
7195ac_x_header_dirs='
7196/usr/X11/include
7197/usr/X11R7/include
7198/usr/X11R6/include
7199/usr/X11R5/include
7200/usr/X11R4/include
7201
7202/usr/include/X11
7203/usr/include/X11R7
7204/usr/include/X11R6
7205/usr/include/X11R5
7206/usr/include/X11R4
8c5ff6dd 7207
eb697db5
DN
7208/usr/local/X11/include
7209/usr/local/X11R7/include
7210/usr/local/X11R6/include
7211/usr/local/X11R5/include
7212/usr/local/X11R4/include
8c5ff6dd 7213
eb697db5
DN
7214/usr/local/include/X11
7215/usr/local/include/X11R7
7216/usr/local/include/X11R6
7217/usr/local/include/X11R5
7218/usr/local/include/X11R4
8c5ff6dd 7219
eb697db5
DN
7220/usr/X386/include
7221/usr/x386/include
7222/usr/XFree86/include/X11
8c5ff6dd 7223
eb697db5
DN
7224/usr/include
7225/usr/local/include
7226/usr/unsupported/include
7227/usr/athena/include
7228/usr/local/x11r5/include
7229/usr/lpp/Xamples/include
8c5ff6dd 7230
eb697db5
DN
7231/usr/openwin/include
7232/usr/openwin/share/include'
8c5ff6dd 7233
eb697db5
DN
7234if test "$ac_x_includes" = no; then
7235 # Guess where to find include files, by looking for Xlib.h.
7236 # First, try using that file with no special directory specified.
7237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7238/* end confdefs.h. */
7239#include <X11/Xlib.h>
e6df49e4 7240_ACEOF
eb697db5
DN
7241if ac_fn_c_try_cpp "$LINENO"; then :
7242 # We can compile using X headers with no special include directory.
7243ac_x_includes=
7244else
7245 for ac_dir in $ac_x_header_dirs; do
7246 if test -r "$ac_dir/X11/Xlib.h"; then
7247 ac_x_includes=$ac_dir
7248 break
7249 fi
7250done
7251fi
7252rm -f conftest.err conftest.$ac_ext
7253fi # $ac_x_includes = no
49ebbd65 7254
eb697db5
DN
7255if test "$ac_x_libraries" = no; then
7256 # Check for the libraries.
7257 # See if we find them without any special options.
7258 # Don't add to $LIBS permanently.
7259 ac_save_LIBS=$LIBS
7260 LIBS="-lX11 $LIBS"
7261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7262/* end confdefs.h. */
7263#include <X11/Xlib.h>
7264int
7265main ()
7266{
7267XrmInitialize ()
7268 ;
7269 return 0;
7270}
5929fbe7 7271_ACEOF
eb697db5
DN
7272if ac_fn_c_try_link "$LINENO"; then :
7273 LIBS=$ac_save_LIBS
7274# We can link X programs with no special library path.
7275ac_x_libraries=
7276else
7277 LIBS=$ac_save_LIBS
7278for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7279do
7280 # Don't even attempt the hair of trying to link an X program!
7281 for ac_extension in a so sl dylib la dll; do
7282 if test -r "$ac_dir/libX11.$ac_extension"; then
7283 ac_x_libraries=$ac_dir
7284 break 2
7285 fi
7286 done
7287done
7288fi
7289rm -f core conftest.err conftest.$ac_objext \
7290 conftest$ac_exeext conftest.$ac_ext
7291fi # $ac_x_libraries = no
8c5ff6dd 7292
eb697db5
DN
7293case $ac_x_includes,$ac_x_libraries in #(
7294 no,* | *,no | *\'*)
7295 # Didn't find X, or a directory has "'" in its name.
7296 ac_cv_have_x="have_x=no";; #(
7297 *)
7298 # Record where we found X for the cache.
7299 ac_cv_have_x="have_x=yes\
7300 ac_x_includes='$ac_x_includes'\
7301 ac_x_libraries='$ac_x_libraries'"
5929fbe7 7302esac
eb697db5
DN
7303fi
7304;; #(
7305 *) have_x=yes;;
7306 esac
7307 eval "$ac_cv_have_x"
7308fi # $with_x != no
49ebbd65 7309
eb697db5
DN
7310if test "$have_x" != yes; then
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7312$as_echo "$have_x" >&6; }
7313 no_x=yes
7314else
7315 # If each of the values was on the command line, it overrides each guess.
7316 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7317 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7318 # Update the cache value to reflect the command line values.
7319 ac_cv_have_x="have_x=yes\
7320 ac_x_includes='$x_includes'\
7321 ac_x_libraries='$x_libraries'"
7322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7323$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
7324fi
8c5ff6dd 7325
eb697db5
DN
7326if test "$no_x" = yes; then
7327 window_system=none
7328else
7329 window_system=x11
7330fi
15e12598 7331
eb697db5
DN
7332## Workaround for bug in autoconf <= 2.62.
7333## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7334## No need to do anything special for these standard directories.
7335if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
15e12598 7336
eb697db5 7337 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
15e12598 7338
eb697db5 7339fi
91e84f96 7340
eb697db5
DN
7341LD_SWITCH_X_SITE_AUX=
7342LD_SWITCH_X_SITE_AUX_RPATH=
7343if test "${x_libraries}" != NONE; then
7344 if test -n "${x_libraries}"; then
7345 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7346 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7347 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
7348 fi
7349 x_default_search_path=""
7350 x_search_path=${x_libraries}
7351 if test -z "${x_search_path}"; then
7352 x_search_path=/usr/lib
7353 fi
7354 for x_library in `echo ${x_search_path}: | \
7355 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7356 x_search_path="\
7357${x_library}/X11/%L/%T/%N%C%S:\
7358${x_library}/X11/%l/%T/%N%C%S:\
7359${x_library}/X11/%T/%N%C%S:\
7360${x_library}/X11/%L/%T/%N%S:\
7361${x_library}/X11/%l/%T/%N%S:\
7362${x_library}/X11/%T/%N%S"
7363 if test x"${x_default_search_path}" = x; then
7364 x_default_search_path=${x_search_path}
7365 else
7366 x_default_search_path="${x_search_path}:${x_default_search_path}"
7367 fi
7368 done
7369fi
e6df49e4 7370
15e12598 7371
15e12598 7372
eb697db5
DN
7373if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7374 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
7375fi
8c5ff6dd 7376
eb697db5
DN
7377if test x"${x_includes}" = x; then
7378 bitmapdir=/usr/include/X11/bitmaps
7379else
7380 # accumulate include directories that have X11 bitmap subdirectories
7381 bmd_acc="dummyval"
7382 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7383 if test -d "${bmd}/X11/bitmaps"; then
7384 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7385 fi
7386 if test -d "${bmd}/bitmaps"; then
7387 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7388 fi
7389 done
7390 if test ${bmd_acc} != "dummyval"; then
7391 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7392 fi
7393fi
8c5ff6dd 7394
eb697db5
DN
7395HAVE_NS=no
7396NS_IMPL_COCOA=no
7397NS_IMPL_GNUSTEP=no
7398tmp_CPPFLAGS="$CPPFLAGS"
7399tmp_CFLAGS="$CFLAGS"
7400CPPFLAGS="$CPPFLAGS -x objective-c"
7401CFLAGS="$CFLAGS -x objective-c"
e6cfa7c3 7402TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
eb697db5
DN
7403if test "${with_ns}" != no; then
7404 if test "${opsys}" = darwin; then
7405 NS_IMPL_COCOA=yes
7406 ns_appdir=`pwd`/nextstep/Emacs.app/
7407 ns_appbindir=${ns_appdir}Contents/MacOS/
7408 ns_appresdir=${ns_appdir}Contents/Resources
7409 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7410 elif test -f $GNUSTEP_CONFIG_FILE; then
7411 NS_IMPL_GNUSTEP=yes
7412 ns_appdir=`pwd`/nextstep/Emacs.app/
7413 ns_appbindir=${ns_appdir}
7414 ns_appresdir=${ns_appdir}Resources
7415 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7416 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7417 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7418 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
7419 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
7420 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
7421 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
7422 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
7423 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
7424 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7425 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
eb697db5
DN
7426 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
7427 LIB_STANDARD=
7428 START_FILES=
7429 TEMACS_LDFLAGS2=
7430 fi
7431 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7432if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7433 HAVE_NS=yes
7434else
9164c0e4 7435 as_fn_error $? "\`--with-ns' was specified, but the include
eb697db5
DN
7436 files are missing or cannot be compiled." "$LINENO" 5
7437fi
8c5ff6dd
KR
7438
7439
eb697db5
DN
7440 NS_HAVE_NSINTEGER=yes
7441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7442/* end confdefs.h. */
7443#include <Foundation/NSObjCRuntime.h>
7444int
7445main ()
7446{
7447NSInteger i;
7448 ;
7449 return 0;
7450}
7451_ACEOF
7452if ac_fn_c_try_compile "$LINENO"; then :
7453 ns_have_nsinteger=yes
7454else
7455 ns_have_nsinteger=no
7456fi
7457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7458 if test $ns_have_nsinteger = no; then
7459 NS_HAVE_NSINTEGER=no
7460 fi
7461fi
15e12598 7462
15e12598 7463
eb697db5
DN
7464ns_frag=/dev/null
7465NS_OBJ=
7466NS_SUPPORT=
7467if test "${HAVE_NS}" = yes; then
7468 window_system=nextstep
7469 with_xft=no
7470 # set up packaging dirs
7471 exec_prefix=${ns_appbindir}
7472 libexecdir=${ns_appbindir}/libexec
7473 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7474 prefix=${ns_appresdir}
7475 fi
7476 ns_frag=$srcdir/src/ns.mk
7477 NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
7478 NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc"
7479fi
7480CFLAGS="$tmp_CFLAGS"
7481CPPFLAGS="$tmp_CPPFLAGS"
15e12598 7482
15e12598 7483
a4f64981 7484
8c5ff6dd
KR
7485
7486
eb697db5
DN
7487case "${window_system}" in
7488 x11 )
7489 HAVE_X_WINDOWS=yes
7490 HAVE_X11=yes
7491 case "${with_x_toolkit}" in
7492 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7493 motif ) USE_X_TOOLKIT=MOTIF ;;
7494 gtk ) with_gtk=yes
7495 USE_X_TOOLKIT=none ;;
e547b051
J
7496 gtk3 ) with_gtk3=yes
7497 USE_X_TOOLKIT=none ;;
eb697db5
DN
7498 no ) USE_X_TOOLKIT=none ;;
7499 * ) USE_X_TOOLKIT=maybe ;;
7500 esac
7501 ;;
7502 nextstep | none )
7503 HAVE_X_WINDOWS=no
7504 HAVE_X11=no
7505 USE_X_TOOLKIT=none
7506 ;;
7507esac
8c5ff6dd 7508
eb697db5
DN
7509if test "$window_system" = none && test "X$with_x" != "Xno"; then
7510 # Extract the first word of "X", so it can be a program name with args.
7511set dummy X; ac_word=$2
7512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7513$as_echo_n "checking for $ac_word... " >&6; }
7514if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
7515 $as_echo_n "(cached) " >&6
7516else
7517 if test -n "$HAVE_XSERVER"; then
7518 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
7519else
7520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7521for as_dir in $PATH
7522do
7523 IFS=$as_save_IFS
7524 test -z "$as_dir" && as_dir=.
7525 for ac_exec_ext in '' $ac_executable_extensions; do
7526 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7527 ac_cv_prog_HAVE_XSERVER="true"
7528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7529 break 2
7530 fi
7531done
7532 done
7533IFS=$as_save_IFS
8c5ff6dd 7534
eb697db5
DN
7535 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
7536fi
7537fi
7538HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7539if test -n "$HAVE_XSERVER"; then
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7541$as_echo "$HAVE_XSERVER" >&6; }
7542else
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544$as_echo "no" >&6; }
7545fi
8c5ff6dd 7546
8c5ff6dd 7547
eb697db5
DN
7548 if test "$HAVE_XSERVER" = true ||
7549 test -n "$DISPLAY" ||
7550 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9164c0e4 7551 as_fn_error $? "You seem to be running X, but no X development libraries
eb697db5
DN
7552were found. You should install the relevant development files for X
7553and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7554sure you have development files for image handling, i.e.
7555tiff, gif, jpeg, png and xpm.
7556If you are sure you want Emacs compiled without X window support, pass
7557 --without-x
7558to configure." "$LINENO" 5
7559 fi
7560fi
8c5ff6dd 7561
eb697db5
DN
7562### If we're using X11, we should use the X menu package.
7563HAVE_MENUS=no
7564case ${HAVE_X11} in
7565 yes ) HAVE_MENUS=yes ;;
7566esac
8c5ff6dd 7567
eb697db5
DN
7568# Do the opsystem or machine files prohibit the use of the GNU malloc?
7569# Assume not, until told otherwise.
7570GNU_MALLOC=yes
7571doug_lea_malloc=yes
7572ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7573if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
8c5ff6dd 7574
eb697db5
DN
7575else
7576 doug_lea_malloc=no
7577fi
8c5ff6dd 7578
eb697db5
DN
7579ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7580if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
8c5ff6dd 7581
eb697db5
DN
7582else
7583 doug_lea_malloc=no
7584fi
8c5ff6dd 7585
eb697db5
DN
7586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7587$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7588if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
7589 $as_echo_n "(cached) " >&6
7590else
7591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7592/* end confdefs.h. */
7593extern void (* __after_morecore_hook)();
7594int
7595main ()
7596{
7597__after_morecore_hook = 0
7598 ;
7599 return 0;
7600}
7601_ACEOF
7602if ac_fn_c_try_link "$LINENO"; then :
7603 emacs_cv_var___after_morecore_hook=yes
7604else
7605 emacs_cv_var___after_morecore_hook=no
7606fi
7607rm -f core conftest.err conftest.$ac_objext \
7608 conftest$ac_exeext conftest.$ac_ext
7609fi
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7611$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7612if test $emacs_cv_var___after_morecore_hook = no; then
7613 doug_lea_malloc=no
7614fi
8c5ff6dd 7615
e7586c7a
GM
7616
7617system_malloc=no
7618case "$opsys" in
7619 ## darwin ld insists on the use of malloc routines in the System framework.
7620 darwin|sol2-10) system_malloc=yes ;;
7621esac
7622
eb697db5 7623if test "${system_malloc}" = "yes"; then
e7586c7a
GM
7624
7625$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
7626
eb697db5
DN
7627 GNU_MALLOC=no
7628 GNU_MALLOC_reason="
7629 (The GNU allocators don't work with this system configuration.)"
7630 GMALLOC_OBJ=
7631 VMLIMIT_OBJ=
7632else
7633 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
7634 VMLIMIT_OBJ=vm-limit.o
7635fi
0c309b80 7636
8c5ff6dd 7637
8c5ff6dd 7638
eb697db5
DN
7639if test "$doug_lea_malloc" = "yes" ; then
7640 if test "$GNU_MALLOC" = yes ; then
7641 GNU_MALLOC_reason="
7642 (Using Doug Lea's new malloc from the GNU C Library.)"
7643 fi
8c5ff6dd 7644
eb697db5 7645$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
8c5ff6dd 7646
a4f64981 7647
eb697db5
DN
7648 ## Use mmap directly for allocating larger buffers.
7649 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
7650 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
7651 ## Does the AC_FUNC_MMAP test below make this check unecessary?
7652 case "$opsys" in
7653 gnu*) REL_ALLOC=no ;;
7654 esac
7655fi
49ebbd65 7656
eb697db5
DN
7657if test x"${REL_ALLOC}" = x; then
7658 REL_ALLOC=${GNU_MALLOC}
7659fi
8c5ff6dd 7660
e7586c7a
GM
7661use_mmap_for_buffers=no
7662case "$opsys" in
7663 freebsd|irix6-5) use_mmap_for_buffers=yes ;;
7664esac
8c5ff6dd 7665
8c5ff6dd 7666
8c5ff6dd 7667
7186fb09 7668
eb697db5
DN
7669 for ac_header in $ac_header_list
7670do :
7671 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7672ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7673"
9164c0e4 7674if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
eb697db5
DN
7675 cat >>confdefs.h <<_ACEOF
7676#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7677_ACEOF
15e12598 7678
eb697db5 7679fi
8c5ff6dd 7680
eb697db5 7681done
8c5ff6dd
KR
7682
7683
8c5ff6dd 7684
8c5ff6dd 7685
15e12598 7686
8c5ff6dd
KR
7687
7688
8c5ff6dd 7689
eb697db5
DN
7690for ac_func in getpagesize
7691do :
7692 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7693if test "x$ac_cv_func_getpagesize" = x""yes; then :
7694 cat >>confdefs.h <<_ACEOF
7695#define HAVE_GETPAGESIZE 1
7696_ACEOF
8c5ff6dd 7697
eb697db5
DN
7698fi
7699done
8c5ff6dd 7700
eb697db5
DN
7701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7702$as_echo_n "checking for working mmap... " >&6; }
7703if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7704 $as_echo_n "(cached) " >&6
7705else
7706 if test "$cross_compiling" = yes; then :
7707 ac_cv_func_mmap_fixed_mapped=no
7708else
7709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7710/* end confdefs.h. */
7711$ac_includes_default
7712/* malloc might have been renamed as rpl_malloc. */
7713#undef malloc
8c5ff6dd 7714
eb697db5
DN
7715/* Thanks to Mike Haertel and Jim Avera for this test.
7716 Here is a matrix of mmap possibilities:
7717 mmap private not fixed
7718 mmap private fixed at somewhere currently unmapped
7719 mmap private fixed at somewhere already mapped
7720 mmap shared not fixed
7721 mmap shared fixed at somewhere currently unmapped
7722 mmap shared fixed at somewhere already mapped
7723 For private mappings, we should verify that changes cannot be read()
7724 back from the file, nor mmap's back from the file at a different
7725 address. (There have been systems where private was not correctly
7726 implemented like the infamous i386 svr4.0, and systems where the
7727 VM page cache was not coherent with the file system buffer cache
7728 like early versions of FreeBSD and possibly contemporary NetBSD.)
7729 For shared mappings, we should conversely verify that changes get
7730 propagated back to all the places they're supposed to be.
8c5ff6dd 7731
eb697db5
DN
7732 Grep wants private fixed already mapped.
7733 The main things grep needs to know about mmap are:
7734 * does it exist and is it safe to write into the mmap'd area
7735 * how to use it (BSD variants) */
8c5ff6dd 7736
eb697db5
DN
7737#include <fcntl.h>
7738#include <sys/mman.h>
8c5ff6dd 7739
eb697db5
DN
7740#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7741char *malloc ();
7742#endif
8c5ff6dd 7743
eb697db5
DN
7744/* This mess was copied from the GNU getpagesize.h. */
7745#ifndef HAVE_GETPAGESIZE
7746# ifdef _SC_PAGESIZE
7747# define getpagesize() sysconf(_SC_PAGESIZE)
7748# else /* no _SC_PAGESIZE */
7749# ifdef HAVE_SYS_PARAM_H
7750# include <sys/param.h>
7751# ifdef EXEC_PAGESIZE
7752# define getpagesize() EXEC_PAGESIZE
7753# else /* no EXEC_PAGESIZE */
7754# ifdef NBPG
7755# define getpagesize() NBPG * CLSIZE
7756# ifndef CLSIZE
7757# define CLSIZE 1
7758# endif /* no CLSIZE */
7759# else /* no NBPG */
7760# ifdef NBPC
7761# define getpagesize() NBPC
7762# else /* no NBPC */
7763# ifdef PAGESIZE
7764# define getpagesize() PAGESIZE
7765# endif /* PAGESIZE */
7766# endif /* no NBPC */
7767# endif /* no NBPG */
7768# endif /* no EXEC_PAGESIZE */
7769# else /* no HAVE_SYS_PARAM_H */
7770# define getpagesize() 8192 /* punt totally */
7771# endif /* no HAVE_SYS_PARAM_H */
7772# endif /* no _SC_PAGESIZE */
8c5ff6dd 7773
eb697db5 7774#endif /* no HAVE_GETPAGESIZE */
8c5ff6dd 7775
eb697db5
DN
7776int
7777main ()
7778{
7779 char *data, *data2, *data3;
9164c0e4 7780 const char *cdata2;
eb697db5
DN
7781 int i, pagesize;
7782 int fd, fd2;
8c5ff6dd 7783
eb697db5 7784 pagesize = getpagesize ();
8c5ff6dd 7785
eb697db5
DN
7786 /* First, make a file with some known garbage in it. */
7787 data = (char *) malloc (pagesize);
7788 if (!data)
7789 return 1;
7790 for (i = 0; i < pagesize; ++i)
7791 *(data + i) = rand ();
7792 umask (0);
7793 fd = creat ("conftest.mmap", 0600);
7794 if (fd < 0)
7795 return 2;
7796 if (write (fd, data, pagesize) != pagesize)
7797 return 3;
7798 close (fd);
8c5ff6dd 7799
eb697db5
DN
7800 /* Next, check that the tail of a page is zero-filled. File must have
7801 non-zero length, otherwise we risk SIGBUS for entire page. */
7802 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7803 if (fd2 < 0)
7804 return 4;
9164c0e4
AS
7805 cdata2 = "";
7806 if (write (fd2, cdata2, 1) != 1)
eb697db5 7807 return 5;
9164c0e4 7808 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
eb697db5
DN
7809 if (data2 == MAP_FAILED)
7810 return 6;
7811 for (i = 0; i < pagesize; ++i)
7812 if (*(data2 + i))
7813 return 7;
7814 close (fd2);
7815 if (munmap (data2, pagesize))
7816 return 8;
8c5ff6dd 7817
eb697db5
DN
7818 /* Next, try to mmap the file at a fixed address which already has
7819 something else allocated at it. If we can, also make sure that
7820 we see the same garbage. */
7821 fd = open ("conftest.mmap", O_RDWR);
7822 if (fd < 0)
7823 return 9;
7824 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7825 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7826 return 10;
7827 for (i = 0; i < pagesize; ++i)
7828 if (*(data + i) != *(data2 + i))
7829 return 11;
8c5ff6dd 7830
eb697db5
DN
7831 /* Finally, make sure that changes to the mapped area do not
7832 percolate back to the file as seen by read(). (This is a bug on
7833 some variants of i386 svr4.0.) */
7834 for (i = 0; i < pagesize; ++i)
7835 *(data2 + i) = *(data2 + i) + 1;
7836 data3 = (char *) malloc (pagesize);
7837 if (!data3)
7838 return 12;
7839 if (read (fd, data3, pagesize) != pagesize)
7840 return 13;
7841 for (i = 0; i < pagesize; ++i)
7842 if (*(data + i) != *(data3 + i))
7843 return 14;
7844 close (fd);
7845 return 0;
7846}
7847_ACEOF
7848if ac_fn_c_try_run "$LINENO"; then :
7849 ac_cv_func_mmap_fixed_mapped=yes
7850else
7851 ac_cv_func_mmap_fixed_mapped=no
7852fi
7853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7854 conftest.$ac_objext conftest.beam conftest.$ac_ext
7855fi
8c5ff6dd 7856
eb697db5
DN
7857fi
7858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7859$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7860if test $ac_cv_func_mmap_fixed_mapped = yes; then
8c5ff6dd 7861
eb697db5 7862$as_echo "#define HAVE_MMAP 1" >>confdefs.h
8c5ff6dd 7863
eb697db5
DN
7864fi
7865rm -f conftest.mmap conftest.txt
8c5ff6dd 7866
eb697db5 7867if test $use_mmap_for_buffers = yes; then
e7586c7a
GM
7868
7869$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
7870
eb697db5
DN
7871 REL_ALLOC=no
7872fi
8c5ff6dd 7873
eb697db5 7874LIBS="$LIBS_SYSTEM $LIBS"
5929fbe7 7875
eb697db5
DN
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
7877$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7878if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
5929fbe7 7879 $as_echo_n "(cached) " >&6
8c5ff6dd 7880else
eb697db5
DN
7881 ac_check_lib_save_LIBS=$LIBS
7882LIBS="-ldnet $LIBS"
7883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7884/* end confdefs.h. */
8c5ff6dd 7885
5929fbe7
GM
7886/* Override any GCC internal prototype to avoid an error.
7887 Use char because int might match the return type of a GCC
7888 builtin and then its argument prototype would still apply. */
7889#ifdef __cplusplus
7890extern "C"
7891#endif
eb697db5 7892char dnet_ntoa ();
5929fbe7
GM
7893int
7894main ()
7895{
eb697db5 7896return dnet_ntoa ();
5929fbe7
GM
7897 ;
7898 return 0;
7899}
7900_ACEOF
eb697db5
DN
7901if ac_fn_c_try_link "$LINENO"; then :
7902 ac_cv_lib_dnet_dnet_ntoa=yes
5929fbe7 7903else
eb697db5 7904 ac_cv_lib_dnet_dnet_ntoa=no
5929fbe7 7905fi
eb697db5
DN
7906rm -f core conftest.err conftest.$ac_objext \
7907 conftest$ac_exeext conftest.$ac_ext
7908LIBS=$ac_check_lib_save_LIBS
5929fbe7 7909fi
eb697db5
DN
7910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7911$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7912if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
5929fbe7 7913 cat >>confdefs.h <<_ACEOF
eb697db5 7914#define HAVE_LIBDNET 1
5929fbe7 7915_ACEOF
aaa36002 7916
eb697db5 7917 LIBS="-ldnet $LIBS"
5929fbe7 7918
a4f64981 7919fi
5929fbe7 7920
a4f64981 7921
eb697db5
DN
7922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
7923$as_echo_n "checking for main in -lXbsd... " >&6; }
7924if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
5929fbe7 7925 $as_echo_n "(cached) " >&6
5929fbe7 7926else
eb697db5
DN
7927 ac_check_lib_save_LIBS=$LIBS
7928LIBS="-lXbsd $LIBS"
7929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7930/* end confdefs.h. */
a4f64981 7931
a4f64981 7932
eb697db5
DN
7933int
7934main ()
7935{
7936return main ();
7937 ;
7938 return 0;
7939}
5929fbe7 7940_ACEOF
eb697db5
DN
7941if ac_fn_c_try_link "$LINENO"; then :
7942 ac_cv_lib_Xbsd_main=yes
a4f64981 7943else
eb697db5 7944 ac_cv_lib_Xbsd_main=no
8c5ff6dd 7945fi
eb697db5
DN
7946rm -f core conftest.err conftest.$ac_objext \
7947 conftest$ac_exeext conftest.$ac_ext
7948LIBS=$ac_check_lib_save_LIBS
5929fbe7 7949fi
eb697db5
DN
7950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
7951$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
7952if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
7953 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
8c5ff6dd 7954fi
a4f64981 7955
8c5ff6dd 7956
eb697db5
DN
7957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
7958$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
7959if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
15e12598
VB
7960 $as_echo_n "(cached) " >&6
7961else
eb697db5
DN
7962 ac_check_lib_save_LIBS=$LIBS
7963LIBS="-lpthreads $LIBS"
7964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 7965/* end confdefs.h. */
e6df49e4
GM
7966
7967/* Override any GCC internal prototype to avoid an error.
7968 Use char because int might match the return type of a GCC
7969 builtin and then its argument prototype would still apply. */
7970#ifdef __cplusplus
eb697db5 7971extern "C"
5929fbe7 7972#endif
eb697db5 7973char cma_open ();
aaa36002
DN
7974int
7975main ()
7976{
eb697db5 7977return cma_open ();
aaa36002
DN
7978 ;
7979 return 0;
7980}
7186fb09 7981_ACEOF
eb697db5
DN
7982if ac_fn_c_try_link "$LINENO"; then :
7983 ac_cv_lib_pthreads_cma_open=yes
7186fb09 7984else
eb697db5 7985 ac_cv_lib_pthreads_cma_open=no
cd03c74a 7986fi
eb697db5
DN
7987rm -f core conftest.err conftest.$ac_objext \
7988 conftest$ac_exeext conftest.$ac_ext
7989LIBS=$ac_check_lib_save_LIBS
49ebbd65 7990fi
eb697db5
DN
7991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
7992$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
7993if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
5929fbe7 7994 cat >>confdefs.h <<_ACEOF
eb697db5 7995#define HAVE_LIBPTHREADS 1
5929fbe7
GM
7996_ACEOF
7997
eb697db5 7998 LIBS="-lpthreads $LIBS"
5929fbe7 7999
eb697db5 8000fi
5929fbe7
GM
8001
8002
eb697db5
DN
8003## Note: when using cpp in s/aix4.2.h, this definition depended on
8004## HAVE_LIBPTHREADS. That was not defined earlier in configure when
8005## the system file was sourced. Hence the value of LIBS_SYSTEM
8006## added to LIBS in configure would never contain the pthreads part,
8007## but the value used in Makefiles might. FIXME?
8008##
8009## -lpthreads seems to be necessary for Xlib in X11R6, and should
8010## be harmless on older versions of X where it happens to exist.
8011test "$opsys" = "aix4-2" && \
8012 test $ac_cv_lib_pthreads_cma_open = yes && \
8013 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
5929fbe7
GM
8014
8015
eb697db5
DN
8016case ${host_os} in
8017aix*)
8018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
8019$as_echo_n "checking for -bbigtoc option... " >&6; }
8020if test "${gdb_cv_bigtoc+set}" = set; then :
7186fb09 8021 $as_echo_n "(cached) " >&6
a5edbe4a 8022else
a4f64981 8023
eb697db5
DN
8024 case $GCC in
8025 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8026 *) gdb_cv_bigtoc=-bbigtoc ;;
8027 esac
a4f64981 8028
eb697db5
DN
8029 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8031/* end confdefs.h. */
8c5ff6dd 8032
eb697db5
DN
8033int
8034main ()
8035{
8036int i;
8037 ;
8038 return 0;
8039}
8040_ACEOF
8041if ac_fn_c_try_link "$LINENO"; then :
8c5ff6dd 8042
eb697db5
DN
8043else
8044 gdb_cv_bigtoc=
8045fi
8046rm -f core conftest.err conftest.$ac_objext \
8047 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 8048
eb697db5
DN
8049fi
8050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
8051$as_echo "$gdb_cv_bigtoc" >&6; }
8052 ;;
8053esac
8c5ff6dd 8054
eb697db5
DN
8055# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
8056# used for the tests that follow. We set them back to REAL_CFLAGS and
8057# REAL_CPPFLAGS later on.
8c5ff6dd 8058
e6cfa7c3 8059REAL_CFLAGS="$CFLAGS"
eb697db5 8060REAL_CPPFLAGS="$CPPFLAGS"
8c5ff6dd 8061
eb697db5
DN
8062if test "${HAVE_X11}" = "yes"; then
8063 DEFS="$C_SWITCH_X_SITE $DEFS"
8064 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
e7586c7a 8065 LIBS="-lX11 $LIBS"
eb697db5
DN
8066 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
8067 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
8c5ff6dd 8068
eb697db5
DN
8069 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
8070 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
8071 # but it's more convenient here to set LD_RUN_PATH
8072 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
8073 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8074 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
8075 export LD_RUN_PATH
8076 fi
8c5ff6dd 8077
eb697db5
DN
8078 if test "${opsys}" = "gnu-linux"; then
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
8080$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
8081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8082/* end confdefs.h. */
8c5ff6dd 8083
eb697db5
DN
8084int
8085main ()
5929fbe7 8086{
eb697db5
DN
8087XOpenDisplay ("foo");
8088 ;
8089 return 0;
5929fbe7 8090}
eb697db5
DN
8091_ACEOF
8092if ac_fn_c_try_link "$LINENO"; then :
8093 xlinux_first_failure=no
8094else
8095 xlinux_first_failure=yes
8096fi
8097rm -f core conftest.err conftest.$ac_objext \
8098 conftest$ac_exeext conftest.$ac_ext
8099 if test "${xlinux_first_failure}" = "yes"; then
8100 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
8101 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
8102 OLD_CPPFLAGS="$CPPFLAGS"
8103 OLD_LIBS="$LIBS"
8104 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
8105 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
8106 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
8107 LIBS="$LIBS -b i486-linuxaout"
8108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8109/* end confdefs.h. */
8c5ff6dd 8110
eb697db5
DN
8111int
8112main ()
5929fbe7 8113{
eb697db5
DN
8114XOpenDisplay ("foo");
8115 ;
8116 return 0;
5929fbe7 8117}
eb697db5
DN
8118_ACEOF
8119if ac_fn_c_try_link "$LINENO"; then :
8120 xlinux_second_failure=no
8121else
8122 xlinux_second_failure=yes
8123fi
8124rm -f core conftest.err conftest.$ac_objext \
8125 conftest$ac_exeext conftest.$ac_ext
8126 if test "${xlinux_second_failure}" = "yes"; then
8127 # If we get the same failure with -b, there is no use adding -b.
8128 # So take it out. This plays safe.
8129 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
8130 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
8131 CPPFLAGS="$OLD_CPPFLAGS"
8132 LIBS="$OLD_LIBS"
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8134$as_echo "no" >&6; }
8135 else
8136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8137$as_echo "yes" >&6; }
8138 fi
8139 else
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141$as_echo "no" >&6; }
8142 fi
8143 fi
8c5ff6dd 8144
eb697db5
DN
8145 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
8146 # header files included from there.
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
8148$as_echo_n "checking for Xkb... " >&6; }
8149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8150/* end confdefs.h. */
8151#include <X11/Xlib.h>
8152#include <X11/XKBlib.h>
5929fbe7
GM
8153int
8154main ()
8155{
eb697db5
DN
8156XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
8157 ;
8158 return 0;
5929fbe7
GM
8159}
8160_ACEOF
eb697db5
DN
8161if ac_fn_c_try_link "$LINENO"; then :
8162 emacs_xkb=yes
a4f64981 8163else
eb697db5 8164 emacs_xkb=no
5929fbe7 8165fi
eb697db5
DN
8166rm -f core conftest.err conftest.$ac_objext \
8167 conftest$ac_exeext conftest.$ac_ext
8168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
8169$as_echo "$emacs_xkb" >&6; }
8170 if test $emacs_xkb = yes; then
a4f64981 8171
eb697db5 8172$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
a4f64981 8173
eb697db5 8174 fi
a4f64981 8175
eb697db5
DN
8176 for ac_func in XrmSetDatabase XScreenResourceString \
8177XScreenNumberOfScreen XSetWMProtocols
8178do :
8179 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8180ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9164c0e4 8181if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
eb697db5
DN
8182 cat >>confdefs.h <<_ACEOF
8183#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5929fbe7 8184_ACEOF
a4f64981 8185
5929fbe7 8186fi
eb697db5 8187done
a4f64981 8188
eb697db5 8189fi
8c5ff6dd 8190
eb697db5
DN
8191if test "${window_system}" = "x11"; then
8192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
8193$as_echo_n "checking X11 version 6... " >&6; }
8194 if test "${emacs_cv_x11_version_6+set}" = set; then :
a4f64981
GM
8195 $as_echo_n "(cached) " >&6
8196else
eb697db5 8197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 8198/* end confdefs.h. */
eb697db5 8199#include <X11/Xlib.h>
9452ded1
DN
8200int
8201main ()
8202{
eb697db5
DN
8203#if XlibSpecificationRelease < 6
8204fail;
8205#endif
8206
9452ded1
DN
8207 ;
8208 return 0;
8209}
0c309b80 8210_ACEOF
eb697db5
DN
8211if ac_fn_c_try_link "$LINENO"; then :
8212 emacs_cv_x11_version_6=yes
7186fb09 8213else
eb697db5
DN
8214 emacs_cv_x11_version_6=no
8215fi
8216rm -f core conftest.err conftest.$ac_objext \
8217 conftest$ac_exeext conftest.$ac_ext
8218fi
8219
8220 if test $emacs_cv_x11_version_6 = yes; then
8221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8222$as_echo "6 or newer" >&6; }
8223
8224$as_echo "#define HAVE_X11R6 1" >>confdefs.h
5929fbe7 8225
a46007e9
GM
8226
8227$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
8228
8229 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
8230 ## XIM support.
8231 case "$opsys" in
8232 sol2-*) : ;;
8233 *)
8234$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
8235
8236 ;;
8237 esac
eb697db5
DN
8238 else
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8240$as_echo "before 6" >&6; }
8241 fi
aaa36002 8242fi
5929fbe7 8243
eb697db5
DN
8244
8245### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
8246HAVE_RSVG=no
8247if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
8248 if test "${with_rsvg}" != "no"; then
8249 RSVG_REQUIRED=2.11.0
8250 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
8251
8252
8253 succeeded=no
8254
8255 # Extract the first word of "pkg-config", so it can be a program name with args.
8256set dummy pkg-config; ac_word=$2
8257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8258$as_echo_n "checking for $ac_word... " >&6; }
8259if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8260 $as_echo_n "(cached) " >&6
8261else
8262 case $PKG_CONFIG in
8263 [\\/]* | ?:[\\/]*)
8264 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8265 ;;
8266 *)
8267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8268for as_dir in $PATH
8269do
8270 IFS=$as_save_IFS
8271 test -z "$as_dir" && as_dir=.
8272 for ac_exec_ext in '' $ac_executable_extensions; do
8273 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8274 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8276 break 2
8277 fi
8278done
8279 done
8280IFS=$as_save_IFS
8281
8282 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8283 ;;
8284esac
aaa36002 8285fi
eb697db5
DN
8286PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8287if test -n "$PKG_CONFIG"; then
8288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8289$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 8290else
eb697db5
DN
8291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8292$as_echo "no" >&6; }
a4f64981
GM
8293fi
8294
8c5ff6dd 8295
e6df49e4 8296
eb697db5
DN
8297 if test "$PKG_CONFIG" = "no" ; then
8298 :
8299 else
8300 PKG_CONFIG_MIN_VERSION=0.9.0
8301 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8303$as_echo_n "checking for $RSVG_MODULE... " >&6; }
8304
8305 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8307$as_echo "yes" >&6; }
8308 succeeded=yes
8309
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8311$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8312 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8314$as_echo "$RSVG_CFLAGS" >&6; }
8315
8316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8317$as_echo_n "checking RSVG_LIBS... " >&6; }
8318 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8320$as_echo "$RSVG_LIBS" >&6; }
8321 else
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8323$as_echo "no" >&6; }
8324 RSVG_CFLAGS=""
8325 RSVG_LIBS=""
8326 ## If we have a custom action on failure, don't print errors, but
8327 ## do set a variable so people can do so.
8328 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
8329
8330 fi
8331
8332
8333
8334 else
8335 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8336 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8337 fi
8338 fi
8339
8340 if test $succeeded = yes; then
8341 :
8342 else
8343 :
8344 fi
7186fb09 8345
a5edbe4a 8346
a5edbe4a 8347
91e84f96 8348
eb697db5
DN
8349 if test ".${RSVG_CFLAGS}" != "."; then
8350 HAVE_RSVG=yes
7186fb09 8351
eb697db5 8352$as_echo "#define HAVE_RSVG 1" >>confdefs.h
7186fb09 8353
eb697db5
DN
8354 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8355 LIBS="$RSVG_LIBS $LIBS"
8356 fi
8357 fi
a4f64981 8358fi
08b47d3d 8359
eb697db5
DN
8360
8361HAVE_GTK=no
e547b051
J
8362if test "${with_gtk3}" = "yes"; then
8363 GLIB_REQUIRED=2.6
8364 GTK_REQUIRED=2.90
8365 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8366
8367
8368 succeeded=no
8369
8370 # Extract the first word of "pkg-config", so it can be a program name with args.
8371set dummy pkg-config; ac_word=$2
8372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8373$as_echo_n "checking for $ac_word... " >&6; }
8374if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8375 $as_echo_n "(cached) " >&6
8376else
8377 case $PKG_CONFIG in
8378 [\\/]* | ?:[\\/]*)
8379 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8380 ;;
8381 *)
8382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8383for as_dir in $PATH
8384do
8385 IFS=$as_save_IFS
8386 test -z "$as_dir" && as_dir=.
8387 for ac_exec_ext in '' $ac_executable_extensions; do
8388 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8389 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8390 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8391 break 2
8392 fi
8393done
8394 done
8395IFS=$as_save_IFS
8396
8397 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8398 ;;
8399esac
8400fi
8401PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8402if test -n "$PKG_CONFIG"; then
8403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8404$as_echo "$PKG_CONFIG" >&6; }
8405else
8406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8407$as_echo "no" >&6; }
8408fi
8409
8410
8411
8412 if test "$PKG_CONFIG" = "no" ; then
8413 pkg_check_gtk=no
8414 else
8415 PKG_CONFIG_MIN_VERSION=0.9.0
8416 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8418$as_echo_n "checking for $GTK_MODULES... " >&6; }
8419
8420 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8422$as_echo "yes" >&6; }
8423 succeeded=yes
8424
8425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8426$as_echo_n "checking GTK_CFLAGS... " >&6; }
8427 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8429$as_echo "$GTK_CFLAGS" >&6; }
8430
8431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8432$as_echo_n "checking GTK_LIBS... " >&6; }
8433 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8435$as_echo "$GTK_LIBS" >&6; }
8436 else
8437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438$as_echo "no" >&6; }
8439 GTK_CFLAGS=""
8440 GTK_LIBS=""
8441 ## If we have a custom action on failure, don't print errors, but
8442 ## do set a variable so people can do so.
8443 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8444
8445 fi
8446
8447
8448
8449 else
8450 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8451 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8452 fi
8453 fi
8454
8455 if test $succeeded = yes; then
8456 pkg_check_gtk=yes
8457 else
8458 pkg_check_gtk=no
8459 fi
8460
8461 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
9164c0e4 8462 as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5
e547b051
J
8463 fi
8464fi
8465
8466if test "$pkg_check_gtk" != "yes"; then
8467 HAVE_GTK=no
eb697db5
DN
8468if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8469 GLIB_REQUIRED=2.6
8470 GTK_REQUIRED=2.6
8471 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
5929fbe7
GM
8472
8473
eb697db5 8474 succeeded=no
5929fbe7 8475
eb697db5
DN
8476 # Extract the first word of "pkg-config", so it can be a program name with args.
8477set dummy pkg-config; ac_word=$2
8478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8479$as_echo_n "checking for $ac_word... " >&6; }
8480if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981 8481 $as_echo_n "(cached) " >&6
a4f64981 8482else
eb697db5
DN
8483 case $PKG_CONFIG in
8484 [\\/]* | ?:[\\/]*)
8485 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8486 ;;
8487 *)
8488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8489for as_dir in $PATH
8490do
8491 IFS=$as_save_IFS
8492 test -z "$as_dir" && as_dir=.
8493 for ac_exec_ext in '' $ac_executable_extensions; do
8494 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8495 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8496 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8497 break 2
8498 fi
8499done
8500 done
8501IFS=$as_save_IFS
8c5ff6dd 8502
eb697db5
DN
8503 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8504 ;;
5929fbe7 8505esac
eb697db5
DN
8506fi
8507PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8508if test -n "$PKG_CONFIG"; then
8509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8510$as_echo "$PKG_CONFIG" >&6; }
a4f64981 8511else
eb697db5
DN
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513$as_echo "no" >&6; }
a4f64981 8514fi
5929fbe7 8515
9452ded1 8516
a4f64981 8517
eb697db5
DN
8518 if test "$PKG_CONFIG" = "no" ; then
8519 pkg_check_gtk=no
8520 else
8521 PKG_CONFIG_MIN_VERSION=0.9.0
8522 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8524$as_echo_n "checking for $GTK_MODULES... " >&6; }
a4f64981 8525
eb697db5
DN
8526 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8528$as_echo "yes" >&6; }
8529 succeeded=yes
a4f64981 8530
eb697db5
DN
8531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8532$as_echo_n "checking GTK_CFLAGS... " >&6; }
8533 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8535$as_echo "$GTK_CFLAGS" >&6; }
91e84f96 8536
eb697db5
DN
8537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8538$as_echo_n "checking GTK_LIBS... " >&6; }
8539 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8541$as_echo "$GTK_LIBS" >&6; }
8542 else
8543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8544$as_echo "no" >&6; }
8545 GTK_CFLAGS=""
8546 GTK_LIBS=""
8547 ## If we have a custom action on failure, don't print errors, but
8548 ## do set a variable so people can do so.
8549 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8732a4e9 8550
eb697db5 8551 fi
8732a4e9 8552
5929fbe7 8553
9452ded1 8554
eb697db5
DN
8555 else
8556 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8557 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8558 fi
8559 fi
8560
8561 if test $succeeded = yes; then
8562 pkg_check_gtk=yes
8563 else
8564 pkg_check_gtk=no
8565 fi
5929fbe7 8566
eb697db5 8567 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
9164c0e4 8568 as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5
eb697db5 8569 fi
8c5ff6dd 8570fi
e547b051 8571fi
8c5ff6dd 8572
eb697db5
DN
8573GTK_OBJ=
8574if test x"$pkg_check_gtk" = xyes; then
91e84f96 8575
8c5ff6dd 8576
8c5ff6dd 8577
eb697db5
DN
8578 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8579 CFLAGS="$CFLAGS $GTK_CFLAGS"
8580 LIBS="$GTK_LIBS $LIBS"
8581 GTK_COMPILES=no
8582 for ac_func in gtk_main
8583do :
8584 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8585if test "x$ac_cv_func_gtk_main" = x""yes; then :
8586 cat >>confdefs.h <<_ACEOF
8587#define HAVE_GTK_MAIN 1
8588_ACEOF
8589 GTK_COMPILES=yes
5929fbe7 8590fi
eb697db5 8591done
8c5ff6dd 8592
eb697db5
DN
8593 if test "${GTK_COMPILES}" != "yes"; then
8594 if test "$USE_X_TOOLKIT" != "maybe"; then
9164c0e4 8595 as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
eb697db5
DN
8596 fi
8597 else
8598 HAVE_GTK=yes
5929fbe7 8599
eb697db5 8600$as_echo "#define USE_GTK 1" >>confdefs.h
91e84f96 8601
eb697db5
DN
8602 GTK_OBJ=gtkutil.o
8603 USE_X_TOOLKIT=none
8604 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
8605 :
8606 else
8607 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
8608 closing open displays. This is no problem if you just use
8609 one display, but if you use more than one and close one of them
8610 Emacs may crash." >&5
8611$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
8612 closing open displays. This is no problem if you just use
8613 one display, but if you use more than one and close one of them
8614 Emacs may crash." >&2;}
8615 sleep 3
8616 fi
8617 fi
8c5ff6dd 8618
a4f64981 8619fi
08b47d3d 8620
15e12598
VB
8621
8622
eb697db5 8623if test "${HAVE_GTK}" = "yes"; then
15e12598 8624
eb697db5
DN
8625 if test "$with_toolkit_scroll_bars" != no; then
8626 with_toolkit_scroll_bars=yes
eb697db5 8627 fi
8c5ff6dd 8628
eb697db5
DN
8629 HAVE_GTK_FILE_SELECTION=no
8630 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
8631#include <gtk/gtk.h>
8632"
8633if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
8634 HAVE_GTK_FILE_SELECTION=yes
5929fbe7 8635else
eb697db5 8636 HAVE_GTK_FILE_SELECTION=no
5929fbe7 8637fi
91e84f96 8638
eb697db5
DN
8639 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
8640 for ac_func in gtk_file_selection_new
8641do :
8642 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
8643if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
5929fbe7 8644 cat >>confdefs.h <<_ACEOF
eb697db5 8645#define HAVE_GTK_FILE_SELECTION_NEW 1
5929fbe7 8646_ACEOF
8c5ff6dd 8647
8c5ff6dd 8648fi
eb697db5 8649done
5929fbe7 8650
eb697db5 8651 fi
5929fbe7 8652
e547b051 8653 HAVE_GTK_AND_PTHREAD=no
eb697db5
DN
8654 for ac_header in pthread.h
8655do :
8656 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8657if test "x$ac_cv_header_pthread_h" = x""yes; then :
8658 cat >>confdefs.h <<_ACEOF
8659#define HAVE_PTHREAD_H 1
5929fbe7
GM
8660_ACEOF
8661
eb697db5 8662fi
5929fbe7 8663
eb697db5
DN
8664done
8665
8666 if test "$ac_cv_header_pthread_h"; then
8667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
8668$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
8669if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
8c5ff6dd
KR
8670 $as_echo_n "(cached) " >&6
8671else
8672 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
8673LIBS="-lpthread $LIBS"
8674cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 8675/* end confdefs.h. */
8c5ff6dd
KR
8676
8677/* Override any GCC internal prototype to avoid an error.
8678 Use char because int might match the return type of a GCC
8679 builtin and then its argument prototype would still apply. */
8680#ifdef __cplusplus
8681extern "C"
8682#endif
eb697db5 8683char pthread_self ();
a4f64981
GM
8684int
8685main ()
8686{
eb697db5 8687return pthread_self ();
a4f64981
GM
8688 ;
8689 return 0;
8690}
8691_ACEOF
eb697db5
DN
8692if ac_fn_c_try_link "$LINENO"; then :
8693 ac_cv_lib_pthread_pthread_self=yes
a4f64981 8694else
eb697db5 8695 ac_cv_lib_pthread_pthread_self=no
8c5ff6dd 8696fi
eb697db5
DN
8697rm -f core conftest.err conftest.$ac_objext \
8698 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
8699LIBS=$ac_check_lib_save_LIBS
8700fi
eb697db5
DN
8701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
8702$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
8703if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
8704 HAVE_GTK_AND_PTHREAD=yes
8705fi
91e84f96 8706
eb697db5
DN
8707 fi
8708 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
8709 case "${canonical}" in
8710 *-hpux*) ;;
8711 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
8712 esac
91e84f96 8713
eb697db5 8714$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
cd03c74a 8715
eb697db5 8716 fi
e547b051
J
8717
8718 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
8719 gtk_dialog_get_action_area gtk_widget_get_sensitive \
8720 gtk_widget_get_mapped gtk_adjustment_get_page_size \
8721 gtk_orientable_set_orientation
8722do :
8723 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8724ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9164c0e4 8725if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
e547b051
J
8726 cat >>confdefs.h <<_ACEOF
8727#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8728_ACEOF
8729
8730fi
8731done
8732
8733
5929fbe7 8734fi
49ebbd65 8735
eb697db5
DN
8736HAVE_DBUS=no
8737DBUS_OBJ=
8738if test "${with_dbus}" = "yes"; then
15e12598 8739
eb697db5 8740 succeeded=no
a4f64981 8741
eb697db5
DN
8742 # Extract the first word of "pkg-config", so it can be a program name with args.
8743set dummy pkg-config; ac_word=$2
8744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8745$as_echo_n "checking for $ac_word... " >&6; }
8746if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
8747 $as_echo_n "(cached) " >&6
8748else
eb697db5
DN
8749 case $PKG_CONFIG in
8750 [\\/]* | ?:[\\/]*)
8751 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8752 ;;
8753 *)
8754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8755for as_dir in $PATH
8756do
8757 IFS=$as_save_IFS
8758 test -z "$as_dir" && as_dir=.
8759 for ac_exec_ext in '' $ac_executable_extensions; do
8760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8761 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8763 break 2
8764 fi
8765done
8766 done
8767IFS=$as_save_IFS
8768
8769 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8770 ;;
a4f64981 8771esac
eb697db5
DN
8772fi
8773PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8774if test -n "$PKG_CONFIG"; then
8775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8776$as_echo "$PKG_CONFIG" >&6; }
91e84f96 8777else
eb697db5
DN
8778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8779$as_echo "no" >&6; }
5929fbe7 8780fi
a4f64981 8781
49ebbd65 8782
eb697db5
DN
8783
8784 if test "$PKG_CONFIG" = "no" ; then
8785 HAVE_DBUS=no
8786 else
8787 PKG_CONFIG_MIN_VERSION=0.9.0
8788 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
8790$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
8791
8792 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8794$as_echo "yes" >&6; }
8795 succeeded=yes
8796
8797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
8798$as_echo_n "checking DBUS_CFLAGS... " >&6; }
8799 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
8801$as_echo "$DBUS_CFLAGS" >&6; }
8802
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
8804$as_echo_n "checking DBUS_LIBS... " >&6; }
8805 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
8807$as_echo "$DBUS_LIBS" >&6; }
8808 else
8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8810$as_echo "no" >&6; }
8811 DBUS_CFLAGS=""
8812 DBUS_LIBS=""
8813 ## If we have a custom action on failure, don't print errors, but
8814 ## do set a variable so people can do so.
8815 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
8816
8817 fi
8818
8819
8820
8821 else
8822 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8823 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8824 fi
8825 fi
8826
8827 if test $succeeded = yes; then
8828 HAVE_DBUS=yes
8829 else
8830 HAVE_DBUS=no
8831 fi
8832
8833 if test "$HAVE_DBUS" = yes; then
8834 LIBS="$LIBS $DBUS_LIBS"
8835
8836$as_echo "#define HAVE_DBUS 1" >>confdefs.h
8837
8838 for ac_func in dbus_watch_get_unix_fd
8839do :
8840 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
8841if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
8842 cat >>confdefs.h <<_ACEOF
8843#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
5929fbe7 8844_ACEOF
eb697db5
DN
8845
8846fi
8847done
8848
8849 DBUS_OBJ=dbusbind.o
8850 fi
8851fi
8852
8853
8854HAVE_GCONF=no
8855if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
8856
8857 succeeded=no
8858
8859 # Extract the first word of "pkg-config", so it can be a program name with args.
8860set dummy pkg-config; ac_word=$2
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8862$as_echo_n "checking for $ac_word... " >&6; }
8863if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8864 $as_echo_n "(cached) " >&6
8865else
8866 case $PKG_CONFIG in
8867 [\\/]* | ?:[\\/]*)
8868 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8869 ;;
8870 *)
8871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8872for as_dir in $PATH
8873do
8874 IFS=$as_save_IFS
8875 test -z "$as_dir" && as_dir=.
8876 for ac_exec_ext in '' $ac_executable_extensions; do
8877 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8878 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8880 break 2
8881 fi
8882done
8883 done
8884IFS=$as_save_IFS
8885
8886 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8887 ;;
5929fbe7 8888esac
eb697db5
DN
8889fi
8890PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8891if test -n "$PKG_CONFIG"; then
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8893$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 8894else
eb697db5
DN
8895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8896$as_echo "no" >&6; }
8897fi
8898
8899
8900
8901 if test "$PKG_CONFIG" = "no" ; then
8902 HAVE_GCONF=no
8903 else
8904 PKG_CONFIG_MIN_VERSION=0.9.0
8905 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
8907$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
8908
8909 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
8910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8911$as_echo "yes" >&6; }
8912 succeeded=yes
8913
8914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
8915$as_echo_n "checking GCONF_CFLAGS... " >&6; }
8916 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
8918$as_echo "$GCONF_CFLAGS" >&6; }
8919
8920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
8921$as_echo_n "checking GCONF_LIBS... " >&6; }
8922 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
8924$as_echo "$GCONF_LIBS" >&6; }
8925 else
8926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8927$as_echo "no" >&6; }
8928 GCONF_CFLAGS=""
8929 GCONF_LIBS=""
8930 ## If we have a custom action on failure, don't print errors, but
8931 ## do set a variable so people can do so.
8932 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
cd03c74a 8933
eb697db5 8934 fi
49ebbd65 8935
e6df49e4 8936
49ebbd65 8937
eb697db5
DN
8938 else
8939 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8940 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8941 fi
8942 fi
cd03c74a 8943
eb697db5
DN
8944 if test $succeeded = yes; then
8945 HAVE_GCONF=yes
8946 else
8947 HAVE_GCONF=no
8948 fi
49ebbd65 8949
eb697db5 8950 if test "$HAVE_GCONF" = yes; then
a4f64981 8951
eb697db5 8952$as_echo "#define HAVE_GCONF 1" >>confdefs.h
8c5ff6dd 8953
eb697db5
DN
8954 fi
8955fi
8956
8957HAVE_LIBSELINUX=no
8958LIBSELINUX_LIBS=
8959if test "${with_selinux}" = "yes"; then
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
8961$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
8962if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
15e12598 8963 $as_echo_n "(cached) " >&6
49ebbd65 8964else
eb697db5
DN
8965 ac_check_lib_save_LIBS=$LIBS
8966LIBS="-lselinux $LIBS"
8967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8968/* end confdefs.h. */
15e12598
VB
8969
8970/* Override any GCC internal prototype to avoid an error.
8971 Use char because int might match the return type of a GCC
8972 builtin and then its argument prototype would still apply. */
8973#ifdef __cplusplus
8974extern "C"
8975#endif
eb697db5 8976char lgetfilecon ();
91e84f96
GM
8977int
8978main ()
8979{
eb697db5 8980return lgetfilecon ();
91e84f96
GM
8981 ;
8982 return 0;
8983}
8984_ACEOF
eb697db5
DN
8985if ac_fn_c_try_link "$LINENO"; then :
8986 ac_cv_lib_selinux_lgetfilecon=yes
91e84f96 8987else
eb697db5 8988 ac_cv_lib_selinux_lgetfilecon=no
a4f64981 8989fi
eb697db5
DN
8990rm -f core conftest.err conftest.$ac_objext \
8991 conftest$ac_exeext conftest.$ac_ext
8992LIBS=$ac_check_lib_save_LIBS
15e12598 8993fi
eb697db5
DN
8994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
8995$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
8996if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
8997 HAVE_LIBSELINUX=yes
8998else
8999 HAVE_LIBSELINUX=no
5929fbe7 9000fi
a4f64981 9001
eb697db5 9002 if test "$HAVE_LIBSELINUX" = yes; then
15e12598 9003
eb697db5 9004$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
e6df49e4 9005
eb697db5
DN
9006 LIBSELINUX_LIBS=-lselinux
9007 fi
5929fbe7 9008fi
e6df49e4 9009
eb697db5
DN
9010
9011HAVE_XAW3D=no
9012LUCID_LIBW=
9013if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
9014 if test "$with_xaw3d" != no; then
9015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
9016$as_echo_n "checking for xaw3d... " >&6; }
9017 if test "${emacs_cv_xaw3d+set}" = set; then :
a4f64981
GM
9018 $as_echo_n "(cached) " >&6
9019else
eb697db5 9020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9021/* end confdefs.h. */
5929fbe7 9022
eb697db5
DN
9023#include <X11/Intrinsic.h>
9024#include <X11/Xaw3d/Simple.h>
9025int
9026main ()
9027{
5929fbe7 9028
eb697db5
DN
9029 ;
9030 return 0;
9031}
5929fbe7 9032_ACEOF
eb697db5
DN
9033if ac_fn_c_try_link "$LINENO"; then :
9034 emacs_cv_xaw3d=yes
a4f64981 9035else
eb697db5 9036 emacs_cv_xaw3d=no
a4f64981 9037fi
eb697db5
DN
9038rm -f core conftest.err conftest.$ac_objext \
9039 conftest$ac_exeext conftest.$ac_ext
5929fbe7 9040fi
8c5ff6dd 9041
eb697db5
DN
9042 else
9043 emacs_cv_xaw3d=no
9044 fi
9045 if test $emacs_cv_xaw3d = yes; then
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9047$as_echo "yes; using Lucid toolkit" >&6; }
9048 USE_X_TOOLKIT=LUCID
9049 HAVE_XAW3D=yes
9050 LUCID_LIBW=-lXaw3d
8c5ff6dd 9051
eb697db5 9052$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
5929fbe7 9053
eb697db5
DN
9054 else
9055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9056$as_echo "no" >&6; }
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
9058$as_echo_n "checking for libXaw... " >&6; }
9059 if test "${emacs_cv_xaw+set}" = set; then :
5929fbe7 9060 $as_echo_n "(cached) " >&6
5929fbe7 9061else
eb697db5 9062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9063/* end confdefs.h. */
5929fbe7 9064
eb697db5
DN
9065#include <X11/Intrinsic.h>
9066#include <X11/Xaw/Simple.h>
9067int
9068main ()
9069{
5929fbe7 9070
eb697db5
DN
9071 ;
9072 return 0;
9073}
5929fbe7 9074_ACEOF
eb697db5
DN
9075if ac_fn_c_try_link "$LINENO"; then :
9076 emacs_cv_xaw=yes
5929fbe7 9077else
eb697db5
DN
9078 emacs_cv_xaw=no
9079fi
9080rm -f core conftest.err conftest.$ac_objext \
9081 conftest$ac_exeext conftest.$ac_ext
9082fi
5929fbe7 9083
eb697db5
DN
9084 if test $emacs_cv_xaw = yes; then
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9086$as_echo "yes; using Lucid toolkit" >&6; }
9087 USE_X_TOOLKIT=LUCID
9088 LUCID_LIBW=-lXaw
9089 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
9164c0e4 9090 as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
eb697db5
DN
9091 else
9092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
9093$as_echo "no; do not use toolkit by default" >&6; }
9094 USE_X_TOOLKIT=none
9095 fi
9096 fi
5929fbe7 9097fi
8c5ff6dd 9098
eb697db5 9099X_TOOLKIT_TYPE=$USE_X_TOOLKIT
a4f64981 9100
eb697db5
DN
9101LIBXTR6=
9102if test "${USE_X_TOOLKIT}" != "none"; then
9103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
9104$as_echo_n "checking X11 toolkit version... " >&6; }
9105 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
9106 $as_echo_n "(cached) " >&6
9107else
9108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9109/* end confdefs.h. */
9110#include <X11/Intrinsic.h>
9111int
9112main ()
9113{
9114#if XtSpecificationRelease < 6
9115fail;
9116#endif
aaa36002 9117
eb697db5
DN
9118 ;
9119 return 0;
9120}
9121_ACEOF
9122if ac_fn_c_try_link "$LINENO"; then :
9123 emacs_cv_x11_toolkit_version_6=yes
5929fbe7 9124else
eb697db5 9125 emacs_cv_x11_toolkit_version_6=no
5929fbe7 9126fi
eb697db5
DN
9127rm -f core conftest.err conftest.$ac_objext \
9128 conftest$ac_exeext conftest.$ac_ext
5929fbe7 9129fi
15e12598 9130
eb697db5
DN
9131 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
9132 if test $emacs_cv_x11_toolkit_version_6 = yes; then
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
9134$as_echo "6 or newer" >&6; }
15e12598 9135
eb697db5 9136$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
15e12598 9137
eb697db5
DN
9138 LIBXTR6="-lSM -lICE"
9139 case "$opsys" in
9140 ## Use libw.a along with X11R6 Xt.
9141 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
9142 esac
9143 else
9144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
9145$as_echo "before 6" >&6; }
9146 fi
5929fbe7 9147
eb697db5
DN
9148 OLDLIBS="$LIBS"
9149 if test x$HAVE_X11XTR6 = xyes; then
9150 LIBS="-lXt -lSM -lICE $LIBS"
9151 else
9152 LIBS="-lXt $LIBS"
9153 fi
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
9155$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
9156if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
5929fbe7 9157 $as_echo_n "(cached) " >&6
5929fbe7 9158else
eb697db5
DN
9159 ac_check_lib_save_LIBS=$LIBS
9160LIBS="-lXmu $LIBS"
9161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9162/* end confdefs.h. */
eb697db5
DN
9163
9164/* Override any GCC internal prototype to avoid an error.
9165 Use char because int might match the return type of a GCC
9166 builtin and then its argument prototype would still apply. */
9167#ifdef __cplusplus
9168extern "C"
9169#endif
9170char XmuConvertStandardSelection ();
9171int
9172main ()
9173{
9174return XmuConvertStandardSelection ();
9175 ;
9176 return 0;
9177}
5929fbe7 9178_ACEOF
eb697db5
DN
9179if ac_fn_c_try_link "$LINENO"; then :
9180 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
5929fbe7 9181else
eb697db5 9182 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
8c5ff6dd 9183fi
eb697db5
DN
9184rm -f core conftest.err conftest.$ac_objext \
9185 conftest$ac_exeext conftest.$ac_ext
9186LIBS=$ac_check_lib_save_LIBS
9187fi
9188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
9189$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
9190if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
9191 cat >>confdefs.h <<_ACEOF
9192#define HAVE_LIBXMU 1
5929fbe7 9193_ACEOF
a4f64981 9194
eb697db5
DN
9195 LIBS="-lXmu $LIBS"
9196
5929fbe7 9197fi
a4f64981 9198
eb697db5
DN
9199 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
9200fi
a4f64981 9201
a4f64981 9202
eb697db5
DN
9203LIBXMU=-lXmu
9204case "$machine" in
9205 ## These machines don't supply Xmu.
9206 hpux* | aix4-2 )
9207 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
5929fbe7
GM
9208 ;;
9209esac
eb697db5
DN
9210
9211
9212# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
9213if test "${HAVE_X11}" = "yes"; then
9214 if test "${USE_X_TOOLKIT}" != "none"; then
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
9216$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
9217if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
5929fbe7
GM
9218 $as_echo_n "(cached) " >&6
9219else
eb697db5
DN
9220 ac_check_lib_save_LIBS=$LIBS
9221LIBS="-lXext $LIBS"
9222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9223/* end confdefs.h. */
49ebbd65 9224
eb697db5
DN
9225/* Override any GCC internal prototype to avoid an error.
9226 Use char because int might match the return type of a GCC
9227 builtin and then its argument prototype would still apply. */
9228#ifdef __cplusplus
9229extern "C"
9230#endif
9231char XShapeQueryExtension ();
9232int
9233main ()
9234{
9235return XShapeQueryExtension ();
9236 ;
9237 return 0;
9238}
9239_ACEOF
9240if ac_fn_c_try_link "$LINENO"; then :
9241 ac_cv_lib_Xext_XShapeQueryExtension=yes
9242else
9243 ac_cv_lib_Xext_XShapeQueryExtension=no
9244fi
9245rm -f core conftest.err conftest.$ac_objext \
9246 conftest$ac_exeext conftest.$ac_ext
9247LIBS=$ac_check_lib_save_LIBS
5929fbe7 9248fi
eb697db5
DN
9249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
9250$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
9251if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
5929fbe7 9252 cat >>confdefs.h <<_ACEOF
eb697db5 9253#define HAVE_LIBXEXT 1
5929fbe7 9254_ACEOF
15e12598 9255
eb697db5 9256 LIBS="-lXext $LIBS"
a4f64981 9257
5929fbe7 9258fi
8c5ff6dd 9259
eb697db5
DN
9260 fi
9261fi
8c5ff6dd 9262
eb697db5
DN
9263LIBXP=
9264if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
9266$as_echo_n "checking for Motif version 2.1... " >&6; }
9267if test "${emacs_cv_motif_version_2_1+set}" = set; then :
91e84f96
GM
9268 $as_echo_n "(cached) " >&6
9269else
eb697db5 9270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9271/* end confdefs.h. */
eb697db5
DN
9272#include <Xm/Xm.h>
9273int
9274main ()
9275{
9276#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
9277int x = 5;
9278#else
9279Motif version prior to 2.1.
9280#endif
9281 ;
9282 return 0;
9283}
91e84f96 9284_ACEOF
eb697db5
DN
9285if ac_fn_c_try_compile "$LINENO"; then :
9286 emacs_cv_motif_version_2_1=yes
91e84f96 9287else
eb697db5 9288 emacs_cv_motif_version_2_1=no
91e84f96 9289fi
5929fbe7 9290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9291fi
9292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
9293$as_echo "$emacs_cv_motif_version_2_1" >&6; }
9294 if test $emacs_cv_motif_version_2_1 = yes; then
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
9296$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
9297if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
9298 $as_echo_n "(cached) " >&6
9299else
9300 ac_check_lib_save_LIBS=$LIBS
9301LIBS="-lXp $LIBS"
9302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9303/* end confdefs.h. */
a4f64981 9304
eb697db5
DN
9305/* Override any GCC internal prototype to avoid an error.
9306 Use char because int might match the return type of a GCC
9307 builtin and then its argument prototype would still apply. */
9308#ifdef __cplusplus
9309extern "C"
9310#endif
9311char XpCreateContext ();
9312int
9313main ()
9314{
9315return XpCreateContext ();
9316 ;
9317 return 0;
9318}
5929fbe7 9319_ACEOF
eb697db5
DN
9320if ac_fn_c_try_link "$LINENO"; then :
9321 ac_cv_lib_Xp_XpCreateContext=yes
9322else
9323 ac_cv_lib_Xp_XpCreateContext=no
9324fi
9325rm -f core conftest.err conftest.$ac_objext \
9326 conftest$ac_exeext conftest.$ac_ext
9327LIBS=$ac_check_lib_save_LIBS
9328fi
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
9330$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
9331if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
9332 LIBXP=-lXp
9333fi
9334
9335 else
9336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
9337$as_echo_n "checking for LessTif where some systems put it... " >&6; }
9338if test "${emacs_cv_lesstif+set}" = set; then :
9339 $as_echo_n "(cached) " >&6
9340else
9341 # We put this in CFLAGS temporarily to precede other -I options
9342 # that might be in CFLAGS temporarily.
9343 # We put this in CPPFLAGS where it precedes the other -I options.
9344 OLD_CPPFLAGS=$CPPFLAGS
9345 OLD_CFLAGS=$CFLAGS
9346 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
9347 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
9348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9349/* end confdefs.h. */
eb697db5
DN
9350#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
9351int
9352main ()
9353{
9354int x = 5;
9355 ;
9356 return 0;
9357}
a4f64981 9358_ACEOF
eb697db5
DN
9359if ac_fn_c_try_compile "$LINENO"; then :
9360 emacs_cv_lesstif=yes
8c5ff6dd 9361else
eb697db5
DN
9362 emacs_cv_lesstif=no
9363fi
9364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9365fi
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
9367$as_echo "$emacs_cv_lesstif" >&6; }
9368 if test $emacs_cv_lesstif = yes; then
9369 # Make sure this -I option remains in CPPFLAGS after it is set
9370 # back to REAL_CPPFLAGS.
9371 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
9372 # have those other -I options anyway. Ultimately, having this
9373 # directory ultimately in CPPFLAGS will be enough.
9374 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
9375 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
9376 else
9377 CFLAGS=$OLD_CFLAGS
9378 CPPFLAGS=$OLD_CPPFLAGS
9379 fi
9380 fi
5929fbe7 9381fi
cd03c74a 9382
49ebbd65 9383
eb697db5
DN
9384USE_TOOLKIT_SCROLL_BARS=no
9385if test "${with_toolkit_scroll_bars}" != "no"; then
9386 if test "${USE_X_TOOLKIT}" != "none"; then
9387 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9388 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9389
eb697db5
DN
9390 HAVE_XAW3D=no
9391 USE_TOOLKIT_SCROLL_BARS=yes
9392 elif test "${HAVE_XAW3D}" = "yes"; then
9393 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9394
9395 USE_TOOLKIT_SCROLL_BARS=yes
9396 fi
9397 elif test "${HAVE_GTK}" = "yes"; then
9398 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9399
9400 USE_TOOLKIT_SCROLL_BARS=yes
9401 elif test "${HAVE_NS}" = "yes"; then
9402 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9403
eb697db5
DN
9404 USE_TOOLKIT_SCROLL_BARS=yes
9405 fi
5929fbe7 9406fi
eb697db5
DN
9407
9408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9409/* end confdefs.h. */
91e84f96 9410
eb697db5
DN
9411 #include <X11/Xlib.h>
9412 #include <X11/Xresource.h>
91e84f96
GM
9413int
9414main ()
9415{
eb697db5 9416XIMProc callback;
91e84f96
GM
9417 ;
9418 return 0;
9419}
9420_ACEOF
eb697db5
DN
9421if ac_fn_c_try_compile "$LINENO"; then :
9422 HAVE_XIM=yes
9423
9424$as_echo "#define HAVE_XIM 1" >>confdefs.h
9425
5929fbe7 9426else
eb697db5
DN
9427 HAVE_XIM=no
9428fi
9429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929fbe7 9430
eb697db5
DN
9431
9432if test "${with_xim}" != "no"; then
9433
9434$as_echo "#define USE_XIM 1" >>confdefs.h
9435
9436fi
9437
9438
9439if test "${HAVE_XIM}" != "no"; then
9440 late_CFLAGS=$CFLAGS
9441 if test "$GCC" = yes; then
9442 CFLAGS="$CFLAGS --pedantic-errors"
9443 fi
9444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9445/* end confdefs.h. */
5929fbe7 9446
eb697db5
DN
9447#include <X11/Xlib.h>
9448#include <X11/Xresource.h>
5929fbe7
GM
9449int
9450main ()
9451{
eb697db5
DN
9452Display *display;
9453XrmDatabase db;
9454char *res_name;
9455char *res_class;
9456XIMProc callback;
9457XPointer *client_data;
9458#ifndef __GNUC__
9459/* If we're not using GCC, it's probably not XFree86, and this is
9460 probably right, but we can't use something like --pedantic-errors. */
9461extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9462 char*, XIMProc, XPointer*);
9463#endif
9464(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9465 client_data);
5929fbe7
GM
9466 ;
9467 return 0;
9468}
9469_ACEOF
eb697db5
DN
9470if ac_fn_c_try_compile "$LINENO"; then :
9471 emacs_cv_arg6_star=yes
5929fbe7 9472fi
5929fbe7 9473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9474 if test "$emacs_cv_arg6_star" = yes; then
9475 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
5929fbe7 9476
eb697db5
DN
9477 else
9478 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
9479
9480 fi
9481 CFLAGS=$late_CFLAGS
8c5ff6dd 9482fi
5929fbe7 9483
eb697db5
DN
9484### Start of font-backend (under any platform) section.
9485# (nothing here yet -- this is a placeholder)
9486### End of font-backend (under any platform) section.
5929fbe7 9487
eb697db5
DN
9488### Start of font-backend (under X11) section.
9489if test "${HAVE_X11}" = "yes"; then
5929fbe7 9490
eb697db5
DN
9491 succeeded=no
9492
9493 # Extract the first word of "pkg-config", so it can be a program name with args.
9494set dummy pkg-config; ac_word=$2
9495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9496$as_echo_n "checking for $ac_word... " >&6; }
9497if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9498 $as_echo_n "(cached) " >&6
9499else
9500 case $PKG_CONFIG in
9501 [\\/]* | ?:[\\/]*)
9502 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9503 ;;
9504 *)
9505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9506for as_dir in $PATH
9507do
9508 IFS=$as_save_IFS
9509 test -z "$as_dir" && as_dir=.
9510 for ac_exec_ext in '' $ac_executable_extensions; do
9511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9512 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9514 break 2
9515 fi
9516done
9517 done
9518IFS=$as_save_IFS
5929fbe7 9519
eb697db5
DN
9520 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9521 ;;
9522esac
9523fi
9524PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9525if test -n "$PKG_CONFIG"; then
9526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9527$as_echo "$PKG_CONFIG" >&6; }
9528else
9529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9530$as_echo "no" >&6; }
8c5ff6dd 9531fi
91e84f96 9532
5929fbe7 9533
91e84f96 9534
eb697db5
DN
9535 if test "$PKG_CONFIG" = "no" ; then
9536 HAVE_FC=no
9537 else
9538 PKG_CONFIG_MIN_VERSION=0.9.0
9539 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
9541$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
8c5ff6dd 9542
eb697db5
DN
9543 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
9544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9545$as_echo "yes" >&6; }
9546 succeeded=yes
8c5ff6dd 9547
eb697db5
DN
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
9549$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
9550 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
9552$as_echo "$FONTCONFIG_CFLAGS" >&6; }
8c5ff6dd 9553
eb697db5
DN
9554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
9555$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
9556 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
9558$as_echo "$FONTCONFIG_LIBS" >&6; }
9559 else
9560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
9562 FONTCONFIG_CFLAGS=""
9563 FONTCONFIG_LIBS=""
9564 ## If we have a custom action on failure, don't print errors, but
9565 ## do set a variable so people can do so.
9566 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
9567
9568 fi
9569
9570
9571
9572 else
9573 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9574 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9575 fi
9576 fi
9577
9578 if test $succeeded = yes; then
9579 HAVE_FC=yes
9580 else
9581 HAVE_FC=no
9582 fi
9583
9584
9585 ## Use -lXft if available, unless `--with-xft=no'.
9586 HAVE_XFT=maybe
9587 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
9588 with_xft="no";
9589 fi
9590 if test "x${with_xft}" != "xno"; then
9591
9592
9593 succeeded=no
9594
9595 # Extract the first word of "pkg-config", so it can be a program name with args.
9596set dummy pkg-config; ac_word=$2
9597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9598$as_echo_n "checking for $ac_word... " >&6; }
9599if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
9600 $as_echo_n "(cached) " >&6
9601else
eb697db5
DN
9602 case $PKG_CONFIG in
9603 [\\/]* | ?:[\\/]*)
9604 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9605 ;;
9606 *)
9607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9608for as_dir in $PATH
9609do
9610 IFS=$as_save_IFS
9611 test -z "$as_dir" && as_dir=.
9612 for ac_exec_ext in '' $ac_executable_extensions; do
9613 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9614 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9616 break 2
9617 fi
9618done
9619 done
9620IFS=$as_save_IFS
9621
9622 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9623 ;;
9624esac
9625fi
9626PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9627if test -n "$PKG_CONFIG"; then
9628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9629$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 9630else
eb697db5
DN
9631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9632$as_echo "no" >&6; }
15e12598 9633fi
8c5ff6dd 9634
8c5ff6dd 9635
15e12598 9636
eb697db5
DN
9637 if test "$PKG_CONFIG" = "no" ; then
9638 HAVE_XFT=no
9639 else
9640 PKG_CONFIG_MIN_VERSION=0.9.0
9641 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
9643$as_echo_n "checking for xft >= 0.13.0... " >&6; }
9644
9645 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9647$as_echo "yes" >&6; }
9648 succeeded=yes
9649
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
9651$as_echo_n "checking XFT_CFLAGS... " >&6; }
9652 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
9654$as_echo "$XFT_CFLAGS" >&6; }
9655
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
9657$as_echo_n "checking XFT_LIBS... " >&6; }
9658 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
9660$as_echo "$XFT_LIBS" >&6; }
9661 else
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9663$as_echo "no" >&6; }
9664 XFT_CFLAGS=""
9665 XFT_LIBS=""
9666 ## If we have a custom action on failure, don't print errors, but
9667 ## do set a variable so people can do so.
9668 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
8c5ff6dd 9669
eb697db5 9670 fi
8c5ff6dd 9671
5929fbe7
GM
9672
9673
eb697db5
DN
9674 else
9675 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9676 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9677 fi
9678 fi
5929fbe7 9679
eb697db5
DN
9680 if test $succeeded = yes; then
9681 :
9682 else
9683 HAVE_XFT=no
9684 fi
9685
9686 ## Because xftfont.c uses XRenderQueryExtension, we also
9687 ## need to link to -lXrender.
9688 HAVE_XRENDER=no
9689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
9690$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
9691if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
e6df49e4
GM
9692 $as_echo_n "(cached) " >&6
9693else
eb697db5
DN
9694 ac_check_lib_save_LIBS=$LIBS
9695LIBS="-lXrender $LIBS"
9696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 9697/* end confdefs.h. */
eb697db5
DN
9698
9699/* Override any GCC internal prototype to avoid an error.
9700 Use char because int might match the return type of a GCC
9701 builtin and then its argument prototype would still apply. */
9702#ifdef __cplusplus
9703extern "C"
9704#endif
9705char XRenderQueryExtension ();
5929fbe7
GM
9706int
9707main ()
9708{
eb697db5 9709return XRenderQueryExtension ();
5929fbe7
GM
9710 ;
9711 return 0;
9712}
9713_ACEOF
eb697db5
DN
9714if ac_fn_c_try_link "$LINENO"; then :
9715 ac_cv_lib_Xrender_XRenderQueryExtension=yes
5929fbe7 9716else
eb697db5
DN
9717 ac_cv_lib_Xrender_XRenderQueryExtension=no
9718fi
9719rm -f core conftest.err conftest.$ac_objext \
9720 conftest$ac_exeext conftest.$ac_ext
9721LIBS=$ac_check_lib_save_LIBS
9722fi
9723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
9724$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
9725if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
9726 HAVE_XRENDER=yes
5929fbe7
GM
9727fi
9728
eb697db5
DN
9729 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
9730 OLD_CPPFLAGS="$CPPFLAGS"
9731 OLD_CFLAGS="$CFLAGS"
9732 OLD_LIBS="$LIBS"
9733 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
9734 CFLAGS="$CFLAGS $XFT_CFLAGS"
9735 XFT_LIBS="-lXrender $XFT_LIBS"
9736 LIBS="$XFT_LIBS $LIBS"
9737 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
9738if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
9739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
9740$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
9741if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
9742 $as_echo_n "(cached) " >&6
9743else
9744 ac_check_lib_save_LIBS=$LIBS
9745LIBS="-lXft $XFT_LIBS $LIBS"
9746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9747/* end confdefs.h. */
eb697db5
DN
9748
9749/* Override any GCC internal prototype to avoid an error.
9750 Use char because int might match the return type of a GCC
9751 builtin and then its argument prototype would still apply. */
9752#ifdef __cplusplus
9753extern "C"
9754#endif
9755char XftFontOpen ();
e6df49e4
GM
9756int
9757main ()
8c5ff6dd 9758{
eb697db5 9759return XftFontOpen ();
8c5ff6dd
KR
9760 ;
9761 return 0;
9762}
9763_ACEOF
eb697db5
DN
9764if ac_fn_c_try_link "$LINENO"; then :
9765 ac_cv_lib_Xft_XftFontOpen=yes
e6df49e4 9766else
eb697db5 9767 ac_cv_lib_Xft_XftFontOpen=no
15e12598 9768fi
eb697db5
DN
9769rm -f core conftest.err conftest.$ac_objext \
9770 conftest$ac_exeext conftest.$ac_ext
9771LIBS=$ac_check_lib_save_LIBS
15e12598 9772fi
eb697db5
DN
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
9774$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
9775if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
9776 HAVE_XFT=yes
15e12598 9777fi
91e84f96 9778
eb697db5 9779fi
8c5ff6dd 9780
5929fbe7
GM
9781
9782
eb697db5 9783 if test "${HAVE_XFT}" = "yes"; then
5929fbe7 9784
eb697db5 9785$as_echo "#define HAVE_XFT 1" >>confdefs.h
5929fbe7
GM
9786
9787
eb697db5
DN
9788 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
9789 else
9790 CPPFLAGS="$OLD_CPPFLAGS"
9791 CFLAGS="$OLD_CFLAGS"
9792 LIBS="$OLD_LIBS"
9793 fi # "${HAVE_XFT}" = "yes"
9794 fi # "$HAVE_XFT" != no
9795 fi # "x${with_xft}" != "xno"
5929fbe7 9796
eb697db5
DN
9797 if test "$HAVE_XFT" != "yes"; then
9798 HAVE_XFT=no
9799 fi
5929fbe7
GM
9800
9801
eb697db5
DN
9802 HAVE_FREETYPE=no
9803 ## We used to allow building with FreeType and without Xft.
9804 ## However, the ftx font backend driver is not in good shape.
9805 if test "${HAVE_XFT}" = "yes"; then
9806 HAVE_FREETYPE=yes
9807 FONTCONFIG_CFLAGS=
9808 FONTCONFIG_LIBS=
9809 fi
5929fbe7 9810
eb697db5
DN
9811 HAVE_LIBOTF=no
9812 if test "${HAVE_FREETYPE}" = "yes"; then
5929fbe7 9813
eb697db5 9814$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
5929fbe7 9815
eb697db5 9816 if test "${with_libotf}" != "no"; then
5929fbe7 9817
eb697db5 9818 succeeded=no
5929fbe7 9819
eb697db5
DN
9820 # Extract the first word of "pkg-config", so it can be a program name with args.
9821set dummy pkg-config; ac_word=$2
9822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9823$as_echo_n "checking for $ac_word... " >&6; }
9824if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981
GM
9825 $as_echo_n "(cached) " >&6
9826else
eb697db5
DN
9827 case $PKG_CONFIG in
9828 [\\/]* | ?:[\\/]*)
9829 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9830 ;;
9831 *)
9832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9833for as_dir in $PATH
9834do
9835 IFS=$as_save_IFS
9836 test -z "$as_dir" && as_dir=.
9837 for ac_exec_ext in '' $ac_executable_extensions; do
9838 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9839 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9841 break 2
9842 fi
9843done
9844 done
9845IFS=$as_save_IFS
9846
9847 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9848 ;;
5929fbe7 9849esac
eb697db5
DN
9850fi
9851PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9852if test -n "$PKG_CONFIG"; then
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9854$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 9855else
eb697db5
DN
9856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9857$as_echo "no" >&6; }
5929fbe7
GM
9858fi
9859
5929fbe7 9860
91e84f96 9861
eb697db5
DN
9862 if test "$PKG_CONFIG" = "no" ; then
9863 HAVE_LIBOTF=no
9864 else
9865 PKG_CONFIG_MIN_VERSION=0.9.0
9866 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
9868$as_echo_n "checking for libotf... " >&6; }
91e84f96 9869
eb697db5
DN
9870 if $PKG_CONFIG --exists "libotf" 2>&5; then
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9872$as_echo "yes" >&6; }
9873 succeeded=yes
91e84f96 9874
eb697db5
DN
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
9876$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
9877 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
9879$as_echo "$LIBOTF_CFLAGS" >&6; }
8c5ff6dd 9880
eb697db5
DN
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
9882$as_echo_n "checking LIBOTF_LIBS... " >&6; }
9883 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
9885$as_echo "$LIBOTF_LIBS" >&6; }
9886 else
9887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889 LIBOTF_CFLAGS=""
9890 LIBOTF_LIBS=""
9891 ## If we have a custom action on failure, don't print errors, but
9892 ## do set a variable so people can do so.
9893 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
5929fbe7 9894
eb697db5 9895 fi
15e12598 9896
15e12598
VB
9897
9898
eb697db5
DN
9899 else
9900 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9901 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9902 fi
9903 fi
8c5ff6dd 9904
eb697db5
DN
9905 if test $succeeded = yes; then
9906 HAVE_LIBOTF=yes
9907 else
9908 HAVE_LIBOTF=no
9909 fi
5929fbe7 9910
eb697db5 9911 if test "$HAVE_LIBOTF" = "yes"; then
5929fbe7 9912
eb697db5 9913$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
5929fbe7 9914
eb697db5
DN
9915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
9916$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
9917if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
9918 $as_echo_n "(cached) " >&6
9919else
9920 ac_check_lib_save_LIBS=$LIBS
9921LIBS="-lotf $LIBS"
9922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9923/* end confdefs.h. */
91e84f96
GM
9924
9925/* Override any GCC internal prototype to avoid an error.
9926 Use char because int might match the return type of a GCC
9927 builtin and then its argument prototype would still apply. */
9928#ifdef __cplusplus
9929extern "C"
9930#endif
eb697db5 9931char OTF_get_variation_glyphs ();
91e84f96 9932int
49ebbd65
DN
9933main ()
9934{
eb697db5 9935return OTF_get_variation_glyphs ();
49ebbd65
DN
9936 ;
9937 return 0;
9938}
15e12598 9939_ACEOF
eb697db5
DN
9940if ac_fn_c_try_link "$LINENO"; then :
9941 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
a4f64981 9942else
eb697db5 9943 ac_cv_lib_otf_OTF_get_variation_glyphs=no
8c5ff6dd 9944fi
eb697db5
DN
9945rm -f core conftest.err conftest.$ac_objext \
9946 conftest$ac_exeext conftest.$ac_ext
9947LIBS=$ac_check_lib_save_LIBS
5929fbe7 9948fi
eb697db5
DN
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
9950$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
9951if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
9952 HAVE_OTF_GET_VARIATION_GLYPHS=yes
5929fbe7 9953else
eb697db5 9954 HAVE_OTF_GET_VARIATION_GLYPHS=no
5929fbe7 9955fi
8c5ff6dd 9956
eb697db5 9957 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
5929fbe7 9958
eb697db5 9959$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
a4f64981 9960
eb697db5
DN
9961 fi
9962 fi
9963 fi
9964 fi
a4f64981 9965
eb697db5
DN
9966 HAVE_M17N_FLT=no
9967 if test "${HAVE_LIBOTF}" = yes; then
9968 if test "${with_m17n_flt}" != "no"; then
a4f64981 9969
eb697db5 9970 succeeded=no
a4f64981 9971
eb697db5
DN
9972 # Extract the first word of "pkg-config", so it can be a program name with args.
9973set dummy pkg-config; ac_word=$2
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975$as_echo_n "checking for $ac_word... " >&6; }
9976if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
9977 $as_echo_n "(cached) " >&6
9978else
eb697db5
DN
9979 case $PKG_CONFIG in
9980 [\\/]* | ?:[\\/]*)
9981 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9982 ;;
9983 *)
9984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9985for as_dir in $PATH
9986do
9987 IFS=$as_save_IFS
9988 test -z "$as_dir" && as_dir=.
9989 for ac_exec_ext in '' $ac_executable_extensions; do
9990 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9991 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9993 break 2
9994 fi
9995done
9996 done
9997IFS=$as_save_IFS
5929fbe7 9998
eb697db5
DN
9999 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10000 ;;
5929fbe7 10001esac
5929fbe7 10002fi
eb697db5
DN
10003PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10004if test -n "$PKG_CONFIG"; then
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10006$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 10007else
eb697db5
DN
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10009$as_echo "no" >&6; }
8c5ff6dd
KR
10010fi
10011
5929fbe7 10012
5929fbe7 10013
eb697db5
DN
10014 if test "$PKG_CONFIG" = "no" ; then
10015 HAVE_M17N_FLT=no
10016 else
10017 PKG_CONFIG_MIN_VERSION=0.9.0
10018 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
10020$as_echo_n "checking for m17n-flt... " >&6; }
10021
10022 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10024$as_echo "yes" >&6; }
10025 succeeded=yes
10026
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
10028$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
10029 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
10030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
10031$as_echo "$M17N_FLT_CFLAGS" >&6; }
10032
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
10034$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
10035 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
10037$as_echo "$M17N_FLT_LIBS" >&6; }
10038 else
10039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
10041 M17N_FLT_CFLAGS=""
10042 M17N_FLT_LIBS=""
10043 ## If we have a custom action on failure, don't print errors, but
10044 ## do set a variable so people can do so.
10045 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
10046
10047 fi
10048
5929fbe7 10049
15e12598 10050
eb697db5
DN
10051 else
10052 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10053 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10054 fi
10055 fi
15e12598 10056
eb697db5
DN
10057 if test $succeeded = yes; then
10058 HAVE_M17N_FLT=yes
10059 else
10060 HAVE_M17N_FLT=no
5929fbe7 10061 fi
15e12598 10062
eb697db5 10063 if test "$HAVE_M17N_FLT" = "yes"; then
5929fbe7 10064
eb697db5 10065$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
5929fbe7 10066
eb697db5
DN
10067 fi
10068 fi
10069 fi
10070else
10071 HAVE_XFT=no
10072 HAVE_FREETYPE=no
10073 HAVE_LIBOTF=no
10074 HAVE_M17N_FLT=no
10075fi
5929fbe7 10076
eb697db5 10077### End of font-backend (under X11) section.
5929fbe7 10078
5929fbe7 10079
5929fbe7
GM
10080
10081
10082
5929fbe7 10083
5929fbe7
GM
10084
10085
10086
10087
eb697db5
DN
10088### Use -lXpm if available, unless `--with-xpm=no'.
10089HAVE_XPM=no
10090LIBXPM=
10091if test "${HAVE_X11}" = "yes"; then
10092 if test "${with_xpm}" != "no"; then
10093 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
10094if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
10095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
10096$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
10097if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
8c5ff6dd
KR
10098 $as_echo_n "(cached) " >&6
10099else
eb697db5
DN
10100 ac_check_lib_save_LIBS=$LIBS
10101LIBS="-lXpm -lX11 $LIBS"
10102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10103/* end confdefs.h. */
eb697db5
DN
10104
10105/* Override any GCC internal prototype to avoid an error.
10106 Use char because int might match the return type of a GCC
10107 builtin and then its argument prototype would still apply. */
10108#ifdef __cplusplus
10109extern "C"
10110#endif
10111char XpmReadFileToPixmap ();
7186fb09
GM
10112int
10113main ()
10114{
eb697db5 10115return XpmReadFileToPixmap ();
a4f64981
GM
10116 ;
10117 return 0;
7186fb09 10118}
0c309b80 10119_ACEOF
eb697db5
DN
10120if ac_fn_c_try_link "$LINENO"; then :
10121 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
aaa36002 10122else
eb697db5
DN
10123 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
10124fi
10125rm -f core conftest.err conftest.$ac_objext \
10126 conftest$ac_exeext conftest.$ac_ext
10127LIBS=$ac_check_lib_save_LIBS
10128fi
10129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
10130$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
10131if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
10132 HAVE_XPM=yes
10133fi
5929fbe7 10134
8c5ff6dd 10135fi
5929fbe7 10136
5929fbe7 10137
eb697db5
DN
10138 if test "${HAVE_XPM}" = "yes"; then
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
10140$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
10141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10142/* end confdefs.h. */
10143#include "X11/xpm.h"
10144#ifndef XpmReturnAllocPixels
10145no_return_alloc_pixels
10146#endif
8c5ff6dd 10147
5929fbe7 10148_ACEOF
eb697db5
DN
10149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10150 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
10151 HAVE_XPM=no
10152else
10153 HAVE_XPM=yes
15e12598 10154fi
eb697db5 10155rm -f conftest*
8c5ff6dd 10156
5929fbe7 10157
eb697db5
DN
10158 if test "${HAVE_XPM}" = "yes"; then
10159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10160$as_echo "yes" >&6; }
10161 else
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10163$as_echo "no" >&6; }
10164 fi
10165 fi
10166 fi
5929fbe7 10167
eb697db5 10168 if test "${HAVE_XPM}" = "yes"; then
5929fbe7 10169
eb697db5 10170$as_echo "#define HAVE_XPM 1" >>confdefs.h
5929fbe7 10171
eb697db5
DN
10172 LIBXPM=-lXpm
10173 fi
10174fi
5929fbe7 10175
eb697db5
DN
10176
10177### Use -ljpeg if available, unless `--with-jpeg=no'.
10178HAVE_JPEG=no
10179LIBJPEG=
10180if test "${HAVE_X11}" = "yes"; then
10181 if test "${with_jpeg}" != "no"; then
10182 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
10183if test "x$ac_cv_header_jerror_h" = x""yes; then :
10184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
10185$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
10186if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
10187 $as_echo_n "(cached) " >&6
10188else
10189 ac_check_lib_save_LIBS=$LIBS
10190LIBS="-ljpeg $LIBS"
10191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10192/* end confdefs.h. */
5929fbe7
GM
10193
10194/* Override any GCC internal prototype to avoid an error.
10195 Use char because int might match the return type of a GCC
10196 builtin and then its argument prototype would still apply. */
10197#ifdef __cplusplus
10198extern "C"
10199#endif
eb697db5 10200char jpeg_destroy_compress ();
08b47d3d
JD
10201int
10202main ()
10203{
eb697db5 10204return jpeg_destroy_compress ();
08b47d3d
JD
10205 ;
10206 return 0;
10207}
7186fb09 10208_ACEOF
eb697db5
DN
10209if ac_fn_c_try_link "$LINENO"; then :
10210 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
cd03c74a 10211else
eb697db5
DN
10212 ac_cv_lib_jpeg_jpeg_destroy_compress=no
10213fi
10214rm -f core conftest.err conftest.$ac_objext \
10215 conftest$ac_exeext conftest.$ac_ext
10216LIBS=$ac_check_lib_save_LIBS
10217fi
10218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
10219$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
10220if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
10221 HAVE_JPEG=yes
10222fi
10223
10224fi
10225
10226
10227 fi
10228
10229 if test "${HAVE_JPEG}" = "yes"; then
10230 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
10231
10232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10233/* end confdefs.h. */
10234#include <jpeglib.h>
10235 version=JPEG_LIB_VERSION
10236
10237_ACEOF
10238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10239 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
10240 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
8c5ff6dd 10241
eb697db5
DN
10242else
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
10244$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
10245 HAVE_JPEG=no
5929fbe7 10246fi
eb697db5 10247rm -f conftest*
8c5ff6dd 10248
eb697db5
DN
10249 fi
10250 if test "${HAVE_JPEG}" = "yes"; then
10251 LIBJPEG=-ljpeg
10252 fi
5929fbe7 10253fi
eb697db5
DN
10254
10255
10256### Use -lpng if available, unless `--with-png=no'.
10257HAVE_PNG=no
10258LIBPNG=
10259if test "${HAVE_X11}" = "yes"; then
10260 if test "${with_png}" != "no"; then
10261 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
10262 # in /usr/include/libpng.
10263 for ac_header in png.h libpng/png.h
10264do :
10265 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10266ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9164c0e4 10267if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5929fbe7 10268 cat >>confdefs.h <<_ACEOF
eb697db5 10269#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5929fbe7 10270_ACEOF
8c5ff6dd 10271
eb697db5
DN
10272fi
10273
10274done
10275
10276 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
10278$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
10279if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
a5edbe4a
GM
10280 $as_echo_n "(cached) " >&6
10281else
5929fbe7 10282 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10283LIBS="-lpng -lz -lm $LIBS"
10284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10285/* end confdefs.h. */
8c5ff6dd 10286
5929fbe7
GM
10287/* Override any GCC internal prototype to avoid an error.
10288 Use char because int might match the return type of a GCC
10289 builtin and then its argument prototype would still apply. */
10290#ifdef __cplusplus
10291extern "C"
10292#endif
eb697db5 10293char png_get_channels ();
5929fbe7
GM
10294int
10295main ()
10296{
eb697db5 10297return png_get_channels ();
5929fbe7
GM
10298 ;
10299 return 0;
10300}
8c5ff6dd 10301_ACEOF
eb697db5
DN
10302if ac_fn_c_try_link "$LINENO"; then :
10303 ac_cv_lib_png_png_get_channels=yes
8c5ff6dd 10304else
eb697db5
DN
10305 ac_cv_lib_png_png_get_channels=no
10306fi
10307rm -f core conftest.err conftest.$ac_objext \
10308 conftest$ac_exeext conftest.$ac_ext
10309LIBS=$ac_check_lib_save_LIBS
10310fi
10311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
10312$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
10313if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
10314 HAVE_PNG=yes
8c5ff6dd 10315fi
5929fbe7 10316
eb697db5
DN
10317 fi
10318 fi
10319
10320 if test "${HAVE_PNG}" = "yes"; then
8c5ff6dd 10321
eb697db5 10322$as_echo "#define HAVE_PNG 1" >>confdefs.h
8c5ff6dd 10323
eb697db5
DN
10324 LIBPNG="-lpng -lz -lm"
10325 fi
8c5ff6dd
KR
10326fi
10327
5929fbe7 10328
eb697db5
DN
10329### Use -ltiff if available, unless `--with-tiff=no'.
10330HAVE_TIFF=no
10331LIBTIFF=
10332if test "${HAVE_X11}" = "yes"; then
10333 if test "${with_tiff}" != "no"; then
10334 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
10335if test "x$ac_cv_header_tiffio_h" = x""yes; then :
10336 tifflibs="-lz -lm"
10337 # At least one tiff package requires the jpeg library.
10338 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
10340$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
10341if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
8c5ff6dd
KR
10342 $as_echo_n "(cached) " >&6
10343else
eb697db5
DN
10344 ac_check_lib_save_LIBS=$LIBS
10345LIBS="-ltiff $tifflibs $LIBS"
10346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a5edbe4a 10347/* end confdefs.h. */
5929fbe7
GM
10348
10349/* Override any GCC internal prototype to avoid an error.
10350 Use char because int might match the return type of a GCC
10351 builtin and then its argument prototype would still apply. */
10352#ifdef __cplusplus
10353extern "C"
10354#endif
eb697db5 10355char TIFFGetVersion ();
a5edbe4a
GM
10356int
10357main ()
10358{
eb697db5 10359return TIFFGetVersion ();
5929fbe7
GM
10360 ;
10361 return 0;
a5edbe4a 10362}
08b47d3d 10363_ACEOF
eb697db5
DN
10364if ac_fn_c_try_link "$LINENO"; then :
10365 ac_cv_lib_tiff_TIFFGetVersion=yes
49ebbd65 10366else
eb697db5 10367 ac_cv_lib_tiff_TIFFGetVersion=no
8c5ff6dd 10368fi
eb697db5
DN
10369rm -f core conftest.err conftest.$ac_objext \
10370 conftest$ac_exeext conftest.$ac_ext
10371LIBS=$ac_check_lib_save_LIBS
10372fi
10373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
10374$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
10375if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
10376 HAVE_TIFF=yes
49ebbd65 10377fi
8c5ff6dd 10378
49ebbd65 10379fi
8c5ff6dd
KR
10380
10381
eb697db5 10382 fi
8c5ff6dd 10383
eb697db5 10384 if test "${HAVE_TIFF}" = "yes"; then
5929fbe7 10385
eb697db5
DN
10386$as_echo "#define HAVE_TIFF 1" >>confdefs.h
10387
10388 LIBTIFF=-ltiff
10389 fi
10390fi
5929fbe7 10391
5929fbe7 10392
eb697db5
DN
10393### Use -lgif or -lungif if available, unless `--with-gif=no'.
10394HAVE_GIF=no
10395LIBGIF=
10396if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
10397 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
10398if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
10399 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10400# Earlier versions can crash Emacs.
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
10402$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
10403if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
10404 $as_echo_n "(cached) " >&6
10405else
10406 ac_check_lib_save_LIBS=$LIBS
10407LIBS="-lgif $LIBS"
10408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10409/* end confdefs.h. */
cd03c74a 10410
e6df49e4
GM
10411/* Override any GCC internal prototype to avoid an error.
10412 Use char because int might match the return type of a GCC
10413 builtin and then its argument prototype would still apply. */
10414#ifdef __cplusplus
10415extern "C"
10416#endif
eb697db5 10417char EGifPutExtensionLast ();
e6df49e4
GM
10418int
10419main ()
10420{
eb697db5 10421return EGifPutExtensionLast ();
e6df49e4
GM
10422 ;
10423 return 0;
10424}
a5edbe4a 10425_ACEOF
eb697db5
DN
10426if ac_fn_c_try_link "$LINENO"; then :
10427 ac_cv_lib_gif_EGifPutExtensionLast=yes
15e12598 10428else
eb697db5 10429 ac_cv_lib_gif_EGifPutExtensionLast=no
15e12598 10430fi
eb697db5
DN
10431rm -f core conftest.err conftest.$ac_objext \
10432 conftest$ac_exeext conftest.$ac_ext
10433LIBS=$ac_check_lib_save_LIBS
10434fi
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
10436$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
10437if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
10438 HAVE_GIF=yes
10439else
10440 HAVE_GIF=maybe
15e12598 10441fi
15e12598 10442
8c5ff6dd 10443fi
49ebbd65 10444
49ebbd65 10445
eb697db5
DN
10446
10447 if test "$HAVE_GIF" = yes; then
10448 LIBGIF=-lgif
10449 elif test "$HAVE_GIF" = maybe; then
10450# If gif_lib.h but no libgif, try libungif.
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10452$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10453if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
8c5ff6dd
KR
10454 $as_echo_n "(cached) " >&6
10455else
eb697db5
DN
10456 ac_check_lib_save_LIBS=$LIBS
10457LIBS="-lungif $LIBS"
10458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10459/* end confdefs.h. */
15e12598 10460
a4f64981
GM
10461/* Override any GCC internal prototype to avoid an error.
10462 Use char because int might match the return type of a GCC
10463 builtin and then its argument prototype would still apply. */
10464#ifdef __cplusplus
10465extern "C"
10466#endif
eb697db5 10467char EGifPutExtensionLast ();
a4f64981
GM
10468int
10469main ()
10470{
eb697db5 10471return EGifPutExtensionLast ();
a4f64981
GM
10472 ;
10473 return 0;
10474}
e6df49e4 10475_ACEOF
eb697db5
DN
10476if ac_fn_c_try_link "$LINENO"; then :
10477 ac_cv_lib_ungif_EGifPutExtensionLast=yes
a4f64981 10478else
eb697db5 10479 ac_cv_lib_ungif_EGifPutExtensionLast=no
e6df49e4 10480fi
eb697db5
DN
10481rm -f core conftest.err conftest.$ac_objext \
10482 conftest$ac_exeext conftest.$ac_ext
10483LIBS=$ac_check_lib_save_LIBS
a4f64981 10484fi
eb697db5
DN
10485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10486$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10487if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10488 HAVE_GIF=yes
e6df49e4 10489else
eb697db5 10490 HAVE_GIF=no
5929fbe7 10491fi
8c5ff6dd 10492
eb697db5
DN
10493 test "$HAVE_GIF" = yes && LIBGIF=-lungif
10494 fi
5929fbe7 10495
eb697db5 10496 if test "${HAVE_GIF}" = "yes"; then
5929fbe7 10497
eb697db5 10498$as_echo "#define HAVE_GIF 1" >>confdefs.h
5929fbe7 10499
eb697db5
DN
10500 fi
10501fi
5929fbe7 10502
5929fbe7 10503
eb697db5
DN
10504if test "${HAVE_X11}" = "yes"; then
10505 MISSING=""
10506 WITH_NO=""
10507 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
10508 MISSING="libXpm" && WITH_NO="--with-xpm=no"
10509 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
10510 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
10511 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
10512 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
10513 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
10514 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
10515 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
10516 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
10517
10518 if test "X${MISSING}" != X; then
9164c0e4 10519 as_fn_error $? "The following required libraries were not found:
eb697db5
DN
10520 $MISSING
10521Maybe some development libraries/packages are missing?
10522If you don't want to link with them give
10523 $WITH_NO
10524as options to configure" "$LINENO" 5
10525 fi
10526fi
5929fbe7 10527
eb697db5
DN
10528### Use -lgpm if available, unless `--with-gpm=no'.
10529HAVE_GPM=no
10530LIBGPM=
10531MOUSE_SUPPORT=
10532if test "${with_gpm}" != "no"; then
10533 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
10534if test "x$ac_cv_header_gpm_h" = x""yes; then :
10535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
10536$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
10537if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
a4f64981 10538 $as_echo_n "(cached) " >&6
15e12598 10539else
eb697db5
DN
10540 ac_check_lib_save_LIBS=$LIBS
10541LIBS="-lgpm $LIBS"
10542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 10543/* end confdefs.h. */
eb697db5
DN
10544
10545/* Override any GCC internal prototype to avoid an error.
10546 Use char because int might match the return type of a GCC
10547 builtin and then its argument prototype would still apply. */
10548#ifdef __cplusplus
10549extern "C"
10550#endif
10551char Gpm_Open ();
a4f64981
GM
10552int
10553main ()
15e12598 10554{
eb697db5 10555return Gpm_Open ();
a4f64981
GM
10556 ;
10557 return 0;
15e12598 10558}
a4f64981 10559_ACEOF
eb697db5
DN
10560if ac_fn_c_try_link "$LINENO"; then :
10561 ac_cv_lib_gpm_Gpm_Open=yes
a4f64981 10562else
eb697db5
DN
10563 ac_cv_lib_gpm_Gpm_Open=no
10564fi
10565rm -f core conftest.err conftest.$ac_objext \
10566 conftest$ac_exeext conftest.$ac_ext
10567LIBS=$ac_check_lib_save_LIBS
10568fi
10569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10570$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
10571if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
10572 HAVE_GPM=yes
10573fi
5929fbe7 10574
a4f64981 10575fi
5929fbe7 10576
eb697db5
DN
10577
10578
10579 if test "${HAVE_GPM}" = "yes"; then
10580
10581$as_echo "#define HAVE_GPM 1" >>confdefs.h
10582
10583 LIBGPM=-lgpm
10584 ## May be reset below.
10585 MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
10586 fi
a4f64981 10587fi
15e12598 10588
8c5ff6dd 10589
eb697db5
DN
10590ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
10591if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
8c5ff6dd 10592
eb697db5 10593$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
8c5ff6dd 10594
eb697db5 10595fi
298b8a34 10596
15e12598 10597
15e12598 10598
eb697db5
DN
10599C_SWITCH_X_SYSTEM=
10600### Use NeXTstep API to implement GUI.
10601if test "${HAVE_NS}" = "yes"; then
8c5ff6dd 10602
eb697db5 10603$as_echo "#define HAVE_NS 1" >>confdefs.h
8c5ff6dd 10604
eb697db5 10605 if test "${NS_IMPL_COCOA}" = "yes"; then
5929fbe7 10606
eb697db5 10607$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
8c5ff6dd 10608
eb697db5
DN
10609 GNU_OBJC_CFLAGS=
10610 fi
10611 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
8c5ff6dd 10612
eb697db5 10613$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
8c5ff6dd 10614
eb697db5
DN
10615 # See also .m.o rule in Makefile.in */
10616 # FIXME: are all these flags really needed? Document here why. */
10617 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
10618 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
10619 fi
10620 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
8c5ff6dd 10621
eb697db5 10622$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
8c5ff6dd 10623
eb697db5
DN
10624 fi
10625 # We also have mouse menus.
10626 HAVE_MENUS=yes
10627 OTHER_FILES=ns-app
10628fi
8c5ff6dd 10629
8c5ff6dd 10630
eb697db5
DN
10631### Use session management (-lSM -lICE) if available
10632HAVE_X_SM=no
10633LIBXSM=
10634if test "${HAVE_X11}" = "yes"; then
10635 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10636if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
10637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
10638$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
10639if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
10640 $as_echo_n "(cached) " >&6
10641else
10642 ac_check_lib_save_LIBS=$LIBS
10643LIBS="-lSM -lICE $LIBS"
10644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10645/* end confdefs.h. */
eb697db5
DN
10646
10647/* Override any GCC internal prototype to avoid an error.
10648 Use char because int might match the return type of a GCC
10649 builtin and then its argument prototype would still apply. */
10650#ifdef __cplusplus
10651extern "C"
10652#endif
10653char SmcOpenConnection ();
5929fbe7
GM
10654int
10655main ()
10656{
eb697db5 10657return SmcOpenConnection ();
5929fbe7
GM
10658 ;
10659 return 0;
10660}
10661_ACEOF
eb697db5
DN
10662if ac_fn_c_try_link "$LINENO"; then :
10663 ac_cv_lib_SM_SmcOpenConnection=yes
5929fbe7 10664else
eb697db5
DN
10665 ac_cv_lib_SM_SmcOpenConnection=no
10666fi
10667rm -f core conftest.err conftest.$ac_objext \
10668 conftest$ac_exeext conftest.$ac_ext
10669LIBS=$ac_check_lib_save_LIBS
10670fi
10671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
10672$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
10673if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
10674 HAVE_X_SM=yes
10675fi
8c5ff6dd 10676
5929fbe7 10677fi
8c5ff6dd 10678
eb697db5
DN
10679
10680
10681 if test "${HAVE_X_SM}" = "yes"; then
10682
10683$as_echo "#define HAVE_X_SM 1" >>confdefs.h
10684
10685 LIBXSM="-lSM -lICE"
10686 case "$LIBS" in
10687 *-lSM*) ;;
10688 *) LIBS="$LIBXSM $LIBS" ;;
10689 esac
10690 fi
10691fi
10692
10693
10694# If netdb.h doesn't declare h_errno, we must declare it by hand.
10695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
10696$as_echo_n "checking whether netdb declares h_errno... " >&6; }
10697if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
10698 $as_echo_n "(cached) " >&6
10699else
10700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10701/* end confdefs.h. */
eb697db5 10702#include <netdb.h>
5929fbe7
GM
10703int
10704main ()
10705{
eb697db5 10706return h_errno;
5929fbe7
GM
10707 ;
10708 return 0;
10709}
10710_ACEOF
eb697db5
DN
10711if ac_fn_c_try_link "$LINENO"; then :
10712 emacs_cv_netdb_declares_h_errno=yes
5929fbe7 10713else
eb697db5 10714 emacs_cv_netdb_declares_h_errno=no
5929fbe7 10715fi
eb697db5
DN
10716rm -f core conftest.err conftest.$ac_objext \
10717 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 10718fi
eb697db5
DN
10719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
10720$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
10721if test $emacs_cv_netdb_declares_h_errno = yes; then
8c5ff6dd 10722
eb697db5 10723$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
8c5ff6dd
KR
10724
10725fi
10726
eb697db5
DN
10727# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10728# for constant arguments. Useless!
10729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10730$as_echo_n "checking for working alloca.h... " >&6; }
10731if test "${ac_cv_working_alloca_h+set}" = set; then :
5929fbe7
GM
10732 $as_echo_n "(cached) " >&6
10733else
eb697db5 10734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10735/* end confdefs.h. */
eb697db5
DN
10736#include <alloca.h>
10737int
10738main ()
10739{
10740char *p = (char *) alloca (2 * sizeof (int));
10741 if (p) return 0;
10742 ;
10743 return 0;
10744}
10745_ACEOF
10746if ac_fn_c_try_link "$LINENO"; then :
10747 ac_cv_working_alloca_h=yes
10748else
10749 ac_cv_working_alloca_h=no
10750fi
10751rm -f core conftest.err conftest.$ac_objext \
10752 conftest$ac_exeext conftest.$ac_ext
10753fi
10754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10755$as_echo "$ac_cv_working_alloca_h" >&6; }
10756if test $ac_cv_working_alloca_h = yes; then
10757
10758$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10759
10760fi
10761
10762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10763$as_echo_n "checking for alloca... " >&6; }
10764if test "${ac_cv_func_alloca_works+set}" = set; then :
10765 $as_echo_n "(cached) " >&6
10766else
10767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10768/* end confdefs.h. */
10769#ifdef __GNUC__
10770# define alloca __builtin_alloca
10771#else
10772# ifdef _MSC_VER
10773# include <malloc.h>
10774# define alloca _alloca
10775# else
10776# ifdef HAVE_ALLOCA_H
10777# include <alloca.h>
10778# else
10779# ifdef _AIX
10780 #pragma alloca
10781# else
10782# ifndef alloca /* predefined by HP cc +Olibcalls */
10783char *alloca ();
10784# endif
10785# endif
10786# endif
10787# endif
5929fbe7 10788#endif
8c5ff6dd 10789
5929fbe7
GM
10790int
10791main ()
10792{
eb697db5
DN
10793char *p = (char *) alloca (1);
10794 if (p) return 0;
5929fbe7
GM
10795 ;
10796 return 0;
10797}
8c5ff6dd 10798_ACEOF
eb697db5
DN
10799if ac_fn_c_try_link "$LINENO"; then :
10800 ac_cv_func_alloca_works=yes
5929fbe7 10801else
eb697db5 10802 ac_cv_func_alloca_works=no
8c5ff6dd 10803fi
eb697db5
DN
10804rm -f core conftest.err conftest.$ac_objext \
10805 conftest$ac_exeext conftest.$ac_ext
5929fbe7 10806fi
eb697db5
DN
10807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10808$as_echo "$ac_cv_func_alloca_works" >&6; }
10809
10810if test $ac_cv_func_alloca_works = yes; then
10811
10812$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10813
8c5ff6dd 10814else
eb697db5
DN
10815 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10816# that cause trouble. Some versions do not even contain alloca or
10817# contain a buggy version. If you still want to use their alloca,
10818# use ar to extract alloca.o from them instead of compiling alloca.c.
10819
10820ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10821
10822$as_echo "#define C_ALLOCA 1" >>confdefs.h
10823
10824
10825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10826$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10827if test "${ac_cv_os_cray+set}" = set; then :
5929fbe7 10828 $as_echo_n "(cached) " >&6
8c5ff6dd 10829else
eb697db5 10830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10831/* end confdefs.h. */
eb697db5
DN
10832#if defined CRAY && ! defined CRAY2
10833webecray
8c5ff6dd 10834#else
eb697db5 10835wenotbecray
8c5ff6dd
KR
10836#endif
10837
eb697db5
DN
10838_ACEOF
10839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10840 $EGREP "webecray" >/dev/null 2>&1; then :
10841 ac_cv_os_cray=yes
10842else
10843 ac_cv_os_cray=no
10844fi
10845rm -f conftest*
8c5ff6dd 10846
eb697db5
DN
10847fi
10848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10849$as_echo "$ac_cv_os_cray" >&6; }
10850if test $ac_cv_os_cray = yes; then
10851 for ac_func in _getb67 GETB67 getb67; do
10852 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10853ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9164c0e4 10854if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15e12598 10855
eb697db5
DN
10856cat >>confdefs.h <<_ACEOF
10857#define CRAY_STACKSEG_END $ac_func
5929fbe7 10858_ACEOF
15e12598 10859
eb697db5 10860 break
5929fbe7 10861fi
15e12598 10862
eb697db5 10863 done
5929fbe7 10864fi
eb697db5
DN
10865
10866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10867$as_echo_n "checking stack direction for C alloca... " >&6; }
10868if test "${ac_cv_c_stack_direction+set}" = set; then :
5929fbe7
GM
10869 $as_echo_n "(cached) " >&6
10870else
eb697db5
DN
10871 if test "$cross_compiling" = yes; then :
10872 ac_cv_c_stack_direction=0
10873else
10874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10875/* end confdefs.h. */
eb697db5
DN
10876$ac_includes_default
10877int
10878find_stack_direction ()
10879{
10880 static char *addr = 0;
10881 auto char dummy;
10882 if (addr == 0)
10883 {
10884 addr = &dummy;
10885 return find_stack_direction ();
10886 }
10887 else
10888 return (&dummy > addr) ? 1 : -1;
10889}
15e12598 10890
5929fbe7
GM
10891int
10892main ()
a4f64981 10893{
eb697db5 10894 return find_stack_direction () < 0;
7186fb09 10895}
5929fbe7 10896_ACEOF
eb697db5
DN
10897if ac_fn_c_try_run "$LINENO"; then :
10898 ac_cv_c_stack_direction=1
5929fbe7 10899else
eb697db5
DN
10900 ac_cv_c_stack_direction=-1
10901fi
10902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10903 conftest.$ac_objext conftest.beam conftest.$ac_ext
10904fi
49ebbd65 10905
5929fbe7 10906fi
eb697db5
DN
10907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10908$as_echo "$ac_cv_c_stack_direction" >&6; }
10909cat >>confdefs.h <<_ACEOF
10910#define STACK_DIRECTION $ac_cv_c_stack_direction
10911_ACEOF
10912
15e12598 10913
5929fbe7 10914fi
eb697db5
DN
10915
10916
10917if test x"$ac_cv_func_alloca_works" != xyes; then
9164c0e4 10918 as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5
eb697db5
DN
10919fi
10920
10921# fmod, logb, and frexp are found in -lm on most systems.
10922# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
10924$as_echo_n "checking for sqrt in -lm... " >&6; }
10925if test "${ac_cv_lib_m_sqrt+set}" = set; then :
5929fbe7
GM
10926 $as_echo_n "(cached) " >&6
10927else
10928 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10929LIBS="-lm $LIBS"
10930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10931/* end confdefs.h. */
e6df49e4 10932
5929fbe7
GM
10933/* Override any GCC internal prototype to avoid an error.
10934 Use char because int might match the return type of a GCC
10935 builtin and then its argument prototype would still apply. */
10936#ifdef __cplusplus
10937extern "C"
10938#endif
eb697db5 10939char sqrt ();
a4f64981
GM
10940int
10941main ()
10942{
eb697db5 10943return sqrt ();
5929fbe7
GM
10944 ;
10945 return 0;
a4f64981 10946}
e6df49e4 10947_ACEOF
eb697db5
DN
10948if ac_fn_c_try_link "$LINENO"; then :
10949 ac_cv_lib_m_sqrt=yes
a4f64981 10950else
eb697db5 10951 ac_cv_lib_m_sqrt=no
8c5ff6dd 10952fi
eb697db5
DN
10953rm -f core conftest.err conftest.$ac_objext \
10954 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
10955LIBS=$ac_check_lib_save_LIBS
10956fi
eb697db5
DN
10957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
10958$as_echo "$ac_cv_lib_m_sqrt" >&6; }
10959if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
10960 cat >>confdefs.h <<_ACEOF
10961#define HAVE_LIBM 1
10962_ACEOF
15e12598 10963
eb697db5 10964 LIBS="-lm $LIBS"
8c5ff6dd 10965
5929fbe7 10966fi
8c5ff6dd 10967
8c5ff6dd 10968
eb697db5
DN
10969# Check for mail-locking functions in a "mail" library. Probably this should
10970# have the same check as for liblockfile below.
10971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
10972$as_echo_n "checking for maillock in -lmail... " >&6; }
10973if test "${ac_cv_lib_mail_maillock+set}" = set; then :
5929fbe7
GM
10974 $as_echo_n "(cached) " >&6
10975else
eb697db5
DN
10976 ac_check_lib_save_LIBS=$LIBS
10977LIBS="-lmail $LIBS"
10978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10979/* end confdefs.h. */
15e12598 10980
5929fbe7
GM
10981/* Override any GCC internal prototype to avoid an error.
10982 Use char because int might match the return type of a GCC
10983 builtin and then its argument prototype would still apply. */
10984#ifdef __cplusplus
10985extern "C"
10986#endif
eb697db5 10987char maillock ();
5929fbe7
GM
10988int
10989main ()
10990{
eb697db5 10991return maillock ();
5929fbe7
GM
10992 ;
10993 return 0;
10994}
a4f64981 10995_ACEOF
eb697db5
DN
10996if ac_fn_c_try_link "$LINENO"; then :
10997 ac_cv_lib_mail_maillock=yes
5929fbe7 10998else
eb697db5 10999 ac_cv_lib_mail_maillock=no
8c5ff6dd 11000fi
eb697db5
DN
11001rm -f core conftest.err conftest.$ac_objext \
11002 conftest$ac_exeext conftest.$ac_ext
11003LIBS=$ac_check_lib_save_LIBS
5929fbe7 11004fi
eb697db5
DN
11005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
11006$as_echo "$ac_cv_lib_mail_maillock" >&6; }
11007if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
11008 have_mail=yes
5929fbe7 11009else
eb697db5
DN
11010 have_mail=no
11011fi
11012
11013if test $have_mail = yes; then
11014 LIBS_MAIL=-lmail
11015 LIBS="$LIBS_MAIL $LIBS"
11016
11017$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
11018
11019else
11020 LIBS_MAIL=
11021fi
11022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
11023$as_echo_n "checking for maillock in -llockfile... " >&6; }
11024if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
e9a63f04 11025 $as_echo_n "(cached) " >&6
98418dba 11026else
0ca10bb7 11027 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11028LIBS="-llockfile $LIBS"
11029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11030/* end confdefs.h. */
ca81d7a0 11031
0ca10bb7
RC
11032/* Override any GCC internal prototype to avoid an error.
11033 Use char because int might match the return type of a GCC
11034 builtin and then its argument prototype would still apply. */
11035#ifdef __cplusplus
11036extern "C"
11037#endif
eb697db5 11038char maillock ();
0ca10bb7
RC
11039int
11040main ()
11041{
eb697db5 11042return maillock ();
0ca10bb7
RC
11043 ;
11044 return 0;
11045}
503d2be0 11046_ACEOF
eb697db5
DN
11047if ac_fn_c_try_link "$LINENO"; then :
11048 ac_cv_lib_lockfile_maillock=yes
503d2be0 11049else
eb697db5 11050 ac_cv_lib_lockfile_maillock=no
a21616bd 11051fi
eb697db5
DN
11052rm -f core conftest.err conftest.$ac_objext \
11053 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11054LIBS=$ac_check_lib_save_LIBS
11055fi
eb697db5
DN
11056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
11057$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
11058if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
11059 have_lockfile=yes
5929fbe7 11060else
eb697db5
DN
11061 have_lockfile=no
11062fi
11063
11064if test $have_lockfile = yes; then
11065 LIBS_MAIL=-llockfile
11066 LIBS="$LIBS_MAIL $LIBS"
11067
11068$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
11069
11070else
11071# If we have the shared liblockfile, assume we must use it for mail
11072# locking (e.g. Debian). If we couldn't link against liblockfile
11073# (no liblockfile.a installed), ensure that we don't need to.
11074 # Extract the first word of "liblockfile.so", so it can be a program name with args.
11075set dummy liblockfile.so; ac_word=$2
11076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11077$as_echo_n "checking for $ac_word... " >&6; }
11078if test "${ac_cv_prog_liblockfile+set}" = set; then :
11079 $as_echo_n "(cached) " >&6
11080else
11081 if test -n "$liblockfile"; then
11082 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
11083else
11084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11085as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
11086for as_dir in $as_dummy
11087do
11088 IFS=$as_save_IFS
11089 test -z "$as_dir" && as_dir=.
11090 for ac_exec_ext in '' $ac_executable_extensions; do
11091 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11092 ac_cv_prog_liblockfile="yes"
11093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11094 break 2
11095 fi
11096done
11097 done
11098IFS=$as_save_IFS
11099
11100 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
11101fi
11102fi
11103liblockfile=$ac_cv_prog_liblockfile
11104if test -n "$liblockfile"; then
11105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
11106$as_echo "$liblockfile" >&6; }
11107else
11108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11109$as_echo "no" >&6; }
11110fi
11111
11112
11113 if test $ac_cv_prog_liblockfile = yes; then
9164c0e4 11114 as_fn_error $? "Shared liblockfile found but can't link against it.
eb697db5
DN
11115This probably means that movemail could lose mail.
11116There may be a \`development' package to install containing liblockfile." "$LINENO" 5
11117 fi
11118fi
11119for ac_func in touchlock
11120do :
11121 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
11122if test "x$ac_cv_func_touchlock" = x""yes; then :
11123 cat >>confdefs.h <<_ACEOF
11124#define HAVE_TOUCHLOCK 1
11125_ACEOF
11126
11127fi
11128done
11129
11130for ac_header in maillock.h
11131do :
11132 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
11133if test "x$ac_cv_header_maillock_h" = x""yes; then :
11134 cat >>confdefs.h <<_ACEOF
11135#define HAVE_MAILLOCK_H 1
11136_ACEOF
11137
11138fi
11139
11140done
11141
11142
11143
11144## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
11145## interlock access to the mail spool. The alternative is a lock file named
11146## /usr/spool/mail/$USER.lock.
11147mail_lock=no
11148case "$opsys" in
11149 aix4-2) mail_lock="lockf" ;;
11150
11151 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
11152
11153 ## On GNU/Linux systems, both methods are used by various mail programs.
11154 ## I assume most people are using newer mailers that have heard of flock.
11155 ## Change this if you need to.
11156 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
11157 ## configure gets the right answers, and that means *NOT* using flock.
11158 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
11159 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
11160 ## Debian maintainer hasn't provided a clean fix for Emacs.
11161 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
11162 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
11163 ## correct logic. -- fx
11164 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
11165 ## liblockfile is a Free Software replacement for libmail, used on
11166 ## Debian systems and elsewhere. -rfr.
11167 gnu-*)
11168 mail_lock="flock"
11169 if test $have_mail = yes || test $have_lockfile = yes; then
11170 test $ac_cv_header_maillock_h = yes && mail_lock=no
11171 fi
11172 ;;
11173esac
11174
11175BLESSMAIL_TARGET=
11176case "$mail_lock" in
11177 flock)
11178$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
11179 ;;
11180
11181 lockf)
11182$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
11183 ;;
11184
11185 *) BLESSMAIL_TARGET="need-blessmail" ;;
11186esac
11187
11188
11189
11190for ac_func in gethostname getdomainname dup2 \
11191rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
72af86bd 11192random lrand48 logb frexp fmod rint cbrt ftime setsid \
eb697db5
DN
11193strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11194utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
8966b757 11195__fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \
eb697db5 11196sendto recvfrom getsockopt setsockopt getsockname getpeername \
72af86bd 11197gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
eb697db5 11198memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
dcc19aac 11199cfmakeraw cfsetspeed isnan copysign __executable_start
eb697db5
DN
11200do :
11201 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11202ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9164c0e4 11203if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
eb697db5
DN
11204 cat >>confdefs.h <<_ACEOF
11205#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11206_ACEOF
11207
11208fi
11209done
11210
11211
11212for ac_header in sys/un.h
11213do :
11214 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
11215if test "x$ac_cv_header_sys_un_h" = x""yes; then :
11216 cat >>confdefs.h <<_ACEOF
11217#define HAVE_SYS_UN_H 1
11218_ACEOF
11219
11220fi
11221
11222done
11223
11224
11225
11226
11227
11228
11229
11230 for ac_func in $ac_func_list
11231do :
11232 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11233ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9164c0e4 11234if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
eb697db5
DN
11235 cat >>confdefs.h <<_ACEOF
11236#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11237_ACEOF
11238
5929fbe7 11239fi
eb697db5
DN
11240done
11241
11242
11243
11244
11245
11246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
11247$as_echo_n "checking for working mktime... " >&6; }
11248if test "${ac_cv_func_working_mktime+set}" = set; then :
11249 $as_echo_n "(cached) " >&6
11250else
11251 if test "$cross_compiling" = yes; then :
11252 ac_cv_func_working_mktime=no
11253else
11254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11255/* end confdefs.h. */
11256/* Test program from Paul Eggert and Tony Leneis. */
11257#ifdef TIME_WITH_SYS_TIME
11258# include <sys/time.h>
11259# include <time.h>
11260#else
11261# ifdef HAVE_SYS_TIME_H
11262# include <sys/time.h>
11263# else
11264# include <time.h>
11265# endif
11266#endif
11267
11268#include <limits.h>
11269#include <stdlib.h>
11270
11271#ifdef HAVE_UNISTD_H
11272# include <unistd.h>
11273#endif
11274
11275#ifndef HAVE_ALARM
11276# define alarm(X) /* empty */
11277#endif
11278
11279/* Work around redefinition to rpl_putenv by other config tests. */
11280#undef putenv
11281
11282static time_t time_t_max;
11283static time_t time_t_min;
11284
11285/* Values we'll use to set the TZ environment variable. */
9164c0e4
AS
11286static const char *tz_strings[] = {
11287 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
eb697db5
DN
11288 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11289};
11290#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5929fbe7 11291
eb697db5
DN
11292/* Return 0 if mktime fails to convert a date in the spring-forward gap.
11293 Based on a problem report from Andreas Jaeger. */
11294static int
11295spring_forward_gap ()
11296{
11297 /* glibc (up to about 1998-10-07) failed this test. */
11298 struct tm tm;
5929fbe7 11299
eb697db5
DN
11300 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11301 instead of "TZ=America/Vancouver" in order to detect the bug even
11302 on systems that don't support the Olson extension, or don't have the
11303 full zoneinfo tables installed. */
9164c0e4 11304 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
5929fbe7 11305
eb697db5
DN
11306 tm.tm_year = 98;
11307 tm.tm_mon = 3;
11308 tm.tm_mday = 5;
11309 tm.tm_hour = 2;
11310 tm.tm_min = 0;
11311 tm.tm_sec = 0;
11312 tm.tm_isdst = -1;
11313 return mktime (&tm) != (time_t) -1;
11314}
5929fbe7 11315
eb697db5 11316static int
9164c0e4 11317mktime_test1 (time_t now)
eb697db5
DN
11318{
11319 struct tm *lt;
11320 return ! (lt = localtime (&now)) || mktime (lt) == now;
11321}
e6df49e4 11322
eb697db5 11323static int
9164c0e4 11324mktime_test (time_t now)
eb697db5
DN
11325{
11326 return (mktime_test1 (now)
11327 && mktime_test1 ((time_t) (time_t_max - now))
11328 && mktime_test1 ((time_t) (time_t_min + now)));
11329}
5929fbe7 11330
eb697db5
DN
11331static int
11332irix_6_4_bug ()
11333{
11334 /* Based on code from Ariel Faigon. */
11335 struct tm tm;
11336 tm.tm_year = 96;
11337 tm.tm_mon = 3;
11338 tm.tm_mday = 0;
11339 tm.tm_hour = 0;
11340 tm.tm_min = 0;
11341 tm.tm_sec = 0;
11342 tm.tm_isdst = -1;
11343 mktime (&tm);
11344 return tm.tm_mon == 2 && tm.tm_mday == 31;
11345}
5929fbe7 11346
eb697db5 11347static int
9164c0e4 11348bigtime_test (int j)
eb697db5
DN
11349{
11350 struct tm tm;
11351 time_t now;
11352 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11353 now = mktime (&tm);
11354 if (now != (time_t) -1)
11355 {
11356 struct tm *lt = localtime (&now);
11357 if (! (lt
11358 && lt->tm_year == tm.tm_year
11359 && lt->tm_mon == tm.tm_mon
11360 && lt->tm_mday == tm.tm_mday
11361 && lt->tm_hour == tm.tm_hour
11362 && lt->tm_min == tm.tm_min
11363 && lt->tm_sec == tm.tm_sec
11364 && lt->tm_yday == tm.tm_yday
11365 && lt->tm_wday == tm.tm_wday
11366 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11367 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11368 return 0;
11369 }
11370 return 1;
11371}
5929fbe7 11372
eb697db5
DN
11373static int
11374year_2050_test ()
11375{
11376 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
11377 ignoring leap seconds. */
11378 unsigned long int answer = 2527315200UL;
15e12598 11379
eb697db5
DN
11380 struct tm tm;
11381 time_t t;
11382 tm.tm_year = 2050 - 1900;
11383 tm.tm_mon = 2 - 1;
11384 tm.tm_mday = 1;
11385 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
11386 tm.tm_isdst = -1;
a4f64981 11387
eb697db5
DN
11388 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11389 instead of "TZ=America/Vancouver" in order to detect the bug even
11390 on systems that don't support the Olson extension, or don't have the
11391 full zoneinfo tables installed. */
9164c0e4 11392 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
8c5ff6dd 11393
eb697db5 11394 t = mktime (&tm);
5929fbe7 11395
eb697db5
DN
11396 /* Check that the result is either a failure, or close enough
11397 to the correct answer that we can assume the discrepancy is
11398 due to leap seconds. */
11399 return (t == (time_t) -1
11400 || (0 < t && answer - 120 <= t && t <= answer + 120));
11401}
21287a21
CY
11402
11403int
11404main ()
11405{
eb697db5
DN
11406 time_t t, delta;
11407 int i, j;
5929fbe7 11408
eb697db5
DN
11409 /* This test makes some buggy mktime implementations loop.
11410 Give up after 60 seconds; a mktime slower than that
11411 isn't worth using anyway. */
11412 alarm (60);
bf89cb4d 11413
eb697db5
DN
11414 for (;;)
11415 {
11416 t = (time_t_max << 1) + 1;
11417 if (t <= time_t_max)
11418 break;
11419 time_t_max = t;
11420 }
11421 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
5929fbe7 11422
eb697db5
DN
11423 delta = time_t_max / 997; /* a suitable prime number */
11424 for (i = 0; i < N_STRINGS; i++)
11425 {
11426 if (tz_strings[i])
9164c0e4 11427 putenv ((char*) tz_strings[i]);
5929fbe7 11428
eb697db5
DN
11429 for (t = 0; t <= time_t_max - delta; t += delta)
11430 if (! mktime_test (t))
11431 return 1;
11432 if (! (mktime_test ((time_t) 1)
11433 && mktime_test ((time_t) (60 * 60))
11434 && mktime_test ((time_t) (60 * 60 * 24))))
11435 return 1;
21287a21 11436
eb697db5
DN
11437 for (j = 1; ; j <<= 1)
11438 if (! bigtime_test (j))
11439 return 1;
11440 else if (INT_MAX / 2 < j)
11441 break;
11442 if (! bigtime_test (INT_MAX))
11443 return 1;
11444 }
11445 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
9452ded1
DN
11446}
11447_ACEOF
eb697db5
DN
11448if ac_fn_c_try_run "$LINENO"; then :
11449 ac_cv_func_working_mktime=yes
21287a21 11450else
eb697db5
DN
11451 ac_cv_func_working_mktime=no
11452fi
11453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11454 conftest.$ac_objext conftest.beam conftest.$ac_ext
11455fi
11456
11457fi
11458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
11459$as_echo "$ac_cv_func_working_mktime" >&6; }
11460if test $ac_cv_func_working_mktime = no; then
11461 case " $LIBOBJS " in
11462 *" mktime.$ac_objext "* ) ;;
11463 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
11464 ;;
11465esac
11466
11467fi
11468
11469if test "$ac_cv_func_working_mktime" = no; then
5929fbe7 11470
eb697db5 11471$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
5929fbe7 11472
21287a21 11473fi
eb697db5
DN
11474
11475ac_have_func=no # yes means we've found a way to get the load average.
11476
11477# Make sure getloadavg.c is where it belongs, at configure-time.
11478test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
9164c0e4 11479 as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
eb697db5
DN
11480
11481ac_save_LIBS=$LIBS
11482
11483# Check for getloadavg, but be sure not to touch the cache variable.
11484(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11485if test "x$ac_cv_func_getloadavg" = x""yes; then :
11486 exit 0
5929fbe7 11487else
eb697db5 11488 exit 1
21287a21 11489fi
eb697db5 11490) && ac_have_func=yes
21287a21 11491
eb697db5
DN
11492# On HPUX9, an unprivileged user can get load averages through this function.
11493for ac_func in pstat_getdynamic
11494do :
11495 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
11496if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
11497 cat >>confdefs.h <<_ACEOF
11498#define HAVE_PSTAT_GETDYNAMIC 1
5929fbe7
GM
11499_ACEOF
11500
eb697db5
DN
11501fi
11502done
11503
11504
11505# Solaris has libkstat which does not require root.
11506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
11507$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
11508if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
e9a63f04 11509 $as_echo_n "(cached) " >&6
21287a21 11510else
0ca10bb7 11511 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11512LIBS="-lkstat $LIBS"
11513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11514/* end confdefs.h. */
21287a21 11515
0ca10bb7
RC
11516/* Override any GCC internal prototype to avoid an error.
11517 Use char because int might match the return type of a GCC
11518 builtin and then its argument prototype would still apply. */
11519#ifdef __cplusplus
11520extern "C"
15e12598 11521#endif
eb697db5 11522char kstat_open ();
15e12598
VB
11523int
11524main ()
11525{
eb697db5 11526return kstat_open ();
15e12598
VB
11527 ;
11528 return 0;
11529}
11530_ACEOF
eb697db5
DN
11531if ac_fn_c_try_link "$LINENO"; then :
11532 ac_cv_lib_kstat_kstat_open=yes
0ca10bb7 11533else
eb697db5 11534 ac_cv_lib_kstat_kstat_open=no
0ca10bb7 11535fi
eb697db5
DN
11536rm -f core conftest.err conftest.$ac_objext \
11537 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
11538LIBS=$ac_check_lib_save_LIBS
11539fi
eb697db5
DN
11540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
11541$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
11542if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
11543 cat >>confdefs.h <<_ACEOF
11544#define HAVE_LIBKSTAT 1
11545_ACEOF
6da23aaa 11546
eb697db5 11547 LIBS="-lkstat $LIBS"
a4f64981 11548
eb697db5 11549fi
5929fbe7 11550
eb697db5
DN
11551test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
11552
11553# Some systems with -lutil have (and need) -lkvm as well, some do not.
11554# On Solaris, -lkvm requires nlist from -lelf, so check that first
11555# to get the right answer into the cache.
11556# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11557if test $ac_have_func = no; then
11558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
11559$as_echo_n "checking for elf_begin in -lelf... " >&6; }
11560if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
0ca10bb7
RC
11561 $as_echo_n "(cached) " >&6
11562else
11563 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11564LIBS="-lelf $LIBS"
11565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11566/* end confdefs.h. */
21287a21 11567
0ca10bb7
RC
11568/* Override any GCC internal prototype to avoid an error.
11569 Use char because int might match the return type of a GCC
11570 builtin and then its argument prototype would still apply. */
11571#ifdef __cplusplus
11572extern "C"
11573#endif
eb697db5 11574char elf_begin ();
21287a21
CY
11575int
11576main ()
11577{
eb697db5 11578return elf_begin ();
21287a21
CY
11579 ;
11580 return 0;
11581}
11582_ACEOF
eb697db5
DN
11583if ac_fn_c_try_link "$LINENO"; then :
11584 ac_cv_lib_elf_elf_begin=yes
bf89cb4d 11585else
eb697db5 11586 ac_cv_lib_elf_elf_begin=no
0c309b80 11587fi
eb697db5
DN
11588rm -f core conftest.err conftest.$ac_objext \
11589 conftest$ac_exeext conftest.$ac_ext
7186fb09 11590LIBS=$ac_check_lib_save_LIBS
9452ded1 11591fi
eb697db5
DN
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
11593$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
11594if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
11595 LIBS="-lelf $LIBS"
8c5ff6dd
KR
11596fi
11597
eb697db5
DN
11598fi
11599if test $ac_have_func = no; then
11600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
11601$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
11602if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
7186fb09
GM
11603 $as_echo_n "(cached) " >&6
11604else
aaa36002 11605 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11606LIBS="-lkvm $LIBS"
11607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11608/* end confdefs.h. */
7186fb09 11609
aaa36002
DN
11610/* Override any GCC internal prototype to avoid an error.
11611 Use char because int might match the return type of a GCC
11612 builtin and then its argument prototype would still apply. */
11613#ifdef __cplusplus
11614extern "C"
11615#endif
eb697db5 11616char kvm_open ();
8732a4e9
MB
11617int
11618main ()
11619{
eb697db5 11620return kvm_open ();
0c309b80
GM
11621 ;
11622 return 0;
11623}
11624_ACEOF
eb697db5
DN
11625if ac_fn_c_try_link "$LINENO"; then :
11626 ac_cv_lib_kvm_kvm_open=yes
7186fb09 11627else
eb697db5 11628 ac_cv_lib_kvm_kvm_open=no
cd03c74a 11629fi
eb697db5
DN
11630rm -f core conftest.err conftest.$ac_objext \
11631 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11632LIBS=$ac_check_lib_save_LIBS
a4f64981 11633fi
eb697db5
DN
11634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
11635$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
11636if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
11637 LIBS="-lkvm $LIBS"
8c5ff6dd 11638fi
8c5ff6dd 11639
eb697db5
DN
11640 # Check for the 4.4BSD definition of getloadavg.
11641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
11642$as_echo_n "checking for getloadavg in -lutil... " >&6; }
11643if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
5929fbe7 11644 $as_echo_n "(cached) " >&6
8c5ff6dd 11645else
5929fbe7 11646 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11647LIBS="-lutil $LIBS"
11648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11649/* end confdefs.h. */
8c5ff6dd 11650
5929fbe7
GM
11651/* Override any GCC internal prototype to avoid an error.
11652 Use char because int might match the return type of a GCC
11653 builtin and then its argument prototype would still apply. */
11654#ifdef __cplusplus
11655extern "C"
11656#endif
eb697db5 11657char getloadavg ();
5929fbe7
GM
11658int
11659main ()
11660{
eb697db5 11661return getloadavg ();
5929fbe7
GM
11662 ;
11663 return 0;
11664}
11665_ACEOF
eb697db5
DN
11666if ac_fn_c_try_link "$LINENO"; then :
11667 ac_cv_lib_util_getloadavg=yes
49ebbd65 11668else
eb697db5 11669 ac_cv_lib_util_getloadavg=no
8c5ff6dd 11670fi
eb697db5
DN
11671rm -f core conftest.err conftest.$ac_objext \
11672 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11673LIBS=$ac_check_lib_save_LIBS
8c5ff6dd 11674fi
eb697db5
DN
11675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
11676$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
11677if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
11678 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8c5ff6dd 11679fi
8c5ff6dd 11680
eb697db5 11681fi
8c5ff6dd 11682
eb697db5
DN
11683if test $ac_have_func = no; then
11684 # There is a commonly available library for RS/6000 AIX.
11685 # Since it is not a standard part of AIX, it might be installed locally.
11686 ac_getloadavg_LIBS=$LIBS
11687 LIBS="-L/usr/local/lib $LIBS"
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
11689$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
11690if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
8c5ff6dd
KR
11691 $as_echo_n "(cached) " >&6
11692else
5929fbe7 11693 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11694LIBS="-lgetloadavg $LIBS"
11695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 11696/* end confdefs.h. */
5929fbe7
GM
11697
11698/* Override any GCC internal prototype to avoid an error.
11699 Use char because int might match the return type of a GCC
11700 builtin and then its argument prototype would still apply. */
11701#ifdef __cplusplus
11702extern "C"
11703#endif
eb697db5 11704char getloadavg ();
8c5ff6dd
KR
11705int
11706main ()
11707{
eb697db5 11708return getloadavg ();
8c5ff6dd
KR
11709 ;
11710 return 0;
11711}
a4f64981 11712_ACEOF
eb697db5
DN
11713if ac_fn_c_try_link "$LINENO"; then :
11714 ac_cv_lib_getloadavg_getloadavg=yes
5929fbe7 11715else
eb697db5 11716 ac_cv_lib_getloadavg_getloadavg=no
5929fbe7 11717fi
eb697db5
DN
11718rm -f core conftest.err conftest.$ac_objext \
11719 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11720LIBS=$ac_check_lib_save_LIBS
8c5ff6dd 11721fi
eb697db5
DN
11722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
11723$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
11724if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
11725 LIBS="-lgetloadavg $LIBS"
5929fbe7 11726else
eb697db5 11727 LIBS=$ac_getloadavg_LIBS
5929fbe7
GM
11728fi
11729
eb697db5 11730fi
5929fbe7 11731
eb697db5
DN
11732# Make sure it is really in the library, if we think we found it,
11733# otherwise set up the replacement function.
11734for ac_func in getloadavg
11735do :
11736 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11737if test "x$ac_cv_func_getloadavg" = x""yes; then :
11738 cat >>confdefs.h <<_ACEOF
11739#define HAVE_GETLOADAVG 1
5929fbe7
GM
11740_ACEOF
11741
eb697db5
DN
11742else
11743 case " $LIBOBJS " in
11744 *" getloadavg.$ac_objext "* ) ;;
11745 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
11746 ;;
11747esac
11748
11749
11750$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
11751
11752# Figure out what our getloadavg.c needs.
11753ac_have_func=no
11754ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
11755if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
11756 ac_have_func=yes
11757
11758$as_echo "#define DGUX 1" >>confdefs.h
11759
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
11761$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
11762if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
5929fbe7
GM
11763 $as_echo_n "(cached) " >&6
11764else
11765 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11766LIBS="-ldgc $LIBS"
11767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 11768/* end confdefs.h. */
5929fbe7
GM
11769
11770/* Override any GCC internal prototype to avoid an error.
11771 Use char because int might match the return type of a GCC
11772 builtin and then its argument prototype would still apply. */
11773#ifdef __cplusplus
11774extern "C"
11775#endif
eb697db5 11776char dg_sys_info ();
a4f64981
GM
11777int
11778main ()
11779{
eb697db5 11780return dg_sys_info ();
15e12598
VB
11781 ;
11782 return 0;
11783}
e6df49e4 11784_ACEOF
eb697db5
DN
11785if ac_fn_c_try_link "$LINENO"; then :
11786 ac_cv_lib_dgc_dg_sys_info=yes
5929fbe7 11787else
eb697db5 11788 ac_cv_lib_dgc_dg_sys_info=no
49ebbd65 11789fi
eb697db5
DN
11790rm -f core conftest.err conftest.$ac_objext \
11791 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
11792LIBS=$ac_check_lib_save_LIBS
11793fi
eb697db5
DN
11794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
11795$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
11796if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
11797 cat >>confdefs.h <<_ACEOF
11798#define HAVE_LIBDGC 1
11799_ACEOF
11800
11801 LIBS="-ldgc $LIBS"
11802
5929fbe7 11803fi
a5edbe4a 11804
eb697db5 11805fi
49ebbd65
DN
11806
11807
15e12598 11808
eb697db5
DN
11809ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11810if test "x$ac_cv_header_locale_h" = x""yes; then :
a4f64981 11811
5929fbe7 11812fi
eb697db5
DN
11813
11814
11815for ac_func in setlocale
11816do :
11817 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
11818if test "x$ac_cv_func_setlocale" = x""yes; then :
11819 cat >>confdefs.h <<_ACEOF
11820#define HAVE_SETLOCALE 1
5929fbe7 11821_ACEOF
a4f64981 11822
5929fbe7 11823fi
eb697db5 11824done
a4f64981 11825
a4f64981 11826
eb697db5
DN
11827# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
11828# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
11829# Irix 4.0.5F has the header but not the library.
11830if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
11831 ac_have_func=yes
11832
11833$as_echo "#define SVR4 1" >>confdefs.h
cd03c74a 11834
5929fbe7 11835fi
8c5ff6dd 11836
eb697db5
DN
11837if test $ac_have_func = no; then
11838 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
11839if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
11840 ac_have_func=yes
8c5ff6dd 11841
eb697db5
DN
11842$as_echo "#define UMAX 1" >>confdefs.h
11843
11844
11845$as_echo "#define UMAX4_3 1" >>confdefs.h
8c5ff6dd 11846
5929fbe7 11847fi
eb697db5
DN
11848
11849
11850fi
11851
11852if test $ac_have_func = no; then
11853 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
11854if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
11855 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
11856
11857fi
11858
8c5ff6dd 11859
5929fbe7 11860fi
eb697db5
DN
11861
11862if test $ac_have_func = no; then
11863 for ac_header in mach/mach.h
11864do :
11865 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
11866if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
8c5ff6dd 11867 cat >>confdefs.h <<_ACEOF
eb697db5 11868#define HAVE_MACH_MACH_H 1
5929fbe7 11869_ACEOF
e6df49e4 11870
eb697db5
DN
11871fi
11872
11873done
8c5ff6dd 11874
eb697db5
DN
11875fi
11876
11877for ac_header in nlist.h
11878do :
11879 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
11880if test "x$ac_cv_header_nlist_h" = x""yes; then :
11881 cat >>confdefs.h <<_ACEOF
11882#define HAVE_NLIST_H 1
a4f64981 11883_ACEOF
eb697db5
DN
11884 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
11885"
11886if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
cd03c74a 11887
eb697db5
DN
11888cat >>confdefs.h <<_ACEOF
11889#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
5929fbe7 11890_ACEOF
5929fbe7 11891
eb697db5
DN
11892
11893$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
11894
8c5ff6dd 11895fi
49ebbd65 11896
eb697db5 11897
5929fbe7 11898fi
8c5ff6dd 11899
eb697db5
DN
11900done
11901
8c5ff6dd 11902fi
eb697db5 11903done
8c5ff6dd 11904
eb697db5
DN
11905
11906# Some definitions of getloadavg require that the program be installed setgid.
11907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
11908$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
11909if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
11910 $as_echo_n "(cached) " >&6
11911else
11912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11913/* end confdefs.h. */
11914#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
11915#ifdef LDAV_PRIVILEGED
11916Yowza Am I SETGID yet
11917#endif
5929fbe7 11918_ACEOF
eb697db5
DN
11919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11920 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
11921 ac_cv_func_getloadavg_setgid=yes
11922else
11923 ac_cv_func_getloadavg_setgid=no
11924fi
11925rm -f conftest*
11926
11927fi
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
11929$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
11930if test $ac_cv_func_getloadavg_setgid = yes; then
11931 NEED_SETGID=true
8c5ff6dd 11932
eb697db5 11933$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
8c5ff6dd 11934
eb697db5
DN
11935else
11936 NEED_SETGID=false
5929fbe7 11937fi
eb697db5
DN
11938
11939if test $ac_cv_func_getloadavg_setgid = yes; then
11940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
11941$as_echo_n "checking group of /dev/kmem... " >&6; }
11942if test "${ac_cv_group_kmem+set}" = set; then :
5929fbe7 11943 $as_echo_n "(cached) " >&6
a5edbe4a 11944else
eb697db5
DN
11945 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
11946 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
11947 # If we got an error (system does not support symlinks), try without -L.
11948 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
11949 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
11950 | sed -ne 's/[ ][ ]*/ /g;
11951 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
11952 / /s/.* //;p;'`
11953
11954fi
11955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
11956$as_echo "$ac_cv_group_kmem" >&6; }
11957 KMEM_GROUP=$ac_cv_group_kmem
11958fi
11959if test "x$ac_save_LIBS" = x; then
11960 GETLOADAVG_LIBS=$LIBS
11961else
11962 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
11963fi
11964LIBS=$ac_save_LIBS
11965
11966
5929fbe7 11967
eb697db5
DN
11968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11969$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11970if test "${ac_cv_sys_largefile_source+set}" = set; then :
11971 $as_echo_n "(cached) " >&6
11972else
11973 while :; do
11974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11975/* end confdefs.h. */
11976#include <sys/types.h> /* for off_t */
11977 #include <stdio.h>
8c5ff6dd
KR
11978int
11979main ()
11980{
eb697db5
DN
11981int (*fp) (FILE *, off_t, int) = fseeko;
11982 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5929fbe7
GM
11983 ;
11984 return 0;
11985}
11986_ACEOF
eb697db5
DN
11987if ac_fn_c_try_link "$LINENO"; then :
11988 ac_cv_sys_largefile_source=no; break
11989fi
11990rm -f core conftest.err conftest.$ac_objext \
11991 conftest$ac_exeext conftest.$ac_ext
11992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11993/* end confdefs.h. */
eb697db5
DN
11994#define _LARGEFILE_SOURCE 1
11995#include <sys/types.h> /* for off_t */
11996 #include <stdio.h>
5929fbe7
GM
11997int
11998main ()
11999{
eb697db5
DN
12000int (*fp) (FILE *, off_t, int) = fseeko;
12001 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
8c5ff6dd
KR
12002 ;
12003 return 0;
12004}
08b47d3d 12005_ACEOF
eb697db5
DN
12006if ac_fn_c_try_link "$LINENO"; then :
12007 ac_cv_sys_largefile_source=1; break
12008fi
12009rm -f core conftest.err conftest.$ac_objext \
12010 conftest$ac_exeext conftest.$ac_ext
12011 ac_cv_sys_largefile_source=unknown
12012 break
12013done
12014fi
12015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12016$as_echo "$ac_cv_sys_largefile_source" >&6; }
12017case $ac_cv_sys_largefile_source in #(
12018 no | unknown) ;;
12019 *)
12020cat >>confdefs.h <<_ACEOF
12021#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12022_ACEOF
12023;;
5929fbe7 12024esac
eb697db5 12025rm -rf conftest*
a4f64981 12026
eb697db5
DN
12027# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12028# in glibc 2.1.3, but that breaks too many other things.
12029# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12030if test $ac_cv_sys_largefile_source != unknown; then
49ebbd65 12031
eb697db5 12032$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
e6df49e4 12033
5929fbe7 12034fi
8c5ff6dd
KR
12035
12036
eb697db5
DN
12037# Configure getopt.
12038# getopt.m4 serial 10
8c5ff6dd 12039
eb697db5
DN
12040# The getopt module assume you want GNU getopt, with getopt_long etc,
12041# rather than vanilla POSIX getopt. This means your your code should
12042# always include <getopt.h> for the getopt prototypes.
15e12598 12043
15e12598 12044
a4f64981 12045
8c5ff6dd 12046
5929fbe7 12047
5929fbe7 12048
5929fbe7 12049
e6df49e4 12050
49ebbd65 12051
a4f64981 12052
e6df49e4 12053
eb697db5
DN
12054# Prerequisites of lib/getopt*.
12055
12056
12057
12058
12059 GETOPT_H=
12060 for ac_header in getopt.h
12061do :
12062 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12063if test "x$ac_cv_header_getopt_h" = x""yes; then :
12064 cat >>confdefs.h <<_ACEOF
12065#define HAVE_GETOPT_H 1
12066_ACEOF
12067
5929fbe7 12068else
eb697db5 12069 GETOPT_H=getopt.h
5929fbe7 12070fi
a4f64981 12071
eb697db5
DN
12072done
12073
12074 if test -z "$GETOPT_H"; then
12075 for ac_func in getopt_long_only
12076do :
12077 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12078if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
8c5ff6dd 12079 cat >>confdefs.h <<_ACEOF
eb697db5 12080#define HAVE_GETOPT_LONG_ONLY 1
8c5ff6dd 12081_ACEOF
e6df49e4 12082
8c5ff6dd 12083else
eb697db5
DN
12084 GETOPT_H=getopt.h
12085fi
12086done
5929fbe7 12087
eb697db5
DN
12088 fi
12089
12090 if test -z "$GETOPT_H"; then
12091 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
12092"
12093if test "x$ac_cv_have_decl_optreset" = x""yes; then :
12094 GETOPT_H=getopt.h
12095fi
12096
12097 fi
12098
12099 if test -z "$GETOPT_H"; then
12100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12101$as_echo_n "checking for working GNU getopt function... " >&6; }
12102if test "${gl_cv_func_gnu_getopt+set}" = set; then :
a4f64981 12103 $as_echo_n "(cached) " >&6
eb697db5
DN
12104else
12105 if test "$cross_compiling" = yes; then :
12106 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
12107"
12108if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
12109 gl_cv_func_gnu_getopt=no
12110else
12111 gl_cv_func_gnu_getopt=yes
5929fbe7 12112fi
eb697db5 12113
a4f64981 12114else
eb697db5 12115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12116/* end confdefs.h. */
eb697db5
DN
12117#include <getopt.h>
12118int
12119main ()
12120{
12121
12122 char *myargv[3];
12123 myargv[0] = "conftest";
12124 myargv[1] = "-+";
12125 myargv[2] = 0;
12126 return getopt (2, myargv, "+a") != '?';
12127
12128 ;
12129 return 0;
12130}
5929fbe7 12131_ACEOF
eb697db5
DN
12132if ac_fn_c_try_run "$LINENO"; then :
12133 gl_cv_func_gnu_getopt=yes
5929fbe7 12134else
eb697db5
DN
12135 gl_cv_func_gnu_getopt=no
12136fi
12137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12138 conftest.$ac_objext conftest.beam conftest.$ac_ext
12139fi
8c5ff6dd 12140
5929fbe7 12141fi
eb697db5
DN
12142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
12143$as_echo "$gl_cv_func_gnu_getopt" >&6; }
12144 if test "$gl_cv_func_gnu_getopt" = "no"; then
12145 GETOPT_H=getopt.h
12146 fi
12147 fi
5929fbe7 12148
5929fbe7 12149
a4f64981 12150
eb697db5 12151 if test -n "$GETOPT_H"; then :
8c5ff6dd
KR
12152
12153
eb697db5 12154 GETOPT_H=getopt.h
a5edbe4a 12155
eb697db5 12156$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
15e12598 12157
49ebbd65 12158
15e12598 12159
eb697db5
DN
12160 :
12161 GETOPTOBJS='getopt.o getopt1.o'
a4f64981 12162
8c5ff6dd 12163fi
e6df49e4 12164
e6df49e4 12165
eb697db5
DN
12166
12167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
12168$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
12169if test "${ac_cv_func_getpgrp_void+set}" = set; then :
12170 $as_echo_n "(cached) " >&6
12171else
12172 # Use it with a single arg.
12173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12174/* end confdefs.h. */
eb697db5
DN
12175$ac_includes_default
12176int
12177main ()
12178{
12179getpgrp (0);
12180 ;
12181 return 0;
12182}
12183_ACEOF
12184if ac_fn_c_try_compile "$LINENO"; then :
12185 ac_cv_func_getpgrp_void=no
5929fbe7 12186else
eb697db5
DN
12187 ac_cv_func_getpgrp_void=yes
12188fi
12189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 12190
5929fbe7 12191fi
eb697db5
DN
12192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
12193$as_echo "$ac_cv_func_getpgrp_void" >&6; }
12194if test $ac_cv_func_getpgrp_void = yes; then
8c5ff6dd 12195
eb697db5 12196$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
a4f64981 12197
eb697db5 12198fi
8c5ff6dd 12199
eb697db5
DN
12200
12201for ac_func in strftime
12202do :
12203 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
12204if test "x$ac_cv_func_strftime" = x""yes; then :
12205 cat >>confdefs.h <<_ACEOF
12206#define HAVE_STRFTIME 1
12207_ACEOF
12208
12209else
12210 # strftime is in -lintl on SCO UNIX.
12211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
12212$as_echo_n "checking for strftime in -lintl... " >&6; }
12213if test "${ac_cv_lib_intl_strftime+set}" = set; then :
a4f64981
GM
12214 $as_echo_n "(cached) " >&6
12215else
eb697db5
DN
12216 ac_check_lib_save_LIBS=$LIBS
12217LIBS="-lintl $LIBS"
12218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12219/* end confdefs.h. */
12220
12221/* Override any GCC internal prototype to avoid an error.
12222 Use char because int might match the return type of a GCC
12223 builtin and then its argument prototype would still apply. */
12224#ifdef __cplusplus
12225extern "C"
12226#endif
12227char strftime ();
12228int
12229main ()
12230{
12231return strftime ();
12232 ;
12233 return 0;
12234}
12235_ACEOF
12236if ac_fn_c_try_link "$LINENO"; then :
12237 ac_cv_lib_intl_strftime=yes
12238else
12239 ac_cv_lib_intl_strftime=no
12240fi
12241rm -f core conftest.err conftest.$ac_objext \
12242 conftest$ac_exeext conftest.$ac_ext
12243LIBS=$ac_check_lib_save_LIBS
12244fi
12245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
12246$as_echo "$ac_cv_lib_intl_strftime" >&6; }
12247if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
12248 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
12249
12250LIBS="-lintl $LIBS"
5929fbe7 12251fi
e6df49e4 12252
5929fbe7 12253fi
eb697db5
DN
12254done
12255
12256
12257# UNIX98 PTYs.
12258for ac_func in grantpt
12259do :
12260 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
12261if test "x$ac_cv_func_grantpt" = x""yes; then :
5929fbe7 12262 cat >>confdefs.h <<_ACEOF
eb697db5 12263#define HAVE_GRANTPT 1
a4f64981 12264_ACEOF
5929fbe7 12265
a4f64981 12266fi
5929fbe7
GM
12267done
12268
8c5ff6dd 12269
eb697db5
DN
12270# PTY-related GNU extensions.
12271for ac_func in getpt
12272do :
12273 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
12274if test "x$ac_cv_func_getpt" = x""yes; then :
12275 cat >>confdefs.h <<_ACEOF
12276#define HAVE_GETPT 1
12277_ACEOF
8c5ff6dd 12278
5929fbe7 12279fi
5929fbe7 12280done
8c5ff6dd 12281
5929fbe7 12282
eb697db5
DN
12283# Check this now, so that we will NOT find the above functions in ncurses.
12284# That is because we have not set up to link ncurses in lib-src.
12285# It's better to believe a function is not available
12286# than to expect to find it in ncurses.
12287# Also we need tputs and friends to be able to build at all.
12288have_tputs_et_al=true
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
12290$as_echo_n "checking for library containing tputs... " >&6; }
12291if test "${ac_cv_search_tputs+set}" = set; then :
5929fbe7 12292 $as_echo_n "(cached) " >&6
5929fbe7 12293else
eb697db5
DN
12294 ac_func_search_save_LIBS=$LIBS
12295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12296/* end confdefs.h. */
eb697db5
DN
12297
12298/* Override any GCC internal prototype to avoid an error.
12299 Use char because int might match the return type of a GCC
12300 builtin and then its argument prototype would still apply. */
12301#ifdef __cplusplus
12302extern "C"
12303#endif
12304char tputs ();
12305int
12306main ()
12307{
12308return tputs ();
12309 ;
12310 return 0;
12311}
5929fbe7 12312_ACEOF
eb697db5
DN
12313for ac_lib in '' ncurses terminfo termcap; do
12314 if test -z "$ac_lib"; then
12315 ac_res="none required"
12316 else
12317 ac_res=-l$ac_lib
12318 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12319 fi
12320 if ac_fn_c_try_link "$LINENO"; then :
12321 ac_cv_search_tputs=$ac_res
12322fi
12323rm -f core conftest.err conftest.$ac_objext \
12324 conftest$ac_exeext
12325 if test "${ac_cv_search_tputs+set}" = set; then :
12326 break
12327fi
12328done
12329if test "${ac_cv_search_tputs+set}" = set; then :
12330
5929fbe7 12331else
eb697db5
DN
12332 ac_cv_search_tputs=no
12333fi
12334rm conftest.$ac_ext
12335LIBS=$ac_func_search_save_LIBS
12336fi
12337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
12338$as_echo "$ac_cv_search_tputs" >&6; }
12339ac_res=$ac_cv_search_tputs
12340if test "$ac_res" != no; then :
12341 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
a4f64981 12342
eb697db5
DN
12343else
12344 have_tputs_et_al=false
5929fbe7 12345fi
8c5ff6dd 12346
eb697db5 12347if test "$have_tputs_et_al" != true; then
9164c0e4 12348 as_fn_error $? "I couldn't find termcap functions (tputs and friends).
eb697db5
DN
12349Maybe some development libraries/packages are missing? Try installing
12350libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
12351fi
12352# Must define this when any termcap library is found.
8c5ff6dd 12353
eb697db5
DN
12354$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
12355
12356## FIXME This was the cpp logic, but I am not sure it is right.
12357## The above test has not necessarily found libncurses.
12358HAVE_LIBNCURSES=yes
12359
12360## Use terminfo instead of termcap?
12361## Note only system files NOT using terminfo are:
12362## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
12363## darwin|gnu without ncurses.
12364TERMINFO=no
12365LIBS_TERMCAP=
12366case "$opsys" in
12367 ## cygwin: Fewer environment variables to go wrong, more terminal types.
12368 ## hpux10-20: Use the system provided termcap(3) library.
12369 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
12370 ## is necessary. Otherwise Emacs dumps core when run -nw.
12371 aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
12372
12373 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
12374 ## The ncurses library has been moved out of the System framework in
12375 ## Mac OS X 10.2. So if configure detects it, set the command-line
12376 ## option to use it.
12377 darwin|gnu*)
12378 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
12379 if test "x$HAVE_LIBNCURSES" = "xyes"; then
12380 TERMINFO=yes
12381 LIBS_TERMCAP="-lncurses"
12382 fi
12383 ;;
12384
12385 freebsd)
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
12387$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
12388 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
12389 $as_echo_n "(cached) " >&6
12390else
12391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12392/* end confdefs.h. */
eb697db5
DN
12393#include <osreldate.h>
12394int
12395main ()
12396{
12397#if __FreeBSD_version < 400000
12398fail;
12399#endif
12400
12401 ;
12402 return 0;
12403}
5929fbe7 12404_ACEOF
eb697db5
DN
12405if ac_fn_c_try_link "$LINENO"; then :
12406 emacs_cv_freebsd_terminfo=yes
5929fbe7 12407else
eb697db5
DN
12408 emacs_cv_freebsd_terminfo=no
12409fi
12410rm -f core conftest.err conftest.$ac_objext \
12411 conftest$ac_exeext conftest.$ac_ext
5929fbe7 12412fi
8c5ff6dd
KR
12413
12414
eb697db5
DN
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
12416$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
12417
12418 if test $emacs_cv_freebsd_terminfo = yes; then
12419 TERMINFO=yes
12420 LIBS_TERMCAP="-lncurses"
12421 else
12422 LIBS_TERMCAP="-ltermcap"
12423 fi
5929fbe7 12424 ;;
8c5ff6dd 12425
eb697db5
DN
12426 netbsd)
12427 if test $ac_cv_search_tputs = -lterminfo; then
12428 TERMINFO=yes
12429 LIBS_TERMCAP="-lterminfo"
12430 else
12431 LIBS_TERMCAP="-ltermcap"
12432 fi
5929fbe7 12433 ;;
eb697db5 12434
5929fbe7 12435esac
a4f64981 12436
eb697db5
DN
12437case "$opsys" in
12438 ## hpux: Make sure we get select from libc rather than from libcurses
12439 ## because libcurses on HPUX 10.10 has a broken version of select.
12440 ## We used to use -lc -lcurses, but this may be cleaner.
12441 hpux*) LIBS_TERMCAP="-ltermcap" ;;
a4f64981 12442
eb697db5
DN
12443 openbsd) LIBS_TERMCAP="-lncurses" ;;
12444
12445 ## Must use system termcap, if we use any termcap. It does special things.
12446 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
12447esac
12448
12449TERMCAP_OBJ=tparam.o
12450if test $TERMINFO = yes; then
12451
12452$as_echo "#define TERMINFO 1" >>confdefs.h
8c5ff6dd 12453
5929fbe7 12454
eb697db5
DN
12455 ## Default used to be -ltermcap. Add a case above if need something else.
12456 test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
12457
12458 TERMCAP_OBJ=terminfo.o
8c5ff6dd 12459fi
5929fbe7 12460
5929fbe7 12461
eb697db5
DN
12462
12463
12464# Do we have res_init, for detecting changes in /etc/resolv.conf?
12465resolv=no
12466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12467/* end confdefs.h. */
12468#include <netinet/in.h>
12469#include <arpa/nameser.h>
12470#include <resolv.h>
12471int
12472main ()
12473{
12474return res_init();
12475 ;
12476 return 0;
12477}
5929fbe7 12478_ACEOF
eb697db5
DN
12479if ac_fn_c_try_link "$LINENO"; then :
12480 have_res_init=yes
12481else
12482 have_res_init=no
12483fi
12484rm -f core conftest.err conftest.$ac_objext \
12485 conftest$ac_exeext conftest.$ac_ext
12486if test "$have_res_init" = no; then
12487 OLIBS="$LIBS"
12488 LIBS="$LIBS -lresolv"
12489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
12490$as_echo_n "checking for res_init with -lresolv... " >&6; }
12491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12492/* end confdefs.h. */
eb697db5
DN
12493#include <netinet/in.h>
12494#include <arpa/nameser.h>
12495#include <resolv.h>
12496int
12497main ()
12498{
12499return res_init();
12500 ;
12501 return 0;
12502}
aaa36002 12503_ACEOF
eb697db5
DN
12504if ac_fn_c_try_link "$LINENO"; then :
12505 have_res_init=yes
7186fb09 12506else
eb697db5
DN
12507 have_res_init=no
12508fi
12509rm -f core conftest.err conftest.$ac_objext \
12510 conftest$ac_exeext conftest.$ac_ext
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
12512$as_echo "$have_res_init" >&6; }
12513 if test "$have_res_init" = yes ; then
12514 resolv=yes
12515 fi
12516 LIBS="$OLIBS"
6da23aaa 12517fi
bf89cb4d 12518
eb697db5 12519if test "$have_res_init" = yes; then
ca81d7a0 12520
eb697db5 12521$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
7186fb09 12522
6da23aaa 12523fi
ca81d7a0 12524
eb697db5
DN
12525# Do we need the Hesiod library to provide the support routines?
12526LIBHESIOD=
12527if test "$with_hesiod" != no ; then
12528 # Don't set $LIBS here -- see comments above. FIXME which comments?
12529 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
12530if test "x$ac_cv_func_res_send" = x""yes; then :
7186fb09 12531
aaa36002 12532else
eb697db5
DN
12533 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
12534if test "x$ac_cv_func___res_send" = x""yes; then :
6da23aaa 12535
eb697db5
DN
12536else
12537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
12538$as_echo_n "checking for res_send in -lresolv... " >&6; }
12539if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
6da23aaa
EZ
12540 $as_echo_n "(cached) " >&6
12541else
eb697db5
DN
12542 ac_check_lib_save_LIBS=$LIBS
12543LIBS="-lresolv $LIBS"
12544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12545/* end confdefs.h. */
eb697db5
DN
12546
12547/* Override any GCC internal prototype to avoid an error.
12548 Use char because int might match the return type of a GCC
12549 builtin and then its argument prototype would still apply. */
12550#ifdef __cplusplus
12551extern "C"
12552#endif
12553char res_send ();
12554int
12555main ()
12556{
12557return res_send ();
12558 ;
12559 return 0;
12560}
7186fb09 12561_ACEOF
eb697db5
DN
12562if ac_fn_c_try_link "$LINENO"; then :
12563 ac_cv_lib_resolv_res_send=yes
7186fb09 12564else
eb697db5 12565 ac_cv_lib_resolv_res_send=no
8c5ff6dd 12566fi
eb697db5
DN
12567rm -f core conftest.err conftest.$ac_objext \
12568 conftest$ac_exeext conftest.$ac_ext
12569LIBS=$ac_check_lib_save_LIBS
12570fi
12571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
12572$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
12573if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
12574 resolv=yes
12575else
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
12577$as_echo_n "checking for __res_send in -lresolv... " >&6; }
12578if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
12579 $as_echo_n "(cached) " >&6
12580else
12581 ac_check_lib_save_LIBS=$LIBS
12582LIBS="-lresolv $LIBS"
12583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12584/* end confdefs.h. */
eb697db5
DN
12585
12586/* Override any GCC internal prototype to avoid an error.
12587 Use char because int might match the return type of a GCC
12588 builtin and then its argument prototype would still apply. */
12589#ifdef __cplusplus
12590extern "C"
12591#endif
12592char __res_send ();
12593int
12594main ()
12595{
12596return __res_send ();
12597 ;
12598 return 0;
12599}
5929fbe7 12600_ACEOF
eb697db5
DN
12601if ac_fn_c_try_link "$LINENO"; then :
12602 ac_cv_lib_resolv___res_send=yes
9452ded1 12603else
eb697db5 12604 ac_cv_lib_resolv___res_send=no
aaa36002 12605fi
eb697db5
DN
12606rm -f core conftest.err conftest.$ac_objext \
12607 conftest$ac_exeext conftest.$ac_ext
12608LIBS=$ac_check_lib_save_LIBS
aaa36002 12609fi
eb697db5
DN
12610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
12611$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
12612if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
12613 resolv=yes
aaa36002 12614fi
7186fb09 12615
9452ded1 12616fi
7186fb09 12617
aaa36002 12618fi
7186fb09 12619
aaa36002 12620fi
7186fb09 12621
eb697db5
DN
12622 if test "$resolv" = yes ; then
12623 RESOLVLIB=-lresolv
12624 else
12625 RESOLVLIB=
aaa36002 12626 fi
eb697db5
DN
12627 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
12628if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
aaa36002 12629
eb697db5
DN
12630else
12631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
12632$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
12633if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
7186fb09 12634 $as_echo_n "(cached) " >&6
ba4481b5 12635else
eb697db5
DN
12636 ac_check_lib_save_LIBS=$LIBS
12637LIBS="-lhesiod $RESOLVLIB $LIBS"
12638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12639/* end confdefs.h. */
5929fbe7 12640
eb697db5
DN
12641/* Override any GCC internal prototype to avoid an error.
12642 Use char because int might match the return type of a GCC
12643 builtin and then its argument prototype would still apply. */
12644#ifdef __cplusplus
12645extern "C"
12646#endif
12647char hes_getmailhost ();
12648int
12649main ()
12650{
12651return hes_getmailhost ();
12652 ;
12653 return 0;
12654}
5929fbe7 12655_ACEOF
eb697db5
DN
12656if ac_fn_c_try_link "$LINENO"; then :
12657 ac_cv_lib_hesiod_hes_getmailhost=yes
12658else
12659 ac_cv_lib_hesiod_hes_getmailhost=no
e6df49e4 12660fi
eb697db5
DN
12661rm -f core conftest.err conftest.$ac_objext \
12662 conftest$ac_exeext conftest.$ac_ext
12663LIBS=$ac_check_lib_save_LIBS
12664fi
12665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
12666$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
12667if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
12668 hesiod=yes
5929fbe7 12669else
eb697db5 12670 :
8c5ff6dd 12671fi
a5edbe4a 12672
5929fbe7 12673fi
cd03c74a 12674
8732a4e9 12675
eb697db5 12676 if test x"$hesiod" = xyes; then
49ebbd65 12677
eb697db5 12678$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
a5edbe4a 12679
eb697db5
DN
12680 LIBHESIOD=-lhesiod
12681 fi
12682fi
e6df49e4 12683
a4f64981 12684
eb697db5
DN
12685# Do we need libresolv (due to res_init or Hesiod)?
12686if test "$resolv" = yes ; then
49ebbd65 12687
eb697db5 12688$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
15e12598 12689
eb697db5
DN
12690 LIBRESOLV=-lresolv
12691else
12692 LIBRESOLV=
12693fi
8c5ff6dd 12694
e6df49e4 12695
eb697db5
DN
12696# These tell us which Kerberos-related libraries to use.
12697COM_ERRLIB=
12698CRYPTOLIB=
12699KRB5LIB=
12700DESLIB=
12701KRB4LIB=
5929fbe7 12702
eb697db5
DN
12703if test "${with_kerberos}" != no; then
12704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
12705$as_echo_n "checking for com_err in -lcom_err... " >&6; }
12706if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
49ebbd65 12707 $as_echo_n "(cached) " >&6
cd03c74a 12708else
8c5ff6dd 12709 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12710LIBS="-lcom_err $LIBS"
12711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 12712/* end confdefs.h. */
8c5ff6dd
KR
12713
12714/* Override any GCC internal prototype to avoid an error.
12715 Use char because int might match the return type of a GCC
12716 builtin and then its argument prototype would still apply. */
12717#ifdef __cplusplus
12718extern "C"
12719#endif
eb697db5 12720char com_err ();
8c5ff6dd
KR
12721int
12722main ()
a4f64981 12723{
eb697db5 12724return com_err ();
8c5ff6dd
KR
12725 ;
12726 return 0;
49ebbd65 12727}
a5edbe4a 12728_ACEOF
eb697db5
DN
12729if ac_fn_c_try_link "$LINENO"; then :
12730 ac_cv_lib_com_err_com_err=yes
49ebbd65 12731else
eb697db5 12732 ac_cv_lib_com_err_com_err=no
8c5ff6dd 12733fi
eb697db5
DN
12734rm -f core conftest.err conftest.$ac_objext \
12735 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 12736LIBS=$ac_check_lib_save_LIBS
49ebbd65 12737fi
eb697db5
DN
12738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
12739$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
12740if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
12741 have_com_err=yes
12742else
12743 have_com_err=no
5929fbe7 12744fi
49ebbd65 12745
eb697db5
DN
12746 if test $have_com_err = yes; then
12747 COM_ERRLIB=-lcom_err
12748 LIBS="$COM_ERRLIB $LIBS"
5929fbe7 12749
eb697db5
DN
12750$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
12751
12752 fi
12753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
12754$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
12755if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
8c5ff6dd 12756 $as_echo_n "(cached) " >&6
15e12598 12757else
eb697db5
DN
12758 ac_check_lib_save_LIBS=$LIBS
12759LIBS="-lcrypto $LIBS"
12760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12761/* end confdefs.h. */
eb697db5
DN
12762
12763/* Override any GCC internal prototype to avoid an error.
12764 Use char because int might match the return type of a GCC
12765 builtin and then its argument prototype would still apply. */
12766#ifdef __cplusplus
12767extern "C"
12768#endif
12769char mit_des_cbc_encrypt ();
12770int
12771main ()
5929fbe7 12772{
eb697db5
DN
12773return mit_des_cbc_encrypt ();
12774 ;
12775 return 0;
8c5ff6dd 12776}
a4f64981 12777_ACEOF
eb697db5
DN
12778if ac_fn_c_try_link "$LINENO"; then :
12779 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
8c5ff6dd 12780else
eb697db5 12781 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
8c5ff6dd 12782fi
eb697db5
DN
12783rm -f core conftest.err conftest.$ac_objext \
12784 conftest$ac_exeext conftest.$ac_ext
12785LIBS=$ac_check_lib_save_LIBS
12786fi
12787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
12788$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
12789if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
12790 have_crypto=yes
12791else
12792 have_crypto=no
a4f64981 12793fi
15e12598 12794
eb697db5
DN
12795 if test $have_crypto = yes; then
12796 CRYPTOLIB=-lcrypto
12797 LIBS="$CRYPTOLIB $LIBS"
12798
12799$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
e6df49e4 12800
eb697db5
DN
12801 fi
12802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
12803$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
12804if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
12805 $as_echo_n "(cached) " >&6
8c5ff6dd 12806else
eb697db5
DN
12807 ac_check_lib_save_LIBS=$LIBS
12808LIBS="-lk5crypto $LIBS"
12809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12810/* end confdefs.h. */
8c5ff6dd 12811
eb697db5
DN
12812/* Override any GCC internal prototype to avoid an error.
12813 Use char because int might match the return type of a GCC
12814 builtin and then its argument prototype would still apply. */
12815#ifdef __cplusplus
12816extern "C"
12817#endif
12818char mit_des_cbc_encrypt ();
12819int
12820main ()
12821{
12822return mit_des_cbc_encrypt ();
12823 ;
12824 return 0;
12825}
5929fbe7 12826_ACEOF
eb697db5
DN
12827if ac_fn_c_try_link "$LINENO"; then :
12828 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
12829else
12830 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
12831fi
12832rm -f core conftest.err conftest.$ac_objext \
12833 conftest$ac_exeext conftest.$ac_ext
12834LIBS=$ac_check_lib_save_LIBS
12835fi
12836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
12837$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
12838if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
12839 have_k5crypto=yes
12840else
12841 have_k5crypto=no
5929fbe7 12842fi
8c5ff6dd 12843
eb697db5
DN
12844 if test $have_k5crypto = yes; then
12845 CRYPTOLIB=-lk5crypto
12846 LIBS="$CRYPTOLIB $LIBS"
5929fbe7 12847
eb697db5
DN
12848$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
12849
12850 fi
12851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
12852$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
12853if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
8c5ff6dd
KR
12854 $as_echo_n "(cached) " >&6
12855else
eb697db5
DN
12856 ac_check_lib_save_LIBS=$LIBS
12857LIBS="-lkrb5 $LIBS"
12858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12859/* end confdefs.h. */
5929fbe7 12860
eb697db5
DN
12861/* Override any GCC internal prototype to avoid an error.
12862 Use char because int might match the return type of a GCC
12863 builtin and then its argument prototype would still apply. */
12864#ifdef __cplusplus
12865extern "C"
5929fbe7 12866#endif
eb697db5
DN
12867char krb5_init_context ();
12868int
12869main ()
12870{
12871return krb5_init_context ();
12872 ;
12873 return 0;
12874}
12875_ACEOF
12876if ac_fn_c_try_link "$LINENO"; then :
12877 ac_cv_lib_krb5_krb5_init_context=yes
12878else
12879 ac_cv_lib_krb5_krb5_init_context=no
12880fi
12881rm -f core conftest.err conftest.$ac_objext \
12882 conftest$ac_exeext conftest.$ac_ext
12883LIBS=$ac_check_lib_save_LIBS
12884fi
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
12886$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
12887if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
12888 have_krb5=yes
12889else
12890 have_krb5=no
12891fi
12892
12893 if test $have_krb5=yes; then
12894 KRB5LIB=-lkrb5
12895 LIBS="$KRB5LIB $LIBS"
12896
12897$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
5929fbe7 12898
eb697db5
DN
12899 fi
12900 if test "${with_kerberos5}" = no; then
12901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
12902$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
12903if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
12904 $as_echo_n "(cached) " >&6
12905else
12906 ac_check_lib_save_LIBS=$LIBS
12907LIBS="-ldes425 $LIBS"
12908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12909/* end confdefs.h. */
aaa36002
DN
12910
12911/* Override any GCC internal prototype to avoid an error.
12912 Use char because int might match the return type of a GCC
12913 builtin and then its argument prototype would still apply. */
12914#ifdef __cplusplus
12915extern "C"
7186fb09 12916#endif
eb697db5 12917char des_cbc_encrypt ();
0ca10bb7
RC
12918int
12919main ()
12920{
eb697db5 12921return des_cbc_encrypt ();
0ca10bb7
RC
12922 ;
12923 return 0;
12924}
12925_ACEOF
eb697db5
DN
12926if ac_fn_c_try_link "$LINENO"; then :
12927 ac_cv_lib_des425_des_cbc_encrypt=yes
8c5ff6dd 12928else
eb697db5 12929 ac_cv_lib_des425_des_cbc_encrypt=no
a4f64981 12930fi
eb697db5
DN
12931rm -f core conftest.err conftest.$ac_objext \
12932 conftest$ac_exeext conftest.$ac_ext
12933LIBS=$ac_check_lib_save_LIBS
5929fbe7 12934fi
eb697db5
DN
12935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
12936$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
12937if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
12938 have_des425=yes
12939else
12940 have_des425=no
5929fbe7 12941fi
8c5ff6dd 12942
eb697db5
DN
12943 if test $have_des425 = yes; then
12944 DESLIB=-ldes425
12945 LIBS="$DESLIB $LIBS"
12946
12947$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
12948
12949 else
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
12951$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
12952if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
12953 $as_echo_n "(cached) " >&6
12954else
eb697db5
DN
12955 ac_check_lib_save_LIBS=$LIBS
12956LIBS="-ldes $LIBS"
12957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12958/* end confdefs.h. */
edfaf76d 12959
eb697db5
DN
12960/* Override any GCC internal prototype to avoid an error.
12961 Use char because int might match the return type of a GCC
12962 builtin and then its argument prototype would still apply. */
12963#ifdef __cplusplus
12964extern "C"
503d2be0 12965#endif
eb697db5 12966char des_cbc_encrypt ();
19650fd6
AS
12967int
12968main ()
12969{
eb697db5 12970return des_cbc_encrypt ();
503d2be0
AS
12971 ;
12972 return 0;
12973}
12974_ACEOF
eb697db5
DN
12975if ac_fn_c_try_link "$LINENO"; then :
12976 ac_cv_lib_des_des_cbc_encrypt=yes
8c5ff6dd 12977else
eb697db5 12978 ac_cv_lib_des_des_cbc_encrypt=no
a4f64981 12979fi
eb697db5
DN
12980rm -f core conftest.err conftest.$ac_objext \
12981 conftest$ac_exeext conftest.$ac_ext
12982LIBS=$ac_check_lib_save_LIBS
12983fi
12984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
12985$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
12986if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
12987 have_des=yes
12988else
12989 have_des=no
5929fbe7 12990fi
e6df49e4 12991
eb697db5
DN
12992 if test $have_des = yes; then
12993 DESLIB=-ldes
12994 LIBS="$DESLIB $LIBS"
a4f64981 12995
eb697db5 12996$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
5929fbe7 12997
eb697db5
DN
12998 fi
12999 fi
13000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
13001$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
13002if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
e9a63f04 13003 $as_echo_n "(cached) " >&6
ba4481b5 13004else
eb697db5
DN
13005 ac_check_lib_save_LIBS=$LIBS
13006LIBS="-lkrb4 $LIBS"
13007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13008/* end confdefs.h. */
ba4481b5 13009
0ca10bb7
RC
13010/* Override any GCC internal prototype to avoid an error.
13011 Use char because int might match the return type of a GCC
13012 builtin and then its argument prototype would still apply. */
13013#ifdef __cplusplus
13014extern "C"
a3f08d9e 13015#endif
eb697db5 13016char krb_get_cred ();
503d2be0
AS
13017int
13018main ()
13019{
eb697db5 13020return krb_get_cred ();
503d2be0
AS
13021 ;
13022 return 0;
13023}
13024_ACEOF
eb697db5
DN
13025if ac_fn_c_try_link "$LINENO"; then :
13026 ac_cv_lib_krb4_krb_get_cred=yes
bf89cb4d 13027else
eb697db5 13028 ac_cv_lib_krb4_krb_get_cred=no
91e84f96 13029fi
eb697db5
DN
13030rm -f core conftest.err conftest.$ac_objext \
13031 conftest$ac_exeext conftest.$ac_ext
13032LIBS=$ac_check_lib_save_LIBS
91e84f96 13033fi
eb697db5
DN
13034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
13035$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
13036if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
13037 have_krb4=yes
bf89cb4d 13038else
eb697db5 13039 have_krb4=no
91e84f96
GM
13040fi
13041
eb697db5
DN
13042 if test $have_krb4 = yes; then
13043 KRB4LIB=-lkrb4
13044 LIBS="$KRB4LIB $LIBS"
13045
13046$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
13047
13048 else
13049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
13050$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
13051if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
bf89cb4d 13052 $as_echo_n "(cached) " >&6
bf89cb4d 13053else
eb697db5
DN
13054 ac_check_lib_save_LIBS=$LIBS
13055LIBS="-lkrb $LIBS"
13056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13057/* end confdefs.h. */
a4f64981 13058
eb697db5
DN
13059/* Override any GCC internal prototype to avoid an error.
13060 Use char because int might match the return type of a GCC
13061 builtin and then its argument prototype would still apply. */
13062#ifdef __cplusplus
13063extern "C"
13064#endif
13065char krb_get_cred ();
13066int
13067main ()
13068{
13069return krb_get_cred ();
13070 ;
13071 return 0;
13072}
5929fbe7 13073_ACEOF
eb697db5
DN
13074if ac_fn_c_try_link "$LINENO"; then :
13075 ac_cv_lib_krb_krb_get_cred=yes
5929fbe7 13076else
eb697db5 13077 ac_cv_lib_krb_krb_get_cred=no
a4f64981 13078fi
eb697db5
DN
13079rm -f core conftest.err conftest.$ac_objext \
13080 conftest$ac_exeext conftest.$ac_ext
13081LIBS=$ac_check_lib_save_LIBS
5929fbe7 13082fi
eb697db5
DN
13083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
13084$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
13085if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
13086 have_krb=yes
91e84f96 13087else
eb697db5 13088 have_krb=no
6da23aaa 13089fi
0ca10bb7 13090
eb697db5
DN
13091 if test $have_krb = yes; then
13092 KRB4LIB=-lkrb
13093 LIBS="$KRB4LIB $LIBS"
2d2b6695 13094
eb697db5 13095$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
ca81d7a0 13096
eb697db5
DN
13097 fi
13098 fi
13099 fi
ca81d7a0 13100
eb697db5
DN
13101 if test "${with_kerberos5}" != no; then
13102 for ac_header in krb5.h
13103do :
13104 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
13105if test "x$ac_cv_header_krb5_h" = x""yes; then :
13106 cat >>confdefs.h <<_ACEOF
13107#define HAVE_KRB5_H 1
6da23aaa 13108_ACEOF
eb697db5
DN
13109 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
13110"
13111if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
13112
13113cat >>confdefs.h <<_ACEOF
13114#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 13115_ACEOF
2d2b6695 13116
eb697db5 13117
2d2b6695 13118fi
eb697db5
DN
13119ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
13120"
13121if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
6da23aaa 13122
eb697db5
DN
13123cat >>confdefs.h <<_ACEOF
13124#define HAVE_KRB5_ERROR_E_TEXT 1
13125_ACEOF
0ca10bb7 13126
0ca10bb7 13127
bf89cb4d 13128fi
2d2b6695
KS
13129
13130fi
13131
eb697db5
DN
13132done
13133
13134 else
13135 for ac_header in des.h
13136do :
13137 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
13138if test "x$ac_cv_header_des_h" = x""yes; then :
13139 cat >>confdefs.h <<_ACEOF
13140#define HAVE_DES_H 1
13141_ACEOF
8c5ff6dd 13142
eb697db5
DN
13143else
13144 for ac_header in kerberosIV/des.h
13145do :
13146 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
13147if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
13148 cat >>confdefs.h <<_ACEOF
13149#define HAVE_KERBEROSIV_DES_H 1
13150_ACEOF
6da23aaa 13151
eb697db5
DN
13152else
13153 for ac_header in kerberos/des.h
13154do :
13155 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
13156if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
13157 cat >>confdefs.h <<_ACEOF
13158#define HAVE_KERBEROS_DES_H 1
6da23aaa 13159_ACEOF
3d9fec71 13160
3d9fec71
DL
13161fi
13162
eb697db5 13163done
0ca10bb7 13164
0ca10bb7 13165fi
6da23aaa 13166
eb697db5
DN
13167done
13168
0ca10bb7 13169fi
6da23aaa 13170
eb697db5 13171done
6da23aaa 13172
eb697db5
DN
13173 for ac_header in krb.h
13174do :
13175 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
13176if test "x$ac_cv_header_krb_h" = x""yes; then :
13177 cat >>confdefs.h <<_ACEOF
13178#define HAVE_KRB_H 1
6da23aaa 13179_ACEOF
eb697db5
DN
13180
13181else
13182 for ac_header in kerberosIV/krb.h
13183do :
13184 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
13185if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
13186 cat >>confdefs.h <<_ACEOF
13187#define HAVE_KERBEROSIV_KRB_H 1
6da23aaa 13188_ACEOF
eb697db5 13189
6da23aaa 13190else
eb697db5
DN
13191 for ac_header in kerberos/krb.h
13192do :
13193 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
13194if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
13195 cat >>confdefs.h <<_ACEOF
13196#define HAVE_KERBEROS_KRB_H 1
13197_ACEOF
0ca10bb7 13198
0ca10bb7
RC
13199fi
13200
eb697db5 13201done
15e12598 13202
a4f64981 13203fi
eb697db5
DN
13204
13205done
8c5ff6dd 13206
5929fbe7 13207fi
eb697db5
DN
13208
13209done
13210
13211 fi
13212 for ac_header in com_err.h
13213do :
13214 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
13215if test "x$ac_cv_header_com_err_h" = x""yes; then :
6da23aaa 13216 cat >>confdefs.h <<_ACEOF
eb697db5 13217#define HAVE_COM_ERR_H 1
0ca10bb7
RC
13218_ACEOF
13219
13220fi
0ca10bb7 13221
6da23aaa
EZ
13222done
13223
eb697db5 13224fi
6da23aaa 13225
6da23aaa 13226
91e84f96 13227
6da23aaa 13228
6da23aaa 13229
6da23aaa
EZ
13230
13231
eb697db5
DN
13232# Solaris requires -lintl if you want strerror (which calls dgettext)
13233# to return localized messages.
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
13235$as_echo_n "checking for dgettext in -lintl... " >&6; }
13236if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
6da23aaa
EZ
13237 $as_echo_n "(cached) " >&6
13238else
eb697db5
DN
13239 ac_check_lib_save_LIBS=$LIBS
13240LIBS="-lintl $LIBS"
13241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13242/* end confdefs.h. */
eb697db5
DN
13243
13244/* Override any GCC internal prototype to avoid an error.
13245 Use char because int might match the return type of a GCC
13246 builtin and then its argument prototype would still apply. */
13247#ifdef __cplusplus
13248extern "C"
13249#endif
13250char dgettext ();
91e84f96
GM
13251int
13252main ()
6da23aaa 13253{
eb697db5 13254return dgettext ();
91e84f96
GM
13255 ;
13256 return 0;
6da23aaa
EZ
13257}
13258_ACEOF
eb697db5
DN
13259if ac_fn_c_try_link "$LINENO"; then :
13260 ac_cv_lib_intl_dgettext=yes
13261else
13262 ac_cv_lib_intl_dgettext=no
13263fi
13264rm -f core conftest.err conftest.$ac_objext \
13265 conftest$ac_exeext conftest.$ac_ext
13266LIBS=$ac_check_lib_save_LIBS
13267fi
13268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
13269$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
13270if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
13271 cat >>confdefs.h <<_ACEOF
13272#define HAVE_LIBINTL 1
8c5ff6dd 13273_ACEOF
eb697db5
DN
13274
13275 LIBS="-lintl $LIBS"
13276
13277fi
13278
13279
13280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
13281$as_echo_n "checking whether localtime caches TZ... " >&6; }
13282if test "${emacs_cv_localtime_cache+set}" = set; then :
13283 $as_echo_n "(cached) " >&6
13284else
13285 if test x$ac_cv_func_tzset = xyes; then
13286if test "$cross_compiling" = yes; then :
13287 # If we have tzset, assume the worst when cross-compiling.
13288emacs_cv_localtime_cache=yes
13289else
13290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 13291/* end confdefs.h. */
eb697db5
DN
13292#include <time.h>
13293extern char **environ;
13294unset_TZ ()
13295{
13296 char **from, **to;
13297 for (to = from = environ; (*to = *from); from++)
13298 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
13299 to++;
13300}
13301char TZ_GMT0[] = "TZ=GMT0";
13302char TZ_PST8[] = "TZ=PST8";
13303main()
13304{
13305 time_t now = time ((time_t *) 0);
13306 int hour_GMT0, hour_unset;
13307 if (putenv (TZ_GMT0) != 0)
13308 exit (1);
13309 hour_GMT0 = localtime (&now)->tm_hour;
13310 unset_TZ ();
13311 hour_unset = localtime (&now)->tm_hour;
13312 if (putenv (TZ_PST8) != 0)
13313 exit (1);
13314 if (localtime (&now)->tm_hour == hour_GMT0)
13315 exit (1);
13316 unset_TZ ();
13317 if (localtime (&now)->tm_hour != hour_unset)
13318 exit (1);
13319 exit (0);
13320}
13321_ACEOF
13322if ac_fn_c_try_run "$LINENO"; then :
13323 emacs_cv_localtime_cache=no
13324else
13325 emacs_cv_localtime_cache=yes
13326fi
13327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13328 conftest.$ac_objext conftest.beam conftest.$ac_ext
13329fi
13330
13331else
13332 # If we lack tzset, report that localtime does not cache TZ,
13333 # since we can't invalidate the cache if we don't have tzset.
13334 emacs_cv_localtime_cache=no
13335fi
13336fi
13337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
13338$as_echo "$emacs_cv_localtime_cache" >&6; }
13339if test $emacs_cv_localtime_cache = yes; then
13340
13341$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
13342
13343fi
13344
13345if test "x$HAVE_TIMEVAL" = xyes; then
13346 for ac_func in gettimeofday
13347do :
13348 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13349if test "x$ac_cv_func_gettimeofday" = x""yes; then :
13350 cat >>confdefs.h <<_ACEOF
13351#define HAVE_GETTIMEOFDAY 1
13352_ACEOF
13353
13354fi
13355done
13356
13357 if test $ac_cv_func_gettimeofday = yes; then
13358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
13359$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
13360if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
13361 $as_echo_n "(cached) " >&6
13362else
13363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13364/* end confdefs.h. */
13365
13366#ifdef TIME_WITH_SYS_TIME
13367#include <sys/time.h>
13368#include <time.h>
13369#else
13370#ifdef HAVE_SYS_TIME_H
13371#include <sys/time.h>
13372#else
13373#include <time.h>
13374#endif
13375#endif
aaa36002
DN
13376int
13377main ()
a4f64981 13378{
eb697db5
DN
13379struct timeval time;
13380 gettimeofday (&time, 0);
aaa36002
DN
13381 ;
13382 return 0;
eb697db5
DN
13383}
13384_ACEOF
13385if ac_fn_c_try_compile "$LINENO"; then :
13386 emacs_cv_gettimeofday_two_arguments=yes
e9a63f04 13387else
eb697db5 13388 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 13389fi
e9a63f04 13390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
13391fi
13392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
13393$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
13394 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 13395
eb697db5 13396$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 13397
eb697db5
DN
13398 fi
13399 fi
647847ea 13400fi
ca81d7a0 13401
eb697db5
DN
13402ok_so_far=yes
13403ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13404if test "x$ac_cv_func_socket" = x""yes; then :
13405
5929fbe7 13406else
eb697db5
DN
13407 ok_so_far=no
13408fi
503d2be0 13409
eb697db5
DN
13410if test $ok_so_far = yes; then
13411 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
13412if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
647847ea 13413
eb697db5
DN
13414else
13415 ok_so_far=no
647847ea
DL
13416fi
13417
c0d27fcc 13418
c0d27fcc 13419fi
eb697db5
DN
13420if test $ok_so_far = yes; then
13421 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
13422if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
5929fbe7 13423
eb697db5
DN
13424else
13425 ok_so_far=no
c0d27fcc 13426fi
ca81d7a0 13427
19650fd6 13428
647847ea 13429fi
eb697db5 13430if test $ok_so_far = yes; then
ca81d7a0 13431
eb697db5 13432$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
ca81d7a0 13433
647847ea 13434fi
c0d27fcc 13435
eb697db5
DN
13436for ac_header in sys/ioctl.h
13437do :
13438 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
13439if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 13440 cat >>confdefs.h <<_ACEOF
eb697db5 13441#define HAVE_SYS_IOCTL_H 1
c0d27fcc 13442_ACEOF
647847ea 13443
73b77ee5 13444fi
c0d27fcc 13445
503d2be0 13446done
73b77ee5 13447
c0d27fcc 13448
eb697db5 13449if test -f /usr/lpp/X11/bin/smt.exp; then
15e12598 13450
eb697db5 13451$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
8c5ff6dd 13452
eb697db5 13453fi
49ebbd65 13454
eb697db5
DN
13455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
13456$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
13457if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
13458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13459$as_echo "yes" >&6; }
15e12598 13460
eb697db5 13461$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
8c5ff6dd 13462
eb697db5
DN
13463else
13464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13465$as_echo "no" >&6; }
13466fi
13467
13468ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13469if test "x$ac_cv_type_pid_t" = x""yes; then :
15e12598 13470
5929fbe7 13471else
8c5ff6dd 13472
eb697db5
DN
13473cat >>confdefs.h <<_ACEOF
13474#define pid_t int
13475_ACEOF
13476
a4f64981 13477fi
8c5ff6dd 13478
eb697db5
DN
13479for ac_header in vfork.h
13480do :
13481 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13482if test "x$ac_cv_header_vfork_h" = x""yes; then :
13483 cat >>confdefs.h <<_ACEOF
13484#define HAVE_VFORK_H 1
13485_ACEOF
13486
5929fbe7 13487fi
eb697db5
DN
13488
13489done
13490
13491for ac_func in fork vfork
13492do :
13493 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13494ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9164c0e4 13495if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
c0d27fcc 13496 cat >>confdefs.h <<_ACEOF
e9a63f04 13497#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13498_ACEOF
503d2be0 13499
fa0b693c 13500fi
503d2be0 13501done
fa0b693c 13502
503d2be0 13503if test "x$ac_cv_func_fork" = xyes; then
eb697db5 13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
e9a63f04 13505$as_echo_n "checking for working fork... " >&6; }
eb697db5 13506if test "${ac_cv_func_fork_works+set}" = set; then :
e9a63f04 13507 $as_echo_n "(cached) " >&6
fa0b693c 13508else
eb697db5 13509 if test "$cross_compiling" = yes; then :
503d2be0
AS
13510 ac_cv_func_fork_works=cross
13511else
eb697db5 13512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
13513/* end confdefs.h. */
13514$ac_includes_default
13515int
13516main ()
13517{
13518
13519 /* By Ruediger Kuhlmann. */
13520 return fork () < 0;
13521
13522 ;
13523 return 0;
13524}
503d2be0 13525_ACEOF
eb697db5 13526if ac_fn_c_try_run "$LINENO"; then :
503d2be0
AS
13527 ac_cv_func_fork_works=yes
13528else
eb697db5 13529 ac_cv_func_fork_works=no
503d2be0 13530fi
eb697db5
DN
13531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13532 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 13533fi
ca81d7a0 13534
503d2be0 13535fi
eb697db5 13536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
e9a63f04 13537$as_echo "$ac_cv_func_fork_works" >&6; }
503d2be0 13538
6bae0ccf
DL
13539else
13540 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
13541fi
13542if test "x$ac_cv_func_fork_works" = xcross; then
13543 case $host in
13544 *-*-amigaos* | *-*-msdosdjgpp*)
13545 # Override, as these systems have only a dummy fork() stub
13546 ac_cv_func_fork_works=no
13547 ;;
13548 *)
13549 ac_cv_func_fork_works=yes
13550 ;;
13551 esac
eb697db5 13552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
e9a63f04 13553$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 13554fi
73b77ee5 13555ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 13556if test "x$ac_cv_func_vfork" = xyes; then
eb697db5 13557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
e9a63f04 13558$as_echo_n "checking for working vfork... " >&6; }
eb697db5 13559if test "${ac_cv_func_vfork_works+set}" = set; then :
e9a63f04 13560 $as_echo_n "(cached) " >&6
503d2be0 13561else
eb697db5 13562 if test "$cross_compiling" = yes; then :
503d2be0 13563 ac_cv_func_vfork_works=cross
fa0b693c 13564else
eb697db5 13565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13566/* end confdefs.h. */
73b77ee5 13567/* Thanks to Paul Eggert for this test. */
ca81d7a0 13568$ac_includes_default
19650fd6 13569#include <sys/wait.h>
f053c89f 13570#ifdef HAVE_VFORK_H
503d2be0 13571# include <vfork.h>
73b77ee5
GM
13572#endif
13573/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
13574 argument registers are propagated back to the parent. The compiler
13575 is told about this with #include <vfork.h>, but some compilers
13576 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13577 static variable whose address is put into a register that is
13578 clobbered by the vfork. */
19650fd6 13579static void
fa0b693c 13580#ifdef __cplusplus
73b77ee5 13581sparc_address_test (int arg)
503d2be0 13582# else
73b77ee5 13583sparc_address_test (arg) int arg;
fa0b693c 13584#endif
fa0b693c 13585{
73b77ee5
GM
13586 static pid_t child;
13587 if (!child) {
13588 child = vfork ();
13589 if (child < 0) {
13590 perror ("vfork");
13591 _exit(2);
13592 }
13593 if (!child) {
13594 arg = getpid();
13595 write(-1, "", 0);
13596 _exit (arg);
13597 }
13598 }
13599}
503d2be0
AS
13600
13601int
13602main ()
13603{
73b77ee5
GM
13604 pid_t parent = getpid ();
13605 pid_t child;
fa0b693c 13606
19650fd6 13607 sparc_address_test (0);
fa0b693c 13608
73b77ee5 13609 child = vfork ();
fa0b693c 13610
73b77ee5 13611 if (child == 0) {
503d2be0
AS
13612 /* Here is another test for sparc vfork register problems. This
13613 test uses lots of local variables, at least as many local
13614 variables as main has allocated so far including compiler
13615 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13616 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13617 reuse the register of parent for one of the local variables,
13618 since it will think that parent can't possibly be used any more
13619 in this routine. Assigning to the local variable will thus
13620 munge parent in the parent process. */
73b77ee5
GM
13621 pid_t
13622 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13623 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13624 /* Convince the compiler that p..p7 are live; otherwise, it might
13625 use the same hardware register for all 8 local variables. */
13626 if (p != p1 || p != p2 || p != p3 || p != p4
13627 || p != p5 || p != p6 || p != p7)
13628 _exit(1);
fa0b693c 13629
503d2be0
AS
13630 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13631 from child file descriptors. If the child closes a descriptor
13632 before it execs or exits, this munges the parent's descriptor
13633 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
13634 _exit(close(fileno(stdout)) != 0);
13635 } else {
13636 int status;
13637 struct stat st;
13638
13639 while (wait(&status) != child)
13640 ;
ca81d7a0 13641 return (
73b77ee5
GM
13642 /* Was there some problem with vforking? */
13643 child < 0
13644
13645 /* Did the child fail? (This shouldn't happen.) */
13646 || status
13647
13648 /* Did the vfork/compiler bug occur? */
13649 || parent != getpid()
fa0b693c 13650
73b77ee5
GM
13651 /* Did the file descriptor bug occur? */
13652 || fstat(fileno(stdout), &st) != 0
13653 );
13654 }
13655}
503d2be0 13656_ACEOF
eb697db5 13657if ac_fn_c_try_run "$LINENO"; then :
73b77ee5 13658 ac_cv_func_vfork_works=yes
fa0b693c 13659else
eb697db5 13660 ac_cv_func_vfork_works=no
503d2be0 13661fi
eb697db5
DN
13662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13663 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa0b693c 13664fi
ca81d7a0 13665
fa0b693c 13666fi
eb697db5 13667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
e9a63f04 13668$as_echo "$ac_cv_func_vfork_works" >&6; }
fa0b693c 13669
503d2be0
AS
13670fi;
13671if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 13672 ac_cv_func_vfork_works=$ac_cv_func_vfork
eb697db5 13673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
e9a63f04 13674$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
13675fi
13676
503d2be0
AS
13677if test "x$ac_cv_func_vfork_works" = xyes; then
13678
eb697db5 13679$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
503d2be0
AS
13680
13681else
13682
eb697db5 13683$as_echo "#define vfork fork" >>confdefs.h
fa0b693c
GM
13684
13685fi
503d2be0
AS
13686if test "x$ac_cv_func_fork_works" = xyes; then
13687
eb697db5 13688$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fa0b693c 13689
503d2be0 13690fi
647847ea 13691
c0d27fcc 13692
eb697db5 13693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
e9a63f04 13694$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
eb697db5 13695if test "${emacs_cv_langinfo_codeset+set}" = set; then :
e9a63f04 13696 $as_echo_n "(cached) " >&6
6a3a24fa 13697else
eb697db5 13698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13699/* end confdefs.h. */
6a3a24fa
JD
13700#include <langinfo.h>
13701int
13702main ()
13703{
13704char* cs = nl_langinfo(CODESET);
15e12598
VB
13705 ;
13706 return 0;
8c5ff6dd 13707}
eb697db5
DN
13708_ACEOF
13709if ac_fn_c_try_link "$LINENO"; then :
13710 emacs_cv_langinfo_codeset=yes
5929fbe7 13711else
eb697db5 13712 emacs_cv_langinfo_codeset=no
8c5ff6dd 13713fi
eb697db5
DN
13714rm -f core conftest.err conftest.$ac_objext \
13715 conftest$ac_exeext conftest.$ac_ext
a4f64981 13716
eb697db5
DN
13717fi
13718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
13719$as_echo "$emacs_cv_langinfo_codeset" >&6; }
13720if test $emacs_cv_langinfo_codeset = yes; then
5929fbe7 13721
eb697db5 13722$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
e9a63f04 13723
8730a8da 13724fi
dc2933eb 13725
eb697db5
DN
13726ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13727if test "x$ac_cv_type_size_t" = x""yes; then :
503d2be0 13728
c0d27fcc
MR
13729cat >>confdefs.h <<_ACEOF
13730#define HAVE_SIZE_T 1
13731_ACEOF
13732
8730a8da
DL
13733
13734fi
13735
c0d27fcc 13736
eb697db5 13737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
e9a63f04 13738$as_echo_n "checking for mbstate_t... " >&6; }
eb697db5 13739if test "${ac_cv_type_mbstate_t+set}" = set; then :
e9a63f04 13740 $as_echo_n "(cached) " >&6
973a76b1 13741else
eb697db5 13742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13743/* end confdefs.h. */
973a76b1
DL
13744$ac_includes_default
13745# include <wchar.h>
13746int
13747main ()
13748{
13749mbstate_t x; return sizeof x;
13750 ;
13751 return 0;
13752}
13753_ACEOF
eb697db5 13754if ac_fn_c_try_compile "$LINENO"; then :
973a76b1
DL
13755 ac_cv_type_mbstate_t=yes
13756else
eb697db5 13757 ac_cv_type_mbstate_t=no
973a76b1 13758fi
ca81d7a0 13759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 13760fi
eb697db5 13761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
e9a63f04 13762$as_echo "$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
13763 if test $ac_cv_type_mbstate_t = yes; then
13764
eb697db5 13765$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
973a76b1
DL
13766
13767 else
13768
eb697db5 13769$as_echo "#define mbstate_t int" >>confdefs.h
973a76b1
DL
13770
13771 fi
13772
eb697db5 13773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
e9a63f04 13774$as_echo_n "checking for C restrict keyword... " >&6; }
eb697db5 13775if test "${emacs_cv_c_restrict+set}" = set; then :
e9a63f04 13776 $as_echo_n "(cached) " >&6
22044edf 13777else
eb697db5 13778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13779/* end confdefs.h. */
22044edf
DL
13780void fred (int *restrict x);
13781int
13782main ()
13783{
b936fae4 13784
22044edf
DL
13785 ;
13786 return 0;
13787}
c0d27fcc 13788_ACEOF
eb697db5 13789if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13790 emacs_cv_c_restrict=yes
13791else
eb697db5 13792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13793/* end confdefs.h. */
22044edf
DL
13794void fred (int *__restrict x);
13795int
13796main ()
13797{
c0d27fcc 13798
22044edf
DL
13799 ;
13800 return 0;
13801}
c0d27fcc 13802_ACEOF
eb697db5 13803if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13804 emacs_cv_c_restrict=__restrict
13805else
eb697db5 13806 emacs_cv_c_restrict=no
ba4481b5 13807fi
ca81d7a0 13808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13809fi
ca81d7a0 13810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13811fi
eb697db5 13812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
e9a63f04 13813$as_echo "$emacs_cv_c_restrict" >&6; }
22044edf
DL
13814case "$emacs_cv_c_restrict" in
13815 yes) emacs_restrict=restrict;;
13816 no) emacs_restrict="";;
13817 *) emacs_restrict="$emacs_cv_c_restrict";;
13818esac
13819if test "$emacs_restrict" != __restrict; then
b936fae4 13820
22044edf
DL
13821cat >>confdefs.h <<_ACEOF
13822#define __restrict $emacs_restrict
c0d27fcc 13823_ACEOF
ba4481b5
DL
13824
13825fi
ba4481b5 13826
eb697db5 13827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
e9a63f04 13828$as_echo_n "checking for C restricted array declarations... " >&6; }
eb697db5 13829if test "${emacs_cv_c_restrict_arr+set}" = set; then :
e9a63f04 13830 $as_echo_n "(cached) " >&6
22044edf 13831else
eb697db5 13832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13833/* end confdefs.h. */
22044edf
DL
13834void fred (int x[__restrict]);
13835int
13836main ()
13837{
b936fae4 13838
22044edf
DL
13839 ;
13840 return 0;
13841}
c0d27fcc 13842_ACEOF
eb697db5 13843if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13844 emacs_cv_c_restrict_arr=yes
13845else
eb697db5 13846 emacs_cv_c_restrict_arr=no
ba4481b5 13847fi
ca81d7a0 13848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 13849fi
eb697db5 13850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
e9a63f04 13851$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22044edf 13852if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 13853
eb697db5 13854$as_echo "#define __restrict_arr __restrict" >>confdefs.h
ba4481b5 13855
ba4481b5
DL
13856fi
13857
c0d27fcc 13858
c0d27fcc 13859
22044edf
DL
13860# Set up the CFLAGS for real compilation, so we can substitute it.
13861CFLAGS="$REAL_CFLAGS"
13862CPPFLAGS="$REAL_CPPFLAGS"
13863
9978c06c
CY
13864## Hack to detect a buggy GCC version.
13865if test "x$GCC" = xyes \
13866 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
13867 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
13868 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
9164c0e4 13869 as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
9978c06c
CY
13870fi
13871
22044edf 13872#### Find out which version of Emacs this is.
8c5ff6dd 13873version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \
22044edf
DL
13874 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
13875if test x"${version}" = x; then
9164c0e4 13876 as_fn_error $? "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5
22044edf 13877fi
879de935 13878if test x"${version}" != x"$PACKAGE_VERSION"; then
eb697db5 13879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5
8c5ff6dd 13880$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;}
879de935 13881fi
22044edf
DL
13882
13883### Specify what sort of things we'll be editing into Makefile and config.h.
13884### Use configuration here uncanonicalized to avoid exceeding size limits.
13885
13886
4286c48d 13887## Unused?
22044edf
DL
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
22044edf 13907
4286c48d
GM
13908## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
13909## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
13910## end of LIBX_BASE, but nothing ever set it.
22044edf
DL
13911
13912
13913
13914
c82a7244 13915## Used in lwlib/Makefile.in.
22044edf
DL
13916
13917
6a3a24fa 13918
06b62770
AR
13919
13920
13921
48fad8e8
DN
13922
13923
5e159d07
CY
13924
13925
edfda783 13926
91231421 13927
22044edf
DL
13928cat >>confdefs.h <<_ACEOF
13929#define EMACS_CONFIGURATION "${canonical}"
13930_ACEOF
13931
13932
13933cat >>confdefs.h <<_ACEOF
13934#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
13935_ACEOF
13936
13937
13938cat >>confdefs.h <<_ACEOF
13939#define config_machfile "${machfile}"
13940_ACEOF
13941
13942
13943cat >>confdefs.h <<_ACEOF
13944#define config_opsysfile "${opsysfile}"
13945_ACEOF
13946
13947
e765bf58
JD
13948XMENU_OBJ=
13949XOBJ=
5929fbe7 13950FONT_OBJ=
22044edf
DL
13951if test "${HAVE_X_WINDOWS}" = "yes" ; then
13952
eb697db5 13953$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
22044edf 13954
e765bf58
JD
13955 XMENU_OBJ=xmenu.o
13956 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
5929fbe7
GM
13957 FONT_OBJ=xfont.o
13958 if test "$HAVE_XFT" = "yes"; then
13959 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
13960 elif test "$HAVE_FREETYPE" = "yes"; then
13961 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
13962 fi
13963
22044edf 13964fi
e765bf58
JD
13965
13966
13967
5929fbe7 13968
7186fb09 13969WIDGET_OBJ=
c82a7244 13970MOTIF_LIBW=
22044edf 13971if test "${USE_X_TOOLKIT}" != "none" ; then
7186fb09 13972 WIDGET_OBJ=widget.o
22044edf 13973
eb697db5 13974$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
22044edf 13975
39dd4d52 13976 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5 13977
eb697db5 13978$as_echo "#define USE_LUCID 1" >>confdefs.h
73d798d5 13979
39dd4d52 13980 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5 13981
eb697db5 13982$as_echo "#define USE_MOTIF 1" >>confdefs.h
73d798d5 13983
c82a7244
GM
13984 MOTIF_LIBW=-lXm
13985 case "$opsys" in
13986 gnu-linux)
13987 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
13988 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
13989 ;;
13990
13991 unixware)
13992 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
13993 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
13994 MOTIF_LIBW="MOTIF_LIBW -lXimp"
13995 ;;
13996
13997 aix4-2)
13998 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
13999 MOTIF_LIBW="$MOTIF_LIBW -li18n"
14000 ;;
14001 esac
14002 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
73d798d5 14003 fi
22044edf 14004fi
7186fb09 14005
c82a7244 14006
718a19c8 14007TOOLKIT_LIBW=
c82a7244
GM
14008case "$USE_X_TOOLKIT" in
14009 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
14010 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
718a19c8 14011 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
c82a7244
GM
14012esac
14013
14014
a5edbe4a
GM
14015if test "$USE_X_TOOLKIT" = "none"; then
14016 LIBXT_OTHER="\$(LIBXSM)"
8b44daa0 14017 OLDXMENU_TARGET="really-oldXMenu"
a5edbe4a
GM
14018else
14019 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
8b44daa0 14020 OLDXMENU_TARGET="really-lwlib"
a5edbe4a
GM
14021fi
14022
14023
718a19c8
GM
14024## The X Menu stuff is present in the X10 distribution, but missing
14025## from X11. If we have X10, just use the installed library;
14026## otherwise, use our own copy.
22044edf
DL
14027if test "${HAVE_X11}" = "yes" ; then
14028
eb697db5 14029$as_echo "#define HAVE_X11 1" >>confdefs.h
22044edf 14030
718a19c8
GM
14031
14032 if test "$USE_X_TOOLKIT" = "none"; then
14033 OLDXMENU="\${oldXMenudir}libXMenu11.a"
14034 else
14035 OLDXMENU="\${lwlibdir}liblw.a"
14036 fi
14037 LIBXMENU="\$(OLDXMENU)"
a5edbe4a 14038 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16455a85 14039 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
718a19c8 14040else
298b8a34
GM
14041 ## For a syntactically valid Makefile; not actually used for anything.
14042 ## See comments in src/Makefile.in.
14043 OLDXMENU=nothing
1dea46de
GM
14044 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
14045 if test "${HAVE_X_WINDOWS}" = "yes"; then
14046 LIBXMENU="-lXMenu"
14047 else
14048 LIBXMENU=
14049 fi
a5edbe4a 14050 LIBX_OTHER=
16455a85 14051 OLDXMENU_DEPS=
22044edf 14052fi
718a19c8 14053
4286c48d 14054if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
298b8a34
GM
14055 OLDXMENU_TARGET=
14056 OLDXMENU=nothing
718a19c8 14057 LIBXMENU=
16455a85 14058 OLDXMENU_DEPS=
718a19c8
GM
14059fi
14060
14061
14062
14063
a5edbe4a 14064
16455a85 14065
298b8a34 14066
22044edf
DL
14067if test "${HAVE_MENUS}" = "yes" ; then
14068
eb697db5 14069$as_echo "#define HAVE_MENUS 1" >>confdefs.h
22044edf
DL
14070
14071fi
4f91d9c8 14072
22044edf
DL
14073if test "${GNU_MALLOC}" = "yes" ; then
14074
eb697db5 14075$as_echo "#define GNU_MALLOC 1" >>confdefs.h
22044edf
DL
14076
14077fi
4f91d9c8
GM
14078
14079RALLOC_OBJ=
22044edf
DL
14080if test "${REL_ALLOC}" = "yes" ; then
14081
eb697db5 14082$as_echo "#define REL_ALLOC 1" >>confdefs.h
22044edf 14083
4f91d9c8
GM
14084
14085 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
22044edf
DL
14086fi
14087
718a19c8 14088
718a19c8
GM
14089if test "$opsys" = "cygwin"; then
14090 CYGWIN_OBJ="sheap.o"
14091 ## Cygwin differs because of its unexec().
7acac9f4 14092 PRE_ALLOC_OBJ=
4f91d9c8 14093 POST_ALLOC_OBJ=lastfile.o
718a19c8
GM
14094else
14095 CYGWIN_OBJ=
7acac9f4 14096 PRE_ALLOC_OBJ=lastfile.o
4f91d9c8 14097 POST_ALLOC_OBJ=
718a19c8
GM
14098fi
14099
106c6f74 14100
22044edf
DL
14101
14102
c0d27fcc 14103
ede4834a
GM
14104case "$opsys" in
14105 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
14106
14107 darwin)
a0c06748
GM
14108 ## The -headerpad option tells ld (see man page) to leave room at the
14109 ## end of the header for adding load commands. Needed for dumping.
14110 ## 0x690 is the total size of 30 segment load commands (at 56
14111 ## each); under Cocoa 31 commands are required.
14112 if test "$HAVE_NS" = "yes"; then
14113 libs_nsgui="-framework AppKit"
14114 headerpad_extra=6C8
14115 else
14116 libs_nsgui=
14117 headerpad_extra=690
14118 fi
14119 LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
14120
14121 ## This is here because src/Makefile.in did some extra fiddling around
14122 ## with LD_SWITCH_SYSTEM. The cpp logic was:
14123 ## #ifndef LD_SWITCH_SYSTEM
14124 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
14125 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
14126 ## not using gcc, darwin system not on an alpha (ie darwin, since
14127 ## darwin + alpha does not occur).
14128 ## Because this was done in src/Makefile.in, the resulting part of
14129 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
14130 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
14131 ## rather than LD_SWITCH_SYSTEM.
14132 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
14133 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
14134 ;;
14135
14136 ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
14137 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
14138 ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
14139 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
14140 ## had different values in configure (in ac_link) and src/Makefile.in.
14141 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
14142 gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
ede4834a
GM
14143
14144 *) LD_SWITCH_SYSTEM_TEMACS= ;;
14145esac
14146
a25e81b3 14147if test "$NS_IMPL_GNUSTEP" = "yes"; then
7dddde4b
GM
14148 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
14149fi
14150
14151
ede4834a
GM
14152
14153
ebbc2619
GM
14154LINKER=
14155ORDINARY_LINK=
14156case "$opsys" in
14157 ## gnu: GNU needs its own crt0.
3a876c9d 14158 aix4-2|cygwin|darwin|gnu|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
ebbc2619
GM
14159
14160 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
14161 ## library search parth, i.e. it won't search /usr/lib for libc and
14162 ## friends. Using -nostartfiles instead avoids this problem, and
14163 ## will also work on earlier NetBSD releases.
14164 netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;;
14165
14166 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
14167 ## MkLinux/LinuxPPC needs this.
14168 ## ibms390x only supports opsys = gnu-linux so it can be added here.
14169 gnu-*)
14170 case "$machine" in
14171 macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;;
14172 esac
14173 ;;
14174esac
14175
90278cb6 14176
ebbc2619
GM
14177if test "x$ORDINARY_LINK" = "xyes"; then
14178
14179 LINKER="\$(CC)"
14180
eb697db5 14181$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
ebbc2619
GM
14182
14183
14184## The system files defining neither ORDINARY_LINK nor LINKER are:
14185## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*.
14186elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
14187
14188 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
14189 ## places that are difficult to figure out at make time. Fortunately,
14190 ## these same versions allow you to pass arbitrary flags on to the
14191 ## linker, so there is no reason not to use it as a linker.
14192 ##
14193 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
14194 ## searching for libraries in its internal directories, so we have to
14195 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
14196 LINKER="\$(CC) -nostdlib"
ebbc2619
GM
14197fi
14198
ebbc2619 14199test "x$LINKER" = "x" && LINKER=ld
81ac4f35 14200## FIXME? What setting of EDIT_LDFLAGS should this have?
ebbc2619
GM
14201test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
14202
14203
14204
14205
81ac4f35
GM
14206## FIXME? The logic here is not precisely the same as that above.
14207## There is no check here for a pre-defined LINKER.
14208## Should we only be setting LIB_GCC if LD ~ -nostdlib?
057886a3 14209LIB_GCC=
ebbc2619 14210if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
057886a3
GM
14211
14212 case "$opsys" in
12a25125 14213 freebsd|netbsd|openbsd) LIB_GCC= ;;
057886a3
GM
14214
14215 gnu-*)
14216 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
14217 ## build on ARM EABI under GNU/Linux. (Bug#5518)
14218 ## Note that m/arm.h never bothered to undefine LIB_GCC first.
14219 if test "$machine" = "arm"; then
14220 LIB_GCC="-lgcc_s"
14221 else
14222 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
14223 ## immediately undefine it again and redefine it to empty.
14224 ## Was the C_SWITCH_X_SITE part really necessary?
3536f993 14225## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
057886a3
GM
14226 LIB_GCC=
14227 fi
14228 ;;
14229
14230 ## Ask GCC where to find libgcc.a.
3536f993 14231 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
057886a3
GM
14232 esac
14233fi
14234
14235
372b4090
GM
14236TOOLTIP_SUPPORT=
14237WINDOW_SUPPORT=
14238## If we're using X11/GNUstep, define some consequences.
14239if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
14240
eb697db5 14241$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
372b4090
GM
14242
14243
eb697db5 14244$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
372b4090
GM
14245
14246 MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
14247 TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
14248
14249 WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
14250 test "$HAVE_X_WINDOWS" = "yes" && \
14251 WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
14252
14253fi
14254
14255
14256
14257
14258
e6df49e4
GM
14259
14260
ba4481b5 14261#### Report on what we decided to do.
488dd4c4
JD
14262#### Report GTK as a toolkit, even if it doesn't use Xt.
14263#### It makes printing result more understandable as using GTK sets
14264#### toolkit_scroll_bars to yes by default.
14265if test "${HAVE_GTK}" = "yes"; then
14266 USE_X_TOOLKIT=GTK
14267fi
14268
ba4481b5
DL
14269echo "
14270Configured for \`${canonical}'.
14271
14272 Where should the build process find the source code? ${srcdir}
14273 What operating system and machine description files should Emacs use?
14274 \`${opsysfile}' and \`${machfile}'
14275 What compiler should emacs be built with? ${CC} ${CFLAGS}
14276 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 14277 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 14278 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 14279 What window system should Emacs use? ${window_system}
8e967cf7 14280 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
14281
14282if test -n "${x_includes}"; then
14283echo " Where do we find X Windows header files? ${x_includes}"
14284else
14285echo " Where do we find X Windows header files? Standard dirs"
14286fi
14287if test -n "${x_libraries}"; then
14288echo " Where do we find X Windows libraries? ${x_libraries}"
14289else
14290echo " Where do we find X Windows libraries? Standard dirs"
14291fi
14292
14293echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
14294echo " Does Emacs use -lXpm? ${HAVE_XPM}"
14295echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
14296echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
91e84f96 14297echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
ba4481b5 14298echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 14299echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 14300echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 14301echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
637fa988 14302echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
022c122a 14303echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
2ee27f27 14304
edfda783
AR
14305echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
14306echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
14307echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
14308echo " Does Emacs use -lxft? ${HAVE_XFT}"
14309
8d87199b 14310echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
14311echo
14312
d0098f13
JD
14313if test $USE_XASSERTS = yes; then
14314 echo " Compiling with asserts turned on."
d0098f13 14315 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 14316fi
05cf15c6 14317
ca34d75a
JD
14318echo
14319
06b62770
AR
14320if test "$HAVE_NS" = "yes"; then
14321 echo
14322 echo "You must run \"make install\" in order to test the built application.
14323The installed application will go to nextstep/Emacs.app and can be
14324run or moved from there."
14325 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
14326 echo "The application will be fully self-contained."
14327 else
14328 echo "The lisp resources for the application will be installed under ${prefix}.
14329You may need to run \"make install\" with sudo. The application will fail
14330to run if these resources are not installed."
14331 fi
14332 echo
14333fi
14334
131e4133
MA
14335if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
14336 echo "D-Bus integration has been tested for GNU/Linux only."
14337 echo
14338fi
14339
05cf15c6 14340
ba4481b5
DL
14341# Remove any trailing slashes in these variables.
14342test "${prefix}" != NONE &&
14343 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
14344test "${exec_prefix}" != NONE &&
14345 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
14346
81ac4f35 14347ac_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
14348
14349ac_config_commands="$ac_config_commands default"
14350
503d2be0 14351cat >confcache <<\_ACEOF
ba4481b5
DL
14352# This file is a shell script that caches the results of configure
14353# tests run on this system so they can be shared between configure
503d2be0
AS
14354# scripts and configure runs, see configure's option --config-cache.
14355# It is not useful on other systems. If it contains results you don't
14356# want to keep, you may remove or edit it.
ba4481b5 14357#
503d2be0
AS
14358# config.status only pays attention to the cache file if you give it
14359# the --recheck option to rerun configure.
ba4481b5 14360#
6bae0ccf 14361# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
14362# loading this file, other *unset* `ac_cv_foo' will be assigned the
14363# following values.
14364
14365_ACEOF
14366
ba4481b5
DL
14367# The following way of writing the cache mishandles newlines in values,
14368# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 14369# So, we kill variables containing newlines.
ba4481b5
DL
14370# Ultrix sh set writes to stderr and can't be redirected directly,
14371# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
14372(
14373 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14374 eval ac_val=\$$ac_var
14375 case $ac_val in #(
14376 *${as_nl}*)
14377 case $ac_var in #(
eb697db5
DN
14378 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14379$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
14380 esac
14381 case $ac_var in #(
14382 _ | IFS | as_nl) ;; #(
e9a63f04 14383 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
eb697db5 14384 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
14385 esac ;;
14386 esac
14387 done
14388
503d2be0 14389 (set) 2>&1 |
ca81d7a0
JD
14390 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14391 *${as_nl}ac_space=\ *)
eb697db5
DN
14392 # `set' does not quote correctly, so add quotes: double-quote
14393 # substitution turns \\\\ into \\, and sed turns \\ into \.
503d2be0 14394 sed -n \
edfaf76d
LK
14395 "s/'/'\\\\''/g;
14396 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 14397 ;; #(
503d2be0
AS
14398 *)
14399 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 14400 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 14401 ;;
ca81d7a0
JD
14402 esac |
14403 sort
14404) |
503d2be0 14405 sed '
ca81d7a0 14406 /^ac_cv_env_/b end
503d2be0 14407 t clear
ca81d7a0 14408 :clear
503d2be0
AS
14409 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14410 t end
ca81d7a0
JD
14411 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14412 :end' >>confcache
14413if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14414 if test -w "$cache_file"; then
14415 test "x$cache_file" != "x/dev/null" &&
eb697db5 14416 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
e9a63f04 14417$as_echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 14418 cat confcache >$cache_file
ba4481b5 14419 else
eb697db5 14420 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
e9a63f04 14421$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
14422 fi
14423fi
14424rm -f confcache
14425
ba4481b5
DL
14426test "x$prefix" = xNONE && prefix=$ac_default_prefix
14427# Let make expand exec_prefix.
14428test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14429
ba4481b5
DL
14430DEFS=-DHAVE_CONFIG_H
14431
6bae0ccf
DL
14432ac_libobjs=
14433ac_ltlibobjs=
9164c0e4 14434U=
6bae0ccf
DL
14435for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14436 # 1. Remove the extension, and $U if already installed.
ca81d7a0 14437 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 14438 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
14439 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14440 # will be set to the directory where LIBOBJS objects are built.
eb697db5
DN
14441 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14442 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
14443done
14444LIBOBJS=$ac_libobjs
14445
14446LTLIBOBJS=$ac_ltlibobjs
14447
14448
c0d27fcc 14449
ba4481b5 14450: ${CONFIG_STATUS=./config.status}
e9a63f04 14451ac_write_fail=0
503d2be0
AS
14452ac_clean_files_save=$ac_clean_files
14453ac_clean_files="$ac_clean_files $CONFIG_STATUS"
eb697db5 14454{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 14455$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
eb697db5
DN
14456as_write_fail=0
14457cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 14458#! $SHELL
c0d27fcc 14459# Generated by $as_me.
ba4481b5 14460# Run this file to recreate the current configuration.
ba4481b5 14461# Compiler output produced by configure, useful for debugging
503d2be0 14462# configure, is in config.log if it exists.
ba4481b5 14463
503d2be0 14464debug=false
19650fd6
AS
14465ac_cs_recheck=false
14466ac_cs_silent=false
5929fbe7 14467
eb697db5
DN
14468SHELL=\${CONFIG_SHELL-$SHELL}
14469export SHELL
14470_ASEOF
14471cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14472## -------------------- ##
14473## M4sh Initialization. ##
14474## -------------------- ##
c0d27fcc 14475
f053c89f
CY
14476# Be more Bourne compatible
14477DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 14478if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
14479 emulate sh
14480 NULLCMD=:
e9a63f04 14481 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
14482 # is contrary to our usage. Disable this feature.
14483 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
14484 setopt NO_GLOB_SUBST
14485else
eb697db5
DN
14486 case `(set -o) 2>/dev/null` in #(
14487 *posix*) :
14488 set -o posix ;; #(
14489 *) :
14490 ;;
f053c89f 14491esac
503d2be0 14492fi
f053c89f
CY
14493
14494
e9a63f04
GM
14495as_nl='
14496'
14497export as_nl
14498# Printing a long string crashes Solaris 7 /usr/bin/printf.
14499as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14500as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14501as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
14502# Prefer a ksh shell builtin over an external printf program on Solaris,
14503# but without wasting forks for bash or zsh.
14504if test -z "$BASH_VERSION$ZSH_VERSION" \
14505 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14506 as_echo='print -r --'
14507 as_echo_n='print -rn --'
14508elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
14509 as_echo='printf %s\n'
14510 as_echo_n='printf %s'
14511else
14512 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14513 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14514 as_echo_n='/usr/ucb/echo -n'
7bbec45b 14515 else
e9a63f04
GM
14516 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14517 as_echo_n_body='eval
14518 arg=$1;
eb697db5 14519 case $arg in #(
e9a63f04
GM
14520 *"$as_nl"*)
14521 expr "X$arg" : "X\\(.*\\)$as_nl";
14522 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14523 esac;
14524 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14525 '
14526 export as_echo_n_body
14527 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 14528 fi
e9a63f04
GM
14529 export as_echo_body
14530 as_echo='sh -c $as_echo_body as_echo'
14531fi
14532
14533# The user is always right.
14534if test "${PATH_SEPARATOR+set}" != set; then
14535 PATH_SEPARATOR=:
14536 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14537 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14538 PATH_SEPARATOR=';'
14539 }
503d2be0
AS
14540fi
14541
6bae0ccf 14542
ca81d7a0
JD
14543# IFS
14544# We need space, tab and new line, in precisely that order. Quoting is
14545# there to prevent editors from complaining about space-tab.
14546# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14547# splitting by setting IFS to empty value.)
ca81d7a0
JD
14548IFS=" "" $as_nl"
14549
14550# Find who we are. Look in the path if we contain no directory separator.
eb697db5 14551case $0 in #((
ca81d7a0
JD
14552 *[\\/]* ) as_myself=$0 ;;
14553 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14554for as_dir in $PATH
14555do
14556 IFS=$as_save_IFS
14557 test -z "$as_dir" && as_dir=.
eb697db5
DN
14558 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14559 done
ca81d7a0
JD
14560IFS=$as_save_IFS
14561
14562 ;;
14563esac
14564# We did not find ourselves, most probably we were run as `sh COMMAND'
14565# in which case we are not to be found in the path.
14566if test "x$as_myself" = x; then
14567 as_myself=$0
14568fi
14569if test ! -f "$as_myself"; then
e9a63f04 14570 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 14571 exit 1
ca81d7a0
JD
14572fi
14573
eb697db5
DN
14574# Unset variables that we do not need and which cause bugs (e.g. in
14575# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14576# suppresses any "Segmentation fault" message there. '((' could
14577# trigger a bug in pdksh 5.2.14.
14578for as_var in BASH_ENV ENV MAIL MAILPATH
14579do eval test x\${$as_var+set} = xset \
14580 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 14581done
6bae0ccf
DL
14582PS1='$ '
14583PS2='> '
14584PS4='+ '
14585
14586# NLS nuisances.
e9a63f04
GM
14587LC_ALL=C
14588export LC_ALL
14589LANGUAGE=C
14590export LANGUAGE
6bae0ccf 14591
eb697db5
DN
14592# CDPATH.
14593(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14594
14595
9164c0e4
AS
14596# as_fn_error STATUS ERROR [LINENO LOG_FD]
14597# ----------------------------------------
eb697db5
DN
14598# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14599# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9164c0e4 14600# script with STATUS, using 1 if that was 0.
eb697db5
DN
14601as_fn_error ()
14602{
9164c0e4
AS
14603 as_status=$1; test $as_status -eq 0 && as_status=1
14604 if test "$4"; then
14605 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14606 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
eb697db5 14607 fi
9164c0e4 14608 $as_echo "$as_me: error: $2" >&2
eb697db5
DN
14609 as_fn_exit $as_status
14610} # as_fn_error
14611
14612
14613# as_fn_set_status STATUS
14614# -----------------------
14615# Set $? to STATUS, without forking.
14616as_fn_set_status ()
14617{
14618 return $1
14619} # as_fn_set_status
14620
14621# as_fn_exit STATUS
14622# -----------------
14623# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14624as_fn_exit ()
14625{
14626 set +e
14627 as_fn_set_status $1
14628 exit $1
14629} # as_fn_exit
14630
14631# as_fn_unset VAR
14632# ---------------
14633# Portably unset VAR.
14634as_fn_unset ()
14635{
14636 { eval $1=; unset $1;}
14637}
14638as_unset=as_fn_unset
14639# as_fn_append VAR VALUE
14640# ----------------------
14641# Append the text in VALUE to the end of the definition contained in VAR. Take
14642# advantage of any shell optimizations that allow amortized linear growth over
14643# repeated appends, instead of the typical quadratic growth present in naive
14644# implementations.
14645if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14646 eval 'as_fn_append ()
14647 {
14648 eval $1+=\$2
14649 }'
14650else
14651 as_fn_append ()
14652 {
14653 eval $1=\$$1\$2
14654 }
14655fi # as_fn_append
14656
14657# as_fn_arith ARG...
14658# ------------------
14659# Perform arithmetic evaluation on the ARGs, and store the result in the
14660# global $as_val. Take advantage of shells that can avoid forks. The arguments
14661# must be portable across $(()) and expr.
14662if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14663 eval 'as_fn_arith ()
14664 {
14665 as_val=$(( $* ))
14666 }'
14667else
14668 as_fn_arith ()
14669 {
14670 as_val=`expr "$@" || test $? -eq 1`
14671 }
14672fi # as_fn_arith
14673
14674
ca81d7a0
JD
14675if expr a : '\(a\)' >/dev/null 2>&1 &&
14676 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
14677 as_expr=expr
14678else
14679 as_expr=false
14680fi
14681
ca81d7a0 14682if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
14683 as_basename=basename
14684else
14685 as_basename=false
14686fi
c0d27fcc 14687
eb697db5
DN
14688if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14689 as_dirname=dirname
14690else
14691 as_dirname=false
14692fi
c0d27fcc 14693
ca81d7a0 14694as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
14695$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14696 X"$0" : 'X\(//\)$' \| \
ca81d7a0 14697 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 14698$as_echo X/"$0" |
ca81d7a0
JD
14699 sed '/^.*\/\([^/][^/]*\)\/*$/{
14700 s//\1/
14701 q
14702 }
14703 /^X\/\(\/\/\)$/{
14704 s//\1/
14705 q
14706 }
14707 /^X\/\(\/\).*/{
14708 s//\1/
14709 q
14710 }
14711 s/.*/./; q'`
c0d27fcc 14712
eb697db5
DN
14713# Avoid depending upon Character Ranges.
14714as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14715as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14716as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14717as_cr_digits='0123456789'
14718as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
14719
14720ECHO_C= ECHO_N= ECHO_T=
eb697db5 14721case `echo -n x` in #(((((
ca81d7a0 14722-n*)
eb697db5 14723 case `echo 'xy\c'` in
ca81d7a0 14724 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
eb697db5
DN
14725 xy) ECHO_C='\c';;
14726 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14727 ECHO_T=' ';;
ca81d7a0
JD
14728 esac;;
14729*)
14730 ECHO_N='-n';;
c0d27fcc 14731esac
503d2be0
AS
14732
14733rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
14734if test -d conf$$.dir; then
14735 rm -f conf$$.dir/conf$$.file
14736else
14737 rm -f conf$$.dir
e9a63f04
GM
14738 mkdir conf$$.dir 2>/dev/null
14739fi
14740if (echo >conf$$.file) 2>/dev/null; then
14741 if ln -s conf$$.file conf$$ 2>/dev/null; then
14742 as_ln_s='ln -s'
14743 # ... but there are two gotchas:
14744 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14745 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14746 # In both cases, we have to default to `cp -p'.
14747 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14748 as_ln_s='cp -p'
14749 elif ln conf$$.file conf$$ 2>/dev/null; then
14750 as_ln_s=ln
14751 else
503d2be0 14752 as_ln_s='cp -p'
e9a63f04 14753 fi
503d2be0
AS
14754else
14755 as_ln_s='cp -p'
14756fi
ca81d7a0
JD
14757rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14758rmdir conf$$.dir 2>/dev/null
503d2be0 14759
eb697db5
DN
14760
14761# as_fn_mkdir_p
14762# -------------
14763# Create "$as_dir" as a directory, including parents if necessary.
14764as_fn_mkdir_p ()
14765{
14766
14767 case $as_dir in #(
14768 -*) as_dir=./$as_dir;;
14769 esac
14770 test -d "$as_dir" || eval $as_mkdir_p || {
14771 as_dirs=
14772 while :; do
14773 case $as_dir in #(
14774 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14775 *) as_qdir=$as_dir;;
14776 esac
14777 as_dirs="'$as_qdir' $as_dirs"
14778 as_dir=`$as_dirname -- "$as_dir" ||
14779$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14780 X"$as_dir" : 'X\(//\)[^/]' \| \
14781 X"$as_dir" : 'X\(//\)$' \| \
14782 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14783$as_echo X"$as_dir" |
14784 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14785 s//\1/
14786 q
14787 }
14788 /^X\(\/\/\)[^/].*/{
14789 s//\1/
14790 q
14791 }
14792 /^X\(\/\/\)$/{
14793 s//\1/
14794 q
14795 }
14796 /^X\(\/\).*/{
14797 s//\1/
14798 q
14799 }
14800 s/.*/./; q'`
14801 test -d "$as_dir" && break
14802 done
14803 test -z "$as_dirs" || eval "mkdir $as_dirs"
9164c0e4 14804 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
eb697db5
DN
14805
14806
14807} # as_fn_mkdir_p
6bae0ccf 14808if mkdir -p . 2>/dev/null; then
eb697db5 14809 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 14810else
edfaf76d 14811 test -d ./-p && rmdir ./-p
6bae0ccf
DL
14812 as_mkdir_p=false
14813fi
14814
f053c89f
CY
14815if test -x / >/dev/null 2>&1; then
14816 as_test_x='test -x'
ca81d7a0 14817else
f053c89f
CY
14818 if ls -dL / >/dev/null 2>&1; then
14819 as_ls_L_option=L
14820 else
14821 as_ls_L_option=
14822 fi
14823 as_test_x='
14824 eval sh -c '\''
14825 if test -d "$1"; then
e9a63f04 14826 test -d "$1/.";
f053c89f 14827 else
eb697db5 14828 case $1 in #(
e9a63f04 14829 -*)set "./$1";;
f053c89f 14830 esac;
eb697db5 14831 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
14832 ???[sx]*):;;*)false;;esac;fi
14833 '\'' sh
14834 '
ca81d7a0 14835fi
f053c89f 14836as_executable_p=$as_test_x
503d2be0 14837
c0d27fcc 14838# Sed expression to map a string onto a valid CPP name.
edfaf76d 14839as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
14840
14841# Sed expression to map a string onto a valid variable name.
edfaf76d 14842as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 14843
503d2be0 14844
503d2be0 14845exec 6>&1
eb697db5
DN
14846## ----------------------------------- ##
14847## Main body of $CONFIG_STATUS script. ##
14848## ----------------------------------- ##
14849_ASEOF
14850test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 14851
eb697db5
DN
14852cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14853# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 14854# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
14855# values after options handling.
14856ac_log="
49a62e8a 14857This file was extended by emacs $as_me 24.0.50, which was
9164c0e4 14858generated by GNU Autoconf 2.66. Invocation command line was
c0d27fcc
MR
14859
14860 CONFIG_FILES = $CONFIG_FILES
14861 CONFIG_HEADERS = $CONFIG_HEADERS
14862 CONFIG_LINKS = $CONFIG_LINKS
14863 CONFIG_COMMANDS = $CONFIG_COMMANDS
14864 $ $0 $@
14865
ca81d7a0
JD
14866on `(hostname || uname -n) 2>/dev/null | sed 1q`
14867"
14868
503d2be0
AS
14869_ACEOF
14870
eb697db5
DN
14871case $ac_config_files in *"
14872"*) set x $ac_config_files; shift; ac_config_files=$*;;
14873esac
14874
14875case $ac_config_headers in *"
14876"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14877esac
14878
14879
e9a63f04 14880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14881# Files that config.status was made for.
ca81d7a0
JD
14882config_files="$ac_config_files"
14883config_headers="$ac_config_headers"
14884config_commands="$ac_config_commands"
503d2be0 14885
ca81d7a0 14886_ACEOF
503d2be0 14887
e9a63f04 14888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 14889ac_cs_usage="\
eb697db5
DN
14890\`$as_me' instantiates files and other configuration actions
14891from templates according to the current configuration. Unless the files
14892and actions are specified as TAGs, all are instantiated by default.
503d2be0 14893
eb697db5 14894Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
14895
14896 -h, --help print this help, then exit
f053c89f 14897 -V, --version print version number and configuration settings, then exit
eb697db5
DN
14898 --config print configuration, then exit
14899 -q, --quiet, --silent
14900 do not print progress messages
503d2be0
AS
14901 -d, --debug don't remove temporary files
14902 --recheck update $as_me by reconfiguring in the same conditions
eb697db5 14903 --file=FILE[:TEMPLATE]
e9a63f04 14904 instantiate the configuration file FILE
eb697db5 14905 --header=FILE[:TEMPLATE]
e9a63f04 14906 instantiate the configuration header FILE
503d2be0
AS
14907
14908Configuration files:
14909$config_files
14910
14911Configuration headers:
14912$config_headers
14913
14914Configuration commands:
14915$config_commands
14916
eb697db5 14917Report bugs to the package provider."
503d2be0 14918
ca81d7a0 14919_ACEOF
e9a63f04 14920cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
eb697db5 14921ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 14922ac_cs_version="\\
49a62e8a 14923emacs config.status 24.0.50
9164c0e4 14924configured by $0, generated by GNU Autoconf 2.66,
eb697db5 14925 with options \\"\$ac_cs_config\\"
503d2be0 14926
9164c0e4 14927Copyright (C) 2010 Free Software Foundation, Inc.
503d2be0
AS
14928This config.status script is free software; the Free Software Foundation
14929gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
14930
14931ac_pwd='$ac_pwd'
14932srcdir='$srcdir'
14933INSTALL='$INSTALL'
e9a63f04 14934test -n "\$AWK" || AWK=awk
c0d27fcc 14935_ACEOF
503d2be0 14936
e9a63f04
GM
14937cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14938# The default lists apply if the user does not specify any file.
503d2be0
AS
14939ac_need_defaults=:
14940while test $# != 0
ba4481b5 14941do
503d2be0
AS
14942 case $1 in
14943 --*=*)
ca81d7a0
JD
14944 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14945 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
14946 ac_shift=:
14947 ;;
ca81d7a0 14948 *)
6bae0ccf
DL
14949 ac_option=$1
14950 ac_optarg=$2
14951 ac_shift=shift
503d2be0 14952 ;;
503d2be0
AS
14953 esac
14954
6bae0ccf 14955 case $ac_option in
503d2be0 14956 # Handling of the options.
19650fd6
AS
14957 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14958 ac_cs_recheck=: ;;
ca81d7a0 14959 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 14960 $as_echo "$ac_cs_version"; exit ;;
eb697db5
DN
14961 --config | --confi | --conf | --con | --co | --c )
14962 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 14963 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
14964 debug=: ;;
14965 --file | --fil | --fi | --f )
6bae0ccf 14966 $ac_shift
e9a63f04
GM
14967 case $ac_optarg in
14968 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14969 esac
eb697db5 14970 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
14971 ac_need_defaults=false;;
14972 --header | --heade | --head | --hea )
6bae0ccf 14973 $ac_shift
e9a63f04
GM
14974 case $ac_optarg in
14975 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14976 esac
eb697db5 14977 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 14978 ac_need_defaults=false;;
ca81d7a0
JD
14979 --he | --h)
14980 # Conflict between --help and --header
9164c0e4 14981 as_fn_error $? "ambiguous option: \`$1'
eb697db5 14982Try \`$0 --help' for more information.";;
ca81d7a0 14983 --help | --hel | -h )
e9a63f04 14984 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
14985 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14986 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14987 ac_cs_silent=: ;;
503d2be0
AS
14988
14989 # This is an error.
9164c0e4 14990 -*) as_fn_error $? "unrecognized option: \`$1'
eb697db5 14991Try \`$0 --help' for more information." ;;
503d2be0 14992
eb697db5 14993 *) as_fn_append ac_config_targets " $1"
ca81d7a0 14994 ac_need_defaults=false ;;
503d2be0 14995
ba4481b5 14996 esac
503d2be0 14997 shift
ba4481b5
DL
14998done
14999
19650fd6
AS
15000ac_configure_extra_args=
15001
15002if $ac_cs_silent; then
15003 exec 6>/dev/null
15004 ac_configure_extra_args="$ac_configure_extra_args --silent"
15005fi
15006
15007_ACEOF
e9a63f04 15008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 15009if \$ac_cs_recheck; then
e9a63f04
GM
15010 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15011 shift
15012 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15013 CONFIG_SHELL='$SHELL'
ca81d7a0 15014 export CONFIG_SHELL
e9a63f04 15015 exec "\$@"
19650fd6
AS
15016fi
15017
503d2be0 15018_ACEOF
e9a63f04 15019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15020exec 5>>config.log
15021{
15022 echo
15023 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15024## Running $as_me. ##
15025_ASBOX
e9a63f04 15026 $as_echo "$ac_log"
ca81d7a0 15027} >&5
ba4481b5 15028
ca81d7a0 15029_ACEOF
e9a63f04 15030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 15031#
ca81d7a0 15032# INIT-COMMANDS
503d2be0 15033#
81ac4f35 15034GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
503d2be0 15035
c0d27fcc
MR
15036_ACEOF
15037
e9a63f04 15038cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15039
15040# Handling of arguments.
503d2be0
AS
15041for ac_config_target in $ac_config_targets
15042do
ca81d7a0
JD
15043 case $ac_config_target in
15044 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
15045 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
981f8c13 15046 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
ca81d7a0 15047 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
15048 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
15049 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
15050 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
15051 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
81ac4f35 15052 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
f657c21b 15053 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 15054 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
15055 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
15056 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15057
9164c0e4 15058 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 15059 esac
ba4481b5 15060done
503d2be0 15061
ca81d7a0 15062
503d2be0
AS
15063# If the user did not use the arguments to specify the items to instantiate,
15064# then the envvar interface is used. Set only those that are not.
15065# We use the long form for the default assignment because of an extremely
15066# bizarre bug on SunOS 4.1.3.
15067if $ac_need_defaults; then
15068 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15069 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15070 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 15071fi
503d2be0 15072
19650fd6 15073# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 15074# simply because there is no reason against having it here, and in addition,
19650fd6 15075# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
15076# Hook for its removal unless debugging.
15077# Note that there is a small window in which the directory will not be cleaned:
15078# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
15079$debug ||
15080{
ca81d7a0
JD
15081 tmp=
15082 trap 'exit_status=$?
15083 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15084' 0
eb697db5 15085 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 15086}
503d2be0 15087# Create a (secure) tmp directory for tmp files.
19650fd6 15088
503d2be0 15089{
ca81d7a0 15090 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
15091 test -n "$tmp" && test -d "$tmp"
15092} ||
15093{
ca81d7a0
JD
15094 tmp=./conf$$-$RANDOM
15095 (umask 077 && mkdir "$tmp")
9164c0e4 15096} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 15097
e9a63f04
GM
15098# Set up the scripts for CONFIG_FILES section.
15099# No need to generate them if there are no CONFIG_FILES.
15100# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
15101if test -n "$CONFIG_FILES"; then
15102
648b8e6d
GM
15103if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15104 ac_cs_awk_getline=:
15105 ac_cs_awk_pipe_init=
15106 ac_cs_awk_read_file='
15107 while ((getline aline < (F[key])) > 0)
15108 print(aline)
15109 close(F[key])'
15110 ac_cs_awk_pipe_fini=
15111else
15112 ac_cs_awk_getline=false
15113 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15114 ac_cs_awk_read_file='
15115 print "|#_!!_#|"
15116 print "cat " F[key] " &&"
15117 '$ac_cs_awk_pipe_init
15118 # The final `:' finishes the AND list.
15119 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15120fi
eb697db5
DN
15121ac_cr=`echo X | tr X '\015'`
15122# On cygwin, bash can eat \r inside `` if the user requested igncr.
15123# But we know of no other shell where ac_cr would be empty at this
15124# point, so we can use a bashism as a fallback.
15125if test "x$ac_cr" = x; then
15126 eval ac_cr=\$\'\\r\'
15127fi
e9a63f04
GM
15128ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15129if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9164c0e4 15130 ac_cs_awk_cr='\\r'
e9a63f04
GM
15131else
15132 ac_cs_awk_cr=$ac_cr
ca81d7a0 15133fi
503d2be0 15134
e9a63f04 15135echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 15136_ACEOF
503d2be0 15137
648b8e6d
GM
15138# Create commands to substitute file output variables.
15139{
15140 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15141 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15142 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15143 echo "_ACAWK" &&
15144 echo "_ACEOF"
15145} >conf$$files.sh &&
15146. ./conf$$files.sh ||
9164c0e4 15147 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
648b8e6d 15148rm -f conf$$files.sh
ca81d7a0 15149
e9a63f04
GM
15150{
15151 echo "cat >conf$$subs.awk <<_ACEOF" &&
15152 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15153 echo "_ACEOF"
15154} >conf$$subs.sh ||
9164c0e4
AS
15155 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15156ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ca81d7a0
JD
15157ac_delim='%!_!# '
15158for ac_last_try in false false false false false :; do
e9a63f04 15159 . ./conf$$subs.sh ||
9164c0e4 15160 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15161
eb697db5
DN
15162 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15163 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
15164 break
15165 elif $ac_last_try; then
9164c0e4 15166 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
15167 else
15168 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 15169 fi
ca81d7a0 15170done
e9a63f04
GM
15171rm -f conf$$subs.sh
15172
15173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15174cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15175_ACEOF
15176sed -n '
15177h
15178s/^/S["/; s/!.*/"]=/
15179p
15180g
15181s/^[^!]*!//
15182:repl
15183t repl
15184s/'"$ac_delim"'$//
15185t delim
15186:nl
15187h
eb697db5 15188s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15189t more1
15190s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15191p
15192n
15193b repl
15194:more1
15195s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15196p
15197g
15198s/.\{148\}//
15199t nl
15200:delim
15201h
eb697db5 15202s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15203t more2
15204s/["\\]/\\&/g; s/^/"/; s/$/"/
15205p
15206b
15207:more2
15208s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15209p
15210g
15211s/.\{148\}//
15212t delim
15213' <conf$$subs.awk | sed '
15214/^[^""]/{
15215 N
15216 s/\n//
15217}
15218' >>$CONFIG_STATUS || ac_write_fail=1
15219rm -f conf$$subs.awk
15220cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15221_ACAWK
15222cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15223 for (key in S) S_is_set[key] = 1
15224 FS = "\a"
648b8e6d 15225 \$ac_cs_awk_pipe_init
e9a63f04
GM
15226}
15227{
15228 line = $ 0
15229 nfields = split(line, field, "@")
15230 substed = 0
15231 len = length(field[1])
15232 for (i = 2; i < nfields; i++) {
15233 key = field[i]
15234 keylen = length(key)
15235 if (S_is_set[key]) {
15236 value = S[key]
15237 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15238 len += length(value) + length(field[++i])
15239 substed = 1
15240 } else
15241 len += 1 + keylen
15242 }
648b8e6d
GM
15243 if (nfields == 3 && !substed) {
15244 key = field[2]
15245 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15246 \$ac_cs_awk_read_file
15247 next
15248 }
15249 }
e9a63f04
GM
15250 print line
15251}
648b8e6d 15252\$ac_cs_awk_pipe_fini
e9a63f04 15253_ACAWK
ca81d7a0 15254_ACEOF
e9a63f04
GM
15255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15256if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15257 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15258else
15259 cat
15260fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
9164c0e4 15261 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c0d27fcc 15262_ACEOF
ca81d7a0 15263
9164c0e4
AS
15264# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15265# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
ca81d7a0
JD
15266# trailing colons and then remove the whole line if VPATH becomes empty
15267# (actually we leave an empty line to preserve line numbers).
15268if test "x$srcdir" = x.; then
9164c0e4
AS
15269 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15270h
15271s///
15272s/^/:/
15273s/[ ]*$/:/
15274s/:\$(srcdir):/:/g
15275s/:\${srcdir}:/:/g
15276s/:@srcdir@:/:/g
15277s/^:*//
ca81d7a0 15278s/:*$//
9164c0e4
AS
15279x
15280s/\(=[ ]*\).*/\1/
15281G
15282s/\n//
ca81d7a0
JD
15283s/^[^=]*=[ ]*$//
15284}'
15285fi
15286
e9a63f04 15287cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15288fi # test -n "$CONFIG_FILES"
15289
e9a63f04
GM
15290# Set up the scripts for CONFIG_HEADERS section.
15291# No need to generate them if there are no CONFIG_HEADERS.
15292# This happens for instance with `./config.status Makefile'.
15293if test -n "$CONFIG_HEADERS"; then
15294cat >"$tmp/defines.awk" <<\_ACAWK ||
15295BEGIN {
15296_ACEOF
dc2933eb 15297
e9a63f04
GM
15298# Transform confdefs.h into an awk script `defines.awk', embedded as
15299# here-document in config.status, that substitutes the proper values into
15300# config.h.in to produce config.h.
15301
15302# Create a delimiter string that does not exist in confdefs.h, to ease
15303# handling of long lines.
15304ac_delim='%!_!# '
15305for ac_last_try in false false :; do
15306 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15307 if test -z "$ac_t"; then
15308 break
15309 elif $ac_last_try; then
9164c0e4 15310 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
15311 else
15312 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15313 fi
15314done
15315
15316# For the awk script, D is an array of macro values keyed by name,
15317# likewise P contains macro parameters if any. Preserve backslash
15318# newline sequences.
15319
15320ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15321sed -n '
15322s/.\{148\}/&'"$ac_delim"'/g
15323t rset
15324:rset
15325s/^[ ]*#[ ]*define[ ][ ]*/ /
15326t def
15327d
15328:def
15329s/\\$//
15330t bsnl
15331s/["\\]/\\&/g
15332s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15333D["\1"]=" \3"/p
15334s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15335d
15336:bsnl
15337s/["\\]/\\&/g
15338s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15339D["\1"]=" \3\\\\\\n"\\/p
15340t cont
15341s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15342t cont
15343d
15344:cont
15345n
15346s/.\{148\}/&'"$ac_delim"'/g
15347t clear
15348:clear
15349s/\\$//
15350t bsnlc
15351s/["\\]/\\&/g; s/^/"/; s/$/"/p
15352d
15353:bsnlc
15354s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15355b cont
15356' <confdefs.h | sed '
15357s/'"$ac_delim"'/"\\\
15358"/g' >>$CONFIG_STATUS || ac_write_fail=1
15359
15360cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15361 for (key in D) D_is_set[key] = 1
15362 FS = "\a"
15363}
15364/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15365 line = \$ 0
15366 split(line, arg, " ")
15367 if (arg[1] == "#") {
15368 defundef = arg[2]
15369 mac1 = arg[3]
15370 } else {
15371 defundef = substr(arg[1], 2)
15372 mac1 = arg[2]
15373 }
15374 split(mac1, mac2, "(") #)
15375 macro = mac2[1]
eb697db5 15376 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
15377 if (D_is_set[macro]) {
15378 # Preserve the white space surrounding the "#".
e9a63f04
GM
15379 print prefix "define", macro P[macro] D[macro]
15380 next
15381 } else {
15382 # Replace #undef with comments. This is necessary, for example,
15383 # in the case of _POSIX_SOURCE, which is predefined and required
15384 # on some systems where configure will not decide to define it.
15385 if (defundef == "undef") {
eb697db5 15386 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
15387 next
15388 }
15389 }
15390}
15391{ print }
15392_ACAWK
15393_ACEOF
15394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9164c0e4 15395 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
15396fi # test -n "$CONFIG_HEADERS"
15397
15398
15399eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15400shift
15401for ac_tag
ca81d7a0
JD
15402do
15403 case $ac_tag in
15404 :[FHLC]) ac_mode=$ac_tag; continue;;
15405 esac
15406 case $ac_mode$ac_tag in
15407 :[FHL]*:*);;
9164c0e4 15408 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
15409 :[FH]-) ac_tag=-:-;;
15410 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15411 esac
15412 ac_save_IFS=$IFS
15413 IFS=:
15414 set x $ac_tag
15415 IFS=$ac_save_IFS
15416 shift
15417 ac_file=$1
15418 shift
15419
15420 case $ac_mode in
15421 :L) ac_source=$1;;
15422 :[FH])
15423 ac_file_inputs=
15424 for ac_f
15425 do
15426 case $ac_f in
15427 -) ac_f="$tmp/stdin";;
15428 *) # Look for the file first in the build tree, then in the source tree
15429 # (if the path is not absolute). The absolute path cannot be DOS-style,
15430 # because $ac_f cannot contain `:'.
15431 test -f "$ac_f" ||
15432 case $ac_f in
15433 [\\/$]*) false;;
15434 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15435 esac ||
9164c0e4 15436 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 15437 esac
e9a63f04 15438 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
eb697db5 15439 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
15440 done
15441
15442 # Let's still pretend it is `configure' which instantiates (i.e., don't
15443 # use $as_me), people would be surprised to read:
15444 # /* config.h. Generated by config.status. */
e9a63f04
GM
15445 configure_input='Generated from '`
15446 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15447 `' by configure.'
ca81d7a0
JD
15448 if test x"$ac_file" != x-; then
15449 configure_input="$ac_file. $configure_input"
eb697db5 15450 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 15451$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 15452 fi
e9a63f04
GM
15453 # Neutralize special characters interpreted by sed in replacement strings.
15454 case $configure_input in #(
15455 *\&* | *\|* | *\\* )
15456 ac_sed_conf_input=`$as_echo "$configure_input" |
15457 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15458 *) ac_sed_conf_input=$configure_input;;
15459 esac
ca81d7a0
JD
15460
15461 case $ac_tag in
e9a63f04 15462 *:-:* | *:-) cat >"$tmp/stdin" \
9164c0e4 15463 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
15464 esac
15465 ;;
ba4481b5
DL
15466 esac
15467
ca81d7a0 15468 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 15469$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
15470 X"$ac_file" : 'X\(//\)[^/]' \| \
15471 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 15472 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 15473$as_echo X"$ac_file" |
ca81d7a0
JD
15474 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15475 s//\1/
15476 q
15477 }
15478 /^X\(\/\/\)[^/].*/{
15479 s//\1/
15480 q
15481 }
15482 /^X\(\/\/\)$/{
15483 s//\1/
15484 q
15485 }
15486 /^X\(\/\).*/{
15487 s//\1/
15488 q
15489 }
15490 s/.*/./; q'`
eb697db5 15491 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 15492 ac_builddir=.
98418dba 15493
ca81d7a0
JD
15494case "$ac_dir" in
15495.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15496*)
e9a63f04 15497 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 15498 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 15499 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
15500 case $ac_top_builddir_sub in
15501 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15502 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15503 esac ;;
15504esac
15505ac_abs_top_builddir=$ac_pwd
15506ac_abs_builddir=$ac_pwd$ac_dir_suffix
15507# for backward compatibility:
15508ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
15509
15510case $srcdir in
ca81d7a0 15511 .) # We are building in place.
c0d27fcc 15512 ac_srcdir=.
ca81d7a0
JD
15513 ac_top_srcdir=$ac_top_builddir_sub
15514 ac_abs_top_srcdir=$ac_pwd ;;
15515 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 15516 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
15517 ac_top_srcdir=$srcdir
15518 ac_abs_top_srcdir=$srcdir ;;
15519 *) # Relative name.
15520 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15521 ac_top_srcdir=$ac_top_build_prefix$srcdir
15522 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 15523esac
ca81d7a0 15524ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 15525
c0d27fcc 15526
ca81d7a0
JD
15527 case $ac_mode in
15528 :F)
15529 #
15530 # CONFIG_FILE
15531 #
ba4481b5 15532
503d2be0
AS
15533 case $INSTALL in
15534 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 15535 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 15536 esac
ca81d7a0 15537_ACEOF
ba4481b5 15538
e9a63f04 15539cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15540# If the template does not know about datarootdir, expand it.
15541# FIXME: This hack should be removed a few years after 2.60.
15542ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
15543ac_sed_dataroot='
15544/datarootdir/ {
ca81d7a0
JD
15545 p
15546 q
15547}
15548/@datadir@/p
15549/@docdir@/p
15550/@infodir@/p
15551/@localedir@/p
eb697db5 15552/@mandir@/p'
e9a63f04 15553case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
15554*datarootdir*) ac_datarootdir_seen=yes;;
15555*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
eb697db5 15556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 15557$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 15558_ACEOF
e9a63f04 15559cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
15560 ac_datarootdir_hack='
15561 s&@datadir@&$datadir&g
15562 s&@docdir@&$docdir&g
15563 s&@infodir@&$infodir&g
15564 s&@localedir@&$localedir&g
15565 s&@mandir@&$mandir&g
eb697db5 15566 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 15567esac
c0d27fcc 15568_ACEOF
ca81d7a0
JD
15569
15570# Neutralize VPATH when `$srcdir' = `.'.
15571# Shell code in configure.ac might set extrasub.
15572# FIXME: do we really want to maintain this feature?
e9a63f04
GM
15573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15574ac_sed_extra="$ac_vpsub
503d2be0 15575$extrasub
c0d27fcc 15576_ACEOF
e9a63f04 15577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
15578:t
15579/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 15580s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 15581s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 15582s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
15583s&@srcdir@&$ac_srcdir&;t t
15584s&@abs_srcdir@&$ac_abs_srcdir&;t t
15585s&@top_srcdir@&$ac_top_srcdir&;t t
15586s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15587s&@builddir@&$ac_builddir&;t t
15588s&@abs_builddir@&$ac_abs_builddir&;t t
15589s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15590s&@INSTALL@&$ac_INSTALL&;t t
15591$ac_datarootdir_hack
e9a63f04 15592"
648b8e6d
GM
15593eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15594if $ac_cs_awk_getline; then
15595 $AWK -f "$tmp/subs.awk"
15596else
15597 $AWK -f "$tmp/subs.awk" | $SHELL
15598fi >$tmp/out \
9164c0e4 15599 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15600
15601test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15602 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15603 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
eb697db5 15604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9164c0e4 15605which seems to be undefined. Please make sure it is defined" >&5
e9a63f04 15606$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9164c0e4 15607which seems to be undefined. Please make sure it is defined" >&2;}
ca81d7a0
JD
15608
15609 rm -f "$tmp/stdin"
503d2be0 15610 case $ac_file in
e9a63f04
GM
15611 -) cat "$tmp/out" && rm -f "$tmp/out";;
15612 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15613 esac \
9164c0e4 15614 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15615 ;;
15616 :H)
15617 #
15618 # CONFIG_HEADER
15619 #
503d2be0 15620 if test x"$ac_file" != x-; then
e9a63f04
GM
15621 {
15622 $as_echo "/* $configure_input */" \
15623 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15624 } >"$tmp/config.h" \
9164c0e4 15625 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
e9a63f04 15626 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
eb697db5 15627 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 15628$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 15629 else
e9a63f04
GM
15630 rm -f "$ac_file"
15631 mv "$tmp/config.h" "$ac_file" \
9164c0e4 15632 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ba4481b5 15633 fi
503d2be0 15634 else
e9a63f04
GM
15635 $as_echo "/* $configure_input */" \
15636 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
9164c0e4 15637 || as_fn_error $? "could not create -" "$LINENO" 5
ba4481b5 15638 fi
ca81d7a0 15639 ;;
edfaf76d 15640
eb697db5 15641 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 15642$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
15643 ;;
15644 esac
ba4481b5 15645
c0d27fcc 15646
ca81d7a0
JD
15647 case $ac_file$ac_mode in
15648 "default":C)
ba4481b5
DL
15649
15650### Make the necessary directories, if they don't exist.
15651for dir in etc lisp ; do
15652 test -d ${dir} || mkdir ${dir}
15653done
15654
ba4481b5 15655echo creating src/epaths.h
4aa6b955 15656${MAKE-make} epaths-force
ba4481b5 15657
bf3126f6 15658if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 15659 echo creating src/.gdbinit
503d2be0 15660 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
15661fi
15662
503d2be0 15663 ;;
ca81d7a0 15664
503d2be0 15665 esac
ca81d7a0 15666done # for ac_tag
503d2be0 15667
ba4481b5 15668
eb697db5 15669as_fn_exit 0
c0d27fcc 15670_ACEOF
503d2be0
AS
15671ac_clean_files=$ac_clean_files_save
15672
e9a63f04 15673test $ac_write_fail = 0 ||
9164c0e4 15674 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15675
c0d27fcc 15676
503d2be0
AS
15677# configure is writing to config.log, and then calls config.status.
15678# config.status does its own redirection, appending to config.log.
15679# Unfortunately, on DOS this fails, as config.log is still kept open
15680# by configure, so config.status won't be able to write to it; its
15681# output is simply discarded. So we exec the FD to /dev/null,
15682# effectively closing config.log, so it can be properly (re)opened and
15683# appended to by config.status. When coming back to configure, we
15684# need to make the FD available again.
15685if test "$no_create" != yes; then
15686 ac_cs_success=:
19650fd6
AS
15687 ac_config_status_args=
15688 test "$silent" = yes &&
15689 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 15690 exec 5>/dev/null
19650fd6 15691 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
15692 exec 5>>config.log
15693 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15694 # would make configure fail if this is the last instruction.
9164c0e4 15695 $ac_cs_success || as_fn_exit 1
503d2be0 15696fi
e9a63f04 15697if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
eb697db5
DN
15698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15699$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 15700fi
f5f47add 15701
c0d27fcc 15702