Fix missing prototypes for HAVE_NS (caused crash) and vrious warnings.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
3d608a86 3# Generated by GNU Autoconf 2.65 for emacs 24.0.50.
eb697db5 4#
ba4481b5 5#
ca81d7a0 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
3d608a86
J
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
eb697db5
DN
9#
10#
ba4481b5
DL
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
eb697db5
DN
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
503d2be0 16
f053c89f
CY
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
20 emulate sh
21 NULLCMD=:
e9a63f04 22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
25 setopt NO_GLOB_SUBST
26else
eb697db5
DN
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
f053c89f 32esac
503d2be0 33fi
f053c89f
CY
34
35
e9a63f04
GM
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
7bbec45b 56 else
e9a63f04
GM
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
eb697db5 60 case $arg in #(
e9a63f04
GM
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 69 fi
e9a63f04
GM
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
503d2be0
AS
81fi
82
6bae0ccf 83
ca81d7a0
JD
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
ca81d7a0
JD
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
eb697db5 92case $0 in #((
ca81d7a0
JD
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
eb697db5
DN
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
ca81d7a0
JD
101IFS=$as_save_IFS
102
103 ;;
104esac
105# We did not find ourselves, most probably we were run as `sh COMMAND'
106# in which case we are not to be found in the path.
107if test "x$as_myself" = x; then
108 as_myself=$0
109fi
110if test ! -f "$as_myself"; then
e9a63f04 111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 112 exit 1
ca81d7a0
JD
113fi
114
eb697db5
DN
115# Unset variables that we do not need and which cause bugs (e.g. in
116# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117# suppresses any "Segmentation fault" message there. '((' could
118# trigger a bug in pdksh 5.2.14.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 122done
6bae0ccf
DL
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
e9a63f04
GM
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
6bae0ccf 132
eb697db5
DN
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150esac
151fi
152"
153 as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167 exitcode=1; echo positional parameters were not saved.
168fi
169test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177else
178 as_have_required=no
179fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200fi
201fi
202 done;;
203 esac
204 as_found=false
205done
206$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209fi; }
210IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
222fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232$0: including any error possibly output before this
233$0: message. Then install a modern shell, or manually run
234$0: the script under such a shell if you do have one."
235 fi
236 exit 1
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254 { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_fn_set_status ()
262{
263 return $1
264} # as_fn_set_status
265
266# as_fn_exit STATUS
267# -----------------
268# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269as_fn_exit ()
270{
271 set +e
272 as_fn_set_status $1
273 exit $1
274} # as_fn_exit
275
276# as_fn_mkdir_p
277# -------------
278# Create "$as_dir" as a directory, including parents if necessary.
279as_fn_mkdir_p ()
280{
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298$as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
3d608a86 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
3d608a86
J
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
eb697db5
DN
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
3d608a86 363# script with status $?, using 1 if that was 0.
eb697db5
DN
364as_fn_error ()
365{
3d608a86
J
366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$3"; then
368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
eb697db5 370 fi
3d608a86 371 $as_echo "$as_me: error: $1" >&2
eb697db5
DN
372 as_fn_exit $as_status
373} # as_fn_error
374
ca81d7a0
JD
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
377 as_expr=expr
378else
379 as_expr=false
380fi
381
ca81d7a0 382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
383 as_basename=basename
384else
385 as_basename=false
386fi
c0d27fcc 387
eb697db5
DN
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390else
391 as_dirname=false
392fi
c0d27fcc 393
ca81d7a0 394as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
ca81d7a0 397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 398$as_echo X/"$0" |
ca81d7a0
JD
399 sed '/^.*\/\([^/][^/]*\)\/*$/{
400 s//\1/
401 q
402 }
403 /^X\/\(\/\/\)$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\).*/{
408 s//\1/
409 q
410 }
411 s/.*/./; q'`
c0d27fcc 412
eb697db5
DN
413# Avoid depending upon Character Ranges.
414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417as_cr_digits='0123456789'
418as_cr_alnum=$as_cr_Letters$as_cr_digits
6bae0ccf 419
c0d27fcc 420
eb697db5
DN
421 as_lineno_1=$LINENO as_lineno_1a=$LINENO
422 as_lineno_2=$LINENO as_lineno_2a=$LINENO
423 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
426 sed -n '
427 p
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
433 b
434 :lineno
435 N
436 :loop
437 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438 t loop
439 s/-\n.*//
440 ' >$as_me.lineno &&
441 chmod +x "$as_me.lineno" ||
442 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
c0d27fcc 443
eb697db5
DN
444 # Don't try to exec as it changes $[0], causing all sort of problems
445 # (the dirname of $[0] is not the place where we might find the
446 # original and so on. Autoconf is especially sensitive to this).
447 . "./$as_me.lineno"
448 # Exit status is that of the last command.
449 exit
ca81d7a0 450}
c0d27fcc 451
eb697db5
DN
452ECHO_C= ECHO_N= ECHO_T=
453case `echo -n x` in #(((((
454-n*)
455 case `echo 'xy\c'` in
456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
457 xy) ECHO_C='\c';;
458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
459 ECHO_T=' ';;
460 esac;;
461*)
462 ECHO_N='-n';;
463esac
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.
3d608a86 533# hostname on some systems (SVR3.2, 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 &&
3d608a86 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 &&
3d608a86 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 &&
3d608a86 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 &&
3d608a86 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
3d608a86
J
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]* )
3d608a86 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'`
3d608a86 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) ;;
3d608a86 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
3d608a86 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
3d608a86
J
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 .` ||
3d608a86 1315 as_fn_error "working directory cannot be determined"
eb697db5 1316test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
3d608a86 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 .."
3d608a86 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=`(
3d608a86 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
3d608a86 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
3d608a86 1616generated by GNU Autoconf 2.65
a4f64981 1617
3d608a86 1618Copyright (C) 2009 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
3d608a86 1758 if { as_var=$3; eval "test \"\${$as_var+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; }
3d608a86 1761if { as_var=$3; eval "test \"\${$as_var+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; }
3d608a86 1824if { as_var=$3; eval "test \"\${$as_var+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; }
3d608a86 1888if { as_var=$3; eval "test \"\${$as_var+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
3d608a86
J
1910# ac_fn_c_check_decl LINENO SYMBOL VAR
1911# ------------------------------------
1912# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
eb697db5
DN
1913ac_fn_c_check_decl ()
1914{
1915 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3d608a86
J
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
1917$as_echo_n "checking whether $2 is declared... " >&6; }
1918if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7
GM
1919 $as_echo_n "(cached) " >&6
1920else
eb697db5 1921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 1922/* end confdefs.h. */
eb697db5 1923$4
5929fbe7
GM
1924int
1925main ()
1926{
3d608a86
J
1927#ifndef $2
1928 (void) $2;
eb697db5 1929#endif
e6df49e4 1930
eb697db5 1931 ;
5929fbe7
GM
1932 return 0;
1933}
1934_ACEOF
eb697db5
DN
1935if ac_fn_c_try_compile "$LINENO"; then :
1936 eval "$3=yes"
5929fbe7 1937else
eb697db5 1938 eval "$3=no"
5929fbe7 1939fi
eb697db5 1940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0c309b80 1941fi
eb697db5
DN
1942eval ac_res=\$$3
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1944$as_echo "$ac_res" >&6; }
1945 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
8c5ff6dd 1946
eb697db5 1947} # ac_fn_c_check_decl
0c309b80 1948
eb697db5
DN
1949# ac_fn_c_check_header_preproc LINENO HEADER VAR
1950# ----------------------------------------------
1951# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1952ac_fn_c_check_header_preproc ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1956$as_echo_n "checking for $2... " >&6; }
3d608a86 1957if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
eb697db5
DN
1958 $as_echo_n "(cached) " >&6
1959else
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962#include <$2>
1963_ACEOF
1964if ac_fn_c_try_cpp "$LINENO"; then :
1965 eval "$3=yes"
1966else
1967 eval "$3=no"
a4f64981 1968fi
eb697db5
DN
1969rm -f conftest.err conftest.$ac_ext
1970fi
1971eval ac_res=\$$3
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1973$as_echo "$ac_res" >&6; }
1974 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
e6df49e4 1975
eb697db5 1976} # ac_fn_c_check_header_preproc
a5edbe4a 1977
eb697db5
DN
1978# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1979# ----------------------------------------------------
1980# Tries to find if the field MEMBER exists in type AGGR, after including
1981# INCLUDES, setting cache variable VAR accordingly.
1982ac_fn_c_check_member ()
1983{
1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1986$as_echo_n "checking for $2.$3... " >&6; }
3d608a86 1987if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
eb697db5
DN
1988 $as_echo_n "(cached) " >&6
1989else
1990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h. */
1992$5
1993int
1994main ()
1995{
1996static $2 ac_aggr;
1997if (ac_aggr.$3)
1998return 0;
1999 ;
2000 return 0;
2001}
2002_ACEOF
2003if ac_fn_c_try_compile "$LINENO"; then :
2004 eval "$4=yes"
2005else
2006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2007/* end confdefs.h. */
2008$5
2009int
2010main ()
2011{
2012static $2 ac_aggr;
2013if (sizeof ac_aggr.$3)
2014return 0;
2015 ;
2016 return 0;
2017}
2018_ACEOF
2019if ac_fn_c_try_compile "$LINENO"; then :
2020 eval "$4=yes"
2021else
2022 eval "$4=no"
8c5ff6dd 2023fi
eb697db5 2024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 2025fi
eb697db5
DN
2026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2027fi
2028eval ac_res=\$$4
2029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2030$as_echo "$ac_res" >&6; }
2031 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a5edbe4a 2032
eb697db5 2033} # ac_fn_c_check_member
106c6f74 2034
eb697db5
DN
2035# ac_fn_c_check_func LINENO FUNC VAR
2036# ----------------------------------
2037# Tests whether FUNC exists, setting the cache variable VAR accordingly
2038ac_fn_c_check_func ()
2039{
2040 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2042$as_echo_n "checking for $2... " >&6; }
3d608a86 2043if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7
GM
2044 $as_echo_n "(cached) " >&6
2045else
eb697db5 2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 2047/* end confdefs.h. */
eb697db5
DN
2048/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2049 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2050#define $2 innocuous_$2
2051
2052/* System header to define __stub macros and hopefully few prototypes,
2053 which can conflict with char $2 (); below.
2054 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2055 <limits.h> exists even on freestanding compilers. */
2056
2057#ifdef __STDC__
2058# include <limits.h>
2059#else
2060# include <assert.h>
2061#endif
2062
2063#undef $2
8c5ff6dd 2064
5929fbe7
GM
2065/* Override any GCC internal prototype to avoid an error.
2066 Use char because int might match the return type of a GCC
2067 builtin and then its argument prototype would still apply. */
2068#ifdef __cplusplus
2069extern "C"
2070#endif
eb697db5
DN
2071char $2 ();
2072/* The GNU C library defines this for functions which it implements
2073 to always fail with ENOSYS. Some functions are actually named
2074 something starting with __ and the normal name is an alias. */
2075#if defined __stub_$2 || defined __stub___$2
2076choke me
2077#endif
2078
5929fbe7
GM
2079int
2080main ()
2081{
eb697db5 2082return $2 ();
5929fbe7
GM
2083 ;
2084 return 0;
2085}
2086_ACEOF
eb697db5
DN
2087if ac_fn_c_try_link "$LINENO"; then :
2088 eval "$3=yes"
5929fbe7 2089else
eb697db5
DN
2090 eval "$3=no"
2091fi
2092rm -f core conftest.err conftest.$ac_objext \
2093 conftest$ac_exeext conftest.$ac_ext
2094fi
2095eval ac_res=\$$3
2096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2097$as_echo "$ac_res" >&6; }
2098 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2099
2100} # ac_fn_c_check_func
2101
2102# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2103# -------------------------------------------
2104# Tests whether TYPE exists after having included INCLUDES, setting cache
2105# variable VAR accordingly.
2106ac_fn_c_check_type ()
2107{
2108 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2110$as_echo_n "checking for $2... " >&6; }
3d608a86 2111if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
eb697db5
DN
2112 $as_echo_n "(cached) " >&6
2113else
2114 eval "$3=no"
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121if (sizeof ($2))
2122 return 0;
2123 ;
2124 return 0;
2125}
2126_ACEOF
2127if ac_fn_c_try_compile "$LINENO"; then :
2128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129/* end confdefs.h. */
2130$4
2131int
2132main ()
2133{
2134if (sizeof (($2)))
2135 return 0;
2136 ;
2137 return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 2141
eb697db5
DN
2142else
2143 eval "$3=yes"
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 2148fi
eb697db5
DN
2149eval ac_res=\$$3
2150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2151$as_echo "$ac_res" >&6; }
2152 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2153
2154} # ac_fn_c_check_type
2155cat >config.log <<_ACEOF
2156This file contains any messages produced by compilers while
2157running configure, to aid debugging if configure makes a mistake.
2158
2159It was created by emacs $as_me 24.0.50, which was
3d608a86 2160generated by GNU Autoconf 2.65. Invocation command line was
eb697db5
DN
2161
2162 $ $0 $@
2163
2164_ACEOF
2165exec 5>>config.log
2166{
2167cat <<_ASUNAME
2168## --------- ##
2169## Platform. ##
2170## --------- ##
2171
2172hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2173uname -m = `(uname -m) 2>/dev/null || echo unknown`
2174uname -r = `(uname -r) 2>/dev/null || echo unknown`
2175uname -s = `(uname -s) 2>/dev/null || echo unknown`
2176uname -v = `(uname -v) 2>/dev/null || echo unknown`
2177
2178/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2179/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2180
2181/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2182/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2183/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2184/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2185/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2186/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2187/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2188
2189_ASUNAME
2190
2191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2192for as_dir in $PATH
2193do
2194 IFS=$as_save_IFS
2195 test -z "$as_dir" && as_dir=.
2196 $as_echo "PATH: $as_dir"
2197 done
2198IFS=$as_save_IFS
2199
2200} >&5
2201
2202cat >&5 <<_ACEOF
2203
2204
2205## ----------- ##
2206## Core tests. ##
2207## ----------- ##
2208
2209_ACEOF
2210
2211
2212# Keep a trace of the command line.
2213# Strip out --no-create and --no-recursion so they do not pile up.
2214# Strip out --silent because we don't want to record it for future runs.
2215# Also quote any args containing shell meta-characters.
2216# Make two passes to allow for proper duplicate-argument suppression.
2217ac_configure_args=
2218ac_configure_args0=
2219ac_configure_args1=
2220ac_must_keep_next=false
2221for ac_pass in 1 2
2222do
2223 for ac_arg
2224 do
2225 case $ac_arg in
2226 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2227 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2228 | -silent | --silent | --silen | --sile | --sil)
2229 continue ;;
2230 *\'*)
2231 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2232 esac
2233 case $ac_pass in
2234 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2235 2)
2236 as_fn_append ac_configure_args1 " '$ac_arg'"
2237 if test $ac_must_keep_next = true; then
2238 ac_must_keep_next=false # Got value, back to normal.
2239 else
2240 case $ac_arg in
2241 *=* | --config-cache | -C | -disable-* | --disable-* \
2242 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2243 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2244 | -with-* | --with-* | -without-* | --without-* | --x)
2245 case "$ac_configure_args0 " in
2246 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2247 esac
2248 ;;
2249 -* ) ac_must_keep_next=true ;;
2250 esac
2251 fi
2252 as_fn_append ac_configure_args " '$ac_arg'"
2253 ;;
2254 esac
2255 done
2256done
2257{ ac_configure_args0=; unset ac_configure_args0;}
2258{ ac_configure_args1=; unset ac_configure_args1;}
2259
2260# When interrupted or exit'd, cleanup temporary files, and complete
2261# config.log. We remove comments because anyway the quotes in there
2262# would cause problems or look ugly.
2263# WARNING: Use '\'' to represent an apostrophe within the trap.
2264# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2265trap 'exit_status=$?
2266 # Save into config.log some information that might help in debugging.
2267 {
2268 echo
2269
3d608a86
J
2270 cat <<\_ASBOX
2271## ---------------- ##
eb697db5 2272## Cache variables. ##
3d608a86
J
2273## ---------------- ##
2274_ASBOX
eb697db5
DN
2275 echo
2276 # The following way of writing the cache mishandles newlines in values,
2277(
2278 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2279 eval ac_val=\$$ac_var
2280 case $ac_val in #(
2281 *${as_nl}*)
2282 case $ac_var in #(
2283 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2284$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2285 esac
2286 case $ac_var in #(
2287 _ | IFS | as_nl) ;; #(
2288 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2289 *) { eval $ac_var=; unset $ac_var;} ;;
2290 esac ;;
2291 esac
2292 done
2293 (set) 2>&1 |
2294 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2295 *${as_nl}ac_space=\ *)
2296 sed -n \
2297 "s/'\''/'\''\\\\'\'''\''/g;
2298 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2299 ;; #(
2300 *)
2301 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2302 ;;
2303 esac |
2304 sort
2305)
2306 echo
08b47d3d 2307
3d608a86
J
2308 cat <<\_ASBOX
2309## ----------------- ##
eb697db5 2310## Output variables. ##
3d608a86
J
2311## ----------------- ##
2312_ASBOX
eb697db5
DN
2313 echo
2314 for ac_var in $ac_subst_vars
2315 do
2316 eval ac_val=\$$ac_var
2317 case $ac_val in
2318 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2319 esac
2320 $as_echo "$ac_var='\''$ac_val'\''"
2321 done | sort
2322 echo
a5edbe4a 2323
eb697db5 2324 if test -n "$ac_subst_files"; then
3d608a86
J
2325 cat <<\_ASBOX
2326## ------------------- ##
eb697db5 2327## File substitutions. ##
3d608a86
J
2328## ------------------- ##
2329_ASBOX
eb697db5
DN
2330 echo
2331 for ac_var in $ac_subst_files
2332 do
2333 eval ac_val=\$$ac_var
2334 case $ac_val in
2335 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2336 esac
2337 $as_echo "$ac_var='\''$ac_val'\''"
2338 done | sort
2339 echo
2340 fi
a5edbe4a 2341
eb697db5 2342 if test -s confdefs.h; then
3d608a86
J
2343 cat <<\_ASBOX
2344## ----------- ##
eb697db5 2345## confdefs.h. ##
3d608a86
J
2346## ----------- ##
2347_ASBOX
eb697db5
DN
2348 echo
2349 cat confdefs.h
2350 echo
2351 fi
2352 test "$ac_signal" != 0 &&
2353 $as_echo "$as_me: caught signal $ac_signal"
2354 $as_echo "$as_me: exit $exit_status"
2355 } >&5
2356 rm -f core *.core core.conftest.* &&
2357 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2358 exit $exit_status
2359' 0
2360for ac_signal in 1 2 13 15; do
2361 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2362done
2363ac_signal=0
cd03c74a 2364
eb697db5
DN
2365# confdefs.h avoids OS command line length limits that DEFS can exceed.
2366rm -f -r conftest* confdefs.h
a5edbe4a 2367
eb697db5 2368$as_echo "/* confdefs.h */" > confdefs.h
a4f64981 2369
eb697db5 2370# Predefined preprocessor variables.
8c5ff6dd 2371
eb697db5
DN
2372cat >>confdefs.h <<_ACEOF
2373#define PACKAGE_NAME "$PACKAGE_NAME"
5929fbe7 2374_ACEOF
8c5ff6dd 2375
eb697db5
DN
2376cat >>confdefs.h <<_ACEOF
2377#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2378_ACEOF
8c5ff6dd 2379
eb697db5
DN
2380cat >>confdefs.h <<_ACEOF
2381#define PACKAGE_VERSION "$PACKAGE_VERSION"
5929fbe7 2382_ACEOF
8c5ff6dd 2383
eb697db5
DN
2384cat >>confdefs.h <<_ACEOF
2385#define PACKAGE_STRING "$PACKAGE_STRING"
5929fbe7 2386_ACEOF
8c5ff6dd 2387
eb697db5
DN
2388cat >>confdefs.h <<_ACEOF
2389#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2390_ACEOF
8c5ff6dd 2391
eb697db5
DN
2392cat >>confdefs.h <<_ACEOF
2393#define PACKAGE_URL "$PACKAGE_URL"
5929fbe7 2394_ACEOF
8c5ff6dd 2395
8c5ff6dd 2396
eb697db5
DN
2397# Let the site file select an alternate cache file if it wants to.
2398# Prefer an explicitly selected file to automatically selected ones.
2399ac_site_file1=NONE
2400ac_site_file2=NONE
2401if test -n "$CONFIG_SITE"; then
3d608a86 2402 ac_site_file1=$CONFIG_SITE
eb697db5
DN
2403elif test "x$prefix" != xNONE; then
2404 ac_site_file1=$prefix/share/config.site
2405 ac_site_file2=$prefix/etc/config.site
2406else
2407 ac_site_file1=$ac_default_prefix/share/config.site
2408 ac_site_file2=$ac_default_prefix/etc/config.site
5929fbe7 2409fi
eb697db5
DN
2410for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2411do
2412 test "x$ac_site_file" = xNONE && continue
2413 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2414 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2415$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2416 sed 's/^/| /' "$ac_site_file" >&5
3d608a86 2417 . "$ac_site_file"
eb697db5
DN
2418 fi
2419done
49ebbd65 2420
eb697db5
DN
2421if test -r "$cache_file"; then
2422 # Some versions of bash will fail to source /dev/null (special files
2423 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2424 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2426$as_echo "$as_me: loading cache $cache_file" >&6;}
2427 case $cache_file in
2428 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2429 *) . "./$cache_file";;
2430 esac
2431 fi
5929fbe7 2432else
eb697db5
DN
2433 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2434$as_echo "$as_me: creating cache $cache_file" >&6;}
2435 >$cache_file
2436fi
49ebbd65 2437
eb697db5
DN
2438as_fn_append ac_header_list " stdlib.h"
2439as_fn_append ac_header_list " unistd.h"
2440as_fn_append ac_header_list " sys/param.h"
2441as_fn_append ac_header_list " sys/time.h"
2442as_fn_append ac_func_list " alarm"
2443# Check that the precious variables saved in the cache have kept the same
2444# value.
2445ac_cache_corrupted=false
2446for ac_var in $ac_precious_vars; do
2447 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2448 eval ac_new_set=\$ac_env_${ac_var}_set
2449 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2450 eval ac_new_val=\$ac_env_${ac_var}_value
2451 case $ac_old_set,$ac_new_set in
2452 set,)
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2454$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2455 ac_cache_corrupted=: ;;
2456 ,set)
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2458$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2459 ac_cache_corrupted=: ;;
2460 ,);;
2461 *)
2462 if test "x$ac_old_val" != "x$ac_new_val"; then
2463 # differences in whitespace do not lead to failure.
2464 ac_old_val_w=`echo x $ac_old_val`
2465 ac_new_val_w=`echo x $ac_new_val`
2466 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2468$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2469 ac_cache_corrupted=:
2470 else
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2472$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2473 eval $ac_var=\$ac_old_val
2474 fi
2475 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2476$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2477 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2478$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2479 fi;;
2480 esac
2481 # Pass precious variables to config.status.
2482 if test "$ac_new_set" = set; then
2483 case $ac_new_val in
2484 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2485 *) ac_arg=$ac_var=$ac_new_val ;;
2486 esac
2487 case " $ac_configure_args " in
2488 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2489 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
8c5ff6dd 2490 esac
eb697db5
DN
2491 fi
2492done
2493if $ac_cache_corrupted; then
2494 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2495$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2496 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2497$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3d608a86 2498 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
eb697db5
DN
2499fi
2500## -------------------- ##
2501## Main body of script. ##
2502## -------------------- ##
2503
2504ac_ext=c
2505ac_cpp='$CPP $CPPFLAGS'
2506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2508ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 2509
e6df49e4 2510
eb697db5 2511ac_config_headers="$ac_config_headers src/config.h:src/config.in"
49ebbd65 2512
a4f64981 2513
a4f64981 2514
eb697db5
DN
2515test "$program_prefix" != NONE &&
2516 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2517# Use a double $ so make ignores it.
2518test "$program_suffix" != NONE &&
2519 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2520# Double any \ or $.
2521# By default was `s,x,x', remove it if useless.
2522ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2523program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
a4f64981 2524
49ebbd65 2525
eb697db5
DN
2526lispdir='${datadir}/emacs/${version}/lisp'
2527locallisppath='${datadir}/emacs/${version}/site-lisp:'\
2528'${datadir}/emacs/site-lisp'
2529lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
2530etcdir='${datadir}/emacs/${version}/etc'
2531archlibdir='${libexecdir}/emacs/${version}/${configuration}'
2532docdir='${datadir}/emacs/${version}/etc'
2533gamedir='${localstatedir}/games/emacs'
49ebbd65 2534
eb697db5 2535gameuser=games
49ebbd65 2536
49ebbd65 2537
a4f64981 2538
eb697db5
DN
2539
2540# Check whether --with-pop was given.
2541if test "${with_pop+set}" = set; then :
2542 withval=$with_pop;
5929fbe7 2543else
eb697db5
DN
2544 with_pop=yes
2545fi
2546
2547if test "$with_pop" = yes; then
2548 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
a4f64981 2549
5929fbe7
GM
2550fi
2551
5929fbe7 2552
eb697db5
DN
2553# Check whether --with-kerberos was given.
2554if test "${with_kerberos+set}" = set; then :
2555 withval=$with_kerberos;
5929fbe7 2556else
eb697db5
DN
2557 with_kerberos=no
2558fi
2559
2560if test "$with_kerberos" != no; then
2561 $as_echo "#define KERBEROS 1" >>confdefs.h
9452ded1 2562
5929fbe7 2563fi
a4f64981 2564
15e12598 2565
eb697db5
DN
2566# Check whether --with-kerberos5 was given.
2567if test "${with_kerberos5+set}" = set; then :
2568 withval=$with_kerberos5;
5929fbe7 2569else
eb697db5 2570 with_kerberos5=no
a4f64981
GM
2571fi
2572
eb697db5
DN
2573if test "${with_kerberos5}" != no; then
2574 if test "${with_kerberos}" = no; then
2575 with_kerberos=yes
2576 $as_echo "#define KERBEROS 1" >>confdefs.h
a4f64981 2577
5929fbe7 2578 fi
a5edbe4a 2579
eb697db5 2580$as_echo "#define KERBEROS5 1" >>confdefs.h
a4f64981 2581
eb697db5 2582fi
a4f64981 2583
a5edbe4a 2584
eb697db5
DN
2585# Check whether --with-hesiod was given.
2586if test "${with_hesiod+set}" = set; then :
2587 withval=$with_hesiod;
49ebbd65 2588else
eb697db5
DN
2589 with_hesiod=no
2590fi
5929fbe7 2591
eb697db5 2592if test "$with_hesiod" != no; then
5929fbe7 2593
eb697db5 2594$as_echo "#define HESIOD 1" >>confdefs.h
5929fbe7 2595
eb697db5 2596fi
5929fbe7 2597
5929fbe7 2598
eb697db5
DN
2599# Check whether --with-mmdf was given.
2600if test "${with_mmdf+set}" = set; then :
2601 withval=$with_mmdf;
8c5ff6dd 2602else
eb697db5 2603 with_mmdf=no
15e12598 2604fi
5929fbe7 2605
eb697db5 2606if test "$with_mmdf" != no; then
a5edbe4a 2607
eb697db5 2608$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
a5edbe4a 2609
8c5ff6dd 2610fi
5929fbe7 2611
5929fbe7 2612
eb697db5
DN
2613# Check whether --with-mail-unlink was given.
2614if test "${with_mail_unlink+set}" = set; then :
2615 withval=$with_mail_unlink;
8c5ff6dd 2616else
eb697db5 2617 with_mail_unlink=no
8c5ff6dd 2618fi
5929fbe7 2619
eb697db5
DN
2620if test "$with_mail_unlink" != no; then
2621
2622$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
2623
8c5ff6dd 2624fi
a5edbe4a 2625
5929fbe7 2626
eb697db5
DN
2627# Check whether --with-mailhost was given.
2628if test "${with_mailhost+set}" = set; then :
2629 withval=$with_mailhost;
2630cat >>confdefs.h <<_ACEOF
2631#define MAILHOST "$withval"
5929fbe7
GM
2632_ACEOF
2633
8c5ff6dd 2634fi
a4f64981 2635
5929fbe7 2636
5929fbe7 2637
eb697db5
DN
2638# Check whether --with-sound was given.
2639if test "${with_sound+set}" = set; then :
2640 withval=$with_sound;
2641else
2642 with_sound=yes
2643fi
5929fbe7 2644
5929fbe7 2645
a4f64981 2646
eb697db5
DN
2647# Check whether --with-sync-input was given.
2648if test "${with_sync_input+set}" = set; then :
2649 withval=$with_sync_input;
8c5ff6dd 2650else
eb697db5 2651 with_sync_input=yes
8c5ff6dd 2652fi
a4f64981 2653
eb697db5 2654if test "$with_sync_input" = yes; then
a4f64981 2655
eb697db5 2656$as_echo "#define SYNC_INPUT 1" >>confdefs.h
5929fbe7 2657
eb697db5 2658fi
5929fbe7 2659
5929fbe7 2660
eb697db5
DN
2661# Check whether --with-x-toolkit was given.
2662if test "${with_x_toolkit+set}" = set; then :
2663 withval=$with_x_toolkit; case "${withval}" in
2664 y | ye | yes ) val=gtk ;;
2665 n | no ) val=no ;;
2666 l | lu | luc | luci | lucid ) val=lucid ;;
2667 a | at | ath | athe | athen | athena ) val=athena ;;
2668 m | mo | mot | moti | motif ) val=motif ;;
2669 g | gt | gtk ) val=gtk ;;
e547b051 2670 gtk3 ) val=gtk3 ;;
eb697db5 2671 * )
3d608a86 2672as_fn_error "\`--with-x-toolkit=$withval' is invalid;
e547b051
J
2673this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
2674\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
eb697db5
DN
2675 ;;
2676 esac
2677 with_x_toolkit=$val
5929fbe7 2678
eb697db5 2679fi
5929fbe7 2680
5929fbe7
GM
2681
2682
eb697db5
DN
2683# Check whether --with-xpm was given.
2684if test "${with_xpm+set}" = set; then :
2685 withval=$with_xpm;
2686else
2687 with_xpm=yes
2688fi
5929fbe7 2689
5929fbe7 2690
eb697db5
DN
2691# Check whether --with-jpeg was given.
2692if test "${with_jpeg+set}" = set; then :
2693 withval=$with_jpeg;
2694else
2695 with_jpeg=yes
2696fi
5929fbe7
GM
2697
2698
eb697db5
DN
2699# Check whether --with-tiff was given.
2700if test "${with_tiff+set}" = set; then :
2701 withval=$with_tiff;
2702else
2703 with_tiff=yes
2704fi
5929fbe7
GM
2705
2706
eb697db5
DN
2707# Check whether --with-gif was given.
2708if test "${with_gif+set}" = set; then :
2709 withval=$with_gif;
2710else
2711 with_gif=yes
2712fi
5929fbe7 2713
5929fbe7 2714
eb697db5
DN
2715# Check whether --with-png was given.
2716if test "${with_png+set}" = set; then :
2717 withval=$with_png;
2718else
2719 with_png=yes
8c5ff6dd 2720fi
5929fbe7
GM
2721
2722
eb697db5
DN
2723# Check whether --with-rsvg was given.
2724if test "${with_rsvg+set}" = set; then :
2725 withval=$with_rsvg;
2726else
2727 with_rsvg=yes
2728fi
5929fbe7
GM
2729
2730
5929fbe7 2731
eb697db5
DN
2732# Check whether --with-xft was given.
2733if test "${with_xft+set}" = set; then :
2734 withval=$with_xft;
8c5ff6dd 2735else
eb697db5 2736 with_xft=yes
8c5ff6dd 2737fi
eb697db5
DN
2738
2739
2740# Check whether --with-libotf was given.
2741if test "${with_libotf+set}" = set; then :
2742 withval=$with_libotf;
8c5ff6dd 2743else
eb697db5 2744 with_libotf=yes
8c5ff6dd 2745fi
e6df49e4
GM
2746
2747
eb697db5
DN
2748# Check whether --with-m17n-flt was given.
2749if test "${with_m17n_flt+set}" = set; then :
2750 withval=$with_m17n_flt;
2751else
2752 with_m17n_flt=yes
2753fi
2754
5929fbe7 2755
5929fbe7 2756
eb697db5
DN
2757# Check whether --with-toolkit-scroll-bars was given.
2758if test "${with_toolkit_scroll_bars+set}" = set; then :
2759 withval=$with_toolkit_scroll_bars;
2760else
2761 with_toolkit_scroll_bars=yes
2762fi
5929fbe7 2763
5929fbe7 2764
eb697db5
DN
2765# Check whether --with-xaw3d was given.
2766if test "${with_xaw3d+set}" = set; then :
2767 withval=$with_xaw3d;
2768else
2769 with_xaw3d=yes
2770fi
5929fbe7 2771
5929fbe7 2772
eb697db5
DN
2773# Check whether --with-xim was given.
2774if test "${with_xim+set}" = set; then :
2775 withval=$with_xim;
2776else
2777 with_xim=yes
2778fi
5929fbe7
GM
2779
2780
eb697db5
DN
2781# Check whether --with-ns was given.
2782if test "${with_ns+set}" = set; then :
2783 withval=$with_ns;
2784else
2785 with_ns=no
2786fi
5929fbe7 2787
5929fbe7 2788
eb697db5
DN
2789
2790# Check whether --with-gpm was given.
2791if test "${with_gpm+set}" = set; then :
2792 withval=$with_gpm;
2793else
2794 with_gpm=yes
8c5ff6dd 2795fi
5929fbe7
GM
2796
2797
eb697db5
DN
2798# Check whether --with-dbus was given.
2799if test "${with_dbus+set}" = set; then :
2800 withval=$with_dbus;
2801else
2802 with_dbus=yes
2803fi
5929fbe7
GM
2804
2805
eb697db5
DN
2806# Check whether --with-gconf was given.
2807if test "${with_gconf+set}" = set; then :
2808 withval=$with_gconf;
2809else
2810 with_gconf=yes
2811fi
5929fbe7 2812
5929fbe7 2813
eb697db5
DN
2814# Check whether --with-selinux was given.
2815if test "${with_selinux+set}" = set; then :
2816 withval=$with_selinux;
8c5ff6dd 2817else
eb697db5
DN
2818 with_selinux=yes
2819fi
5929fbe7 2820
5929fbe7 2821
eb697db5
DN
2822## For the times when you want to build Emacs but don't have
2823## a suitable makeinfo, and can live without the manuals.
5929fbe7 2824
eb697db5
DN
2825# Check whether --with-makeinfo was given.
2826if test "${with_makeinfo+set}" = set; then :
2827 withval=$with_makeinfo;
2828else
2829 with_makeinfo=yes
2830fi
5929fbe7 2831
5929fbe7 2832
e547b051
J
2833## This is an option because I do not know if all info/man support
2834## compressed files, nor how to test if they do so.
2835
2836# Check whether --with-compress-info was given.
2837if test "${with_compress_info+set}" = set; then :
2838 withval=$with_compress_info;
2839else
2840 with_compress_info=yes
2841fi
2842
2843if test $with_compress_info = yes; then
2844 GZIP_INFO=yes
2845else
2846 GZIP_INFO=
2847fi
2848
2849
0c309b80 2850
eb697db5
DN
2851# Check whether --with-pkg-config-prog was given.
2852if test "${with_pkg_config_prog+set}" = set; then :
2853 withval=$with_pkg_config_prog;
8c5ff6dd 2854fi
5929fbe7 2855
eb697db5
DN
2856if test "X${with_pkg_config_prog}" != X; then
2857 if test "${with_pkg_config_prog}" != yes; then
2858 PKG_CONFIG="${with_pkg_config_prog}"
2859 fi
8c5ff6dd 2860fi
e6df49e4 2861
eb697db5 2862CRT_DIR=
a4f64981 2863
eb697db5
DN
2864# Check whether --with-crt-dir was given.
2865if test "${with_crt_dir+set}" = set; then :
2866 withval=$with_crt_dir;
2867fi
2868
2869CRT_DIR="${with_crt_dir}"
5929fbe7 2870
e6df49e4 2871
eb697db5
DN
2872# Check whether --with-gnustep-conf was given.
2873if test "${with_gnustep_conf+set}" = set; then :
2874 withval=$with_gnustep_conf;
15e12598 2875fi
e6df49e4 2876
eb697db5
DN
2877test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2878 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2879test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2880 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
e6df49e4 2881
eb697db5
DN
2882# Check whether --enable-ns-self-contained was given.
2883if test "${enable_ns_self_contained+set}" = set; then :
2884 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
2885else
2886 EN_NS_SELF_CONTAINED=yes
2887fi
e6df49e4 2888
5929fbe7 2889
eb697db5
DN
2890# Check whether --enable-asserts was given.
2891if test "${enable_asserts+set}" = set; then :
2892 enableval=$enable_asserts; USE_XASSERTS=$enableval
2893else
2894 USE_XASSERTS=no
2895fi
a4f64981
GM
2896
2897
eb697db5
DN
2898# Check whether --enable-maintainer-mode was given.
2899if test "${enable_maintainer_mode+set}" = set; then :
2900 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
5929fbe7 2901else
eb697db5
DN
2902 USE_MAINTAINER_MODE=no
2903fi
a4f64981 2904
eb697db5
DN
2905if test $USE_MAINTAINER_MODE = yes; then
2906 MAINT=
2907else
2908 MAINT=#
2909fi
e6df49e4 2910
5929fbe7 2911
eb697db5
DN
2912# Check whether --enable-locallisppath was given.
2913if test "${enable_locallisppath+set}" = set; then :
2914 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
2915 locallisppath=
2916elif test "${enableval}" != "yes"; then
2917 locallisppath=${enableval}
2918fi
2919fi
5929fbe7 2920
5929fbe7 2921
eb697db5
DN
2922# Check whether --enable-checking was given.
2923if test "${enable_checking+set}" = set; then :
2924 enableval=$enable_checking; ac_checking_flags="${enableval}"
2925fi
2926
2927IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2928for check in $ac_checking_flags
2929do
2930 case $check in
2931 # these set all the flags to specific states
2932 yes) ac_enable_checking=1 ;;
2933 no) ac_enable_checking= ;
2934 ac_gc_check_stringbytes= ;
2935 ac_gc_check_string_overrun= ;
2936 ac_gc_check_string_free_list= ;
2937 ac_xmalloc_overrun= ;
2938 ac_gc_check_cons_list= ;;
2939 all) ac_enable_checking=1 ;
2940 ac_gc_check_stringbytes=1 ;
2941 ac_gc_check_string_overrun=1 ;
2942 ac_gc_check_string_free_list=1 ;
2943 ac_xmalloc_overrun=1 ;
2944 ac_gc_check_cons_list=1 ;;
2945 # these enable particular checks
2946 stringbytes) ac_gc_check_stringbytes=1 ;;
2947 stringoverrun) ac_gc_check_string_overrun=1 ;;
2948 stringfreelist) ac_gc_check_string_free_list=1 ;;
2949 xmallocoverrun) ac_xmalloc_overrun=1 ;;
2950 conslist) ac_gc_check_cons_list=1 ;;
3d608a86 2951 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
eb697db5
DN
2952 esac
2953done
2954IFS="$ac_save_IFS"
2955
2956if test x$ac_enable_checking != x ; then
2957
2958$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
2959
2960fi
2961if test x$ac_gc_check_stringbytes != x ; then
2962
2963$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
5929fbe7 2964
5929fbe7 2965fi
eb697db5
DN
2966if test x$ac_gc_check_stringoverrun != x ; then
2967
2968$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
5929fbe7 2969
5929fbe7 2970fi
eb697db5
DN
2971if test x$ac_gc_check_string_free_list != x ; then
2972
2973$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
2974
5929fbe7 2975fi
eb697db5 2976if test x$ac_xmalloc_overrun != x ; then
a4f64981 2977
eb697db5 2978$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
5929fbe7 2979
eb697db5
DN
2980fi
2981if test x$ac_gc_check_cons_list != x ; then
5929fbe7 2982
eb697db5 2983$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
5929fbe7 2984
eb697db5
DN
2985fi
2986
d9170db5
DN
2987# Check whether --enable-use-lisp-union-type was given.
2988if test "${enable_use_lisp_union_type+set}" = set; then :
2989 enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then
2990
2991$as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h
2992
2993fi
2994fi
2995
2996
2997
eb697db5
DN
2998# Check whether --enable-profiling was given.
2999if test "${enable_profiling+set}" = set; then :
3000 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
3001fi
3002
3003if test x$ac_enable_profiling != x ; then
3004 PROFILING_CFLAGS="-DPROFILING=1 -pg"
3005 PROFILING_LDFLAGS="-pg"
5929fbe7 3006else
eb697db5
DN
3007 PROFILING_CFLAGS=
3008 PROFILING_LDFLAGS=
3009fi
a4f64981 3010
e6cfa7c3
AS
3011
3012
eb697db5
DN
3013# Check whether --enable-autodepend was given.
3014if test "${enable_autodepend+set}" = set; then :
3015 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
3016else
3017 ac_enable_autodepend=yes
3018fi
8c5ff6dd 3019
eb697db5
DN
3020
3021#### Make srcdir absolute, if it isn't already. It's important to
3022#### avoid running the path through pwd unnecessarily, since pwd can
3023#### give you automounter prefixes, which can go away. We do all this
3024#### so Emacs can find its files when run uninstalled.
3025## Make sure CDPATH doesn't affect cd (in case PWD is relative).
3026unset CDPATH
3027case "${srcdir}" in
3028 /* ) ;;
3029 . )
3030 ## We may be able to use the $PWD environment variable to make this
3031 ## absolute. But sometimes PWD is inaccurate.
3032 ## Note: we used to use ${PWD} at the end instead of `pwd`,
3033 ## but that tested only for a well-formed and valid PWD,
3034 ## it did not object when PWD was well-formed and valid but just wrong.
3035 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
3036 then
3037 srcdir="$PWD"
3038 else
3039 srcdir="`(cd ${srcdir}; pwd)`"
3040 fi
3041 ;;
3042 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
a4f64981 3043esac
e6df49e4 3044
eb697db5
DN
3045#### Check if the source directory already has a configured system in it.
3046if test `pwd` != `(cd ${srcdir} && pwd)` \
3047 && test -f "${srcdir}/src/config.h" ; then
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
3049 as a build directory right now; it has been configured in its own
3050 right. To configure in another directory as well, you MUST
3051 use GNU make. If you do not have GNU make, then you must
3052 now do \`make distclean' in ${srcdir},
3053 and then run $0 again." >&5
3054$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
3055 as a build directory right now; it has been configured in its own
3056 right. To configure in another directory as well, you MUST
3057 use GNU make. If you do not have GNU make, then you must
3058 now do \`make distclean' in ${srcdir},
3059 and then run $0 again." >&2;}
5929fbe7
GM
3060fi
3061
eb697db5
DN
3062#### Given the configuration name, set machfile and opsysfile to the
3063#### names of the m/*.h and s/*.h files we should use.
3064
3065### Canonicalize the configuration name.
3066
3067ac_aux_dir=
3068for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3d608a86
J
3069 for ac_t in install-sh install.sh shtool; do
3070 if test -f "$ac_dir/$ac_t"; then
3071 ac_aux_dir=$ac_dir
3072 ac_install_sh="$ac_aux_dir/$ac_t -c"
3073 break 2
3074 fi
3075 done
eb697db5
DN
3076done
3077if test -z "$ac_aux_dir"; then
3d608a86 3078 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5929fbe7 3079fi
eb697db5
DN
3080
3081# These three variables are undocumented and unsupported,
3082# and are intended to be withdrawn in a future Autoconf release.
3083# They can cause serious problems if a builder's source tree is in a directory
3084# whose full name contains unusual characters.
3085ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3086ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3087ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3088
3089
3090# Make sure we can run config.sub.
3091$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3d608a86 3092 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
eb697db5
DN
3093
3094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3095$as_echo_n "checking build system type... " >&6; }
3096if test "${ac_cv_build+set}" = set; then :
3097 $as_echo_n "(cached) " >&6
8c5ff6dd 3098else
eb697db5
DN
3099 ac_build_alias=$build_alias
3100test "x$ac_build_alias" = x &&
3101 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3102test "x$ac_build_alias" = x &&
3d608a86 3103 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
eb697db5 3104ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3d608a86 3105 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
eb697db5 3106
15e12598 3107fi
eb697db5
DN
3108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3109$as_echo "$ac_cv_build" >&6; }
3110case $ac_cv_build in
3111*-*-*) ;;
3d608a86 3112*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
eb697db5
DN
3113esac
3114build=$ac_cv_build
3115ac_save_IFS=$IFS; IFS='-'
3116set x $ac_cv_build
3117shift
3118build_cpu=$1
3119build_vendor=$2
3120shift; shift
3121# Remember, the first character of IFS is used to create $*,
3122# except with old shells:
3123build_os=$*
3124IFS=$ac_save_IFS
3125case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15e12598 3126
5929fbe7 3127
eb697db5
DN
3128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3129$as_echo_n "checking host system type... " >&6; }
3130if test "${ac_cv_host+set}" = set; then :
5929fbe7
GM
3131 $as_echo_n "(cached) " >&6
3132else
eb697db5
DN
3133 if test "x$host_alias" = x; then
3134 ac_cv_host=$ac_cv_build
3135else
3136 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3d608a86 3137 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
eb697db5 3138fi
5929fbe7 3139
eb697db5
DN
3140fi
3141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3142$as_echo "$ac_cv_host" >&6; }
3143case $ac_cv_host in
3144*-*-*) ;;
3d608a86 3145*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
eb697db5
DN
3146esac
3147host=$ac_cv_host
3148ac_save_IFS=$IFS; IFS='-'
3149set x $ac_cv_host
3150shift
3151host_cpu=$1
3152host_vendor=$2
3153shift; shift
3154# Remember, the first character of IFS is used to create $*,
3155# except with old shells:
3156host_os=$*
3157IFS=$ac_save_IFS
3158case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5929fbe7 3159
5929fbe7 3160
eb697db5
DN
3161canonical=$host
3162configuration=${host_alias-${build_alias-$host}}
5929fbe7 3163
5929fbe7 3164
5929fbe7 3165
eb697db5
DN
3166### If you add support for a new configuration, add code to this
3167### switch statement to recognize your configuration name and select
3168### the appropriate operating system and machine description files.
8c5ff6dd 3169
eb697db5
DN
3170### You would hope that you could choose an m/*.h file pretty much
3171### based on the machine portion of the configuration name, and an s/*.h
3172### file based on the operating system portion. However, it turns out
3173### that each m/*.h file is pretty manufacturer-specific - for
3174### example mips.h is MIPS
3175### So we basically have to have a special case for each
3176### configuration name.
3177###
3178### As far as handling version numbers on operating systems is
3179### concerned, make sure things will fail in a fixable way. If
3180### /etc/MACHINES doesn't say anything about version numbers, be
3181### prepared to handle anything reasonably. If version numbers
3182### matter, be sure /etc/MACHINES says something about it.
3183
3184machine='' opsys='' unported=no
3185case "${canonical}" in
3186
3187 ## FreeBSD ports
3188 *-*-freebsd* )
3189 opsys=freebsd
3190 case "${canonical}" in
3191 alpha*) machine=alpha ;;
3192 amd64-*|x86_64-*) machine=amdx86-64 ;;
3193 arm*) machine=arm ;;
3194 ia64-*) machine=ia64 ;;
3195 i[3456]86-*) machine=intel386 ;;
3196 powerpc-*) machine=macppc ;;
3197 sparc-*) machine=sparc ;;
3198 sparc64-*) machine=sparc ;;
3199 esac
3200 ;;
5929fbe7 3201
eb697db5
DN
3202 ## FreeBSD kernel + glibc based userland
3203 *-*-kfreebsd*gnu* )
3204 opsys=gnu-kfreebsd
3205 case "${canonical}" in
3206 alpha*) machine=alpha ;;
3207 amd64-*|x86_64-*) machine=amdx86-64 ;;
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 ## NetBSD ports
3217 *-*-netbsd* )
3218 opsys=netbsd
3219 case "${canonical}" in
3220 alpha*) machine=alpha ;;
3221 x86_64-*) machine=amdx86-64 ;;
3222 arm-*) machine=arm ;;
3223 hppa-*) machine=hp800 ;;
3224 i[3456]86-*) machine=intel386 ;;
3225 m68k-*) machine=m68k ;;
3226 powerpc-*) machine=macppc ;;
3227 mips-*) machine=mips ;;
3228 mipse[bl]-*) machine=mips ;;
3229 sparc*-) machine=sparc ;;
3230 vax-*) machine=vax ;;
3231 esac
3232 ;;
e6df49e4 3233
eb697db5
DN
3234 ## OpenBSD ports
3235 *-*-openbsd* )
3236 opsys=openbsd
3237 case "${canonical}" in
3238 alpha*) machine=alpha ;;
3239 x86_64-*) machine=amdx86-64 ;;
3240 arm-*) machine=arm ;;
3241 hppa-*) machine=hp800 ;;
3242 i386-*) machine=intel386 ;;
3243 powerpc-*) machine=macppc ;;
3244 sparc*) machine=sparc ;;
3245 vax-*) machine=vax ;;
3246 esac
3247 ;;
e6df49e4 3248
eb697db5
DN
3249 alpha*-*-linux-gnu* )
3250 machine=alpha opsys=gnu-linux
3251 ;;
e6df49e4 3252
eb697db5
DN
3253 arm*-*-linux-gnu* )
3254 machine=arm opsys=gnu-linux
3255 ;;
5929fbe7 3256
eb697db5
DN
3257 ## Apple Darwin / Mac OS X
3258 *-apple-darwin* )
3259 case "${canonical}" in
3260 i[3456]86-* ) machine=intel386 ;;
3261 powerpc-* ) machine=macppc ;;
3262 x86_64-* ) machine=amdx86-64 ;;
3263 * ) unported=yes ;;
3264 esac
3265 opsys=darwin
3266 # Define CPP as follows to make autoconf work correctly.
3267 CPP="${CC-cc} -E -no-cpp-precomp"
3268 # Use fink packages if available.
3269 if test -d /sw/include && test -d /sw/lib; then
3270 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3271 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3272 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3273 fi
3274 ;;
5929fbe7 3275
eb697db5
DN
3276 ## HP 9000 series 700 and 800, running HP/UX
3277 hppa*-hp-hpux10.2* )
3278 machine=hp800 opsys=hpux10-20
3279 ;;
3280 hppa*-hp-hpux1[1-9]* )
3281 machine=hp800 opsys=hpux11
3282 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
3283 ;;
5929fbe7 3284
eb697db5
DN
3285 hppa*-*-linux-gnu* )
3286 machine=hp800 opsys=gnu-linux
3287 ;;
5929fbe7 3288
eb697db5
DN
3289 ## IBM machines
3290 s390-*-linux-gnu* )
3291 machine=ibms390 opsys=gnu-linux
3292 ;;
3293 s390x-*-linux-gnu* )
3294 machine=ibms390x opsys=gnu-linux
3295 ;;
3296 rs6000-ibm-aix4.[23]* )
3297 machine=ibmrs6000 opsys=aix4-2
3298 ;;
3299 powerpc-ibm-aix4.[23]* )
3300 machine=ibmrs6000 opsys=aix4-2
3301 ;;
3302 rs6000-ibm-aix[56]* )
3303 machine=ibmrs6000 opsys=aix4-2
3304 ;;
3305 powerpc-ibm-aix[56]* )
3306 machine=ibmrs6000 opsys=aix4-2
3307 ;;
5929fbe7 3308
eb697db5
DN
3309 ## Macintosh PowerPC
3310 powerpc*-*-linux-gnu* )
3311 machine=macppc opsys=gnu-linux
3312 ;;
5929fbe7 3313
eb697db5
DN
3314 ## Silicon Graphics machines
3315 ## Iris 4D
3316 mips-sgi-irix6.5 )
3317 machine=iris4d opsys=irix6-5
3318 # Without defining _LANGUAGE_C, things get masked out in the headers
3319 # so that, for instance, grepping for `free' in stdlib.h fails and
3320 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3321 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
3322 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
3323 ;;
5929fbe7 3324
eb697db5
DN
3325 ## Suns
3326 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3327 machine=sparc opsys=gnu-linux
3328 ;;
15e12598 3329
eb697db5
DN
3330 *-sun-solaris* \
3331 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3332 | x86_64-*-solaris2* | x86_64-*-sunos5*)
3333 case "${canonical}" in
3334 i[3456]86-*-* ) machine=intel386 ;;
3335 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
3336 sparc* ) machine=sparc ;;
3337 * ) unported=yes ;;
3338 esac
3339 case "${canonical}" in
3340 *-sunos5.6* | *-solaris2.6* )
3341 opsys=sol2-6
3342 NON_GNU_CPP=/usr/ccs/lib/cpp
3343 RANLIB="ar -ts"
3344 ;;
3345 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
3346 opsys=sol2-6
3347 emacs_check_sunpro_c=yes
3348 NON_GNU_CPP=/usr/ccs/lib/cpp
3349 ;;
3350 *-sunos5* | *-solaris* )
3351 opsys=sol2-10
3352 emacs_check_sunpro_c=yes
3353 NON_GNU_CPP=/usr/ccs/lib/cpp
3354 ;;
3355 esac
3356 ## Watch out for a compiler that we know will not work.
3357 case "${canonical}" in
3358 *-solaris* | *-sunos5* )
3359 if [ "x$CC" = x/usr/ucb/cc ]; then
3360 ## /usr/ucb/cc doesn't work;
3361 ## we should find some other compiler that does work.
3362 unset CC
3363 fi
3364 ;;
3365 *) ;;
3366 esac
3367 ;;
5929fbe7 3368
eb697db5
DN
3369 ## IA-64
3370 ia64*-*-linux* )
3371 machine=ia64 opsys=gnu-linux
3372 ;;
aaa36002 3373
eb697db5
DN
3374 ## Intel 386 machines where we don't care about the manufacturer.
3375 i[3456]86-*-* )
3376 machine=intel386
3377 case "${canonical}" in
3378 *-cygwin ) opsys=cygwin ;;
3379 *-darwin* ) opsys=darwin
3380 CPP="${CC-cc} -E -no-cpp-precomp"
3381 ;;
3382 *-linux-gnu* ) opsys=gnu-linux ;;
3383 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3384 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3385 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3386 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3387 esac
3388 ;;
5929fbe7 3389
eb697db5
DN
3390 ## m68k Linux-based GNU system
3391 m68k-*-linux-gnu* )
3392 machine=m68k opsys=gnu-linux
3393 ;;
5929fbe7 3394
eb697db5
DN
3395 ## Mips Linux-based GNU system
3396 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3397 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
3398 machine=mips opsys=gnu-linux
3399 ;;
5929fbe7 3400
eb697db5
DN
3401 ## AMD x86-64 Linux-based GNU system
3402 x86_64-*-linux-gnu* )
3403 machine=amdx86-64 opsys=gnu-linux
3404 ;;
5929fbe7 3405
eb697db5
DN
3406 ## Tensilica Xtensa Linux-based GNU system
3407 xtensa*-*-linux-gnu* )
3408 machine=xtensa opsys=gnu-linux
3409 ;;
5929fbe7 3410
eb697db5
DN
3411 ## SuperH Linux-based GNU system
3412 sh[34]*-*-linux-gnu* )
3413 machine=sh3 opsys=gnu-linux
3414 ;;
5929fbe7 3415
eb697db5
DN
3416 * )
3417 unported=yes
3418 ;;
5929fbe7 3419esac
aaa36002 3420
eb697db5
DN
3421### If the code above didn't choose an operating system, just choose
3422### an operating system based on the configuration name. You really
3423### only want to use this when you have no idea what the right
3424### operating system is; if you know what operating systems a machine
3425### runs, it's cleaner to make it explicit in the case statement
3426### above.
3427if test x"${opsys}" = x; then
3428 case "${canonical}" in
3429 *-gnu* ) opsys=gnu ;;
3430 * )
3431 unported=yes
3432 ;;
3433 esac
5929fbe7 3434fi
aaa36002 3435
5929fbe7 3436
5929fbe7 3437
eb697db5 3438if test $unported = yes; then
3d608a86 3439 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
eb697db5 3440Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
5929fbe7
GM
3441fi
3442
eb697db5
DN
3443machfile="m/${machine}.h"
3444opsysfile="s/${opsys}.h"
5929fbe7 3445
5929fbe7 3446
eb697db5
DN
3447#### Choose a compiler.
3448test -n "$CC" && cc_specified=yes
3449
3450# Save the value of CFLAGS that the user specified.
3451SPECIFIED_CFLAGS="$CFLAGS"
3452
3453ac_ext=c
3454ac_cpp='$CPP $CPPFLAGS'
3455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3457ac_compiler_gnu=$ac_cv_c_compiler_gnu
3458if test -n "$ac_tool_prefix"; then
3459 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3460set dummy ${ac_tool_prefix}gcc; ac_word=$2
3461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3462$as_echo_n "checking for $ac_word... " >&6; }
3463if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3464 $as_echo_n "(cached) " >&6
3465else
eb697db5
DN
3466 if test -n "$CC"; then
3467 ac_cv_prog_CC="$CC" # Let the user override the test.
3468else
3469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3470for as_dir in $PATH
3471do
3472 IFS=$as_save_IFS
3473 test -z "$as_dir" && as_dir=.
3474 for ac_exec_ext in '' $ac_executable_extensions; do
3475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3476 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3478 break 2
3479 fi
3480done
3481 done
3482IFS=$as_save_IFS
5929fbe7
GM
3483
3484fi
eb697db5
DN
3485fi
3486CC=$ac_cv_prog_CC
3487if test -n "$CC"; then
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3489$as_echo "$CC" >&6; }
3490else
3491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3492$as_echo "no" >&6; }
5929fbe7 3493fi
7186fb09 3494
08b47d3d 3495
eb697db5
DN
3496fi
3497if test -z "$ac_cv_prog_CC"; then
3498 ac_ct_CC=$CC
3499 # Extract the first word of "gcc", so it can be a program name with args.
3500set dummy gcc; ac_word=$2
3501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3502$as_echo_n "checking for $ac_word... " >&6; }
3503if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5929fbe7 3504 $as_echo_n "(cached) " >&6
8c5ff6dd 3505else
eb697db5
DN
3506 if test -n "$ac_ct_CC"; then
3507 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3508else
eb697db5
DN
3509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3510for as_dir in $PATH
3511do
3512 IFS=$as_save_IFS
3513 test -z "$as_dir" && as_dir=.
3514 for ac_exec_ext in '' $ac_executable_extensions; do
3515 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3516 ac_cv_prog_ac_ct_CC="gcc"
3517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3518 break 2
3519 fi
3520done
3521 done
3522IFS=$as_save_IFS
5929fbe7 3523
8c5ff6dd 3524fi
8c5ff6dd 3525fi
eb697db5
DN
3526ac_ct_CC=$ac_cv_prog_ac_ct_CC
3527if test -n "$ac_ct_CC"; then
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3529$as_echo "$ac_ct_CC" >&6; }
3530else
3531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3532$as_echo "no" >&6; }
8c5ff6dd 3533fi
5929fbe7 3534
eb697db5
DN
3535 if test "x$ac_ct_CC" = x; then
3536 CC=""
3537 else
3538 case $cross_compiling:$ac_tool_warned in
3539yes:)
3540{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3541$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3542ac_tool_warned=yes ;;
3543esac
3544 CC=$ac_ct_CC
8c5ff6dd 3545 fi
eb697db5
DN
3546else
3547 CC="$ac_cv_prog_CC"
8c5ff6dd 3548fi
e6df49e4 3549
eb697db5
DN
3550if test -z "$CC"; then
3551 if test -n "$ac_tool_prefix"; then
3552 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3553set dummy ${ac_tool_prefix}cc; ac_word=$2
3554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3555$as_echo_n "checking for $ac_word... " >&6; }
eb697db5
DN
3556if test "${ac_cv_prog_CC+set}" = set; then :
3557 $as_echo_n "(cached) " >&6
3558else
3559 if test -n "$CC"; then
3560 ac_cv_prog_CC="$CC" # Let the user override the test.
3561else
3562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3563for as_dir in $PATH
a4f64981 3564do
5929fbe7
GM
3565 IFS=$as_save_IFS
3566 test -z "$as_dir" && as_dir=.
eb697db5 3567 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3568 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3569 ac_cv_prog_CC="${ac_tool_prefix}cc"
3570 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3571 break 2
3572 fi
a4f64981 3573done
eb697db5 3574 done
5929fbe7 3575IFS=$as_save_IFS
9452ded1 3576
5929fbe7 3577fi
eb697db5
DN
3578fi
3579CC=$ac_cv_prog_CC
3580if test -n "$CC"; then
3581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3582$as_echo "$CC" >&6; }
5929fbe7 3583else
eb697db5 3584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3585$as_echo "no" >&6; }
8c5ff6dd 3586fi
cd03c74a 3587
9452ded1 3588
5929fbe7 3589 fi
eb697db5
DN
3590fi
3591if test -z "$CC"; then
3592 # Extract the first word of "cc", so it can be a program name with args.
3593set dummy cc; ac_word=$2
3594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595$as_echo_n "checking for $ac_word... " >&6; }
3596if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3597 $as_echo_n "(cached) " >&6
3598else
eb697db5
DN
3599 if test -n "$CC"; then
3600 ac_cv_prog_CC="$CC" # Let the user override the test.
8c5ff6dd 3601else
eb697db5
DN
3602 ac_prog_rejected=no
3603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3604for as_dir in $PATH
3605do
3606 IFS=$as_save_IFS
3607 test -z "$as_dir" && as_dir=.
3608 for ac_exec_ext in '' $ac_executable_extensions; do
3609 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3610 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3611 ac_prog_rejected=yes
3612 continue
3613 fi
3614 ac_cv_prog_CC="cc"
3615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3616 break 2
3617 fi
3618done
3619 done
3620IFS=$as_save_IFS
e6df49e4 3621
eb697db5
DN
3622if test $ac_prog_rejected = yes; then
3623 # We found a bogon in the path, so make sure we never use it.
3624 set dummy $ac_cv_prog_CC
3625 shift
3626 if test $# != 0; then
3627 # We chose a different compiler from the bogus one.
3628 # However, it has the same basename, so the bogon will be chosen
3629 # first if we set CC to just the basename; use the full file name.
3630 shift
3631 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3632 fi
8c5ff6dd 3633fi
8c5ff6dd 3634fi
8c5ff6dd 3635fi
eb697db5
DN
3636CC=$ac_cv_prog_CC
3637if test -n "$CC"; then
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
3640else
3641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
8c5ff6dd 3643fi
cd03c74a 3644
8c5ff6dd 3645
eb697db5
DN
3646fi
3647if test -z "$CC"; then
3648 if test -n "$ac_tool_prefix"; then
3649 for ac_prog in cl.exe
3650 do
3651 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3652set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3654$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3655if test "${ac_cv_prog_CC+set}" = set; then :
a5edbe4a 3656 $as_echo_n "(cached) " >&6
a5edbe4a 3657else
eb697db5
DN
3658 if test -n "$CC"; then
3659 ac_cv_prog_CC="$CC" # Let the user override the test.
3660else
3661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3662for as_dir in $PATH
8c5ff6dd 3663do
5929fbe7
GM
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
eb697db5 3666 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3667 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3668 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3670 break 2
3671 fi
3672done
eb697db5 3673 done
5929fbe7 3674IFS=$as_save_IFS
8c5ff6dd 3675
8c5ff6dd 3676fi
eb697db5
DN
3677fi
3678CC=$ac_cv_prog_CC
3679if test -n "$CC"; then
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3681$as_echo "$CC" >&6; }
8c5ff6dd 3682else
eb697db5 3683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3684$as_echo "no" >&6; }
8c5ff6dd 3685fi
a4f64981 3686
a4f64981 3687
eb697db5
DN
3688 test -n "$CC" && break
3689 done
3690fi
3691if test -z "$CC"; then
3692 ac_ct_CC=$CC
3693 for ac_prog in cl.exe
3694do
3695 # Extract the first word of "$ac_prog", so it can be a program name with args.
3696set dummy $ac_prog; ac_word=$2
3697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3698$as_echo_n "checking for $ac_word... " >&6; }
3699if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5929fbe7 3700 $as_echo_n "(cached) " >&6
a4f64981 3701else
eb697db5
DN
3702 if test -n "$ac_ct_CC"; then
3703 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3704else
eb697db5
DN
3705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3706for as_dir in $PATH
3707do
3708 IFS=$as_save_IFS
3709 test -z "$as_dir" && as_dir=.
3710 for ac_exec_ext in '' $ac_executable_extensions; do
3711 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3712 ac_cv_prog_ac_ct_CC="$ac_prog"
3713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3714 break 2
3715 fi
3716done
3717 done
3718IFS=$as_save_IFS
a4f64981 3719
5929fbe7 3720fi
5929fbe7 3721fi
eb697db5
DN
3722ac_ct_CC=$ac_cv_prog_ac_ct_CC
3723if test -n "$ac_ct_CC"; then
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3725$as_echo "$ac_ct_CC" >&6; }
8c5ff6dd 3726else
eb697db5
DN
3727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3728$as_echo "no" >&6; }
8c5ff6dd 3729fi
a4f64981 3730
5929fbe7 3731
eb697db5
DN
3732 test -n "$ac_ct_CC" && break
3733done
5929fbe7 3734
eb697db5
DN
3735 if test "x$ac_ct_CC" = x; then
3736 CC=""
3737 else
3738 case $cross_compiling:$ac_tool_warned in
3739yes:)
3740{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3741$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3742ac_tool_warned=yes ;;
3743esac
3744 CC=$ac_ct_CC
3745 fi
8c5ff6dd 3746fi
a4f64981 3747
eb697db5 3748fi
8c5ff6dd 3749
5929fbe7 3750
eb697db5
DN
3751test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d608a86
J
3753as_fn_error "no acceptable C compiler found in \$PATH
3754See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 3755
eb697db5
DN
3756# Provide some information about the compiler.
3757$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3758set X $ac_compile
3759ac_compiler=$2
3760for ac_option in --version -v -V -qversion; do
3761 { { ac_try="$ac_compiler $ac_option >&5"
5929fbe7
GM
3762case "(($ac_try" in
3763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3764 *) ac_try_echo=$ac_try;;
3765esac
eb697db5
DN
3766eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3767$as_echo "$ac_try_echo"; } >&5
3768 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5929fbe7 3769 ac_status=$?
eb697db5
DN
3770 if test -s conftest.err; then
3771 sed '10a\
3772... rest of stderr output deleted ...
3773 10q' conftest.err >conftest.er1
3774 cat conftest.er1 >&5
5929fbe7 3775 fi
eb697db5
DN
3776 rm -f conftest.er1 conftest.err
3777 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3778 test $ac_status = 0; }
3779done
a4f64981 3780
eb697db5 3781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 3782/* end confdefs.h. */
8c5ff6dd 3783
5929fbe7
GM
3784int
3785main ()
3786{
3787
3788 ;
3789 return 0;
3790}
3791_ACEOF
eb697db5
DN
3792ac_clean_files_save=$ac_clean_files
3793ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3794# Try to create an executable without -o first, disregard a.out.
3795# It will help us diagnose broken compilers, and finding out an intuition
3796# of exeext.
3797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3798$as_echo_n "checking whether the C compiler works... " >&6; }
3799ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3800
3801# The possible output files:
3802ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3803
3804ac_rmfiles=
3805for ac_file in $ac_files
3806do
3807 case $ac_file in
3808 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3809 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3810 esac
3811done
3812rm -f $ac_rmfiles
3813
3814if { { ac_try="$ac_link_default"
5929fbe7
GM
3815case "(($ac_try" in
3816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3817 *) ac_try_echo=$ac_try;;
3818esac
eb697db5
DN
3819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3820$as_echo "$ac_try_echo"; } >&5
3821 (eval "$ac_link_default") 2>&5
5929fbe7 3822 ac_status=$?
eb697db5
DN
3823 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3824 test $ac_status = 0; }; then :
3825 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3826# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3827# in a Makefile. We should not override ac_cv_exeext if it was cached,
3828# so that the user can short-circuit this test for compilers unknown to
3829# Autoconf.
3830for ac_file in $ac_files ''
3831do
3832 test -f "$ac_file" || continue
3833 case $ac_file in
3834 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3835 ;;
3836 [ab].out )
3837 # We found the default executable, but exeext='' is most
3838 # certainly right.
3839 break;;
3840 *.* )
3841 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3842 then :; else
3843 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3844 fi
3845 # We set ac_cv_exeext here because the later test for it is not
3846 # safe: cross compilers may not add the suffix if given an `-o'
3847 # argument, so we may need to know it at that point already.
3848 # Even if this section looks crufty: it has the advantage of
3849 # actually working.
3850 break;;
3851 * )
3852 break;;
3853 esac
3854done
3855test "$ac_cv_exeext" = no && ac_cv_exeext=
5929fbe7 3856
eb697db5
DN
3857else
3858 ac_file=''
49ebbd65 3859fi
eb697db5
DN
3860if test -z "$ac_file"; then :
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3862$as_echo "no" >&6; }
3863$as_echo "$as_me: failed program was:" >&5
3864sed 's/^/| /' conftest.$ac_ext >&5
49ebbd65 3865
eb697db5
DN
3866{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d608a86
J
3868{ as_fn_set_status 77
3869as_fn_error "C compiler cannot create executables
3870See \`config.log' for more details." "$LINENO" 5; }; }
eb697db5
DN
3871else
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3873$as_echo "yes" >&6; }
8c5ff6dd 3874fi
eb697db5
DN
3875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3876$as_echo_n "checking for C compiler default output file name... " >&6; }
3877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3878$as_echo "$ac_file" >&6; }
3879ac_exeext=$ac_cv_exeext
e6df49e4 3880
eb697db5
DN
3881rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3882ac_clean_files=$ac_clean_files_save
3883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3884$as_echo_n "checking for suffix of executables... " >&6; }
3885if { { ac_try="$ac_link"
3886case "(($ac_try" in
3887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3888 *) ac_try_echo=$ac_try;;
3889esac
3890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3891$as_echo "$ac_try_echo"; } >&5
3892 (eval "$ac_link") 2>&5
3893 ac_status=$?
3894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895 test $ac_status = 0; }; then :
3896 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3897# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3898# work properly (i.e., refer to `conftest.exe'), while it won't with
3899# `rm'.
3900for ac_file in conftest.exe conftest conftest.*; do
3901 test -f "$ac_file" || continue
3902 case $ac_file in
3903 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3904 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3905 break;;
3906 * ) break;;
3907 esac
3908done
3909else
3910 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d608a86
J
3912as_fn_error "cannot compute suffix of executables: cannot compile and link
3913See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 3914fi
eb697db5
DN
3915rm -f conftest conftest$ac_cv_exeext
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3917$as_echo "$ac_cv_exeext" >&6; }
49ebbd65 3918
eb697db5
DN
3919rm -f conftest.$ac_ext
3920EXEEXT=$ac_cv_exeext
3921ac_exeext=$EXEEXT
3922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 3923/* end confdefs.h. */
eb697db5 3924#include <stdio.h>
5929fbe7
GM
3925int
3926main ()
3927{
eb697db5
DN
3928FILE *f = fopen ("conftest.out", "w");
3929 return ferror (f) || fclose (f) != 0;
49ebbd65 3930
5929fbe7
GM
3931 ;
3932 return 0;
3933}
3934_ACEOF
eb697db5
DN
3935ac_clean_files="$ac_clean_files conftest.out"
3936# Check that the compiler produces executables we can run. If not, either
3937# the compiler is broken, or we cross compile.
3938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3939$as_echo_n "checking whether we are cross compiling... " >&6; }
3940if test "$cross_compiling" != yes; then
3941 { { ac_try="$ac_link"
5929fbe7
GM
3942case "(($ac_try" in
3943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3944 *) ac_try_echo=$ac_try;;
3945esac
eb697db5
DN
3946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3947$as_echo "$ac_try_echo"; } >&5
3948 (eval "$ac_link") 2>&5
5929fbe7 3949 ac_status=$?
eb697db5
DN
3950 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3951 test $ac_status = 0; }
3952 if { ac_try='./conftest$ac_cv_exeext'
3953 { { case "(($ac_try" in
3954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3955 *) ac_try_echo=$ac_try;;
3956esac
3957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3958$as_echo "$ac_try_echo"; } >&5
3959 (eval "$ac_try") 2>&5
3960 ac_status=$?
3961 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3962 test $ac_status = 0; }; }; then
3963 cross_compiling=no
5929fbe7 3964 else
eb697db5
DN
3965 if test "$cross_compiling" = maybe; then
3966 cross_compiling=yes
3967 else
3968 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d608a86 3970as_fn_error "cannot run C compiled programs.
eb697db5 3971If you meant to cross compile, use \`--host'.
3d608a86 3972See \`config.log' for more details." "$LINENO" 5; }
eb697db5 3973 fi
5929fbe7 3974 fi
eb697db5
DN
3975fi
3976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3977$as_echo "$cross_compiling" >&6; }
5929fbe7 3978
eb697db5
DN
3979rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3980ac_clean_files=$ac_clean_files_save
3981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3982$as_echo_n "checking for suffix of object files... " >&6; }
3983if test "${ac_cv_objext+set}" = set; then :
a4f64981 3984 $as_echo_n "(cached) " >&6
a4f64981 3985else
eb697db5 3986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 3987/* end confdefs.h. */
8c5ff6dd
KR
3988
3989int
3990main ()
3991{
eb697db5 3992
8c5ff6dd
KR
3993 ;
3994 return 0;
3995}
a4f64981 3996_ACEOF
eb697db5
DN
3997rm -f conftest.o conftest.obj
3998if { { ac_try="$ac_compile"
5929fbe7
GM
3999case "(($ac_try" in
4000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4001 *) ac_try_echo=$ac_try;;
4002esac
eb697db5
DN
4003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4004$as_echo "$ac_try_echo"; } >&5
4005 (eval "$ac_compile") 2>&5
5929fbe7 4006 ac_status=$?
eb697db5
DN
4007 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4008 test $ac_status = 0; }; then :
4009 for ac_file in conftest.o conftest.obj conftest.*; do
4010 test -f "$ac_file" || continue;
4011 case $ac_file in
4012 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4013 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4014 break;;
4015 esac
4016done
a4f64981 4017else
5929fbe7
GM
4018 $as_echo "$as_me: failed program was:" >&5
4019sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 4020
eb697db5
DN
4021{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d608a86
J
4023as_fn_error "cannot compute suffix of object files: cannot compile
4024See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 4025fi
eb697db5 4026rm -f conftest.$ac_cv_objext conftest.$ac_ext
5929fbe7 4027fi
eb697db5
DN
4028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4029$as_echo "$ac_cv_objext" >&6; }
4030OBJEXT=$ac_cv_objext
4031ac_objext=$OBJEXT
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4033$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4034if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4035 $as_echo_n "(cached) " >&6
4036else
4037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4038/* end confdefs.h. */
8c5ff6dd 4039
eb697db5
DN
4040int
4041main ()
4042{
4043#ifndef __GNUC__
4044 choke me
4045#endif
5929fbe7 4046
eb697db5
DN
4047 ;
4048 return 0;
4049}
4050_ACEOF
4051if ac_fn_c_try_compile "$LINENO"; then :
4052 ac_compiler_gnu=yes
4053else
4054 ac_compiler_gnu=no
8c5ff6dd 4055fi
eb697db5
DN
4056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4057ac_cv_c_compiler_gnu=$ac_compiler_gnu
a4f64981 4058
a4f64981 4059fi
eb697db5
DN
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4061$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4062if test $ac_compiler_gnu = yes; then
4063 GCC=yes
4064else
4065 GCC=
4066fi
4067ac_test_CFLAGS=${CFLAGS+set}
4068ac_save_CFLAGS=$CFLAGS
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4070$as_echo_n "checking whether $CC accepts -g... " >&6; }
4071if test "${ac_cv_prog_cc_g+set}" = set; then :
5929fbe7 4072 $as_echo_n "(cached) " >&6
08b47d3d 4073else
eb697db5
DN
4074 ac_save_c_werror_flag=$ac_c_werror_flag
4075 ac_c_werror_flag=yes
4076 ac_cv_prog_cc_g=no
4077 CFLAGS="-g"
4078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0c309b80 4079/* end confdefs.h. */
8c5ff6dd 4080
9452ded1
DN
4081int
4082main ()
4083{
eb697db5 4084
5929fbe7 4085 ;
9452ded1
DN
4086 return 0;
4087}
0c309b80 4088_ACEOF
eb697db5
DN
4089if ac_fn_c_try_compile "$LINENO"; then :
4090 ac_cv_prog_cc_g=yes
8c5ff6dd 4091else
eb697db5
DN
4092 CFLAGS=""
4093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4094/* end confdefs.h. */
a4f64981 4095
eb697db5
DN
4096int
4097main ()
4098{
cd03c74a 4099
eb697db5
DN
4100 ;
4101 return 0;
4102}
a4f64981 4103_ACEOF
eb697db5 4104if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 4105
eb697db5
DN
4106else
4107 ac_c_werror_flag=$ac_save_c_werror_flag
4108 CFLAGS="-g"
4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4110/* end confdefs.h. */
a5edbe4a 4111
eb697db5
DN
4112int
4113main ()
4114{
e6df49e4 4115
eb697db5
DN
4116 ;
4117 return 0;
4118}
4119_ACEOF
4120if ac_fn_c_try_compile "$LINENO"; then :
4121 ac_cv_prog_cc_g=yes
4122fi
4123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4124fi
4125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4126fi
4127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4128 ac_c_werror_flag=$ac_save_c_werror_flag
4129fi
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4131$as_echo "$ac_cv_prog_cc_g" >&6; }
4132if test "$ac_test_CFLAGS" = set; then
4133 CFLAGS=$ac_save_CFLAGS
4134elif test $ac_cv_prog_cc_g = yes; then
4135 if test "$GCC" = yes; then
4136 CFLAGS="-g -O2"
4137 else
4138 CFLAGS="-g"
4139 fi
4140else
4141 if test "$GCC" = yes; then
4142 CFLAGS="-O2"
4143 else
4144 CFLAGS=
5929fbe7
GM
4145 fi
4146fi
eb697db5
DN
4147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4148$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4149if test "${ac_cv_prog_cc_c89+set}" = set; then :
5929fbe7
GM
4150 $as_echo_n "(cached) " >&6
4151else
eb697db5
DN
4152 ac_cv_prog_cc_c89=no
4153ac_save_CC=$CC
4154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4155/* end confdefs.h. */
eb697db5
DN
4156#include <stdarg.h>
4157#include <stdio.h>
4158#include <sys/types.h>
4159#include <sys/stat.h>
4160/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4161struct buf { int x; };
4162FILE * (*rcsopen) (struct buf *, struct stat *, int);
4163static char *e (p, i)
4164 char **p;
4165 int i;
5929fbe7 4166{
eb697db5
DN
4167 return p[i];
4168}
4169static char *f (char * (*g) (char **, int), char **p, ...)
4170{
4171 char *s;
4172 va_list v;
4173 va_start (v,p);
4174 s = g (p, va_arg (v,int));
4175 va_end (v);
4176 return s;
5929fbe7 4177}
e6df49e4 4178
eb697db5
DN
4179/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4180 function prototypes and stuff, but not '\xHH' hex character constants.
4181 These don't provoke an error unfortunately, instead are silently treated
4182 as 'x'. The following induces an error, until -std is added to get
4183 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4184 array size at least. It's necessary to write '\x00'==0 to get something
4185 that's true only with -std. */
4186int osf4_cc_array ['\x00' == 0 ? 1 : -1];
e6df49e4 4187
eb697db5
DN
4188/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4189 inside strings and character constants. */
4190#define FOO(x) 'x'
4191int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
49ebbd65 4192
eb697db5
DN
4193int test (int i, double x);
4194struct s1 {int (*f) (int a);};
4195struct s2 {int (*f) (double a);};
4196int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4197int argc;
4198char **argv;
5929fbe7
GM
4199int
4200main ()
4201{
eb697db5 4202return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5929fbe7
GM
4203 ;
4204 return 0;
4205}
4206_ACEOF
eb697db5
DN
4207for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4208 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4209do
4210 CC="$ac_save_CC $ac_arg"
4211 if ac_fn_c_try_compile "$LINENO"; then :
4212 ac_cv_prog_cc_c89=$ac_arg
4213fi
4214rm -f core conftest.err conftest.$ac_objext
4215 test "x$ac_cv_prog_cc_c89" != "xno" && break
4216done
4217rm -f conftest.$ac_ext
4218CC=$ac_save_CC
49ebbd65 4219
5929fbe7 4220fi
eb697db5
DN
4221# AC_CACHE_VAL
4222case "x$ac_cv_prog_cc_c89" in
4223 x)
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4225$as_echo "none needed" >&6; } ;;
4226 xno)
4227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4228$as_echo "unsupported" >&6; } ;;
4229 *)
4230 CC="$CC $ac_cv_prog_cc_c89"
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4232$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4233esac
4234if test "x$ac_cv_prog_cc_c89" != xno; then :
e6df49e4 4235
5929fbe7 4236fi
eb697db5
DN
4237
4238ac_ext=c
4239ac_cpp='$CPP $CPPFLAGS'
4240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4242ac_compiler_gnu=$ac_cv_c_compiler_gnu
4243
4244
4245# On Suns, sometimes $CPP names a directory.
4246if test -n "$CPP" && test -d "$CPP"; then
4247 CPP=
5929fbe7 4248fi
a4f64981 4249
eb697db5
DN
4250## If not using gcc, and on Solaris, and no CPP specified, see if
4251## using a Sun compiler, which needs -Xs to prevent whitespace.
4252if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4253 test x"$CPP" = x; then
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
4255$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
4256
4257if test "${emacs_cv_sunpro_c+set}" = set; then :
a4f64981
GM
4258 $as_echo_n "(cached) " >&6
4259else
eb697db5 4260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd03c74a 4261/* end confdefs.h. */
eb697db5 4262
15e12598
VB
4263int
4264main ()
4265{
eb697db5
DN
4266#ifndef __SUNPRO_C
4267fail;
4268#endif
4269
15e12598
VB
4270 ;
4271 return 0;
4272}
0c309b80 4273_ACEOF
eb697db5
DN
4274if ac_fn_c_try_link "$LINENO"; then :
4275 emacs_cv_sunpro_c=yes
aaa36002 4276else
eb697db5 4277 emacs_cv_sunpro_c=no
a4f64981 4278fi
eb697db5
DN
4279rm -f core conftest.err conftest.$ac_objext \
4280 conftest$ac_exeext conftest.$ac_ext
5929fbe7 4281fi
a4f64981 4282
eb697db5
DN
4283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
4284$as_echo "$emacs_cv_sunpro_c" >&6; }
a4f64981 4285
eb697db5
DN
4286 if test x"$emacs_cv_sunpro_c" = xyes; then
4287 NON_GNU_CPP="$CC -E -Xs"
4288 fi
4289fi
a4f64981 4290
eb697db5
DN
4291#### Some systems specify a CPP to use unless we are using GCC.
4292#### Now that we know whether we are using GCC, we can decide whether
4293#### to use that one.
4294if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4295then
4296 CPP="$NON_GNU_CPP"
4297fi
a4f64981 4298
eb697db5
DN
4299#### Some systems specify a CC to use unless we are using GCC.
4300#### Now that we know whether we are using GCC, we can decide whether
4301#### to use that one.
4302if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4303 test x$cc_specified != xyes
4304then
4305 CC="$NON_GNU_CC"
4306fi
a4f64981 4307
9164c0e4
AS
4308if test x$GCC = xyes; then
4309 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
4310else
4311 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
4312fi
4313
eb697db5
DN
4314ac_ext=c
4315ac_cpp='$CPP $CPPFLAGS'
4316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4318ac_compiler_gnu=$ac_cv_c_compiler_gnu
4319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4320$as_echo_n "checking how to run the C preprocessor... " >&6; }
4321# On Suns, sometimes $CPP names a directory.
4322if test -n "$CPP" && test -d "$CPP"; then
4323 CPP=
4324fi
4325if test -z "$CPP"; then
4326 if test "${ac_cv_prog_CPP+set}" = set; then :
4327 $as_echo_n "(cached) " >&6
4328else
4329 # Double quotes because CPP needs to be expanded
4330 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4331 do
4332 ac_preproc_ok=false
4333for ac_c_preproc_warn_flag in '' yes
4334do
4335 # Use a header file that comes with gcc, so configuring glibc
4336 # with a fresh cross-compiler works.
4337 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4338 # <limits.h> exists even on freestanding compilers.
4339 # On the NeXT, cc -E runs the code through the compiler's parser,
4340 # not just through cpp. "Syntax error" is here to catch this case.
4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 4342/* end confdefs.h. */
eb697db5
DN
4343#ifdef __STDC__
4344# include <limits.h>
4345#else
4346# include <assert.h>
4347#endif
4348 Syntax error
49ebbd65 4349_ACEOF
eb697db5
DN
4350if ac_fn_c_try_cpp "$LINENO"; then :
4351
4352else
4353 # Broken: fails on valid input.
4354continue
4355fi
4356rm -f conftest.err conftest.$ac_ext
5929fbe7 4357
eb697db5
DN
4358 # OK, works on sane cases. Now check whether nonexistent headers
4359 # can be detected and how.
4360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4361/* end confdefs.h. */
4362#include <ac_nonexistent.h>
5929fbe7 4363_ACEOF
eb697db5
DN
4364if ac_fn_c_try_cpp "$LINENO"; then :
4365 # Broken: success on invalid input.
4366continue
8c5ff6dd 4367else
eb697db5
DN
4368 # Passes both tests.
4369ac_preproc_ok=:
4370break
8c5ff6dd 4371fi
eb697db5 4372rm -f conftest.err conftest.$ac_ext
5929fbe7 4373
eb697db5
DN
4374done
4375# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4376rm -f conftest.err conftest.$ac_ext
4377if $ac_preproc_ok; then :
4378 break
4379fi
5929fbe7 4380
eb697db5
DN
4381 done
4382 ac_cv_prog_CPP=$CPP
5929fbe7 4383
eb697db5
DN
4384fi
4385 CPP=$ac_cv_prog_CPP
4386else
4387 ac_cv_prog_CPP=$CPP
4388fi
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4390$as_echo "$CPP" >&6; }
4391ac_preproc_ok=false
4392for ac_c_preproc_warn_flag in '' yes
4393do
4394 # Use a header file that comes with gcc, so configuring glibc
4395 # with a fresh cross-compiler works.
4396 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4397 # <limits.h> exists even on freestanding compilers.
4398 # On the NeXT, cc -E runs the code through the compiler's parser,
4399 # not just through cpp. "Syntax error" is here to catch this case.
4400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4401/* end confdefs.h. */
4402#ifdef __STDC__
4403# include <limits.h>
4404#else
4405# include <assert.h>
4406#endif
4407 Syntax error
5929fbe7 4408_ACEOF
eb697db5 4409if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4410
eb697db5
DN
4411else
4412 # Broken: fails on valid input.
4413continue
8c5ff6dd 4414fi
eb697db5 4415rm -f conftest.err conftest.$ac_ext
8c5ff6dd 4416
eb697db5
DN
4417 # OK, works on sane cases. Now check whether nonexistent headers
4418 # can be detected and how.
4419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 4420/* end confdefs.h. */
eb697db5 4421#include <ac_nonexistent.h>
8c5ff6dd 4422_ACEOF
eb697db5
DN
4423if ac_fn_c_try_cpp "$LINENO"; then :
4424 # Broken: success on invalid input.
4425continue
a5edbe4a 4426else
eb697db5
DN
4427 # Passes both tests.
4428ac_preproc_ok=:
4429break
4430fi
4431rm -f conftest.err conftest.$ac_ext
e6df49e4 4432
eb697db5
DN
4433done
4434# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4435rm -f conftest.err conftest.$ac_ext
4436if $ac_preproc_ok; then :
cd03c74a 4437
eb697db5
DN
4438else
4439 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d608a86
J
4441as_fn_error "C preprocessor \"$CPP\" fails sanity check
4442See \`config.log' for more details." "$LINENO" 5; }
a4f64981 4443fi
e6df49e4 4444
eb697db5
DN
4445ac_ext=c
4446ac_cpp='$CPP $CPPFLAGS'
4447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4449ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 4450
a5edbe4a 4451
eb697db5
DN
4452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4453$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4454if test "${ac_cv_path_GREP+set}" = set; then :
4455 $as_echo_n "(cached) " >&6
4456else
4457 if test -z "$GREP"; then
4458 ac_path_GREP_found=false
4459 # Loop through the user's path and test for each of PROGNAME-LIST
4460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4462do
4463 IFS=$as_save_IFS
4464 test -z "$as_dir" && as_dir=.
4465 for ac_prog in grep ggrep; do
4466 for ac_exec_ext in '' $ac_executable_extensions; do
4467 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4468 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4469# Check for GNU ac_path_GREP and select it if it is found.
4470 # Check for GNU $ac_path_GREP
4471case `"$ac_path_GREP" --version 2>&1` in
4472*GNU*)
4473 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4474*)
4475 ac_count=0
4476 $as_echo_n 0123456789 >"conftest.in"
4477 while :
4478 do
4479 cat "conftest.in" "conftest.in" >"conftest.tmp"
4480 mv "conftest.tmp" "conftest.in"
4481 cp "conftest.in" "conftest.nl"
4482 $as_echo 'GREP' >> "conftest.nl"
4483 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4484 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4485 as_fn_arith $ac_count + 1 && ac_count=$as_val
4486 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4487 # Best one so far, save it but keep looking for a better one
4488 ac_cv_path_GREP="$ac_path_GREP"
4489 ac_path_GREP_max=$ac_count
4490 fi
4491 # 10*(2^10) chars as input seems more than enough
4492 test $ac_count -gt 10 && break
4493 done
4494 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4495esac
a5edbe4a 4496
eb697db5
DN
4497 $ac_path_GREP_found && break 3
4498 done
4499 done
4500 done
4501IFS=$as_save_IFS
4502 if test -z "$ac_cv_path_GREP"; then
3d608a86 4503 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5929fbe7 4504 fi
eb697db5
DN
4505else
4506 ac_cv_path_GREP=$GREP
cd03c74a 4507fi
0c309b80 4508
eb697db5
DN
4509fi
4510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4511$as_echo "$ac_cv_path_GREP" >&6; }
4512 GREP="$ac_cv_path_GREP"
15e12598 4513
8c5ff6dd 4514
eb697db5
DN
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4516$as_echo_n "checking for egrep... " >&6; }
4517if test "${ac_cv_path_EGREP+set}" = set; then :
8c5ff6dd 4518 $as_echo_n "(cached) " >&6
aaa36002 4519else
eb697db5
DN
4520 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4521 then ac_cv_path_EGREP="$GREP -E"
4522 else
4523 if test -z "$EGREP"; then
4524 ac_path_EGREP_found=false
4525 # Loop through the user's path and test for each of PROGNAME-LIST
8c5ff6dd 4526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 4527for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8c5ff6dd
KR
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
eb697db5
DN
4531 for ac_prog in egrep; do
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4534 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4535# Check for GNU ac_path_EGREP and select it if it is found.
4536 # Check for GNU $ac_path_EGREP
4537case `"$ac_path_EGREP" --version 2>&1` in
4538*GNU*)
4539 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4540*)
4541 ac_count=0
4542 $as_echo_n 0123456789 >"conftest.in"
4543 while :
4544 do
4545 cat "conftest.in" "conftest.in" >"conftest.tmp"
4546 mv "conftest.tmp" "conftest.in"
4547 cp "conftest.in" "conftest.nl"
4548 $as_echo 'EGREP' >> "conftest.nl"
4549 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4550 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4551 as_fn_arith $ac_count + 1 && ac_count=$as_val
4552 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4553 # Best one so far, save it but keep looking for a better one
4554 ac_cv_path_EGREP="$ac_path_EGREP"
4555 ac_path_EGREP_max=$ac_count
4556 fi
4557 # 10*(2^10) chars as input seems more than enough
4558 test $ac_count -gt 10 && break
4559 done
4560 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4561esac
4562
4563 $ac_path_EGREP_found && break 3
4564 done
4565 done
4566 done
5929fbe7 4567IFS=$as_save_IFS
eb697db5 4568 if test -z "$ac_cv_path_EGREP"; then
3d608a86 4569 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
eb697db5
DN
4570 fi
4571else
4572 ac_cv_path_EGREP=$EGREP
4573fi
5929fbe7 4574
eb697db5 4575 fi
5929fbe7 4576fi
eb697db5
DN
4577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4578$as_echo "$ac_cv_path_EGREP" >&6; }
4579 EGREP="$ac_cv_path_EGREP"
4580
4581
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4583$as_echo_n "checking for ANSI C header files... " >&6; }
4584if test "${ac_cv_header_stdc+set}" = set; then :
4585 $as_echo_n "(cached) " >&6
4586else
4587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4588/* end confdefs.h. */
4589#include <stdlib.h>
4590#include <stdarg.h>
4591#include <string.h>
4592#include <float.h>
4593
4594int
4595main ()
4596{
4597
4598 ;
4599 return 0;
4600}
4601_ACEOF
4602if ac_fn_c_try_compile "$LINENO"; then :
4603 ac_cv_header_stdc=yes
5929fbe7 4604else
eb697db5 4605 ac_cv_header_stdc=no
5929fbe7 4606fi
eb697db5 4607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 4608
eb697db5
DN
4609if test $ac_cv_header_stdc = yes; then
4610 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4612/* end confdefs.h. */
4613#include <string.h>
15e12598 4614
eb697db5
DN
4615_ACEOF
4616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4617 $EGREP "memchr" >/dev/null 2>&1; then :
a4f64981 4618
eb697db5
DN
4619else
4620 ac_cv_header_stdc=no
4621fi
4622rm -f conftest*
5929fbe7 4623
eb697db5 4624fi
5929fbe7 4625
eb697db5
DN
4626if test $ac_cv_header_stdc = yes; then
4627 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4629/* end confdefs.h. */
4630#include <stdlib.h>
5929fbe7 4631
eb697db5
DN
4632_ACEOF
4633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4634 $EGREP "free" >/dev/null 2>&1; then :
5929fbe7 4635
eb697db5
DN
4636else
4637 ac_cv_header_stdc=no
4638fi
4639rm -f conftest*
5929fbe7 4640
eb697db5 4641fi
5929fbe7 4642
eb697db5
DN
4643if test $ac_cv_header_stdc = yes; then
4644 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4645 if test "$cross_compiling" = yes; then :
4646 :
4647else
4648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4649/* end confdefs.h. */
4650#include <ctype.h>
4651#include <stdlib.h>
4652#if ((' ' & 0x0FF) == 0x020)
4653# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4654# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4655#else
4656# define ISLOWER(c) \
4657 (('a' <= (c) && (c) <= 'i') \
4658 || ('j' <= (c) && (c) <= 'r') \
4659 || ('s' <= (c) && (c) <= 'z'))
4660# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4661#endif
5929fbe7 4662
eb697db5
DN
4663#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4664int
4665main ()
4666{
4667 int i;
4668 for (i = 0; i < 256; i++)
4669 if (XOR (islower (i), ISLOWER (i))
4670 || toupper (i) != TOUPPER (i))
4671 return 2;
4672 return 0;
4673}
4674_ACEOF
4675if ac_fn_c_try_run "$LINENO"; then :
a4f64981 4676
eb697db5
DN
4677else
4678 ac_cv_header_stdc=no
4679fi
4680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4681 conftest.$ac_objext conftest.beam conftest.$ac_ext
4682fi
aaa36002 4683
eb697db5
DN
4684fi
4685fi
4686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4687$as_echo "$ac_cv_header_stdc" >&6; }
4688if test $ac_cv_header_stdc = yes; then
cd03c74a 4689
eb697db5 4690$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a5edbe4a 4691
eb697db5 4692fi
5929fbe7 4693
eb697db5
DN
4694# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4695for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4696 inttypes.h stdint.h unistd.h
4697do :
4698 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4699ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4700"
3d608a86
J
4701eval as_val=\$$as_ac_Header
4702 if test "x$as_val" = x""yes; then :
eb697db5
DN
4703 cat >>confdefs.h <<_ACEOF
4704#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4705_ACEOF
4706
4707fi
5929fbe7 4708
5929fbe7 4709done
a5edbe4a 4710
5929fbe7
GM
4711
4712
eb697db5
DN
4713 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4714if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4715 MINIX=yes
4716else
4717 MINIX=
4718fi
5929fbe7 4719
5929fbe7 4720
eb697db5 4721 if test "$MINIX" = yes; then
5929fbe7 4722
eb697db5 4723$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5929fbe7 4724
5929fbe7 4725
eb697db5 4726$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5929fbe7
GM
4727
4728
eb697db5 4729$as_echo "#define _MINIX 1" >>confdefs.h
5929fbe7 4730
5929fbe7
GM
4731 fi
4732
5929fbe7 4733
eb697db5
DN
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4735$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4736if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5929fbe7
GM
4737 $as_echo_n "(cached) " >&6
4738else
eb697db5 4739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7
GM
4740/* end confdefs.h. */
4741
eb697db5
DN
4742# define __EXTENSIONS__ 1
4743 $ac_includes_default
5929fbe7
GM
4744int
4745main ()
4746{
eb697db5 4747
5929fbe7
GM
4748 ;
4749 return 0;
4750}
4751_ACEOF
eb697db5
DN
4752if ac_fn_c_try_compile "$LINENO"; then :
4753 ac_cv_safe_to_define___extensions__=yes
5929fbe7 4754else
eb697db5 4755 ac_cv_safe_to_define___extensions__=no
e6df49e4 4756fi
eb697db5 4757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9452ded1 4758fi
eb697db5
DN
4759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4760$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4761 test $ac_cv_safe_to_define___extensions__ = yes &&
4762 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
8c5ff6dd 4763
eb697db5 4764 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
a4f64981 4765
eb697db5 4766 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
a4f64981 4767
eb697db5 4768 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5929fbe7 4769
eb697db5 4770 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
a4f64981
GM
4771
4772
a4f64981 4773
eb697db5
DN
4774### Use -Wno-pointer-sign if the compiler supports it
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
4776$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
4777SAVE_CFLAGS="$CFLAGS"
4778CFLAGS="$CFLAGS -Wno-pointer-sign"
4779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4780/* end confdefs.h. */
e6df49e4 4781
eb697db5
DN
4782int
4783main ()
4784{
4785
4786 ;
4787 return 0;
4788}
4789_ACEOF
4790if ac_fn_c_try_compile "$LINENO"; then :
4791 has_option=yes
5929fbe7 4792else
eb697db5 4793 has_option=no
cd03c74a 4794fi
eb697db5
DN
4795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4796if test $has_option = yes; then
4797 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
5929fbe7 4798fi
eb697db5
DN
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4800$as_echo "$has_option" >&6; }
4801CFLAGS="$SAVE_CFLAGS"
4802unset has_option
4803unset SAVE_CFLAGS
4804
4805### Use -Wdeclaration-after-statement if the compiler supports it
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
4807$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4808SAVE_CFLAGS="$CFLAGS"
4809CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4811/* end confdefs.h. */
aaa36002 4812
5929fbe7
GM
4813int
4814main ()
4815{
eb697db5 4816
5929fbe7
GM
4817 ;
4818 return 0;
4819}
4820_ACEOF
eb697db5
DN
4821if ac_fn_c_try_compile "$LINENO"; then :
4822 has_option=yes
7186fb09 4823else
eb697db5
DN
4824 has_option=no
4825fi
4826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4827if test $has_option = yes; then
4828 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
4829fi
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4831$as_echo "$has_option" >&6; }
4832CFLAGS="$SAVE_CFLAGS"
4833unset has_option
4834unset SAVE_CFLAGS
4835
45871610
DN
4836### Use -Wold-style-definition if the compiler supports it
4837# This can be removed when conversion to standard C is finished.
4838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wold-style-definition" >&5
4839$as_echo_n "checking whether gcc understands -Wold-style-definition... " >&6; }
4840SAVE_CFLAGS="$CFLAGS"
4841CFLAGS="$CFLAGS -Wold-style-definition"
4842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843/* end confdefs.h. */
4844
4845int
4846main ()
4847{
4848
4849 ;
4850 return 0;
4851}
4852_ACEOF
4853if ac_fn_c_try_compile "$LINENO"; then :
4854 has_option=yes
4855else
4856 has_option=no
4857fi
4858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4859if test $has_option = yes; then
4860 C_WARNINGS_SWITCH="-Wold-style-definition $C_WARNINGS_SWITCH"
4861fi
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4863$as_echo "$has_option" >&6; }
4864CFLAGS="$SAVE_CFLAGS"
4865unset has_option
4866unset SAVE_CFLAGS
4867
4868
e6cfa7c3 4869
eb697db5 4870#### Some other nice autoconf tests.
e6df49e4 4871
eb697db5
DN
4872ac_ext=c
4873ac_cpp='$CPP $CPPFLAGS'
4874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4876ac_compiler_gnu=$ac_cv_c_compiler_gnu
4877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4878$as_echo_n "checking how to run the C preprocessor... " >&6; }
4879# On Suns, sometimes $CPP names a directory.
4880if test -n "$CPP" && test -d "$CPP"; then
4881 CPP=
5929fbe7 4882fi
eb697db5
DN
4883if test -z "$CPP"; then
4884 if test "${ac_cv_prog_CPP+set}" = set; then :
4885 $as_echo_n "(cached) " >&6
4886else
4887 # Double quotes because CPP needs to be expanded
4888 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4889 do
4890 ac_preproc_ok=false
4891for ac_c_preproc_warn_flag in '' yes
4892do
4893 # Use a header file that comes with gcc, so configuring glibc
4894 # with a fresh cross-compiler works.
4895 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4896 # <limits.h> exists even on freestanding compilers.
4897 # On the NeXT, cc -E runs the code through the compiler's parser,
4898 # not just through cpp. "Syntax error" is here to catch this case.
4899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900/* end confdefs.h. */
4901#ifdef __STDC__
4902# include <limits.h>
4903#else
4904# include <assert.h>
4905#endif
4906 Syntax error
4907_ACEOF
4908if ac_fn_c_try_cpp "$LINENO"; then :
15e12598 4909
eb697db5
DN
4910else
4911 # Broken: fails on valid input.
4912continue
8c5ff6dd 4913fi
eb697db5
DN
4914rm -f conftest.err conftest.$ac_ext
4915
4916 # OK, works on sane cases. Now check whether nonexistent headers
4917 # can be detected and how.
4918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4919/* end confdefs.h. */
4920#include <ac_nonexistent.h>
4921_ACEOF
4922if ac_fn_c_try_cpp "$LINENO"; then :
4923 # Broken: success on invalid input.
4924continue
4925else
4926 # Passes both tests.
4927ac_preproc_ok=:
4928break
a4f64981 4929fi
eb697db5 4930rm -f conftest.err conftest.$ac_ext
e6df49e4 4931
eb697db5
DN
4932done
4933# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4934rm -f conftest.err conftest.$ac_ext
4935if $ac_preproc_ok; then :
4936 break
5929fbe7 4937fi
8c5ff6dd 4938
eb697db5
DN
4939 done
4940 ac_cv_prog_CPP=$CPP
aaa36002 4941
eb697db5
DN
4942fi
4943 CPP=$ac_cv_prog_CPP
4944else
4945 ac_cv_prog_CPP=$CPP
4946fi
4947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4948$as_echo "$CPP" >&6; }
4949ac_preproc_ok=false
4950for ac_c_preproc_warn_flag in '' yes
4951do
4952 # Use a header file that comes with gcc, so configuring glibc
4953 # with a fresh cross-compiler works.
4954 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4955 # <limits.h> exists even on freestanding compilers.
4956 # On the NeXT, cc -E runs the code through the compiler's parser,
4957 # not just through cpp. "Syntax error" is here to catch this case.
4958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4959/* end confdefs.h. */
4960#ifdef __STDC__
4961# include <limits.h>
4962#else
4963# include <assert.h>
4964#endif
4965 Syntax error
4966_ACEOF
4967if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4968
eb697db5
DN
4969else
4970 # Broken: fails on valid input.
4971continue
4972fi
4973rm -f conftest.err conftest.$ac_ext
5929fbe7 4974
eb697db5
DN
4975 # OK, works on sane cases. Now check whether nonexistent headers
4976 # can be detected and how.
4977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4978/* end confdefs.h. */
4979#include <ac_nonexistent.h>
5929fbe7 4980_ACEOF
eb697db5
DN
4981if ac_fn_c_try_cpp "$LINENO"; then :
4982 # Broken: success on invalid input.
4983continue
4984else
4985 # Passes both tests.
4986ac_preproc_ok=:
4987break
4988fi
4989rm -f conftest.err conftest.$ac_ext
5929fbe7 4990
eb697db5
DN
4991done
4992# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4993rm -f conftest.err conftest.$ac_ext
4994if $ac_preproc_ok; then :
5929fbe7 4995
eb697db5
DN
4996else
4997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d608a86
J
4999as_fn_error "C preprocessor \"$CPP\" fails sanity check
5000See \`config.log' for more details." "$LINENO" 5; }
eb697db5 5001fi
5929fbe7 5002
eb697db5
DN
5003ac_ext=c
5004ac_cpp='$CPP $CPPFLAGS'
5005ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5006ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5007ac_compiler_gnu=$ac_cv_c_compiler_gnu
5008
5009# Find a good install program. We prefer a C program (faster),
5010# so one script is as good as another. But avoid the broken or
5011# incompatible versions:
5012# SysV /etc/install, /usr/sbin/install
5013# SunOS /usr/etc/install
5014# IRIX /sbin/install
5015# AIX /bin/install
5016# AmigaOS /C/install, which installs bootblocks on floppy discs
5017# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5018# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5019# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5020# OS/2's system install, which has a completely different semantic
5021# ./install, which can be erroneously created by make from ./install.sh.
5022# Reject install programs that cannot install multiple files.
5023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5024$as_echo_n "checking for a BSD-compatible install... " >&6; }
5025if test -z "$INSTALL"; then
5026if test "${ac_cv_path_install+set}" = set; then :
5027 $as_echo_n "(cached) " >&6
5028else
5029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
5034 # Account for people who put trailing slashes in PATH elements.
5035case $as_dir/ in #((
5036 ./ | .// | /[cC]/* | \
5037 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5038 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5039 /usr/ucb/* ) ;;
5040 *)
5041 # OSF1 and SCO ODT 3.0 have their own names for install.
5042 # Don't use installbsd from OSF since it installs stuff as root
5043 # by default.
5044 for ac_prog in ginstall scoinst install; do
5045 for ac_exec_ext in '' $ac_executable_extensions; do
5046 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5047 if test $ac_prog = install &&
5048 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5049 # AIX install. It has an incompatible calling convention.
5050 :
5051 elif test $ac_prog = install &&
5052 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5053 # program-specific install script used by HP pwplus--don't use.
5054 :
5055 else
5056 rm -rf conftest.one conftest.two conftest.dir
5057 echo one > conftest.one
5058 echo two > conftest.two
5059 mkdir conftest.dir
5060 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5061 test -s conftest.one && test -s conftest.two &&
5062 test -s conftest.dir/conftest.one &&
5063 test -s conftest.dir/conftest.two
5064 then
5065 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5066 break 3
5067 fi
5068 fi
5069 fi
5070 done
5071 done
5072 ;;
5073esac
15e12598 5074
eb697db5
DN
5075 done
5076IFS=$as_save_IFS
8c5ff6dd 5077
eb697db5 5078rm -rf conftest.one conftest.two conftest.dir
8c5ff6dd 5079
eb697db5
DN
5080fi
5081 if test "${ac_cv_path_install+set}" = set; then
5082 INSTALL=$ac_cv_path_install
5083 else
5084 # As a last resort, use the slow shell script. Don't cache a
5085 # value for INSTALL within a source directory, because that will
5086 # break other packages using the cache if that directory is
5087 # removed, or if the value is a relative name.
5088 INSTALL=$ac_install_sh
5089 fi
5090fi
5091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5092$as_echo "$INSTALL" >&6; }
cd03c74a 5093
eb697db5
DN
5094# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5095# It thinks the first close brace ends the variable substitution.
5096test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
15e12598 5097
eb697db5 5098test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
15e12598 5099
eb697db5 5100test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
a4f64981 5101
eb697db5
DN
5102if test "x$RANLIB" = x; then
5103 if test -n "$ac_tool_prefix"; then
5104 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5105set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8c5ff6dd 5107$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5108if test "${ac_cv_prog_RANLIB+set}" = set; then :
7186fb09
GM
5109 $as_echo_n "(cached) " >&6
5110else
eb697db5
DN
5111 if test -n "$RANLIB"; then
5112 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5113else
5114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8c5ff6dd
KR
5115for as_dir in $PATH
5116do
5117 IFS=$as_save_IFS
5118 test -z "$as_dir" && as_dir=.
eb697db5 5119 for ac_exec_ext in '' $ac_executable_extensions; do
8c5ff6dd 5120 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5121 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8c5ff6dd
KR
5123 break 2
5124 fi
5125done
eb697db5 5126 done
8c5ff6dd 5127IFS=$as_save_IFS
a4f64981 5128
e6df49e4 5129fi
eb697db5
DN
5130fi
5131RANLIB=$ac_cv_prog_RANLIB
5132if test -n "$RANLIB"; then
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5134$as_echo "$RANLIB" >&6; }
a4f64981 5135else
eb697db5 5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8c5ff6dd 5137$as_echo "no" >&6; }
a4f64981
GM
5138fi
5139
a4f64981 5140
eb697db5
DN
5141fi
5142if test -z "$ac_cv_prog_RANLIB"; then
5143 ac_ct_RANLIB=$RANLIB
5144 # Extract the first word of "ranlib", so it can be a program name with args.
5145set dummy ranlib; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5149 $as_echo_n "(cached) " >&6
5150else
5151 if test -n "$ac_ct_RANLIB"; then
5152 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5153else
5154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157 IFS=$as_save_IFS
5158 test -z "$as_dir" && as_dir=.
5159 for ac_exec_ext in '' $ac_executable_extensions; do
5160 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5161 ac_cv_prog_ac_ct_RANLIB="ranlib"
5162 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5163 break 2
5164 fi
5165done
5166 done
5167IFS=$as_save_IFS
8c5ff6dd 5168
eb697db5
DN
5169fi
5170fi
5171ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5172if test -n "$ac_ct_RANLIB"; then
5173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5174$as_echo "$ac_ct_RANLIB" >&6; }
5175else
5176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5177$as_echo "no" >&6; }
eb697db5 5178fi
e6df49e4 5179
eb697db5
DN
5180 if test "x$ac_ct_RANLIB" = x; then
5181 RANLIB=":"
5182 else
5183 case $cross_compiling:$ac_tool_warned in
5184yes:)
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5186$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5187ac_tool_warned=yes ;;
5188esac
5189 RANLIB=$ac_ct_RANLIB
5190 fi
5191else
5192 RANLIB="$ac_cv_prog_RANLIB"
5193fi
a5edbe4a 5194
eb697db5 5195fi
15e12598 5196
eb697db5
DN
5197## Although we're running on an amd64 kernel, we're actually compiling for
5198## the x86 architecture. The user should probably have provided an
5199## explicit --build to `configure', but if everything else than the kernel
5200## is running in i386 mode, we can help them out.
5201if test "$machine" = "amdx86-64"; then
5202 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
5203if test "x$ac_cv_have_decl_i386" = x""yes; then :
15e12598 5204
eb697db5 5205fi
cd03c74a 5206
eb697db5
DN
5207 if test "$ac_cv_have_decl_i386" = "yes"; then
5208 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
5209 machine=intel386
5210 machfile="m/${machine}.h"
5929fbe7 5211 fi
eb697db5 5212fi
49ebbd65 5213
eb697db5
DN
5214# Extract the first word of "install-info", so it can be a program name with args.
5215set dummy install-info; ac_word=$2
5216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5217$as_echo_n "checking for $ac_word... " >&6; }
5218if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5929fbe7
GM
5219 $as_echo_n "(cached) " >&6
5220else
eb697db5
DN
5221 case $INSTALL_INFO in
5222 [\\/]* | ?:[\\/]*)
5223 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5224 ;;
5225 *)
5226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5227for as_dir in $PATH
5228do
5229 IFS=$as_save_IFS
5230 test -z "$as_dir" && as_dir=.
5231 for ac_exec_ext in '' $ac_executable_extensions; do
5232 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5233 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5234 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5235 break 2
5236 fi
5237done
5238 done
5239IFS=$as_save_IFS
8c5ff6dd 5240
eb697db5 5241 ;;
a4f64981 5242esac
eb697db5
DN
5243fi
5244INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5245if test -n "$INSTALL_INFO"; then
5246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5247$as_echo "$INSTALL_INFO" >&6; }
5248else
5249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5250$as_echo "no" >&6; }
5929fbe7 5251fi
49ebbd65 5252
08b47d3d 5253
eb697db5
DN
5254# Extract the first word of "install-info", so it can be a program name with args.
5255set dummy install-info; ac_word=$2
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 5257$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5258if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5929fbe7
GM
5259 $as_echo_n "(cached) " >&6
5260else
eb697db5 5261 case $INSTALL_INFO in
5929fbe7 5262 [\\/]* | ?:[\\/]*)
eb697db5 5263 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5929fbe7
GM
5264 ;;
5265 *)
5266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 5267for as_dir in /usr/sbin
5929fbe7
GM
5268do
5269 IFS=$as_save_IFS
5270 test -z "$as_dir" && as_dir=.
eb697db5 5271 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 5272 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5273 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7 5275 break 2
8c5ff6dd 5276 fi
5929fbe7 5277done
eb697db5 5278 done
5929fbe7
GM
5279IFS=$as_save_IFS
5280
5929fbe7
GM
5281 ;;
5282esac
5283fi
eb697db5
DN
5284INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5285if test -n "$INSTALL_INFO"; then
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5287$as_echo "$INSTALL_INFO" >&6; }
5929fbe7 5288else
eb697db5 5289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5290$as_echo "no" >&6; }
8c5ff6dd 5291fi
08b47d3d 5292
08b47d3d 5293
eb697db5
DN
5294# Extract the first word of "install-info", so it can be a program name with args.
5295set dummy install-info; ac_word=$2
5296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5297$as_echo_n "checking for $ac_word... " >&6; }
5298if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5299 $as_echo_n "(cached) " >&6
5300else
5301 case $INSTALL_INFO in
5302 [\\/]* | ?:[\\/]*)
5303 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5304 ;;
5305 *)
5306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5307for as_dir in /sbin
5308do
5309 IFS=$as_save_IFS
5310 test -z "$as_dir" && as_dir=.
5311 for ac_exec_ext in '' $ac_executable_extensions; do
5312 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5313 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5315 break 2
5929fbe7 5316 fi
eb697db5
DN
5317done
5318 done
5319IFS=$as_save_IFS
08b47d3d 5320
eb697db5
DN
5321 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5322 ;;
5323esac
5324fi
5325INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5326if test -n "$INSTALL_INFO"; then
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5328$as_echo "$INSTALL_INFO" >&6; }
8c5ff6dd 5329else
eb697db5
DN
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
a4f64981 5332fi
08b47d3d 5333
5929fbe7 5334
eb697db5
DN
5335# Extract the first word of "gzip", so it can be a program name with args.
5336set dummy gzip; ac_word=$2
5337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5338$as_echo_n "checking for $ac_word... " >&6; }
5339if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
5929fbe7 5340 $as_echo_n "(cached) " >&6
5929fbe7 5341else
eb697db5
DN
5342 case $GZIP_PROG in
5343 [\\/]* | ?:[\\/]*)
5344 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
5345 ;;
5346 *)
5347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5348for as_dir in $PATH
5349do
5350 IFS=$as_save_IFS
5351 test -z "$as_dir" && as_dir=.
5352 for ac_exec_ext in '' $ac_executable_extensions; do
5353 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5354 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
5355 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5356 break 2
5357 fi
5358done
5359 done
5360IFS=$as_save_IFS
5929fbe7 5361
eb697db5 5362 ;;
8c5ff6dd 5363esac
eb697db5
DN
5364fi
5365GZIP_PROG=$ac_cv_path_GZIP_PROG
5366if test -n "$GZIP_PROG"; then
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
5368$as_echo "$GZIP_PROG" >&6; }
5929fbe7 5369else
eb697db5
DN
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5371$as_echo "no" >&6; }
5929fbe7
GM
5372fi
5373
5929fbe7 5374
5929fbe7 5375
8c5ff6dd 5376
eb697db5
DN
5377## Need makeinfo >= 4.6 (?) to build the manuals.
5378# Extract the first word of "makeinfo", so it can be a program name with args.
5379set dummy makeinfo; ac_word=$2
5380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5381$as_echo_n "checking for $ac_word... " >&6; }
5382if test "${ac_cv_path_MAKEINFO+set}" = set; then :
5929fbe7
GM
5383 $as_echo_n "(cached) " >&6
5384else
eb697db5
DN
5385 case $MAKEINFO in
5386 [\\/]* | ?:[\\/]*)
5387 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5388 ;;
5389 *)
5390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5391for as_dir in $PATH
5392do
5393 IFS=$as_save_IFS
5394 test -z "$as_dir" && as_dir=.
5395 for ac_exec_ext in '' $ac_executable_extensions; do
5396 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5397 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5399 break 2
5400 fi
5401done
5402 done
5403IFS=$as_save_IFS
5929fbe7 5404
eb697db5
DN
5405 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5406 ;;
a4f64981 5407esac
eb697db5
DN
5408fi
5409MAKEINFO=$ac_cv_path_MAKEINFO
5410if test -n "$MAKEINFO"; then
5411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
5412$as_echo "$MAKEINFO" >&6; }
5929fbe7 5413else
eb697db5
DN
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
5416fi
e6df49e4 5417
eb697db5
DN
5418
5419if test "$MAKEINFO" != "no" && \
5420 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
5421 MAKEINFO=no
5929fbe7 5422fi
e6df49e4 5423
eb697db5
DN
5424## Makeinfo is unusual. For a released Emacs, the manuals are
5425## pre-built, and not deleted by the normal clean rules. makeinfo is
5426## therefore in the category of "special tools" not normally required, which
5427## configure does not have to check for (eg autoconf itself).
5428## In a Bazaar checkout on the other hand, the manuals are not included.
5429## So makeinfo is a requirement to build from Bazaar, and configure
5430## should test for it as it does for any other build requirement.
5431## We use the presence of $srcdir/info/emacs to distinguish a release,
5432## with pre-built manuals, from a Bazaar checkout.
5433if test "$MAKEINFO" = "no"; then
5434 if test "x${with_makeinfo}" = "xno"; then
5435 MAKEINFO=off
5436 elif test ! -e $srcdir/info/emacs; then
3d608a86 5437 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
eb697db5
DN
5438source tree does not seem to have pre-built manuals in the \`info' directory.
5439Either install a suitable version of makeinfo, or re-run configure
5440with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
5441 fi
5929fbe7 5442fi
eb697db5
DN
5443
5444
5445if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5446then
f4981b7e 5447 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5929fbe7 5448fi
e6df49e4 5449
eb697db5
DN
5450if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5451then
f4981b7e 5452 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5929fbe7 5453fi
e6df49e4
GM
5454
5455
eb697db5
DN
5456late_LDFLAGS=$LDFLAGS
5457if test "$GCC" = yes; then
5458 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5459else
5460 LDFLAGS="$LDFLAGS -znocombreloc"
5461fi
e6df49e4 5462
eb697db5
DN
5463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
5464$as_echo_n "checking for -znocombreloc... " >&6; }
5465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5466/* end confdefs.h. */
5467main(){return 0;}
5929fbe7 5468_ACEOF
eb697db5
DN
5469if ac_fn_c_try_link "$LINENO"; then :
5470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5471$as_echo "yes" >&6; }
a4f64981 5472else
eb697db5
DN
5473 LDFLAGS=$late_LDFLAGS
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5475$as_echo "no" >&6; }
8c5ff6dd 5476fi
eb697db5
DN
5477rm -f core conftest.err conftest.$ac_objext \
5478 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 5479
e7586c7a
GM
5480
5481# The value of CPP is a quoted variable reference, so we need to do this
5482# to get its actual value...
5483CPP=`eval "echo $CPP"`
8c5ff6dd 5484
8c5ff6dd 5485
e7586c7a
GM
5486CANNOT_DUMP=no
5487case "$opsys" in
5488 your-opsys-here)
5489 CANNOT_DUMP=yes
5490
5491$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
5492
5493 ;;
5494esac
5495
eb697db5
DN
5496
5497
5498UNEXEC_OBJ=unexelf.o
5499case "$opsys" in
52eeb591 5500 # MSDOS uses unexcoff.o
d734dbbd 5501 # MSWindows uses unexw32.o
eb697db5
DN
5502 aix4-2)
5503 UNEXEC_OBJ=unexaix.o
5504 ;;
5505 cygwin)
5506 UNEXEC_OBJ=unexcw.o
5507 ;;
5508 darwin)
5509 UNEXEC_OBJ=unexmacosx.o
5510 ;;
5511 hpux10-20 | hpux11)
5512 UNEXEC_OBJ=unexhp9k800.o
5513 ;;
5514 sol2-10)
5515 # Use the Solaris dldump() function, called from unexsol.c, to dump
5516 # emacs, instead of the generic ELF dump code found in unexelf.c.
5517 # The resulting binary has a complete symbol table, and is better
5518 # for debugging and other observability tools (debuggers, pstack, etc).
5519 #
5520 # If you encounter a problem using dldump(), please consider sending
5521 # a message to the OpenSolaris tools-linking mailing list:
5522 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
5523 #
5524 # It is likely that dldump() works with older Solaris too, but this has
5525 # not been tested, so for now this change is for Solaris 10 or newer.
5526 UNEXEC_OBJ=unexsol.o
5527 ;;
5929fbe7 5528esac
5929fbe7 5529
eb697db5
DN
5530LD_SWITCH_SYSTEM=
5531case "$opsys" in
5532 freebsd)
5533 ## Let `ld' find image libs and similar things in /usr/local/lib.
5534 ## The system compiler, GCC, has apparently been modified to not
5535 ## look there, contrary to what a stock GCC would do.
5536 LD_SWITCH_SYSTEM=-L/usr/local/lib
5537 ;;
5929fbe7 5538
eb697db5
DN
5539 gnu-linux)
5540 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
5541 test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0"
5542 ;;
e6df49e4 5543
eb697db5
DN
5544 netbsd)
5545 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
5546 ;;
8c5ff6dd 5547
eb697db5
DN
5548 openbsd)
5549 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
5550 ## otherwise Emacs dumps core on elf systems.
5551 LD_SWITCH_SYSTEM="-Z"
5552 ;;
5553esac
8c5ff6dd
KR
5554
5555
eb697db5 5556ac_link="$ac_link $LD_SWITCH_SYSTEM"
8c5ff6dd 5557
eb697db5
DN
5558## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
5559## which has not been defined yet. When this was handled with cpp,
5560## it was expanded to null when configure sourced the s/*.h file.
5561## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
5562## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
5563## (or somesuch), but because it is supposed to go at the _front_
5564## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
5565## Compare with the gnu-linux case below, which added to the end
5566## of LD_SWITCH_SYSTEM, and so can instead go at the front of
5567## LD_SWITCH_SYSTEM_TEMACS.
5568case "$opsys" in
5569 netbsd|openbsd)
5570 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
5571 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
5572esac
8c5ff6dd 5573
8c5ff6dd 5574
eb697db5
DN
5575C_SWITCH_MACHINE=
5576if test "$machine" = "alpha"; then
5577 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
5578if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8c5ff6dd 5579
5929fbe7 5580fi
8c5ff6dd 5581
eb697db5
DN
5582 if test "$ac_cv_have_decl___ELF__" = "yes"; then
5583 ## With ELF, make sure that all common symbols get allocated to in the
5584 ## data section. Otherwise, the dump of temacs may miss variables in
5585 ## the shared library that have been initialized. For example, with
5586 ## GNU libc, __malloc_initialized would normally be resolved to the
5587 ## shared library's .bss section, which is fatal.
5588 if test "x$GCC" = "xyes"; then
5589 C_SWITCH_MACHINE="-fno-common"
5590 else
3d608a86 5591 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
eb697db5
DN
5592 fi
5593 else
5594 UNEXEC_OBJ=unexalpha.o
8c5ff6dd 5595 fi
15e12598 5596fi
8c5ff6dd 5597
8c5ff6dd 5598
8c5ff6dd 5599
8c5ff6dd 5600
eb697db5
DN
5601C_SWITCH_SYSTEM=
5602## Some programs in src produce warnings saying certain subprograms
5603## are too complex and need a MAXMEM value greater than 2000 for
5604## additional optimization. --nils@exp-math.uni-essen.de
5605test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
5606 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
5607## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
5608## It is redundant in glibc2, since we define _GNU_SOURCE.
a4f64981 5609
e6df49e4 5610
8c5ff6dd 5611
eb697db5
DN
5612LIBS_SYSTEM=
5613case "$opsys" in
5614 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
5615 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
5929fbe7 5616
eb697db5 5617 freebsd) LIBS_SYSTEM="-lutil" ;;
e6df49e4 5618
eb697db5 5619 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8c5ff6dd 5620
eb697db5 5621 sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;;
e6df49e4 5622
eb697db5
DN
5623 ## Motif needs -lgen.
5624 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
5929fbe7 5625esac
eb697db5
DN
5626
5627
5628
5629### Make sure subsequent tests use flags consistent with the build flags.
5630
5631if test x"${OVERRIDE_CPPFLAGS}" != x; then
5632 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5929fbe7 5633else
eb697db5 5634 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
15e12598 5635fi
e6df49e4 5636
a4f64981 5637
eb697db5
DN
5638
5639# Check whether --enable-largefile was given.
5640if test "${enable_largefile+set}" = set; then :
5641 enableval=$enable_largefile;
a4f64981
GM
5642fi
5643
eb697db5 5644if test "$enable_largefile" != no; then
a4f64981 5645
eb697db5
DN
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5647$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5648if test "${ac_cv_sys_largefile_CC+set}" = set; then :
a4f64981
GM
5649 $as_echo_n "(cached) " >&6
5650else
eb697db5
DN
5651 ac_cv_sys_largefile_CC=no
5652 if test "$GCC" != yes; then
5653 ac_save_CC=$CC
5654 while :; do
5655 # IRIX 6.2 and later do not support large files by default,
5656 # so use the C compiler's -n32 option if that helps.
5657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5658/* end confdefs.h. */
eb697db5
DN
5659#include <sys/types.h>
5660 /* Check that off_t can represent 2**63 - 1 correctly.
5661 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5662 since some C++ compilers masquerading as C compilers
5663 incorrectly reject 9223372036854775807. */
5664#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5665 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5666 && LARGE_OFF_T % 2147483647 == 1)
5667 ? 1 : -1];
a4f64981
GM
5668int
5669main ()
5670{
eb697db5 5671
a4f64981
GM
5672 ;
5673 return 0;
5674}
5675_ACEOF
eb697db5
DN
5676 if ac_fn_c_try_compile "$LINENO"; then :
5677 break
15e12598 5678fi
eb697db5
DN
5679rm -f core conftest.err conftest.$ac_objext
5680 CC="$CC -n32"
5681 if ac_fn_c_try_compile "$LINENO"; then :
5682 ac_cv_sys_largefile_CC=' -n32'; break
5929fbe7 5683fi
eb697db5
DN
5684rm -f core conftest.err conftest.$ac_objext
5685 break
5686 done
5687 CC=$ac_save_CC
5688 rm -f conftest.$ac_ext
5689 fi
a4f64981 5690fi
eb697db5
DN
5691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5692$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5693 if test "$ac_cv_sys_largefile_CC" != no; then
5694 CC=$CC$ac_cv_sys_largefile_CC
5695 fi
a4f64981 5696
eb697db5
DN
5697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5698$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5699if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5700 $as_echo_n "(cached) " >&6
5701else
5702 while :; do
5703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5704/* end confdefs.h. */
5705#include <sys/types.h>
5706 /* Check that off_t can represent 2**63 - 1 correctly.
5707 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5708 since some C++ compilers masquerading as C compilers
5709 incorrectly reject 9223372036854775807. */
5710#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5711 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5712 && LARGE_OFF_T % 2147483647 == 1)
5713 ? 1 : -1];
5714int
5715main ()
5716{
8c5ff6dd 5717
eb697db5
DN
5718 ;
5719 return 0;
5720}
5929fbe7 5721_ACEOF
eb697db5
DN
5722if ac_fn_c_try_compile "$LINENO"; then :
5723 ac_cv_sys_file_offset_bits=no; break
5724fi
5725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5727/* end confdefs.h. */
eb697db5
DN
5728#define _FILE_OFFSET_BITS 64
5729#include <sys/types.h>
5730 /* Check that off_t can represent 2**63 - 1 correctly.
5731 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5732 since some C++ compilers masquerading as C compilers
5733 incorrectly reject 9223372036854775807. */
5734#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5735 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5736 && LARGE_OFF_T % 2147483647 == 1)
5737 ? 1 : -1];
5738int
5739main ()
5740{
a5edbe4a 5741
eb697db5
DN
5742 ;
5743 return 0;
5744}
5745_ACEOF
5746if ac_fn_c_try_compile "$LINENO"; then :
5747 ac_cv_sys_file_offset_bits=64; break
a4f64981 5748fi
eb697db5
DN
5749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5750 ac_cv_sys_file_offset_bits=unknown
5751 break
5752done
5753fi
5754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5755$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5756case $ac_cv_sys_file_offset_bits in #(
5757 no | unknown) ;;
5758 *)
5759cat >>confdefs.h <<_ACEOF
5760#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5761_ACEOF
5762;;
5929fbe7 5763esac
eb697db5
DN
5764rm -rf conftest*
5765 if test $ac_cv_sys_file_offset_bits = unknown; then
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5767$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5768if test "${ac_cv_sys_large_files+set}" = set; then :
5929fbe7 5769 $as_echo_n "(cached) " >&6
a4f64981 5770else
eb697db5
DN
5771 while :; do
5772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5773/* end confdefs.h. */
5774#include <sys/types.h>
5775 /* Check that off_t can represent 2**63 - 1 correctly.
5776 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5777 since some C++ compilers masquerading as C compilers
5778 incorrectly reject 9223372036854775807. */
5779#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5780 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5781 && LARGE_OFF_T % 2147483647 == 1)
5782 ? 1 : -1];
5783int
5784main ()
5785{
8c5ff6dd 5786
eb697db5
DN
5787 ;
5788 return 0;
5789}
5929fbe7 5790_ACEOF
eb697db5
DN
5791if ac_fn_c_try_compile "$LINENO"; then :
5792 ac_cv_sys_large_files=no; break
5793fi
5794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 5796/* end confdefs.h. */
eb697db5
DN
5797#define _LARGE_FILES 1
5798#include <sys/types.h>
5799 /* Check that off_t can represent 2**63 - 1 correctly.
5800 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5801 since some C++ compilers masquerading as C compilers
5802 incorrectly reject 9223372036854775807. */
5803#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5804 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5805 && LARGE_OFF_T % 2147483647 == 1)
5806 ? 1 : -1];
8c5ff6dd
KR
5807int
5808main ()
5809{
eb697db5 5810
8c5ff6dd
KR
5811 ;
5812 return 0;
5813}
5814_ACEOF
eb697db5
DN
5815if ac_fn_c_try_compile "$LINENO"; then :
5816 ac_cv_sys_large_files=1; break
8c5ff6dd 5817fi
eb697db5
DN
5818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5819 ac_cv_sys_large_files=unknown
5820 break
5821done
5929fbe7 5822fi
eb697db5
DN
5823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5824$as_echo "$ac_cv_sys_large_files" >&6; }
5825case $ac_cv_sys_large_files in #(
5826 no | unknown) ;;
5827 *)
5828cat >>confdefs.h <<_ACEOF
5829#define _LARGE_FILES $ac_cv_sys_large_files
5830_ACEOF
5831;;
5832esac
5833rm -rf conftest*
5834 fi
e6df49e4 5835fi
a5edbe4a 5836
5929fbe7
GM
5837
5838
eb697db5
DN
5839## If user specified a crt-dir, use that unconditionally.
5840if test "X$CRT_DIR" = "X"; then
5929fbe7 5841
eb697db5
DN
5842 case "$canonical" in
5843 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
5844 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5845 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5846 ## For anything else (eg /usr/lib32), it is up the user to specify
5847 ## the location (bug#5655).
5848 ## Test for crtn.o, not just the directory, because sometimes the
5849 ## directory exists but does not have the relevant files (bug#1287).
5850 ## FIXME better to test for binary compatibility somehow.
5851 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5852 ;;
5929fbe7 5853
eb697db5
DN
5854 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
5855 esac
e6df49e4 5856
eb697db5
DN
5857 case "$opsys" in
5858 hpux10-20) CRT_DIR=/lib ;;
5859 esac
15e12598 5860
eb697db5
DN
5861 ## Default is /usr/lib.
5862 test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
8c5ff6dd 5863
15e12598 5864else
eb697db5
DN
5865
5866 ## Some platforms don't use any of these files, so it is not
5867 ## appropriate to put this test outside the if block.
5868 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
3d608a86 5869 as_fn_error "crt*.o not found in specified location." "$LINENO" 5
eb697db5
DN
5870
5871fi
5872
5873
5874
5875LIB_MATH=-lm
5876LIB_STANDARD=
5877START_FILES=
5878
5879case $opsys in
5880 cygwin )
5881 LIB_MATH=
921d40b4 5882 START_FILES='pre-crt0.o'
eb697db5
DN
5883 ;;
5884 darwin )
5885 ## Adding -lm confuses the dynamic linker, so omit it.
5886 LIB_MATH=
5887 START_FILES='pre-crt0.o'
5888 ;;
5889 freebsd )
5890 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5891 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5892 ;;
5893 gnu-linux | gnu-kfreebsd )
5894 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
5895 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
5896 ;;
5897 hpux10-20 | hpux11 )
5898 LIB_STANDARD=-lc
5899 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
5900 ;;
5901 netbsd | openbsd )
5902 if test -f $CRT_DIR/crti.o; then
5903 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5904 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5905 else
5906 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
5907 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
5908 fi
5909 ;;
5929fbe7 5910esac
5929fbe7 5911
5929fbe7 5912
5929fbe7 5913
5929fbe7 5914
a4f64981 5915
5929fbe7 5916
e6df49e4 5917
eb697db5
DN
5918if test "${with_sound}" != "no"; then
5919 # Sound support for GNU/Linux and the free BSDs.
5920 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5921do :
5922 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5923ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
3d608a86
J
5924eval as_val=\$$as_ac_Header
5925 if test "x$as_val" = x""yes; then :
eb697db5
DN
5926 cat >>confdefs.h <<_ACEOF
5927#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5928_ACEOF
a46007e9 5929 have_sound_header=yes
5929fbe7 5930fi
eb697db5
DN
5931
5932done
5933
5934 # Emulation library used on NetBSD.
5935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5936$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
5937if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
a4f64981 5938 $as_echo_n "(cached) " >&6
a4f64981 5939else
5929fbe7 5940 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
5941LIBS="-lossaudio $LIBS"
5942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5943/* end confdefs.h. */
8c5ff6dd 5944
5929fbe7
GM
5945/* Override any GCC internal prototype to avoid an error.
5946 Use char because int might match the return type of a GCC
5947 builtin and then its argument prototype would still apply. */
5948#ifdef __cplusplus
5949extern "C"
5950#endif
eb697db5 5951char _oss_ioctl ();
8c5ff6dd
KR
5952int
5953main ()
5954{
eb697db5 5955return _oss_ioctl ();
8c5ff6dd
KR
5956 ;
5957 return 0;
5958}
a4f64981 5959_ACEOF
eb697db5
DN
5960if ac_fn_c_try_link "$LINENO"; then :
5961 ac_cv_lib_ossaudio__oss_ioctl=yes
a4f64981 5962else
eb697db5 5963 ac_cv_lib_ossaudio__oss_ioctl=no
a5edbe4a 5964fi
eb697db5
DN
5965rm -f core conftest.err conftest.$ac_objext \
5966 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
5967LIBS=$ac_check_lib_save_LIBS
5968fi
eb697db5
DN
5969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
5970$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
5971if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
5972 LIBSOUND=-lossaudio
5929fbe7 5973else
eb697db5 5974 LIBSOUND=
8c5ff6dd 5975fi
a4f64981 5976
8c5ff6dd
KR
5977
5978
eb697db5
DN
5979 ALSA_REQUIRED=1.0.0
5980 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8c5ff6dd 5981
eb697db5
DN
5982 succeeded=no
5983
5984 # Extract the first word of "pkg-config", so it can be a program name with args.
5985set dummy pkg-config; ac_word=$2
5986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987$as_echo_n "checking for $ac_word... " >&6; }
5988if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8c5ff6dd
KR
5989 $as_echo_n "(cached) " >&6
5990else
eb697db5
DN
5991 case $PKG_CONFIG in
5992 [\\/]* | ?:[\\/]*)
5993 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5994 ;;
5995 *)
5996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997for as_dir in $PATH
5998do
5999 IFS=$as_save_IFS
6000 test -z "$as_dir" && as_dir=.
6001 for ac_exec_ext in '' $ac_executable_extensions; do
6002 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6003 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005 break 2
6006 fi
6007done
6008 done
6009IFS=$as_save_IFS
5929fbe7 6010
eb697db5
DN
6011 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6012 ;;
5929fbe7 6013esac
a4f64981 6014fi
eb697db5
DN
6015PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6016if test -n "$PKG_CONFIG"; then
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6018$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 6019else
eb697db5
DN
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6021$as_echo "no" >&6; }
8c5ff6dd 6022fi
15e12598
VB
6023
6024
6025
eb697db5
DN
6026 if test "$PKG_CONFIG" = "no" ; then
6027 HAVE_ALSA=no
6028 else
6029 PKG_CONFIG_MIN_VERSION=0.9.0
6030 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
6032$as_echo_n "checking for $ALSA_MODULES... " >&6; }
5929fbe7 6033
eb697db5
DN
6034 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6036$as_echo "yes" >&6; }
6037 succeeded=yes
e6df49e4 6038
eb697db5
DN
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
6040$as_echo_n "checking ALSA_CFLAGS... " >&6; }
6041 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
6043$as_echo "$ALSA_CFLAGS" >&6; }
4e569696 6044
eb697db5
DN
6045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
6046$as_echo_n "checking ALSA_LIBS... " >&6; }
6047 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
6049$as_echo "$ALSA_LIBS" >&6; }
6050 else
6051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6052$as_echo "no" >&6; }
6053 ALSA_CFLAGS=""
6054 ALSA_LIBS=""
6055 ## If we have a custom action on failure, don't print errors, but
6056 ## do set a variable so people can do so.
6057 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5929fbe7 6058
eb697db5
DN
6059 fi
6060
6061
6062
6063 else
6064 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6065 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6066 fi
5929fbe7 6067 fi
4e569696 6068
eb697db5
DN
6069 if test $succeeded = yes; then
6070 HAVE_ALSA=yes
6071 else
6072 HAVE_ALSA=no
6073 fi
6074
6075 if test $HAVE_ALSA = yes; then
6076 SAVE_CFLAGS="$CFLAGS"
6077 SAVE_LDFLAGS="$LDFLAGS"
6078 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6079 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6081/* end confdefs.h. */
eb697db5
DN
6082#include <asoundlib.h>
6083int
6084main ()
6085{
6086snd_lib_error_set_handler (0);
6087 ;
6088 return 0;
6089}
6090_ACEOF
6091if ac_fn_c_try_compile "$LINENO"; then :
6092 emacs_alsa_normal=yes
8c5ff6dd 6093else
eb697db5 6094 emacs_alsa_normal=no
8c5ff6dd 6095fi
5929fbe7 6096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6097 if test "$emacs_alsa_normal" != yes; then
6098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6099/* end confdefs.h. */
eb697db5
DN
6100#include <alsa/asoundlib.h>
6101int
6102main ()
6103{
6104snd_lib_error_set_handler (0);
6105 ;
6106 return 0;
6107}
5929fbe7 6108_ACEOF
eb697db5
DN
6109if ac_fn_c_try_compile "$LINENO"; then :
6110 emacs_alsa_subdir=yes
5929fbe7 6111else
eb697db5 6112 emacs_alsa_subdir=no
8c5ff6dd 6113fi
eb697db5
DN
6114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6115 if test "$emacs_alsa_subdir" != yes; then
3d608a86 6116 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
eb697db5
DN
6117 fi
6118 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6119 fi
e6df49e4 6120
eb697db5
DN
6121 CFLAGS="$SAVE_CFLAGS"
6122 LDFLAGS="$SAVE_LDFLAGS"
6123 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6124 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
e6df49e4 6125
eb697db5 6126$as_echo "#define HAVE_ALSA 1" >>confdefs.h
e6df49e4 6127
eb697db5 6128 fi
e6df49e4 6129
a46007e9
GM
6130 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
6131 case "$opsys" in
6132 gnu-linux|freebsd|netbsd)
6133
6134$as_echo "#define HAVE_SOUND 1" >>confdefs.h
6135
6136 ;;
6137 esac
6138 fi
6139
6140
5929fbe7 6141fi
eb697db5
DN
6142
6143for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6144 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
6145 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
6146 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
3d608a86 6147 sys/utsname.h pwd.h utmp.h dirent.h util.h
eb697db5
DN
6148do :
6149 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6150ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
3d608a86
J
6151eval as_val=\$$as_ac_Header
6152 if test "x$as_val" = x""yes; then :
eb697db5
DN
6153 cat >>confdefs.h <<_ACEOF
6154#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5929fbe7 6155_ACEOF
15e12598 6156
eb697db5
DN
6157fi
6158
6159done
6160
6161
6162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
6163$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
6164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6165/* end confdefs.h. */
6166#include <sys/personality.h>
8c5ff6dd
KR
6167int
6168main ()
6169{
eb697db5 6170personality (PER_LINUX32)
8c5ff6dd
KR
6171 ;
6172 return 0;
6173}
6174_ACEOF
eb697db5
DN
6175if ac_fn_c_try_compile "$LINENO"; then :
6176 emacs_cv_personality_linux32=yes
8c5ff6dd 6177else
eb697db5 6178 emacs_cv_personality_linux32=no
5929fbe7 6179fi
eb697db5
DN
6180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
6182$as_echo "$emacs_cv_personality_linux32" >&6; }
08b47d3d 6183
eb697db5 6184if test $emacs_cv_personality_linux32 = yes; then
08b47d3d 6185
eb697db5 6186$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
08b47d3d 6187
eb697db5 6188fi
a4f64981 6189
eb697db5
DN
6190for ac_header in term.h
6191do :
6192 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6193if test "x$ac_cv_header_term_h" = x""yes; then :
6194 cat >>confdefs.h <<_ACEOF
6195#define HAVE_TERM_H 1
5929fbe7 6196_ACEOF
a4f64981 6197
8c5ff6dd 6198fi
a4f64981 6199
eb697db5 6200done
a4f64981 6201
eb697db5
DN
6202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6203$as_echo_n "checking for ANSI C header files... " >&6; }
6204if test "${ac_cv_header_stdc+set}" = set; then :
8c5ff6dd
KR
6205 $as_echo_n "(cached) " >&6
6206else
eb697db5 6207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6208/* end confdefs.h. */
eb697db5
DN
6209#include <stdlib.h>
6210#include <stdarg.h>
6211#include <string.h>
6212#include <float.h>
6213
6214int
6215main ()
6216{
6217
6218 ;
6219 return 0;
6220}
8c5ff6dd 6221_ACEOF
eb697db5
DN
6222if ac_fn_c_try_compile "$LINENO"; then :
6223 ac_cv_header_stdc=yes
8c5ff6dd 6224else
eb697db5 6225 ac_cv_header_stdc=no
8c5ff6dd 6226fi
5929fbe7 6227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 6228
eb697db5
DN
6229if test $ac_cv_header_stdc = yes; then
6230 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6232/* end confdefs.h. */
eb697db5
DN
6233#include <string.h>
6234
5929fbe7 6235_ACEOF
eb697db5
DN
6236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6237 $EGREP "memchr" >/dev/null 2>&1; then :
6238
5929fbe7 6239else
eb697db5
DN
6240 ac_cv_header_stdc=no
6241fi
6242rm -f conftest*
a4f64981 6243
8c5ff6dd 6244fi
a4f64981 6245
eb697db5
DN
6246if test $ac_cv_header_stdc = yes; then
6247 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6249/* end confdefs.h. */
6250#include <stdlib.h>
a4f64981 6251
eb697db5
DN
6252_ACEOF
6253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6254 $EGREP "free" >/dev/null 2>&1; then :
a4f64981 6255
5929fbe7 6256else
eb697db5 6257 ac_cv_header_stdc=no
5929fbe7 6258fi
eb697db5 6259rm -f conftest*
a4f64981 6260
8c5ff6dd 6261fi
a4f64981 6262
eb697db5
DN
6263if test $ac_cv_header_stdc = yes; then
6264 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6265 if test "$cross_compiling" = yes; then :
6266 :
6267else
6268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6269/* end confdefs.h. */
6270#include <ctype.h>
6271#include <stdlib.h>
6272#if ((' ' & 0x0FF) == 0x020)
6273# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6274# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6275#else
6276# define ISLOWER(c) \
6277 (('a' <= (c) && (c) <= 'i') \
6278 || ('j' <= (c) && (c) <= 'r') \
6279 || ('s' <= (c) && (c) <= 'z'))
6280# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6281#endif
6282
6283#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6284int
6285main ()
6286{
6287 int i;
6288 for (i = 0; i < 256; i++)
6289 if (XOR (islower (i), ISLOWER (i))
6290 || toupper (i) != TOUPPER (i))
6291 return 2;
6292 return 0;
6293}
8c5ff6dd 6294_ACEOF
eb697db5
DN
6295if ac_fn_c_try_run "$LINENO"; then :
6296
6297else
6298 ac_cv_header_stdc=no
6299fi
6300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6301 conftest.$ac_objext conftest.beam conftest.$ac_ext
6302fi
a4f64981 6303
8c5ff6dd 6304fi
eb697db5
DN
6305fi
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6307$as_echo "$ac_cv_header_stdc" >&6; }
6308if test $ac_cv_header_stdc = yes; then
a4f64981 6309
eb697db5 6310$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a4f64981 6311
eb697db5 6312fi
a4f64981 6313
eb697db5
DN
6314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
6315$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
6316if test "${ac_cv_header_time+set}" = set; then :
6317 $as_echo_n "(cached) " >&6
6318else
6319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6320/* end confdefs.h. */
6321#include <sys/types.h>
6322#include <sys/time.h>
6323#include <time.h>
a4f64981 6324
eb697db5
DN
6325int
6326main ()
6327{
6328if ((struct tm *) 0)
6329return 0;
6330 ;
6331 return 0;
6332}
8c5ff6dd 6333_ACEOF
eb697db5
DN
6334if ac_fn_c_try_compile "$LINENO"; then :
6335 ac_cv_header_time=yes
6336else
6337 ac_cv_header_time=no
6338fi
6339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6340fi
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
6342$as_echo "$ac_cv_header_time" >&6; }
6343if test $ac_cv_header_time = yes; then
6344
6345$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
6346
6347fi
a4f64981 6348
eb697db5
DN
6349ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6350if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6351 ac_have_decl=1
6352else
6353 ac_have_decl=0
6354fi
a4f64981 6355
eb697db5
DN
6356cat >>confdefs.h <<_ACEOF
6357#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
5929fbe7 6358_ACEOF
a4f64981 6359
eb697db5
DN
6360if test $ac_cv_have_decl_sys_siglist != yes; then
6361 # For Tru64, at least:
6362 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6363if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6364 ac_have_decl=1
6365else
6366 ac_have_decl=0
6367fi
5929fbe7 6368
eb697db5
DN
6369cat >>confdefs.h <<_ACEOF
6370#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
5929fbe7
GM
6371_ACEOF
6372
eb697db5 6373 if test $ac_cv_have_decl___sys_siglist = yes; then
5929fbe7 6374
eb697db5 6375$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
a4f64981 6376
5929fbe7 6377 fi
5929fbe7 6378fi
eb697db5
DN
6379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
6380$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
6381if test "${ac_cv_header_sys_wait_h+set}" = set; then :
5929fbe7 6382 $as_echo_n "(cached) " >&6
5929fbe7 6383else
eb697db5 6384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6385/* end confdefs.h. */
eb697db5
DN
6386#include <sys/types.h>
6387#include <sys/wait.h>
6388#ifndef WEXITSTATUS
6389# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6390#endif
6391#ifndef WIFEXITED
6392# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6393#endif
6394
6395int
6396main ()
6397{
6398 int s;
6399 wait (&s);
6400 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6401 ;
6402 return 0;
6403}
5929fbe7 6404_ACEOF
eb697db5
DN
6405if ac_fn_c_try_compile "$LINENO"; then :
6406 ac_cv_header_sys_wait_h=yes
5929fbe7 6407else
eb697db5 6408 ac_cv_header_sys_wait_h=no
5929fbe7 6409fi
5929fbe7 6410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6411fi
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
6413$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6414if test $ac_cv_header_sys_wait_h = yes; then
a4f64981 6415
eb697db5 6416$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
a4f64981 6417
5929fbe7 6418fi
a4f64981 6419
a4f64981 6420
eb697db5
DN
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
6422$as_echo_n "checking for struct utimbuf... " >&6; }
6423if test "${emacs_cv_struct_utimbuf+set}" = set; then :
5929fbe7 6424 $as_echo_n "(cached) " >&6
8c5ff6dd 6425else
eb697db5
DN
6426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6427/* end confdefs.h. */
6428#ifdef TIME_WITH_SYS_TIME
6429#include <sys/time.h>
6430#include <time.h>
6431#else
6432#ifdef HAVE_SYS_TIME_H
6433#include <sys/time.h>
6434#else
6435#include <time.h>
6436#endif
6437#endif
6438#ifdef HAVE_UTIME_H
6439#include <utime.h>
6440#endif
6441int
6442main ()
6443{
6444static struct utimbuf x; x.actime = x.modtime;
6445 ;
6446 return 0;
6447}
6448_ACEOF
6449if ac_fn_c_try_compile "$LINENO"; then :
6450 emacs_cv_struct_utimbuf=yes
6451else
6452 emacs_cv_struct_utimbuf=no
6453fi
6454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6455fi
eb697db5
DN
6456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
6457$as_echo "$emacs_cv_struct_utimbuf" >&6; }
6458if test $emacs_cv_struct_utimbuf = yes; then
6459
6460$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
a4f64981 6461
5929fbe7 6462fi
eb697db5
DN
6463
6464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6465$as_echo_n "checking return type of signal handlers... " >&6; }
6466if test "${ac_cv_type_signal+set}" = set; then :
8c5ff6dd
KR
6467 $as_echo_n "(cached) " >&6
6468else
eb697db5 6469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6470/* end confdefs.h. */
eb697db5
DN
6471#include <sys/types.h>
6472#include <signal.h>
a4f64981 6473
8c5ff6dd
KR
6474int
6475main ()
6476{
eb697db5 6477return *(signal (0, 0)) (0) == 1;
8c5ff6dd
KR
6478 ;
6479 return 0;
6480}
6481_ACEOF
eb697db5
DN
6482if ac_fn_c_try_compile "$LINENO"; then :
6483 ac_cv_type_signal=int
8c5ff6dd 6484else
eb697db5 6485 ac_cv_type_signal=void
5929fbe7 6486fi
eb697db5 6487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929fbe7 6488fi
eb697db5
DN
6489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6490$as_echo "$ac_cv_type_signal" >&6; }
5929fbe7 6491
eb697db5
DN
6492cat >>confdefs.h <<_ACEOF
6493#define RETSIGTYPE $ac_cv_type_signal
5929fbe7
GM
6494_ACEOF
6495
a4f64981 6496
5929fbe7 6497
eb697db5
DN
6498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
6499$as_echo_n "checking for speed_t... " >&6; }
6500if test "${emacs_cv_speed_t+set}" = set; then :
e6df49e4
GM
6501 $as_echo_n "(cached) " >&6
6502else
eb697db5 6503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 6504/* end confdefs.h. */
eb697db5 6505#include <termios.h>
8c5ff6dd
KR
6506int
6507main ()
6508{
eb697db5 6509speed_t x = 1;
8c5ff6dd
KR
6510 ;
6511 return 0;
6512}
6513_ACEOF
eb697db5
DN
6514if ac_fn_c_try_compile "$LINENO"; then :
6515 emacs_cv_speed_t=yes
8c5ff6dd 6516else
eb697db5 6517 emacs_cv_speed_t=no
8c5ff6dd 6518fi
eb697db5 6519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6520fi
eb697db5
DN
6521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
6522$as_echo "$emacs_cv_speed_t" >&6; }
6523if test $emacs_cv_speed_t = yes; then
8c5ff6dd 6524
eb697db5 6525$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
91e84f96 6526
8c5ff6dd
KR
6527fi
6528
eb697db5
DN
6529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
6530$as_echo_n "checking for struct timeval... " >&6; }
6531if test "${emacs_cv_struct_timeval+set}" = set; then :
8c5ff6dd
KR
6532 $as_echo_n "(cached) " >&6
6533else
eb697db5 6534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6535/* end confdefs.h. */
eb697db5
DN
6536#ifdef TIME_WITH_SYS_TIME
6537#include <sys/time.h>
6538#include <time.h>
6539#else
6540#ifdef HAVE_SYS_TIME_H
6541#include <sys/time.h>
6542#else
6543#include <time.h>
6544#endif
6545#endif
49ebbd65
DN
6546int
6547main ()
6548{
eb697db5 6549static struct timeval x; x.tv_sec = x.tv_usec;
49ebbd65
DN
6550 ;
6551 return 0;
6552}
6553_ACEOF
eb697db5
DN
6554if ac_fn_c_try_compile "$LINENO"; then :
6555 emacs_cv_struct_timeval=yes
6556else
6557 emacs_cv_struct_timeval=no
6558fi
6559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6560fi
6561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
6562$as_echo "$emacs_cv_struct_timeval" >&6; }
6563HAVE_TIMEVAL=$emacs_cv_struct_timeval
6564if test $emacs_cv_struct_timeval = yes; then
6565
6566$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
6567
6568fi
6569
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
6571$as_echo_n "checking for struct exception... " >&6; }
6572if test "${emacs_cv_struct_exception+set}" = set; then :
6573 $as_echo_n "(cached) " >&6
6574else
6575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6576/* end confdefs.h. */
6577#include <math.h>
6578int
6579main ()
6580{
6581static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
6582 ;
6583 return 0;
6584}
6585_ACEOF
6586if ac_fn_c_try_compile "$LINENO"; then :
6587 emacs_cv_struct_exception=yes
8c5ff6dd 6588else
eb697db5
DN
6589 emacs_cv_struct_exception=no
6590fi
6591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6592fi
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
6594$as_echo "$emacs_cv_struct_exception" >&6; }
6595HAVE_EXCEPTION=$emacs_cv_struct_exception
6596if test $emacs_cv_struct_exception != yes; then
6597
6598$as_echo "#define NO_MATHERR 1" >>confdefs.h
91e84f96 6599
08b47d3d 6600fi
91e84f96 6601
eb697db5
DN
6602for ac_header in sys/socket.h
6603do :
6604 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6605if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
6606 cat >>confdefs.h <<_ACEOF
6607#define HAVE_SYS_SOCKET_H 1
6608_ACEOF
6609
5929fbe7 6610fi
91e84f96 6611
eb697db5
DN
6612done
6613
6614for ac_header in net/if.h
6615do :
6616 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
6617#if HAVE_SYS_SOCKET_H
6618#include <sys/socket.h>
6619#endif
6620"
6621if test "x$ac_cv_header_net_if_h" = x""yes; then :
6622 cat >>confdefs.h <<_ACEOF
6623#define HAVE_NET_IF_H 1
5929fbe7 6624_ACEOF
91e84f96 6625
5929fbe7 6626fi
8c5ff6dd 6627
eb697db5
DN
6628done
6629
6630
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
6632$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
6633if test "${ac_cv_struct_tm+set}" = set; then :
15e12598 6634 $as_echo_n "(cached) " >&6
15e12598 6635else
eb697db5 6636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 6637/* end confdefs.h. */
eb697db5
DN
6638#include <sys/types.h>
6639#include <time.h>
a5edbe4a 6640
8c5ff6dd
KR
6641int
6642main ()
6643{
eb697db5
DN
6644struct tm tm;
6645 int *p = &tm.tm_sec;
6646 return !p;
8c5ff6dd
KR
6647 ;
6648 return 0;
6649}
6650_ACEOF
eb697db5
DN
6651if ac_fn_c_try_compile "$LINENO"; then :
6652 ac_cv_struct_tm=time.h
a4f64981 6653else
eb697db5
DN
6654 ac_cv_struct_tm=sys/time.h
6655fi
6656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15e12598 6657fi
eb697db5
DN
6658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
6659$as_echo "$ac_cv_struct_tm" >&6; }
6660if test $ac_cv_struct_tm = sys/time.h; then
6661
6662$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
a4f64981 6663
8c5ff6dd 6664fi
91e84f96 6665
eb697db5
DN
6666ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
6667#include <$ac_cv_struct_tm>
6668
6669"
6670if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
a4f64981 6671
eb697db5
DN
6672cat >>confdefs.h <<_ACEOF
6673#define HAVE_STRUCT_TM_TM_ZONE 1
5929fbe7 6674_ACEOF
a4f64981
GM
6675
6676
eb697db5 6677fi
a4f64981 6678
eb697db5 6679if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
a4f64981 6680
eb697db5 6681$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
15e12598 6682
15e12598 6683else
eb697db5
DN
6684 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6685"
6686if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6687 ac_have_decl=1
8c5ff6dd 6688else
eb697db5 6689 ac_have_decl=0
8c5ff6dd 6690fi
49ebbd65 6691
eb697db5
DN
6692cat >>confdefs.h <<_ACEOF
6693#define HAVE_DECL_TZNAME $ac_have_decl
6694_ACEOF
6695
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6697$as_echo_n "checking for tzname... " >&6; }
6698if test "${ac_cv_var_tzname+set}" = set; then :
5929fbe7
GM
6699 $as_echo_n "(cached) " >&6
6700else
eb697db5 6701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6702/* end confdefs.h. */
eb697db5
DN
6703#include <time.h>
6704#if !HAVE_DECL_TZNAME
6705extern char *tzname[];
5929fbe7
GM
6706#endif
6707
a4f64981
GM
6708int
6709main ()
6710{
eb697db5 6711return tzname[0][0];
a4f64981
GM
6712 ;
6713 return 0;
6714}
6715_ACEOF
eb697db5
DN
6716if ac_fn_c_try_link "$LINENO"; then :
6717 ac_cv_var_tzname=yes
a4f64981 6718else
eb697db5
DN
6719 ac_cv_var_tzname=no
6720fi
6721rm -f core conftest.err conftest.$ac_objext \
6722 conftest$ac_exeext conftest.$ac_ext
6723fi
6724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6725$as_echo "$ac_cv_var_tzname" >&6; }
6726 if test $ac_cv_var_tzname = yes; then
5929fbe7 6727
eb697db5
DN
6728$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6729
6730 fi
a4f64981 6731fi
aaa36002 6732
eb697db5
DN
6733ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6734"
6735if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
6736
6737$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
6738
15e12598 6739fi
eb697db5
DN
6740
6741ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6742#if HAVE_SYS_SOCKET_H
6743#include <sys/socket.h>
6744#endif
6745#if HAVE_NET_IF_H
6746#include <net/if.h>
6747#endif
6748"
6749if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
aaa36002 6750
5929fbe7 6751cat >>confdefs.h <<_ACEOF
eb697db5 6752#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
5929fbe7
GM
6753_ACEOF
6754
cd03c74a 6755
8c5ff6dd 6756fi
eb697db5
DN
6757ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6758#if HAVE_SYS_SOCKET_H
6759#include <sys/socket.h>
6760#endif
6761#if HAVE_NET_IF_H
6762#include <net/if.h>
6763#endif
6764"
6765if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
49ebbd65 6766
eb697db5
DN
6767cat >>confdefs.h <<_ACEOF
6768#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
5929fbe7 6769_ACEOF
49ebbd65 6770
aaa36002 6771
8c5ff6dd 6772fi
eb697db5
DN
6773ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6774#if HAVE_SYS_SOCKET_H
6775#include <sys/socket.h>
6776#endif
6777#if HAVE_NET_IF_H
6778#include <net/if.h>
6779#endif
6780"
6781if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
6782
6783cat >>confdefs.h <<_ACEOF
6784#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
6785_ACEOF
aaa36002 6786
5929fbe7 6787
8c5ff6dd 6788fi
eb697db5
DN
6789ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6790#if HAVE_SYS_SOCKET_H
6791#include <sys/socket.h>
6792#endif
6793#if HAVE_NET_IF_H
6794#include <net/if.h>
6795#endif
6796"
6797if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
cd03c74a 6798
5929fbe7 6799cat >>confdefs.h <<_ACEOF
eb697db5 6800#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
5929fbe7 6801_ACEOF
49ebbd65 6802
7186fb09 6803
8c5ff6dd 6804fi
eb697db5
DN
6805ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6806#if HAVE_SYS_SOCKET_H
6807#include <sys/socket.h>
6808#endif
6809#if HAVE_NET_IF_H
6810#include <net/if.h>
6811#endif
6812"
6813if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
6814
6815cat >>confdefs.h <<_ACEOF
6816#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
6817_ACEOF
7186fb09 6818
5929fbe7 6819
8c5ff6dd
KR
6820fi
6821
5929fbe7 6822
5929fbe7 6823
eb697db5
DN
6824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6825$as_echo_n "checking for function prototypes... " >&6; }
6826if test "$ac_cv_prog_cc_c89" != no; then
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6828$as_echo "yes" >&6; }
5929fbe7 6829
eb697db5 6830$as_echo "#define PROTOTYPES 1" >>confdefs.h
5929fbe7 6831
5929fbe7 6832
eb697db5 6833$as_echo "#define __PROTOTYPES 1" >>confdefs.h
5929fbe7 6834
eb697db5
DN
6835else
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
8c5ff6dd 6838fi
15e12598 6839
eb697db5
DN
6840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6841$as_echo_n "checking for working volatile... " >&6; }
6842if test "${ac_cv_c_volatile+set}" = set; then :
5929fbe7
GM
6843 $as_echo_n "(cached) " >&6
6844else
eb697db5 6845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6846/* end confdefs.h. */
5929fbe7 6847
8c5ff6dd
KR
6848int
6849main ()
a4f64981 6850{
eb697db5
DN
6851
6852volatile int x;
6853int * volatile y = (int *) 0;
6854return !x && !y;
8c5ff6dd
KR
6855 ;
6856 return 0;
a4f64981 6857}
8c5ff6dd 6858_ACEOF
eb697db5
DN
6859if ac_fn_c_try_compile "$LINENO"; then :
6860 ac_cv_c_volatile=yes
8c5ff6dd 6861else
eb697db5 6862 ac_cv_c_volatile=no
8c5ff6dd 6863fi
eb697db5 6864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6865fi
eb697db5
DN
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6867$as_echo "$ac_cv_c_volatile" >&6; }
6868if test $ac_cv_c_volatile = no; then
9452ded1 6869
eb697db5 6870$as_echo "#define volatile /**/" >>confdefs.h
5929fbe7 6871
8c5ff6dd 6872fi
eb697db5
DN
6873
6874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6875$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6876if test "${ac_cv_c_const+set}" = set; then :
5929fbe7
GM
6877 $as_echo_n "(cached) " >&6
6878else
eb697db5 6879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7
GM
6880/* end confdefs.h. */
6881
5929fbe7
GM
6882int
6883main ()
6884{
eb697db5
DN
6885/* FIXME: Include the comments suggested by Paul. */
6886#ifndef __cplusplus
6887 /* Ultrix mips cc rejects this. */
6888 typedef int charset[2];
6889 const charset cs;
6890 /* SunOS 4.1.1 cc rejects this. */
6891 char const *const *pcpcc;
6892 char **ppc;
6893 /* NEC SVR4.0.2 mips cc rejects this. */
6894 struct point {int x, y;};
6895 static struct point const zero = {0,0};
6896 /* AIX XL C 1.02.0.0 rejects this.
6897 It does not let you subtract one const X* pointer from another in
6898 an arm of an if-expression whose if-part is not a constant
6899 expression */
6900 const char *g = "string";
6901 pcpcc = &g + (g ? g-g : 0);
6902 /* HPUX 7.0 cc rejects these. */
6903 ++pcpcc;
6904 ppc = (char**) pcpcc;
6905 pcpcc = (char const *const *) ppc;
6906 { /* SCO 3.2v4 cc rejects this. */
6907 char *t;
6908 char const *s = 0 ? (char *) 0 : (char const *) 0;
6909
6910 *t++ = 0;
6911 if (s) return 0;
6912 }
6913 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6914 int x[] = {25, 17};
6915 const int *foo = &x[0];
6916 ++foo;
6917 }
6918 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6919 typedef const int *iptr;
6920 iptr p = 0;
6921 ++p;
6922 }
6923 { /* AIX XL C 1.02.0.0 rejects this saying
6924 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6925 struct s { int j; const int *ap[3]; };
6926 struct s *b; b->j = 5;
6927 }
6928 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6929 const int foo = 10;
6930 if (!foo) return 0;
6931 }
6932 return !cs[0] && !zero.x;
6933#endif
6934
5929fbe7
GM
6935 ;
6936 return 0;
6937}
6938_ACEOF
eb697db5
DN
6939if ac_fn_c_try_compile "$LINENO"; then :
6940 ac_cv_c_const=yes
8c5ff6dd 6941else
eb697db5 6942 ac_cv_c_const=no
8c5ff6dd 6943fi
eb697db5 6944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6945fi
eb697db5
DN
6946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6947$as_echo "$ac_cv_c_const" >&6; }
6948if test $ac_cv_c_const = no; then
91e84f96 6949
eb697db5 6950$as_echo "#define const /**/" >>confdefs.h
08b47d3d 6951
8c5ff6dd 6952fi
91e84f96 6953
eb697db5
DN
6954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
6955$as_echo_n "checking for void * support... " >&6; }
6956if test "${emacs_cv_void_star+set}" = set; then :
5929fbe7 6957 $as_echo_n "(cached) " >&6
8c5ff6dd 6958else
eb697db5 6959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6960/* end confdefs.h. */
8c5ff6dd 6961
8c5ff6dd
KR
6962int
6963main ()
6964{
eb697db5 6965void * foo;
8c5ff6dd
KR
6966 ;
6967 return 0;
a4f64981 6968}
a5edbe4a 6969_ACEOF
eb697db5
DN
6970if ac_fn_c_try_compile "$LINENO"; then :
6971 emacs_cv_void_star=yes
15e12598 6972else
eb697db5 6973 emacs_cv_void_star=no
a4f64981 6974fi
eb697db5 6975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 6976fi
eb697db5
DN
6977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
6978$as_echo "$emacs_cv_void_star" >&6; }
6979if test $emacs_cv_void_star = yes; then
6980 $as_echo "#define POINTER_TYPE void" >>confdefs.h
6981
6982else
6983 $as_echo "#define POINTER_TYPE char" >>confdefs.h
15e12598
VB
6984
6985fi
15e12598 6986
a4f64981 6987
eb697db5
DN
6988
6989
6990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6991$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6992set x ${MAKE-make}
6993ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3d608a86 6994if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7 6995 $as_echo_n "(cached) " >&6
5929fbe7 6996else
eb697db5
DN
6997 cat >conftest.make <<\_ACEOF
6998SHELL = /bin/sh
6999all:
7000 @echo '@@@%%%=$(MAKE)=@@@%%%'
5929fbe7 7001_ACEOF
3d608a86 7002# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eb697db5
DN
7003case `${MAKE-make} -f conftest.make 2>/dev/null` in
7004 *@@@%%%=?*=@@@%%%*)
7005 eval ac_cv_prog_make_${ac_make}_set=yes;;
7006 *)
7007 eval ac_cv_prog_make_${ac_make}_set=no;;
5929fbe7 7008esac
eb697db5
DN
7009rm -f conftest.make
7010fi
7011if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7013$as_echo "yes" >&6; }
7014 SET_MAKE=
5929fbe7 7015else
eb697db5
DN
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7017$as_echo "no" >&6; }
7018 SET_MAKE="MAKE=${MAKE-make}"
5929fbe7 7019fi
8c5ff6dd
KR
7020
7021
eb697db5
DN
7022DEPFLAGS=
7023MKDEPDIR=":"
7024deps_frag=deps.mk
7025if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
7027$as_echo_n "checking whether we are using GNU Make... " >&6; }
7028 HAVE_GNU_MAKE=no
7029 testval=`make --version 2>/dev/null | grep 'GNU Make'`
7030 if test "x$testval" != x; then
7031 HAVE_GNU_MAKE=yes
7032 else
7033 ac_enable_autodepend=no
7034 fi
7035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
7036$as_echo "$HAVE_GNU_MAKE" >&6; }
7037 if test $HAVE_GNU_MAKE = yes; then
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
7039$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
7040 SAVE_CFLAGS="$CFLAGS"
7041 CFLAGS="$CFLAGS -MMD -MF deps.d"
7042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7043/* end confdefs.h. */
eb697db5
DN
7044
7045int
7046main ()
7047{
7048
7049 ;
7050 return 0;
7051}
8c5ff6dd 7052_ACEOF
eb697db5 7053if ac_fn_c_try_compile "$LINENO"; then :
8c5ff6dd 7054
eb697db5
DN
7055else
7056 ac_enable_autodepend=no
7057fi
7058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7059 CFLAGS="$SAVE_CFLAGS"
7060 test -f deps.d || ac_enable_autodepend=no
7061 rm -rf deps.d
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
7063$as_echo "$ac_enable_autodepend" >&6; }
7064 fi
7065 if test $ac_enable_autodepend = yes; then
7066 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
7067 ## In parallel builds, another make might create depdir between
7068 ## the first test and mkdir, so stick another test on the end.
7069 ## Or use mkinstalldirs? mkdir -p is not portable.
7070 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
7071 deps_frag=autodeps.mk
7072 fi
8c5ff6dd 7073fi
eb697db5 7074deps_frag=$srcdir/src/$deps_frag
a4f64981 7075
a4f64981 7076
a4f64981 7077
eb697db5
DN
7078
7079
7080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
7081$as_echo_n "checking for long file names... " >&6; }
7082if test "${ac_cv_sys_long_file_names+set}" = set; then :
5929fbe7
GM
7083 $as_echo_n "(cached) " >&6
7084else
eb697db5
DN
7085 ac_cv_sys_long_file_names=yes
7086# Test for long file names in all the places we know might matter:
7087# . the current directory, where building will happen
7088# $prefix/lib where we will be installing things
7089# $exec_prefix/lib likewise
7090# $TMPDIR if set, where it might want to write temporary files
7091# /tmp where it might want to write temporary files
7092# /var/tmp likewise
7093# /usr/tmp likewise
7094for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
7095 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
7096 # in the usual case where exec_prefix is '${prefix}'.
7097 case $ac_dir in #(
7098 . | /* | ?:[\\/]*) ;; #(
7099 *) continue;;
7100 esac
7101 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
7102 ac_xdir=$ac_dir/cf$$
7103 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
7104 ac_tf1=$ac_xdir/conftest9012345
7105 ac_tf2=$ac_xdir/conftest9012346
7106 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
7107 ac_cv_sys_long_file_names=no
7108 rm -f -r "$ac_xdir" 2>/dev/null
7109 test $ac_cv_sys_long_file_names = no && break
7110done
5929fbe7 7111fi
eb697db5
DN
7112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
7113$as_echo "$ac_cv_sys_long_file_names" >&6; }
7114if test $ac_cv_sys_long_file_names = yes; then
7115
7116$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
49ebbd65 7117
5929fbe7 7118fi
a4f64981 7119
eb697db5
DN
7120
7121#### Choose a window system.
7122
7123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
7124$as_echo_n "checking for X... " >&6; }
7125
7126
7127# Check whether --with-x was given.
7128if test "${with_x+set}" = set; then :
7129 withval=$with_x;
7130fi
7131
7132# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7133if test "x$with_x" = xno; then
7134 # The user explicitly disabled X.
7135 have_x=disabled
7136else
7137 case $x_includes,$x_libraries in #(
3d608a86 7138 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
eb697db5
DN
7139 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
7140 $as_echo_n "(cached) " >&6
7141else
7142 # One or both of the vars are not set, and there is no cached value.
7143ac_x_includes=no ac_x_libraries=no
7144rm -f -r conftest.dir
7145if mkdir conftest.dir; then
7146 cd conftest.dir
7147 cat >Imakefile <<'_ACEOF'
7148incroot:
7149 @echo incroot='${INCROOT}'
7150usrlibdir:
7151 @echo usrlibdir='${USRLIBDIR}'
7152libdir:
7153 @echo libdir='${LIBDIR}'
7154_ACEOF
7155 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
3d608a86 7156 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eb697db5
DN
7157 for ac_var in incroot usrlibdir libdir; do
7158 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7159 done
7160 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7161 for ac_extension in a so sl dylib la dll; do
7162 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7163 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7164 ac_im_usrlibdir=$ac_im_libdir; break
7165 fi
7166 done
7167 # Screen out bogus values from the imake configuration. They are
7168 # bogus both because they are the default anyway, and because
7169 # using them would break gcc on systems where it needs fixed includes.
7170 case $ac_im_incroot in
7171 /usr/include) ac_x_includes= ;;
7172 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7173 esac
7174 case $ac_im_usrlibdir in
7175 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
7176 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7177 esac
7178 fi
7179 cd ..
7180 rm -f -r conftest.dir
5929fbe7 7181fi
8c5ff6dd 7182
eb697db5
DN
7183# Standard set of common directories for X headers.
7184# Check X11 before X11Rn because it is often a symlink to the current release.
7185ac_x_header_dirs='
7186/usr/X11/include
7187/usr/X11R7/include
7188/usr/X11R6/include
7189/usr/X11R5/include
7190/usr/X11R4/include
7191
7192/usr/include/X11
7193/usr/include/X11R7
7194/usr/include/X11R6
7195/usr/include/X11R5
7196/usr/include/X11R4
8c5ff6dd 7197
eb697db5
DN
7198/usr/local/X11/include
7199/usr/local/X11R7/include
7200/usr/local/X11R6/include
7201/usr/local/X11R5/include
7202/usr/local/X11R4/include
8c5ff6dd 7203
eb697db5
DN
7204/usr/local/include/X11
7205/usr/local/include/X11R7
7206/usr/local/include/X11R6
7207/usr/local/include/X11R5
7208/usr/local/include/X11R4
8c5ff6dd 7209
eb697db5
DN
7210/usr/X386/include
7211/usr/x386/include
7212/usr/XFree86/include/X11
8c5ff6dd 7213
eb697db5
DN
7214/usr/include
7215/usr/local/include
7216/usr/unsupported/include
7217/usr/athena/include
7218/usr/local/x11r5/include
7219/usr/lpp/Xamples/include
8c5ff6dd 7220
eb697db5
DN
7221/usr/openwin/include
7222/usr/openwin/share/include'
8c5ff6dd 7223
eb697db5
DN
7224if test "$ac_x_includes" = no; then
7225 # Guess where to find include files, by looking for Xlib.h.
7226 # First, try using that file with no special directory specified.
7227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7228/* end confdefs.h. */
7229#include <X11/Xlib.h>
e6df49e4 7230_ACEOF
eb697db5
DN
7231if ac_fn_c_try_cpp "$LINENO"; then :
7232 # We can compile using X headers with no special include directory.
7233ac_x_includes=
7234else
7235 for ac_dir in $ac_x_header_dirs; do
7236 if test -r "$ac_dir/X11/Xlib.h"; then
7237 ac_x_includes=$ac_dir
7238 break
7239 fi
7240done
7241fi
7242rm -f conftest.err conftest.$ac_ext
7243fi # $ac_x_includes = no
49ebbd65 7244
eb697db5
DN
7245if test "$ac_x_libraries" = no; then
7246 # Check for the libraries.
7247 # See if we find them without any special options.
7248 # Don't add to $LIBS permanently.
7249 ac_save_LIBS=$LIBS
7250 LIBS="-lX11 $LIBS"
7251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7252/* end confdefs.h. */
7253#include <X11/Xlib.h>
7254int
7255main ()
7256{
7257XrmInitialize ()
7258 ;
7259 return 0;
7260}
5929fbe7 7261_ACEOF
eb697db5
DN
7262if ac_fn_c_try_link "$LINENO"; then :
7263 LIBS=$ac_save_LIBS
7264# We can link X programs with no special library path.
7265ac_x_libraries=
7266else
7267 LIBS=$ac_save_LIBS
7268for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7269do
7270 # Don't even attempt the hair of trying to link an X program!
7271 for ac_extension in a so sl dylib la dll; do
7272 if test -r "$ac_dir/libX11.$ac_extension"; then
7273 ac_x_libraries=$ac_dir
7274 break 2
7275 fi
7276 done
7277done
7278fi
7279rm -f core conftest.err conftest.$ac_objext \
7280 conftest$ac_exeext conftest.$ac_ext
7281fi # $ac_x_libraries = no
8c5ff6dd 7282
eb697db5
DN
7283case $ac_x_includes,$ac_x_libraries in #(
7284 no,* | *,no | *\'*)
7285 # Didn't find X, or a directory has "'" in its name.
7286 ac_cv_have_x="have_x=no";; #(
7287 *)
7288 # Record where we found X for the cache.
7289 ac_cv_have_x="have_x=yes\
7290 ac_x_includes='$ac_x_includes'\
7291 ac_x_libraries='$ac_x_libraries'"
5929fbe7 7292esac
eb697db5
DN
7293fi
7294;; #(
7295 *) have_x=yes;;
7296 esac
7297 eval "$ac_cv_have_x"
7298fi # $with_x != no
49ebbd65 7299
eb697db5
DN
7300if test "$have_x" != yes; then
7301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7302$as_echo "$have_x" >&6; }
7303 no_x=yes
7304else
7305 # If each of the values was on the command line, it overrides each guess.
7306 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7307 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7308 # Update the cache value to reflect the command line values.
7309 ac_cv_have_x="have_x=yes\
7310 ac_x_includes='$x_includes'\
7311 ac_x_libraries='$x_libraries'"
7312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7313$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
7314fi
8c5ff6dd 7315
eb697db5
DN
7316if test "$no_x" = yes; then
7317 window_system=none
7318else
7319 window_system=x11
7320fi
15e12598 7321
eb697db5
DN
7322## Workaround for bug in autoconf <= 2.62.
7323## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7324## No need to do anything special for these standard directories.
7325if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
15e12598 7326
eb697db5 7327 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
15e12598 7328
eb697db5 7329fi
91e84f96 7330
eb697db5
DN
7331LD_SWITCH_X_SITE_AUX=
7332LD_SWITCH_X_SITE_AUX_RPATH=
7333if test "${x_libraries}" != NONE; then
7334 if test -n "${x_libraries}"; then
7335 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7336 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7337 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
7338 fi
7339 x_default_search_path=""
7340 x_search_path=${x_libraries}
7341 if test -z "${x_search_path}"; then
7342 x_search_path=/usr/lib
7343 fi
7344 for x_library in `echo ${x_search_path}: | \
7345 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7346 x_search_path="\
7347${x_library}/X11/%L/%T/%N%C%S:\
7348${x_library}/X11/%l/%T/%N%C%S:\
7349${x_library}/X11/%T/%N%C%S:\
7350${x_library}/X11/%L/%T/%N%S:\
7351${x_library}/X11/%l/%T/%N%S:\
7352${x_library}/X11/%T/%N%S"
7353 if test x"${x_default_search_path}" = x; then
7354 x_default_search_path=${x_search_path}
7355 else
7356 x_default_search_path="${x_search_path}:${x_default_search_path}"
7357 fi
7358 done
7359fi
e6df49e4 7360
15e12598 7361
15e12598 7362
eb697db5
DN
7363if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7364 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
7365fi
8c5ff6dd 7366
eb697db5
DN
7367if test x"${x_includes}" = x; then
7368 bitmapdir=/usr/include/X11/bitmaps
7369else
7370 # accumulate include directories that have X11 bitmap subdirectories
7371 bmd_acc="dummyval"
7372 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7373 if test -d "${bmd}/X11/bitmaps"; then
7374 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7375 fi
7376 if test -d "${bmd}/bitmaps"; then
7377 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7378 fi
7379 done
7380 if test ${bmd_acc} != "dummyval"; then
7381 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7382 fi
7383fi
8c5ff6dd 7384
eb697db5
DN
7385HAVE_NS=no
7386NS_IMPL_COCOA=no
7387NS_IMPL_GNUSTEP=no
7388tmp_CPPFLAGS="$CPPFLAGS"
7389tmp_CFLAGS="$CFLAGS"
7390CPPFLAGS="$CPPFLAGS -x objective-c"
7391CFLAGS="$CFLAGS -x objective-c"
e6cfa7c3 7392TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}"
eb697db5
DN
7393if test "${with_ns}" != no; then
7394 if test "${opsys}" = darwin; then
7395 NS_IMPL_COCOA=yes
7396 ns_appdir=`pwd`/nextstep/Emacs.app/
7397 ns_appbindir=${ns_appdir}Contents/MacOS/
7398 ns_appresdir=${ns_appdir}Contents/Resources
7399 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7400 elif test -f $GNUSTEP_CONFIG_FILE; then
7401 NS_IMPL_GNUSTEP=yes
7402 ns_appdir=`pwd`/nextstep/Emacs.app/
7403 ns_appbindir=${ns_appdir}
7404 ns_appresdir=${ns_appdir}Resources
7405 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7406 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7407 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7408 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
7409 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
7410 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
7411 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
7412 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
7413 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
7414 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7415 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
eb697db5
DN
7416 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
7417 LIB_STANDARD=
7418 START_FILES=
7419 TEMACS_LDFLAGS2=
7420 fi
7421 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7422if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7423 HAVE_NS=yes
7424else
3d608a86 7425 as_fn_error "\`--with-ns' was specified, but the include
eb697db5
DN
7426 files are missing or cannot be compiled." "$LINENO" 5
7427fi
8c5ff6dd
KR
7428
7429
eb697db5
DN
7430 NS_HAVE_NSINTEGER=yes
7431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7432/* end confdefs.h. */
7433#include <Foundation/NSObjCRuntime.h>
7434int
7435main ()
7436{
7437NSInteger i;
7438 ;
7439 return 0;
7440}
7441_ACEOF
7442if ac_fn_c_try_compile "$LINENO"; then :
7443 ns_have_nsinteger=yes
7444else
7445 ns_have_nsinteger=no
7446fi
7447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7448 if test $ns_have_nsinteger = no; then
7449 NS_HAVE_NSINTEGER=no
7450 fi
7451fi
15e12598 7452
15e12598 7453
eb697db5
DN
7454ns_frag=/dev/null
7455NS_OBJ=
7456NS_SUPPORT=
7457if test "${HAVE_NS}" = yes; then
7458 window_system=nextstep
7459 with_xft=no
7460 # set up packaging dirs
7461 exec_prefix=${ns_appbindir}
7462 libexecdir=${ns_appbindir}/libexec
7463 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7464 prefix=${ns_appresdir}
7465 fi
7466 ns_frag=$srcdir/src/ns.mk
7467 NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
7468 NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc"
7469fi
7470CFLAGS="$tmp_CFLAGS"
7471CPPFLAGS="$tmp_CPPFLAGS"
15e12598 7472
15e12598 7473
a4f64981 7474
8c5ff6dd
KR
7475
7476
eb697db5
DN
7477case "${window_system}" in
7478 x11 )
7479 HAVE_X_WINDOWS=yes
7480 HAVE_X11=yes
7481 case "${with_x_toolkit}" in
7482 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7483 motif ) USE_X_TOOLKIT=MOTIF ;;
7484 gtk ) with_gtk=yes
7485 USE_X_TOOLKIT=none ;;
e547b051
J
7486 gtk3 ) with_gtk3=yes
7487 USE_X_TOOLKIT=none ;;
eb697db5
DN
7488 no ) USE_X_TOOLKIT=none ;;
7489 * ) USE_X_TOOLKIT=maybe ;;
7490 esac
7491 ;;
7492 nextstep | none )
7493 HAVE_X_WINDOWS=no
7494 HAVE_X11=no
7495 USE_X_TOOLKIT=none
7496 ;;
7497esac
8c5ff6dd 7498
eb697db5
DN
7499if test "$window_system" = none && test "X$with_x" != "Xno"; then
7500 # Extract the first word of "X", so it can be a program name with args.
7501set dummy X; ac_word=$2
7502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7503$as_echo_n "checking for $ac_word... " >&6; }
7504if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
7505 $as_echo_n "(cached) " >&6
7506else
7507 if test -n "$HAVE_XSERVER"; then
7508 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
7509else
7510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7511for as_dir in $PATH
7512do
7513 IFS=$as_save_IFS
7514 test -z "$as_dir" && as_dir=.
7515 for ac_exec_ext in '' $ac_executable_extensions; do
7516 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7517 ac_cv_prog_HAVE_XSERVER="true"
7518 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7519 break 2
7520 fi
7521done
7522 done
7523IFS=$as_save_IFS
8c5ff6dd 7524
eb697db5
DN
7525 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
7526fi
7527fi
7528HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7529if test -n "$HAVE_XSERVER"; then
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7531$as_echo "$HAVE_XSERVER" >&6; }
7532else
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7534$as_echo "no" >&6; }
7535fi
8c5ff6dd 7536
8c5ff6dd 7537
eb697db5
DN
7538 if test "$HAVE_XSERVER" = true ||
7539 test -n "$DISPLAY" ||
7540 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
3d608a86 7541 as_fn_error "You seem to be running X, but no X development libraries
eb697db5
DN
7542were found. You should install the relevant development files for X
7543and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7544sure you have development files for image handling, i.e.
7545tiff, gif, jpeg, png and xpm.
7546If you are sure you want Emacs compiled without X window support, pass
7547 --without-x
7548to configure." "$LINENO" 5
7549 fi
7550fi
8c5ff6dd 7551
eb697db5
DN
7552### If we're using X11, we should use the X menu package.
7553HAVE_MENUS=no
7554case ${HAVE_X11} in
7555 yes ) HAVE_MENUS=yes ;;
7556esac
8c5ff6dd 7557
eb697db5
DN
7558# Do the opsystem or machine files prohibit the use of the GNU malloc?
7559# Assume not, until told otherwise.
7560GNU_MALLOC=yes
7561doug_lea_malloc=yes
7562ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7563if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
8c5ff6dd 7564
eb697db5
DN
7565else
7566 doug_lea_malloc=no
7567fi
8c5ff6dd 7568
eb697db5
DN
7569ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7570if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
8c5ff6dd 7571
eb697db5
DN
7572else
7573 doug_lea_malloc=no
7574fi
8c5ff6dd 7575
eb697db5
DN
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7577$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7578if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
7579 $as_echo_n "(cached) " >&6
7580else
7581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7582/* end confdefs.h. */
7583extern void (* __after_morecore_hook)();
7584int
7585main ()
7586{
7587__after_morecore_hook = 0
7588 ;
7589 return 0;
7590}
7591_ACEOF
7592if ac_fn_c_try_link "$LINENO"; then :
7593 emacs_cv_var___after_morecore_hook=yes
7594else
7595 emacs_cv_var___after_morecore_hook=no
7596fi
7597rm -f core conftest.err conftest.$ac_objext \
7598 conftest$ac_exeext conftest.$ac_ext
7599fi
7600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7601$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7602if test $emacs_cv_var___after_morecore_hook = no; then
7603 doug_lea_malloc=no
7604fi
8c5ff6dd 7605
e7586c7a
GM
7606
7607system_malloc=no
7608case "$opsys" in
7609 ## darwin ld insists on the use of malloc routines in the System framework.
7610 darwin|sol2-10) system_malloc=yes ;;
7611esac
7612
eb697db5 7613if test "${system_malloc}" = "yes"; then
e7586c7a
GM
7614
7615$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
7616
eb697db5
DN
7617 GNU_MALLOC=no
7618 GNU_MALLOC_reason="
7619 (The GNU allocators don't work with this system configuration.)"
7620 GMALLOC_OBJ=
7621 VMLIMIT_OBJ=
7622else
7623 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
7624 VMLIMIT_OBJ=vm-limit.o
7625fi
0c309b80 7626
8c5ff6dd 7627
8c5ff6dd 7628
eb697db5
DN
7629if test "$doug_lea_malloc" = "yes" ; then
7630 if test "$GNU_MALLOC" = yes ; then
7631 GNU_MALLOC_reason="
7632 (Using Doug Lea's new malloc from the GNU C Library.)"
7633 fi
8c5ff6dd 7634
eb697db5 7635$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
8c5ff6dd 7636
a4f64981 7637
eb697db5
DN
7638 ## Use mmap directly for allocating larger buffers.
7639 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
7640 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
7641 ## Does the AC_FUNC_MMAP test below make this check unecessary?
7642 case "$opsys" in
7643 gnu*) REL_ALLOC=no ;;
7644 esac
7645fi
49ebbd65 7646
eb697db5
DN
7647if test x"${REL_ALLOC}" = x; then
7648 REL_ALLOC=${GNU_MALLOC}
7649fi
8c5ff6dd 7650
e7586c7a
GM
7651use_mmap_for_buffers=no
7652case "$opsys" in
7653 freebsd|irix6-5) use_mmap_for_buffers=yes ;;
7654esac
8c5ff6dd 7655
8c5ff6dd 7656
8c5ff6dd 7657
7186fb09 7658
eb697db5
DN
7659 for ac_header in $ac_header_list
7660do :
7661 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7662ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7663"
3d608a86
J
7664eval as_val=\$$as_ac_Header
7665 if test "x$as_val" = x""yes; then :
eb697db5
DN
7666 cat >>confdefs.h <<_ACEOF
7667#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7668_ACEOF
15e12598 7669
eb697db5 7670fi
8c5ff6dd 7671
eb697db5 7672done
8c5ff6dd
KR
7673
7674
8c5ff6dd 7675
8c5ff6dd 7676
15e12598 7677
8c5ff6dd
KR
7678
7679
8c5ff6dd 7680
eb697db5
DN
7681for ac_func in getpagesize
7682do :
7683 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7684if test "x$ac_cv_func_getpagesize" = x""yes; then :
7685 cat >>confdefs.h <<_ACEOF
7686#define HAVE_GETPAGESIZE 1
7687_ACEOF
8c5ff6dd 7688
eb697db5
DN
7689fi
7690done
8c5ff6dd 7691
eb697db5
DN
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7693$as_echo_n "checking for working mmap... " >&6; }
7694if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7695 $as_echo_n "(cached) " >&6
7696else
7697 if test "$cross_compiling" = yes; then :
7698 ac_cv_func_mmap_fixed_mapped=no
7699else
7700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7701/* end confdefs.h. */
7702$ac_includes_default
7703/* malloc might have been renamed as rpl_malloc. */
7704#undef malloc
8c5ff6dd 7705
eb697db5
DN
7706/* Thanks to Mike Haertel and Jim Avera for this test.
7707 Here is a matrix of mmap possibilities:
7708 mmap private not fixed
7709 mmap private fixed at somewhere currently unmapped
7710 mmap private fixed at somewhere already mapped
7711 mmap shared not fixed
7712 mmap shared fixed at somewhere currently unmapped
7713 mmap shared fixed at somewhere already mapped
7714 For private mappings, we should verify that changes cannot be read()
7715 back from the file, nor mmap's back from the file at a different
7716 address. (There have been systems where private was not correctly
7717 implemented like the infamous i386 svr4.0, and systems where the
7718 VM page cache was not coherent with the file system buffer cache
7719 like early versions of FreeBSD and possibly contemporary NetBSD.)
7720 For shared mappings, we should conversely verify that changes get
7721 propagated back to all the places they're supposed to be.
8c5ff6dd 7722
eb697db5
DN
7723 Grep wants private fixed already mapped.
7724 The main things grep needs to know about mmap are:
7725 * does it exist and is it safe to write into the mmap'd area
7726 * how to use it (BSD variants) */
8c5ff6dd 7727
eb697db5
DN
7728#include <fcntl.h>
7729#include <sys/mman.h>
8c5ff6dd 7730
eb697db5
DN
7731#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7732char *malloc ();
7733#endif
8c5ff6dd 7734
eb697db5
DN
7735/* This mess was copied from the GNU getpagesize.h. */
7736#ifndef HAVE_GETPAGESIZE
7737# ifdef _SC_PAGESIZE
7738# define getpagesize() sysconf(_SC_PAGESIZE)
7739# else /* no _SC_PAGESIZE */
7740# ifdef HAVE_SYS_PARAM_H
7741# include <sys/param.h>
7742# ifdef EXEC_PAGESIZE
7743# define getpagesize() EXEC_PAGESIZE
7744# else /* no EXEC_PAGESIZE */
7745# ifdef NBPG
7746# define getpagesize() NBPG * CLSIZE
7747# ifndef CLSIZE
7748# define CLSIZE 1
7749# endif /* no CLSIZE */
7750# else /* no NBPG */
7751# ifdef NBPC
7752# define getpagesize() NBPC
7753# else /* no NBPC */
7754# ifdef PAGESIZE
7755# define getpagesize() PAGESIZE
7756# endif /* PAGESIZE */
7757# endif /* no NBPC */
7758# endif /* no NBPG */
7759# endif /* no EXEC_PAGESIZE */
7760# else /* no HAVE_SYS_PARAM_H */
7761# define getpagesize() 8192 /* punt totally */
7762# endif /* no HAVE_SYS_PARAM_H */
7763# endif /* no _SC_PAGESIZE */
8c5ff6dd 7764
eb697db5 7765#endif /* no HAVE_GETPAGESIZE */
8c5ff6dd 7766
eb697db5
DN
7767int
7768main ()
7769{
7770 char *data, *data2, *data3;
7771 int i, pagesize;
7772 int fd, fd2;
8c5ff6dd 7773
eb697db5 7774 pagesize = getpagesize ();
8c5ff6dd 7775
eb697db5
DN
7776 /* First, make a file with some known garbage in it. */
7777 data = (char *) malloc (pagesize);
7778 if (!data)
7779 return 1;
7780 for (i = 0; i < pagesize; ++i)
7781 *(data + i) = rand ();
7782 umask (0);
7783 fd = creat ("conftest.mmap", 0600);
7784 if (fd < 0)
7785 return 2;
7786 if (write (fd, data, pagesize) != pagesize)
7787 return 3;
7788 close (fd);
8c5ff6dd 7789
eb697db5
DN
7790 /* Next, check that the tail of a page is zero-filled. File must have
7791 non-zero length, otherwise we risk SIGBUS for entire page. */
7792 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7793 if (fd2 < 0)
7794 return 4;
3d608a86
J
7795 data2 = "";
7796 if (write (fd2, data2, 1) != 1)
eb697db5 7797 return 5;
3d608a86 7798 data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
eb697db5
DN
7799 if (data2 == MAP_FAILED)
7800 return 6;
7801 for (i = 0; i < pagesize; ++i)
7802 if (*(data2 + i))
7803 return 7;
7804 close (fd2);
7805 if (munmap (data2, pagesize))
7806 return 8;
8c5ff6dd 7807
eb697db5
DN
7808 /* Next, try to mmap the file at a fixed address which already has
7809 something else allocated at it. If we can, also make sure that
7810 we see the same garbage. */
7811 fd = open ("conftest.mmap", O_RDWR);
7812 if (fd < 0)
7813 return 9;
7814 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7815 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7816 return 10;
7817 for (i = 0; i < pagesize; ++i)
7818 if (*(data + i) != *(data2 + i))
7819 return 11;
8c5ff6dd 7820
eb697db5
DN
7821 /* Finally, make sure that changes to the mapped area do not
7822 percolate back to the file as seen by read(). (This is a bug on
7823 some variants of i386 svr4.0.) */
7824 for (i = 0; i < pagesize; ++i)
7825 *(data2 + i) = *(data2 + i) + 1;
7826 data3 = (char *) malloc (pagesize);
7827 if (!data3)
7828 return 12;
7829 if (read (fd, data3, pagesize) != pagesize)
7830 return 13;
7831 for (i = 0; i < pagesize; ++i)
7832 if (*(data + i) != *(data3 + i))
7833 return 14;
7834 close (fd);
7835 return 0;
7836}
7837_ACEOF
7838if ac_fn_c_try_run "$LINENO"; then :
7839 ac_cv_func_mmap_fixed_mapped=yes
7840else
7841 ac_cv_func_mmap_fixed_mapped=no
7842fi
7843rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7844 conftest.$ac_objext conftest.beam conftest.$ac_ext
7845fi
8c5ff6dd 7846
eb697db5
DN
7847fi
7848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7849$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7850if test $ac_cv_func_mmap_fixed_mapped = yes; then
8c5ff6dd 7851
eb697db5 7852$as_echo "#define HAVE_MMAP 1" >>confdefs.h
8c5ff6dd 7853
eb697db5
DN
7854fi
7855rm -f conftest.mmap conftest.txt
8c5ff6dd 7856
eb697db5 7857if test $use_mmap_for_buffers = yes; then
e7586c7a
GM
7858
7859$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
7860
eb697db5
DN
7861 REL_ALLOC=no
7862fi
8c5ff6dd 7863
eb697db5 7864LIBS="$LIBS_SYSTEM $LIBS"
5929fbe7 7865
eb697db5
DN
7866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
7867$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7868if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
5929fbe7 7869 $as_echo_n "(cached) " >&6
8c5ff6dd 7870else
eb697db5
DN
7871 ac_check_lib_save_LIBS=$LIBS
7872LIBS="-ldnet $LIBS"
7873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7874/* end confdefs.h. */
8c5ff6dd 7875
5929fbe7
GM
7876/* Override any GCC internal prototype to avoid an error.
7877 Use char because int might match the return type of a GCC
7878 builtin and then its argument prototype would still apply. */
7879#ifdef __cplusplus
7880extern "C"
7881#endif
eb697db5 7882char dnet_ntoa ();
5929fbe7
GM
7883int
7884main ()
7885{
eb697db5 7886return dnet_ntoa ();
5929fbe7
GM
7887 ;
7888 return 0;
7889}
7890_ACEOF
eb697db5
DN
7891if ac_fn_c_try_link "$LINENO"; then :
7892 ac_cv_lib_dnet_dnet_ntoa=yes
5929fbe7 7893else
eb697db5 7894 ac_cv_lib_dnet_dnet_ntoa=no
5929fbe7 7895fi
eb697db5
DN
7896rm -f core conftest.err conftest.$ac_objext \
7897 conftest$ac_exeext conftest.$ac_ext
7898LIBS=$ac_check_lib_save_LIBS
5929fbe7 7899fi
eb697db5
DN
7900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7901$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7902if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
5929fbe7 7903 cat >>confdefs.h <<_ACEOF
eb697db5 7904#define HAVE_LIBDNET 1
5929fbe7 7905_ACEOF
aaa36002 7906
eb697db5 7907 LIBS="-ldnet $LIBS"
5929fbe7 7908
a4f64981 7909fi
5929fbe7 7910
a4f64981 7911
eb697db5
DN
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
7913$as_echo_n "checking for main in -lXbsd... " >&6; }
7914if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
5929fbe7 7915 $as_echo_n "(cached) " >&6
5929fbe7 7916else
eb697db5
DN
7917 ac_check_lib_save_LIBS=$LIBS
7918LIBS="-lXbsd $LIBS"
7919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7920/* end confdefs.h. */
a4f64981 7921
a4f64981 7922
eb697db5
DN
7923int
7924main ()
7925{
7926return main ();
7927 ;
7928 return 0;
7929}
5929fbe7 7930_ACEOF
eb697db5
DN
7931if ac_fn_c_try_link "$LINENO"; then :
7932 ac_cv_lib_Xbsd_main=yes
a4f64981 7933else
eb697db5 7934 ac_cv_lib_Xbsd_main=no
8c5ff6dd 7935fi
eb697db5
DN
7936rm -f core conftest.err conftest.$ac_objext \
7937 conftest$ac_exeext conftest.$ac_ext
7938LIBS=$ac_check_lib_save_LIBS
5929fbe7 7939fi
eb697db5
DN
7940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
7941$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
7942if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
7943 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
8c5ff6dd 7944fi
a4f64981 7945
8c5ff6dd 7946
eb697db5
DN
7947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
7948$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
7949if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
15e12598
VB
7950 $as_echo_n "(cached) " >&6
7951else
eb697db5
DN
7952 ac_check_lib_save_LIBS=$LIBS
7953LIBS="-lpthreads $LIBS"
7954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 7955/* end confdefs.h. */
e6df49e4
GM
7956
7957/* Override any GCC internal prototype to avoid an error.
7958 Use char because int might match the return type of a GCC
7959 builtin and then its argument prototype would still apply. */
7960#ifdef __cplusplus
eb697db5 7961extern "C"
5929fbe7 7962#endif
eb697db5 7963char cma_open ();
aaa36002
DN
7964int
7965main ()
7966{
eb697db5 7967return cma_open ();
aaa36002
DN
7968 ;
7969 return 0;
7970}
7186fb09 7971_ACEOF
eb697db5
DN
7972if ac_fn_c_try_link "$LINENO"; then :
7973 ac_cv_lib_pthreads_cma_open=yes
7186fb09 7974else
eb697db5 7975 ac_cv_lib_pthreads_cma_open=no
cd03c74a 7976fi
eb697db5
DN
7977rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext conftest.$ac_ext
7979LIBS=$ac_check_lib_save_LIBS
49ebbd65 7980fi
eb697db5
DN
7981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
7982$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
7983if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
5929fbe7 7984 cat >>confdefs.h <<_ACEOF
eb697db5 7985#define HAVE_LIBPTHREADS 1
5929fbe7
GM
7986_ACEOF
7987
eb697db5 7988 LIBS="-lpthreads $LIBS"
5929fbe7 7989
eb697db5 7990fi
5929fbe7
GM
7991
7992
eb697db5
DN
7993## Note: when using cpp in s/aix4.2.h, this definition depended on
7994## HAVE_LIBPTHREADS. That was not defined earlier in configure when
7995## the system file was sourced. Hence the value of LIBS_SYSTEM
7996## added to LIBS in configure would never contain the pthreads part,
7997## but the value used in Makefiles might. FIXME?
7998##
7999## -lpthreads seems to be necessary for Xlib in X11R6, and should
8000## be harmless on older versions of X where it happens to exist.
8001test "$opsys" = "aix4-2" && \
8002 test $ac_cv_lib_pthreads_cma_open = yes && \
8003 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
5929fbe7
GM
8004
8005
eb697db5
DN
8006case ${host_os} in
8007aix*)
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
8009$as_echo_n "checking for -bbigtoc option... " >&6; }
8010if test "${gdb_cv_bigtoc+set}" = set; then :
7186fb09 8011 $as_echo_n "(cached) " >&6
a5edbe4a 8012else
a4f64981 8013
eb697db5
DN
8014 case $GCC in
8015 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8016 *) gdb_cv_bigtoc=-bbigtoc ;;
8017 esac
a4f64981 8018
eb697db5
DN
8019 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8021/* end confdefs.h. */
8c5ff6dd 8022
eb697db5
DN
8023int
8024main ()
8025{
8026int i;
8027 ;
8028 return 0;
8029}
8030_ACEOF
8031if ac_fn_c_try_link "$LINENO"; then :
8c5ff6dd 8032
eb697db5
DN
8033else
8034 gdb_cv_bigtoc=
8035fi
8036rm -f core conftest.err conftest.$ac_objext \
8037 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 8038
eb697db5
DN
8039fi
8040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
8041$as_echo "$gdb_cv_bigtoc" >&6; }
8042 ;;
8043esac
8c5ff6dd 8044
eb697db5
DN
8045# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
8046# used for the tests that follow. We set them back to REAL_CFLAGS and
8047# REAL_CPPFLAGS later on.
8c5ff6dd 8048
e6cfa7c3 8049REAL_CFLAGS="$CFLAGS"
eb697db5 8050REAL_CPPFLAGS="$CPPFLAGS"
8c5ff6dd 8051
eb697db5
DN
8052if test "${HAVE_X11}" = "yes"; then
8053 DEFS="$C_SWITCH_X_SITE $DEFS"
8054 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
e7586c7a 8055 LIBS="-lX11 $LIBS"
eb697db5
DN
8056 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
8057 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
8c5ff6dd 8058
eb697db5
DN
8059 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
8060 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
8061 # but it's more convenient here to set LD_RUN_PATH
8062 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
8063 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8064 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
8065 export LD_RUN_PATH
8066 fi
8c5ff6dd 8067
eb697db5
DN
8068 if test "${opsys}" = "gnu-linux"; then
8069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
8070$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
8071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8072/* end confdefs.h. */
8c5ff6dd 8073
eb697db5
DN
8074int
8075main ()
5929fbe7 8076{
eb697db5
DN
8077XOpenDisplay ("foo");
8078 ;
8079 return 0;
5929fbe7 8080}
eb697db5
DN
8081_ACEOF
8082if ac_fn_c_try_link "$LINENO"; then :
8083 xlinux_first_failure=no
8084else
8085 xlinux_first_failure=yes
8086fi
8087rm -f core conftest.err conftest.$ac_objext \
8088 conftest$ac_exeext conftest.$ac_ext
8089 if test "${xlinux_first_failure}" = "yes"; then
8090 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
8091 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
8092 OLD_CPPFLAGS="$CPPFLAGS"
8093 OLD_LIBS="$LIBS"
8094 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
8095 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
8096 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
8097 LIBS="$LIBS -b i486-linuxaout"
8098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8099/* end confdefs.h. */
8c5ff6dd 8100
eb697db5
DN
8101int
8102main ()
5929fbe7 8103{
eb697db5
DN
8104XOpenDisplay ("foo");
8105 ;
8106 return 0;
5929fbe7 8107}
eb697db5
DN
8108_ACEOF
8109if ac_fn_c_try_link "$LINENO"; then :
8110 xlinux_second_failure=no
8111else
8112 xlinux_second_failure=yes
8113fi
8114rm -f core conftest.err conftest.$ac_objext \
8115 conftest$ac_exeext conftest.$ac_ext
8116 if test "${xlinux_second_failure}" = "yes"; then
8117 # If we get the same failure with -b, there is no use adding -b.
8118 # So take it out. This plays safe.
8119 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
8120 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
8121 CPPFLAGS="$OLD_CPPFLAGS"
8122 LIBS="$OLD_LIBS"
8123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8124$as_echo "no" >&6; }
8125 else
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8127$as_echo "yes" >&6; }
8128 fi
8129 else
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8131$as_echo "no" >&6; }
8132 fi
8133 fi
8c5ff6dd 8134
eb697db5
DN
8135 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
8136 # header files included from there.
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
8138$as_echo_n "checking for Xkb... " >&6; }
8139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8140/* end confdefs.h. */
8141#include <X11/Xlib.h>
8142#include <X11/XKBlib.h>
5929fbe7
GM
8143int
8144main ()
8145{
eb697db5
DN
8146XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
8147 ;
8148 return 0;
5929fbe7
GM
8149}
8150_ACEOF
eb697db5
DN
8151if ac_fn_c_try_link "$LINENO"; then :
8152 emacs_xkb=yes
a4f64981 8153else
eb697db5 8154 emacs_xkb=no
5929fbe7 8155fi
eb697db5
DN
8156rm -f core conftest.err conftest.$ac_objext \
8157 conftest$ac_exeext conftest.$ac_ext
8158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
8159$as_echo "$emacs_xkb" >&6; }
8160 if test $emacs_xkb = yes; then
a4f64981 8161
eb697db5 8162$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
a4f64981 8163
eb697db5 8164 fi
a4f64981 8165
eb697db5
DN
8166 for ac_func in XrmSetDatabase XScreenResourceString \
8167XScreenNumberOfScreen XSetWMProtocols
8168do :
8169 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8170ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
3d608a86
J
8171eval as_val=\$$as_ac_var
8172 if test "x$as_val" = x""yes; then :
eb697db5
DN
8173 cat >>confdefs.h <<_ACEOF
8174#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5929fbe7 8175_ACEOF
a4f64981 8176
5929fbe7 8177fi
eb697db5 8178done
a4f64981 8179
eb697db5 8180fi
8c5ff6dd 8181
eb697db5
DN
8182if test "${window_system}" = "x11"; then
8183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
8184$as_echo_n "checking X11 version 6... " >&6; }
8185 if test "${emacs_cv_x11_version_6+set}" = set; then :
a4f64981
GM
8186 $as_echo_n "(cached) " >&6
8187else
eb697db5 8188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 8189/* end confdefs.h. */
eb697db5 8190#include <X11/Xlib.h>
9452ded1
DN
8191int
8192main ()
8193{
eb697db5
DN
8194#if XlibSpecificationRelease < 6
8195fail;
8196#endif
8197
9452ded1
DN
8198 ;
8199 return 0;
8200}
0c309b80 8201_ACEOF
eb697db5
DN
8202if ac_fn_c_try_link "$LINENO"; then :
8203 emacs_cv_x11_version_6=yes
7186fb09 8204else
eb697db5
DN
8205 emacs_cv_x11_version_6=no
8206fi
8207rm -f core conftest.err conftest.$ac_objext \
8208 conftest$ac_exeext conftest.$ac_ext
8209fi
8210
8211 if test $emacs_cv_x11_version_6 = yes; then
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8213$as_echo "6 or newer" >&6; }
8214
8215$as_echo "#define HAVE_X11R6 1" >>confdefs.h
5929fbe7 8216
a46007e9
GM
8217
8218$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
8219
8220 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
8221 ## XIM support.
8222 case "$opsys" in
8223 sol2-*) : ;;
8224 *)
8225$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
8226
8227 ;;
8228 esac
eb697db5
DN
8229 else
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8231$as_echo "before 6" >&6; }
8232 fi
aaa36002 8233fi
5929fbe7 8234
eb697db5
DN
8235
8236### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
8237HAVE_RSVG=no
8238if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
8239 if test "${with_rsvg}" != "no"; then
8240 RSVG_REQUIRED=2.11.0
8241 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
8242
8243
8244 succeeded=no
8245
8246 # Extract the first word of "pkg-config", so it can be a program name with args.
8247set dummy pkg-config; ac_word=$2
8248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8249$as_echo_n "checking for $ac_word... " >&6; }
8250if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8251 $as_echo_n "(cached) " >&6
8252else
8253 case $PKG_CONFIG in
8254 [\\/]* | ?:[\\/]*)
8255 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8256 ;;
8257 *)
8258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8259for as_dir in $PATH
8260do
8261 IFS=$as_save_IFS
8262 test -z "$as_dir" && as_dir=.
8263 for ac_exec_ext in '' $ac_executable_extensions; do
8264 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8265 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8267 break 2
8268 fi
8269done
8270 done
8271IFS=$as_save_IFS
8272
8273 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8274 ;;
8275esac
aaa36002 8276fi
eb697db5
DN
8277PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8278if test -n "$PKG_CONFIG"; then
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8280$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 8281else
eb697db5
DN
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8283$as_echo "no" >&6; }
a4f64981
GM
8284fi
8285
8c5ff6dd 8286
e6df49e4 8287
eb697db5
DN
8288 if test "$PKG_CONFIG" = "no" ; then
8289 :
8290 else
8291 PKG_CONFIG_MIN_VERSION=0.9.0
8292 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8294$as_echo_n "checking for $RSVG_MODULE... " >&6; }
8295
8296 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8298$as_echo "yes" >&6; }
8299 succeeded=yes
8300
8301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8302$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8303 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8305$as_echo "$RSVG_CFLAGS" >&6; }
8306
8307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8308$as_echo_n "checking RSVG_LIBS... " >&6; }
8309 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8311$as_echo "$RSVG_LIBS" >&6; }
8312 else
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8314$as_echo "no" >&6; }
8315 RSVG_CFLAGS=""
8316 RSVG_LIBS=""
8317 ## If we have a custom action on failure, don't print errors, but
8318 ## do set a variable so people can do so.
8319 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
8320
8321 fi
8322
8323
8324
8325 else
8326 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8327 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8328 fi
8329 fi
8330
8331 if test $succeeded = yes; then
8332 :
8333 else
8334 :
8335 fi
7186fb09 8336
a5edbe4a 8337
a5edbe4a 8338
91e84f96 8339
eb697db5
DN
8340 if test ".${RSVG_CFLAGS}" != "."; then
8341 HAVE_RSVG=yes
7186fb09 8342
eb697db5 8343$as_echo "#define HAVE_RSVG 1" >>confdefs.h
7186fb09 8344
eb697db5
DN
8345 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8346 LIBS="$RSVG_LIBS $LIBS"
8347 fi
8348 fi
a4f64981 8349fi
08b47d3d 8350
eb697db5
DN
8351
8352HAVE_GTK=no
e547b051
J
8353if test "${with_gtk3}" = "yes"; then
8354 GLIB_REQUIRED=2.6
8355 GTK_REQUIRED=2.90
8356 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8357
8358
8359 succeeded=no
8360
8361 # Extract the first word of "pkg-config", so it can be a program name with args.
8362set dummy pkg-config; ac_word=$2
8363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8364$as_echo_n "checking for $ac_word... " >&6; }
8365if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8366 $as_echo_n "(cached) " >&6
8367else
8368 case $PKG_CONFIG in
8369 [\\/]* | ?:[\\/]*)
8370 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8371 ;;
8372 *)
8373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8374for as_dir in $PATH
8375do
8376 IFS=$as_save_IFS
8377 test -z "$as_dir" && as_dir=.
8378 for ac_exec_ext in '' $ac_executable_extensions; do
8379 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8380 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8381 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8382 break 2
8383 fi
8384done
8385 done
8386IFS=$as_save_IFS
8387
8388 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8389 ;;
8390esac
8391fi
8392PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8393if test -n "$PKG_CONFIG"; then
8394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8395$as_echo "$PKG_CONFIG" >&6; }
8396else
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8398$as_echo "no" >&6; }
8399fi
8400
8401
8402
8403 if test "$PKG_CONFIG" = "no" ; then
8404 pkg_check_gtk=no
8405 else
8406 PKG_CONFIG_MIN_VERSION=0.9.0
8407 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8409$as_echo_n "checking for $GTK_MODULES... " >&6; }
8410
8411 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8413$as_echo "yes" >&6; }
8414 succeeded=yes
8415
8416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8417$as_echo_n "checking GTK_CFLAGS... " >&6; }
8418 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8420$as_echo "$GTK_CFLAGS" >&6; }
8421
8422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8423$as_echo_n "checking GTK_LIBS... " >&6; }
8424 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8426$as_echo "$GTK_LIBS" >&6; }
8427 else
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8429$as_echo "no" >&6; }
8430 GTK_CFLAGS=""
8431 GTK_LIBS=""
8432 ## If we have a custom action on failure, don't print errors, but
8433 ## do set a variable so people can do so.
8434 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8435
8436 fi
8437
8438
8439
8440 else
8441 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8442 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8443 fi
8444 fi
8445
8446 if test $succeeded = yes; then
8447 pkg_check_gtk=yes
8448 else
8449 pkg_check_gtk=no
8450 fi
8451
8452 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
3d608a86 8453 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
e547b051
J
8454 fi
8455fi
8456
8457if test "$pkg_check_gtk" != "yes"; then
8458 HAVE_GTK=no
eb697db5
DN
8459if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8460 GLIB_REQUIRED=2.6
8461 GTK_REQUIRED=2.6
8462 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
5929fbe7
GM
8463
8464
eb697db5 8465 succeeded=no
5929fbe7 8466
eb697db5
DN
8467 # Extract the first word of "pkg-config", so it can be a program name with args.
8468set dummy pkg-config; ac_word=$2
8469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8470$as_echo_n "checking for $ac_word... " >&6; }
8471if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981 8472 $as_echo_n "(cached) " >&6
a4f64981 8473else
eb697db5
DN
8474 case $PKG_CONFIG in
8475 [\\/]* | ?:[\\/]*)
8476 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8477 ;;
8478 *)
8479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8480for as_dir in $PATH
8481do
8482 IFS=$as_save_IFS
8483 test -z "$as_dir" && as_dir=.
8484 for ac_exec_ext in '' $ac_executable_extensions; do
8485 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8486 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8487 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8488 break 2
8489 fi
8490done
8491 done
8492IFS=$as_save_IFS
8c5ff6dd 8493
eb697db5
DN
8494 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8495 ;;
5929fbe7 8496esac
eb697db5
DN
8497fi
8498PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8499if test -n "$PKG_CONFIG"; then
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8501$as_echo "$PKG_CONFIG" >&6; }
a4f64981 8502else
eb697db5
DN
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8504$as_echo "no" >&6; }
a4f64981 8505fi
5929fbe7 8506
9452ded1 8507
a4f64981 8508
eb697db5
DN
8509 if test "$PKG_CONFIG" = "no" ; then
8510 pkg_check_gtk=no
8511 else
8512 PKG_CONFIG_MIN_VERSION=0.9.0
8513 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8515$as_echo_n "checking for $GTK_MODULES... " >&6; }
a4f64981 8516
eb697db5
DN
8517 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8519$as_echo "yes" >&6; }
8520 succeeded=yes
a4f64981 8521
eb697db5
DN
8522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8523$as_echo_n "checking GTK_CFLAGS... " >&6; }
8524 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8526$as_echo "$GTK_CFLAGS" >&6; }
91e84f96 8527
eb697db5
DN
8528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8529$as_echo_n "checking GTK_LIBS... " >&6; }
8530 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8532$as_echo "$GTK_LIBS" >&6; }
8533 else
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8535$as_echo "no" >&6; }
8536 GTK_CFLAGS=""
8537 GTK_LIBS=""
8538 ## If we have a custom action on failure, don't print errors, but
8539 ## do set a variable so people can do so.
8540 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8732a4e9 8541
eb697db5 8542 fi
8732a4e9 8543
5929fbe7 8544
9452ded1 8545
eb697db5
DN
8546 else
8547 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8548 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8549 fi
8550 fi
8551
8552 if test $succeeded = yes; then
8553 pkg_check_gtk=yes
8554 else
8555 pkg_check_gtk=no
8556 fi
5929fbe7 8557
eb697db5 8558 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
3d608a86 8559 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
eb697db5 8560 fi
8c5ff6dd 8561fi
e547b051 8562fi
8c5ff6dd 8563
eb697db5
DN
8564GTK_OBJ=
8565if test x"$pkg_check_gtk" = xyes; then
91e84f96 8566
8c5ff6dd 8567
8c5ff6dd 8568
eb697db5
DN
8569 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8570 CFLAGS="$CFLAGS $GTK_CFLAGS"
8571 LIBS="$GTK_LIBS $LIBS"
8572 GTK_COMPILES=no
8573 for ac_func in gtk_main
8574do :
8575 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8576if test "x$ac_cv_func_gtk_main" = x""yes; then :
8577 cat >>confdefs.h <<_ACEOF
8578#define HAVE_GTK_MAIN 1
8579_ACEOF
8580 GTK_COMPILES=yes
5929fbe7 8581fi
eb697db5 8582done
8c5ff6dd 8583
eb697db5
DN
8584 if test "${GTK_COMPILES}" != "yes"; then
8585 if test "$USE_X_TOOLKIT" != "maybe"; then
3d608a86 8586 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
eb697db5
DN
8587 fi
8588 else
8589 HAVE_GTK=yes
5929fbe7 8590
eb697db5 8591$as_echo "#define USE_GTK 1" >>confdefs.h
91e84f96 8592
eb697db5
DN
8593 GTK_OBJ=gtkutil.o
8594 USE_X_TOOLKIT=none
8595 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
8596 :
8597 else
8598 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
8599 closing open displays. This is no problem if you just use
8600 one display, but if you use more than one and close one of them
8601 Emacs may crash." >&5
8602$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
8603 closing open displays. This is no problem if you just use
8604 one display, but if you use more than one and close one of them
8605 Emacs may crash." >&2;}
8606 sleep 3
8607 fi
8608 fi
8c5ff6dd 8609
a4f64981 8610fi
08b47d3d 8611
15e12598
VB
8612
8613
eb697db5 8614if test "${HAVE_GTK}" = "yes"; then
15e12598 8615
eb697db5
DN
8616 if test "$with_toolkit_scroll_bars" != no; then
8617 with_toolkit_scroll_bars=yes
eb697db5 8618 fi
8c5ff6dd 8619
eb697db5
DN
8620 HAVE_GTK_FILE_SELECTION=no
8621 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
8622#include <gtk/gtk.h>
8623"
8624if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
8625 HAVE_GTK_FILE_SELECTION=yes
5929fbe7 8626else
eb697db5 8627 HAVE_GTK_FILE_SELECTION=no
5929fbe7 8628fi
91e84f96 8629
eb697db5
DN
8630 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
8631 for ac_func in gtk_file_selection_new
8632do :
8633 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
8634if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
5929fbe7 8635 cat >>confdefs.h <<_ACEOF
eb697db5 8636#define HAVE_GTK_FILE_SELECTION_NEW 1
5929fbe7 8637_ACEOF
8c5ff6dd 8638
8c5ff6dd 8639fi
eb697db5 8640done
5929fbe7 8641
eb697db5 8642 fi
5929fbe7 8643
e547b051 8644 HAVE_GTK_AND_PTHREAD=no
eb697db5
DN
8645 for ac_header in pthread.h
8646do :
8647 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8648if test "x$ac_cv_header_pthread_h" = x""yes; then :
8649 cat >>confdefs.h <<_ACEOF
8650#define HAVE_PTHREAD_H 1
5929fbe7
GM
8651_ACEOF
8652
eb697db5 8653fi
5929fbe7 8654
eb697db5
DN
8655done
8656
8657 if test "$ac_cv_header_pthread_h"; then
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
8659$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
8660if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
8c5ff6dd
KR
8661 $as_echo_n "(cached) " >&6
8662else
8663 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
8664LIBS="-lpthread $LIBS"
8665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 8666/* end confdefs.h. */
8c5ff6dd
KR
8667
8668/* Override any GCC internal prototype to avoid an error.
8669 Use char because int might match the return type of a GCC
8670 builtin and then its argument prototype would still apply. */
8671#ifdef __cplusplus
8672extern "C"
8673#endif
eb697db5 8674char pthread_self ();
a4f64981
GM
8675int
8676main ()
8677{
eb697db5 8678return pthread_self ();
a4f64981
GM
8679 ;
8680 return 0;
8681}
8682_ACEOF
eb697db5
DN
8683if ac_fn_c_try_link "$LINENO"; then :
8684 ac_cv_lib_pthread_pthread_self=yes
a4f64981 8685else
eb697db5 8686 ac_cv_lib_pthread_pthread_self=no
8c5ff6dd 8687fi
eb697db5
DN
8688rm -f core conftest.err conftest.$ac_objext \
8689 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
8690LIBS=$ac_check_lib_save_LIBS
8691fi
eb697db5
DN
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
8693$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
8694if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
8695 HAVE_GTK_AND_PTHREAD=yes
8696fi
91e84f96 8697
eb697db5
DN
8698 fi
8699 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
8700 case "${canonical}" in
8701 *-hpux*) ;;
8702 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
8703 esac
91e84f96 8704
eb697db5 8705$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
cd03c74a 8706
eb697db5 8707 fi
e547b051
J
8708
8709 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
8710 gtk_dialog_get_action_area gtk_widget_get_sensitive \
8711 gtk_widget_get_mapped gtk_adjustment_get_page_size \
8712 gtk_orientable_set_orientation
8713do :
8714 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8715ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
3d608a86
J
8716eval as_val=\$$as_ac_var
8717 if test "x$as_val" = x""yes; then :
e547b051
J
8718 cat >>confdefs.h <<_ACEOF
8719#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8720_ACEOF
8721
8722fi
8723done
8724
8725
5929fbe7 8726fi
49ebbd65 8727
eb697db5
DN
8728HAVE_DBUS=no
8729DBUS_OBJ=
8730if test "${with_dbus}" = "yes"; then
15e12598 8731
eb697db5 8732 succeeded=no
a4f64981 8733
eb697db5
DN
8734 # Extract the first word of "pkg-config", so it can be a program name with args.
8735set dummy pkg-config; ac_word=$2
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8737$as_echo_n "checking for $ac_word... " >&6; }
8738if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
8739 $as_echo_n "(cached) " >&6
8740else
eb697db5
DN
8741 case $PKG_CONFIG in
8742 [\\/]* | ?:[\\/]*)
8743 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8744 ;;
8745 *)
8746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8747for as_dir in $PATH
8748do
8749 IFS=$as_save_IFS
8750 test -z "$as_dir" && as_dir=.
8751 for ac_exec_ext in '' $ac_executable_extensions; do
8752 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8753 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8755 break 2
8756 fi
8757done
8758 done
8759IFS=$as_save_IFS
8760
8761 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8762 ;;
a4f64981 8763esac
eb697db5
DN
8764fi
8765PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8766if test -n "$PKG_CONFIG"; then
8767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8768$as_echo "$PKG_CONFIG" >&6; }
91e84f96 8769else
eb697db5
DN
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8771$as_echo "no" >&6; }
5929fbe7 8772fi
a4f64981 8773
49ebbd65 8774
eb697db5
DN
8775
8776 if test "$PKG_CONFIG" = "no" ; then
8777 HAVE_DBUS=no
8778 else
8779 PKG_CONFIG_MIN_VERSION=0.9.0
8780 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
8782$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
8783
8784 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
8785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8786$as_echo "yes" >&6; }
8787 succeeded=yes
8788
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
8790$as_echo_n "checking DBUS_CFLAGS... " >&6; }
8791 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
8793$as_echo "$DBUS_CFLAGS" >&6; }
8794
8795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
8796$as_echo_n "checking DBUS_LIBS... " >&6; }
8797 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
8799$as_echo "$DBUS_LIBS" >&6; }
8800 else
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8802$as_echo "no" >&6; }
8803 DBUS_CFLAGS=""
8804 DBUS_LIBS=""
8805 ## If we have a custom action on failure, don't print errors, but
8806 ## do set a variable so people can do so.
8807 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
8808
8809 fi
8810
8811
8812
8813 else
8814 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8815 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8816 fi
8817 fi
8818
8819 if test $succeeded = yes; then
8820 HAVE_DBUS=yes
8821 else
8822 HAVE_DBUS=no
8823 fi
8824
8825 if test "$HAVE_DBUS" = yes; then
8826 LIBS="$LIBS $DBUS_LIBS"
8827
8828$as_echo "#define HAVE_DBUS 1" >>confdefs.h
8829
8830 for ac_func in dbus_watch_get_unix_fd
8831do :
8832 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
8833if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
8834 cat >>confdefs.h <<_ACEOF
8835#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
5929fbe7 8836_ACEOF
eb697db5
DN
8837
8838fi
8839done
8840
8841 DBUS_OBJ=dbusbind.o
8842 fi
8843fi
8844
8845
8846HAVE_GCONF=no
8847if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
8848
8849 succeeded=no
8850
8851 # Extract the first word of "pkg-config", so it can be a program name with args.
8852set dummy pkg-config; ac_word=$2
8853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8854$as_echo_n "checking for $ac_word... " >&6; }
8855if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8856 $as_echo_n "(cached) " >&6
8857else
8858 case $PKG_CONFIG in
8859 [\\/]* | ?:[\\/]*)
8860 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8861 ;;
8862 *)
8863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8864for as_dir in $PATH
8865do
8866 IFS=$as_save_IFS
8867 test -z "$as_dir" && as_dir=.
8868 for ac_exec_ext in '' $ac_executable_extensions; do
8869 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8870 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8872 break 2
8873 fi
8874done
8875 done
8876IFS=$as_save_IFS
8877
8878 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8879 ;;
5929fbe7 8880esac
eb697db5
DN
8881fi
8882PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8883if test -n "$PKG_CONFIG"; then
8884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8885$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 8886else
eb697db5
DN
8887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8888$as_echo "no" >&6; }
8889fi
8890
8891
8892
8893 if test "$PKG_CONFIG" = "no" ; then
8894 HAVE_GCONF=no
8895 else
8896 PKG_CONFIG_MIN_VERSION=0.9.0
8897 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
8899$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
8900
8901 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
8902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8903$as_echo "yes" >&6; }
8904 succeeded=yes
8905
8906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
8907$as_echo_n "checking GCONF_CFLAGS... " >&6; }
8908 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
8910$as_echo "$GCONF_CFLAGS" >&6; }
8911
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
8913$as_echo_n "checking GCONF_LIBS... " >&6; }
8914 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
8916$as_echo "$GCONF_LIBS" >&6; }
8917 else
8918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8919$as_echo "no" >&6; }
8920 GCONF_CFLAGS=""
8921 GCONF_LIBS=""
8922 ## If we have a custom action on failure, don't print errors, but
8923 ## do set a variable so people can do so.
8924 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
cd03c74a 8925
eb697db5 8926 fi
49ebbd65 8927
e6df49e4 8928
49ebbd65 8929
eb697db5
DN
8930 else
8931 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8932 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8933 fi
8934 fi
cd03c74a 8935
eb697db5
DN
8936 if test $succeeded = yes; then
8937 HAVE_GCONF=yes
8938 else
8939 HAVE_GCONF=no
8940 fi
49ebbd65 8941
eb697db5 8942 if test "$HAVE_GCONF" = yes; then
a4f64981 8943
eb697db5 8944$as_echo "#define HAVE_GCONF 1" >>confdefs.h
8c5ff6dd 8945
eb697db5
DN
8946 fi
8947fi
8948
8949HAVE_LIBSELINUX=no
8950LIBSELINUX_LIBS=
8951if test "${with_selinux}" = "yes"; then
8952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
8953$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
8954if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
15e12598 8955 $as_echo_n "(cached) " >&6
49ebbd65 8956else
eb697db5
DN
8957 ac_check_lib_save_LIBS=$LIBS
8958LIBS="-lselinux $LIBS"
8959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8960/* end confdefs.h. */
15e12598
VB
8961
8962/* Override any GCC internal prototype to avoid an error.
8963 Use char because int might match the return type of a GCC
8964 builtin and then its argument prototype would still apply. */
8965#ifdef __cplusplus
8966extern "C"
8967#endif
eb697db5 8968char lgetfilecon ();
91e84f96
GM
8969int
8970main ()
8971{
eb697db5 8972return lgetfilecon ();
91e84f96
GM
8973 ;
8974 return 0;
8975}
8976_ACEOF
eb697db5
DN
8977if ac_fn_c_try_link "$LINENO"; then :
8978 ac_cv_lib_selinux_lgetfilecon=yes
91e84f96 8979else
eb697db5 8980 ac_cv_lib_selinux_lgetfilecon=no
a4f64981 8981fi
eb697db5
DN
8982rm -f core conftest.err conftest.$ac_objext \
8983 conftest$ac_exeext conftest.$ac_ext
8984LIBS=$ac_check_lib_save_LIBS
15e12598 8985fi
eb697db5
DN
8986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
8987$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
8988if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
8989 HAVE_LIBSELINUX=yes
8990else
8991 HAVE_LIBSELINUX=no
5929fbe7 8992fi
a4f64981 8993
eb697db5 8994 if test "$HAVE_LIBSELINUX" = yes; then
15e12598 8995
eb697db5 8996$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
e6df49e4 8997
eb697db5
DN
8998 LIBSELINUX_LIBS=-lselinux
8999 fi
5929fbe7 9000fi
e6df49e4 9001
eb697db5
DN
9002
9003HAVE_XAW3D=no
9004LUCID_LIBW=
9005if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
9006 if test "$with_xaw3d" != no; then
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
9008$as_echo_n "checking for xaw3d... " >&6; }
9009 if test "${emacs_cv_xaw3d+set}" = set; then :
a4f64981
GM
9010 $as_echo_n "(cached) " >&6
9011else
eb697db5 9012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9013/* end confdefs.h. */
5929fbe7 9014
eb697db5
DN
9015#include <X11/Intrinsic.h>
9016#include <X11/Xaw3d/Simple.h>
9017int
9018main ()
9019{
5929fbe7 9020
eb697db5
DN
9021 ;
9022 return 0;
9023}
5929fbe7 9024_ACEOF
eb697db5
DN
9025if ac_fn_c_try_link "$LINENO"; then :
9026 emacs_cv_xaw3d=yes
a4f64981 9027else
eb697db5 9028 emacs_cv_xaw3d=no
a4f64981 9029fi
eb697db5
DN
9030rm -f core conftest.err conftest.$ac_objext \
9031 conftest$ac_exeext conftest.$ac_ext
5929fbe7 9032fi
8c5ff6dd 9033
eb697db5
DN
9034 else
9035 emacs_cv_xaw3d=no
9036 fi
9037 if test $emacs_cv_xaw3d = yes; then
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9039$as_echo "yes; using Lucid toolkit" >&6; }
9040 USE_X_TOOLKIT=LUCID
9041 HAVE_XAW3D=yes
9042 LUCID_LIBW=-lXaw3d
8c5ff6dd 9043
eb697db5 9044$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
5929fbe7 9045
eb697db5
DN
9046 else
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9048$as_echo "no" >&6; }
9049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
9050$as_echo_n "checking for libXaw... " >&6; }
9051 if test "${emacs_cv_xaw+set}" = set; then :
5929fbe7 9052 $as_echo_n "(cached) " >&6
5929fbe7 9053else
eb697db5 9054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9055/* end confdefs.h. */
5929fbe7 9056
eb697db5
DN
9057#include <X11/Intrinsic.h>
9058#include <X11/Xaw/Simple.h>
9059int
9060main ()
9061{
5929fbe7 9062
eb697db5
DN
9063 ;
9064 return 0;
9065}
5929fbe7 9066_ACEOF
eb697db5
DN
9067if ac_fn_c_try_link "$LINENO"; then :
9068 emacs_cv_xaw=yes
5929fbe7 9069else
eb697db5
DN
9070 emacs_cv_xaw=no
9071fi
9072rm -f core conftest.err conftest.$ac_objext \
9073 conftest$ac_exeext conftest.$ac_ext
9074fi
5929fbe7 9075
eb697db5
DN
9076 if test $emacs_cv_xaw = yes; then
9077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9078$as_echo "yes; using Lucid toolkit" >&6; }
9079 USE_X_TOOLKIT=LUCID
9080 LUCID_LIBW=-lXaw
9081 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
3d608a86 9082 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
eb697db5
DN
9083 else
9084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
9085$as_echo "no; do not use toolkit by default" >&6; }
9086 USE_X_TOOLKIT=none
9087 fi
9088 fi
5929fbe7 9089fi
8c5ff6dd 9090
eb697db5 9091X_TOOLKIT_TYPE=$USE_X_TOOLKIT
a4f64981 9092
eb697db5
DN
9093LIBXTR6=
9094if test "${USE_X_TOOLKIT}" != "none"; then
9095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
9096$as_echo_n "checking X11 toolkit version... " >&6; }
9097 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
9098 $as_echo_n "(cached) " >&6
9099else
9100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9101/* end confdefs.h. */
9102#include <X11/Intrinsic.h>
9103int
9104main ()
9105{
9106#if XtSpecificationRelease < 6
9107fail;
9108#endif
aaa36002 9109
eb697db5
DN
9110 ;
9111 return 0;
9112}
9113_ACEOF
9114if ac_fn_c_try_link "$LINENO"; then :
9115 emacs_cv_x11_toolkit_version_6=yes
5929fbe7 9116else
eb697db5 9117 emacs_cv_x11_toolkit_version_6=no
5929fbe7 9118fi
eb697db5
DN
9119rm -f core conftest.err conftest.$ac_objext \
9120 conftest$ac_exeext conftest.$ac_ext
5929fbe7 9121fi
15e12598 9122
eb697db5
DN
9123 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
9124 if test $emacs_cv_x11_toolkit_version_6 = yes; then
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
9126$as_echo "6 or newer" >&6; }
15e12598 9127
eb697db5 9128$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
15e12598 9129
eb697db5
DN
9130 LIBXTR6="-lSM -lICE"
9131 case "$opsys" in
9132 ## Use libw.a along with X11R6 Xt.
9133 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
9134 esac
9135 else
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
9137$as_echo "before 6" >&6; }
9138 fi
5929fbe7 9139
eb697db5
DN
9140 OLDLIBS="$LIBS"
9141 if test x$HAVE_X11XTR6 = xyes; then
9142 LIBS="-lXt -lSM -lICE $LIBS"
9143 else
9144 LIBS="-lXt $LIBS"
9145 fi
9146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
9147$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
9148if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
5929fbe7 9149 $as_echo_n "(cached) " >&6
5929fbe7 9150else
eb697db5
DN
9151 ac_check_lib_save_LIBS=$LIBS
9152LIBS="-lXmu $LIBS"
9153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9154/* end confdefs.h. */
eb697db5
DN
9155
9156/* Override any GCC internal prototype to avoid an error.
9157 Use char because int might match the return type of a GCC
9158 builtin and then its argument prototype would still apply. */
9159#ifdef __cplusplus
9160extern "C"
9161#endif
9162char XmuConvertStandardSelection ();
9163int
9164main ()
9165{
9166return XmuConvertStandardSelection ();
9167 ;
9168 return 0;
9169}
5929fbe7 9170_ACEOF
eb697db5
DN
9171if ac_fn_c_try_link "$LINENO"; then :
9172 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
5929fbe7 9173else
eb697db5 9174 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
8c5ff6dd 9175fi
eb697db5
DN
9176rm -f core conftest.err conftest.$ac_objext \
9177 conftest$ac_exeext conftest.$ac_ext
9178LIBS=$ac_check_lib_save_LIBS
9179fi
9180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
9181$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
9182if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
9183 cat >>confdefs.h <<_ACEOF
9184#define HAVE_LIBXMU 1
5929fbe7 9185_ACEOF
a4f64981 9186
eb697db5
DN
9187 LIBS="-lXmu $LIBS"
9188
5929fbe7 9189fi
a4f64981 9190
eb697db5
DN
9191 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
9192fi
a4f64981 9193
a4f64981 9194
eb697db5
DN
9195LIBXMU=-lXmu
9196case "$machine" in
9197 ## These machines don't supply Xmu.
9198 hpux* | aix4-2 )
9199 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
5929fbe7
GM
9200 ;;
9201esac
eb697db5
DN
9202
9203
9204# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
9205if test "${HAVE_X11}" = "yes"; then
9206 if test "${USE_X_TOOLKIT}" != "none"; then
9207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
9208$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
9209if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
5929fbe7
GM
9210 $as_echo_n "(cached) " >&6
9211else
eb697db5
DN
9212 ac_check_lib_save_LIBS=$LIBS
9213LIBS="-lXext $LIBS"
9214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9215/* end confdefs.h. */
49ebbd65 9216
eb697db5
DN
9217/* Override any GCC internal prototype to avoid an error.
9218 Use char because int might match the return type of a GCC
9219 builtin and then its argument prototype would still apply. */
9220#ifdef __cplusplus
9221extern "C"
9222#endif
9223char XShapeQueryExtension ();
9224int
9225main ()
9226{
9227return XShapeQueryExtension ();
9228 ;
9229 return 0;
9230}
9231_ACEOF
9232if ac_fn_c_try_link "$LINENO"; then :
9233 ac_cv_lib_Xext_XShapeQueryExtension=yes
9234else
9235 ac_cv_lib_Xext_XShapeQueryExtension=no
9236fi
9237rm -f core conftest.err conftest.$ac_objext \
9238 conftest$ac_exeext conftest.$ac_ext
9239LIBS=$ac_check_lib_save_LIBS
5929fbe7 9240fi
eb697db5
DN
9241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
9242$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
9243if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
5929fbe7 9244 cat >>confdefs.h <<_ACEOF
eb697db5 9245#define HAVE_LIBXEXT 1
5929fbe7 9246_ACEOF
15e12598 9247
eb697db5 9248 LIBS="-lXext $LIBS"
a4f64981 9249
5929fbe7 9250fi
8c5ff6dd 9251
eb697db5
DN
9252 fi
9253fi
8c5ff6dd 9254
eb697db5
DN
9255LIBXP=
9256if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
9258$as_echo_n "checking for Motif version 2.1... " >&6; }
9259if test "${emacs_cv_motif_version_2_1+set}" = set; then :
91e84f96
GM
9260 $as_echo_n "(cached) " >&6
9261else
eb697db5 9262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9263/* end confdefs.h. */
eb697db5
DN
9264#include <Xm/Xm.h>
9265int
9266main ()
9267{
9268#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
9269int x = 5;
9270#else
9271Motif version prior to 2.1.
9272#endif
9273 ;
9274 return 0;
9275}
91e84f96 9276_ACEOF
eb697db5
DN
9277if ac_fn_c_try_compile "$LINENO"; then :
9278 emacs_cv_motif_version_2_1=yes
91e84f96 9279else
eb697db5 9280 emacs_cv_motif_version_2_1=no
91e84f96 9281fi
5929fbe7 9282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9283fi
9284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
9285$as_echo "$emacs_cv_motif_version_2_1" >&6; }
9286 if test $emacs_cv_motif_version_2_1 = yes; then
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
9288$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
9289if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
9290 $as_echo_n "(cached) " >&6
9291else
9292 ac_check_lib_save_LIBS=$LIBS
9293LIBS="-lXp $LIBS"
9294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9295/* end confdefs.h. */
a4f64981 9296
eb697db5
DN
9297/* Override any GCC internal prototype to avoid an error.
9298 Use char because int might match the return type of a GCC
9299 builtin and then its argument prototype would still apply. */
9300#ifdef __cplusplus
9301extern "C"
9302#endif
9303char XpCreateContext ();
9304int
9305main ()
9306{
9307return XpCreateContext ();
9308 ;
9309 return 0;
9310}
5929fbe7 9311_ACEOF
eb697db5
DN
9312if ac_fn_c_try_link "$LINENO"; then :
9313 ac_cv_lib_Xp_XpCreateContext=yes
9314else
9315 ac_cv_lib_Xp_XpCreateContext=no
9316fi
9317rm -f core conftest.err conftest.$ac_objext \
9318 conftest$ac_exeext conftest.$ac_ext
9319LIBS=$ac_check_lib_save_LIBS
9320fi
9321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
9322$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
9323if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
9324 LIBXP=-lXp
9325fi
9326
9327 else
9328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
9329$as_echo_n "checking for LessTif where some systems put it... " >&6; }
9330if test "${emacs_cv_lesstif+set}" = set; then :
9331 $as_echo_n "(cached) " >&6
9332else
9333 # We put this in CFLAGS temporarily to precede other -I options
9334 # that might be in CFLAGS temporarily.
9335 # We put this in CPPFLAGS where it precedes the other -I options.
9336 OLD_CPPFLAGS=$CPPFLAGS
9337 OLD_CFLAGS=$CFLAGS
9338 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
9339 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
9340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9341/* end confdefs.h. */
eb697db5
DN
9342#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
9343int
9344main ()
9345{
9346int x = 5;
9347 ;
9348 return 0;
9349}
a4f64981 9350_ACEOF
eb697db5
DN
9351if ac_fn_c_try_compile "$LINENO"; then :
9352 emacs_cv_lesstif=yes
8c5ff6dd 9353else
eb697db5
DN
9354 emacs_cv_lesstif=no
9355fi
9356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9357fi
9358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
9359$as_echo "$emacs_cv_lesstif" >&6; }
9360 if test $emacs_cv_lesstif = yes; then
9361 # Make sure this -I option remains in CPPFLAGS after it is set
9362 # back to REAL_CPPFLAGS.
9363 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
9364 # have those other -I options anyway. Ultimately, having this
9365 # directory ultimately in CPPFLAGS will be enough.
9366 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
9367 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
9368 else
9369 CFLAGS=$OLD_CFLAGS
9370 CPPFLAGS=$OLD_CPPFLAGS
9371 fi
9372 fi
5929fbe7 9373fi
cd03c74a 9374
49ebbd65 9375
eb697db5
DN
9376USE_TOOLKIT_SCROLL_BARS=no
9377if test "${with_toolkit_scroll_bars}" != "no"; then
9378 if test "${USE_X_TOOLKIT}" != "none"; then
9379 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9380 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9381
eb697db5
DN
9382 HAVE_XAW3D=no
9383 USE_TOOLKIT_SCROLL_BARS=yes
9384 elif test "${HAVE_XAW3D}" = "yes"; then
9385 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9386
9387 USE_TOOLKIT_SCROLL_BARS=yes
9388 fi
9389 elif test "${HAVE_GTK}" = "yes"; then
9390 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9391
9392 USE_TOOLKIT_SCROLL_BARS=yes
9393 elif test "${HAVE_NS}" = "yes"; then
9394 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9395
eb697db5
DN
9396 USE_TOOLKIT_SCROLL_BARS=yes
9397 fi
5929fbe7 9398fi
eb697db5
DN
9399
9400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9401/* end confdefs.h. */
91e84f96 9402
eb697db5
DN
9403 #include <X11/Xlib.h>
9404 #include <X11/Xresource.h>
91e84f96
GM
9405int
9406main ()
9407{
eb697db5 9408XIMProc callback;
91e84f96
GM
9409 ;
9410 return 0;
9411}
9412_ACEOF
eb697db5
DN
9413if ac_fn_c_try_compile "$LINENO"; then :
9414 HAVE_XIM=yes
9415
9416$as_echo "#define HAVE_XIM 1" >>confdefs.h
9417
5929fbe7 9418else
eb697db5
DN
9419 HAVE_XIM=no
9420fi
9421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929fbe7 9422
eb697db5
DN
9423
9424if test "${with_xim}" != "no"; then
9425
9426$as_echo "#define USE_XIM 1" >>confdefs.h
9427
9428fi
9429
9430
9431if test "${HAVE_XIM}" != "no"; then
9432 late_CFLAGS=$CFLAGS
9433 if test "$GCC" = yes; then
9434 CFLAGS="$CFLAGS --pedantic-errors"
9435 fi
9436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9437/* end confdefs.h. */
5929fbe7 9438
eb697db5
DN
9439#include <X11/Xlib.h>
9440#include <X11/Xresource.h>
5929fbe7
GM
9441int
9442main ()
9443{
eb697db5
DN
9444Display *display;
9445XrmDatabase db;
9446char *res_name;
9447char *res_class;
9448XIMProc callback;
9449XPointer *client_data;
9450#ifndef __GNUC__
9451/* If we're not using GCC, it's probably not XFree86, and this is
9452 probably right, but we can't use something like --pedantic-errors. */
9453extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9454 char*, XIMProc, XPointer*);
9455#endif
9456(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9457 client_data);
5929fbe7
GM
9458 ;
9459 return 0;
9460}
9461_ACEOF
eb697db5
DN
9462if ac_fn_c_try_compile "$LINENO"; then :
9463 emacs_cv_arg6_star=yes
5929fbe7 9464fi
5929fbe7 9465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9466 if test "$emacs_cv_arg6_star" = yes; then
9467 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
5929fbe7 9468
eb697db5
DN
9469 else
9470 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
9471
9472 fi
9473 CFLAGS=$late_CFLAGS
8c5ff6dd 9474fi
5929fbe7 9475
eb697db5
DN
9476### Start of font-backend (under any platform) section.
9477# (nothing here yet -- this is a placeholder)
9478### End of font-backend (under any platform) section.
5929fbe7 9479
eb697db5
DN
9480### Start of font-backend (under X11) section.
9481if test "${HAVE_X11}" = "yes"; then
5929fbe7 9482
eb697db5
DN
9483 succeeded=no
9484
9485 # Extract the first word of "pkg-config", so it can be a program name with args.
9486set dummy pkg-config; ac_word=$2
9487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9488$as_echo_n "checking for $ac_word... " >&6; }
9489if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9490 $as_echo_n "(cached) " >&6
9491else
9492 case $PKG_CONFIG in
9493 [\\/]* | ?:[\\/]*)
9494 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9495 ;;
9496 *)
9497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9498for as_dir in $PATH
9499do
9500 IFS=$as_save_IFS
9501 test -z "$as_dir" && as_dir=.
9502 for ac_exec_ext in '' $ac_executable_extensions; do
9503 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9504 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9506 break 2
9507 fi
9508done
9509 done
9510IFS=$as_save_IFS
5929fbe7 9511
eb697db5
DN
9512 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9513 ;;
9514esac
9515fi
9516PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9517if test -n "$PKG_CONFIG"; then
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9519$as_echo "$PKG_CONFIG" >&6; }
9520else
9521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9522$as_echo "no" >&6; }
8c5ff6dd 9523fi
91e84f96 9524
5929fbe7 9525
91e84f96 9526
eb697db5
DN
9527 if test "$PKG_CONFIG" = "no" ; then
9528 HAVE_FC=no
9529 else
9530 PKG_CONFIG_MIN_VERSION=0.9.0
9531 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
9533$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
8c5ff6dd 9534
eb697db5
DN
9535 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9537$as_echo "yes" >&6; }
9538 succeeded=yes
8c5ff6dd 9539
eb697db5
DN
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
9541$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
9542 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
9544$as_echo "$FONTCONFIG_CFLAGS" >&6; }
8c5ff6dd 9545
eb697db5
DN
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
9547$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
9548 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
9550$as_echo "$FONTCONFIG_LIBS" >&6; }
9551 else
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9553$as_echo "no" >&6; }
9554 FONTCONFIG_CFLAGS=""
9555 FONTCONFIG_LIBS=""
9556 ## If we have a custom action on failure, don't print errors, but
9557 ## do set a variable so people can do so.
9558 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
9559
9560 fi
9561
9562
9563
9564 else
9565 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9566 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9567 fi
9568 fi
9569
9570 if test $succeeded = yes; then
9571 HAVE_FC=yes
9572 else
9573 HAVE_FC=no
9574 fi
9575
9576
9577 ## Use -lXft if available, unless `--with-xft=no'.
9578 HAVE_XFT=maybe
9579 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
9580 with_xft="no";
9581 fi
9582 if test "x${with_xft}" != "xno"; then
9583
9584
9585 succeeded=no
9586
9587 # Extract the first word of "pkg-config", so it can be a program name with args.
9588set dummy pkg-config; ac_word=$2
9589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9590$as_echo_n "checking for $ac_word... " >&6; }
9591if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
9592 $as_echo_n "(cached) " >&6
9593else
eb697db5
DN
9594 case $PKG_CONFIG in
9595 [\\/]* | ?:[\\/]*)
9596 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9597 ;;
9598 *)
9599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9600for as_dir in $PATH
9601do
9602 IFS=$as_save_IFS
9603 test -z "$as_dir" && as_dir=.
9604 for ac_exec_ext in '' $ac_executable_extensions; do
9605 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9606 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9608 break 2
9609 fi
9610done
9611 done
9612IFS=$as_save_IFS
9613
9614 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9615 ;;
9616esac
9617fi
9618PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9619if test -n "$PKG_CONFIG"; then
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9621$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 9622else
eb697db5
DN
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9624$as_echo "no" >&6; }
15e12598 9625fi
8c5ff6dd 9626
8c5ff6dd 9627
15e12598 9628
eb697db5
DN
9629 if test "$PKG_CONFIG" = "no" ; then
9630 HAVE_XFT=no
9631 else
9632 PKG_CONFIG_MIN_VERSION=0.9.0
9633 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
9635$as_echo_n "checking for xft >= 0.13.0... " >&6; }
9636
9637 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9639$as_echo "yes" >&6; }
9640 succeeded=yes
9641
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
9643$as_echo_n "checking XFT_CFLAGS... " >&6; }
9644 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
9646$as_echo "$XFT_CFLAGS" >&6; }
9647
9648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
9649$as_echo_n "checking XFT_LIBS... " >&6; }
9650 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
9652$as_echo "$XFT_LIBS" >&6; }
9653 else
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9655$as_echo "no" >&6; }
9656 XFT_CFLAGS=""
9657 XFT_LIBS=""
9658 ## If we have a custom action on failure, don't print errors, but
9659 ## do set a variable so people can do so.
9660 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
8c5ff6dd 9661
eb697db5 9662 fi
8c5ff6dd 9663
5929fbe7
GM
9664
9665
eb697db5
DN
9666 else
9667 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9668 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9669 fi
9670 fi
5929fbe7 9671
eb697db5
DN
9672 if test $succeeded = yes; then
9673 :
9674 else
9675 HAVE_XFT=no
9676 fi
9677
9678 ## Because xftfont.c uses XRenderQueryExtension, we also
9679 ## need to link to -lXrender.
9680 HAVE_XRENDER=no
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
9682$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
9683if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
e6df49e4
GM
9684 $as_echo_n "(cached) " >&6
9685else
eb697db5
DN
9686 ac_check_lib_save_LIBS=$LIBS
9687LIBS="-lXrender $LIBS"
9688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 9689/* end confdefs.h. */
eb697db5
DN
9690
9691/* Override any GCC internal prototype to avoid an error.
9692 Use char because int might match the return type of a GCC
9693 builtin and then its argument prototype would still apply. */
9694#ifdef __cplusplus
9695extern "C"
9696#endif
9697char XRenderQueryExtension ();
5929fbe7
GM
9698int
9699main ()
9700{
eb697db5 9701return XRenderQueryExtension ();
5929fbe7
GM
9702 ;
9703 return 0;
9704}
9705_ACEOF
eb697db5
DN
9706if ac_fn_c_try_link "$LINENO"; then :
9707 ac_cv_lib_Xrender_XRenderQueryExtension=yes
5929fbe7 9708else
eb697db5
DN
9709 ac_cv_lib_Xrender_XRenderQueryExtension=no
9710fi
9711rm -f core conftest.err conftest.$ac_objext \
9712 conftest$ac_exeext conftest.$ac_ext
9713LIBS=$ac_check_lib_save_LIBS
9714fi
9715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
9716$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
9717if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
9718 HAVE_XRENDER=yes
5929fbe7
GM
9719fi
9720
eb697db5
DN
9721 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
9722 OLD_CPPFLAGS="$CPPFLAGS"
9723 OLD_CFLAGS="$CFLAGS"
9724 OLD_LIBS="$LIBS"
9725 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
9726 CFLAGS="$CFLAGS $XFT_CFLAGS"
9727 XFT_LIBS="-lXrender $XFT_LIBS"
9728 LIBS="$XFT_LIBS $LIBS"
9729 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
9730if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
9732$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
9733if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
9734 $as_echo_n "(cached) " >&6
9735else
9736 ac_check_lib_save_LIBS=$LIBS
9737LIBS="-lXft $XFT_LIBS $LIBS"
9738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9739/* end confdefs.h. */
eb697db5
DN
9740
9741/* Override any GCC internal prototype to avoid an error.
9742 Use char because int might match the return type of a GCC
9743 builtin and then its argument prototype would still apply. */
9744#ifdef __cplusplus
9745extern "C"
9746#endif
9747char XftFontOpen ();
e6df49e4
GM
9748int
9749main ()
8c5ff6dd 9750{
eb697db5 9751return XftFontOpen ();
8c5ff6dd
KR
9752 ;
9753 return 0;
9754}
9755_ACEOF
eb697db5
DN
9756if ac_fn_c_try_link "$LINENO"; then :
9757 ac_cv_lib_Xft_XftFontOpen=yes
e6df49e4 9758else
eb697db5 9759 ac_cv_lib_Xft_XftFontOpen=no
15e12598 9760fi
eb697db5
DN
9761rm -f core conftest.err conftest.$ac_objext \
9762 conftest$ac_exeext conftest.$ac_ext
9763LIBS=$ac_check_lib_save_LIBS
15e12598 9764fi
eb697db5
DN
9765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
9766$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
9767if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
9768 HAVE_XFT=yes
15e12598 9769fi
91e84f96 9770
eb697db5 9771fi
8c5ff6dd 9772
5929fbe7
GM
9773
9774
eb697db5 9775 if test "${HAVE_XFT}" = "yes"; then
5929fbe7 9776
eb697db5 9777$as_echo "#define HAVE_XFT 1" >>confdefs.h
5929fbe7
GM
9778
9779
eb697db5
DN
9780 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
9781 else
9782 CPPFLAGS="$OLD_CPPFLAGS"
9783 CFLAGS="$OLD_CFLAGS"
9784 LIBS="$OLD_LIBS"
9785 fi # "${HAVE_XFT}" = "yes"
9786 fi # "$HAVE_XFT" != no
9787 fi # "x${with_xft}" != "xno"
5929fbe7 9788
eb697db5
DN
9789 if test "$HAVE_XFT" != "yes"; then
9790 HAVE_XFT=no
9791 fi
5929fbe7
GM
9792
9793
eb697db5
DN
9794 HAVE_FREETYPE=no
9795 ## We used to allow building with FreeType and without Xft.
9796 ## However, the ftx font backend driver is not in good shape.
9797 if test "${HAVE_XFT}" = "yes"; then
9798 HAVE_FREETYPE=yes
9799 FONTCONFIG_CFLAGS=
9800 FONTCONFIG_LIBS=
9801 fi
5929fbe7 9802
eb697db5
DN
9803 HAVE_LIBOTF=no
9804 if test "${HAVE_FREETYPE}" = "yes"; then
5929fbe7 9805
eb697db5 9806$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
5929fbe7 9807
eb697db5 9808 if test "${with_libotf}" != "no"; then
5929fbe7 9809
eb697db5 9810 succeeded=no
5929fbe7 9811
eb697db5
DN
9812 # Extract the first word of "pkg-config", so it can be a program name with args.
9813set dummy pkg-config; ac_word=$2
9814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9815$as_echo_n "checking for $ac_word... " >&6; }
9816if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981
GM
9817 $as_echo_n "(cached) " >&6
9818else
eb697db5
DN
9819 case $PKG_CONFIG in
9820 [\\/]* | ?:[\\/]*)
9821 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9822 ;;
9823 *)
9824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9825for as_dir in $PATH
9826do
9827 IFS=$as_save_IFS
9828 test -z "$as_dir" && as_dir=.
9829 for ac_exec_ext in '' $ac_executable_extensions; do
9830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9831 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9833 break 2
9834 fi
9835done
9836 done
9837IFS=$as_save_IFS
9838
9839 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9840 ;;
5929fbe7 9841esac
eb697db5
DN
9842fi
9843PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9844if test -n "$PKG_CONFIG"; then
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9846$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 9847else
eb697db5
DN
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9849$as_echo "no" >&6; }
5929fbe7
GM
9850fi
9851
5929fbe7 9852
91e84f96 9853
eb697db5
DN
9854 if test "$PKG_CONFIG" = "no" ; then
9855 HAVE_LIBOTF=no
9856 else
9857 PKG_CONFIG_MIN_VERSION=0.9.0
9858 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
9860$as_echo_n "checking for libotf... " >&6; }
91e84f96 9861
eb697db5
DN
9862 if $PKG_CONFIG --exists "libotf" 2>&5; then
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9864$as_echo "yes" >&6; }
9865 succeeded=yes
91e84f96 9866
eb697db5
DN
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
9868$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
9869 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
9871$as_echo "$LIBOTF_CFLAGS" >&6; }
8c5ff6dd 9872
eb697db5
DN
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
9874$as_echo_n "checking LIBOTF_LIBS... " >&6; }
9875 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
9876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
9877$as_echo "$LIBOTF_LIBS" >&6; }
9878 else
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9880$as_echo "no" >&6; }
9881 LIBOTF_CFLAGS=""
9882 LIBOTF_LIBS=""
9883 ## If we have a custom action on failure, don't print errors, but
9884 ## do set a variable so people can do so.
9885 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
5929fbe7 9886
eb697db5 9887 fi
15e12598 9888
15e12598
VB
9889
9890
eb697db5
DN
9891 else
9892 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9893 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9894 fi
9895 fi
8c5ff6dd 9896
eb697db5
DN
9897 if test $succeeded = yes; then
9898 HAVE_LIBOTF=yes
9899 else
9900 HAVE_LIBOTF=no
9901 fi
5929fbe7 9902
eb697db5 9903 if test "$HAVE_LIBOTF" = "yes"; then
5929fbe7 9904
eb697db5 9905$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
5929fbe7 9906
eb697db5
DN
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
9908$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
9909if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
9910 $as_echo_n "(cached) " >&6
9911else
9912 ac_check_lib_save_LIBS=$LIBS
9913LIBS="-lotf $LIBS"
9914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9915/* end confdefs.h. */
91e84f96
GM
9916
9917/* Override any GCC internal prototype to avoid an error.
9918 Use char because int might match the return type of a GCC
9919 builtin and then its argument prototype would still apply. */
9920#ifdef __cplusplus
9921extern "C"
9922#endif
eb697db5 9923char OTF_get_variation_glyphs ();
91e84f96 9924int
49ebbd65
DN
9925main ()
9926{
eb697db5 9927return OTF_get_variation_glyphs ();
49ebbd65
DN
9928 ;
9929 return 0;
9930}
15e12598 9931_ACEOF
eb697db5
DN
9932if ac_fn_c_try_link "$LINENO"; then :
9933 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
a4f64981 9934else
eb697db5 9935 ac_cv_lib_otf_OTF_get_variation_glyphs=no
8c5ff6dd 9936fi
eb697db5
DN
9937rm -f core conftest.err conftest.$ac_objext \
9938 conftest$ac_exeext conftest.$ac_ext
9939LIBS=$ac_check_lib_save_LIBS
5929fbe7 9940fi
eb697db5
DN
9941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
9942$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
9943if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
9944 HAVE_OTF_GET_VARIATION_GLYPHS=yes
5929fbe7 9945else
eb697db5 9946 HAVE_OTF_GET_VARIATION_GLYPHS=no
5929fbe7 9947fi
8c5ff6dd 9948
eb697db5 9949 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
5929fbe7 9950
eb697db5 9951$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
a4f64981 9952
eb697db5
DN
9953 fi
9954 fi
9955 fi
9956 fi
a4f64981 9957
eb697db5
DN
9958 HAVE_M17N_FLT=no
9959 if test "${HAVE_LIBOTF}" = yes; then
9960 if test "${with_m17n_flt}" != "no"; then
a4f64981 9961
eb697db5 9962 succeeded=no
a4f64981 9963
eb697db5
DN
9964 # Extract the first word of "pkg-config", so it can be a program name with args.
9965set dummy pkg-config; ac_word=$2
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967$as_echo_n "checking for $ac_word... " >&6; }
9968if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
9969 $as_echo_n "(cached) " >&6
9970else
eb697db5
DN
9971 case $PKG_CONFIG in
9972 [\\/]* | ?:[\\/]*)
9973 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9974 ;;
9975 *)
9976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977for as_dir in $PATH
9978do
9979 IFS=$as_save_IFS
9980 test -z "$as_dir" && as_dir=.
9981 for ac_exec_ext in '' $ac_executable_extensions; do
9982 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9983 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985 break 2
9986 fi
9987done
9988 done
9989IFS=$as_save_IFS
5929fbe7 9990
eb697db5
DN
9991 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9992 ;;
5929fbe7 9993esac
5929fbe7 9994fi
eb697db5
DN
9995PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9996if test -n "$PKG_CONFIG"; then
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9998$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 9999else
eb697db5
DN
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10001$as_echo "no" >&6; }
8c5ff6dd
KR
10002fi
10003
5929fbe7 10004
5929fbe7 10005
eb697db5
DN
10006 if test "$PKG_CONFIG" = "no" ; then
10007 HAVE_M17N_FLT=no
10008 else
10009 PKG_CONFIG_MIN_VERSION=0.9.0
10010 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
10012$as_echo_n "checking for m17n-flt... " >&6; }
10013
10014 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10016$as_echo "yes" >&6; }
10017 succeeded=yes
10018
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
10020$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
10021 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
10022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
10023$as_echo "$M17N_FLT_CFLAGS" >&6; }
10024
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
10026$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
10027 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
10029$as_echo "$M17N_FLT_LIBS" >&6; }
10030 else
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032$as_echo "no" >&6; }
10033 M17N_FLT_CFLAGS=""
10034 M17N_FLT_LIBS=""
10035 ## If we have a custom action on failure, don't print errors, but
10036 ## do set a variable so people can do so.
10037 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
10038
10039 fi
10040
5929fbe7 10041
15e12598 10042
eb697db5
DN
10043 else
10044 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10045 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10046 fi
10047 fi
15e12598 10048
eb697db5
DN
10049 if test $succeeded = yes; then
10050 HAVE_M17N_FLT=yes
10051 else
10052 HAVE_M17N_FLT=no
5929fbe7 10053 fi
15e12598 10054
eb697db5 10055 if test "$HAVE_M17N_FLT" = "yes"; then
5929fbe7 10056
eb697db5 10057$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
5929fbe7 10058
eb697db5
DN
10059 fi
10060 fi
10061 fi
10062else
10063 HAVE_XFT=no
10064 HAVE_FREETYPE=no
10065 HAVE_LIBOTF=no
10066 HAVE_M17N_FLT=no
10067fi
5929fbe7 10068
eb697db5 10069### End of font-backend (under X11) section.
5929fbe7 10070
5929fbe7 10071
5929fbe7
GM
10072
10073
10074
5929fbe7 10075
5929fbe7
GM
10076
10077
10078
10079
eb697db5
DN
10080### Use -lXpm if available, unless `--with-xpm=no'.
10081HAVE_XPM=no
10082LIBXPM=
10083if test "${HAVE_X11}" = "yes"; then
10084 if test "${with_xpm}" != "no"; then
10085 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
10086if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
10088$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
10089if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
8c5ff6dd
KR
10090 $as_echo_n "(cached) " >&6
10091else
eb697db5
DN
10092 ac_check_lib_save_LIBS=$LIBS
10093LIBS="-lXpm -lX11 $LIBS"
10094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10095/* end confdefs.h. */
eb697db5
DN
10096
10097/* Override any GCC internal prototype to avoid an error.
10098 Use char because int might match the return type of a GCC
10099 builtin and then its argument prototype would still apply. */
10100#ifdef __cplusplus
10101extern "C"
10102#endif
10103char XpmReadFileToPixmap ();
7186fb09
GM
10104int
10105main ()
10106{
eb697db5 10107return XpmReadFileToPixmap ();
a4f64981
GM
10108 ;
10109 return 0;
7186fb09 10110}
0c309b80 10111_ACEOF
eb697db5
DN
10112if ac_fn_c_try_link "$LINENO"; then :
10113 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
aaa36002 10114else
eb697db5
DN
10115 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
10116fi
10117rm -f core conftest.err conftest.$ac_objext \
10118 conftest$ac_exeext conftest.$ac_ext
10119LIBS=$ac_check_lib_save_LIBS
10120fi
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
10122$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
10123if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
10124 HAVE_XPM=yes
10125fi
5929fbe7 10126
8c5ff6dd 10127fi
5929fbe7 10128
5929fbe7 10129
eb697db5
DN
10130 if test "${HAVE_XPM}" = "yes"; then
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
10132$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
10133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10134/* end confdefs.h. */
10135#include "X11/xpm.h"
10136#ifndef XpmReturnAllocPixels
10137no_return_alloc_pixels
10138#endif
8c5ff6dd 10139
5929fbe7 10140_ACEOF
eb697db5
DN
10141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10142 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
10143 HAVE_XPM=no
10144else
10145 HAVE_XPM=yes
15e12598 10146fi
eb697db5 10147rm -f conftest*
8c5ff6dd 10148
5929fbe7 10149
eb697db5
DN
10150 if test "${HAVE_XPM}" = "yes"; then
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10152$as_echo "yes" >&6; }
10153 else
10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155$as_echo "no" >&6; }
10156 fi
10157 fi
10158 fi
5929fbe7 10159
eb697db5 10160 if test "${HAVE_XPM}" = "yes"; then
5929fbe7 10161
eb697db5 10162$as_echo "#define HAVE_XPM 1" >>confdefs.h
5929fbe7 10163
eb697db5
DN
10164 LIBXPM=-lXpm
10165 fi
10166fi
5929fbe7 10167
eb697db5
DN
10168
10169### Use -ljpeg if available, unless `--with-jpeg=no'.
10170HAVE_JPEG=no
10171LIBJPEG=
10172if test "${HAVE_X11}" = "yes"; then
10173 if test "${with_jpeg}" != "no"; then
10174 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
10175if test "x$ac_cv_header_jerror_h" = x""yes; then :
10176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
10177$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
10178if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
10179 $as_echo_n "(cached) " >&6
10180else
10181 ac_check_lib_save_LIBS=$LIBS
10182LIBS="-ljpeg $LIBS"
10183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10184/* end confdefs.h. */
5929fbe7
GM
10185
10186/* Override any GCC internal prototype to avoid an error.
10187 Use char because int might match the return type of a GCC
10188 builtin and then its argument prototype would still apply. */
10189#ifdef __cplusplus
10190extern "C"
10191#endif
eb697db5 10192char jpeg_destroy_compress ();
08b47d3d
JD
10193int
10194main ()
10195{
eb697db5 10196return jpeg_destroy_compress ();
08b47d3d
JD
10197 ;
10198 return 0;
10199}
7186fb09 10200_ACEOF
eb697db5
DN
10201if ac_fn_c_try_link "$LINENO"; then :
10202 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
cd03c74a 10203else
eb697db5
DN
10204 ac_cv_lib_jpeg_jpeg_destroy_compress=no
10205fi
10206rm -f core conftest.err conftest.$ac_objext \
10207 conftest$ac_exeext conftest.$ac_ext
10208LIBS=$ac_check_lib_save_LIBS
10209fi
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
10211$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
10212if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
10213 HAVE_JPEG=yes
10214fi
10215
10216fi
10217
10218
10219 fi
10220
10221 if test "${HAVE_JPEG}" = "yes"; then
10222 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
10223
10224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10225/* end confdefs.h. */
10226#include <jpeglib.h>
10227 version=JPEG_LIB_VERSION
10228
10229_ACEOF
10230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10231 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
10232 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
8c5ff6dd 10233
eb697db5
DN
10234else
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
10236$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
10237 HAVE_JPEG=no
5929fbe7 10238fi
eb697db5 10239rm -f conftest*
8c5ff6dd 10240
eb697db5
DN
10241 fi
10242 if test "${HAVE_JPEG}" = "yes"; then
10243 LIBJPEG=-ljpeg
10244 fi
5929fbe7 10245fi
eb697db5
DN
10246
10247
10248### Use -lpng if available, unless `--with-png=no'.
10249HAVE_PNG=no
10250LIBPNG=
10251if test "${HAVE_X11}" = "yes"; then
10252 if test "${with_png}" != "no"; then
10253 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
10254 # in /usr/include/libpng.
10255 for ac_header in png.h libpng/png.h
10256do :
10257 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10258ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
3d608a86
J
10259eval as_val=\$$as_ac_Header
10260 if test "x$as_val" = x""yes; then :
5929fbe7 10261 cat >>confdefs.h <<_ACEOF
eb697db5 10262#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5929fbe7 10263_ACEOF
8c5ff6dd 10264
eb697db5
DN
10265fi
10266
10267done
10268
10269 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
10270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
10271$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
10272if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
a5edbe4a
GM
10273 $as_echo_n "(cached) " >&6
10274else
5929fbe7 10275 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10276LIBS="-lpng -lz -lm $LIBS"
10277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10278/* end confdefs.h. */
8c5ff6dd 10279
5929fbe7
GM
10280/* Override any GCC internal prototype to avoid an error.
10281 Use char because int might match the return type of a GCC
10282 builtin and then its argument prototype would still apply. */
10283#ifdef __cplusplus
10284extern "C"
10285#endif
eb697db5 10286char png_get_channels ();
5929fbe7
GM
10287int
10288main ()
10289{
eb697db5 10290return png_get_channels ();
5929fbe7
GM
10291 ;
10292 return 0;
10293}
8c5ff6dd 10294_ACEOF
eb697db5
DN
10295if ac_fn_c_try_link "$LINENO"; then :
10296 ac_cv_lib_png_png_get_channels=yes
8c5ff6dd 10297else
eb697db5
DN
10298 ac_cv_lib_png_png_get_channels=no
10299fi
10300rm -f core conftest.err conftest.$ac_objext \
10301 conftest$ac_exeext conftest.$ac_ext
10302LIBS=$ac_check_lib_save_LIBS
10303fi
10304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
10305$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
10306if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
10307 HAVE_PNG=yes
8c5ff6dd 10308fi
5929fbe7 10309
eb697db5
DN
10310 fi
10311 fi
10312
10313 if test "${HAVE_PNG}" = "yes"; then
8c5ff6dd 10314
eb697db5 10315$as_echo "#define HAVE_PNG 1" >>confdefs.h
8c5ff6dd 10316
eb697db5
DN
10317 LIBPNG="-lpng -lz -lm"
10318 fi
8c5ff6dd
KR
10319fi
10320
5929fbe7 10321
eb697db5
DN
10322### Use -ltiff if available, unless `--with-tiff=no'.
10323HAVE_TIFF=no
10324LIBTIFF=
10325if test "${HAVE_X11}" = "yes"; then
10326 if test "${with_tiff}" != "no"; then
10327 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
10328if test "x$ac_cv_header_tiffio_h" = x""yes; then :
10329 tifflibs="-lz -lm"
10330 # At least one tiff package requires the jpeg library.
10331 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
10333$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
10334if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
8c5ff6dd
KR
10335 $as_echo_n "(cached) " >&6
10336else
eb697db5
DN
10337 ac_check_lib_save_LIBS=$LIBS
10338LIBS="-ltiff $tifflibs $LIBS"
10339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a5edbe4a 10340/* end confdefs.h. */
5929fbe7
GM
10341
10342/* Override any GCC internal prototype to avoid an error.
10343 Use char because int might match the return type of a GCC
10344 builtin and then its argument prototype would still apply. */
10345#ifdef __cplusplus
10346extern "C"
10347#endif
eb697db5 10348char TIFFGetVersion ();
a5edbe4a
GM
10349int
10350main ()
10351{
eb697db5 10352return TIFFGetVersion ();
5929fbe7
GM
10353 ;
10354 return 0;
a5edbe4a 10355}
08b47d3d 10356_ACEOF
eb697db5
DN
10357if ac_fn_c_try_link "$LINENO"; then :
10358 ac_cv_lib_tiff_TIFFGetVersion=yes
49ebbd65 10359else
eb697db5 10360 ac_cv_lib_tiff_TIFFGetVersion=no
8c5ff6dd 10361fi
eb697db5
DN
10362rm -f core conftest.err conftest.$ac_objext \
10363 conftest$ac_exeext conftest.$ac_ext
10364LIBS=$ac_check_lib_save_LIBS
10365fi
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
10367$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
10368if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
10369 HAVE_TIFF=yes
49ebbd65 10370fi
8c5ff6dd 10371
49ebbd65 10372fi
8c5ff6dd
KR
10373
10374
eb697db5 10375 fi
8c5ff6dd 10376
eb697db5 10377 if test "${HAVE_TIFF}" = "yes"; then
5929fbe7 10378
eb697db5
DN
10379$as_echo "#define HAVE_TIFF 1" >>confdefs.h
10380
10381 LIBTIFF=-ltiff
10382 fi
10383fi
5929fbe7 10384
5929fbe7 10385
eb697db5
DN
10386### Use -lgif or -lungif if available, unless `--with-gif=no'.
10387HAVE_GIF=no
10388LIBGIF=
10389if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
10390 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
10391if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
10392 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10393# Earlier versions can crash Emacs.
10394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
10395$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
10396if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
10397 $as_echo_n "(cached) " >&6
10398else
10399 ac_check_lib_save_LIBS=$LIBS
10400LIBS="-lgif $LIBS"
10401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10402/* end confdefs.h. */
cd03c74a 10403
e6df49e4
GM
10404/* Override any GCC internal prototype to avoid an error.
10405 Use char because int might match the return type of a GCC
10406 builtin and then its argument prototype would still apply. */
10407#ifdef __cplusplus
10408extern "C"
10409#endif
eb697db5 10410char EGifPutExtensionLast ();
e6df49e4
GM
10411int
10412main ()
10413{
eb697db5 10414return EGifPutExtensionLast ();
e6df49e4
GM
10415 ;
10416 return 0;
10417}
a5edbe4a 10418_ACEOF
eb697db5
DN
10419if ac_fn_c_try_link "$LINENO"; then :
10420 ac_cv_lib_gif_EGifPutExtensionLast=yes
15e12598 10421else
eb697db5 10422 ac_cv_lib_gif_EGifPutExtensionLast=no
15e12598 10423fi
eb697db5
DN
10424rm -f core conftest.err conftest.$ac_objext \
10425 conftest$ac_exeext conftest.$ac_ext
10426LIBS=$ac_check_lib_save_LIBS
10427fi
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
10429$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
10430if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
10431 HAVE_GIF=yes
10432else
10433 HAVE_GIF=maybe
15e12598 10434fi
15e12598 10435
8c5ff6dd 10436fi
49ebbd65 10437
49ebbd65 10438
eb697db5
DN
10439
10440 if test "$HAVE_GIF" = yes; then
10441 LIBGIF=-lgif
10442 elif test "$HAVE_GIF" = maybe; then
10443# If gif_lib.h but no libgif, try libungif.
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10445$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10446if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
8c5ff6dd
KR
10447 $as_echo_n "(cached) " >&6
10448else
eb697db5
DN
10449 ac_check_lib_save_LIBS=$LIBS
10450LIBS="-lungif $LIBS"
10451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10452/* end confdefs.h. */
15e12598 10453
a4f64981
GM
10454/* Override any GCC internal prototype to avoid an error.
10455 Use char because int might match the return type of a GCC
10456 builtin and then its argument prototype would still apply. */
10457#ifdef __cplusplus
10458extern "C"
10459#endif
eb697db5 10460char EGifPutExtensionLast ();
a4f64981
GM
10461int
10462main ()
10463{
eb697db5 10464return EGifPutExtensionLast ();
a4f64981
GM
10465 ;
10466 return 0;
10467}
e6df49e4 10468_ACEOF
eb697db5
DN
10469if ac_fn_c_try_link "$LINENO"; then :
10470 ac_cv_lib_ungif_EGifPutExtensionLast=yes
a4f64981 10471else
eb697db5 10472 ac_cv_lib_ungif_EGifPutExtensionLast=no
e6df49e4 10473fi
eb697db5
DN
10474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
10476LIBS=$ac_check_lib_save_LIBS
a4f64981 10477fi
eb697db5
DN
10478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10479$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10480if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10481 HAVE_GIF=yes
e6df49e4 10482else
eb697db5 10483 HAVE_GIF=no
5929fbe7 10484fi
8c5ff6dd 10485
eb697db5
DN
10486 test "$HAVE_GIF" = yes && LIBGIF=-lungif
10487 fi
5929fbe7 10488
eb697db5 10489 if test "${HAVE_GIF}" = "yes"; then
5929fbe7 10490
eb697db5 10491$as_echo "#define HAVE_GIF 1" >>confdefs.h
5929fbe7 10492
eb697db5
DN
10493 fi
10494fi
5929fbe7 10495
5929fbe7 10496
eb697db5
DN
10497if test "${HAVE_X11}" = "yes"; then
10498 MISSING=""
10499 WITH_NO=""
10500 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
10501 MISSING="libXpm" && WITH_NO="--with-xpm=no"
10502 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
10503 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
10504 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
10505 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
10506 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
10507 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
10508 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
10509 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
10510
10511 if test "X${MISSING}" != X; then
3d608a86 10512 as_fn_error "The following required libraries were not found:
eb697db5
DN
10513 $MISSING
10514Maybe some development libraries/packages are missing?
10515If you don't want to link with them give
10516 $WITH_NO
10517as options to configure" "$LINENO" 5
10518 fi
10519fi
5929fbe7 10520
eb697db5
DN
10521### Use -lgpm if available, unless `--with-gpm=no'.
10522HAVE_GPM=no
10523LIBGPM=
10524MOUSE_SUPPORT=
10525if test "${with_gpm}" != "no"; then
10526 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
10527if test "x$ac_cv_header_gpm_h" = x""yes; then :
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
10529$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
10530if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
a4f64981 10531 $as_echo_n "(cached) " >&6
15e12598 10532else
eb697db5
DN
10533 ac_check_lib_save_LIBS=$LIBS
10534LIBS="-lgpm $LIBS"
10535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 10536/* end confdefs.h. */
eb697db5
DN
10537
10538/* Override any GCC internal prototype to avoid an error.
10539 Use char because int might match the return type of a GCC
10540 builtin and then its argument prototype would still apply. */
10541#ifdef __cplusplus
10542extern "C"
10543#endif
10544char Gpm_Open ();
a4f64981
GM
10545int
10546main ()
15e12598 10547{
eb697db5 10548return Gpm_Open ();
a4f64981
GM
10549 ;
10550 return 0;
15e12598 10551}
a4f64981 10552_ACEOF
eb697db5
DN
10553if ac_fn_c_try_link "$LINENO"; then :
10554 ac_cv_lib_gpm_Gpm_Open=yes
a4f64981 10555else
eb697db5
DN
10556 ac_cv_lib_gpm_Gpm_Open=no
10557fi
10558rm -f core conftest.err conftest.$ac_objext \
10559 conftest$ac_exeext conftest.$ac_ext
10560LIBS=$ac_check_lib_save_LIBS
10561fi
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10563$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
10564if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
10565 HAVE_GPM=yes
10566fi
5929fbe7 10567
a4f64981 10568fi
5929fbe7 10569
eb697db5
DN
10570
10571
10572 if test "${HAVE_GPM}" = "yes"; then
10573
10574$as_echo "#define HAVE_GPM 1" >>confdefs.h
10575
10576 LIBGPM=-lgpm
10577 ## May be reset below.
10578 MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
10579 fi
a4f64981 10580fi
15e12598 10581
8c5ff6dd 10582
eb697db5
DN
10583ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
10584if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
8c5ff6dd 10585
eb697db5 10586$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
8c5ff6dd 10587
eb697db5 10588fi
298b8a34 10589
15e12598 10590
15e12598 10591
eb697db5
DN
10592C_SWITCH_X_SYSTEM=
10593### Use NeXTstep API to implement GUI.
10594if test "${HAVE_NS}" = "yes"; then
8c5ff6dd 10595
eb697db5 10596$as_echo "#define HAVE_NS 1" >>confdefs.h
8c5ff6dd 10597
eb697db5 10598 if test "${NS_IMPL_COCOA}" = "yes"; then
5929fbe7 10599
eb697db5 10600$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
8c5ff6dd 10601
eb697db5
DN
10602 GNU_OBJC_CFLAGS=
10603 fi
10604 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
8c5ff6dd 10605
eb697db5 10606$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
8c5ff6dd 10607
eb697db5
DN
10608 # See also .m.o rule in Makefile.in */
10609 # FIXME: are all these flags really needed? Document here why. */
10610 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
10611 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
10612 fi
10613 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
8c5ff6dd 10614
eb697db5 10615$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
8c5ff6dd 10616
eb697db5
DN
10617 fi
10618 # We also have mouse menus.
10619 HAVE_MENUS=yes
10620 OTHER_FILES=ns-app
10621fi
8c5ff6dd 10622
8c5ff6dd 10623
eb697db5
DN
10624### Use session management (-lSM -lICE) if available
10625HAVE_X_SM=no
10626LIBXSM=
10627if test "${HAVE_X11}" = "yes"; then
10628 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10629if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
10631$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
10632if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
10633 $as_echo_n "(cached) " >&6
10634else
10635 ac_check_lib_save_LIBS=$LIBS
10636LIBS="-lSM -lICE $LIBS"
10637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10638/* end confdefs.h. */
eb697db5
DN
10639
10640/* Override any GCC internal prototype to avoid an error.
10641 Use char because int might match the return type of a GCC
10642 builtin and then its argument prototype would still apply. */
10643#ifdef __cplusplus
10644extern "C"
10645#endif
10646char SmcOpenConnection ();
5929fbe7
GM
10647int
10648main ()
10649{
eb697db5 10650return SmcOpenConnection ();
5929fbe7
GM
10651 ;
10652 return 0;
10653}
10654_ACEOF
eb697db5
DN
10655if ac_fn_c_try_link "$LINENO"; then :
10656 ac_cv_lib_SM_SmcOpenConnection=yes
5929fbe7 10657else
eb697db5
DN
10658 ac_cv_lib_SM_SmcOpenConnection=no
10659fi
10660rm -f core conftest.err conftest.$ac_objext \
10661 conftest$ac_exeext conftest.$ac_ext
10662LIBS=$ac_check_lib_save_LIBS
10663fi
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
10665$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
10666if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
10667 HAVE_X_SM=yes
10668fi
8c5ff6dd 10669
5929fbe7 10670fi
8c5ff6dd 10671
eb697db5
DN
10672
10673
10674 if test "${HAVE_X_SM}" = "yes"; then
10675
10676$as_echo "#define HAVE_X_SM 1" >>confdefs.h
10677
10678 LIBXSM="-lSM -lICE"
10679 case "$LIBS" in
10680 *-lSM*) ;;
10681 *) LIBS="$LIBXSM $LIBS" ;;
10682 esac
10683 fi
10684fi
10685
10686
10687# If netdb.h doesn't declare h_errno, we must declare it by hand.
10688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
10689$as_echo_n "checking whether netdb declares h_errno... " >&6; }
10690if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
10691 $as_echo_n "(cached) " >&6
10692else
10693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10694/* end confdefs.h. */
eb697db5 10695#include <netdb.h>
5929fbe7
GM
10696int
10697main ()
10698{
eb697db5 10699return h_errno;
5929fbe7
GM
10700 ;
10701 return 0;
10702}
10703_ACEOF
eb697db5
DN
10704if ac_fn_c_try_link "$LINENO"; then :
10705 emacs_cv_netdb_declares_h_errno=yes
5929fbe7 10706else
eb697db5 10707 emacs_cv_netdb_declares_h_errno=no
5929fbe7 10708fi
eb697db5
DN
10709rm -f core conftest.err conftest.$ac_objext \
10710 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 10711fi
eb697db5
DN
10712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
10713$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
10714if test $emacs_cv_netdb_declares_h_errno = yes; then
8c5ff6dd 10715
eb697db5 10716$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
8c5ff6dd
KR
10717
10718fi
10719
eb697db5
DN
10720# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10721# for constant arguments. Useless!
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10723$as_echo_n "checking for working alloca.h... " >&6; }
10724if test "${ac_cv_working_alloca_h+set}" = set; then :
5929fbe7
GM
10725 $as_echo_n "(cached) " >&6
10726else
eb697db5 10727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10728/* end confdefs.h. */
eb697db5
DN
10729#include <alloca.h>
10730int
10731main ()
10732{
10733char *p = (char *) alloca (2 * sizeof (int));
10734 if (p) return 0;
10735 ;
10736 return 0;
10737}
10738_ACEOF
10739if ac_fn_c_try_link "$LINENO"; then :
10740 ac_cv_working_alloca_h=yes
10741else
10742 ac_cv_working_alloca_h=no
10743fi
10744rm -f core conftest.err conftest.$ac_objext \
10745 conftest$ac_exeext conftest.$ac_ext
10746fi
10747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10748$as_echo "$ac_cv_working_alloca_h" >&6; }
10749if test $ac_cv_working_alloca_h = yes; then
10750
10751$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10752
10753fi
10754
10755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10756$as_echo_n "checking for alloca... " >&6; }
10757if test "${ac_cv_func_alloca_works+set}" = set; then :
10758 $as_echo_n "(cached) " >&6
10759else
10760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10761/* end confdefs.h. */
10762#ifdef __GNUC__
10763# define alloca __builtin_alloca
10764#else
10765# ifdef _MSC_VER
10766# include <malloc.h>
10767# define alloca _alloca
10768# else
10769# ifdef HAVE_ALLOCA_H
10770# include <alloca.h>
10771# else
10772# ifdef _AIX
10773 #pragma alloca
10774# else
10775# ifndef alloca /* predefined by HP cc +Olibcalls */
10776char *alloca ();
10777# endif
10778# endif
10779# endif
10780# endif
5929fbe7 10781#endif
8c5ff6dd 10782
5929fbe7
GM
10783int
10784main ()
10785{
eb697db5
DN
10786char *p = (char *) alloca (1);
10787 if (p) return 0;
5929fbe7
GM
10788 ;
10789 return 0;
10790}
8c5ff6dd 10791_ACEOF
eb697db5
DN
10792if ac_fn_c_try_link "$LINENO"; then :
10793 ac_cv_func_alloca_works=yes
5929fbe7 10794else
eb697db5 10795 ac_cv_func_alloca_works=no
8c5ff6dd 10796fi
eb697db5
DN
10797rm -f core conftest.err conftest.$ac_objext \
10798 conftest$ac_exeext conftest.$ac_ext
5929fbe7 10799fi
eb697db5
DN
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10801$as_echo "$ac_cv_func_alloca_works" >&6; }
10802
10803if test $ac_cv_func_alloca_works = yes; then
10804
10805$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10806
8c5ff6dd 10807else
eb697db5
DN
10808 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10809# that cause trouble. Some versions do not even contain alloca or
10810# contain a buggy version. If you still want to use their alloca,
10811# use ar to extract alloca.o from them instead of compiling alloca.c.
10812
10813ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10814
10815$as_echo "#define C_ALLOCA 1" >>confdefs.h
10816
10817
10818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10819$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10820if test "${ac_cv_os_cray+set}" = set; then :
5929fbe7 10821 $as_echo_n "(cached) " >&6
8c5ff6dd 10822else
eb697db5 10823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10824/* end confdefs.h. */
eb697db5
DN
10825#if defined CRAY && ! defined CRAY2
10826webecray
8c5ff6dd 10827#else
eb697db5 10828wenotbecray
8c5ff6dd
KR
10829#endif
10830
eb697db5
DN
10831_ACEOF
10832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10833 $EGREP "webecray" >/dev/null 2>&1; then :
10834 ac_cv_os_cray=yes
10835else
10836 ac_cv_os_cray=no
10837fi
10838rm -f conftest*
8c5ff6dd 10839
eb697db5
DN
10840fi
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10842$as_echo "$ac_cv_os_cray" >&6; }
10843if test $ac_cv_os_cray = yes; then
10844 for ac_func in _getb67 GETB67 getb67; do
10845 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10846ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
3d608a86
J
10847eval as_val=\$$as_ac_var
10848 if test "x$as_val" = x""yes; then :
15e12598 10849
eb697db5
DN
10850cat >>confdefs.h <<_ACEOF
10851#define CRAY_STACKSEG_END $ac_func
5929fbe7 10852_ACEOF
15e12598 10853
eb697db5 10854 break
5929fbe7 10855fi
15e12598 10856
eb697db5 10857 done
5929fbe7 10858fi
eb697db5
DN
10859
10860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10861$as_echo_n "checking stack direction for C alloca... " >&6; }
10862if test "${ac_cv_c_stack_direction+set}" = set; then :
5929fbe7
GM
10863 $as_echo_n "(cached) " >&6
10864else
eb697db5
DN
10865 if test "$cross_compiling" = yes; then :
10866 ac_cv_c_stack_direction=0
10867else
10868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10869/* end confdefs.h. */
eb697db5
DN
10870$ac_includes_default
10871int
10872find_stack_direction ()
10873{
10874 static char *addr = 0;
10875 auto char dummy;
10876 if (addr == 0)
10877 {
10878 addr = &dummy;
10879 return find_stack_direction ();
10880 }
10881 else
10882 return (&dummy > addr) ? 1 : -1;
10883}
15e12598 10884
5929fbe7
GM
10885int
10886main ()
a4f64981 10887{
eb697db5 10888 return find_stack_direction () < 0;
7186fb09 10889}
5929fbe7 10890_ACEOF
eb697db5
DN
10891if ac_fn_c_try_run "$LINENO"; then :
10892 ac_cv_c_stack_direction=1
5929fbe7 10893else
eb697db5
DN
10894 ac_cv_c_stack_direction=-1
10895fi
10896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10897 conftest.$ac_objext conftest.beam conftest.$ac_ext
10898fi
49ebbd65 10899
5929fbe7 10900fi
eb697db5
DN
10901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10902$as_echo "$ac_cv_c_stack_direction" >&6; }
10903cat >>confdefs.h <<_ACEOF
10904#define STACK_DIRECTION $ac_cv_c_stack_direction
10905_ACEOF
10906
15e12598 10907
5929fbe7 10908fi
eb697db5
DN
10909
10910
10911if test x"$ac_cv_func_alloca_works" != xyes; then
3d608a86 10912 as_fn_error "a system implementation of alloca is required " "$LINENO" 5
eb697db5
DN
10913fi
10914
10915# fmod, logb, and frexp are found in -lm on most systems.
10916# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
10918$as_echo_n "checking for sqrt in -lm... " >&6; }
10919if test "${ac_cv_lib_m_sqrt+set}" = set; then :
5929fbe7
GM
10920 $as_echo_n "(cached) " >&6
10921else
10922 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10923LIBS="-lm $LIBS"
10924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10925/* end confdefs.h. */
e6df49e4 10926
5929fbe7
GM
10927/* Override any GCC internal prototype to avoid an error.
10928 Use char because int might match the return type of a GCC
10929 builtin and then its argument prototype would still apply. */
10930#ifdef __cplusplus
10931extern "C"
10932#endif
eb697db5 10933char sqrt ();
a4f64981
GM
10934int
10935main ()
10936{
eb697db5 10937return sqrt ();
5929fbe7
GM
10938 ;
10939 return 0;
a4f64981 10940}
e6df49e4 10941_ACEOF
eb697db5
DN
10942if ac_fn_c_try_link "$LINENO"; then :
10943 ac_cv_lib_m_sqrt=yes
a4f64981 10944else
eb697db5 10945 ac_cv_lib_m_sqrt=no
8c5ff6dd 10946fi
eb697db5
DN
10947rm -f core conftest.err conftest.$ac_objext \
10948 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
10949LIBS=$ac_check_lib_save_LIBS
10950fi
eb697db5
DN
10951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
10952$as_echo "$ac_cv_lib_m_sqrt" >&6; }
10953if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
10954 cat >>confdefs.h <<_ACEOF
10955#define HAVE_LIBM 1
10956_ACEOF
15e12598 10957
eb697db5 10958 LIBS="-lm $LIBS"
8c5ff6dd 10959
5929fbe7 10960fi
8c5ff6dd 10961
8c5ff6dd 10962
eb697db5
DN
10963# Check for mail-locking functions in a "mail" library. Probably this should
10964# have the same check as for liblockfile below.
10965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
10966$as_echo_n "checking for maillock in -lmail... " >&6; }
10967if test "${ac_cv_lib_mail_maillock+set}" = set; then :
5929fbe7
GM
10968 $as_echo_n "(cached) " >&6
10969else
eb697db5
DN
10970 ac_check_lib_save_LIBS=$LIBS
10971LIBS="-lmail $LIBS"
10972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10973/* end confdefs.h. */
15e12598 10974
5929fbe7
GM
10975/* Override any GCC internal prototype to avoid an error.
10976 Use char because int might match the return type of a GCC
10977 builtin and then its argument prototype would still apply. */
10978#ifdef __cplusplus
10979extern "C"
10980#endif
eb697db5 10981char maillock ();
5929fbe7
GM
10982int
10983main ()
10984{
eb697db5 10985return maillock ();
5929fbe7
GM
10986 ;
10987 return 0;
10988}
a4f64981 10989_ACEOF
eb697db5
DN
10990if ac_fn_c_try_link "$LINENO"; then :
10991 ac_cv_lib_mail_maillock=yes
5929fbe7 10992else
eb697db5 10993 ac_cv_lib_mail_maillock=no
8c5ff6dd 10994fi
eb697db5
DN
10995rm -f core conftest.err conftest.$ac_objext \
10996 conftest$ac_exeext conftest.$ac_ext
10997LIBS=$ac_check_lib_save_LIBS
5929fbe7 10998fi
eb697db5
DN
10999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
11000$as_echo "$ac_cv_lib_mail_maillock" >&6; }
11001if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
11002 have_mail=yes
5929fbe7 11003else
eb697db5
DN
11004 have_mail=no
11005fi
11006
11007if test $have_mail = yes; then
11008 LIBS_MAIL=-lmail
11009 LIBS="$LIBS_MAIL $LIBS"
11010
11011$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
11012
11013else
11014 LIBS_MAIL=
11015fi
11016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
11017$as_echo_n "checking for maillock in -llockfile... " >&6; }
11018if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
e9a63f04 11019 $as_echo_n "(cached) " >&6
98418dba 11020else
0ca10bb7 11021 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11022LIBS="-llockfile $LIBS"
11023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11024/* end confdefs.h. */
ca81d7a0 11025
0ca10bb7
RC
11026/* Override any GCC internal prototype to avoid an error.
11027 Use char because int might match the return type of a GCC
11028 builtin and then its argument prototype would still apply. */
11029#ifdef __cplusplus
11030extern "C"
11031#endif
eb697db5 11032char maillock ();
0ca10bb7
RC
11033int
11034main ()
11035{
eb697db5 11036return maillock ();
0ca10bb7
RC
11037 ;
11038 return 0;
11039}
503d2be0 11040_ACEOF
eb697db5
DN
11041if ac_fn_c_try_link "$LINENO"; then :
11042 ac_cv_lib_lockfile_maillock=yes
503d2be0 11043else
eb697db5 11044 ac_cv_lib_lockfile_maillock=no
a21616bd 11045fi
eb697db5
DN
11046rm -f core conftest.err conftest.$ac_objext \
11047 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11048LIBS=$ac_check_lib_save_LIBS
11049fi
eb697db5
DN
11050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
11051$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
11052if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
11053 have_lockfile=yes
5929fbe7 11054else
eb697db5
DN
11055 have_lockfile=no
11056fi
11057
11058if test $have_lockfile = yes; then
11059 LIBS_MAIL=-llockfile
11060 LIBS="$LIBS_MAIL $LIBS"
11061
11062$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
11063
11064else
11065# If we have the shared liblockfile, assume we must use it for mail
11066# locking (e.g. Debian). If we couldn't link against liblockfile
11067# (no liblockfile.a installed), ensure that we don't need to.
11068 # Extract the first word of "liblockfile.so", so it can be a program name with args.
11069set dummy liblockfile.so; ac_word=$2
11070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11071$as_echo_n "checking for $ac_word... " >&6; }
11072if test "${ac_cv_prog_liblockfile+set}" = set; then :
11073 $as_echo_n "(cached) " >&6
11074else
11075 if test -n "$liblockfile"; then
11076 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
11077else
11078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11079as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
11080for as_dir in $as_dummy
11081do
11082 IFS=$as_save_IFS
11083 test -z "$as_dir" && as_dir=.
11084 for ac_exec_ext in '' $ac_executable_extensions; do
11085 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11086 ac_cv_prog_liblockfile="yes"
11087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11088 break 2
11089 fi
11090done
11091 done
11092IFS=$as_save_IFS
11093
11094 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
11095fi
11096fi
11097liblockfile=$ac_cv_prog_liblockfile
11098if test -n "$liblockfile"; then
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
11100$as_echo "$liblockfile" >&6; }
11101else
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11103$as_echo "no" >&6; }
11104fi
11105
11106
11107 if test $ac_cv_prog_liblockfile = yes; then
3d608a86 11108 as_fn_error "Shared liblockfile found but can't link against it.
eb697db5
DN
11109This probably means that movemail could lose mail.
11110There may be a \`development' package to install containing liblockfile." "$LINENO" 5
11111 fi
11112fi
11113for ac_func in touchlock
11114do :
11115 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
11116if test "x$ac_cv_func_touchlock" = x""yes; then :
11117 cat >>confdefs.h <<_ACEOF
11118#define HAVE_TOUCHLOCK 1
11119_ACEOF
11120
11121fi
11122done
11123
11124for ac_header in maillock.h
11125do :
11126 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
11127if test "x$ac_cv_header_maillock_h" = x""yes; then :
11128 cat >>confdefs.h <<_ACEOF
11129#define HAVE_MAILLOCK_H 1
11130_ACEOF
11131
11132fi
11133
11134done
11135
11136
11137
11138## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
11139## interlock access to the mail spool. The alternative is a lock file named
11140## /usr/spool/mail/$USER.lock.
11141mail_lock=no
11142case "$opsys" in
11143 aix4-2) mail_lock="lockf" ;;
11144
11145 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
11146
11147 ## On GNU/Linux systems, both methods are used by various mail programs.
11148 ## I assume most people are using newer mailers that have heard of flock.
11149 ## Change this if you need to.
11150 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
11151 ## configure gets the right answers, and that means *NOT* using flock.
11152 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
11153 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
11154 ## Debian maintainer hasn't provided a clean fix for Emacs.
11155 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
11156 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
11157 ## correct logic. -- fx
11158 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
11159 ## liblockfile is a Free Software replacement for libmail, used on
11160 ## Debian systems and elsewhere. -rfr.
11161 gnu-*)
11162 mail_lock="flock"
11163 if test $have_mail = yes || test $have_lockfile = yes; then
11164 test $ac_cv_header_maillock_h = yes && mail_lock=no
11165 fi
11166 ;;
11167esac
11168
11169BLESSMAIL_TARGET=
11170case "$mail_lock" in
11171 flock)
11172$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
11173 ;;
11174
11175 lockf)
11176$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
11177 ;;
11178
11179 *) BLESSMAIL_TARGET="need-blessmail" ;;
11180esac
11181
11182
11183
11184for ac_func in gethostname getdomainname dup2 \
11185rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
72af86bd 11186random lrand48 logb frexp fmod rint cbrt ftime setsid \
eb697db5
DN
11187strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11188utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
8966b757 11189__fpending mblen mbrlen mbsinit strsignal setitimer ualarm strchr strrchr \
eb697db5 11190sendto recvfrom getsockopt setsockopt getsockname getpeername \
72af86bd 11191gai_strerror mkstemp getline getdelim mremap memmove fsync sync \
eb697db5 11192memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
dcc19aac 11193cfmakeraw cfsetspeed isnan copysign __executable_start
eb697db5
DN
11194do :
11195 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11196ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
3d608a86
J
11197eval as_val=\$$as_ac_var
11198 if test "x$as_val" = x""yes; then :
eb697db5
DN
11199 cat >>confdefs.h <<_ACEOF
11200#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11201_ACEOF
11202
11203fi
11204done
11205
11206
11207for ac_header in sys/un.h
11208do :
11209 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
11210if test "x$ac_cv_header_sys_un_h" = x""yes; then :
11211 cat >>confdefs.h <<_ACEOF
11212#define HAVE_SYS_UN_H 1
11213_ACEOF
11214
11215fi
11216
11217done
11218
11219
11220
11221
11222
11223
11224
11225 for ac_func in $ac_func_list
11226do :
11227 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11228ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
3d608a86
J
11229eval as_val=\$$as_ac_var
11230 if test "x$as_val" = x""yes; then :
eb697db5
DN
11231 cat >>confdefs.h <<_ACEOF
11232#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11233_ACEOF
11234
5929fbe7 11235fi
eb697db5
DN
11236done
11237
11238
11239
11240
11241
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
11243$as_echo_n "checking for working mktime... " >&6; }
11244if test "${ac_cv_func_working_mktime+set}" = set; then :
11245 $as_echo_n "(cached) " >&6
11246else
11247 if test "$cross_compiling" = yes; then :
11248 ac_cv_func_working_mktime=no
11249else
11250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11251/* end confdefs.h. */
11252/* Test program from Paul Eggert and Tony Leneis. */
11253#ifdef TIME_WITH_SYS_TIME
11254# include <sys/time.h>
11255# include <time.h>
11256#else
11257# ifdef HAVE_SYS_TIME_H
11258# include <sys/time.h>
11259# else
11260# include <time.h>
11261# endif
11262#endif
11263
11264#include <limits.h>
11265#include <stdlib.h>
11266
11267#ifdef HAVE_UNISTD_H
11268# include <unistd.h>
11269#endif
11270
11271#ifndef HAVE_ALARM
11272# define alarm(X) /* empty */
11273#endif
11274
11275/* Work around redefinition to rpl_putenv by other config tests. */
11276#undef putenv
11277
11278static time_t time_t_max;
11279static time_t time_t_min;
11280
11281/* Values we'll use to set the TZ environment variable. */
3d608a86
J
11282static char *tz_strings[] = {
11283 (char *) 0, "TZ=GMT0", "TZ=JST-9",
eb697db5
DN
11284 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11285};
11286#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5929fbe7 11287
eb697db5
DN
11288/* Return 0 if mktime fails to convert a date in the spring-forward gap.
11289 Based on a problem report from Andreas Jaeger. */
11290static int
11291spring_forward_gap ()
11292{
11293 /* glibc (up to about 1998-10-07) failed this test. */
11294 struct tm tm;
5929fbe7 11295
eb697db5
DN
11296 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11297 instead of "TZ=America/Vancouver" in order to detect the bug even
11298 on systems that don't support the Olson extension, or don't have the
11299 full zoneinfo tables installed. */
3d608a86 11300 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
5929fbe7 11301
eb697db5
DN
11302 tm.tm_year = 98;
11303 tm.tm_mon = 3;
11304 tm.tm_mday = 5;
11305 tm.tm_hour = 2;
11306 tm.tm_min = 0;
11307 tm.tm_sec = 0;
11308 tm.tm_isdst = -1;
11309 return mktime (&tm) != (time_t) -1;
11310}
5929fbe7 11311
eb697db5 11312static int
3d608a86
J
11313mktime_test1 (now)
11314 time_t now;
eb697db5
DN
11315{
11316 struct tm *lt;
11317 return ! (lt = localtime (&now)) || mktime (lt) == now;
11318}
e6df49e4 11319
eb697db5 11320static int
3d608a86
J
11321mktime_test (now)
11322 time_t now;
eb697db5
DN
11323{
11324 return (mktime_test1 (now)
11325 && mktime_test1 ((time_t) (time_t_max - now))
11326 && mktime_test1 ((time_t) (time_t_min + now)));
11327}
5929fbe7 11328
eb697db5
DN
11329static int
11330irix_6_4_bug ()
11331{
11332 /* Based on code from Ariel Faigon. */
11333 struct tm tm;
11334 tm.tm_year = 96;
11335 tm.tm_mon = 3;
11336 tm.tm_mday = 0;
11337 tm.tm_hour = 0;
11338 tm.tm_min = 0;
11339 tm.tm_sec = 0;
11340 tm.tm_isdst = -1;
11341 mktime (&tm);
11342 return tm.tm_mon == 2 && tm.tm_mday == 31;
11343}
5929fbe7 11344
eb697db5 11345static int
3d608a86
J
11346bigtime_test (j)
11347 int j;
eb697db5
DN
11348{
11349 struct tm tm;
11350 time_t now;
11351 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11352 now = mktime (&tm);
11353 if (now != (time_t) -1)
11354 {
11355 struct tm *lt = localtime (&now);
11356 if (! (lt
11357 && lt->tm_year == tm.tm_year
11358 && lt->tm_mon == tm.tm_mon
11359 && lt->tm_mday == tm.tm_mday
11360 && lt->tm_hour == tm.tm_hour
11361 && lt->tm_min == tm.tm_min
11362 && lt->tm_sec == tm.tm_sec
11363 && lt->tm_yday == tm.tm_yday
11364 && lt->tm_wday == tm.tm_wday
11365 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11366 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11367 return 0;
11368 }
11369 return 1;
11370}
5929fbe7 11371
eb697db5
DN
11372static int
11373year_2050_test ()
11374{
11375 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
11376 ignoring leap seconds. */
11377 unsigned long int answer = 2527315200UL;
15e12598 11378
eb697db5
DN
11379 struct tm tm;
11380 time_t t;
11381 tm.tm_year = 2050 - 1900;
11382 tm.tm_mon = 2 - 1;
11383 tm.tm_mday = 1;
11384 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
11385 tm.tm_isdst = -1;
a4f64981 11386
eb697db5
DN
11387 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11388 instead of "TZ=America/Vancouver" in order to detect the bug even
11389 on systems that don't support the Olson extension, or don't have the
11390 full zoneinfo tables installed. */
3d608a86 11391 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8c5ff6dd 11392
eb697db5 11393 t = mktime (&tm);
5929fbe7 11394
eb697db5
DN
11395 /* Check that the result is either a failure, or close enough
11396 to the correct answer that we can assume the discrepancy is
11397 due to leap seconds. */
11398 return (t == (time_t) -1
11399 || (0 < t && answer - 120 <= t && t <= answer + 120));
11400}
21287a21
CY
11401
11402int
11403main ()
11404{
eb697db5
DN
11405 time_t t, delta;
11406 int i, j;
5929fbe7 11407
eb697db5
DN
11408 /* This test makes some buggy mktime implementations loop.
11409 Give up after 60 seconds; a mktime slower than that
11410 isn't worth using anyway. */
11411 alarm (60);
bf89cb4d 11412
eb697db5
DN
11413 for (;;)
11414 {
11415 t = (time_t_max << 1) + 1;
11416 if (t <= time_t_max)
11417 break;
11418 time_t_max = t;
11419 }
11420 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
5929fbe7 11421
eb697db5
DN
11422 delta = time_t_max / 997; /* a suitable prime number */
11423 for (i = 0; i < N_STRINGS; i++)
11424 {
11425 if (tz_strings[i])
3d608a86 11426 putenv (tz_strings[i]);
5929fbe7 11427
eb697db5
DN
11428 for (t = 0; t <= time_t_max - delta; t += delta)
11429 if (! mktime_test (t))
11430 return 1;
11431 if (! (mktime_test ((time_t) 1)
11432 && mktime_test ((time_t) (60 * 60))
11433 && mktime_test ((time_t) (60 * 60 * 24))))
11434 return 1;
21287a21 11435
eb697db5
DN
11436 for (j = 1; ; j <<= 1)
11437 if (! bigtime_test (j))
11438 return 1;
11439 else if (INT_MAX / 2 < j)
11440 break;
11441 if (! bigtime_test (INT_MAX))
11442 return 1;
11443 }
11444 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
9452ded1
DN
11445}
11446_ACEOF
eb697db5
DN
11447if ac_fn_c_try_run "$LINENO"; then :
11448 ac_cv_func_working_mktime=yes
21287a21 11449else
eb697db5
DN
11450 ac_cv_func_working_mktime=no
11451fi
11452rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11453 conftest.$ac_objext conftest.beam conftest.$ac_ext
11454fi
11455
11456fi
11457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
11458$as_echo "$ac_cv_func_working_mktime" >&6; }
11459if test $ac_cv_func_working_mktime = no; then
11460 case " $LIBOBJS " in
11461 *" mktime.$ac_objext "* ) ;;
11462 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
11463 ;;
11464esac
11465
11466fi
11467
11468if test "$ac_cv_func_working_mktime" = no; then
5929fbe7 11469
eb697db5 11470$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
5929fbe7 11471
21287a21 11472fi
eb697db5
DN
11473
11474ac_have_func=no # yes means we've found a way to get the load average.
11475
11476# Make sure getloadavg.c is where it belongs, at configure-time.
11477test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
3d608a86 11478 as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
eb697db5
DN
11479
11480ac_save_LIBS=$LIBS
11481
11482# Check for getloadavg, but be sure not to touch the cache variable.
11483(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11484if test "x$ac_cv_func_getloadavg" = x""yes; then :
11485 exit 0
5929fbe7 11486else
eb697db5 11487 exit 1
21287a21 11488fi
eb697db5 11489) && ac_have_func=yes
21287a21 11490
eb697db5
DN
11491# On HPUX9, an unprivileged user can get load averages through this function.
11492for ac_func in pstat_getdynamic
11493do :
11494 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
11495if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
11496 cat >>confdefs.h <<_ACEOF
11497#define HAVE_PSTAT_GETDYNAMIC 1
5929fbe7
GM
11498_ACEOF
11499
eb697db5
DN
11500fi
11501done
11502
11503
11504# Solaris has libkstat which does not require root.
11505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
11506$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
11507if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
e9a63f04 11508 $as_echo_n "(cached) " >&6
21287a21 11509else
0ca10bb7 11510 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11511LIBS="-lkstat $LIBS"
11512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11513/* end confdefs.h. */
21287a21 11514
0ca10bb7
RC
11515/* Override any GCC internal prototype to avoid an error.
11516 Use char because int might match the return type of a GCC
11517 builtin and then its argument prototype would still apply. */
11518#ifdef __cplusplus
11519extern "C"
15e12598 11520#endif
eb697db5 11521char kstat_open ();
15e12598
VB
11522int
11523main ()
11524{
eb697db5 11525return kstat_open ();
15e12598
VB
11526 ;
11527 return 0;
11528}
11529_ACEOF
eb697db5
DN
11530if ac_fn_c_try_link "$LINENO"; then :
11531 ac_cv_lib_kstat_kstat_open=yes
0ca10bb7 11532else
eb697db5 11533 ac_cv_lib_kstat_kstat_open=no
0ca10bb7 11534fi
eb697db5
DN
11535rm -f core conftest.err conftest.$ac_objext \
11536 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
11537LIBS=$ac_check_lib_save_LIBS
11538fi
eb697db5
DN
11539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
11540$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
11541if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
11542 cat >>confdefs.h <<_ACEOF
11543#define HAVE_LIBKSTAT 1
11544_ACEOF
6da23aaa 11545
eb697db5 11546 LIBS="-lkstat $LIBS"
a4f64981 11547
eb697db5 11548fi
5929fbe7 11549
eb697db5
DN
11550test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
11551
11552# Some systems with -lutil have (and need) -lkvm as well, some do not.
11553# On Solaris, -lkvm requires nlist from -lelf, so check that first
11554# to get the right answer into the cache.
11555# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11556if test $ac_have_func = no; then
11557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
11558$as_echo_n "checking for elf_begin in -lelf... " >&6; }
11559if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
0ca10bb7
RC
11560 $as_echo_n "(cached) " >&6
11561else
11562 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11563LIBS="-lelf $LIBS"
11564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11565/* end confdefs.h. */
21287a21 11566
0ca10bb7
RC
11567/* Override any GCC internal prototype to avoid an error.
11568 Use char because int might match the return type of a GCC
11569 builtin and then its argument prototype would still apply. */
11570#ifdef __cplusplus
11571extern "C"
11572#endif
eb697db5 11573char elf_begin ();
21287a21
CY
11574int
11575main ()
11576{
eb697db5 11577return elf_begin ();
21287a21
CY
11578 ;
11579 return 0;
11580}
11581_ACEOF
eb697db5
DN
11582if ac_fn_c_try_link "$LINENO"; then :
11583 ac_cv_lib_elf_elf_begin=yes
bf89cb4d 11584else
eb697db5 11585 ac_cv_lib_elf_elf_begin=no
0c309b80 11586fi
eb697db5
DN
11587rm -f core conftest.err conftest.$ac_objext \
11588 conftest$ac_exeext conftest.$ac_ext
7186fb09 11589LIBS=$ac_check_lib_save_LIBS
9452ded1 11590fi
eb697db5
DN
11591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
11592$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
11593if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
11594 LIBS="-lelf $LIBS"
8c5ff6dd
KR
11595fi
11596
eb697db5
DN
11597fi
11598if test $ac_have_func = no; then
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
11600$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
11601if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
7186fb09
GM
11602 $as_echo_n "(cached) " >&6
11603else
aaa36002 11604 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11605LIBS="-lkvm $LIBS"
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11607/* end confdefs.h. */
7186fb09 11608
aaa36002
DN
11609/* Override any GCC internal prototype to avoid an error.
11610 Use char because int might match the return type of a GCC
11611 builtin and then its argument prototype would still apply. */
11612#ifdef __cplusplus
11613extern "C"
11614#endif
eb697db5 11615char kvm_open ();
8732a4e9
MB
11616int
11617main ()
11618{
eb697db5 11619return kvm_open ();
0c309b80
GM
11620 ;
11621 return 0;
11622}
11623_ACEOF
eb697db5
DN
11624if ac_fn_c_try_link "$LINENO"; then :
11625 ac_cv_lib_kvm_kvm_open=yes
7186fb09 11626else
eb697db5 11627 ac_cv_lib_kvm_kvm_open=no
cd03c74a 11628fi
eb697db5
DN
11629rm -f core conftest.err conftest.$ac_objext \
11630 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11631LIBS=$ac_check_lib_save_LIBS
a4f64981 11632fi
eb697db5
DN
11633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
11634$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
11635if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
11636 LIBS="-lkvm $LIBS"
8c5ff6dd 11637fi
8c5ff6dd 11638
eb697db5
DN
11639 # Check for the 4.4BSD definition of getloadavg.
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
11641$as_echo_n "checking for getloadavg in -lutil... " >&6; }
11642if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
5929fbe7 11643 $as_echo_n "(cached) " >&6
8c5ff6dd 11644else
5929fbe7 11645 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11646LIBS="-lutil $LIBS"
11647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11648/* end confdefs.h. */
8c5ff6dd 11649
5929fbe7
GM
11650/* Override any GCC internal prototype to avoid an error.
11651 Use char because int might match the return type of a GCC
11652 builtin and then its argument prototype would still apply. */
11653#ifdef __cplusplus
11654extern "C"
11655#endif
eb697db5 11656char getloadavg ();
5929fbe7
GM
11657int
11658main ()
11659{
eb697db5 11660return getloadavg ();
5929fbe7
GM
11661 ;
11662 return 0;
11663}
11664_ACEOF
eb697db5
DN
11665if ac_fn_c_try_link "$LINENO"; then :
11666 ac_cv_lib_util_getloadavg=yes
49ebbd65 11667else
eb697db5 11668 ac_cv_lib_util_getloadavg=no
8c5ff6dd 11669fi
eb697db5
DN
11670rm -f core conftest.err conftest.$ac_objext \
11671 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11672LIBS=$ac_check_lib_save_LIBS
8c5ff6dd 11673fi
eb697db5
DN
11674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
11675$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
11676if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
11677 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8c5ff6dd 11678fi
8c5ff6dd 11679
eb697db5 11680fi
8c5ff6dd 11681
eb697db5
DN
11682if test $ac_have_func = no; then
11683 # There is a commonly available library for RS/6000 AIX.
11684 # Since it is not a standard part of AIX, it might be installed locally.
11685 ac_getloadavg_LIBS=$LIBS
11686 LIBS="-L/usr/local/lib $LIBS"
11687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
11688$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
11689if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
8c5ff6dd
KR
11690 $as_echo_n "(cached) " >&6
11691else
5929fbe7 11692 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11693LIBS="-lgetloadavg $LIBS"
11694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 11695/* end confdefs.h. */
5929fbe7
GM
11696
11697/* Override any GCC internal prototype to avoid an error.
11698 Use char because int might match the return type of a GCC
11699 builtin and then its argument prototype would still apply. */
11700#ifdef __cplusplus
11701extern "C"
11702#endif
eb697db5 11703char getloadavg ();
8c5ff6dd
KR
11704int
11705main ()
11706{
eb697db5 11707return getloadavg ();
8c5ff6dd
KR
11708 ;
11709 return 0;
11710}
a4f64981 11711_ACEOF
eb697db5
DN
11712if ac_fn_c_try_link "$LINENO"; then :
11713 ac_cv_lib_getloadavg_getloadavg=yes
5929fbe7 11714else
eb697db5 11715 ac_cv_lib_getloadavg_getloadavg=no
5929fbe7 11716fi
eb697db5
DN
11717rm -f core conftest.err conftest.$ac_objext \
11718 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11719LIBS=$ac_check_lib_save_LIBS
8c5ff6dd 11720fi
eb697db5
DN
11721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
11722$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
11723if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
11724 LIBS="-lgetloadavg $LIBS"
5929fbe7 11725else
eb697db5 11726 LIBS=$ac_getloadavg_LIBS
5929fbe7
GM
11727fi
11728
eb697db5 11729fi
5929fbe7 11730
eb697db5
DN
11731# Make sure it is really in the library, if we think we found it,
11732# otherwise set up the replacement function.
11733for ac_func in getloadavg
11734do :
11735 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11736if test "x$ac_cv_func_getloadavg" = x""yes; then :
11737 cat >>confdefs.h <<_ACEOF
11738#define HAVE_GETLOADAVG 1
5929fbe7
GM
11739_ACEOF
11740
eb697db5
DN
11741else
11742 case " $LIBOBJS " in
11743 *" getloadavg.$ac_objext "* ) ;;
11744 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
11745 ;;
11746esac
11747
11748
11749$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
11750
11751# Figure out what our getloadavg.c needs.
11752ac_have_func=no
11753ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
11754if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
11755 ac_have_func=yes
11756
11757$as_echo "#define DGUX 1" >>confdefs.h
11758
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
11760$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
11761if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
5929fbe7
GM
11762 $as_echo_n "(cached) " >&6
11763else
11764 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11765LIBS="-ldgc $LIBS"
11766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 11767/* end confdefs.h. */
5929fbe7
GM
11768
11769/* Override any GCC internal prototype to avoid an error.
11770 Use char because int might match the return type of a GCC
11771 builtin and then its argument prototype would still apply. */
11772#ifdef __cplusplus
11773extern "C"
11774#endif
eb697db5 11775char dg_sys_info ();
a4f64981
GM
11776int
11777main ()
11778{
eb697db5 11779return dg_sys_info ();
15e12598
VB
11780 ;
11781 return 0;
11782}
e6df49e4 11783_ACEOF
eb697db5
DN
11784if ac_fn_c_try_link "$LINENO"; then :
11785 ac_cv_lib_dgc_dg_sys_info=yes
5929fbe7 11786else
eb697db5 11787 ac_cv_lib_dgc_dg_sys_info=no
49ebbd65 11788fi
eb697db5
DN
11789rm -f core conftest.err conftest.$ac_objext \
11790 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
11791LIBS=$ac_check_lib_save_LIBS
11792fi
eb697db5
DN
11793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
11794$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
11795if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
11796 cat >>confdefs.h <<_ACEOF
11797#define HAVE_LIBDGC 1
11798_ACEOF
11799
11800 LIBS="-ldgc $LIBS"
11801
5929fbe7 11802fi
a5edbe4a 11803
eb697db5 11804fi
49ebbd65
DN
11805
11806
15e12598 11807
eb697db5
DN
11808ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11809if test "x$ac_cv_header_locale_h" = x""yes; then :
a4f64981 11810
5929fbe7 11811fi
eb697db5
DN
11812
11813
11814for ac_func in setlocale
11815do :
11816 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
11817if test "x$ac_cv_func_setlocale" = x""yes; then :
11818 cat >>confdefs.h <<_ACEOF
11819#define HAVE_SETLOCALE 1
5929fbe7 11820_ACEOF
a4f64981 11821
5929fbe7 11822fi
eb697db5 11823done
a4f64981 11824
a4f64981 11825
eb697db5
DN
11826# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
11827# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
11828# Irix 4.0.5F has the header but not the library.
11829if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
11830 ac_have_func=yes
11831
11832$as_echo "#define SVR4 1" >>confdefs.h
cd03c74a 11833
5929fbe7 11834fi
8c5ff6dd 11835
eb697db5
DN
11836if test $ac_have_func = no; then
11837 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
11838if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
11839 ac_have_func=yes
8c5ff6dd 11840
eb697db5
DN
11841$as_echo "#define UMAX 1" >>confdefs.h
11842
11843
11844$as_echo "#define UMAX4_3 1" >>confdefs.h
8c5ff6dd 11845
5929fbe7 11846fi
eb697db5
DN
11847
11848
11849fi
11850
11851if test $ac_have_func = no; then
11852 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
11853if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
11854 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
11855
11856fi
11857
8c5ff6dd 11858
5929fbe7 11859fi
eb697db5
DN
11860
11861if test $ac_have_func = no; then
11862 for ac_header in mach/mach.h
11863do :
11864 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
11865if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
8c5ff6dd 11866 cat >>confdefs.h <<_ACEOF
eb697db5 11867#define HAVE_MACH_MACH_H 1
5929fbe7 11868_ACEOF
e6df49e4 11869
eb697db5
DN
11870fi
11871
11872done
8c5ff6dd 11873
eb697db5
DN
11874fi
11875
11876for ac_header in nlist.h
11877do :
11878 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
11879if test "x$ac_cv_header_nlist_h" = x""yes; then :
11880 cat >>confdefs.h <<_ACEOF
11881#define HAVE_NLIST_H 1
a4f64981 11882_ACEOF
eb697db5
DN
11883 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
11884"
11885if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
cd03c74a 11886
eb697db5
DN
11887cat >>confdefs.h <<_ACEOF
11888#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
5929fbe7 11889_ACEOF
5929fbe7 11890
eb697db5
DN
11891
11892$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
11893
8c5ff6dd 11894fi
49ebbd65 11895
eb697db5 11896
5929fbe7 11897fi
8c5ff6dd 11898
eb697db5
DN
11899done
11900
8c5ff6dd 11901fi
eb697db5 11902done
8c5ff6dd 11903
eb697db5
DN
11904
11905# Some definitions of getloadavg require that the program be installed setgid.
11906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
11907$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
11908if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
11909 $as_echo_n "(cached) " >&6
11910else
11911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11912/* end confdefs.h. */
11913#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
11914#ifdef LDAV_PRIVILEGED
11915Yowza Am I SETGID yet
11916#endif
5929fbe7 11917_ACEOF
eb697db5
DN
11918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11919 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
11920 ac_cv_func_getloadavg_setgid=yes
11921else
11922 ac_cv_func_getloadavg_setgid=no
11923fi
11924rm -f conftest*
11925
11926fi
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
11928$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
11929if test $ac_cv_func_getloadavg_setgid = yes; then
11930 NEED_SETGID=true
8c5ff6dd 11931
eb697db5 11932$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
8c5ff6dd 11933
eb697db5
DN
11934else
11935 NEED_SETGID=false
5929fbe7 11936fi
eb697db5
DN
11937
11938if test $ac_cv_func_getloadavg_setgid = yes; then
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
11940$as_echo_n "checking group of /dev/kmem... " >&6; }
11941if test "${ac_cv_group_kmem+set}" = set; then :
5929fbe7 11942 $as_echo_n "(cached) " >&6
a5edbe4a 11943else
eb697db5
DN
11944 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
11945 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
11946 # If we got an error (system does not support symlinks), try without -L.
11947 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
11948 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
11949 | sed -ne 's/[ ][ ]*/ /g;
11950 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
11951 / /s/.* //;p;'`
11952
11953fi
11954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
11955$as_echo "$ac_cv_group_kmem" >&6; }
11956 KMEM_GROUP=$ac_cv_group_kmem
11957fi
11958if test "x$ac_save_LIBS" = x; then
11959 GETLOADAVG_LIBS=$LIBS
11960else
11961 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
11962fi
11963LIBS=$ac_save_LIBS
11964
11965
5929fbe7 11966
eb697db5
DN
11967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11968$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11969if test "${ac_cv_sys_largefile_source+set}" = set; then :
11970 $as_echo_n "(cached) " >&6
11971else
11972 while :; do
11973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11974/* end confdefs.h. */
11975#include <sys/types.h> /* for off_t */
11976 #include <stdio.h>
8c5ff6dd
KR
11977int
11978main ()
11979{
eb697db5
DN
11980int (*fp) (FILE *, off_t, int) = fseeko;
11981 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5929fbe7
GM
11982 ;
11983 return 0;
11984}
11985_ACEOF
eb697db5
DN
11986if ac_fn_c_try_link "$LINENO"; then :
11987 ac_cv_sys_largefile_source=no; break
11988fi
11989rm -f core conftest.err conftest.$ac_objext \
11990 conftest$ac_exeext conftest.$ac_ext
11991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11992/* end confdefs.h. */
eb697db5
DN
11993#define _LARGEFILE_SOURCE 1
11994#include <sys/types.h> /* for off_t */
11995 #include <stdio.h>
5929fbe7
GM
11996int
11997main ()
11998{
eb697db5
DN
11999int (*fp) (FILE *, off_t, int) = fseeko;
12000 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
8c5ff6dd
KR
12001 ;
12002 return 0;
12003}
08b47d3d 12004_ACEOF
eb697db5
DN
12005if ac_fn_c_try_link "$LINENO"; then :
12006 ac_cv_sys_largefile_source=1; break
12007fi
12008rm -f core conftest.err conftest.$ac_objext \
12009 conftest$ac_exeext conftest.$ac_ext
12010 ac_cv_sys_largefile_source=unknown
12011 break
12012done
12013fi
12014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12015$as_echo "$ac_cv_sys_largefile_source" >&6; }
12016case $ac_cv_sys_largefile_source in #(
12017 no | unknown) ;;
12018 *)
12019cat >>confdefs.h <<_ACEOF
12020#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12021_ACEOF
12022;;
5929fbe7 12023esac
eb697db5 12024rm -rf conftest*
a4f64981 12025
eb697db5
DN
12026# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12027# in glibc 2.1.3, but that breaks too many other things.
12028# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12029if test $ac_cv_sys_largefile_source != unknown; then
49ebbd65 12030
eb697db5 12031$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
e6df49e4 12032
5929fbe7 12033fi
8c5ff6dd
KR
12034
12035
eb697db5
DN
12036# Configure getopt.
12037# getopt.m4 serial 10
8c5ff6dd 12038
eb697db5
DN
12039# The getopt module assume you want GNU getopt, with getopt_long etc,
12040# rather than vanilla POSIX getopt. This means your your code should
12041# always include <getopt.h> for the getopt prototypes.
15e12598 12042
15e12598 12043
a4f64981 12044
8c5ff6dd 12045
5929fbe7 12046
5929fbe7 12047
5929fbe7 12048
e6df49e4 12049
49ebbd65 12050
a4f64981 12051
e6df49e4 12052
eb697db5
DN
12053# Prerequisites of lib/getopt*.
12054
12055
12056
12057
12058 GETOPT_H=
12059 for ac_header in getopt.h
12060do :
12061 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12062if test "x$ac_cv_header_getopt_h" = x""yes; then :
12063 cat >>confdefs.h <<_ACEOF
12064#define HAVE_GETOPT_H 1
12065_ACEOF
12066
5929fbe7 12067else
eb697db5 12068 GETOPT_H=getopt.h
5929fbe7 12069fi
a4f64981 12070
eb697db5
DN
12071done
12072
12073 if test -z "$GETOPT_H"; then
12074 for ac_func in getopt_long_only
12075do :
12076 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12077if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
8c5ff6dd 12078 cat >>confdefs.h <<_ACEOF
eb697db5 12079#define HAVE_GETOPT_LONG_ONLY 1
8c5ff6dd 12080_ACEOF
e6df49e4 12081
8c5ff6dd 12082else
eb697db5
DN
12083 GETOPT_H=getopt.h
12084fi
12085done
5929fbe7 12086
eb697db5
DN
12087 fi
12088
12089 if test -z "$GETOPT_H"; then
12090 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
12091"
12092if test "x$ac_cv_have_decl_optreset" = x""yes; then :
12093 GETOPT_H=getopt.h
12094fi
12095
12096 fi
12097
12098 if test -z "$GETOPT_H"; then
12099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12100$as_echo_n "checking for working GNU getopt function... " >&6; }
12101if test "${gl_cv_func_gnu_getopt+set}" = set; then :
a4f64981 12102 $as_echo_n "(cached) " >&6
eb697db5
DN
12103else
12104 if test "$cross_compiling" = yes; then :
12105 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
12106"
12107if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
12108 gl_cv_func_gnu_getopt=no
12109else
12110 gl_cv_func_gnu_getopt=yes
5929fbe7 12111fi
eb697db5 12112
a4f64981 12113else
eb697db5 12114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12115/* end confdefs.h. */
eb697db5
DN
12116#include <getopt.h>
12117int
12118main ()
12119{
12120
12121 char *myargv[3];
12122 myargv[0] = "conftest";
12123 myargv[1] = "-+";
12124 myargv[2] = 0;
12125 return getopt (2, myargv, "+a") != '?';
12126
12127 ;
12128 return 0;
12129}
5929fbe7 12130_ACEOF
eb697db5
DN
12131if ac_fn_c_try_run "$LINENO"; then :
12132 gl_cv_func_gnu_getopt=yes
5929fbe7 12133else
eb697db5
DN
12134 gl_cv_func_gnu_getopt=no
12135fi
12136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12137 conftest.$ac_objext conftest.beam conftest.$ac_ext
12138fi
8c5ff6dd 12139
5929fbe7 12140fi
eb697db5
DN
12141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
12142$as_echo "$gl_cv_func_gnu_getopt" >&6; }
12143 if test "$gl_cv_func_gnu_getopt" = "no"; then
12144 GETOPT_H=getopt.h
12145 fi
12146 fi
5929fbe7 12147
5929fbe7 12148
a4f64981 12149
eb697db5 12150 if test -n "$GETOPT_H"; then :
8c5ff6dd
KR
12151
12152
eb697db5 12153 GETOPT_H=getopt.h
a5edbe4a 12154
eb697db5 12155$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
15e12598 12156
49ebbd65 12157
15e12598 12158
eb697db5
DN
12159 :
12160 GETOPTOBJS='getopt.o getopt1.o'
a4f64981 12161
8c5ff6dd 12162fi
e6df49e4 12163
e6df49e4 12164
eb697db5
DN
12165
12166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
12167$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
12168if test "${ac_cv_func_getpgrp_void+set}" = set; then :
12169 $as_echo_n "(cached) " >&6
12170else
12171 # Use it with a single arg.
12172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12173/* end confdefs.h. */
eb697db5
DN
12174$ac_includes_default
12175int
12176main ()
12177{
12178getpgrp (0);
12179 ;
12180 return 0;
12181}
12182_ACEOF
12183if ac_fn_c_try_compile "$LINENO"; then :
12184 ac_cv_func_getpgrp_void=no
5929fbe7 12185else
eb697db5
DN
12186 ac_cv_func_getpgrp_void=yes
12187fi
12188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 12189
5929fbe7 12190fi
eb697db5
DN
12191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
12192$as_echo "$ac_cv_func_getpgrp_void" >&6; }
12193if test $ac_cv_func_getpgrp_void = yes; then
8c5ff6dd 12194
eb697db5 12195$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
a4f64981 12196
eb697db5 12197fi
8c5ff6dd 12198
eb697db5
DN
12199
12200for ac_func in strftime
12201do :
12202 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
12203if test "x$ac_cv_func_strftime" = x""yes; then :
12204 cat >>confdefs.h <<_ACEOF
12205#define HAVE_STRFTIME 1
12206_ACEOF
12207
12208else
12209 # strftime is in -lintl on SCO UNIX.
12210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
12211$as_echo_n "checking for strftime in -lintl... " >&6; }
12212if test "${ac_cv_lib_intl_strftime+set}" = set; then :
a4f64981
GM
12213 $as_echo_n "(cached) " >&6
12214else
eb697db5
DN
12215 ac_check_lib_save_LIBS=$LIBS
12216LIBS="-lintl $LIBS"
12217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12218/* end confdefs.h. */
12219
12220/* Override any GCC internal prototype to avoid an error.
12221 Use char because int might match the return type of a GCC
12222 builtin and then its argument prototype would still apply. */
12223#ifdef __cplusplus
12224extern "C"
12225#endif
12226char strftime ();
12227int
12228main ()
12229{
12230return strftime ();
12231 ;
12232 return 0;
12233}
12234_ACEOF
12235if ac_fn_c_try_link "$LINENO"; then :
12236 ac_cv_lib_intl_strftime=yes
12237else
12238 ac_cv_lib_intl_strftime=no
12239fi
12240rm -f core conftest.err conftest.$ac_objext \
12241 conftest$ac_exeext conftest.$ac_ext
12242LIBS=$ac_check_lib_save_LIBS
12243fi
12244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
12245$as_echo "$ac_cv_lib_intl_strftime" >&6; }
12246if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
12247 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
12248
12249LIBS="-lintl $LIBS"
5929fbe7 12250fi
e6df49e4 12251
5929fbe7 12252fi
eb697db5
DN
12253done
12254
12255
12256# UNIX98 PTYs.
12257for ac_func in grantpt
12258do :
12259 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
12260if test "x$ac_cv_func_grantpt" = x""yes; then :
5929fbe7 12261 cat >>confdefs.h <<_ACEOF
eb697db5 12262#define HAVE_GRANTPT 1
a4f64981 12263_ACEOF
5929fbe7 12264
a4f64981 12265fi
5929fbe7
GM
12266done
12267
8c5ff6dd 12268
eb697db5
DN
12269# PTY-related GNU extensions.
12270for ac_func in getpt
12271do :
12272 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
12273if test "x$ac_cv_func_getpt" = x""yes; then :
12274 cat >>confdefs.h <<_ACEOF
12275#define HAVE_GETPT 1
12276_ACEOF
8c5ff6dd 12277
5929fbe7 12278fi
5929fbe7 12279done
8c5ff6dd 12280
5929fbe7 12281
eb697db5
DN
12282# Check this now, so that we will NOT find the above functions in ncurses.
12283# That is because we have not set up to link ncurses in lib-src.
12284# It's better to believe a function is not available
12285# than to expect to find it in ncurses.
12286# Also we need tputs and friends to be able to build at all.
12287have_tputs_et_al=true
12288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
12289$as_echo_n "checking for library containing tputs... " >&6; }
12290if test "${ac_cv_search_tputs+set}" = set; then :
5929fbe7 12291 $as_echo_n "(cached) " >&6
5929fbe7 12292else
eb697db5
DN
12293 ac_func_search_save_LIBS=$LIBS
12294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12295/* end confdefs.h. */
eb697db5
DN
12296
12297/* Override any GCC internal prototype to avoid an error.
12298 Use char because int might match the return type of a GCC
12299 builtin and then its argument prototype would still apply. */
12300#ifdef __cplusplus
12301extern "C"
12302#endif
12303char tputs ();
12304int
12305main ()
12306{
12307return tputs ();
12308 ;
12309 return 0;
12310}
5929fbe7 12311_ACEOF
eb697db5
DN
12312for ac_lib in '' ncurses terminfo termcap; do
12313 if test -z "$ac_lib"; then
12314 ac_res="none required"
12315 else
12316 ac_res=-l$ac_lib
12317 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12318 fi
12319 if ac_fn_c_try_link "$LINENO"; then :
12320 ac_cv_search_tputs=$ac_res
12321fi
12322rm -f core conftest.err conftest.$ac_objext \
12323 conftest$ac_exeext
12324 if test "${ac_cv_search_tputs+set}" = set; then :
12325 break
12326fi
12327done
12328if test "${ac_cv_search_tputs+set}" = set; then :
12329
5929fbe7 12330else
eb697db5
DN
12331 ac_cv_search_tputs=no
12332fi
12333rm conftest.$ac_ext
12334LIBS=$ac_func_search_save_LIBS
12335fi
12336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
12337$as_echo "$ac_cv_search_tputs" >&6; }
12338ac_res=$ac_cv_search_tputs
12339if test "$ac_res" != no; then :
12340 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
a4f64981 12341
eb697db5
DN
12342else
12343 have_tputs_et_al=false
5929fbe7 12344fi
8c5ff6dd 12345
eb697db5 12346if test "$have_tputs_et_al" != true; then
3d608a86 12347 as_fn_error "I couldn't find termcap functions (tputs and friends).
eb697db5
DN
12348Maybe some development libraries/packages are missing? Try installing
12349libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
12350fi
12351# Must define this when any termcap library is found.
8c5ff6dd 12352
eb697db5
DN
12353$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
12354
12355## FIXME This was the cpp logic, but I am not sure it is right.
12356## The above test has not necessarily found libncurses.
12357HAVE_LIBNCURSES=yes
12358
12359## Use terminfo instead of termcap?
12360## Note only system files NOT using terminfo are:
12361## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
12362## darwin|gnu without ncurses.
12363TERMINFO=no
12364LIBS_TERMCAP=
12365case "$opsys" in
12366 ## cygwin: Fewer environment variables to go wrong, more terminal types.
12367 ## hpux10-20: Use the system provided termcap(3) library.
12368 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
12369 ## is necessary. Otherwise Emacs dumps core when run -nw.
12370 aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
12371
12372 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
12373 ## The ncurses library has been moved out of the System framework in
12374 ## Mac OS X 10.2. So if configure detects it, set the command-line
12375 ## option to use it.
12376 darwin|gnu*)
12377 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
12378 if test "x$HAVE_LIBNCURSES" = "xyes"; then
12379 TERMINFO=yes
12380 LIBS_TERMCAP="-lncurses"
12381 fi
12382 ;;
12383
12384 freebsd)
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
12386$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
12387 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
12388 $as_echo_n "(cached) " >&6
12389else
12390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12391/* end confdefs.h. */
eb697db5
DN
12392#include <osreldate.h>
12393int
12394main ()
12395{
12396#if __FreeBSD_version < 400000
12397fail;
12398#endif
12399
12400 ;
12401 return 0;
12402}
5929fbe7 12403_ACEOF
eb697db5
DN
12404if ac_fn_c_try_link "$LINENO"; then :
12405 emacs_cv_freebsd_terminfo=yes
5929fbe7 12406else
eb697db5
DN
12407 emacs_cv_freebsd_terminfo=no
12408fi
12409rm -f core conftest.err conftest.$ac_objext \
12410 conftest$ac_exeext conftest.$ac_ext
5929fbe7 12411fi
8c5ff6dd
KR
12412
12413
eb697db5
DN
12414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
12415$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
12416
12417 if test $emacs_cv_freebsd_terminfo = yes; then
12418 TERMINFO=yes
12419 LIBS_TERMCAP="-lncurses"
12420 else
12421 LIBS_TERMCAP="-ltermcap"
12422 fi
5929fbe7 12423 ;;
8c5ff6dd 12424
eb697db5
DN
12425 netbsd)
12426 if test $ac_cv_search_tputs = -lterminfo; then
12427 TERMINFO=yes
12428 LIBS_TERMCAP="-lterminfo"
12429 else
12430 LIBS_TERMCAP="-ltermcap"
12431 fi
5929fbe7 12432 ;;
eb697db5 12433
5929fbe7 12434esac
a4f64981 12435
eb697db5
DN
12436case "$opsys" in
12437 ## hpux: Make sure we get select from libc rather than from libcurses
12438 ## because libcurses on HPUX 10.10 has a broken version of select.
12439 ## We used to use -lc -lcurses, but this may be cleaner.
12440 hpux*) LIBS_TERMCAP="-ltermcap" ;;
a4f64981 12441
eb697db5
DN
12442 openbsd) LIBS_TERMCAP="-lncurses" ;;
12443
12444 ## Must use system termcap, if we use any termcap. It does special things.
12445 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
12446esac
12447
12448TERMCAP_OBJ=tparam.o
12449if test $TERMINFO = yes; then
12450
12451$as_echo "#define TERMINFO 1" >>confdefs.h
8c5ff6dd 12452
5929fbe7 12453
eb697db5
DN
12454 ## Default used to be -ltermcap. Add a case above if need something else.
12455 test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
12456
12457 TERMCAP_OBJ=terminfo.o
8c5ff6dd 12458fi
5929fbe7 12459
5929fbe7 12460
eb697db5
DN
12461
12462
12463# Do we have res_init, for detecting changes in /etc/resolv.conf?
12464resolv=no
12465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12466/* end confdefs.h. */
12467#include <netinet/in.h>
12468#include <arpa/nameser.h>
12469#include <resolv.h>
12470int
12471main ()
12472{
12473return res_init();
12474 ;
12475 return 0;
12476}
5929fbe7 12477_ACEOF
eb697db5
DN
12478if ac_fn_c_try_link "$LINENO"; then :
12479 have_res_init=yes
12480else
12481 have_res_init=no
12482fi
12483rm -f core conftest.err conftest.$ac_objext \
12484 conftest$ac_exeext conftest.$ac_ext
12485if test "$have_res_init" = no; then
12486 OLIBS="$LIBS"
12487 LIBS="$LIBS -lresolv"
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
12489$as_echo_n "checking for res_init with -lresolv... " >&6; }
12490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12491/* end confdefs.h. */
eb697db5
DN
12492#include <netinet/in.h>
12493#include <arpa/nameser.h>
12494#include <resolv.h>
12495int
12496main ()
12497{
12498return res_init();
12499 ;
12500 return 0;
12501}
aaa36002 12502_ACEOF
eb697db5
DN
12503if ac_fn_c_try_link "$LINENO"; then :
12504 have_res_init=yes
7186fb09 12505else
eb697db5
DN
12506 have_res_init=no
12507fi
12508rm -f core conftest.err conftest.$ac_objext \
12509 conftest$ac_exeext conftest.$ac_ext
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
12511$as_echo "$have_res_init" >&6; }
12512 if test "$have_res_init" = yes ; then
12513 resolv=yes
12514 fi
12515 LIBS="$OLIBS"
6da23aaa 12516fi
bf89cb4d 12517
eb697db5 12518if test "$have_res_init" = yes; then
ca81d7a0 12519
eb697db5 12520$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
7186fb09 12521
6da23aaa 12522fi
ca81d7a0 12523
eb697db5
DN
12524# Do we need the Hesiod library to provide the support routines?
12525LIBHESIOD=
12526if test "$with_hesiod" != no ; then
12527 # Don't set $LIBS here -- see comments above. FIXME which comments?
12528 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
12529if test "x$ac_cv_func_res_send" = x""yes; then :
7186fb09 12530
aaa36002 12531else
eb697db5
DN
12532 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
12533if test "x$ac_cv_func___res_send" = x""yes; then :
6da23aaa 12534
eb697db5
DN
12535else
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
12537$as_echo_n "checking for res_send in -lresolv... " >&6; }
12538if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
6da23aaa
EZ
12539 $as_echo_n "(cached) " >&6
12540else
eb697db5
DN
12541 ac_check_lib_save_LIBS=$LIBS
12542LIBS="-lresolv $LIBS"
12543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12544/* end confdefs.h. */
eb697db5
DN
12545
12546/* Override any GCC internal prototype to avoid an error.
12547 Use char because int might match the return type of a GCC
12548 builtin and then its argument prototype would still apply. */
12549#ifdef __cplusplus
12550extern "C"
12551#endif
12552char res_send ();
12553int
12554main ()
12555{
12556return res_send ();
12557 ;
12558 return 0;
12559}
7186fb09 12560_ACEOF
eb697db5
DN
12561if ac_fn_c_try_link "$LINENO"; then :
12562 ac_cv_lib_resolv_res_send=yes
7186fb09 12563else
eb697db5 12564 ac_cv_lib_resolv_res_send=no
8c5ff6dd 12565fi
eb697db5
DN
12566rm -f core conftest.err conftest.$ac_objext \
12567 conftest$ac_exeext conftest.$ac_ext
12568LIBS=$ac_check_lib_save_LIBS
12569fi
12570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
12571$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
12572if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
12573 resolv=yes
12574else
12575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
12576$as_echo_n "checking for __res_send in -lresolv... " >&6; }
12577if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
12578 $as_echo_n "(cached) " >&6
12579else
12580 ac_check_lib_save_LIBS=$LIBS
12581LIBS="-lresolv $LIBS"
12582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12583/* end confdefs.h. */
eb697db5
DN
12584
12585/* Override any GCC internal prototype to avoid an error.
12586 Use char because int might match the return type of a GCC
12587 builtin and then its argument prototype would still apply. */
12588#ifdef __cplusplus
12589extern "C"
12590#endif
12591char __res_send ();
12592int
12593main ()
12594{
12595return __res_send ();
12596 ;
12597 return 0;
12598}
5929fbe7 12599_ACEOF
eb697db5
DN
12600if ac_fn_c_try_link "$LINENO"; then :
12601 ac_cv_lib_resolv___res_send=yes
9452ded1 12602else
eb697db5 12603 ac_cv_lib_resolv___res_send=no
aaa36002 12604fi
eb697db5
DN
12605rm -f core conftest.err conftest.$ac_objext \
12606 conftest$ac_exeext conftest.$ac_ext
12607LIBS=$ac_check_lib_save_LIBS
aaa36002 12608fi
eb697db5
DN
12609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
12610$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
12611if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
12612 resolv=yes
aaa36002 12613fi
7186fb09 12614
9452ded1 12615fi
7186fb09 12616
aaa36002 12617fi
7186fb09 12618
aaa36002 12619fi
7186fb09 12620
eb697db5
DN
12621 if test "$resolv" = yes ; then
12622 RESOLVLIB=-lresolv
12623 else
12624 RESOLVLIB=
aaa36002 12625 fi
eb697db5
DN
12626 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
12627if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
aaa36002 12628
eb697db5
DN
12629else
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
12631$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
12632if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
7186fb09 12633 $as_echo_n "(cached) " >&6
ba4481b5 12634else
eb697db5
DN
12635 ac_check_lib_save_LIBS=$LIBS
12636LIBS="-lhesiod $RESOLVLIB $LIBS"
12637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12638/* end confdefs.h. */
5929fbe7 12639
eb697db5
DN
12640/* Override any GCC internal prototype to avoid an error.
12641 Use char because int might match the return type of a GCC
12642 builtin and then its argument prototype would still apply. */
12643#ifdef __cplusplus
12644extern "C"
12645#endif
12646char hes_getmailhost ();
12647int
12648main ()
12649{
12650return hes_getmailhost ();
12651 ;
12652 return 0;
12653}
5929fbe7 12654_ACEOF
eb697db5
DN
12655if ac_fn_c_try_link "$LINENO"; then :
12656 ac_cv_lib_hesiod_hes_getmailhost=yes
12657else
12658 ac_cv_lib_hesiod_hes_getmailhost=no
e6df49e4 12659fi
eb697db5
DN
12660rm -f core conftest.err conftest.$ac_objext \
12661 conftest$ac_exeext conftest.$ac_ext
12662LIBS=$ac_check_lib_save_LIBS
12663fi
12664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
12665$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
12666if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
12667 hesiod=yes
5929fbe7 12668else
eb697db5 12669 :
8c5ff6dd 12670fi
a5edbe4a 12671
5929fbe7 12672fi
cd03c74a 12673
8732a4e9 12674
eb697db5 12675 if test x"$hesiod" = xyes; then
49ebbd65 12676
eb697db5 12677$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
a5edbe4a 12678
eb697db5
DN
12679 LIBHESIOD=-lhesiod
12680 fi
12681fi
e6df49e4 12682
a4f64981 12683
eb697db5
DN
12684# Do we need libresolv (due to res_init or Hesiod)?
12685if test "$resolv" = yes ; then
49ebbd65 12686
eb697db5 12687$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
15e12598 12688
eb697db5
DN
12689 LIBRESOLV=-lresolv
12690else
12691 LIBRESOLV=
12692fi
8c5ff6dd 12693
e6df49e4 12694
eb697db5
DN
12695# These tell us which Kerberos-related libraries to use.
12696COM_ERRLIB=
12697CRYPTOLIB=
12698KRB5LIB=
12699DESLIB=
12700KRB4LIB=
5929fbe7 12701
eb697db5
DN
12702if test "${with_kerberos}" != no; then
12703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
12704$as_echo_n "checking for com_err in -lcom_err... " >&6; }
12705if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
49ebbd65 12706 $as_echo_n "(cached) " >&6
cd03c74a 12707else
8c5ff6dd 12708 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12709LIBS="-lcom_err $LIBS"
12710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 12711/* end confdefs.h. */
8c5ff6dd
KR
12712
12713/* Override any GCC internal prototype to avoid an error.
12714 Use char because int might match the return type of a GCC
12715 builtin and then its argument prototype would still apply. */
12716#ifdef __cplusplus
12717extern "C"
12718#endif
eb697db5 12719char com_err ();
8c5ff6dd
KR
12720int
12721main ()
a4f64981 12722{
eb697db5 12723return com_err ();
8c5ff6dd
KR
12724 ;
12725 return 0;
49ebbd65 12726}
a5edbe4a 12727_ACEOF
eb697db5
DN
12728if ac_fn_c_try_link "$LINENO"; then :
12729 ac_cv_lib_com_err_com_err=yes
49ebbd65 12730else
eb697db5 12731 ac_cv_lib_com_err_com_err=no
8c5ff6dd 12732fi
eb697db5
DN
12733rm -f core conftest.err conftest.$ac_objext \
12734 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 12735LIBS=$ac_check_lib_save_LIBS
49ebbd65 12736fi
eb697db5
DN
12737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
12738$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
12739if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
12740 have_com_err=yes
12741else
12742 have_com_err=no
5929fbe7 12743fi
49ebbd65 12744
eb697db5
DN
12745 if test $have_com_err = yes; then
12746 COM_ERRLIB=-lcom_err
12747 LIBS="$COM_ERRLIB $LIBS"
5929fbe7 12748
eb697db5
DN
12749$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
12750
12751 fi
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
12753$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
12754if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
8c5ff6dd 12755 $as_echo_n "(cached) " >&6
15e12598 12756else
eb697db5
DN
12757 ac_check_lib_save_LIBS=$LIBS
12758LIBS="-lcrypto $LIBS"
12759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12760/* end confdefs.h. */
eb697db5
DN
12761
12762/* Override any GCC internal prototype to avoid an error.
12763 Use char because int might match the return type of a GCC
12764 builtin and then its argument prototype would still apply. */
12765#ifdef __cplusplus
12766extern "C"
12767#endif
12768char mit_des_cbc_encrypt ();
12769int
12770main ()
5929fbe7 12771{
eb697db5
DN
12772return mit_des_cbc_encrypt ();
12773 ;
12774 return 0;
8c5ff6dd 12775}
a4f64981 12776_ACEOF
eb697db5
DN
12777if ac_fn_c_try_link "$LINENO"; then :
12778 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
8c5ff6dd 12779else
eb697db5 12780 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
8c5ff6dd 12781fi
eb697db5
DN
12782rm -f core conftest.err conftest.$ac_objext \
12783 conftest$ac_exeext conftest.$ac_ext
12784LIBS=$ac_check_lib_save_LIBS
12785fi
12786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
12787$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
12788if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
12789 have_crypto=yes
12790else
12791 have_crypto=no
a4f64981 12792fi
15e12598 12793
eb697db5
DN
12794 if test $have_crypto = yes; then
12795 CRYPTOLIB=-lcrypto
12796 LIBS="$CRYPTOLIB $LIBS"
12797
12798$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
e6df49e4 12799
eb697db5
DN
12800 fi
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
12802$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
12803if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
12804 $as_echo_n "(cached) " >&6
8c5ff6dd 12805else
eb697db5
DN
12806 ac_check_lib_save_LIBS=$LIBS
12807LIBS="-lk5crypto $LIBS"
12808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12809/* end confdefs.h. */
8c5ff6dd 12810
eb697db5
DN
12811/* Override any GCC internal prototype to avoid an error.
12812 Use char because int might match the return type of a GCC
12813 builtin and then its argument prototype would still apply. */
12814#ifdef __cplusplus
12815extern "C"
12816#endif
12817char mit_des_cbc_encrypt ();
12818int
12819main ()
12820{
12821return mit_des_cbc_encrypt ();
12822 ;
12823 return 0;
12824}
5929fbe7 12825_ACEOF
eb697db5
DN
12826if ac_fn_c_try_link "$LINENO"; then :
12827 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
12828else
12829 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
12830fi
12831rm -f core conftest.err conftest.$ac_objext \
12832 conftest$ac_exeext conftest.$ac_ext
12833LIBS=$ac_check_lib_save_LIBS
12834fi
12835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
12836$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
12837if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
12838 have_k5crypto=yes
12839else
12840 have_k5crypto=no
5929fbe7 12841fi
8c5ff6dd 12842
eb697db5
DN
12843 if test $have_k5crypto = yes; then
12844 CRYPTOLIB=-lk5crypto
12845 LIBS="$CRYPTOLIB $LIBS"
5929fbe7 12846
eb697db5
DN
12847$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
12848
12849 fi
12850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
12851$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
12852if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
8c5ff6dd
KR
12853 $as_echo_n "(cached) " >&6
12854else
eb697db5
DN
12855 ac_check_lib_save_LIBS=$LIBS
12856LIBS="-lkrb5 $LIBS"
12857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12858/* end confdefs.h. */
5929fbe7 12859
eb697db5
DN
12860/* Override any GCC internal prototype to avoid an error.
12861 Use char because int might match the return type of a GCC
12862 builtin and then its argument prototype would still apply. */
12863#ifdef __cplusplus
12864extern "C"
5929fbe7 12865#endif
eb697db5
DN
12866char krb5_init_context ();
12867int
12868main ()
12869{
12870return krb5_init_context ();
12871 ;
12872 return 0;
12873}
12874_ACEOF
12875if ac_fn_c_try_link "$LINENO"; then :
12876 ac_cv_lib_krb5_krb5_init_context=yes
12877else
12878 ac_cv_lib_krb5_krb5_init_context=no
12879fi
12880rm -f core conftest.err conftest.$ac_objext \
12881 conftest$ac_exeext conftest.$ac_ext
12882LIBS=$ac_check_lib_save_LIBS
12883fi
12884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
12885$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
12886if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
12887 have_krb5=yes
12888else
12889 have_krb5=no
12890fi
12891
12892 if test $have_krb5=yes; then
12893 KRB5LIB=-lkrb5
12894 LIBS="$KRB5LIB $LIBS"
12895
12896$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
5929fbe7 12897
eb697db5
DN
12898 fi
12899 if test "${with_kerberos5}" = no; then
12900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
12901$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
12902if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
12903 $as_echo_n "(cached) " >&6
12904else
12905 ac_check_lib_save_LIBS=$LIBS
12906LIBS="-ldes425 $LIBS"
12907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12908/* end confdefs.h. */
aaa36002
DN
12909
12910/* Override any GCC internal prototype to avoid an error.
12911 Use char because int might match the return type of a GCC
12912 builtin and then its argument prototype would still apply. */
12913#ifdef __cplusplus
12914extern "C"
7186fb09 12915#endif
eb697db5 12916char des_cbc_encrypt ();
0ca10bb7
RC
12917int
12918main ()
12919{
eb697db5 12920return des_cbc_encrypt ();
0ca10bb7
RC
12921 ;
12922 return 0;
12923}
12924_ACEOF
eb697db5
DN
12925if ac_fn_c_try_link "$LINENO"; then :
12926 ac_cv_lib_des425_des_cbc_encrypt=yes
8c5ff6dd 12927else
eb697db5 12928 ac_cv_lib_des425_des_cbc_encrypt=no
a4f64981 12929fi
eb697db5
DN
12930rm -f core conftest.err conftest.$ac_objext \
12931 conftest$ac_exeext conftest.$ac_ext
12932LIBS=$ac_check_lib_save_LIBS
5929fbe7 12933fi
eb697db5
DN
12934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
12935$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
12936if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
12937 have_des425=yes
12938else
12939 have_des425=no
5929fbe7 12940fi
8c5ff6dd 12941
eb697db5
DN
12942 if test $have_des425 = yes; then
12943 DESLIB=-ldes425
12944 LIBS="$DESLIB $LIBS"
12945
12946$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
12947
12948 else
12949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
12950$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
12951if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
12952 $as_echo_n "(cached) " >&6
12953else
eb697db5
DN
12954 ac_check_lib_save_LIBS=$LIBS
12955LIBS="-ldes $LIBS"
12956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12957/* end confdefs.h. */
edfaf76d 12958
eb697db5
DN
12959/* Override any GCC internal prototype to avoid an error.
12960 Use char because int might match the return type of a GCC
12961 builtin and then its argument prototype would still apply. */
12962#ifdef __cplusplus
12963extern "C"
503d2be0 12964#endif
eb697db5 12965char des_cbc_encrypt ();
19650fd6
AS
12966int
12967main ()
12968{
eb697db5 12969return des_cbc_encrypt ();
503d2be0
AS
12970 ;
12971 return 0;
12972}
12973_ACEOF
eb697db5
DN
12974if ac_fn_c_try_link "$LINENO"; then :
12975 ac_cv_lib_des_des_cbc_encrypt=yes
8c5ff6dd 12976else
eb697db5 12977 ac_cv_lib_des_des_cbc_encrypt=no
a4f64981 12978fi
eb697db5
DN
12979rm -f core conftest.err conftest.$ac_objext \
12980 conftest$ac_exeext conftest.$ac_ext
12981LIBS=$ac_check_lib_save_LIBS
12982fi
12983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
12984$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
12985if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
12986 have_des=yes
12987else
12988 have_des=no
5929fbe7 12989fi
e6df49e4 12990
eb697db5
DN
12991 if test $have_des = yes; then
12992 DESLIB=-ldes
12993 LIBS="$DESLIB $LIBS"
a4f64981 12994
eb697db5 12995$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
5929fbe7 12996
eb697db5
DN
12997 fi
12998 fi
12999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
13000$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
13001if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
e9a63f04 13002 $as_echo_n "(cached) " >&6
ba4481b5 13003else
eb697db5
DN
13004 ac_check_lib_save_LIBS=$LIBS
13005LIBS="-lkrb4 $LIBS"
13006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13007/* end confdefs.h. */
ba4481b5 13008
0ca10bb7
RC
13009/* Override any GCC internal prototype to avoid an error.
13010 Use char because int might match the return type of a GCC
13011 builtin and then its argument prototype would still apply. */
13012#ifdef __cplusplus
13013extern "C"
a3f08d9e 13014#endif
eb697db5 13015char krb_get_cred ();
503d2be0
AS
13016int
13017main ()
13018{
eb697db5 13019return krb_get_cred ();
503d2be0
AS
13020 ;
13021 return 0;
13022}
13023_ACEOF
eb697db5
DN
13024if ac_fn_c_try_link "$LINENO"; then :
13025 ac_cv_lib_krb4_krb_get_cred=yes
bf89cb4d 13026else
eb697db5 13027 ac_cv_lib_krb4_krb_get_cred=no
91e84f96 13028fi
eb697db5
DN
13029rm -f core conftest.err conftest.$ac_objext \
13030 conftest$ac_exeext conftest.$ac_ext
13031LIBS=$ac_check_lib_save_LIBS
91e84f96 13032fi
eb697db5
DN
13033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
13034$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
13035if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
13036 have_krb4=yes
bf89cb4d 13037else
eb697db5 13038 have_krb4=no
91e84f96
GM
13039fi
13040
eb697db5
DN
13041 if test $have_krb4 = yes; then
13042 KRB4LIB=-lkrb4
13043 LIBS="$KRB4LIB $LIBS"
13044
13045$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
13046
13047 else
13048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
13049$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
13050if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
bf89cb4d 13051 $as_echo_n "(cached) " >&6
bf89cb4d 13052else
eb697db5
DN
13053 ac_check_lib_save_LIBS=$LIBS
13054LIBS="-lkrb $LIBS"
13055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13056/* end confdefs.h. */
a4f64981 13057
eb697db5
DN
13058/* Override any GCC internal prototype to avoid an error.
13059 Use char because int might match the return type of a GCC
13060 builtin and then its argument prototype would still apply. */
13061#ifdef __cplusplus
13062extern "C"
13063#endif
13064char krb_get_cred ();
13065int
13066main ()
13067{
13068return krb_get_cred ();
13069 ;
13070 return 0;
13071}
5929fbe7 13072_ACEOF
eb697db5
DN
13073if ac_fn_c_try_link "$LINENO"; then :
13074 ac_cv_lib_krb_krb_get_cred=yes
5929fbe7 13075else
eb697db5 13076 ac_cv_lib_krb_krb_get_cred=no
a4f64981 13077fi
eb697db5
DN
13078rm -f core conftest.err conftest.$ac_objext \
13079 conftest$ac_exeext conftest.$ac_ext
13080LIBS=$ac_check_lib_save_LIBS
5929fbe7 13081fi
eb697db5
DN
13082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
13083$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
13084if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
13085 have_krb=yes
91e84f96 13086else
eb697db5 13087 have_krb=no
6da23aaa 13088fi
0ca10bb7 13089
eb697db5
DN
13090 if test $have_krb = yes; then
13091 KRB4LIB=-lkrb
13092 LIBS="$KRB4LIB $LIBS"
2d2b6695 13093
eb697db5 13094$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
ca81d7a0 13095
eb697db5
DN
13096 fi
13097 fi
13098 fi
ca81d7a0 13099
eb697db5
DN
13100 if test "${with_kerberos5}" != no; then
13101 for ac_header in krb5.h
13102do :
13103 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
13104if test "x$ac_cv_header_krb5_h" = x""yes; then :
13105 cat >>confdefs.h <<_ACEOF
13106#define HAVE_KRB5_H 1
6da23aaa 13107_ACEOF
eb697db5
DN
13108 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
13109"
13110if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
13111
13112cat >>confdefs.h <<_ACEOF
13113#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 13114_ACEOF
2d2b6695 13115
eb697db5 13116
2d2b6695 13117fi
eb697db5
DN
13118ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
13119"
13120if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
6da23aaa 13121
eb697db5
DN
13122cat >>confdefs.h <<_ACEOF
13123#define HAVE_KRB5_ERROR_E_TEXT 1
13124_ACEOF
0ca10bb7 13125
0ca10bb7 13126
bf89cb4d 13127fi
2d2b6695
KS
13128
13129fi
13130
eb697db5
DN
13131done
13132
13133 else
13134 for ac_header in des.h
13135do :
13136 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
13137if test "x$ac_cv_header_des_h" = x""yes; then :
13138 cat >>confdefs.h <<_ACEOF
13139#define HAVE_DES_H 1
13140_ACEOF
8c5ff6dd 13141
eb697db5
DN
13142else
13143 for ac_header in kerberosIV/des.h
13144do :
13145 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
13146if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
13147 cat >>confdefs.h <<_ACEOF
13148#define HAVE_KERBEROSIV_DES_H 1
13149_ACEOF
6da23aaa 13150
eb697db5
DN
13151else
13152 for ac_header in kerberos/des.h
13153do :
13154 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
13155if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
13156 cat >>confdefs.h <<_ACEOF
13157#define HAVE_KERBEROS_DES_H 1
6da23aaa 13158_ACEOF
3d9fec71 13159
3d9fec71
DL
13160fi
13161
eb697db5 13162done
0ca10bb7 13163
0ca10bb7 13164fi
6da23aaa 13165
eb697db5
DN
13166done
13167
0ca10bb7 13168fi
6da23aaa 13169
eb697db5 13170done
6da23aaa 13171
eb697db5
DN
13172 for ac_header in krb.h
13173do :
13174 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
13175if test "x$ac_cv_header_krb_h" = x""yes; then :
13176 cat >>confdefs.h <<_ACEOF
13177#define HAVE_KRB_H 1
6da23aaa 13178_ACEOF
eb697db5
DN
13179
13180else
13181 for ac_header in kerberosIV/krb.h
13182do :
13183 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
13184if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
13185 cat >>confdefs.h <<_ACEOF
13186#define HAVE_KERBEROSIV_KRB_H 1
6da23aaa 13187_ACEOF
eb697db5 13188
6da23aaa 13189else
eb697db5
DN
13190 for ac_header in kerberos/krb.h
13191do :
13192 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
13193if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
13194 cat >>confdefs.h <<_ACEOF
13195#define HAVE_KERBEROS_KRB_H 1
13196_ACEOF
0ca10bb7 13197
0ca10bb7
RC
13198fi
13199
eb697db5 13200done
15e12598 13201
a4f64981 13202fi
eb697db5
DN
13203
13204done
8c5ff6dd 13205
5929fbe7 13206fi
eb697db5
DN
13207
13208done
13209
13210 fi
13211 for ac_header in com_err.h
13212do :
13213 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
13214if test "x$ac_cv_header_com_err_h" = x""yes; then :
6da23aaa 13215 cat >>confdefs.h <<_ACEOF
eb697db5 13216#define HAVE_COM_ERR_H 1
0ca10bb7
RC
13217_ACEOF
13218
13219fi
0ca10bb7 13220
6da23aaa
EZ
13221done
13222
eb697db5 13223fi
6da23aaa 13224
6da23aaa 13225
91e84f96 13226
6da23aaa 13227
6da23aaa 13228
6da23aaa
EZ
13229
13230
eb697db5
DN
13231# Solaris requires -lintl if you want strerror (which calls dgettext)
13232# to return localized messages.
13233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
13234$as_echo_n "checking for dgettext in -lintl... " >&6; }
13235if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
6da23aaa
EZ
13236 $as_echo_n "(cached) " >&6
13237else
eb697db5
DN
13238 ac_check_lib_save_LIBS=$LIBS
13239LIBS="-lintl $LIBS"
13240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13241/* end confdefs.h. */
eb697db5
DN
13242
13243/* Override any GCC internal prototype to avoid an error.
13244 Use char because int might match the return type of a GCC
13245 builtin and then its argument prototype would still apply. */
13246#ifdef __cplusplus
13247extern "C"
13248#endif
13249char dgettext ();
91e84f96
GM
13250int
13251main ()
6da23aaa 13252{
eb697db5 13253return dgettext ();
91e84f96
GM
13254 ;
13255 return 0;
6da23aaa
EZ
13256}
13257_ACEOF
eb697db5
DN
13258if ac_fn_c_try_link "$LINENO"; then :
13259 ac_cv_lib_intl_dgettext=yes
13260else
13261 ac_cv_lib_intl_dgettext=no
13262fi
13263rm -f core conftest.err conftest.$ac_objext \
13264 conftest$ac_exeext conftest.$ac_ext
13265LIBS=$ac_check_lib_save_LIBS
13266fi
13267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
13268$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
13269if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
13270 cat >>confdefs.h <<_ACEOF
13271#define HAVE_LIBINTL 1
8c5ff6dd 13272_ACEOF
eb697db5
DN
13273
13274 LIBS="-lintl $LIBS"
13275
13276fi
13277
13278
13279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
13280$as_echo_n "checking whether localtime caches TZ... " >&6; }
13281if test "${emacs_cv_localtime_cache+set}" = set; then :
13282 $as_echo_n "(cached) " >&6
13283else
13284 if test x$ac_cv_func_tzset = xyes; then
13285if test "$cross_compiling" = yes; then :
13286 # If we have tzset, assume the worst when cross-compiling.
13287emacs_cv_localtime_cache=yes
13288else
13289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 13290/* end confdefs.h. */
eb697db5
DN
13291#include <time.h>
13292extern char **environ;
13293unset_TZ ()
13294{
13295 char **from, **to;
13296 for (to = from = environ; (*to = *from); from++)
13297 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
13298 to++;
13299}
13300char TZ_GMT0[] = "TZ=GMT0";
13301char TZ_PST8[] = "TZ=PST8";
13302main()
13303{
13304 time_t now = time ((time_t *) 0);
13305 int hour_GMT0, hour_unset;
13306 if (putenv (TZ_GMT0) != 0)
13307 exit (1);
13308 hour_GMT0 = localtime (&now)->tm_hour;
13309 unset_TZ ();
13310 hour_unset = localtime (&now)->tm_hour;
13311 if (putenv (TZ_PST8) != 0)
13312 exit (1);
13313 if (localtime (&now)->tm_hour == hour_GMT0)
13314 exit (1);
13315 unset_TZ ();
13316 if (localtime (&now)->tm_hour != hour_unset)
13317 exit (1);
13318 exit (0);
13319}
13320_ACEOF
13321if ac_fn_c_try_run "$LINENO"; then :
13322 emacs_cv_localtime_cache=no
13323else
13324 emacs_cv_localtime_cache=yes
13325fi
13326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13327 conftest.$ac_objext conftest.beam conftest.$ac_ext
13328fi
13329
13330else
13331 # If we lack tzset, report that localtime does not cache TZ,
13332 # since we can't invalidate the cache if we don't have tzset.
13333 emacs_cv_localtime_cache=no
13334fi
13335fi
13336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
13337$as_echo "$emacs_cv_localtime_cache" >&6; }
13338if test $emacs_cv_localtime_cache = yes; then
13339
13340$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
13341
13342fi
13343
13344if test "x$HAVE_TIMEVAL" = xyes; then
13345 for ac_func in gettimeofday
13346do :
13347 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13348if test "x$ac_cv_func_gettimeofday" = x""yes; then :
13349 cat >>confdefs.h <<_ACEOF
13350#define HAVE_GETTIMEOFDAY 1
13351_ACEOF
13352
13353fi
13354done
13355
13356 if test $ac_cv_func_gettimeofday = yes; then
13357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
13358$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
13359if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
13360 $as_echo_n "(cached) " >&6
13361else
13362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13363/* end confdefs.h. */
13364
13365#ifdef TIME_WITH_SYS_TIME
13366#include <sys/time.h>
13367#include <time.h>
13368#else
13369#ifdef HAVE_SYS_TIME_H
13370#include <sys/time.h>
13371#else
13372#include <time.h>
13373#endif
13374#endif
aaa36002
DN
13375int
13376main ()
a4f64981 13377{
eb697db5
DN
13378struct timeval time;
13379 gettimeofday (&time, 0);
aaa36002
DN
13380 ;
13381 return 0;
eb697db5
DN
13382}
13383_ACEOF
13384if ac_fn_c_try_compile "$LINENO"; then :
13385 emacs_cv_gettimeofday_two_arguments=yes
e9a63f04 13386else
eb697db5 13387 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 13388fi
e9a63f04 13389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
13390fi
13391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
13392$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
13393 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 13394
eb697db5 13395$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 13396
eb697db5
DN
13397 fi
13398 fi
647847ea 13399fi
ca81d7a0 13400
eb697db5
DN
13401ok_so_far=yes
13402ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13403if test "x$ac_cv_func_socket" = x""yes; then :
13404
5929fbe7 13405else
eb697db5
DN
13406 ok_so_far=no
13407fi
503d2be0 13408
eb697db5
DN
13409if test $ok_so_far = yes; then
13410 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
13411if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
647847ea 13412
eb697db5
DN
13413else
13414 ok_so_far=no
647847ea
DL
13415fi
13416
c0d27fcc 13417
c0d27fcc 13418fi
eb697db5
DN
13419if test $ok_so_far = yes; then
13420 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
13421if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
5929fbe7 13422
eb697db5
DN
13423else
13424 ok_so_far=no
c0d27fcc 13425fi
ca81d7a0 13426
19650fd6 13427
647847ea 13428fi
eb697db5 13429if test $ok_so_far = yes; then
ca81d7a0 13430
eb697db5 13431$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
ca81d7a0 13432
647847ea 13433fi
c0d27fcc 13434
eb697db5
DN
13435for ac_header in sys/ioctl.h
13436do :
13437 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
13438if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 13439 cat >>confdefs.h <<_ACEOF
eb697db5 13440#define HAVE_SYS_IOCTL_H 1
c0d27fcc 13441_ACEOF
647847ea 13442
73b77ee5 13443fi
c0d27fcc 13444
503d2be0 13445done
73b77ee5 13446
c0d27fcc 13447
eb697db5 13448if test -f /usr/lpp/X11/bin/smt.exp; then
15e12598 13449
eb697db5 13450$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
8c5ff6dd 13451
eb697db5 13452fi
49ebbd65 13453
eb697db5
DN
13454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
13455$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
13456if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
13457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13458$as_echo "yes" >&6; }
15e12598 13459
eb697db5 13460$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
8c5ff6dd 13461
eb697db5
DN
13462else
13463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13464$as_echo "no" >&6; }
13465fi
13466
13467ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13468if test "x$ac_cv_type_pid_t" = x""yes; then :
15e12598 13469
5929fbe7 13470else
8c5ff6dd 13471
eb697db5
DN
13472cat >>confdefs.h <<_ACEOF
13473#define pid_t int
13474_ACEOF
13475
a4f64981 13476fi
8c5ff6dd 13477
eb697db5
DN
13478for ac_header in vfork.h
13479do :
13480 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13481if test "x$ac_cv_header_vfork_h" = x""yes; then :
13482 cat >>confdefs.h <<_ACEOF
13483#define HAVE_VFORK_H 1
13484_ACEOF
13485
5929fbe7 13486fi
eb697db5
DN
13487
13488done
13489
13490for ac_func in fork vfork
13491do :
13492 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13493ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
3d608a86
J
13494eval as_val=\$$as_ac_var
13495 if test "x$as_val" = 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
3d608a86 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
3d608a86 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=
14434for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14435 # 1. Remove the extension, and $U if already installed.
ca81d7a0 14436 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 14437 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
14438 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14439 # will be set to the directory where LIBOBJS objects are built.
eb697db5
DN
14440 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14441 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
14442done
14443LIBOBJS=$ac_libobjs
14444
14445LTLIBOBJS=$ac_ltlibobjs
14446
14447
c0d27fcc 14448
ba4481b5 14449: ${CONFIG_STATUS=./config.status}
e9a63f04 14450ac_write_fail=0
503d2be0
AS
14451ac_clean_files_save=$ac_clean_files
14452ac_clean_files="$ac_clean_files $CONFIG_STATUS"
eb697db5 14453{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 14454$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
eb697db5
DN
14455as_write_fail=0
14456cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 14457#! $SHELL
c0d27fcc 14458# Generated by $as_me.
ba4481b5 14459# Run this file to recreate the current configuration.
ba4481b5 14460# Compiler output produced by configure, useful for debugging
503d2be0 14461# configure, is in config.log if it exists.
ba4481b5 14462
503d2be0 14463debug=false
19650fd6
AS
14464ac_cs_recheck=false
14465ac_cs_silent=false
5929fbe7 14466
eb697db5
DN
14467SHELL=\${CONFIG_SHELL-$SHELL}
14468export SHELL
14469_ASEOF
14470cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14471## -------------------- ##
14472## M4sh Initialization. ##
14473## -------------------- ##
c0d27fcc 14474
f053c89f
CY
14475# Be more Bourne compatible
14476DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 14477if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
14478 emulate sh
14479 NULLCMD=:
e9a63f04 14480 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
14481 # is contrary to our usage. Disable this feature.
14482 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
14483 setopt NO_GLOB_SUBST
14484else
eb697db5
DN
14485 case `(set -o) 2>/dev/null` in #(
14486 *posix*) :
14487 set -o posix ;; #(
14488 *) :
14489 ;;
f053c89f 14490esac
503d2be0 14491fi
f053c89f
CY
14492
14493
e9a63f04
GM
14494as_nl='
14495'
14496export as_nl
14497# Printing a long string crashes Solaris 7 /usr/bin/printf.
14498as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14499as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14500as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
14501# Prefer a ksh shell builtin over an external printf program on Solaris,
14502# but without wasting forks for bash or zsh.
14503if test -z "$BASH_VERSION$ZSH_VERSION" \
14504 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14505 as_echo='print -r --'
14506 as_echo_n='print -rn --'
14507elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
14508 as_echo='printf %s\n'
14509 as_echo_n='printf %s'
14510else
14511 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14512 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14513 as_echo_n='/usr/ucb/echo -n'
7bbec45b 14514 else
e9a63f04
GM
14515 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14516 as_echo_n_body='eval
14517 arg=$1;
eb697db5 14518 case $arg in #(
e9a63f04
GM
14519 *"$as_nl"*)
14520 expr "X$arg" : "X\\(.*\\)$as_nl";
14521 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14522 esac;
14523 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14524 '
14525 export as_echo_n_body
14526 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 14527 fi
e9a63f04
GM
14528 export as_echo_body
14529 as_echo='sh -c $as_echo_body as_echo'
14530fi
14531
14532# The user is always right.
14533if test "${PATH_SEPARATOR+set}" != set; then
14534 PATH_SEPARATOR=:
14535 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14536 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14537 PATH_SEPARATOR=';'
14538 }
503d2be0
AS
14539fi
14540
6bae0ccf 14541
ca81d7a0
JD
14542# IFS
14543# We need space, tab and new line, in precisely that order. Quoting is
14544# there to prevent editors from complaining about space-tab.
14545# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14546# splitting by setting IFS to empty value.)
ca81d7a0
JD
14547IFS=" "" $as_nl"
14548
14549# Find who we are. Look in the path if we contain no directory separator.
eb697db5 14550case $0 in #((
ca81d7a0
JD
14551 *[\\/]* ) as_myself=$0 ;;
14552 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14553for as_dir in $PATH
14554do
14555 IFS=$as_save_IFS
14556 test -z "$as_dir" && as_dir=.
eb697db5
DN
14557 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14558 done
ca81d7a0
JD
14559IFS=$as_save_IFS
14560
14561 ;;
14562esac
14563# We did not find ourselves, most probably we were run as `sh COMMAND'
14564# in which case we are not to be found in the path.
14565if test "x$as_myself" = x; then
14566 as_myself=$0
14567fi
14568if test ! -f "$as_myself"; then
e9a63f04 14569 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 14570 exit 1
ca81d7a0
JD
14571fi
14572
eb697db5
DN
14573# Unset variables that we do not need and which cause bugs (e.g. in
14574# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14575# suppresses any "Segmentation fault" message there. '((' could
14576# trigger a bug in pdksh 5.2.14.
14577for as_var in BASH_ENV ENV MAIL MAILPATH
14578do eval test x\${$as_var+set} = xset \
14579 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 14580done
6bae0ccf
DL
14581PS1='$ '
14582PS2='> '
14583PS4='+ '
14584
14585# NLS nuisances.
e9a63f04
GM
14586LC_ALL=C
14587export LC_ALL
14588LANGUAGE=C
14589export LANGUAGE
6bae0ccf 14590
eb697db5
DN
14591# CDPATH.
14592(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14593
14594
3d608a86
J
14595# as_fn_error ERROR [LINENO LOG_FD]
14596# ---------------------------------
eb697db5
DN
14597# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14598# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
3d608a86 14599# script with status $?, using 1 if that was 0.
eb697db5
DN
14600as_fn_error ()
14601{
3d608a86
J
14602 as_status=$?; test $as_status -eq 0 && as_status=1
14603 if test "$3"; then
14604 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14605 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
eb697db5 14606 fi
3d608a86 14607 $as_echo "$as_me: error: $1" >&2
eb697db5
DN
14608 as_fn_exit $as_status
14609} # as_fn_error
14610
14611
14612# as_fn_set_status STATUS
14613# -----------------------
14614# Set $? to STATUS, without forking.
14615as_fn_set_status ()
14616{
14617 return $1
14618} # as_fn_set_status
14619
14620# as_fn_exit STATUS
14621# -----------------
14622# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14623as_fn_exit ()
14624{
14625 set +e
14626 as_fn_set_status $1
14627 exit $1
14628} # as_fn_exit
14629
14630# as_fn_unset VAR
14631# ---------------
14632# Portably unset VAR.
14633as_fn_unset ()
14634{
14635 { eval $1=; unset $1;}
14636}
14637as_unset=as_fn_unset
14638# as_fn_append VAR VALUE
14639# ----------------------
14640# Append the text in VALUE to the end of the definition contained in VAR. Take
14641# advantage of any shell optimizations that allow amortized linear growth over
14642# repeated appends, instead of the typical quadratic growth present in naive
14643# implementations.
14644if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14645 eval 'as_fn_append ()
14646 {
14647 eval $1+=\$2
14648 }'
14649else
14650 as_fn_append ()
14651 {
14652 eval $1=\$$1\$2
14653 }
14654fi # as_fn_append
14655
14656# as_fn_arith ARG...
14657# ------------------
14658# Perform arithmetic evaluation on the ARGs, and store the result in the
14659# global $as_val. Take advantage of shells that can avoid forks. The arguments
14660# must be portable across $(()) and expr.
14661if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14662 eval 'as_fn_arith ()
14663 {
14664 as_val=$(( $* ))
14665 }'
14666else
14667 as_fn_arith ()
14668 {
14669 as_val=`expr "$@" || test $? -eq 1`
14670 }
14671fi # as_fn_arith
14672
14673
ca81d7a0
JD
14674if expr a : '\(a\)' >/dev/null 2>&1 &&
14675 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
14676 as_expr=expr
14677else
14678 as_expr=false
14679fi
14680
ca81d7a0 14681if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
14682 as_basename=basename
14683else
14684 as_basename=false
14685fi
c0d27fcc 14686
eb697db5
DN
14687if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14688 as_dirname=dirname
14689else
14690 as_dirname=false
14691fi
c0d27fcc 14692
ca81d7a0 14693as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
14694$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14695 X"$0" : 'X\(//\)$' \| \
ca81d7a0 14696 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 14697$as_echo X/"$0" |
ca81d7a0
JD
14698 sed '/^.*\/\([^/][^/]*\)\/*$/{
14699 s//\1/
14700 q
14701 }
14702 /^X\/\(\/\/\)$/{
14703 s//\1/
14704 q
14705 }
14706 /^X\/\(\/\).*/{
14707 s//\1/
14708 q
14709 }
14710 s/.*/./; q'`
c0d27fcc 14711
eb697db5
DN
14712# Avoid depending upon Character Ranges.
14713as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14714as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14715as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14716as_cr_digits='0123456789'
14717as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
14718
14719ECHO_C= ECHO_N= ECHO_T=
eb697db5 14720case `echo -n x` in #(((((
ca81d7a0 14721-n*)
eb697db5 14722 case `echo 'xy\c'` in
ca81d7a0 14723 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
eb697db5
DN
14724 xy) ECHO_C='\c';;
14725 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14726 ECHO_T=' ';;
ca81d7a0
JD
14727 esac;;
14728*)
14729 ECHO_N='-n';;
c0d27fcc 14730esac
503d2be0
AS
14731
14732rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
14733if test -d conf$$.dir; then
14734 rm -f conf$$.dir/conf$$.file
14735else
14736 rm -f conf$$.dir
e9a63f04
GM
14737 mkdir conf$$.dir 2>/dev/null
14738fi
14739if (echo >conf$$.file) 2>/dev/null; then
14740 if ln -s conf$$.file conf$$ 2>/dev/null; then
14741 as_ln_s='ln -s'
14742 # ... but there are two gotchas:
14743 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14744 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14745 # In both cases, we have to default to `cp -p'.
14746 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14747 as_ln_s='cp -p'
14748 elif ln conf$$.file conf$$ 2>/dev/null; then
14749 as_ln_s=ln
14750 else
503d2be0 14751 as_ln_s='cp -p'
e9a63f04 14752 fi
503d2be0
AS
14753else
14754 as_ln_s='cp -p'
14755fi
ca81d7a0
JD
14756rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14757rmdir conf$$.dir 2>/dev/null
503d2be0 14758
eb697db5
DN
14759
14760# as_fn_mkdir_p
14761# -------------
14762# Create "$as_dir" as a directory, including parents if necessary.
14763as_fn_mkdir_p ()
14764{
14765
14766 case $as_dir in #(
14767 -*) as_dir=./$as_dir;;
14768 esac
14769 test -d "$as_dir" || eval $as_mkdir_p || {
14770 as_dirs=
14771 while :; do
14772 case $as_dir in #(
14773 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14774 *) as_qdir=$as_dir;;
14775 esac
14776 as_dirs="'$as_qdir' $as_dirs"
14777 as_dir=`$as_dirname -- "$as_dir" ||
14778$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14779 X"$as_dir" : 'X\(//\)[^/]' \| \
14780 X"$as_dir" : 'X\(//\)$' \| \
14781 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14782$as_echo X"$as_dir" |
14783 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14784 s//\1/
14785 q
14786 }
14787 /^X\(\/\/\)[^/].*/{
14788 s//\1/
14789 q
14790 }
14791 /^X\(\/\/\)$/{
14792 s//\1/
14793 q
14794 }
14795 /^X\(\/\).*/{
14796 s//\1/
14797 q
14798 }
14799 s/.*/./; q'`
14800 test -d "$as_dir" && break
14801 done
14802 test -z "$as_dirs" || eval "mkdir $as_dirs"
3d608a86 14803 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
eb697db5
DN
14804
14805
14806} # as_fn_mkdir_p
6bae0ccf 14807if mkdir -p . 2>/dev/null; then
eb697db5 14808 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 14809else
edfaf76d 14810 test -d ./-p && rmdir ./-p
6bae0ccf
DL
14811 as_mkdir_p=false
14812fi
14813
f053c89f
CY
14814if test -x / >/dev/null 2>&1; then
14815 as_test_x='test -x'
ca81d7a0 14816else
f053c89f
CY
14817 if ls -dL / >/dev/null 2>&1; then
14818 as_ls_L_option=L
14819 else
14820 as_ls_L_option=
14821 fi
14822 as_test_x='
14823 eval sh -c '\''
14824 if test -d "$1"; then
e9a63f04 14825 test -d "$1/.";
f053c89f 14826 else
eb697db5 14827 case $1 in #(
e9a63f04 14828 -*)set "./$1";;
f053c89f 14829 esac;
eb697db5 14830 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
14831 ???[sx]*):;;*)false;;esac;fi
14832 '\'' sh
14833 '
ca81d7a0 14834fi
f053c89f 14835as_executable_p=$as_test_x
503d2be0 14836
c0d27fcc 14837# Sed expression to map a string onto a valid CPP name.
edfaf76d 14838as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
14839
14840# Sed expression to map a string onto a valid variable name.
edfaf76d 14841as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 14842
503d2be0 14843
503d2be0 14844exec 6>&1
eb697db5
DN
14845## ----------------------------------- ##
14846## Main body of $CONFIG_STATUS script. ##
14847## ----------------------------------- ##
14848_ASEOF
14849test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 14850
eb697db5
DN
14851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14852# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 14853# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
14854# values after options handling.
14855ac_log="
49a62e8a 14856This file was extended by emacs $as_me 24.0.50, which was
3d608a86 14857generated by GNU Autoconf 2.65. Invocation command line was
c0d27fcc
MR
14858
14859 CONFIG_FILES = $CONFIG_FILES
14860 CONFIG_HEADERS = $CONFIG_HEADERS
14861 CONFIG_LINKS = $CONFIG_LINKS
14862 CONFIG_COMMANDS = $CONFIG_COMMANDS
14863 $ $0 $@
14864
ca81d7a0
JD
14865on `(hostname || uname -n) 2>/dev/null | sed 1q`
14866"
14867
503d2be0
AS
14868_ACEOF
14869
eb697db5
DN
14870case $ac_config_files in *"
14871"*) set x $ac_config_files; shift; ac_config_files=$*;;
14872esac
14873
14874case $ac_config_headers in *"
14875"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14876esac
14877
14878
e9a63f04 14879cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14880# Files that config.status was made for.
ca81d7a0
JD
14881config_files="$ac_config_files"
14882config_headers="$ac_config_headers"
14883config_commands="$ac_config_commands"
503d2be0 14884
ca81d7a0 14885_ACEOF
503d2be0 14886
e9a63f04 14887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 14888ac_cs_usage="\
eb697db5
DN
14889\`$as_me' instantiates files and other configuration actions
14890from templates according to the current configuration. Unless the files
14891and actions are specified as TAGs, all are instantiated by default.
503d2be0 14892
eb697db5 14893Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
14894
14895 -h, --help print this help, then exit
f053c89f 14896 -V, --version print version number and configuration settings, then exit
eb697db5
DN
14897 --config print configuration, then exit
14898 -q, --quiet, --silent
14899 do not print progress messages
503d2be0
AS
14900 -d, --debug don't remove temporary files
14901 --recheck update $as_me by reconfiguring in the same conditions
eb697db5 14902 --file=FILE[:TEMPLATE]
e9a63f04 14903 instantiate the configuration file FILE
eb697db5 14904 --header=FILE[:TEMPLATE]
e9a63f04 14905 instantiate the configuration header FILE
503d2be0
AS
14906
14907Configuration files:
14908$config_files
14909
14910Configuration headers:
14911$config_headers
14912
14913Configuration commands:
14914$config_commands
14915
eb697db5 14916Report bugs to the package provider."
503d2be0 14917
ca81d7a0 14918_ACEOF
e9a63f04 14919cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
eb697db5 14920ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 14921ac_cs_version="\\
49a62e8a 14922emacs config.status 24.0.50
3d608a86 14923configured by $0, generated by GNU Autoconf 2.65,
eb697db5 14924 with options \\"\$ac_cs_config\\"
503d2be0 14925
3d608a86 14926Copyright (C) 2009 Free Software Foundation, Inc.
503d2be0
AS
14927This config.status script is free software; the Free Software Foundation
14928gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
14929
14930ac_pwd='$ac_pwd'
14931srcdir='$srcdir'
14932INSTALL='$INSTALL'
e9a63f04 14933test -n "\$AWK" || AWK=awk
c0d27fcc 14934_ACEOF
503d2be0 14935
e9a63f04
GM
14936cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14937# The default lists apply if the user does not specify any file.
503d2be0
AS
14938ac_need_defaults=:
14939while test $# != 0
ba4481b5 14940do
503d2be0
AS
14941 case $1 in
14942 --*=*)
ca81d7a0
JD
14943 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14944 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
14945 ac_shift=:
14946 ;;
ca81d7a0 14947 *)
6bae0ccf
DL
14948 ac_option=$1
14949 ac_optarg=$2
14950 ac_shift=shift
503d2be0 14951 ;;
503d2be0
AS
14952 esac
14953
6bae0ccf 14954 case $ac_option in
503d2be0 14955 # Handling of the options.
19650fd6
AS
14956 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14957 ac_cs_recheck=: ;;
ca81d7a0 14958 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 14959 $as_echo "$ac_cs_version"; exit ;;
eb697db5
DN
14960 --config | --confi | --conf | --con | --co | --c )
14961 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 14962 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
14963 debug=: ;;
14964 --file | --fil | --fi | --f )
6bae0ccf 14965 $ac_shift
e9a63f04
GM
14966 case $ac_optarg in
14967 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14968 esac
eb697db5 14969 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
14970 ac_need_defaults=false;;
14971 --header | --heade | --head | --hea )
6bae0ccf 14972 $ac_shift
e9a63f04
GM
14973 case $ac_optarg in
14974 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14975 esac
eb697db5 14976 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 14977 ac_need_defaults=false;;
ca81d7a0
JD
14978 --he | --h)
14979 # Conflict between --help and --header
3d608a86 14980 as_fn_error "ambiguous option: \`$1'
eb697db5 14981Try \`$0 --help' for more information.";;
ca81d7a0 14982 --help | --hel | -h )
e9a63f04 14983 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
14984 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14985 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14986 ac_cs_silent=: ;;
503d2be0
AS
14987
14988 # This is an error.
3d608a86 14989 -*) as_fn_error "unrecognized option: \`$1'
eb697db5 14990Try \`$0 --help' for more information." ;;
503d2be0 14991
eb697db5 14992 *) as_fn_append ac_config_targets " $1"
ca81d7a0 14993 ac_need_defaults=false ;;
503d2be0 14994
ba4481b5 14995 esac
503d2be0 14996 shift
ba4481b5
DL
14997done
14998
19650fd6
AS
14999ac_configure_extra_args=
15000
15001if $ac_cs_silent; then
15002 exec 6>/dev/null
15003 ac_configure_extra_args="$ac_configure_extra_args --silent"
15004fi
15005
15006_ACEOF
e9a63f04 15007cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 15008if \$ac_cs_recheck; then
e9a63f04
GM
15009 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15010 shift
15011 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15012 CONFIG_SHELL='$SHELL'
ca81d7a0 15013 export CONFIG_SHELL
e9a63f04 15014 exec "\$@"
19650fd6
AS
15015fi
15016
503d2be0 15017_ACEOF
e9a63f04 15018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15019exec 5>>config.log
15020{
15021 echo
15022 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15023## Running $as_me. ##
15024_ASBOX
e9a63f04 15025 $as_echo "$ac_log"
ca81d7a0 15026} >&5
ba4481b5 15027
ca81d7a0 15028_ACEOF
e9a63f04 15029cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 15030#
ca81d7a0 15031# INIT-COMMANDS
503d2be0 15032#
81ac4f35 15033GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
503d2be0 15034
c0d27fcc
MR
15035_ACEOF
15036
e9a63f04 15037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15038
15039# Handling of arguments.
503d2be0
AS
15040for ac_config_target in $ac_config_targets
15041do
ca81d7a0
JD
15042 case $ac_config_target in
15043 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
15044 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
981f8c13 15045 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
ca81d7a0 15046 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
15047 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
15048 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
15049 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
15050 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
81ac4f35 15051 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
f657c21b 15052 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 15053 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
15054 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
15055 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15056
3d608a86 15057 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 15058 esac
ba4481b5 15059done
503d2be0 15060
ca81d7a0 15061
503d2be0
AS
15062# If the user did not use the arguments to specify the items to instantiate,
15063# then the envvar interface is used. Set only those that are not.
15064# We use the long form for the default assignment because of an extremely
15065# bizarre bug on SunOS 4.1.3.
15066if $ac_need_defaults; then
15067 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15068 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15069 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 15070fi
503d2be0 15071
19650fd6 15072# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 15073# simply because there is no reason against having it here, and in addition,
19650fd6 15074# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
15075# Hook for its removal unless debugging.
15076# Note that there is a small window in which the directory will not be cleaned:
15077# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
15078$debug ||
15079{
ca81d7a0
JD
15080 tmp=
15081 trap 'exit_status=$?
15082 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15083' 0
eb697db5 15084 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 15085}
503d2be0 15086# Create a (secure) tmp directory for tmp files.
19650fd6 15087
503d2be0 15088{
ca81d7a0 15089 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
15090 test -n "$tmp" && test -d "$tmp"
15091} ||
15092{
ca81d7a0
JD
15093 tmp=./conf$$-$RANDOM
15094 (umask 077 && mkdir "$tmp")
3d608a86 15095} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 15096
e9a63f04
GM
15097# Set up the scripts for CONFIG_FILES section.
15098# No need to generate them if there are no CONFIG_FILES.
15099# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
15100if test -n "$CONFIG_FILES"; then
15101
648b8e6d
GM
15102if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15103 ac_cs_awk_getline=:
15104 ac_cs_awk_pipe_init=
15105 ac_cs_awk_read_file='
15106 while ((getline aline < (F[key])) > 0)
15107 print(aline)
15108 close(F[key])'
15109 ac_cs_awk_pipe_fini=
15110else
15111 ac_cs_awk_getline=false
15112 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15113 ac_cs_awk_read_file='
15114 print "|#_!!_#|"
15115 print "cat " F[key] " &&"
15116 '$ac_cs_awk_pipe_init
15117 # The final `:' finishes the AND list.
15118 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15119fi
eb697db5
DN
15120ac_cr=`echo X | tr X '\015'`
15121# On cygwin, bash can eat \r inside `` if the user requested igncr.
15122# But we know of no other shell where ac_cr would be empty at this
15123# point, so we can use a bashism as a fallback.
15124if test "x$ac_cr" = x; then
15125 eval ac_cr=\$\'\\r\'
15126fi
e9a63f04
GM
15127ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15128if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
3d608a86 15129 ac_cs_awk_cr='\r'
e9a63f04
GM
15130else
15131 ac_cs_awk_cr=$ac_cr
ca81d7a0 15132fi
503d2be0 15133
e9a63f04 15134echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 15135_ACEOF
503d2be0 15136
648b8e6d
GM
15137# Create commands to substitute file output variables.
15138{
15139 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15140 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15141 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15142 echo "_ACAWK" &&
15143 echo "_ACEOF"
15144} >conf$$files.sh &&
15145. ./conf$$files.sh ||
3d608a86 15146 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
648b8e6d 15147rm -f conf$$files.sh
ca81d7a0 15148
e9a63f04
GM
15149{
15150 echo "cat >conf$$subs.awk <<_ACEOF" &&
15151 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15152 echo "_ACEOF"
15153} >conf$$subs.sh ||
3d608a86
J
15154 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
15155ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ca81d7a0
JD
15156ac_delim='%!_!# '
15157for ac_last_try in false false false false false :; do
e9a63f04 15158 . ./conf$$subs.sh ||
3d608a86 15159 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15160
eb697db5
DN
15161 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15162 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
15163 break
15164 elif $ac_last_try; then
3d608a86 15165 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
15166 else
15167 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 15168 fi
ca81d7a0 15169done
e9a63f04
GM
15170rm -f conf$$subs.sh
15171
15172cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15173cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15174_ACEOF
15175sed -n '
15176h
15177s/^/S["/; s/!.*/"]=/
15178p
15179g
15180s/^[^!]*!//
15181:repl
15182t repl
15183s/'"$ac_delim"'$//
15184t delim
15185:nl
15186h
eb697db5 15187s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15188t more1
15189s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15190p
15191n
15192b repl
15193:more1
15194s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15195p
15196g
15197s/.\{148\}//
15198t nl
15199:delim
15200h
eb697db5 15201s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15202t more2
15203s/["\\]/\\&/g; s/^/"/; s/$/"/
15204p
15205b
15206:more2
15207s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15208p
15209g
15210s/.\{148\}//
15211t delim
15212' <conf$$subs.awk | sed '
15213/^[^""]/{
15214 N
15215 s/\n//
15216}
15217' >>$CONFIG_STATUS || ac_write_fail=1
15218rm -f conf$$subs.awk
15219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15220_ACAWK
15221cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15222 for (key in S) S_is_set[key] = 1
15223 FS = "\a"
648b8e6d 15224 \$ac_cs_awk_pipe_init
e9a63f04
GM
15225}
15226{
15227 line = $ 0
15228 nfields = split(line, field, "@")
15229 substed = 0
15230 len = length(field[1])
15231 for (i = 2; i < nfields; i++) {
15232 key = field[i]
15233 keylen = length(key)
15234 if (S_is_set[key]) {
15235 value = S[key]
15236 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15237 len += length(value) + length(field[++i])
15238 substed = 1
15239 } else
15240 len += 1 + keylen
15241 }
648b8e6d
GM
15242 if (nfields == 3 && !substed) {
15243 key = field[2]
15244 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15245 \$ac_cs_awk_read_file
15246 next
15247 }
15248 }
e9a63f04
GM
15249 print line
15250}
648b8e6d 15251\$ac_cs_awk_pipe_fini
e9a63f04 15252_ACAWK
ca81d7a0 15253_ACEOF
e9a63f04
GM
15254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15255if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15256 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15257else
15258 cat
15259fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
3d608a86 15260 || as_fn_error "could not setup config files machinery" "$LINENO" 5
c0d27fcc 15261_ACEOF
ca81d7a0 15262
3d608a86
J
15263# VPATH may cause trouble with some makes, so we remove $(srcdir),
15264# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
ca81d7a0
JD
15265# trailing colons and then remove the whole line if VPATH becomes empty
15266# (actually we leave an empty line to preserve line numbers).
15267if test "x$srcdir" = x.; then
3d608a86
J
15268 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15269s/:*\$(srcdir):*/:/
15270s/:*\${srcdir}:*/:/
15271s/:*@srcdir@:*/:/
15272s/^\([^=]*=[ ]*\):*/\1/
ca81d7a0
JD
15273s/:*$//
15274s/^[^=]*=[ ]*$//
15275}'
15276fi
15277
e9a63f04 15278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15279fi # test -n "$CONFIG_FILES"
15280
e9a63f04
GM
15281# Set up the scripts for CONFIG_HEADERS section.
15282# No need to generate them if there are no CONFIG_HEADERS.
15283# This happens for instance with `./config.status Makefile'.
15284if test -n "$CONFIG_HEADERS"; then
15285cat >"$tmp/defines.awk" <<\_ACAWK ||
15286BEGIN {
15287_ACEOF
dc2933eb 15288
e9a63f04
GM
15289# Transform confdefs.h into an awk script `defines.awk', embedded as
15290# here-document in config.status, that substitutes the proper values into
15291# config.h.in to produce config.h.
15292
15293# Create a delimiter string that does not exist in confdefs.h, to ease
15294# handling of long lines.
15295ac_delim='%!_!# '
15296for ac_last_try in false false :; do
15297 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15298 if test -z "$ac_t"; then
15299 break
15300 elif $ac_last_try; then
3d608a86 15301 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
15302 else
15303 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15304 fi
15305done
15306
15307# For the awk script, D is an array of macro values keyed by name,
15308# likewise P contains macro parameters if any. Preserve backslash
15309# newline sequences.
15310
15311ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15312sed -n '
15313s/.\{148\}/&'"$ac_delim"'/g
15314t rset
15315:rset
15316s/^[ ]*#[ ]*define[ ][ ]*/ /
15317t def
15318d
15319:def
15320s/\\$//
15321t bsnl
15322s/["\\]/\\&/g
15323s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15324D["\1"]=" \3"/p
15325s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15326d
15327:bsnl
15328s/["\\]/\\&/g
15329s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15330D["\1"]=" \3\\\\\\n"\\/p
15331t cont
15332s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15333t cont
15334d
15335:cont
15336n
15337s/.\{148\}/&'"$ac_delim"'/g
15338t clear
15339:clear
15340s/\\$//
15341t bsnlc
15342s/["\\]/\\&/g; s/^/"/; s/$/"/p
15343d
15344:bsnlc
15345s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15346b cont
15347' <confdefs.h | sed '
15348s/'"$ac_delim"'/"\\\
15349"/g' >>$CONFIG_STATUS || ac_write_fail=1
15350
15351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15352 for (key in D) D_is_set[key] = 1
15353 FS = "\a"
15354}
15355/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15356 line = \$ 0
15357 split(line, arg, " ")
15358 if (arg[1] == "#") {
15359 defundef = arg[2]
15360 mac1 = arg[3]
15361 } else {
15362 defundef = substr(arg[1], 2)
15363 mac1 = arg[2]
15364 }
15365 split(mac1, mac2, "(") #)
15366 macro = mac2[1]
eb697db5 15367 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
15368 if (D_is_set[macro]) {
15369 # Preserve the white space surrounding the "#".
e9a63f04
GM
15370 print prefix "define", macro P[macro] D[macro]
15371 next
15372 } else {
15373 # Replace #undef with comments. This is necessary, for example,
15374 # in the case of _POSIX_SOURCE, which is predefined and required
15375 # on some systems where configure will not decide to define it.
15376 if (defundef == "undef") {
eb697db5 15377 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
15378 next
15379 }
15380 }
15381}
15382{ print }
15383_ACAWK
15384_ACEOF
15385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3d608a86 15386 as_fn_error "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
15387fi # test -n "$CONFIG_HEADERS"
15388
15389
15390eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15391shift
15392for ac_tag
ca81d7a0
JD
15393do
15394 case $ac_tag in
15395 :[FHLC]) ac_mode=$ac_tag; continue;;
15396 esac
15397 case $ac_mode$ac_tag in
15398 :[FHL]*:*);;
3d608a86 15399 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
15400 :[FH]-) ac_tag=-:-;;
15401 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15402 esac
15403 ac_save_IFS=$IFS
15404 IFS=:
15405 set x $ac_tag
15406 IFS=$ac_save_IFS
15407 shift
15408 ac_file=$1
15409 shift
15410
15411 case $ac_mode in
15412 :L) ac_source=$1;;
15413 :[FH])
15414 ac_file_inputs=
15415 for ac_f
15416 do
15417 case $ac_f in
15418 -) ac_f="$tmp/stdin";;
15419 *) # Look for the file first in the build tree, then in the source tree
15420 # (if the path is not absolute). The absolute path cannot be DOS-style,
15421 # because $ac_f cannot contain `:'.
15422 test -f "$ac_f" ||
15423 case $ac_f in
15424 [\\/$]*) false;;
15425 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15426 esac ||
3d608a86 15427 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 15428 esac
e9a63f04 15429 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
eb697db5 15430 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
15431 done
15432
15433 # Let's still pretend it is `configure' which instantiates (i.e., don't
15434 # use $as_me), people would be surprised to read:
15435 # /* config.h. Generated by config.status. */
e9a63f04
GM
15436 configure_input='Generated from '`
15437 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15438 `' by configure.'
ca81d7a0
JD
15439 if test x"$ac_file" != x-; then
15440 configure_input="$ac_file. $configure_input"
eb697db5 15441 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 15442$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 15443 fi
e9a63f04
GM
15444 # Neutralize special characters interpreted by sed in replacement strings.
15445 case $configure_input in #(
15446 *\&* | *\|* | *\\* )
15447 ac_sed_conf_input=`$as_echo "$configure_input" |
15448 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15449 *) ac_sed_conf_input=$configure_input;;
15450 esac
ca81d7a0
JD
15451
15452 case $ac_tag in
e9a63f04 15453 *:-:* | *:-) cat >"$tmp/stdin" \
3d608a86 15454 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
15455 esac
15456 ;;
ba4481b5
DL
15457 esac
15458
ca81d7a0 15459 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 15460$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
15461 X"$ac_file" : 'X\(//\)[^/]' \| \
15462 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 15463 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 15464$as_echo X"$ac_file" |
ca81d7a0
JD
15465 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15466 s//\1/
15467 q
15468 }
15469 /^X\(\/\/\)[^/].*/{
15470 s//\1/
15471 q
15472 }
15473 /^X\(\/\/\)$/{
15474 s//\1/
15475 q
15476 }
15477 /^X\(\/\).*/{
15478 s//\1/
15479 q
15480 }
15481 s/.*/./; q'`
eb697db5 15482 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 15483 ac_builddir=.
98418dba 15484
ca81d7a0
JD
15485case "$ac_dir" in
15486.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15487*)
e9a63f04 15488 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 15489 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 15490 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
15491 case $ac_top_builddir_sub in
15492 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15493 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15494 esac ;;
15495esac
15496ac_abs_top_builddir=$ac_pwd
15497ac_abs_builddir=$ac_pwd$ac_dir_suffix
15498# for backward compatibility:
15499ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
15500
15501case $srcdir in
ca81d7a0 15502 .) # We are building in place.
c0d27fcc 15503 ac_srcdir=.
ca81d7a0
JD
15504 ac_top_srcdir=$ac_top_builddir_sub
15505 ac_abs_top_srcdir=$ac_pwd ;;
15506 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 15507 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
15508 ac_top_srcdir=$srcdir
15509 ac_abs_top_srcdir=$srcdir ;;
15510 *) # Relative name.
15511 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15512 ac_top_srcdir=$ac_top_build_prefix$srcdir
15513 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 15514esac
ca81d7a0 15515ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 15516
c0d27fcc 15517
ca81d7a0
JD
15518 case $ac_mode in
15519 :F)
15520 #
15521 # CONFIG_FILE
15522 #
ba4481b5 15523
503d2be0
AS
15524 case $INSTALL in
15525 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 15526 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 15527 esac
ca81d7a0 15528_ACEOF
ba4481b5 15529
e9a63f04 15530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15531# If the template does not know about datarootdir, expand it.
15532# FIXME: This hack should be removed a few years after 2.60.
15533ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
15534ac_sed_dataroot='
15535/datarootdir/ {
ca81d7a0
JD
15536 p
15537 q
15538}
15539/@datadir@/p
15540/@docdir@/p
15541/@infodir@/p
15542/@localedir@/p
eb697db5 15543/@mandir@/p'
e9a63f04 15544case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
15545*datarootdir*) ac_datarootdir_seen=yes;;
15546*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
eb697db5 15547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 15548$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 15549_ACEOF
e9a63f04 15550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
15551 ac_datarootdir_hack='
15552 s&@datadir@&$datadir&g
15553 s&@docdir@&$docdir&g
15554 s&@infodir@&$infodir&g
15555 s&@localedir@&$localedir&g
15556 s&@mandir@&$mandir&g
eb697db5 15557 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 15558esac
c0d27fcc 15559_ACEOF
ca81d7a0
JD
15560
15561# Neutralize VPATH when `$srcdir' = `.'.
15562# Shell code in configure.ac might set extrasub.
15563# FIXME: do we really want to maintain this feature?
e9a63f04
GM
15564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15565ac_sed_extra="$ac_vpsub
503d2be0 15566$extrasub
c0d27fcc 15567_ACEOF
e9a63f04 15568cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
15569:t
15570/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 15571s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 15572s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 15573s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
15574s&@srcdir@&$ac_srcdir&;t t
15575s&@abs_srcdir@&$ac_abs_srcdir&;t t
15576s&@top_srcdir@&$ac_top_srcdir&;t t
15577s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15578s&@builddir@&$ac_builddir&;t t
15579s&@abs_builddir@&$ac_abs_builddir&;t t
15580s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15581s&@INSTALL@&$ac_INSTALL&;t t
15582$ac_datarootdir_hack
e9a63f04 15583"
648b8e6d
GM
15584eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15585if $ac_cs_awk_getline; then
15586 $AWK -f "$tmp/subs.awk"
15587else
15588 $AWK -f "$tmp/subs.awk" | $SHELL
15589fi >$tmp/out \
3d608a86 15590 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15591
15592test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15593 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15594 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
eb697db5 15595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
3d608a86 15596which seems to be undefined. Please make sure it is defined." >&5
e9a63f04 15597$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
3d608a86 15598which seems to be undefined. Please make sure it is defined." >&2;}
ca81d7a0
JD
15599
15600 rm -f "$tmp/stdin"
503d2be0 15601 case $ac_file in
e9a63f04
GM
15602 -) cat "$tmp/out" && rm -f "$tmp/out";;
15603 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15604 esac \
3d608a86 15605 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15606 ;;
15607 :H)
15608 #
15609 # CONFIG_HEADER
15610 #
503d2be0 15611 if test x"$ac_file" != x-; then
e9a63f04
GM
15612 {
15613 $as_echo "/* $configure_input */" \
15614 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15615 } >"$tmp/config.h" \
3d608a86 15616 || as_fn_error "could not create $ac_file" "$LINENO" 5
e9a63f04 15617 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
eb697db5 15618 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 15619$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 15620 else
e9a63f04
GM
15621 rm -f "$ac_file"
15622 mv "$tmp/config.h" "$ac_file" \
3d608a86 15623 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba4481b5 15624 fi
503d2be0 15625 else
e9a63f04
GM
15626 $as_echo "/* $configure_input */" \
15627 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
3d608a86 15628 || as_fn_error "could not create -" "$LINENO" 5
ba4481b5 15629 fi
ca81d7a0 15630 ;;
edfaf76d 15631
eb697db5 15632 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 15633$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
15634 ;;
15635 esac
ba4481b5 15636
c0d27fcc 15637
ca81d7a0
JD
15638 case $ac_file$ac_mode in
15639 "default":C)
ba4481b5
DL
15640
15641### Make the necessary directories, if they don't exist.
15642for dir in etc lisp ; do
15643 test -d ${dir} || mkdir ${dir}
15644done
15645
ba4481b5 15646echo creating src/epaths.h
4aa6b955 15647${MAKE-make} epaths-force
ba4481b5 15648
bf3126f6 15649if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 15650 echo creating src/.gdbinit
503d2be0 15651 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
15652fi
15653
503d2be0 15654 ;;
ca81d7a0 15655
503d2be0 15656 esac
ca81d7a0 15657done # for ac_tag
503d2be0 15658
ba4481b5 15659
eb697db5 15660as_fn_exit 0
c0d27fcc 15661_ACEOF
503d2be0
AS
15662ac_clean_files=$ac_clean_files_save
15663
e9a63f04 15664test $ac_write_fail = 0 ||
3d608a86 15665 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15666
c0d27fcc 15667
503d2be0
AS
15668# configure is writing to config.log, and then calls config.status.
15669# config.status does its own redirection, appending to config.log.
15670# Unfortunately, on DOS this fails, as config.log is still kept open
15671# by configure, so config.status won't be able to write to it; its
15672# output is simply discarded. So we exec the FD to /dev/null,
15673# effectively closing config.log, so it can be properly (re)opened and
15674# appended to by config.status. When coming back to configure, we
15675# need to make the FD available again.
15676if test "$no_create" != yes; then
15677 ac_cs_success=:
19650fd6
AS
15678 ac_config_status_args=
15679 test "$silent" = yes &&
15680 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 15681 exec 5>/dev/null
19650fd6 15682 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
15683 exec 5>>config.log
15684 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15685 # would make configure fail if this is the last instruction.
3d608a86 15686 $ac_cs_success || as_fn_exit $?
503d2be0 15687fi
e9a63f04 15688if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
eb697db5
DN
15689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15690$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 15691fi
f5f47add 15692
c0d27fcc 15693