* lisp/emacs-lisp/smie.el (smie-rule-parent, smie-indent--rule):
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
0f161c71 3# Generated by GNU Autoconf 2.67 for emacs 23.2.90.
ae1362a3 4#
ba4481b5 5#
ca81d7a0 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
ae1362a3
AS
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
8# Foundation, Inc.
9#
10#
ba4481b5
DL
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
ae1362a3
AS
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
503d2be0 16
f053c89f
CY
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
ae1362a3 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
ae1362a3
AS
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
ae1362a3
AS
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;
ae1362a3 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.
ae1362a3 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=.
ae1362a3
AS
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
ae1362a3 112 exit 1
ca81d7a0
JD
113fi
114
ae1362a3
AS
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
ae1362a3
AS
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150esac
151fi
152"
153 as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167 exitcode=1; echo positional parameters were not saved.
168fi
169test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177else
178 as_have_required=no
179fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200fi
201fi
202 done;;
203 esac
204 as_found=false
205done
206$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209fi; }
210IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
222fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232$0: including any error possibly output before this
233$0: message. Then install a modern shell, or manually run
234$0: the script under such a shell if you do have one."
235 fi
236 exit 1
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254 { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_fn_set_status ()
262{
263 return $1
264} # as_fn_set_status
265
266# as_fn_exit STATUS
267# -----------------
268# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269as_fn_exit ()
270{
271 set +e
272 as_fn_set_status $1
273 exit $1
274} # as_fn_exit
275
276# as_fn_mkdir_p
277# -------------
278# Create "$as_dir" as a directory, including parents if necessary.
279as_fn_mkdir_p ()
280{
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298$as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
319 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
320
321
322} # as_fn_mkdir_p
323# as_fn_append VAR VALUE
324# ----------------------
325# Append the text in VALUE to the end of the definition contained in VAR. Take
326# advantage of any shell optimizations that allow amortized linear growth over
327# repeated appends, instead of the typical quadratic growth present in naive
328# implementations.
329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339fi # as_fn_append
340
341# as_fn_arith ARG...
342# ------------------
343# Perform arithmetic evaluation on the ARGs, and store the result in the
344# global $as_val. Take advantage of shells that can avoid forks. The arguments
345# must be portable across $(()) and expr.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356fi # as_fn_arith
357
358
359# as_fn_error STATUS ERROR [LINENO LOG_FD]
360# ----------------------------------------
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
363# script with STATUS, using 1 if that was 0.
364as_fn_error ()
365{
366 as_status=$1; test $as_status -eq 0 && as_status=1
367 if test "$4"; then
368 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
370 fi
371 $as_echo "$as_me: error: $2" >&2
372 as_fn_exit $as_status
373} # as_fn_error
374
ca81d7a0
JD
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
377 as_expr=expr
378else
379 as_expr=false
380fi
381
ca81d7a0 382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
383 as_basename=basename
384else
385 as_basename=false
386fi
c0d27fcc 387
ae1362a3
AS
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
ae1362a3
AS
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
ae1362a3
AS
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
ae1362a3
AS
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
ae1362a3
AS
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
ca81d7a0 464
ae1362a3
AS
465rm -f conf$$ conf$$.exe conf$$.file
466if test -d conf$$.dir; then
467 rm -f conf$$.dir/conf$$.file
468else
469 rm -f conf$$.dir
470 mkdir conf$$.dir 2>/dev/null
ca81d7a0 471fi
ae1362a3
AS
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
ca81d7a0 486else
ae1362a3 487 as_ln_s='cp -p'
ca81d7a0 488fi
ae1362a3
AS
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
ca81d7a0 491
ae1362a3
AS
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
bf89cb4d 497fi
ca81d7a0 498
ae1362a3
AS
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
bf89cb4d 501else
ae1362a3
AS
502 if ls -dL / >/dev/null 2>&1; then
503 as_ls_L_option=L
504 else
505 as_ls_L_option=
506 fi
507 as_test_x='
508 eval sh -c '\''
509 if test -d "$1"; then
510 test -d "$1/.";
511 else
512 case $1 in #(
513 -*)set "./$1";;
514 esac;
515 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
516 ???[sx]*):;;*)false;;esac;fi
517 '\'' sh
518 '
bf89cb4d 519fi
ae1362a3 520as_executable_p=$as_test_x
ca81d7a0 521
ae1362a3
AS
522# Sed expression to map a string onto a valid CPP name.
523as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
ca81d7a0 524
ae1362a3
AS
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 527
bf89cb4d 528
ae1362a3
AS
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
bf89cb4d
GM
531
532# Name of the host.
ae1362a3 533# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
bf89cb4d
GM
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
503d2be0 536
503d2be0
AS
537#
538# Initializations.
539#
ba4481b5 540ac_default_prefix=/usr/local
ca81d7a0 541ac_clean_files=
6bae0ccf 542ac_config_libobj_dir=.
ca81d7a0 543LIBOBJS=
503d2be0
AS
544cross_compiling=no
545subdirs=
c0d27fcc
MR
546MFLAGS=
547MAKEFLAGS=
503d2be0 548
c0d27fcc 549# Identity of this package.
9cf8f393
JD
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
0f161c71
CY
552PACKAGE_VERSION='23.2.90'
553PACKAGE_STRING='emacs 23.2.90'
9cf8f393 554PACKAGE_BUGREPORT=''
ae1362a3 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=
ae1362a3 597ac_subst_vars='LTLIBOBJS
bf89cb4d 598OTHER_FILES
ae1362a3
AS
599LIB_SRC_EXTRA_INSTALLABLES
600GNU_OBJC_CFLAGS
601GNUSTEP_SYSTEM_LIBRARIES
602GNUSTEP_SYSTEM_HEADERS
603GNUSTEP_MAKEFILES
604ns_appsrc
605ns_appresdir
606ns_appbindir
607ns_appdir
608opsysfile
609machfile
610X_TOOLKIT_TYPE
611C_SWITCH_X_SITE
612LD_SWITCH_X_SITE_AUX
613LD_SWITCH_X_SITE
614c_switch_machine
615c_switch_system
616gameuser
617gamedir
618bitmapdir
619archlibdir
620etcdir
621x_default_search_path
622lisppath
623locallisppath
624lispdir
625srcdir
626canonical
627configuration
628version
629GETOPTOBJS
630GETOPT_H
631GETLOADAVG_LIBS
632KMEM_GROUP
633NEED_SETGID
634LIBOBJS
635liblockfile
636ALLOCA
637FREETYPE_LIBS
638FREETYPE_CFLAGS
639M17N_FLT_LIBS
640M17N_FLT_CFLAGS
641LIBOTF_LIBS
642LIBOTF_CFLAGS
643XFT_LIBS
644XFT_CFLAGS
645FONTCONFIG_LIBS
646FONTCONFIG_CFLAGS
647GCONF_LIBS
648GCONF_CFLAGS
649DBUS_LIBS
650DBUS_CFLAGS
651GTK_LIBS
652GTK_CFLAGS
653RSVG_LIBS
654RSVG_CFLAGS
655HAVE_XSERVER
656XMKMF
657SET_MAKE
658CFLAGS_SOUND
659ALSA_LIBS
660ALSA_CFLAGS
661PKG_CONFIG
662LIBSOUND
a7702be6 663CRT_DIR
ae1362a3
AS
664MAKEINFO
665GZIP_PROG
666INSTALL_INFO
667RANLIB
668INSTALL_DATA
669INSTALL_SCRIPT
670INSTALL_PROGRAM
671LN_S
672EGREP
673GREP
674CPP
675OBJEXT
676EXEEXT
677ac_ct_CC
678CPPFLAGS
679LDFLAGS
680CFLAGS
681CC
682host_os
683host_vendor
684host_cpu
685host
686build_os
687build_vendor
688build_cpu
689build
690MAINT
691target_alias
692host_alias
693build_alias
694LIBS
695ECHO_T
696ECHO_N
697ECHO_C
698DEFS
699mandir
700localedir
701libdir
702psdir
703pdfdir
704dvidir
705htmldir
706infodir
707docdir
708oldincludedir
709includedir
710localstatedir
711sharedstatedir
712sysconfdir
713datadir
714datarootdir
715libexecdir
716sbindir
717bindir
718program_transform_name
719prefix
720exec_prefix
721PACKAGE_URL
722PACKAGE_BUGREPORT
723PACKAGE_STRING
724PACKAGE_VERSION
725PACKAGE_TARNAME
726PACKAGE_NAME
727PATH_SEPARATOR
728SHELL'
6bae0ccf 729ac_subst_files=''
e9a63f04
GM
730ac_user_opts='
731enable_option_checking
732with_pop
733with_kerberos
734with_kerberos5
735with_hesiod
736with_sound
737with_sync_input
738with_x_toolkit
739with_xpm
740with_jpeg
741with_tiff
742with_gif
743with_png
744with_rsvg
745with_xft
746with_libotf
747with_m17n_flt
748with_toolkit_scroll_bars
749with_xaw3d
750with_xim
751with_ns
752with_gpm
753with_dbus
637fa988 754with_gconf
e9a63f04
GM
755with_makeinfo
756with_gtk
757with_gcc
758with_pkg_config_prog
a7702be6 759with_crt_dir
e9a63f04
GM
760with_gnustep_conf
761enable_ns_self_contained
762enable_asserts
763enable_maintainer_mode
764enable_locallisppath
765enable_checking
766enable_profiling
a53cfbe5 767enable_autodepend
e9a63f04
GM
768enable_largefile
769with_x
770'
ca81d7a0
JD
771 ac_precious_vars='build_alias
772host_alias
773target_alias
774CC
775CFLAGS
776LDFLAGS
f053c89f 777LIBS
ca81d7a0
JD
778CPPFLAGS
779CPP
780XMKMF'
781
c0d27fcc 782
ba4481b5 783# Initialize some variables set by options.
503d2be0
AS
784ac_init_help=
785ac_init_version=false
e9a63f04
GM
786ac_unrecognized_opts=
787ac_unrecognized_sep=
ba4481b5
DL
788# The variables have the same names as the options, with
789# dashes changed to underlines.
503d2be0 790cache_file=/dev/null
ba4481b5 791exec_prefix=NONE
ba4481b5 792no_create=
ba4481b5
DL
793no_recursion=
794prefix=NONE
795program_prefix=NONE
796program_suffix=NONE
797program_transform_name=s,x,x,
798silent=
799site=
800srcdir=
ba4481b5
DL
801verbose=
802x_includes=NONE
803x_libraries=NONE
503d2be0
AS
804
805# Installation directory options.
806# These are left unexpanded so users can "make install exec_prefix=/foo"
807# and all the variables that are supposed to be based on exec_prefix
808# by default will actually change.
809# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 810# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
811bindir='${exec_prefix}/bin'
812sbindir='${exec_prefix}/sbin'
813libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
814datarootdir='${prefix}/share'
815datadir='${datarootdir}'
ba4481b5
DL
816sysconfdir='${prefix}/etc'
817sharedstatedir='${prefix}/com'
818localstatedir='${prefix}/var'
ba4481b5
DL
819includedir='${prefix}/include'
820oldincludedir='/usr/include'
9cf8f393 821docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
822infodir='${datarootdir}/info'
823htmldir='${docdir}'
824dvidir='${docdir}'
825pdfdir='${docdir}'
826psdir='${docdir}'
827libdir='${exec_prefix}/lib'
828localedir='${datarootdir}/locale'
829mandir='${datarootdir}/man'
ba4481b5 830
ba4481b5 831ac_prev=
ca81d7a0 832ac_dashdash=
ba4481b5
DL
833for ac_option
834do
ba4481b5
DL
835 # If the previous option needs an argument, assign it.
836 if test -n "$ac_prev"; then
ca81d7a0 837 eval $ac_prev=\$ac_option
ba4481b5
DL
838 ac_prev=
839 continue
840 fi
841
ca81d7a0 842 case $ac_option in
ae1362a3
AS
843 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
844 *=) ac_optarg= ;;
845 *) ac_optarg=yes ;;
ca81d7a0 846 esac
ba4481b5
DL
847
848 # Accept the important Cygnus configure options, so we can diagnose typos.
849
ca81d7a0
JD
850 case $ac_dashdash$ac_option in
851 --)
852 ac_dashdash=yes ;;
ba4481b5
DL
853
854 -bindir | --bindir | --bindi | --bind | --bin | --bi)
855 ac_prev=bindir ;;
856 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 857 bindir=$ac_optarg ;;
ba4481b5
DL
858
859 -build | --build | --buil | --bui | --bu)
503d2be0 860 ac_prev=build_alias ;;
ba4481b5 861 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 862 build_alias=$ac_optarg ;;
ba4481b5
DL
863
864 -cache-file | --cache-file | --cache-fil | --cache-fi \
865 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
866 ac_prev=cache_file ;;
867 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
868 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
869 cache_file=$ac_optarg ;;
870
871 --config-cache | -C)
872 cache_file=config.cache ;;
ba4481b5 873
ca81d7a0 874 -datadir | --datadir | --datadi | --datad)
ba4481b5 875 ac_prev=datadir ;;
ca81d7a0 876 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 877 datadir=$ac_optarg ;;
ba4481b5 878
ca81d7a0
JD
879 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
880 | --dataroo | --dataro | --datar)
881 ac_prev=datarootdir ;;
882 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
883 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
884 datarootdir=$ac_optarg ;;
885
ba4481b5 886 -disable-* | --disable-*)
e9a63f04 887 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 888 # Reject names that are not valid shell variable names.
e9a63f04 889 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ae1362a3 890 as_fn_error $? "invalid feature name: $ac_useropt"
e9a63f04
GM
891 ac_useropt_orig=$ac_useropt
892 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
893 case $ac_user_opts in
894 *"
895"enable_$ac_useropt"
896"*) ;;
897 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
898 ac_unrecognized_sep=', ';;
899 esac
900 eval enable_$ac_useropt=no ;;
ca81d7a0
JD
901
902 -docdir | --docdir | --docdi | --doc | --do)
903 ac_prev=docdir ;;
904 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
905 docdir=$ac_optarg ;;
906
907 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
908 ac_prev=dvidir ;;
909 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
910 dvidir=$ac_optarg ;;
ba4481b5
DL
911
912 -enable-* | --enable-*)
e9a63f04 913 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 914 # Reject names that are not valid shell variable names.
e9a63f04 915 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ae1362a3 916 as_fn_error $? "invalid feature name: $ac_useropt"
e9a63f04
GM
917 ac_useropt_orig=$ac_useropt
918 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
919 case $ac_user_opts in
920 *"
921"enable_$ac_useropt"
922"*) ;;
923 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
924 ac_unrecognized_sep=', ';;
925 esac
926 eval enable_$ac_useropt=\$ac_optarg ;;
ba4481b5
DL
927
928 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
929 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
930 | --exec | --exe | --ex)
931 ac_prev=exec_prefix ;;
932 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
933 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
934 | --exec=* | --exe=* | --ex=*)
503d2be0 935 exec_prefix=$ac_optarg ;;
ba4481b5
DL
936
937 -gas | --gas | --ga | --g)
938 # Obsolete; use --with-gas.
939 with_gas=yes ;;
940
503d2be0
AS
941 -help | --help | --hel | --he | -h)
942 ac_init_help=long ;;
943 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
944 ac_init_help=recursive ;;
945 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
946 ac_init_help=short ;;
ba4481b5
DL
947
948 -host | --host | --hos | --ho)
503d2be0 949 ac_prev=host_alias ;;
ba4481b5 950 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 951 host_alias=$ac_optarg ;;
ba4481b5 952
ca81d7a0
JD
953 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
954 ac_prev=htmldir ;;
955 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
956 | --ht=*)
957 htmldir=$ac_optarg ;;
958
ba4481b5
DL
959 -includedir | --includedir | --includedi | --included | --include \
960 | --includ | --inclu | --incl | --inc)
961 ac_prev=includedir ;;
962 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
963 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 964 includedir=$ac_optarg ;;
ba4481b5
DL
965
966 -infodir | --infodir | --infodi | --infod | --info | --inf)
967 ac_prev=infodir ;;
968 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 969 infodir=$ac_optarg ;;
ba4481b5
DL
970
971 -libdir | --libdir | --libdi | --libd)
972 ac_prev=libdir ;;
973 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 974 libdir=$ac_optarg ;;
ba4481b5
DL
975
976 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
977 | --libexe | --libex | --libe)
978 ac_prev=libexecdir ;;
979 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
980 | --libexe=* | --libex=* | --libe=*)
503d2be0 981 libexecdir=$ac_optarg ;;
ba4481b5 982
ca81d7a0
JD
983 -localedir | --localedir | --localedi | --localed | --locale)
984 ac_prev=localedir ;;
985 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
986 localedir=$ac_optarg ;;
987
ba4481b5 988 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 989 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
990 ac_prev=localstatedir ;;
991 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 992 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 993 localstatedir=$ac_optarg ;;
ba4481b5
DL
994
995 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
996 ac_prev=mandir ;;
997 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 998 mandir=$ac_optarg ;;
ba4481b5
DL
999
1000 -nfp | --nfp | --nf)
1001 # Obsolete; use --without-fp.
1002 with_fp=no ;;
1003
1004 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 1005 | --no-cr | --no-c | -n)
ba4481b5
DL
1006 no_create=yes ;;
1007
1008 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1009 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1010 no_recursion=yes ;;
1011
1012 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1013 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1014 | --oldin | --oldi | --old | --ol | --o)
1015 ac_prev=oldincludedir ;;
1016 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1017 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1018 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 1019 oldincludedir=$ac_optarg ;;
ba4481b5
DL
1020
1021 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1022 ac_prev=prefix ;;
1023 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 1024 prefix=$ac_optarg ;;
ba4481b5
DL
1025
1026 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1027 | --program-pre | --program-pr | --program-p)
1028 ac_prev=program_prefix ;;
1029 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1030 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 1031 program_prefix=$ac_optarg ;;
ba4481b5
DL
1032
1033 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1034 | --program-suf | --program-su | --program-s)
1035 ac_prev=program_suffix ;;
1036 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1037 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 1038 program_suffix=$ac_optarg ;;
ba4481b5
DL
1039
1040 -program-transform-name | --program-transform-name \
1041 | --program-transform-nam | --program-transform-na \
1042 | --program-transform-n | --program-transform- \
1043 | --program-transform | --program-transfor \
1044 | --program-transfo | --program-transf \
1045 | --program-trans | --program-tran \
1046 | --progr-tra | --program-tr | --program-t)
1047 ac_prev=program_transform_name ;;
1048 -program-transform-name=* | --program-transform-name=* \
1049 | --program-transform-nam=* | --program-transform-na=* \
1050 | --program-transform-n=* | --program-transform-=* \
1051 | --program-transform=* | --program-transfor=* \
1052 | --program-transfo=* | --program-transf=* \
1053 | --program-trans=* | --program-tran=* \
1054 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1055 program_transform_name=$ac_optarg ;;
ba4481b5 1056
ca81d7a0
JD
1057 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1058 ac_prev=pdfdir ;;
1059 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1060 pdfdir=$ac_optarg ;;
1061
1062 -psdir | --psdir | --psdi | --psd | --ps)
1063 ac_prev=psdir ;;
1064 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1065 psdir=$ac_optarg ;;
1066
ba4481b5
DL
1067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 silent=yes ;;
1070
1071 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1072 ac_prev=sbindir ;;
1073 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1074 | --sbi=* | --sb=*)
503d2be0 1075 sbindir=$ac_optarg ;;
ba4481b5
DL
1076
1077 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1078 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1079 | --sharedst | --shareds | --shared | --share | --shar \
1080 | --sha | --sh)
1081 ac_prev=sharedstatedir ;;
1082 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1083 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1084 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1085 | --sha=* | --sh=*)
503d2be0 1086 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1087
1088 -site | --site | --sit)
1089 ac_prev=site ;;
1090 -site=* | --site=* | --sit=*)
503d2be0 1091 site=$ac_optarg ;;
ba4481b5
DL
1092
1093 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1094 ac_prev=srcdir ;;
1095 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1096 srcdir=$ac_optarg ;;
ba4481b5
DL
1097
1098 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1099 | --syscon | --sysco | --sysc | --sys | --sy)
1100 ac_prev=sysconfdir ;;
1101 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1102 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1103 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1104
1105 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1106 ac_prev=target_alias ;;
ba4481b5 1107 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1108 target_alias=$ac_optarg ;;
ba4481b5
DL
1109
1110 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1111 verbose=yes ;;
1112
503d2be0
AS
1113 -version | --version | --versio | --versi | --vers | -V)
1114 ac_init_version=: ;;
ba4481b5
DL
1115
1116 -with-* | --with-*)
e9a63f04 1117 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1118 # Reject names that are not valid shell variable names.
e9a63f04 1119 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ae1362a3 1120 as_fn_error $? "invalid package name: $ac_useropt"
e9a63f04
GM
1121 ac_useropt_orig=$ac_useropt
1122 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1123 case $ac_user_opts in
1124 *"
1125"with_$ac_useropt"
1126"*) ;;
1127 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1128 ac_unrecognized_sep=', ';;
1129 esac
1130 eval with_$ac_useropt=\$ac_optarg ;;
ba4481b5
DL
1131
1132 -without-* | --without-*)
e9a63f04 1133 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1134 # Reject names that are not valid shell variable names.
e9a63f04 1135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
ae1362a3 1136 as_fn_error $? "invalid package name: $ac_useropt"
e9a63f04
GM
1137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141"with_$ac_useropt"
1142"*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=no ;;
ba4481b5
DL
1147
1148 --x)
1149 # Obsolete; use --with-x.
1150 with_x=yes ;;
1151
1152 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1153 | --x-incl | --x-inc | --x-in | --x-i)
1154 ac_prev=x_includes ;;
1155 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1156 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1157 x_includes=$ac_optarg ;;
ba4481b5
DL
1158
1159 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1160 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1161 ac_prev=x_libraries ;;
1162 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1163 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1164 x_libraries=$ac_optarg ;;
ba4481b5 1165
ae1362a3
AS
1166 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1167Try \`$0 --help' for more information"
ba4481b5
DL
1168 ;;
1169
503d2be0
AS
1170 *=*)
1171 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1172 # Reject names that are not valid shell variable names.
ae1362a3
AS
1173 case $ac_envvar in #(
1174 '' | [0-9]* | *[!_$as_cr_alnum]* )
1175 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1176 esac
ca81d7a0 1177 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1178 export $ac_envvar ;;
1179
ba4481b5 1180 *)
503d2be0 1181 # FIXME: should be removed in autoconf 3.0.
e9a63f04 1182 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
503d2be0 1183 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
e9a63f04 1184 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503d2be0 1185 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1186 ;;
1187
1188 esac
1189done
1190
1191if test -n "$ac_prev"; then
503d2be0 1192 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
ae1362a3 1193 as_fn_error $? "missing argument to $ac_option"
ba4481b5 1194fi
ba4481b5 1195
e9a63f04
GM
1196if test -n "$ac_unrecognized_opts"; then
1197 case $enable_option_checking in
1198 no) ;;
ae1362a3
AS
1199 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1200 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
e9a63f04
GM
1201 esac
1202fi
1203
1204# Check all directory arguments for consistency.
ca81d7a0
JD
1205for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1206 datadir sysconfdir sharedstatedir localstatedir includedir \
1207 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1208 libdir localedir mandir
ba4481b5 1209do
ca81d7a0 1210 eval ac_val=\$$ac_var
e9a63f04
GM
1211 # Remove trailing slashes.
1212 case $ac_val in
1213 */ )
1214 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1215 eval $ac_var=\$ac_val;;
1216 esac
1217 # Be sure to have absolute directory names.
503d2be0 1218 case $ac_val in
ca81d7a0
JD
1219 [\\/$]* | ?:[\\/]* ) continue;;
1220 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1221 esac
ae1362a3 1222 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
ba4481b5
DL
1223done
1224
503d2be0
AS
1225# There might be people who depend on the old broken behavior: `$host'
1226# used to hold the argument of --host etc.
c0d27fcc 1227# FIXME: To remove some day.
503d2be0
AS
1228build=$build_alias
1229host=$host_alias
1230target=$target_alias
1231
c0d27fcc 1232# FIXME: To remove some day.
503d2be0
AS
1233if test "x$host_alias" != x; then
1234 if test "x$build_alias" = x; then
1235 cross_compiling=maybe
ae1362a3
AS
1236 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1237 If a cross compiler is detected then cross compile mode will be used" >&2
503d2be0
AS
1238 elif test "x$build_alias" != "x$host_alias"; then
1239 cross_compiling=yes
1240 fi
1241fi
ba4481b5 1242
503d2be0
AS
1243ac_tool_prefix=
1244test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1245
503d2be0 1246test "$silent" = yes && exec 6>/dev/null
ba4481b5 1247
c0d27fcc 1248
ca81d7a0
JD
1249ac_pwd=`pwd` && test -n "$ac_pwd" &&
1250ac_ls_di=`ls -di .` &&
1251ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
ae1362a3 1252 as_fn_error $? "working directory cannot be determined"
ca81d7a0 1253test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
ae1362a3 1254 as_fn_error $? "pwd does not report name of working directory"
ca81d7a0
JD
1255
1256
ba4481b5
DL
1257# Find the source files, if location was not specified.
1258if test -z "$srcdir"; then
1259 ac_srcdir_defaulted=yes
ca81d7a0 1260 # Try the directory containing this script, then the parent directory.
e9a63f04
GM
1261 ac_confdir=`$as_dirname -- "$as_myself" ||
1262$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1263 X"$as_myself" : 'X\(//\)[^/]' \| \
1264 X"$as_myself" : 'X\(//\)$' \| \
1265 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1266$as_echo X"$as_myself" |
ca81d7a0
JD
1267 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)[^/].*/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\/\)$/{
1276 s//\1/
1277 q
1278 }
1279 /^X\(\/\).*/{
1280 s//\1/
1281 q
1282 }
1283 s/.*/./; q'`
ba4481b5 1284 srcdir=$ac_confdir
ca81d7a0 1285 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1286 srcdir=..
1287 fi
1288else
1289 ac_srcdir_defaulted=no
1290fi
ca81d7a0
JD
1291if test ! -r "$srcdir/$ac_unique_file"; then
1292 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
ae1362a3 1293 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
ba4481b5 1294fi
ca81d7a0
JD
1295ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1296ac_abs_confdir=`(
ae1362a3 1297 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
ca81d7a0
JD
1298 pwd)`
1299# When building in place, set srcdir=.
1300if test "$ac_abs_confdir" = "$ac_pwd"; then
1301 srcdir=.
1302fi
1303# Remove unnecessary trailing slashes from srcdir.
1304# Double slashes in file names in object file debugging info
1305# mess up M-x gdb in Emacs.
1306case $srcdir in
1307*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1308esac
1309for ac_var in $ac_precious_vars; do
1310 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1311 eval ac_env_${ac_var}_value=\$${ac_var}
1312 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1313 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1314done
503d2be0
AS
1315
1316#
1317# Report the --help message.
1318#
1319if test "$ac_init_help" = "long"; then
1320 # Omit some internal or obsolete options to make the list less imposing.
1321 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1322 cat <<_ACEOF
0f161c71 1323\`configure' configures emacs 23.2.90 to adapt to many kinds of systems.
503d2be0
AS
1324
1325Usage: $0 [OPTION]... [VAR=VALUE]...
1326
1327To assign environment variables (e.g., CC, CFLAGS...), specify them as
1328VAR=VALUE. See below for descriptions of some of the useful variables.
1329
1330Defaults for the options are specified in brackets.
1331
1332Configuration:
1333 -h, --help display this help and exit
1334 --help=short display options specific to this package
1335 --help=recursive display the short help of all the included packages
1336 -V, --version display version information and exit
ae1362a3 1337 -q, --quiet, --silent do not print \`checking ...' messages
503d2be0
AS
1338 --cache-file=FILE cache test results in FILE [disabled]
1339 -C, --config-cache alias for \`--cache-file=config.cache'
1340 -n, --no-create do not create output files
1341 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1342
503d2be0
AS
1343Installation directories:
1344 --prefix=PREFIX install architecture-independent files in PREFIX
e9a63f04 1345 [$ac_default_prefix]
503d2be0 1346 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
e9a63f04 1347 [PREFIX]
503d2be0
AS
1348
1349By default, \`make install' will install all the files in
1350\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1351an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1352for instance \`--prefix=\$HOME'.
1353
1354For better control, use the options below.
1355
1356Fine tuning of the installation directories:
e9a63f04
GM
1357 --bindir=DIR user executables [EPREFIX/bin]
1358 --sbindir=DIR system admin executables [EPREFIX/sbin]
1359 --libexecdir=DIR program executables [EPREFIX/libexec]
1360 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1361 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1362 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1363 --libdir=DIR object code libraries [EPREFIX/lib]
1364 --includedir=DIR C header files [PREFIX/include]
1365 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1366 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1367 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1368 --infodir=DIR info documentation [DATAROOTDIR/info]
1369 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1370 --mandir=DIR man documentation [DATAROOTDIR/man]
1371 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1372 --htmldir=DIR html documentation [DOCDIR]
1373 --dvidir=DIR dvi documentation [DOCDIR]
1374 --pdfdir=DIR pdf documentation [DOCDIR]
1375 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1376_ACEOF
503d2be0 1377
c0d27fcc 1378 cat <<\_ACEOF
503d2be0 1379
ba5da88a
PJ
1380Program names:
1381 --program-prefix=PREFIX prepend PREFIX to installed program names
1382 --program-suffix=SUFFIX append SUFFIX to installed program names
1383 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1384
503d2be0
AS
1385X features:
1386 --x-includes=DIR X include files are in DIR
1387 --x-libraries=DIR X library files are in DIR
1388
1389System types:
1390 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1391 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1392_ACEOF
503d2be0
AS
1393fi
1394
1395if test -n "$ac_init_help"; then
9cf8f393 1396 case $ac_init_help in
0f161c71 1397 short | recursive ) echo "Configuration of emacs 23.2.90:";;
9cf8f393 1398 esac
c0d27fcc 1399 cat <<\_ACEOF
503d2be0
AS
1400
1401Optional Features:
e9a63f04 1402 --disable-option-checking ignore unrecognized --enable/--with options
503d2be0
AS
1403 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1404 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6b8bc489
AS
1405 --disable-ns-self-contained
1406 disable self contained build under NeXTstep
d0098f13 1407 --enable-asserts compile code with asserts enabled
709e90de
AS
1408 --enable-maintainer-mode
1409 enable make rules and dependencies not useful (and
1410 sometimes confusing) to the casual installer
9adfabc2
LK
1411 --enable-locallisppath=PATH
1412 directories Emacs should search for lisp files
1413 specific to this site
7df24305
AS
1414 --enable-checking[=LIST]
1415 enable expensive run-time checks. With LIST, enable
1416 only specific categories of checks. Categories are:
1417 all,yes,no. Flags are: stringbytes, stringoverrun,
1418 stringfreelist, xmallocoverrun, conslist
1419 --enable-profiling build emacs with profiling support. This might not
1420 work on all platforms
a53cfbe5
JD
1421 --enable-autodepend automatically generate dependencies to .h-files.
1422 Requires GNU Make and Gcc. Enabled if GNU Make and
1423 Gcc is found
503d2be0
AS
1424 --disable-largefile omit support for large files
1425
1426Optional Packages:
1427 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1428 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1429 --without-pop don't support POP mail retrieval with movemail
1430 --with-kerberos support Kerberos-authenticated POP
1431 --with-kerberos5 support Kerberos version 5 authenticated POP
1432 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1433 --without-sound don't compile with sound support
ecd43cb9 1434 --without-sync-input process async input synchronously
49adb60f
TTN
1435 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1436 motif, gtk, no)
c8467c40
GM
1437 --without-xpm don't compile with XPM image support
1438 --without-jpeg don't compile with JPEG image support
1439 --without-tiff don't compile with TIFF image support
1440 --without-gif don't compile with GIF image support
1441 --without-png don't compile with PNG image support
1442 --without-rsvg don't compile with SVG image support
4efcc8d1 1443 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1444 --without-libotf don't use libotf for OpenType font support
1445 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1446 --without-toolkit-scroll-bars
cc227489 1447 don't use Motif or Xaw3d scroll bars
c982cf7d 1448 --without-xaw3d don't use Xaw3d
cc227489 1449 --without-xim don't use X11 XIM
edfda783 1450 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1451 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1452 console
b5a922de 1453 --without-dbus don't compile with D-Bus support
637fa988 1454 --without-gconf don't compile with GConf support
921fbdf0 1455 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1456
00b9c927 1457 --with-pkg-config-prog=PATH
ecd43cb9 1458 path to pkg-config for finding GTK and librsvg
a7702be6
CY
1459 --with-crt-dir=DIR directory containing crtn.o etc. This option is only
1460 used on x86-64 and s390x GNU/Linux architectures.
ecd43cb9
GM
1461 --with-gnustep-conf=PATH
1462 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1463 or /etc/GNUstep/GNUstep.conf
503d2be0
AS
1464 --with-x use the X Window System
1465
1466Some influential environment variables:
1467 CC C compiler command
1468 CFLAGS C compiler flags
1469 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1470 nonstandard directory <lib dir>
f053c89f 1471 LIBS libraries to pass to the linker, e.g. -l<library>
ae1362a3 1472 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
ca81d7a0 1473 you have headers in a nonstandard directory <include dir>
503d2be0 1474 CPP C preprocessor
ca81d7a0 1475 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1476
1477Use these variables to override the choices made by `configure' or to help
1478it to find libraries and programs with nonstandard names/locations.
1479
ae1362a3 1480Report bugs to the package provider.
c0d27fcc 1481_ACEOF
ca81d7a0 1482ac_status=$?
503d2be0
AS
1483fi
1484
1485if test "$ac_init_help" = "recursive"; then
1486 # If there are subdirs, report their specific --help.
c0d27fcc 1487 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
e9a63f04
GM
1488 test -d "$ac_dir" ||
1489 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1490 continue
c0d27fcc
MR
1491 ac_builddir=.
1492
ca81d7a0
JD
1493case "$ac_dir" in
1494.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1495*)
e9a63f04 1496 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 1497 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 1498 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
1499 case $ac_top_builddir_sub in
1500 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1501 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1502 esac ;;
1503esac
1504ac_abs_top_builddir=$ac_pwd
1505ac_abs_builddir=$ac_pwd$ac_dir_suffix
1506# for backward compatibility:
1507ac_top_builddir=$ac_top_build_prefix
503d2be0 1508
c0d27fcc 1509case $srcdir in
ca81d7a0 1510 .) # We are building in place.
c0d27fcc 1511 ac_srcdir=.
ca81d7a0
JD
1512 ac_top_srcdir=$ac_top_builddir_sub
1513 ac_abs_top_srcdir=$ac_pwd ;;
1514 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1515 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1516 ac_top_srcdir=$srcdir
1517 ac_abs_top_srcdir=$srcdir ;;
1518 *) # Relative name.
1519 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1520 ac_top_srcdir=$ac_top_build_prefix$srcdir
1521 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1522esac
ca81d7a0
JD
1523ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1524
1525 cd "$ac_dir" || { ac_status=$?; continue; }
1526 # Check for guested configure.
1527 if test -f "$ac_srcdir/configure.gnu"; then
1528 echo &&
1529 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1530 elif test -f "$ac_srcdir/configure"; then
1531 echo &&
1532 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1533 else
e9a63f04 1534 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1535 fi || ac_status=$?
1536 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1537 done
1538fi
1539
ca81d7a0 1540test -n "$ac_init_help" && exit $ac_status
503d2be0 1541if $ac_init_version; then
c0d27fcc 1542 cat <<\_ACEOF
0f161c71 1543emacs configure 23.2.90
ae1362a3 1544generated by GNU Autoconf 2.67
503d2be0 1545
ae1362a3 1546Copyright (C) 2010 Free Software Foundation, Inc.
503d2be0
AS
1547This configure script is free software; the Free Software Foundation
1548gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1549_ACEOF
ca81d7a0 1550 exit
503d2be0 1551fi
bf89cb4d 1552
ae1362a3
AS
1553## ------------------------ ##
1554## Autoconf initialization. ##
1555## ------------------------ ##
503d2be0 1556
ae1362a3
AS
1557# ac_fn_c_try_compile LINENO
1558# --------------------------
1559# Try to compile conftest.$ac_ext, and return whether this succeeded.
1560ac_fn_c_try_compile ()
0ca10bb7 1561{
ae1362a3
AS
1562 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1563 rm -f conftest.$ac_objext
1564 if { { ac_try="$ac_compile"
1565case "(($ac_try" in
1566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1567 *) ac_try_echo=$ac_try;;
1568esac
1569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1570$as_echo "$ac_try_echo"; } >&5
1571 (eval "$ac_compile") 2>conftest.err
1572 ac_status=$?
1573 if test -s conftest.err; then
1574 grep -v '^ *+' conftest.err >conftest.er1
1575 cat conftest.er1 >&5
1576 mv -f conftest.er1 conftest.err
1577 fi
1578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1579 test $ac_status = 0; } && {
1580 test -z "$ac_c_werror_flag" ||
1581 test ! -s conftest.err
1582 } && test -s conftest.$ac_objext; then :
1583 ac_retval=0
1584else
1585 $as_echo "$as_me: failed program was:" >&5
1586sed 's/^/| /' conftest.$ac_ext >&5
503d2be0 1587
ae1362a3
AS
1588 ac_retval=1
1589fi
1590 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1591 as_fn_set_status $ac_retval
0ca10bb7 1592
ae1362a3 1593} # ac_fn_c_try_compile
0ca10bb7 1594
ae1362a3
AS
1595# ac_fn_c_try_link LINENO
1596# -----------------------
1597# Try to link conftest.$ac_ext, and return whether this succeeded.
1598ac_fn_c_try_link ()
1599{
1600 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1601 rm -f conftest.$ac_objext conftest$ac_exeext
1602 if { { ac_try="$ac_link"
1603case "(($ac_try" in
1604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1605 *) ac_try_echo=$ac_try;;
1606esac
1607eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1608$as_echo "$ac_try_echo"; } >&5
1609 (eval "$ac_link") 2>conftest.err
1610 ac_status=$?
1611 if test -s conftest.err; then
1612 grep -v '^ *+' conftest.err >conftest.er1
1613 cat conftest.er1 >&5
1614 mv -f conftest.er1 conftest.err
1615 fi
1616 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1617 test $ac_status = 0; } && {
1618 test -z "$ac_c_werror_flag" ||
1619 test ! -s conftest.err
1620 } && test -s conftest$ac_exeext && {
1621 test "$cross_compiling" = yes ||
1622 $as_test_x conftest$ac_exeext
1623 }; then :
1624 ac_retval=0
1625else
1626 $as_echo "$as_me: failed program was:" >&5
1627sed 's/^/| /' conftest.$ac_ext >&5
1628
1629 ac_retval=1
1630fi
1631 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1632 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1633 # interfere with the next link command; also delete a directory that is
1634 # left behind by Apple's compiler. We do this before executing the actions.
1635 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1636 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1637 as_fn_set_status $ac_retval
1638
1639} # ac_fn_c_try_link
1640
1641# ac_fn_c_try_cpp LINENO
1642# ----------------------
1643# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1644ac_fn_c_try_cpp ()
1645{
1646 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1647 if { { ac_try="$ac_cpp conftest.$ac_ext"
1648case "(($ac_try" in
1649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1650 *) ac_try_echo=$ac_try;;
1651esac
1652eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1653$as_echo "$ac_try_echo"; } >&5
1654 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1655 ac_status=$?
1656 if test -s conftest.err; then
1657 grep -v '^ *+' conftest.err >conftest.er1
1658 cat conftest.er1 >&5
1659 mv -f conftest.er1 conftest.err
1660 fi
1661 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1662 test $ac_status = 0; } > conftest.i && {
1663 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1664 test ! -s conftest.err
1665 }; then :
1666 ac_retval=0
1667else
1668 $as_echo "$as_me: failed program was:" >&5
1669sed 's/^/| /' conftest.$ac_ext >&5
1670
1671 ac_retval=1
1672fi
1673 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1674 as_fn_set_status $ac_retval
1675
1676} # ac_fn_c_try_cpp
1677
1678# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1679# -------------------------------------------------------
1680# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1681# the include files in INCLUDES and setting the cache variable VAR
1682# accordingly.
1683ac_fn_c_check_header_mongrel ()
1684{
1685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1686 if eval "test \"\${$3+set}\"" = set; then :
1687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1688$as_echo_n "checking for $2... " >&6; }
1689if eval "test \"\${$3+set}\"" = set; then :
1690 $as_echo_n "(cached) " >&6
1691fi
1692eval ac_res=\$$3
1693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1694$as_echo "$ac_res" >&6; }
1695else
1696 # Is the header compilable?
1697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1698$as_echo_n "checking $2 usability... " >&6; }
1699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1700/* end confdefs.h. */
1701$4
1702#include <$2>
1703_ACEOF
1704if ac_fn_c_try_compile "$LINENO"; then :
1705 ac_header_compiler=yes
1706else
1707 ac_header_compiler=no
1708fi
1709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1711$as_echo "$ac_header_compiler" >&6; }
1712
1713# Is the header present?
1714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1715$as_echo_n "checking $2 presence... " >&6; }
1716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1717/* end confdefs.h. */
1718#include <$2>
1719_ACEOF
1720if ac_fn_c_try_cpp "$LINENO"; then :
1721 ac_header_preproc=yes
1722else
1723 ac_header_preproc=no
1724fi
1725rm -f conftest.err conftest.i conftest.$ac_ext
1726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1727$as_echo "$ac_header_preproc" >&6; }
1728
1729# So? What about this header?
1730case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1731 yes:no: )
1732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1733$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1735$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1736 ;;
1737 no:yes:* )
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1739$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1741$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1743$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1745$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1747$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1748 ;;
1749esac
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1751$as_echo_n "checking for $2... " >&6; }
1752if eval "test \"\${$3+set}\"" = set; then :
1753 $as_echo_n "(cached) " >&6
1754else
1755 eval "$3=\$ac_header_compiler"
1756fi
1757eval ac_res=\$$3
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1759$as_echo "$ac_res" >&6; }
1760fi
1761 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1762
1763} # ac_fn_c_check_header_mongrel
1764
1765# ac_fn_c_try_run LINENO
1766# ----------------------
1767# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1768# that executables *can* be run.
1769ac_fn_c_try_run ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1772 if { { ac_try="$ac_link"
1773case "(($ac_try" in
1774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1775 *) ac_try_echo=$ac_try;;
1776esac
1777eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1778$as_echo "$ac_try_echo"; } >&5
1779 (eval "$ac_link") 2>&5
1780 ac_status=$?
1781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1782 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1783 { { case "(($ac_try" in
1784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1785 *) ac_try_echo=$ac_try;;
1786esac
1787eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1788$as_echo "$ac_try_echo"; } >&5
1789 (eval "$ac_try") 2>&5
1790 ac_status=$?
1791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1792 test $ac_status = 0; }; }; then :
1793 ac_retval=0
1794else
1795 $as_echo "$as_me: program exited with status $ac_status" >&5
1796 $as_echo "$as_me: failed program was:" >&5
1797sed 's/^/| /' conftest.$ac_ext >&5
1798
1799 ac_retval=$ac_status
1800fi
1801 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1802 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1803 as_fn_set_status $ac_retval
1804
1805} # ac_fn_c_try_run
1806
1807# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1808# -------------------------------------------------------
1809# Tests whether HEADER exists and can be compiled using the include files in
1810# INCLUDES, setting the cache variable VAR accordingly.
1811ac_fn_c_check_header_compile ()
1812{
1813 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1815$as_echo_n "checking for $2... " >&6; }
1816if eval "test \"\${$3+set}\"" = set; then :
1817 $as_echo_n "(cached) " >&6
1818else
1819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1820/* end confdefs.h. */
1821$4
1822#include <$2>
1823_ACEOF
1824if ac_fn_c_try_compile "$LINENO"; then :
1825 eval "$3=yes"
1826else
1827 eval "$3=no"
1828fi
1829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1830fi
1831eval ac_res=\$$3
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1833$as_echo "$ac_res" >&6; }
1834 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1835
1836} # ac_fn_c_check_header_compile
1837
1838# ac_fn_c_check_header_preproc LINENO HEADER VAR
1839# ----------------------------------------------
1840# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1841ac_fn_c_check_header_preproc ()
1842{
1843 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845$as_echo_n "checking for $2... " >&6; }
1846if eval "test \"\${$3+set}\"" = set; then :
1847 $as_echo_n "(cached) " >&6
1848else
1849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1850/* end confdefs.h. */
1851#include <$2>
1852_ACEOF
1853if ac_fn_c_try_cpp "$LINENO"; then :
1854 eval "$3=yes"
1855else
1856 eval "$3=no"
1857fi
1858rm -f conftest.err conftest.i conftest.$ac_ext
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
1863 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1864
1865} # ac_fn_c_check_header_preproc
1866
1867# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1868# ---------------------------------------------
1869# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1870# accordingly.
1871ac_fn_c_check_decl ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 as_decl_name=`echo $2|sed 's/ *(.*//'`
1875 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1877$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1878if eval "test \"\${$3+set}\"" = set; then :
1879 $as_echo_n "(cached) " >&6
1880else
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882/* end confdefs.h. */
1883$4
1884int
1885main ()
1886{
1887#ifndef $as_decl_name
1888#ifdef __cplusplus
1889 (void) $as_decl_use;
1890#else
1891 (void) $as_decl_name;
1892#endif
1893#endif
1894
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900 eval "$3=yes"
1901else
1902 eval "$3=no"
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1905fi
1906eval ac_res=\$$3
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1908$as_echo "$ac_res" >&6; }
1909 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910
1911} # ac_fn_c_check_decl
1912
1913# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1914# ----------------------------------------------------
1915# Tries to find if the field MEMBER exists in type AGGR, after including
1916# INCLUDES, setting cache variable VAR accordingly.
1917ac_fn_c_check_member ()
1918{
1919 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1921$as_echo_n "checking for $2.$3... " >&6; }
1922if eval "test \"\${$4+set}\"" = set; then :
1923 $as_echo_n "(cached) " >&6
1924else
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$5
1928int
1929main ()
1930{
1931static $2 ac_aggr;
1932if (ac_aggr.$3)
1933return 0;
1934 ;
1935 return 0;
1936}
1937_ACEOF
1938if ac_fn_c_try_compile "$LINENO"; then :
1939 eval "$4=yes"
1940else
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$5
1944int
1945main ()
1946{
1947static $2 ac_aggr;
1948if (sizeof ac_aggr.$3)
1949return 0;
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 eval "$4=yes"
1956else
1957 eval "$4=no"
1958fi
1959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1960fi
1961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1962fi
1963eval ac_res=\$$4
1964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1965$as_echo "$ac_res" >&6; }
1966 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1967
1968} # ac_fn_c_check_member
1969
1970# ac_fn_c_check_func LINENO FUNC VAR
1971# ----------------------------------
1972# Tests whether FUNC exists, setting the cache variable VAR accordingly
1973ac_fn_c_check_func ()
1974{
1975 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1977$as_echo_n "checking for $2... " >&6; }
1978if eval "test \"\${$3+set}\"" = set; then :
1979 $as_echo_n "(cached) " >&6
1980else
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982/* end confdefs.h. */
1983/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1984 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1985#define $2 innocuous_$2
1986
1987/* System header to define __stub macros and hopefully few prototypes,
1988 which can conflict with char $2 (); below.
1989 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1990 <limits.h> exists even on freestanding compilers. */
1991
1992#ifdef __STDC__
1993# include <limits.h>
1994#else
1995# include <assert.h>
1996#endif
1997
1998#undef $2
1999
2000/* Override any GCC internal prototype to avoid an error.
2001 Use char because int might match the return type of a GCC
2002 builtin and then its argument prototype would still apply. */
2003#ifdef __cplusplus
2004extern "C"
2005#endif
2006char $2 ();
2007/* The GNU C library defines this for functions which it implements
2008 to always fail with ENOSYS. Some functions are actually named
2009 something starting with __ and the normal name is an alias. */
2010#if defined __stub_$2 || defined __stub___$2
2011choke me
2012#endif
2013
2014int
2015main ()
2016{
2017return $2 ();
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_link "$LINENO"; then :
2023 eval "$3=yes"
2024else
2025 eval "$3=no"
2026fi
2027rm -f core conftest.err conftest.$ac_objext \
2028 conftest$ac_exeext conftest.$ac_ext
2029fi
2030eval ac_res=\$$3
2031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2032$as_echo "$ac_res" >&6; }
2033 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2034
2035} # ac_fn_c_check_func
2036
2037# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2038# -------------------------------------------
2039# Tests whether TYPE exists after having included INCLUDES, setting cache
2040# variable VAR accordingly.
2041ac_fn_c_check_type ()
2042{
2043 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2045$as_echo_n "checking for $2... " >&6; }
2046if eval "test \"\${$3+set}\"" = set; then :
2047 $as_echo_n "(cached) " >&6
2048else
2049 eval "$3=no"
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056if (sizeof ($2))
2057 return 0;
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064/* end confdefs.h. */
2065$4
2066int
2067main ()
2068{
2069if (sizeof (($2)))
2070 return 0;
2071 ;
2072 return 0;
2073}
2074_ACEOF
2075if ac_fn_c_try_compile "$LINENO"; then :
2076
2077else
2078 eval "$3=yes"
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084eval ac_res=\$$3
2085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086$as_echo "$ac_res" >&6; }
2087 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2088
2089} # ac_fn_c_check_type
2090cat >config.log <<_ACEOF
2091This file contains any messages produced by compilers while
2092running configure, to aid debugging if configure makes a mistake.
2093
0f161c71 2094It was created by emacs $as_me 23.2.90, which was
ae1362a3
AS
2095generated by GNU Autoconf 2.67. Invocation command line was
2096
2097 $ $0 $@
2098
2099_ACEOF
2100exec 5>>config.log
2101{
2102cat <<_ASUNAME
2103## --------- ##
2104## Platform. ##
2105## --------- ##
2106
2107hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2108uname -m = `(uname -m) 2>/dev/null || echo unknown`
2109uname -r = `(uname -r) 2>/dev/null || echo unknown`
2110uname -s = `(uname -s) 2>/dev/null || echo unknown`
2111uname -v = `(uname -v) 2>/dev/null || echo unknown`
2112
2113/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2114/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2115
2116/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2117/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2118/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2119/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2120/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2121/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2122/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
503d2be0 2123
925c2f3f 2124_ASUNAME
c0d27fcc
MR
2125
2126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2127for as_dir in $PATH
2128do
2129 IFS=$as_save_IFS
2130 test -z "$as_dir" && as_dir=.
ae1362a3
AS
2131 $as_echo "PATH: $as_dir"
2132 done
ca81d7a0 2133IFS=$as_save_IFS
c0d27fcc 2134
503d2be0
AS
2135} >&5
2136
c0d27fcc
MR
2137cat >&5 <<_ACEOF
2138
2139
2140## ----------- ##
2141## Core tests. ##
2142## ----------- ##
2143
2144_ACEOF
503d2be0 2145
503d2be0
AS
2146
2147# Keep a trace of the command line.
2148# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 2149# Strip out --silent because we don't want to record it for future runs.
503d2be0 2150# Also quote any args containing shell meta-characters.
19650fd6 2151# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 2152ac_configure_args=
19650fd6
AS
2153ac_configure_args0=
2154ac_configure_args1=
19650fd6
AS
2155ac_must_keep_next=false
2156for ac_pass in 1 2
503d2be0 2157do
19650fd6
AS
2158 for ac_arg
2159 do
2160 case $ac_arg in
2161 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2162 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2163 | -silent | --silent | --silen | --sile | --sil)
2164 continue ;;
ca81d7a0 2165 *\'*)
e9a63f04 2166 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
19650fd6
AS
2167 esac
2168 case $ac_pass in
ae1362a3 2169 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
19650fd6 2170 2)
ae1362a3 2171 as_fn_append ac_configure_args1 " '$ac_arg'"
19650fd6 2172 if test $ac_must_keep_next = true; then
edfaf76d 2173 ac_must_keep_next=false # Got value, back to normal.
19650fd6 2174 else
edfaf76d
LK
2175 case $ac_arg in
2176 *=* | --config-cache | -C | -disable-* | --disable-* \
2177 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2178 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2179 | -with-* | --with-* | -without-* | --without-* | --x)
2180 case "$ac_configure_args0 " in
2181 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2182 esac
2183 ;;
2184 -* ) ac_must_keep_next=true ;;
2185 esac
19650fd6 2186 fi
ae1362a3 2187 as_fn_append ac_configure_args " '$ac_arg'"
19650fd6
AS
2188 ;;
2189 esac
2190 done
503d2be0 2191done
ae1362a3
AS
2192{ ac_configure_args0=; unset ac_configure_args0;}
2193{ ac_configure_args1=; unset ac_configure_args1;}
503d2be0
AS
2194
2195# When interrupted or exit'd, cleanup temporary files, and complete
2196# config.log. We remove comments because anyway the quotes in there
2197# would cause problems or look ugly.
ca81d7a0
JD
2198# WARNING: Use '\'' to represent an apostrophe within the trap.
2199# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
2200trap 'exit_status=$?
2201 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
2202 {
2203 echo
6bae0ccf 2204
ae1362a3 2205 $as_echo "## ---------------- ##
c0d27fcc 2206## Cache variables. ##
ae1362a3 2207## ---------------- ##"
c0d27fcc
MR
2208 echo
2209 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
2210(
2211 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2212 eval ac_val=\$$ac_var
2213 case $ac_val in #(
2214 *${as_nl}*)
2215 case $ac_var in #(
ae1362a3
AS
2216 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2217$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
2218 esac
2219 case $ac_var in #(
2220 _ | IFS | as_nl) ;; #(
e9a63f04 2221 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
ae1362a3 2222 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
2223 esac ;;
2224 esac
2225 done
503d2be0 2226 (set) 2>&1 |
ca81d7a0
JD
2227 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2228 *${as_nl}ac_space=\ *)
503d2be0 2229 sed -n \
ca81d7a0
JD
2230 "s/'\''/'\''\\\\'\'''\''/g;
2231 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2232 ;; #(
503d2be0 2233 *)
ca81d7a0 2234 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 2235 ;;
ca81d7a0
JD
2236 esac |
2237 sort
2238)
c0d27fcc 2239 echo
6bae0ccf 2240
ae1362a3 2241 $as_echo "## ----------------- ##
6bae0ccf 2242## Output variables. ##
ae1362a3 2243## ----------------- ##"
6bae0ccf
DL
2244 echo
2245 for ac_var in $ac_subst_vars
2246 do
ca81d7a0
JD
2247 eval ac_val=\$$ac_var
2248 case $ac_val in
e9a63f04 2249 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
ca81d7a0 2250 esac
e9a63f04 2251 $as_echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
2252 done | sort
2253 echo
2254
2255 if test -n "$ac_subst_files"; then
ae1362a3 2256 $as_echo "## ------------------- ##
ca81d7a0 2257## File substitutions. ##
ae1362a3 2258## ------------------- ##"
6bae0ccf
DL
2259 echo
2260 for ac_var in $ac_subst_files
2261 do
ca81d7a0
JD
2262 eval ac_val=\$$ac_var
2263 case $ac_val in
e9a63f04 2264 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
ca81d7a0 2265 esac
e9a63f04 2266 $as_echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
2267 done | sort
2268 echo
2269 fi
2270
c0d27fcc 2271 if test -s confdefs.h; then
ae1362a3 2272 $as_echo "## ----------- ##
c0d27fcc 2273## confdefs.h. ##
ae1362a3 2274## ----------- ##"
c0d27fcc 2275 echo
ca81d7a0 2276 cat confdefs.h
c0d27fcc
MR
2277 echo
2278 fi
2279 test "$ac_signal" != 0 &&
e9a63f04
GM
2280 $as_echo "$as_me: caught signal $ac_signal"
2281 $as_echo "$as_me: exit $exit_status"
c0d27fcc 2282 } >&5
ca81d7a0
JD
2283 rm -f core *.core core.conftest.* &&
2284 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 2285 exit $exit_status
ca81d7a0 2286' 0
503d2be0 2287for ac_signal in 1 2 13 15; do
ae1362a3 2288 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
503d2be0
AS
2289done
2290ac_signal=0
2291
2292# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 2293rm -f -r conftest* confdefs.h
ba4481b5 2294
ae1362a3
AS
2295$as_echo "/* confdefs.h */" > confdefs.h
2296
c0d27fcc
MR
2297# Predefined preprocessor variables.
2298
2299cat >>confdefs.h <<_ACEOF
2300#define PACKAGE_NAME "$PACKAGE_NAME"
2301_ACEOF
2302
c0d27fcc
MR
2303cat >>confdefs.h <<_ACEOF
2304#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2305_ACEOF
2306
c0d27fcc
MR
2307cat >>confdefs.h <<_ACEOF
2308#define PACKAGE_VERSION "$PACKAGE_VERSION"
2309_ACEOF
2310
c0d27fcc
MR
2311cat >>confdefs.h <<_ACEOF
2312#define PACKAGE_STRING "$PACKAGE_STRING"
2313_ACEOF
2314
0ca10bb7 2315cat >>confdefs.h <<_ACEOF
bf89cb4d 2316#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
0ca10bb7
RC
2317_ACEOF
2318
ae1362a3
AS
2319cat >>confdefs.h <<_ACEOF
2320#define PACKAGE_URL "$PACKAGE_URL"
2321_ACEOF
2322
c0d27fcc 2323
503d2be0 2324# Let the site file select an alternate cache file if it wants to.
e9a63f04
GM
2325# Prefer an explicitly selected file to automatically selected ones.
2326ac_site_file1=NONE
2327ac_site_file2=NONE
ca81d7a0 2328if test -n "$CONFIG_SITE"; then
ae1362a3
AS
2329 # We do not want a PATH search for config.site.
2330 case $CONFIG_SITE in #((
2331 -*) ac_site_file1=./$CONFIG_SITE;;
2332 */*) ac_site_file1=$CONFIG_SITE;;
2333 *) ac_site_file1=./$CONFIG_SITE;;
2334 esac
ca81d7a0 2335elif test "x$prefix" != xNONE; then
e9a63f04
GM
2336 ac_site_file1=$prefix/share/config.site
2337 ac_site_file2=$prefix/etc/config.site
ca81d7a0 2338else
e9a63f04
GM
2339 ac_site_file1=$ac_default_prefix/share/config.site
2340 ac_site_file2=$ac_default_prefix/etc/config.site
ba4481b5 2341fi
e9a63f04 2342for ac_site_file in "$ac_site_file1" "$ac_site_file2"
ca81d7a0 2343do
e9a63f04 2344 test "x$ac_site_file" = xNONE && continue
ae1362a3
AS
2345 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
e9a63f04 2347$as_echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 2348 sed 's/^/| /' "$ac_site_file" >&5
ae1362a3
AS
2349 . "$ac_site_file" \
2350 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2351$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2352as_fn_error $? "failed to load site script $ac_site_file
2353See \`config.log' for more details" "$LINENO" 5; }
ba4481b5
DL
2354 fi
2355done
2356
2357if test -r "$cache_file"; then
ae1362a3
AS
2358 # Some versions of bash will fail to source /dev/null (special files
2359 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2360 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
e9a63f04 2362$as_echo "$as_me: loading cache $cache_file" >&6;}
503d2be0 2363 case $cache_file in
ca81d7a0
JD
2364 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2365 *) . "./$cache_file";;
503d2be0
AS
2366 esac
2367 fi
ba4481b5 2368else
ae1362a3 2369 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
e9a63f04 2370$as_echo "$as_me: creating cache $cache_file" >&6;}
503d2be0
AS
2371 >$cache_file
2372fi
2373
ae1362a3
AS
2374as_fn_append ac_header_list " stdlib.h"
2375as_fn_append ac_header_list " unistd.h"
2376as_fn_append ac_header_list " sys/param.h"
2377as_fn_append ac_header_list " sys/time.h"
2378as_fn_append ac_func_list " alarm"
503d2be0
AS
2379# Check that the precious variables saved in the cache have kept the same
2380# value.
2381ac_cache_corrupted=false
ca81d7a0 2382for ac_var in $ac_precious_vars; do
503d2be0
AS
2383 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2384 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
2385 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2386 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
2387 case $ac_old_set,$ac_new_set in
2388 set,)
ae1362a3 2389 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
e9a63f04 2390$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
503d2be0
AS
2391 ac_cache_corrupted=: ;;
2392 ,set)
ae1362a3 2393 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
e9a63f04 2394$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
503d2be0
AS
2395 ac_cache_corrupted=: ;;
2396 ,);;
2397 *)
2398 if test "x$ac_old_val" != "x$ac_new_val"; then
e9a63f04
GM
2399 # differences in whitespace do not lead to failure.
2400 ac_old_val_w=`echo x $ac_old_val`
2401 ac_new_val_w=`echo x $ac_new_val`
2402 if test "$ac_old_val_w" != "$ac_new_val_w"; then
ae1362a3 2403 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
e9a63f04
GM
2404$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2405 ac_cache_corrupted=:
2406 else
ae1362a3 2407 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
e9a63f04
GM
2408$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2409 eval $ac_var=\$ac_old_val
2410 fi
ae1362a3 2411 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
e9a63f04 2412$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
ae1362a3 2413 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
e9a63f04 2414$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
503d2be0
AS
2415 fi;;
2416 esac
c0d27fcc 2417 # Pass precious variables to config.status.
503d2be0
AS
2418 if test "$ac_new_set" = set; then
2419 case $ac_new_val in
e9a63f04 2420 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
2421 *) ac_arg=$ac_var=$ac_new_val ;;
2422 esac
2423 case " $ac_configure_args " in
2424 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
ae1362a3 2425 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
503d2be0
AS
2426 esac
2427 fi
2428done
2429if $ac_cache_corrupted; then
ae1362a3
AS
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2432 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
e9a63f04 2433$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
ae1362a3 2434 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
ba4481b5 2435fi
ae1362a3
AS
2436## -------------------- ##
2437## Main body of script. ##
2438## -------------------- ##
c0d27fcc 2439
ca81d7a0
JD
2440ac_ext=c
2441ac_cpp='$CPP $CPPFLAGS'
2442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2444ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 2445
6bae0ccf 2446
ca81d7a0 2447ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 2448
c0d27fcc 2449
9fb1ba80 2450
ba5da88a 2451test "$program_prefix" != NONE &&
ca81d7a0 2452 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
2453# Use a double $ so make ignores it.
2454test "$program_suffix" != NONE &&
ca81d7a0 2455 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
e9a63f04 2456# Double any \ or $.
ba5da88a 2457# By default was `s,x,x', remove it if useless.
e9a63f04
GM
2458ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2459program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
ba5da88a 2460
c0d27fcc 2461
ba4481b5
DL
2462lispdir='${datadir}/emacs/${version}/lisp'
2463locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
2464'${datadir}/emacs/site-lisp'
2465lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
2466etcdir='${datadir}/emacs/${version}/etc'
2467archlibdir='${libexecdir}/emacs/${version}/${configuration}'
2468docdir='${datadir}/emacs/${version}/etc'
24b01ec4 2469gamedir='${localstatedir}/games/emacs'
98418dba
CW
2470
2471gameuser=games
2472
c0d27fcc 2473
49adb60f 2474
00b9c927 2475
ca81d7a0 2476# Check whether --with-pop was given.
ae1362a3 2477if test "${with_pop+set}" = set; then :
00b9c927 2478 withval=$with_pop;
3d9fec71 2479else
00b9c927
MO
2480 with_pop=yes
2481fi
2482
2483if test "$with_pop" = yes; then
ae1362a3 2484 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
3d9fec71 2485
ca81d7a0 2486fi
ba4481b5 2487
c0d27fcc 2488
ca81d7a0 2489# Check whether --with-kerberos was given.
ae1362a3 2490if test "${with_kerberos+set}" = set; then :
00b9c927
MO
2491 withval=$with_kerberos;
2492else
2493 with_kerberos=no
2494fi
2495
ff1095d1 2496if test "$with_kerberos" != no; then
ae1362a3 2497 $as_echo "#define KERBEROS 1" >>confdefs.h
a21616bd 2498
ca81d7a0 2499fi
c0d27fcc 2500
c0d27fcc 2501
ca81d7a0 2502# Check whether --with-kerberos5 was given.
ae1362a3 2503if test "${with_kerberos5+set}" = set; then :
00b9c927
MO
2504 withval=$with_kerberos5;
2505else
2506 with_kerberos5=no
2507fi
2508
ff1095d1
AR
2509if test "${with_kerberos5}" != no; then
2510 if test "${with_kerberos}" = no; then
a21616bd 2511 with_kerberos=yes
ae1362a3 2512 $as_echo "#define KERBEROS 1" >>confdefs.h
a21616bd
KR
2513
2514 fi
b936fae4 2515
ae1362a3 2516$as_echo "#define KERBEROS5 1" >>confdefs.h
a21616bd 2517
ca81d7a0 2518fi
b936fae4 2519
49adb60f 2520
ca81d7a0 2521# Check whether --with-hesiod was given.
ae1362a3 2522if test "${with_hesiod+set}" = set; then :
00b9c927
MO
2523 withval=$with_hesiod;
2524else
2525 with_hesiod=no
2526fi
2527
ff1095d1 2528if test "$with_hesiod" != no; then
54e6585f 2529
ae1362a3 2530$as_echo "#define HESIOD 1" >>confdefs.h
ba4481b5 2531
ca81d7a0 2532fi
c0d27fcc 2533
c0d27fcc 2534
ca81d7a0 2535# Check whether --with-sound was given.
ae1362a3 2536if test "${with_sound+set}" = set; then :
ca81d7a0 2537 withval=$with_sound;
00b9c927
MO
2538else
2539 with_sound=yes
ca81d7a0 2540fi
2c9dccc9 2541
2c9dccc9 2542
c0d27fcc 2543
a51f4969 2544# Check whether --with-sync-input was given.
ae1362a3 2545if test "${with_sync_input+set}" = set; then :
a51f4969
SM
2546 withval=$with_sync_input;
2547else
2548 with_sync_input=yes
2549fi
2550
2551if test "$with_sync_input" = yes; then
2552
ae1362a3 2553$as_echo "#define SYNC_INPUT 1" >>confdefs.h
a51f4969
SM
2554
2555fi
2556
2557
ca81d7a0 2558# Check whether --with-x-toolkit was given.
ae1362a3 2559if test "${with_x_toolkit+set}" = set; then :
ca81d7a0 2560 withval=$with_x_toolkit; case "${withval}" in
089a966d 2561 y | ye | yes ) val=gtk ;;
ba4481b5
DL
2562 n | no ) val=no ;;
2563 l | lu | luc | luci | lucid ) val=lucid ;;
2564 a | at | ath | athe | athen | athena ) val=athena ;;
2565 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 2566 g | gt | gtk ) val=gtk ;;
ba4481b5 2567 * )
ae1362a3 2568as_fn_error $? "\`--with-x-toolkit=$withval' is invalid;
488dd4c4 2569this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
ae1362a3 2570\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
ba4481b5
DL
2571 ;;
2572 esac
2573 with_x_toolkit=$val
2574
ca81d7a0 2575fi
8eeae1c9 2576
ba4481b5 2577
49adb60f 2578
ca81d7a0 2579# Check whether --with-xpm was given.
ae1362a3 2580if test "${with_xpm+set}" = set; then :
ca81d7a0 2581 withval=$with_xpm;
00b9c927 2582else
c8467c40 2583 with_xpm=yes
ca81d7a0 2584fi
503d2be0 2585
ba4481b5 2586
ca81d7a0 2587# Check whether --with-jpeg was given.
ae1362a3 2588if test "${with_jpeg+set}" = set; then :
ca81d7a0 2589 withval=$with_jpeg;
00b9c927 2590else
c8467c40 2591 with_jpeg=yes
ca81d7a0 2592fi
503d2be0 2593
ba4481b5 2594
ca81d7a0 2595# Check whether --with-tiff was given.
ae1362a3 2596if test "${with_tiff+set}" = set; then :
ca81d7a0 2597 withval=$with_tiff;
00b9c927 2598else
c8467c40 2599 with_tiff=yes
ca81d7a0 2600fi
503d2be0 2601
ba4481b5 2602
ca81d7a0 2603# Check whether --with-gif was given.
ae1362a3 2604if test "${with_gif+set}" = set; then :
ca81d7a0 2605 withval=$with_gif;
00b9c927 2606else
c8467c40 2607 with_gif=yes
ca81d7a0 2608fi
503d2be0 2609
ba4481b5 2610
ca81d7a0 2611# Check whether --with-png was given.
ae1362a3 2612if test "${with_png+set}" = set; then :
ca81d7a0 2613 withval=$with_png;
00b9c927 2614else
c8467c40 2615 with_png=yes
ca81d7a0 2616fi
503d2be0 2617
ba4481b5 2618
0cfc0546 2619# Check whether --with-rsvg was given.
ae1362a3 2620if test "${with_rsvg+set}" = set; then :
0cfc0546 2621 withval=$with_rsvg;
00b9c927 2622else
c8467c40 2623 with_rsvg=yes
0cfc0546
GM
2624fi
2625
2626
c8467c40 2627
c24fa7dc 2628# Check whether --with-xft was given.
ae1362a3 2629if test "${with_xft+set}" = set; then :
c24fa7dc 2630 withval=$with_xft;
d235ca2f 2631else
4efcc8d1 2632 with_xft=yes
c24fa7dc 2633fi
45a4b03e 2634
45a4b03e 2635
d235ca2f 2636# Check whether --with-libotf was given.
ae1362a3 2637if test "${with_libotf+set}" = set; then :
d235ca2f
MB
2638 withval=$with_libotf;
2639else
2640 with_libotf=yes
79011b82
NR
2641fi
2642
2643
d235ca2f 2644# Check whether --with-m17n-flt was given.
ae1362a3 2645if test "${with_m17n_flt+set}" = set; then :
d235ca2f
MB
2646 withval=$with_m17n_flt;
2647else
2648 with_m17n_flt=yes
0cfc0546
GM
2649fi
2650
2651
d235ca2f 2652
ca81d7a0 2653# Check whether --with-toolkit-scroll-bars was given.
ae1362a3 2654if test "${with_toolkit_scroll_bars+set}" = set; then :
ca81d7a0 2655 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2656else
2657 with_toolkit_scroll_bars=yes
ca81d7a0 2658fi
503d2be0 2659
ba4481b5 2660
e35a28cd 2661# Check whether --with-xaw3d was given.
ae1362a3 2662if test "${with_xaw3d+set}" = set; then :
e35a28cd 2663 withval=$with_xaw3d;
00b9c927
MO
2664else
2665 with_xaw3d=yes
c982cf7d
JD
2666fi
2667
2668
ca81d7a0 2669# Check whether --with-xim was given.
ae1362a3 2670if test "${with_xim+set}" = set; then :
ca81d7a0 2671 withval=$with_xim;
00b9c927
MO
2672else
2673 with_xim=yes
ca81d7a0 2674fi
1d36487c 2675
ba4481b5 2676
edfda783 2677# Check whether --with-ns was given.
ae1362a3 2678if test "${with_ns+set}" = set; then :
edfda783
AR
2679 withval=$with_ns;
2680else
2681 with_ns=no
2682fi
2683
2684
c8467c40
GM
2685
2686# Check whether --with-gpm was given.
ae1362a3 2687if test "${with_gpm+set}" = set; then :
c8467c40
GM
2688 withval=$with_gpm;
2689else
2690 with_gpm=yes
ca81d7a0 2691fi
e0f712ba 2692
49adb60f 2693
131e4133 2694# Check whether --with-dbus was given.
ae1362a3 2695if test "${with_dbus+set}" = set; then :
131e4133 2696 withval=$with_dbus;
00b9c927 2697else
b5a922de 2698 with_dbus=yes
131e4133
MA
2699fi
2700
2701
637fa988 2702# Check whether --with-gconf was given.
ae1362a3 2703if test "${with_gconf+set}" = set; then :
637fa988
JD
2704 withval=$with_gconf;
2705else
2706 with_gconf=yes
2707fi
2708
2709
921fbdf0
GM
2710## For the times when you want to build Emacs but don't have
2711## a suitable makeinfo, and can live without the manuals.
2712
2713# Check whether --with-makeinfo was given.
ae1362a3 2714if test "${with_makeinfo+set}" = set; then :
921fbdf0
GM
2715 withval=$with_makeinfo;
2716else
2717 with_makeinfo=yes
2718fi
2719
2720
e70b2110 2721
9d2818d6 2722# Check whether --with-gtk was given.
ae1362a3
AS
2723if test "${with_gtk+set}" = set; then :
2724 withval=$with_gtk; as_fn_error $? "--with-gtk has been removed. Use --with-x-toolkit to
2725specify a toolkit." "$LINENO" 5
9d2818d6
DN
2726fi
2727
2728
2729
2730# Check whether --with-gcc was given.
ae1362a3
AS
2731if test "${with_gcc+set}" = set; then :
2732 withval=$with_gcc; as_fn_error $? "--with-gcc has been removed. Set the \`CC' environment
2733variable to specify a compiler." "$LINENO" 5
9d2818d6
DN
2734fi
2735
2736
2737
00b9c927 2738# Check whether --with-pkg-config-prog was given.
ae1362a3 2739if test "${with_pkg_config_prog+set}" = set; then :
00b9c927 2740 withval=$with_pkg_config_prog;
e70b2110
KH
2741fi
2742
00b9c927
MO
2743if test "X${with_pkg_config_prog}" != X; then
2744 if test "${with_pkg_config_prog}" != yes; then
2745 PKG_CONFIG="${with_pkg_config_prog}"
2746 fi
2747fi
e70b2110 2748
a7702be6
CY
2749CRT_DIR=
2750
2751# Check whether --with-crt-dir was given.
2752if test "${with_crt_dir+set}" = set; then :
2753 withval=$with_crt_dir;
2754fi
2755
2756CRT_DIR="${with_crt_dir}"
2757
ecd43cb9
GM
2758
2759# Check whether --with-gnustep-conf was given.
ae1362a3 2760if test "${with_gnustep_conf+set}" = set; then :
ecd43cb9
GM
2761 withval=$with_gnustep_conf;
2762fi
2763
2764test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2765 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2766test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2767 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
2768
06b62770 2769# Check whether --enable-ns-self-contained was given.
ae1362a3 2770if test "${enable_ns_self_contained+set}" = set; then :
6b8bc489 2771 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
06b62770
AR
2772else
2773 EN_NS_SELF_CONTAINED=yes
2774fi
2775
2776
c24fa7dc 2777# Check whether --enable-asserts was given.
ae1362a3 2778if test "${enable_asserts+set}" = set; then :
ca81d7a0 2779 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2780else
2781 USE_XASSERTS=no
ca81d7a0 2782fi
8eeae1c9 2783
d0098f13 2784
ca81d7a0 2785# Check whether --enable-maintainer-mode was given.
ae1362a3 2786if test "${enable_maintainer_mode+set}" = set; then :
ca81d7a0 2787 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2788else
2789 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2790fi
2791
19650fd6
AS
2792if test $USE_MAINTAINER_MODE = yes; then
2793 MAINT=
2794else
2795 MAINT=#
2796fi
2797
2798
ca81d7a0 2799# Check whether --enable-locallisppath was given.
ae1362a3 2800if test "${enable_locallisppath+set}" = set; then :
ca81d7a0 2801 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2802 locallisppath=
2803elif test "${enableval}" != "yes"; then
2804 locallisppath=${enableval}
2805fi
ca81d7a0
JD
2806fi
2807
9adfabc2 2808
29771094 2809# Check whether --enable-checking was given.
ae1362a3 2810if test "${enable_checking+set}" = set; then :
29771094
DN
2811 enableval=$enable_checking; ac_checking_flags="${enableval}"
2812fi
2813
2814IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2815for check in $ac_checking_flags
2816do
2817 case $check in
2818 # these set all the flags to specific states
2819 yes) ac_enable_checking=1 ;;
2820 no) ac_enable_checking= ;
2821 ac_gc_check_stringbytes= ;
2822 ac_gc_check_string_overrun= ;
2823 ac_gc_check_string_free_list= ;
2824 ac_xmalloc_overrun= ;
2825 ac_gc_check_cons_list= ;;
2826 all) ac_enable_checking=1 ;
2827 ac_gc_check_stringbytes=1 ;
2828 ac_gc_check_string_overrun=1 ;
2829 ac_gc_check_string_free_list=1 ;
2830 ac_xmalloc_overrun=1 ;
2831 ac_gc_check_cons_list=1 ;;
2832 # these enable particular checks
2833 stringbytes) ac_gc_check_stringbytes=1 ;;
2834 stringoverrun) ac_gc_check_string_overrun=1 ;;
2835 stringfreelist) ac_gc_check_string_free_list=1 ;;
2836 xmallocoverrun) ac_xmalloc_overrun=1 ;;
2837 conslist) ac_gc_check_cons_list=1 ;;
ae1362a3 2838 *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;;
29771094
DN
2839 esac
2840done
2841IFS="$ac_save_IFS"
2842
2843if test x$ac_enable_checking != x ; then
2844
ae1362a3 2845$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
29771094
DN
2846
2847fi
2848if test x$ac_gc_check_stringbytes != x ; then
2849
ae1362a3 2850$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
29771094
DN
2851
2852fi
2853if test x$ac_gc_check_stringoverrun != x ; then
2854
ae1362a3 2855$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
29771094
DN
2856
2857fi
2858if test x$ac_gc_check_string_free_list != x ; then
2859
ae1362a3 2860$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
29771094
DN
2861
2862fi
2863if test x$ac_xmalloc_overrun != x ; then
2864
ae1362a3 2865$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
29771094
DN
2866
2867fi
2868if test x$ac_gc_check_cons_list != x ; then
2869
ae1362a3 2870$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
29771094
DN
2871
2872fi
2873
9fe40f0e 2874# Check whether --enable-profiling was given.
ae1362a3 2875if test "${enable_profiling+set}" = set; then :
9fe40f0e
DN
2876 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
2877fi
2878
2879if test x$ac_enable_profiling != x ; then
2880 PROFILING_CFLAGS="-DPROFILING=1 -pg"
2881 PROFILING_LDFLAGS="-pg"
2882else
2883 PROFILING_CFLAGS=
2884 PROFILING_LDFLAGS=
2885fi
2886
a53cfbe5 2887# Check whether --enable-autodepend was given.
ae1362a3 2888if test "${enable_autodepend+set}" = set; then :
a53cfbe5
JD
2889 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
2890else
2891 ac_enable_autodepend=yes
2892fi
2893
2894
ba4481b5 2895#### Make srcdir absolute, if it isn't already. It's important to
17494071 2896#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2897#### give you automounter prefixes, which can go away. We do all this
2898#### so Emacs can find its files when run uninstalled.
17494071
GM
2899## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2900unset CDPATH
ba4481b5
DL
2901case "${srcdir}" in
2902 /* ) ;;
2903 . )
2904 ## We may be able to use the $PWD environment variable to make this
2905 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2906 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2907 ## but that tested only for a well-formed and valid PWD,
2908 ## it did not object when PWD was well-formed and valid but just wrong.
2909 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2910 then
2911 srcdir="$PWD"
2912 else
2913 srcdir="`(cd ${srcdir}; pwd)`"
2914 fi
2915 ;;
2916 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2917esac
2918
2919#### Check if the source directory already has a configured system in it.
2920if test `pwd` != `(cd ${srcdir} && pwd)` \
2921 && test -f "${srcdir}/src/config.h" ; then
ae1362a3 2922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2923 as a build directory right now; it has been configured in its own
2924 right. To configure in another directory as well, you MUST
2925 use GNU make. If you do not have GNU make, then you must
2926 now do \`make distclean' in ${srcdir},
2927 and then run $0 again." >&5
e9a63f04 2928$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2929 as a build directory right now; it has been configured in its own
2930 right. To configure in another directory as well, you MUST
2931 use GNU make. If you do not have GNU make, then you must
2932 now do \`make distclean' in ${srcdir},
503d2be0 2933 and then run $0 again." >&2;}
ba4481b5
DL
2934fi
2935
2936#### Given the configuration name, set machfile and opsysfile to the
2937#### names of the m/*.h and s/*.h files we should use.
2938
2939### Canonicalize the configuration name.
2940
2941ac_aux_dir=
ca81d7a0 2942for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
bf89cb4d
GM
2943 if test -f "$ac_dir/install-sh"; then
2944 ac_aux_dir=$ac_dir
2945 ac_install_sh="$ac_aux_dir/install-sh -c"
2946 break
2947 elif test -f "$ac_dir/install.sh"; then
2948 ac_aux_dir=$ac_dir
2949 ac_install_sh="$ac_aux_dir/install.sh -c"
2950 break
2951 elif test -f "$ac_dir/shtool"; then
2952 ac_aux_dir=$ac_dir
2953 ac_install_sh="$ac_aux_dir/shtool install -c"
2954 break
2955 fi
ba4481b5
DL
2956done
2957if test -z "$ac_aux_dir"; then
ae1362a3 2958 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
ba4481b5 2959fi
ca81d7a0
JD
2960
2961# These three variables are undocumented and unsupported,
2962# and are intended to be withdrawn in a future Autoconf release.
2963# They can cause serious problems if a builder's source tree is in a directory
2964# whose full name contains unusual characters.
2965ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2966ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2967ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2968
ba4481b5
DL
2969
2970# Make sure we can run config.sub.
ca81d7a0 2971$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
ae1362a3 2972 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
503d2be0 2973
ae1362a3 2974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
e9a63f04 2975$as_echo_n "checking build system type... " >&6; }
ae1362a3 2976if test "${ac_cv_build+set}" = set; then :
e9a63f04 2977 $as_echo_n "(cached) " >&6
503d2be0 2978else
ca81d7a0
JD
2979 ac_build_alias=$build_alias
2980test "x$ac_build_alias" = x &&
2981 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2982test "x$ac_build_alias" = x &&
ae1362a3 2983 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ca81d7a0 2984ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
ae1362a3 2985 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
503d2be0
AS
2986
2987fi
ae1362a3 2988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
e9a63f04 2989$as_echo "$ac_cv_build" >&6; }
ca81d7a0
JD
2990case $ac_cv_build in
2991*-*-*) ;;
ae1362a3 2992*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
ca81d7a0 2993esac
503d2be0 2994build=$ac_cv_build
ca81d7a0
JD
2995ac_save_IFS=$IFS; IFS='-'
2996set x $ac_cv_build
2997shift
2998build_cpu=$1
2999build_vendor=$2
3000shift; shift
3001# Remember, the first character of IFS is used to create $*,
3002# except with old shells:
3003build_os=$*
3004IFS=$ac_save_IFS
3005case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3006
3007
ae1362a3 3008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
e9a63f04 3009$as_echo_n "checking host system type... " >&6; }
ae1362a3 3010if test "${ac_cv_host+set}" = set; then :
e9a63f04 3011 $as_echo_n "(cached) " >&6
503d2be0 3012else
ca81d7a0
JD
3013 if test "x$host_alias" = x; then
3014 ac_cv_host=$ac_cv_build
3015else
3016 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
ae1362a3 3017 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
ca81d7a0 3018fi
503d2be0
AS
3019
3020fi
ae1362a3 3021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
e9a63f04 3022$as_echo "$ac_cv_host" >&6; }
ca81d7a0
JD
3023case $ac_cv_host in
3024*-*-*) ;;
ae1362a3 3025*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
ca81d7a0 3026esac
503d2be0 3027host=$ac_cv_host
ca81d7a0
JD
3028ac_save_IFS=$IFS; IFS='-'
3029set x $ac_cv_host
3030shift
3031host_cpu=$1
3032host_vendor=$2
3033shift; shift
3034# Remember, the first character of IFS is used to create $*,
3035# except with old shells:
3036host_os=$*
3037IFS=$ac_save_IFS
3038case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 3039
c0d27fcc 3040
ba4481b5 3041canonical=$host
1770dcdc 3042configuration=${host_alias-${build_alias-$host}}
ba4481b5 3043
c0d27fcc 3044
22044edf 3045
ba4481b5
DL
3046### If you add support for a new configuration, add code to this
3047### switch statement to recognize your configuration name and select
3048### the appropriate operating system and machine description files.
3049
3050### You would hope that you could choose an m/*.h file pretty much
3051### based on the machine portion of the configuration name, and an s-
3052### file based on the operating system portion. However, it turns out
3053### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
3054### example mips.h is MIPS
3055### So we basically have to have a special case for each
ba4481b5
DL
3056### configuration name.
3057###
3058### As far as handling version numbers on operating systems is
3059### concerned, make sure things will fail in a fixable way. If
3060### /etc/MACHINES doesn't say anything about version numbers, be
3061### prepared to handle anything reasonably. If version numbers
3062### matter, be sure /etc/MACHINES says something about it.
3063###
3064### Eric Raymond says we should accept strings like "sysvr4" to mean
3065### "System V Release 4"; he writes, "The old convention encouraged
3066### confusion between `system' and `release' levels'."
3067
3068machine='' opsys='' unported=no
3069case "${canonical}" in
3070
1096bcc0 3071 ## FreeBSD ports
6b0273cd 3072 *-*-freebsd* )
1096bcc0
GM
3073 opsys=freebsd
3074 case "${canonical}" in
3075 alpha*-*-freebsd*) machine=alpha ;;
ece58427 3076 arm*-*-freebsd*) machine=arm ;;
ec8fcb10 3077 ia64-*-freebsd*) machine=ia64 ;;
ff1095d1 3078 sparc-*-freebsd*) machine=sparc ;;
ec8fcb10
YM
3079 sparc64-*-freebsd*) machine=sparc ;;
3080 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 3081 i[3456]86-*-freebsd*) machine=intel386 ;;
6b0273cd 3082 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
3083 esac
3084 ;;
3085
1b275743
GM
3086 ## FreeBSD kernel + glibc based userland
3087 *-*-kfreebsd*gnu* )
3088 opsys=gnu-kfreebsd
3089 case "${canonical}" in
3090 alpha*-*-kfreebsd*) machine=alpha ;;
3091 ia64-*-kfreebsd*) machine=ia64 ;;
edfda783 3092 sparc-*-kfreebsd*) machine=sparc ;;
1b275743
GM
3093 sparc64-*-kfreebsd*) machine=sparc ;;
3094 powerpc-*-kfreebsd*) machine=macppc ;;
3095 i[3456]86-*-kfreebsd*) machine=intel386 ;;
3096 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
3097 esac
3098 ;;
3099
ba4481b5
DL
3100 ## NetBSD ports
3101 *-*-netbsd* )
3102 opsys=netbsd
dd038e26 3103 if test -f /usr/lib/crti.o; then
f57bd967 3104
ae1362a3 3105$as_echo "#define HAVE_CRTIN /**/" >>confdefs.h
dd038e26
AS
3106
3107 fi
3108
ba4481b5
DL
3109 case "${canonical}" in
3110 alpha*-*-netbsd*) machine=alpha ;;
3111 i[3456]86-*-netbsd*) machine=intel386 ;;
6978862d
DN
3112 mips-*-netbsd*) machine=mips ;;
3113 mipsel-*-netbsd*) machine=mips ;;
3114 mipseb-*-netbsd*) machine=mips ;;
3a64eef5 3115 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 3116 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 3117 vax-*-netbsd*) machine=vax ;;
2df636f4 3118 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
3119 x86_64-*-netbsd*) machine=amdx86-64 ;;
3120 hppa-*-netbsd*) machine=hp800 ;;
a078d6e5 3121 m68k-*-netbsd*) machine=m68k ;;
ba4481b5
DL
3122 esac
3123 ;;
3124
3125 ## OpenBSD ports
3126 *-*-openbsd* )
3127 opsys=openbsd
3128 case "${canonical}" in
3129 alpha*-*-openbsd*) machine=alpha ;;
85410b02 3130 arm-*-openbsd*) machine=arm ;;
85410b02 3131 i386-*-openbsd*) machine=intel386 ;;
85410b02 3132 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
3133 sparc*-*-openbsd*) machine=sparc ;;
3134 vax-*-openbsd*) machine=vax ;;
3135 x86_64-*-openbsd*) machine=amdx86-64 ;;
8bff6137 3136 hppa-*-openbsd*) machine=hp800 ;;
ba4481b5
DL
3137 esac
3138 ;;
3139
10a3b1a1
EZ
3140 ## LynxOS ports
3141 *-*-lynxos* )
3142 opsys=lynxos
3143 case "${canonical}" in
3144 i[3456]86-*-lynxos*) machine=intel386 ;;
3145 powerpc-*-lynxos*) machine=powerpc ;;
3146 esac
3147 ;;
3148
ba4481b5
DL
3149 alpha*-*-linux-gnu* )
3150 machine=alpha opsys=gnu-linux
3151 ;;
3152
c4bb2108
DL
3153 arm*-*-linux-gnu* )
3154 machine=arm opsys=gnu-linux
3155 ;;
3156
040c474e
CY
3157 ## Apple Darwin / Mac OS X
3158 *-apple-darwin* )
3159 case "${canonical}" in
3160 i[3456]86-* ) machine=intel386 ;;
40dde9d1 3161 powerpc-* ) machine=macppc ;;
91231421 3162 x86_64-* ) machine=amdx86-64 ;;
040c474e
CY
3163 * ) unported=yes ;;
3164 esac
3165 opsys=darwin
3166 # Define CPP as follows to make autoconf work correctly.
3167 CPP="${CC-cc} -E -no-cpp-precomp"
3168 # Use fink packages if available.
3169 if test -d /sw/include && test -d /sw/lib; then
3170 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3171 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3172 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3173 fi
3174 ;;
3175
6fbb6db1 3176 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
3177 hppa*-hp-hpux10.2* )
3178 machine=hp800 opsys=hpux10-20
3179 ;;
6fbb6db1
GM
3180 hppa*-hp-hpux1[1-9]* )
3181 machine=hp800 opsys=hpux11
3182 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
3183 ;;
3184
409d9577
GM
3185 hppa*-*-linux-gnu* )
3186 machine=hp800 opsys=gnu-linux
3187 ;;
3188
ba4481b5 3189 ## IBM machines
55597d70 3190 s390-*-linux-gnu* )
138f0859
GM
3191 machine=ibms390 opsys=gnu-linux
3192 ;;
bcdb1378
EZ
3193 s390x-*-linux-gnu* )
3194 machine=ibms390x opsys=gnu-linux
3195 ;;
ba4481b5
DL
3196 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
3197 machine=ibmrs6000 opsys=aix4-2
3198 ;;
67bf991b
CY
3199 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
3200 machine=ibmrs6000 opsys=aix4-2
3201 ;;
55597d70 3202 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
3203 machine=ibmrs6000 opsys=aix4-2
3204 ;;
1e447232 3205 rs6000-ibm-aix6* | powerpc-ibm-aix6* )
26a42dac
DN
3206 machine=ibmrs6000 opsys=aix4-2
3207 ;;
ba4481b5 3208
c76e04a8
GM
3209 ## Macintosh PowerPC
3210 powerpc*-*-linux-gnu* )
3211 machine=macppc opsys=gnu-linux
3212 ;;
3213
ba4481b5 3214 ## Silicon Graphics machines
ba4481b5 3215 ## Iris 4D
ba4481b5
DL
3216 mips-sgi-irix6.5 )
3217 machine=iris4d opsys=irix6-5
946173ad
DL
3218 # Without defining _LANGUAGE_C, things get masked out in the headers
3219 # so that, for instance, grepping for `free' in stdlib.h fails and
3220 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3221 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 3222 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 3223 ;;
ba4481b5 3224
ba4481b5
DL
3225 ## Suns
3226 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3227 machine=sparc opsys=gnu-linux
3228 ;;
3229
176fe5fc 3230 *-sun-solaris* \
7c54c0a0
DN
3231 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3232 | x86_64-*-solaris2* | x86_64-*-sunos5* \
3233 | powerpc*-*-solaris2* | rs6000-*-solaris2*)
ba4481b5 3234 case "${canonical}" in
ba4481b5 3235 i[3456]86-*-* ) machine=intel386 ;;
af46e133 3236 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
3237 powerpc* | rs6000* ) machine=ibmrs6000 ;;
3238 sparc* ) machine=sparc ;;
3239 * ) unported=yes ;;
3240 esac
3241 case "${canonical}" in
ba4481b5
DL
3242 *-sunos5.3* | *-solaris2.3* )
3243 opsys=sol2-3
3244 NON_GNU_CPP=/usr/ccs/lib/cpp
3245 ;;
3246 *-sunos5.4* | *-solaris2.4* )
3247 opsys=sol2-4
3248 NON_GNU_CPP=/usr/ccs/lib/cpp
3249 RANLIB="ar -ts"
3250 ;;
3251 *-sunos5.5* | *-solaris2.5* )
3252 opsys=sol2-5
3253 NON_GNU_CPP=/usr/ccs/lib/cpp
3254 RANLIB="ar -ts"
3255 ;;
8e967cf7
MR
3256 *-sunos5.6* | *-solaris2.6* )
3257 opsys=sol2-6
3258 NON_GNU_CPP=/usr/ccs/lib/cpp
3259 RANLIB="ar -ts"
3260 ;;
2194ea1c 3261 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
9e71690e 3262 opsys=sol2-6
089a966d
GM
3263 emacs_check_sunpro_c=yes
3264 NON_GNU_CPP=/usr/ccs/lib/cpp
6623890a 3265 ;;
9b3362b8
DN
3266 *-sunos5* | *-solaris* )
3267 opsys=sol2-10
3268 emacs_check_sunpro_c=yes
3269 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 3270 ;;
ba4481b5
DL
3271 esac
3272 ## Watch out for a compiler that we know will not work.
3273 case "${canonical}" in
3274 *-solaris* | *-sunos5* )
3275 if [ "x$CC" = x/usr/ucb/cc ]; then
3276 ## /usr/ucb/cc doesn't work;
3277 ## we should find some other compiler that does work.
3278 unset CC
3279 fi
3280 ;;
3281 *) ;;
3282 esac
3283 ;;
ba4481b5 3284
f4988be7
GM
3285 ## IA-64
3286 ia64*-*-linux* )
3287 machine=ia64 opsys=gnu-linux
3288 ;;
3289
ba4481b5
DL
3290 ## Intel 386 machines where we don't care about the manufacturer
3291 i[3456]86-*-* )
3292 machine=intel386
3293 case "${canonical}" in
c60ee5e7 3294 *-cygwin ) opsys=cygwin ;;
eae54018 3295 *-darwin* ) opsys=darwin
23fd4483
ST
3296 CPP="${CC-cc} -E -no-cpp-precomp"
3297 ;;
ba4481b5 3298 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 3299 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3300 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3301 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
3302 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3303 esac
3304 ;;
3305
3306 ## m68k Linux-based GNU system
3307 m68k-*-linux-gnu* )
3308 machine=m68k opsys=gnu-linux
3309 ;;
3310
3311 ## Mips Linux-based GNU system
8bff6137
GM
3312 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3313 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
ba4481b5
DL
3314 machine=mips opsys=gnu-linux
3315 ;;
3316
598a2813
AS
3317 ## AMD x86-64 Linux-based GNU system
3318 x86_64-*-linux-gnu* )
24b01ec4 3319 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3320 ;;
3321
94218e27 3322 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 3323 xtensa*-*-linux-gnu* )
94218e27
DN
3324 machine=xtensa opsys=gnu-linux
3325 ;;
3326
fac5dc61
DN
3327 ## SuperH Linux-based GNU system
3328 sh[34]*-*-linux-gnu* )
3329 machine=sh3 opsys=gnu-linux
3330 ;;
3331
ba4481b5
DL
3332 * )
3333 unported=yes
3334 ;;
3335esac
3336
3337### If the code above didn't choose an operating system, just choose
3338### an operating system based on the configuration name. You really
3339### only want to use this when you have no idea what the right
3340### operating system is; if you know what operating systems a machine
3341### runs, it's cleaner to make it explicit in the case statement
3342### above.
3343if test x"${opsys}" = x; then
3344 case "${canonical}" in
3345 *-gnu* ) opsys=gnu ;;
ba4481b5 3346 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3347 *-sysv5uw* ) opsys=unixware ;;
3348 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3349 *-sysv4.1* | *-sysvr4.1* )
3350 NON_GNU_CPP=/usr/lib/cpp
3351 opsys=usg5-4 ;;
3352 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3353 if [ x$NON_GNU_CPP = x ]; then
3354 if [ -f /usr/ccs/lib/cpp ]; then
3355 NON_GNU_CPP=/usr/ccs/lib/cpp
3356 else
3357 NON_GNU_CPP=/lib/cpp
3358 fi
3359 fi
3360 opsys=usg5-4-2 ;;
3361 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3362 * )
3363 unported=yes
3364 ;;
3365 esac
3366fi
3367
c0d27fcc 3368
22044edf 3369
ba4481b5 3370if test $unported = yes; then
ae1362a3
AS
3371 as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems.
3372Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
ba4481b5
DL
3373fi
3374
3375machfile="m/${machine}.h"
3376opsysfile="s/${opsys}.h"
3377
c0d27fcc 3378
ba4481b5
DL
3379#### Choose a compiler.
3380test -n "$CC" && cc_specified=yes
3381
3382# Save the value of CFLAGS that the user specified.
3383SPECIFIED_CFLAGS="$CFLAGS"
3384
503d2be0
AS
3385ac_ext=c
3386ac_cpp='$CPP $CPPFLAGS'
3387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3389ac_compiler_gnu=$ac_cv_c_compiler_gnu
3390if test -n "$ac_tool_prefix"; then
3391 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3392set dummy ${ac_tool_prefix}gcc; ac_word=$2
ae1362a3 3393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3394$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3395if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3396 $as_echo_n "(cached) " >&6
ba4481b5
DL
3397else
3398 if test -n "$CC"; then
3399 ac_cv_prog_CC="$CC" # Let the user override the test.
3400else
c0d27fcc
MR
3401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3402for as_dir in $PATH
3403do
3404 IFS=$as_save_IFS
3405 test -z "$as_dir" && as_dir=.
ae1362a3 3406 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3407 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3408 ac_cv_prog_CC="${ac_tool_prefix}gcc"
ae1362a3 3409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3410 break 2
3411 fi
3412done
ae1362a3 3413 done
ca81d7a0 3414IFS=$as_save_IFS
503d2be0 3415
ba4481b5
DL
3416fi
3417fi
503d2be0 3418CC=$ac_cv_prog_CC
ba4481b5 3419if test -n "$CC"; then
ae1362a3 3420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
e9a63f04 3421$as_echo "$CC" >&6; }
503d2be0 3422else
ae1362a3 3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3424$as_echo "no" >&6; }
503d2be0
AS
3425fi
3426
ca81d7a0 3427
503d2be0
AS
3428fi
3429if test -z "$ac_cv_prog_CC"; then
3430 ac_ct_CC=$CC
3431 # Extract the first word of "gcc", so it can be a program name with args.
3432set dummy gcc; ac_word=$2
ae1362a3 3433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3434$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3435if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
e9a63f04 3436 $as_echo_n "(cached) " >&6
503d2be0
AS
3437else
3438 if test -n "$ac_ct_CC"; then
3439 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3440else
c0d27fcc
MR
3441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3442for as_dir in $PATH
3443do
3444 IFS=$as_save_IFS
3445 test -z "$as_dir" && as_dir=.
ae1362a3 3446 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3447 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3448 ac_cv_prog_ac_ct_CC="gcc"
ae1362a3 3449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3450 break 2
3451 fi
3452done
ae1362a3 3453 done
ca81d7a0 3454IFS=$as_save_IFS
503d2be0
AS
3455
3456fi
3457fi
3458ac_ct_CC=$ac_cv_prog_ac_ct_CC
3459if test -n "$ac_ct_CC"; then
ae1362a3 3460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
e9a63f04 3461$as_echo "$ac_ct_CC" >&6; }
ba4481b5 3462else
ae1362a3 3463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3464$as_echo "no" >&6; }
503d2be0
AS
3465fi
3466
ca81d7a0
JD
3467 if test "x$ac_ct_CC" = x; then
3468 CC=""
3469 else
3470 case $cross_compiling:$ac_tool_warned in
3471yes:)
ae1362a3
AS
3472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ca81d7a0
JD
3474ac_tool_warned=yes ;;
3475esac
3476 CC=$ac_ct_CC
3477 fi
503d2be0
AS
3478else
3479 CC="$ac_cv_prog_CC"
ba4481b5
DL
3480fi
3481
3482if test -z "$CC"; then
ca81d7a0
JD
3483 if test -n "$ac_tool_prefix"; then
3484 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3485set dummy ${ac_tool_prefix}cc; ac_word=$2
ae1362a3 3486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3487$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3488if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3489 $as_echo_n "(cached) " >&6
ba4481b5
DL
3490else
3491 if test -n "$CC"; then
3492 ac_cv_prog_CC="$CC" # Let the user override the test.
3493else
c0d27fcc
MR
3494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3495for as_dir in $PATH
3496do
3497 IFS=$as_save_IFS
3498 test -z "$as_dir" && as_dir=.
ae1362a3 3499 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3500 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3501 ac_cv_prog_CC="${ac_tool_prefix}cc"
ae1362a3 3502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3503 break 2
3504 fi
3505done
ae1362a3 3506 done
ca81d7a0 3507IFS=$as_save_IFS
503d2be0
AS
3508
3509fi
3510fi
3511CC=$ac_cv_prog_CC
3512if test -n "$CC"; then
ae1362a3 3513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
e9a63f04 3514$as_echo "$CC" >&6; }
503d2be0 3515else
ae1362a3 3516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3517$as_echo "no" >&6; }
503d2be0
AS
3518fi
3519
503d2be0 3520
ca81d7a0 3521 fi
503d2be0
AS
3522fi
3523if test -z "$CC"; then
3524 # Extract the first word of "cc", so it can be a program name with args.
3525set dummy cc; ac_word=$2
ae1362a3 3526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3527$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3528if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3529 $as_echo_n "(cached) " >&6
503d2be0
AS
3530else
3531 if test -n "$CC"; then
3532 ac_cv_prog_CC="$CC" # Let the user override the test.
3533else
3534 ac_prog_rejected=no
c0d27fcc
MR
3535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3536for as_dir in $PATH
3537do
3538 IFS=$as_save_IFS
3539 test -z "$as_dir" && as_dir=.
ae1362a3 3540 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3541 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3542 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3543 ac_prog_rejected=yes
3544 continue
3545 fi
3546 ac_cv_prog_CC="cc"
ae1362a3 3547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3548 break 2
3549 fi
3550done
ae1362a3 3551 done
ca81d7a0 3552IFS=$as_save_IFS
503d2be0 3553
ba4481b5
DL
3554if test $ac_prog_rejected = yes; then
3555 # We found a bogon in the path, so make sure we never use it.
3556 set dummy $ac_cv_prog_CC
3557 shift
503d2be0 3558 if test $# != 0; then
ba4481b5
DL
3559 # We chose a different compiler from the bogus one.
3560 # However, it has the same basename, so the bogon will be chosen
3561 # first if we set CC to just the basename; use the full file name.
3562 shift
6bae0ccf 3563 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3564 fi
3565fi
3566fi
3567fi
503d2be0 3568CC=$ac_cv_prog_CC
ba4481b5 3569if test -n "$CC"; then
ae1362a3 3570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
e9a63f04 3571$as_echo "$CC" >&6; }
ba4481b5 3572else
ae1362a3 3573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3574$as_echo "no" >&6; }
ba4481b5
DL
3575fi
3576
ca81d7a0 3577
503d2be0
AS
3578fi
3579if test -z "$CC"; then
3580 if test -n "$ac_tool_prefix"; then
ca81d7a0 3581 for ac_prog in cl.exe
503d2be0
AS
3582 do
3583 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3584set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ae1362a3 3585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3586$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3587if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3588 $as_echo_n "(cached) " >&6
c4bb2108
DL
3589else
3590 if test -n "$CC"; then
3591 ac_cv_prog_CC="$CC" # Let the user override the test.
3592else
c0d27fcc
MR
3593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3594for as_dir in $PATH
3595do
3596 IFS=$as_save_IFS
3597 test -z "$as_dir" && as_dir=.
ae1362a3 3598 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3599 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3600 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
ae1362a3 3601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3602 break 2
3603 fi
3604done
ae1362a3 3605 done
ca81d7a0 3606IFS=$as_save_IFS
503d2be0 3607
c4bb2108
DL
3608fi
3609fi
503d2be0 3610CC=$ac_cv_prog_CC
c4bb2108 3611if test -n "$CC"; then
ae1362a3 3612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
e9a63f04 3613$as_echo "$CC" >&6; }
c4bb2108 3614else
ae1362a3 3615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3616$as_echo "no" >&6; }
503d2be0
AS
3617fi
3618
ca81d7a0 3619
503d2be0
AS
3620 test -n "$CC" && break
3621 done
3622fi
3623if test -z "$CC"; then
3624 ac_ct_CC=$CC
ca81d7a0 3625 for ac_prog in cl.exe
503d2be0
AS
3626do
3627 # Extract the first word of "$ac_prog", so it can be a program name with args.
3628set dummy $ac_prog; ac_word=$2
ae1362a3 3629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3630$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3631if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
e9a63f04 3632 $as_echo_n "(cached) " >&6
503d2be0
AS
3633else
3634 if test -n "$ac_ct_CC"; then
3635 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3636else
c0d27fcc
MR
3637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
ae1362a3 3642 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3643 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3644 ac_cv_prog_ac_ct_CC="$ac_prog"
ae1362a3 3645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3646 break 2
3647 fi
3648done
ae1362a3 3649 done
ca81d7a0 3650IFS=$as_save_IFS
503d2be0 3651
c4bb2108 3652fi
503d2be0
AS
3653fi
3654ac_ct_CC=$ac_cv_prog_ac_ct_CC
3655if test -n "$ac_ct_CC"; then
ae1362a3 3656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
e9a63f04 3657$as_echo "$ac_ct_CC" >&6; }
503d2be0 3658else
ae1362a3 3659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3660$as_echo "no" >&6; }
ba4481b5
DL
3661fi
3662
ca81d7a0 3663
503d2be0
AS
3664 test -n "$ac_ct_CC" && break
3665done
ba4481b5 3666
ca81d7a0
JD
3667 if test "x$ac_ct_CC" = x; then
3668 CC=""
3669 else
3670 case $cross_compiling:$ac_tool_warned in
3671yes:)
ae1362a3
AS
3672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ca81d7a0
JD
3674ac_tool_warned=yes ;;
3675esac
3676 CC=$ac_ct_CC
3677 fi
503d2be0
AS
3678fi
3679
3680fi
ba4481b5 3681
c0d27fcc 3682
ae1362a3
AS
3683test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3685as_fn_error $? "no acceptable C compiler found in \$PATH
3686See \`config.log' for more details" "$LINENO" 5; }
c4bb2108 3687
503d2be0 3688# Provide some information about the compiler.
ae1362a3 3689$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
e9a63f04
GM
3690set X $ac_compile
3691ac_compiler=$2
ae1362a3
AS
3692for ac_option in --version -v -V -qversion; do
3693 { { ac_try="$ac_compiler $ac_option >&5"
bf89cb4d
GM
3694case "(($ac_try" in
3695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3696 *) ac_try_echo=$ac_try;;
3697esac
ae1362a3
AS
3698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3699$as_echo "$ac_try_echo"; } >&5
3700 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bf89cb4d 3701 ac_status=$?
ae1362a3
AS
3702 if test -s conftest.err; then
3703 sed '10a\
3704... rest of stderr output deleted ...
3705 10q' conftest.err >conftest.er1
3706 cat conftest.er1 >&5
3707 fi
3708 rm -f conftest.er1 conftest.err
3709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3710 test $ac_status = 0; }
3711done
503d2be0 3712
ae1362a3 3713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 3714/* end confdefs.h. */
c4bb2108 3715
503d2be0
AS
3716int
3717main ()
3718{
3719
3720 ;
3721 return 0;
3722}
3723_ACEOF
3724ac_clean_files_save=$ac_clean_files
e9a63f04 3725ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
503d2be0
AS
3726# Try to create an executable without -o first, disregard a.out.
3727# It will help us diagnose broken compilers, and finding out an intuition
3728# of exeext.
ae1362a3
AS
3729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3730$as_echo_n "checking whether the C compiler works... " >&6; }
e9a63f04
GM
3731ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3732
3733# The possible output files:
3734ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3735
ca81d7a0
JD
3736ac_rmfiles=
3737for ac_file in $ac_files
3738do
3739 case $ac_file in
e9a63f04 3740 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
ca81d7a0
JD
3741 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3742 esac
3743done
3744rm -f $ac_rmfiles
3745
ae1362a3 3746if { { ac_try="$ac_link_default"
ca81d7a0
JD
3747case "(($ac_try" in
3748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3749 *) ac_try_echo=$ac_try;;
3750esac
ae1362a3
AS
3751eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3752$as_echo "$ac_try_echo"; } >&5
ca81d7a0 3753 (eval "$ac_link_default") 2>&5
503d2be0 3754 ac_status=$?
ae1362a3
AS
3755 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3756 test $ac_status = 0; }; then :
ca81d7a0
JD
3757 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3758# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3759# in a Makefile. We should not override ac_cv_exeext if it was cached,
3760# so that the user can short-circuit this test for compilers unknown to
3761# Autoconf.
f053c89f 3762for ac_file in $ac_files ''
19650fd6 3763do
6bae0ccf 3764 test -f "$ac_file" || continue
503d2be0 3765 case $ac_file in
e9a63f04 3766 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
edfaf76d 3767 ;;
19650fd6 3768 [ab].out )
edfaf76d
LK
3769 # We found the default executable, but exeext='' is most
3770 # certainly right.
3771 break;;
19650fd6 3772 *.* )
ae1362a3 3773 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
ca81d7a0
JD
3774 then :; else
3775 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3776 fi
3777 # We set ac_cv_exeext here because the later test for it is not
3778 # safe: cross compilers may not add the suffix if given an `-o'
3779 # argument, so we may need to know it at that point already.
3780 # Even if this section looks crufty: it has the advantage of
3781 # actually working.
edfaf76d 3782 break;;
19650fd6 3783 * )
edfaf76d 3784 break;;
503d2be0
AS
3785 esac
3786done
ca81d7a0
JD
3787test "$ac_cv_exeext" = no && ac_cv_exeext=
3788
503d2be0 3789else
f053c89f
CY
3790 ac_file=''
3791fi
ae1362a3
AS
3792if test -z "$ac_file"; then :
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3794$as_echo "no" >&6; }
3795$as_echo "$as_me: failed program was:" >&5
19650fd6
AS
3796sed 's/^/| /' conftest.$ac_ext >&5
3797
ae1362a3
AS
3798{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3800as_fn_error 77 "C compiler cannot create executables
3801See \`config.log' for more details" "$LINENO" 5; }
3802else
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3804$as_echo "yes" >&6; }
503d2be0 3805fi
ae1362a3
AS
3806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3807$as_echo_n "checking for C compiler default output file name... " >&6; }
3808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3809$as_echo "$ac_file" >&6; }
503d2be0 3810ac_exeext=$ac_cv_exeext
503d2be0 3811
e9a63f04 3812rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
503d2be0 3813ac_clean_files=$ac_clean_files_save
ae1362a3 3814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
e9a63f04 3815$as_echo_n "checking for suffix of executables... " >&6; }
ae1362a3 3816if { { ac_try="$ac_link"
ca81d7a0
JD
3817case "(($ac_try" in
3818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3819 *) ac_try_echo=$ac_try;;
3820esac
ae1362a3
AS
3821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3822$as_echo "$ac_try_echo"; } >&5
ca81d7a0 3823 (eval "$ac_link") 2>&5
503d2be0 3824 ac_status=$?
ae1362a3
AS
3825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3826 test $ac_status = 0; }; then :
503d2be0
AS
3827 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3828# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3829# work properly (i.e., refer to `conftest.exe'), while it won't with
3830# `rm'.
6bae0ccf
DL
3831for ac_file in conftest.exe conftest conftest.*; do
3832 test -f "$ac_file" || continue
503d2be0 3833 case $ac_file in
e9a63f04 3834 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
503d2be0 3835 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3836 break;;
503d2be0
AS
3837 * ) break;;
3838 esac
3839done
ba4481b5 3840else
ae1362a3
AS
3841 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3843as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3844See \`config.log' for more details" "$LINENO" 5; }
ba4481b5 3845fi
ae1362a3
AS
3846rm -f conftest conftest$ac_cv_exeext
3847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
e9a63f04 3848$as_echo "$ac_cv_exeext" >&6; }
ba4481b5 3849
503d2be0
AS
3850rm -f conftest.$ac_ext
3851EXEEXT=$ac_cv_exeext
3852ac_exeext=$EXEEXT
ae1362a3
AS
3853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3854/* end confdefs.h. */
3855#include <stdio.h>
3856int
3857main ()
3858{
3859FILE *f = fopen ("conftest.out", "w");
3860 return ferror (f) || fclose (f) != 0;
3861
3862 ;
3863 return 0;
3864}
3865_ACEOF
3866ac_clean_files="$ac_clean_files conftest.out"
3867# Check that the compiler produces executables we can run. If not, either
3868# the compiler is broken, or we cross compile.
3869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3870$as_echo_n "checking whether we are cross compiling... " >&6; }
3871if test "$cross_compiling" != yes; then
3872 { { ac_try="$ac_link"
3873case "(($ac_try" in
3874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3875 *) ac_try_echo=$ac_try;;
3876esac
3877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3878$as_echo "$ac_try_echo"; } >&5
3879 (eval "$ac_link") 2>&5
3880 ac_status=$?
3881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3882 test $ac_status = 0; }
3883 if { ac_try='./conftest$ac_cv_exeext'
3884 { { case "(($ac_try" in
3885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886 *) ac_try_echo=$ac_try;;
3887esac
3888eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889$as_echo "$ac_try_echo"; } >&5
3890 (eval "$ac_try") 2>&5
3891 ac_status=$?
3892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3893 test $ac_status = 0; }; }; then
3894 cross_compiling=no
3895 else
3896 if test "$cross_compiling" = maybe; then
3897 cross_compiling=yes
3898 else
3899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3901as_fn_error $? "cannot run C compiled programs.
3902If you meant to cross compile, use \`--host'.
3903See \`config.log' for more details" "$LINENO" 5; }
3904 fi
3905 fi
3906fi
3907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3908$as_echo "$cross_compiling" >&6; }
3909
3910rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3911ac_clean_files=$ac_clean_files_save
3912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
e9a63f04 3913$as_echo_n "checking for suffix of object files... " >&6; }
ae1362a3 3914if test "${ac_cv_objext+set}" = set; then :
e9a63f04 3915 $as_echo_n "(cached) " >&6
ba4481b5 3916else
ae1362a3 3917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 3918/* end confdefs.h. */
ba4481b5 3919
503d2be0
AS
3920int
3921main ()
3922{
ba4481b5 3923
503d2be0
AS
3924 ;
3925 return 0;
3926}
3927_ACEOF
3928rm -f conftest.o conftest.obj
ae1362a3 3929if { { ac_try="$ac_compile"
ca81d7a0
JD
3930case "(($ac_try" in
3931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3932 *) ac_try_echo=$ac_try;;
3933esac
ae1362a3
AS
3934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3935$as_echo "$ac_try_echo"; } >&5
ca81d7a0 3936 (eval "$ac_compile") 2>&5
503d2be0 3937 ac_status=$?
ae1362a3
AS
3938 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3939 test $ac_status = 0; }; then :
ca81d7a0
JD
3940 for ac_file in conftest.o conftest.obj conftest.*; do
3941 test -f "$ac_file" || continue;
503d2be0 3942 case $ac_file in
e9a63f04 3943 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
503d2be0
AS
3944 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3945 break;;
3946 esac
3947done
c4bb2108 3948else
e9a63f04 3949 $as_echo "$as_me: failed program was:" >&5
19650fd6
AS
3950sed 's/^/| /' conftest.$ac_ext >&5
3951
ae1362a3
AS
3952{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3954as_fn_error $? "cannot compute suffix of object files: cannot compile
3955See \`config.log' for more details" "$LINENO" 5; }
c4bb2108 3956fi
503d2be0
AS
3957rm -f conftest.$ac_cv_objext conftest.$ac_ext
3958fi
ae1362a3 3959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
e9a63f04 3960$as_echo "$ac_cv_objext" >&6; }
503d2be0
AS
3961OBJEXT=$ac_cv_objext
3962ac_objext=$OBJEXT
ae1362a3 3963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
e9a63f04 3964$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
ae1362a3 3965if test "${ac_cv_c_compiler_gnu+set}" = set; then :
e9a63f04 3966 $as_echo_n "(cached) " >&6
ba4481b5 3967else
ae1362a3 3968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 3969/* end confdefs.h. */
503d2be0
AS
3970
3971int
3972main ()
3973{
3974#ifndef __GNUC__
3975 choke me
3976#endif
3977
3978 ;
3979 return 0;
3980}
3981_ACEOF
ae1362a3 3982if ac_fn_c_try_compile "$LINENO"; then :
503d2be0
AS
3983 ac_compiler_gnu=yes
3984else
ae1362a3 3985 ac_compiler_gnu=no
503d2be0 3986fi
ca81d7a0 3987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3988ac_cv_c_compiler_gnu=$ac_compiler_gnu
3989
3990fi
ae1362a3 3991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
e9a63f04
GM
3992$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3993if test $ac_compiler_gnu = yes; then
3994 GCC=yes
3995else
3996 GCC=
3997fi
503d2be0
AS
3998ac_test_CFLAGS=${CFLAGS+set}
3999ac_save_CFLAGS=$CFLAGS
ae1362a3 4000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
e9a63f04 4001$as_echo_n "checking whether $CC accepts -g... " >&6; }
ae1362a3 4002if test "${ac_cv_prog_cc_g+set}" = set; then :
e9a63f04 4003 $as_echo_n "(cached) " >&6
503d2be0 4004else
ca81d7a0
JD
4005 ac_save_c_werror_flag=$ac_c_werror_flag
4006 ac_c_werror_flag=yes
4007 ac_cv_prog_cc_g=no
4008 CFLAGS="-g"
ae1362a3 4009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4010/* end confdefs.h. */
503d2be0
AS
4011
4012int
4013main ()
4014{
4015
4016 ;
4017 return 0;
4018}
4019_ACEOF
ae1362a3 4020if ac_fn_c_try_compile "$LINENO"; then :
ba4481b5
DL
4021 ac_cv_prog_cc_g=yes
4022else
ae1362a3
AS
4023 CFLAGS=""
4024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4025/* end confdefs.h. */
edfaf76d 4026
6bae0ccf
DL
4027int
4028main ()
4029{
ca81d7a0 4030
6bae0ccf
DL
4031 ;
4032 return 0;
4033}
4034_ACEOF
ae1362a3 4035if ac_fn_c_try_compile "$LINENO"; then :
bf89cb4d 4036
ae1362a3
AS
4037else
4038 ac_c_werror_flag=$ac_save_c_werror_flag
ca81d7a0 4039 CFLAGS="-g"
ae1362a3 4040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4041/* end confdefs.h. */
ca81d7a0 4042
503d2be0
AS
4043int
4044main ()
4045{
ca81d7a0 4046
503d2be0
AS
4047 ;
4048 return 0;
4049}
4050_ACEOF
ae1362a3 4051if ac_fn_c_try_compile "$LINENO"; then :
ba4481b5 4052 ac_cv_prog_cc_g=yes
ba4481b5 4053fi
ca81d7a0
JD
4054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4055fi
ca81d7a0
JD
4056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4057fi
ca81d7a0
JD
4058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4059 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 4060fi
ae1362a3 4061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
e9a63f04 4062$as_echo "$ac_cv_prog_cc_g" >&6; }
c4bb2108 4063if test "$ac_test_CFLAGS" = set; then
503d2be0 4064 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
4065elif test $ac_cv_prog_cc_g = yes; then
4066 if test "$GCC" = yes; then
ba4481b5
DL
4067 CFLAGS="-g -O2"
4068 else
c4bb2108 4069 CFLAGS="-g"
ba4481b5 4070 fi
22afa6e8 4071else
c4bb2108
DL
4072 if test "$GCC" = yes; then
4073 CFLAGS="-O2"
4074 else
4075 CFLAGS=
4076 fi
ba4481b5 4077fi
ae1362a3 4078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
e9a63f04 4079$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
ae1362a3 4080if test "${ac_cv_prog_cc_c89+set}" = set; then :
e9a63f04 4081 $as_echo_n "(cached) " >&6
6bae0ccf 4082else
ca81d7a0 4083 ac_cv_prog_cc_c89=no
6bae0ccf 4084ac_save_CC=$CC
ae1362a3 4085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4086/* end confdefs.h. */
6bae0ccf
DL
4087#include <stdarg.h>
4088#include <stdio.h>
4089#include <sys/types.h>
4090#include <sys/stat.h>
4091/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4092struct buf { int x; };
4093FILE * (*rcsopen) (struct buf *, struct stat *, int);
4094static char *e (p, i)
4095 char **p;
4096 int i;
4097{
4098 return p[i];
4099}
4100static char *f (char * (*g) (char **, int), char **p, ...)
4101{
4102 char *s;
4103 va_list v;
4104 va_start (v,p);
4105 s = g (p, va_arg (v,int));
4106 va_end (v);
4107 return s;
4108}
edfaf76d
LK
4109
4110/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4111 function prototypes and stuff, but not '\xHH' hex character constants.
4112 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 4113 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
4114 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4115 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 4116 that's true only with -std. */
edfaf76d
LK
4117int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4118
ca81d7a0
JD
4119/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4120 inside strings and character constants. */
4121#define FOO(x) 'x'
4122int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4123
6bae0ccf
DL
4124int test (int i, double x);
4125struct s1 {int (*f) (int a);};
4126struct s2 {int (*f) (double a);};
4127int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4128int argc;
4129char **argv;
4130int
4131main ()
4132{
4133return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4134 ;
4135 return 0;
4136}
4137_ACEOF
ca81d7a0
JD
4138for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4139 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
4140do
4141 CC="$ac_save_CC $ac_arg"
ae1362a3 4142 if ac_fn_c_try_compile "$LINENO"; then :
ca81d7a0 4143 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf 4144fi
ca81d7a0
JD
4145rm -f core conftest.err conftest.$ac_objext
4146 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 4147done
ca81d7a0 4148rm -f conftest.$ac_ext
6bae0ccf
DL
4149CC=$ac_save_CC
4150
4151fi
ca81d7a0
JD
4152# AC_CACHE_VAL
4153case "x$ac_cv_prog_cc_c89" in
4154 x)
ae1362a3 4155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
e9a63f04 4156$as_echo "none needed" >&6; } ;;
ca81d7a0 4157 xno)
ae1362a3 4158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
e9a63f04 4159$as_echo "unsupported" >&6; } ;;
6bae0ccf 4160 *)
ca81d7a0 4161 CC="$CC $ac_cv_prog_cc_c89"
ae1362a3 4162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
e9a63f04 4163$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf 4164esac
ae1362a3 4165if test "x$ac_cv_prog_cc_c89" != xno; then :
6bae0ccf 4166
ae1362a3 4167fi
19650fd6 4168
503d2be0
AS
4169ac_ext=c
4170ac_cpp='$CPP $CPPFLAGS'
4171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4173ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4174
c0d27fcc 4175
ba4481b5
DL
4176# On Suns, sometimes $CPP names a directory.
4177if test -n "$CPP" && test -d "$CPP"; then
4178 CPP=
4179fi
4180
089a966d
GM
4181## If not using gcc, and on Solaris, and no CPP specified, see if
4182## using a Sun compiler, which needs -Xs to prevent whitespace.
4183if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4184 test x"$CPP" = x; then
ae1362a3 4185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
e9a63f04 4186$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
089a966d 4187
ae1362a3 4188if test "${emacs_cv_sunpro_c+set}" = set; then :
e9a63f04 4189 $as_echo_n "(cached) " >&6
089a966d 4190else
ae1362a3 4191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
089a966d
GM
4192/* end confdefs.h. */
4193
4194int
4195main ()
4196{
4197#ifndef __SUNPRO_C
4198fail;
4199#endif
4200
4201 ;
4202 return 0;
4203}
4204_ACEOF
ae1362a3 4205if ac_fn_c_try_link "$LINENO"; then :
089a966d
GM
4206 emacs_cv_sunpro_c=yes
4207else
ae1362a3 4208 emacs_cv_sunpro_c=no
089a966d 4209fi
ae1362a3
AS
4210rm -f core conftest.err conftest.$ac_objext \
4211 conftest$ac_exeext conftest.$ac_ext
089a966d
GM
4212fi
4213
ae1362a3 4214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
e9a63f04 4215$as_echo "$emacs_cv_sunpro_c" >&6; }
089a966d
GM
4216
4217 if test x"$emacs_cv_sunpro_c" = xyes; then
4218 NON_GNU_CPP="$CC -E -Xs"
4219 fi
4220fi
4221
ba4481b5
DL
4222#### Some systems specify a CPP to use unless we are using GCC.
4223#### Now that we know whether we are using GCC, we can decide whether
4224#### to use that one.
4225if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4226then
4227 CPP="$NON_GNU_CPP"
4228fi
4229
4230#### Some systems specify a CC to use unless we are using GCC.
4231#### Now that we know whether we are using GCC, we can decide whether
4232#### to use that one.
4233if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4234 test x$cc_specified != xyes
4235then
4236 CC="$NON_GNU_CC"
4237fi
4238
4239if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4240then
4241 CC="$CC $GCC_TEST_OPTIONS"
4242fi
4243
4244if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4245then
4246 CC="$CC $NON_GCC_TEST_OPTIONS"
4247fi
4248
e143ad11
AS
4249ac_ext=c
4250ac_cpp='$CPP $CPPFLAGS'
4251ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4252ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4253ac_compiler_gnu=$ac_cv_c_compiler_gnu
ae1362a3 4254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
e9a63f04 4255$as_echo_n "checking how to run the C preprocessor... " >&6; }
e143ad11
AS
4256# On Suns, sometimes $CPP names a directory.
4257if test -n "$CPP" && test -d "$CPP"; then
4258 CPP=
4259fi
4260if test -z "$CPP"; then
ae1362a3 4261 if test "${ac_cv_prog_CPP+set}" = set; then :
e9a63f04 4262 $as_echo_n "(cached) " >&6
e143ad11
AS
4263else
4264 # Double quotes because CPP needs to be expanded
4265 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4266 do
4267 ac_preproc_ok=false
4268for ac_c_preproc_warn_flag in '' yes
4269do
4270 # Use a header file that comes with gcc, so configuring glibc
4271 # with a fresh cross-compiler works.
4272 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4273 # <limits.h> exists even on freestanding compilers.
4274 # On the NeXT, cc -E runs the code through the compiler's parser,
4275 # not just through cpp. "Syntax error" is here to catch this case.
ae1362a3 4276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e143ad11
AS
4277/* end confdefs.h. */
4278#ifdef __STDC__
4279# include <limits.h>
4280#else
4281# include <assert.h>
4282#endif
4283 Syntax error
4284_ACEOF
ae1362a3
AS
4285if ac_fn_c_try_cpp "$LINENO"; then :
4286
0ca10bb7 4287else
bf89cb4d 4288 # Broken: fails on valid input.
e143ad11
AS
4289continue
4290fi
ae1362a3 4291rm -f conftest.err conftest.i conftest.$ac_ext
e143ad11 4292
ca81d7a0 4293 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11 4294 # can be detected and how.
ae1362a3 4295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e143ad11
AS
4296/* end confdefs.h. */
4297#include <ac_nonexistent.h>
4298_ACEOF
ae1362a3 4299if ac_fn_c_try_cpp "$LINENO"; then :
e143ad11
AS
4300 # Broken: success on invalid input.
4301continue
4302else
e143ad11
AS
4303 # Passes both tests.
4304ac_preproc_ok=:
4305break
4306fi
ae1362a3 4307rm -f conftest.err conftest.i conftest.$ac_ext
e143ad11
AS
4308
4309done
4310# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ae1362a3
AS
4311rm -f conftest.i conftest.err conftest.$ac_ext
4312if $ac_preproc_ok; then :
e143ad11
AS
4313 break
4314fi
4315
4316 done
4317 ac_cv_prog_CPP=$CPP
4318
4319fi
4320 CPP=$ac_cv_prog_CPP
4321else
4322 ac_cv_prog_CPP=$CPP
4323fi
ae1362a3 4324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
e9a63f04 4325$as_echo "$CPP" >&6; }
e143ad11
AS
4326ac_preproc_ok=false
4327for ac_c_preproc_warn_flag in '' yes
4328do
4329 # Use a header file that comes with gcc, so configuring glibc
4330 # with a fresh cross-compiler works.
4331 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4332 # <limits.h> exists even on freestanding compilers.
4333 # On the NeXT, cc -E runs the code through the compiler's parser,
4334 # not just through cpp. "Syntax error" is here to catch this case.
ae1362a3 4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e143ad11
AS
4336/* end confdefs.h. */
4337#ifdef __STDC__
4338# include <limits.h>
4339#else
4340# include <assert.h>
4341#endif
4342 Syntax error
4343_ACEOF
ae1362a3 4344if ac_fn_c_try_cpp "$LINENO"; then :
bf89cb4d 4345
ae1362a3 4346else
e143ad11
AS
4347 # Broken: fails on valid input.
4348continue
4349fi
ae1362a3 4350rm -f conftest.err conftest.i conftest.$ac_ext
e143ad11 4351
ca81d7a0 4352 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11 4353 # can be detected and how.
ae1362a3 4354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e143ad11
AS
4355/* end confdefs.h. */
4356#include <ac_nonexistent.h>
4357_ACEOF
ae1362a3 4358if ac_fn_c_try_cpp "$LINENO"; then :
e143ad11
AS
4359 # Broken: success on invalid input.
4360continue
4361else
e143ad11
AS
4362 # Passes both tests.
4363ac_preproc_ok=:
4364break
4365fi
ae1362a3 4366rm -f conftest.err conftest.i conftest.$ac_ext
e143ad11
AS
4367
4368done
4369# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ae1362a3
AS
4370rm -f conftest.i conftest.err conftest.$ac_ext
4371if $ac_preproc_ok; then :
4372
e143ad11 4373else
ae1362a3
AS
4374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4376as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4377See \`config.log' for more details" "$LINENO" 5; }
e143ad11
AS
4378fi
4379
4380ac_ext=c
4381ac_cpp='$CPP $CPPFLAGS'
4382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4384ac_compiler_gnu=$ac_cv_c_compiler_gnu
4385
4386
ae1362a3 4387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
e9a63f04 4388$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
ae1362a3 4389if test "${ac_cv_path_GREP+set}" = set; then :
e9a63f04 4390 $as_echo_n "(cached) " >&6
ca81d7a0 4391else
e9a63f04 4392 if test -z "$GREP"; then
ca81d7a0 4393 ac_path_GREP_found=false
e9a63f04
GM
4394 # Loop through the user's path and test for each of PROGNAME-LIST
4395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0
JD
4396for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4397do
4398 IFS=$as_save_IFS
4399 test -z "$as_dir" && as_dir=.
ae1362a3 4400 for ac_prog in grep ggrep; do
e9a63f04
GM
4401 for ac_exec_ext in '' $ac_executable_extensions; do
4402 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4403 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4404# Check for GNU ac_path_GREP and select it if it is found.
ca81d7a0
JD
4405 # Check for GNU $ac_path_GREP
4406case `"$ac_path_GREP" --version 2>&1` in
4407*GNU*)
4408 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4409*)
4410 ac_count=0
e9a63f04 4411 $as_echo_n 0123456789 >"conftest.in"
ca81d7a0
JD
4412 while :
4413 do
4414 cat "conftest.in" "conftest.in" >"conftest.tmp"
4415 mv "conftest.tmp" "conftest.in"
4416 cp "conftest.in" "conftest.nl"
e9a63f04 4417 $as_echo 'GREP' >> "conftest.nl"
ca81d7a0
JD
4418 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4419 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ae1362a3 4420 as_fn_arith $ac_count + 1 && ac_count=$as_val
ca81d7a0
JD
4421 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4422 # Best one so far, save it but keep looking for a better one
4423 ac_cv_path_GREP="$ac_path_GREP"
4424 ac_path_GREP_max=$ac_count
4425 fi
4426 # 10*(2^10) chars as input seems more than enough
4427 test $ac_count -gt 10 && break
4428 done
4429 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4430esac
4431
e9a63f04
GM
4432 $ac_path_GREP_found && break 3
4433 done
ca81d7a0 4434 done
ae1362a3 4435 done
ca81d7a0 4436IFS=$as_save_IFS
e9a63f04 4437 if test -z "$ac_cv_path_GREP"; then
ae1362a3 4438 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
e9a63f04 4439 fi
ca81d7a0
JD
4440else
4441 ac_cv_path_GREP=$GREP
4442fi
4443
ca81d7a0 4444fi
ae1362a3 4445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
e9a63f04 4446$as_echo "$ac_cv_path_GREP" >&6; }
ca81d7a0
JD
4447 GREP="$ac_cv_path_GREP"
4448
4449
ae1362a3 4450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
e9a63f04 4451$as_echo_n "checking for egrep... " >&6; }
ae1362a3 4452if test "${ac_cv_path_EGREP+set}" = set; then :
e9a63f04 4453 $as_echo_n "(cached) " >&6
e143ad11 4454else
ca81d7a0
JD
4455 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4456 then ac_cv_path_EGREP="$GREP -E"
4457 else
e9a63f04 4458 if test -z "$EGREP"; then
ca81d7a0 4459 ac_path_EGREP_found=false
e9a63f04
GM
4460 # Loop through the user's path and test for each of PROGNAME-LIST
4461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0
JD
4462for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4463do
4464 IFS=$as_save_IFS
4465 test -z "$as_dir" && as_dir=.
ae1362a3 4466 for ac_prog in egrep; do
e9a63f04
GM
4467 for ac_exec_ext in '' $ac_executable_extensions; do
4468 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4469 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4470# Check for GNU ac_path_EGREP and select it if it is found.
ca81d7a0
JD
4471 # Check for GNU $ac_path_EGREP
4472case `"$ac_path_EGREP" --version 2>&1` in
4473*GNU*)
4474 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4475*)
4476 ac_count=0
e9a63f04 4477 $as_echo_n 0123456789 >"conftest.in"
ca81d7a0
JD
4478 while :
4479 do
4480 cat "conftest.in" "conftest.in" >"conftest.tmp"
4481 mv "conftest.tmp" "conftest.in"
4482 cp "conftest.in" "conftest.nl"
e9a63f04 4483 $as_echo 'EGREP' >> "conftest.nl"
ca81d7a0
JD
4484 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4485 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ae1362a3 4486 as_fn_arith $ac_count + 1 && ac_count=$as_val
ca81d7a0
JD
4487 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4488 # Best one so far, save it but keep looking for a better one
4489 ac_cv_path_EGREP="$ac_path_EGREP"
4490 ac_path_EGREP_max=$ac_count
e143ad11 4491 fi
ca81d7a0
JD
4492 # 10*(2^10) chars as input seems more than enough
4493 test $ac_count -gt 10 && break
4494 done
4495 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4496esac
4497
e9a63f04
GM
4498 $ac_path_EGREP_found && break 3
4499 done
ca81d7a0 4500 done
ae1362a3 4501 done
ca81d7a0 4502IFS=$as_save_IFS
e9a63f04 4503 if test -z "$ac_cv_path_EGREP"; then
ae1362a3 4504 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
e9a63f04 4505 fi
ca81d7a0
JD
4506else
4507 ac_cv_path_EGREP=$EGREP
4508fi
e143ad11 4509
ca81d7a0 4510 fi
8eeae1c9 4511fi
ae1362a3 4512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
e9a63f04 4513$as_echo "$ac_cv_path_EGREP" >&6; }
ca81d7a0 4514 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4515
4516
ae1362a3 4517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
e9a63f04 4518$as_echo_n "checking for ANSI C header files... " >&6; }
ae1362a3 4519if test "${ac_cv_header_stdc+set}" = set; then :
e9a63f04 4520 $as_echo_n "(cached) " >&6
a51f4969 4521else
ae1362a3 4522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4523/* end confdefs.h. */
4524#include <stdlib.h>
4525#include <stdarg.h>
4526#include <string.h>
4527#include <float.h>
4528
4529int
4530main ()
4531{
4532
4533 ;
4534 return 0;
4535}
4536_ACEOF
ae1362a3 4537if ac_fn_c_try_compile "$LINENO"; then :
a51f4969
SM
4538 ac_cv_header_stdc=yes
4539else
ae1362a3 4540 ac_cv_header_stdc=no
a51f4969 4541fi
a51f4969
SM
4542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4543
4544if test $ac_cv_header_stdc = yes; then
4545 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ae1362a3 4546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4547/* end confdefs.h. */
4548#include <string.h>
4549
4550_ACEOF
4551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3
AS
4552 $EGREP "memchr" >/dev/null 2>&1; then :
4553
a51f4969
SM
4554else
4555 ac_cv_header_stdc=no
4556fi
4557rm -f conftest*
4558
4559fi
4560
4561if test $ac_cv_header_stdc = yes; then
4562 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ae1362a3 4563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4564/* end confdefs.h. */
4565#include <stdlib.h>
4566
4567_ACEOF
4568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3
AS
4569 $EGREP "free" >/dev/null 2>&1; then :
4570
a51f4969
SM
4571else
4572 ac_cv_header_stdc=no
4573fi
4574rm -f conftest*
4575
4576fi
4577
4578if test $ac_cv_header_stdc = yes; then
4579 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ae1362a3 4580 if test "$cross_compiling" = yes; then :
a51f4969
SM
4581 :
4582else
ae1362a3 4583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4584/* end confdefs.h. */
4585#include <ctype.h>
4586#include <stdlib.h>
4587#if ((' ' & 0x0FF) == 0x020)
4588# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4589# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4590#else
4591# define ISLOWER(c) \
4592 (('a' <= (c) && (c) <= 'i') \
4593 || ('j' <= (c) && (c) <= 'r') \
4594 || ('s' <= (c) && (c) <= 'z'))
4595# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4596#endif
4597
4598#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4599int
4600main ()
4601{
4602 int i;
4603 for (i = 0; i < 256; i++)
4604 if (XOR (islower (i), ISLOWER (i))
4605 || toupper (i) != TOUPPER (i))
4606 return 2;
4607 return 0;
4608}
4609_ACEOF
ae1362a3 4610if ac_fn_c_try_run "$LINENO"; then :
bf89cb4d 4611
ae1362a3
AS
4612else
4613 ac_cv_header_stdc=no
a51f4969 4614fi
ae1362a3
AS
4615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4616 conftest.$ac_objext conftest.beam conftest.$ac_ext
a51f4969
SM
4617fi
4618
a51f4969
SM
4619fi
4620fi
ae1362a3 4621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
e9a63f04 4622$as_echo "$ac_cv_header_stdc" >&6; }
a51f4969
SM
4623if test $ac_cv_header_stdc = yes; then
4624
ae1362a3 4625$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a51f4969
SM
4626
4627fi
4628
4629# On IRIX 5.3, sys/types and inttypes.h are conflicting.
a51f4969
SM
4630for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4631 inttypes.h stdint.h unistd.h
ae1362a3
AS
4632do :
4633 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4634ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4635"
4636if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
a51f4969 4637 cat >>confdefs.h <<_ACEOF
e9a63f04 4638#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
a51f4969
SM
4639_ACEOF
4640
4641fi
4642
4643done
4644
4645
e9a63f04 4646
ae1362a3
AS
4647 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4648if test "x$ac_cv_header_minix_config_h" = x""yes; then :
a51f4969
SM
4649 MINIX=yes
4650else
4651 MINIX=
4652fi
4653
4654
e9a63f04 4655 if test "$MINIX" = yes; then
a51f4969 4656
ae1362a3 4657$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
a51f4969
SM
4658
4659
ae1362a3 4660$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
a51f4969
SM
4661
4662
ae1362a3 4663$as_echo "#define _MINIX 1" >>confdefs.h
a51f4969 4664
e9a63f04 4665 fi
7bbec45b
CY
4666
4667
ae1362a3 4668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
e9a63f04 4669$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
ae1362a3 4670if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
e9a63f04 4671 $as_echo_n "(cached) " >&6
a51f4969 4672else
ae1362a3 4673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4674/* end confdefs.h. */
4675
4676# define __EXTENSIONS__ 1
4677 $ac_includes_default
4678int
4679main ()
4680{
4681
4682 ;
4683 return 0;
4684}
4685_ACEOF
ae1362a3 4686if ac_fn_c_try_compile "$LINENO"; then :
a51f4969
SM
4687 ac_cv_safe_to_define___extensions__=yes
4688else
ae1362a3 4689 ac_cv_safe_to_define___extensions__=no
a51f4969 4690fi
a51f4969
SM
4691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4692fi
ae1362a3 4693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
e9a63f04 4694$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
a51f4969 4695 test $ac_cv_safe_to_define___extensions__ = yes &&
ae1362a3 4696 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
e9a63f04 4697
ae1362a3 4698 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
e9a63f04 4699
ae1362a3 4700 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
e143ad11 4701
ae1362a3 4702 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
e143ad11 4703
ae1362a3 4704 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
e143ad11
AS
4705
4706
4707
01abe918 4708### Use -Wno-pointer-sign if the compiler supports it
ae1362a3 4709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
e9a63f04 4710$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
01abe918
CY
4711SAVE_CFLAGS="$CFLAGS"
4712CFLAGS="$CFLAGS -Wno-pointer-sign"
ae1362a3 4713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
01abe918
CY
4714/* end confdefs.h. */
4715
4716int
4717main ()
4718{
4719
4720 ;
4721 return 0;
4722}
4723_ACEOF
ae1362a3 4724if ac_fn_c_try_compile "$LINENO"; then :
01abe918
CY
4725 has_option=yes
4726else
ae1362a3 4727 has_option=no
01abe918 4728fi
ca81d7a0 4729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4730if test $has_option = yes; then
4731 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4732fi
ae1362a3 4733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
e9a63f04 4734$as_echo "$has_option" >&6; }
01abe918
CY
4735CFLAGS="$SAVE_CFLAGS"
4736unset has_option
4737unset SAVE_CFLAGS
4738
7a2efa6f 4739### Use -Wdeclaration-after-statement if the compiler supports it
ae1362a3 4740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
7a2efa6f
DN
4741$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4742SAVE_CFLAGS="$CFLAGS"
4743CFLAGS="$CFLAGS -Wdeclaration-after-statement"
ae1362a3 4744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a2efa6f
DN
4745/* end confdefs.h. */
4746
4747int
4748main ()
4749{
4750
4751 ;
4752 return 0;
4753}
4754_ACEOF
ae1362a3 4755if ac_fn_c_try_compile "$LINENO"; then :
7a2efa6f
DN
4756 has_option=yes
4757else
ae1362a3 4758 has_option=no
7a2efa6f 4759fi
7a2efa6f
DN
4760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4761if test $has_option = yes; then
4762 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
4763fi
ae1362a3 4764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
7a2efa6f
DN
4765$as_echo "$has_option" >&6; }
4766CFLAGS="$SAVE_CFLAGS"
4767unset has_option
4768unset SAVE_CFLAGS
4769
6a3a24fa 4770#### Some other nice autoconf tests.
ba4481b5 4771
ae1362a3 4772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
e9a63f04 4773$as_echo_n "checking whether ln -s works... " >&6; }
503d2be0
AS
4774LN_S=$as_ln_s
4775if test "$LN_S" = "ln -s"; then
ae1362a3 4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
e9a63f04 4777$as_echo "yes" >&6; }
ba4481b5 4778else
ae1362a3 4779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
e9a63f04 4780$as_echo "no, using $LN_S" >&6; }
ba4481b5
DL
4781fi
4782
503d2be0
AS
4783ac_ext=c
4784ac_cpp='$CPP $CPPFLAGS'
4785ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4786ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4787ac_compiler_gnu=$ac_cv_c_compiler_gnu
ae1362a3 4788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
e9a63f04 4789$as_echo_n "checking how to run the C preprocessor... " >&6; }
ba4481b5
DL
4790# On Suns, sometimes $CPP names a directory.
4791if test -n "$CPP" && test -d "$CPP"; then
4792 CPP=
4793fi
4794if test -z "$CPP"; then
ae1362a3 4795 if test "${ac_cv_prog_CPP+set}" = set; then :
e9a63f04 4796 $as_echo_n "(cached) " >&6
503d2be0
AS
4797else
4798 # Double quotes because CPP needs to be expanded
4799 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4800 do
4801 ac_preproc_ok=false
4802for ac_c_preproc_warn_flag in '' yes
4803do
4804 # Use a header file that comes with gcc, so configuring glibc
4805 # with a fresh cross-compiler works.
19650fd6
AS
4806 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4807 # <limits.h> exists even on freestanding compilers.
ba4481b5 4808 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0 4809 # not just through cpp. "Syntax error" is here to catch this case.
ae1362a3 4810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6
AS
4811/* end confdefs.h. */
4812#ifdef __STDC__
4813# include <limits.h>
4814#else
4815# include <assert.h>
4816#endif
edfaf76d 4817 Syntax error
503d2be0 4818_ACEOF
ae1362a3 4819if ac_fn_c_try_cpp "$LINENO"; then :
bf89cb4d 4820
ae1362a3 4821else
503d2be0
AS
4822 # Broken: fails on valid input.
4823continue
4824fi
ae1362a3 4825rm -f conftest.err conftest.i conftest.$ac_ext
503d2be0 4826
ca81d7a0 4827 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0 4828 # can be detected and how.
ae1362a3 4829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4830/* end confdefs.h. */
503d2be0
AS
4831#include <ac_nonexistent.h>
4832_ACEOF
ae1362a3 4833if ac_fn_c_try_cpp "$LINENO"; then :
503d2be0
AS
4834 # Broken: success on invalid input.
4835continue
c4bb2108 4836else
503d2be0
AS
4837 # Passes both tests.
4838ac_preproc_ok=:
4839break
4840fi
ae1362a3 4841rm -f conftest.err conftest.i conftest.$ac_ext
503d2be0
AS
4842
4843done
4844# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ae1362a3
AS
4845rm -f conftest.i conftest.err conftest.$ac_ext
4846if $ac_preproc_ok; then :
503d2be0
AS
4847 break
4848fi
4849
4850 done
4851 ac_cv_prog_CPP=$CPP
4852
4853fi
4854 CPP=$ac_cv_prog_CPP
4855else
4856 ac_cv_prog_CPP=$CPP
4857fi
ae1362a3 4858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
e9a63f04 4859$as_echo "$CPP" >&6; }
503d2be0
AS
4860ac_preproc_ok=false
4861for ac_c_preproc_warn_flag in '' yes
4862do
4863 # Use a header file that comes with gcc, so configuring glibc
4864 # with a fresh cross-compiler works.
19650fd6
AS
4865 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4866 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4867 # On the NeXT, cc -E runs the code through the compiler's parser,
4868 # not just through cpp. "Syntax error" is here to catch this case.
ae1362a3 4869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6
AS
4870/* end confdefs.h. */
4871#ifdef __STDC__
4872# include <limits.h>
4873#else
4874# include <assert.h>
4875#endif
edfaf76d 4876 Syntax error
503d2be0 4877_ACEOF
ae1362a3 4878if ac_fn_c_try_cpp "$LINENO"; then :
bf89cb4d 4879
ae1362a3 4880else
503d2be0
AS
4881 # Broken: fails on valid input.
4882continue
4883fi
ae1362a3 4884rm -f conftest.err conftest.i conftest.$ac_ext
503d2be0 4885
ca81d7a0 4886 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0 4887 # can be detected and how.
ae1362a3 4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4889/* end confdefs.h. */
503d2be0
AS
4890#include <ac_nonexistent.h>
4891_ACEOF
ae1362a3 4892if ac_fn_c_try_cpp "$LINENO"; then :
503d2be0
AS
4893 # Broken: success on invalid input.
4894continue
4895else
503d2be0
AS
4896 # Passes both tests.
4897ac_preproc_ok=:
4898break
ba4481b5 4899fi
ae1362a3 4900rm -f conftest.err conftest.i conftest.$ac_ext
503d2be0
AS
4901
4902done
4903# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
ae1362a3
AS
4904rm -f conftest.i conftest.err conftest.$ac_ext
4905if $ac_preproc_ok; then :
4906
ba4481b5 4907else
ae1362a3
AS
4908 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4910as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4911See \`config.log' for more details" "$LINENO" 5; }
ba4481b5 4912fi
503d2be0
AS
4913
4914ac_ext=c
4915ac_cpp='$CPP $CPPFLAGS'
4916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4918ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4919
4920# Find a good install program. We prefer a C program (faster),
4921# so one script is as good as another. But avoid the broken or
4922# incompatible versions:
4923# SysV /etc/install, /usr/sbin/install
4924# SunOS /usr/etc/install
4925# IRIX /sbin/install
4926# AIX /bin/install
503d2be0 4927# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4928# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4929# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4930# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4931# OS/2's system install, which has a completely different semantic
ba4481b5 4932# ./install, which can be erroneously created by make from ./install.sh.
e9a63f04 4933# Reject install programs that cannot install multiple files.
ae1362a3 4934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
e9a63f04 4935$as_echo_n "checking for a BSD-compatible install... " >&6; }
ba4481b5 4936if test -z "$INSTALL"; then
ae1362a3 4937if test "${ac_cv_path_install+set}" = set; then :
e9a63f04 4938 $as_echo_n "(cached) " >&6
ba4481b5 4939else
c0d27fcc
MR
4940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941for as_dir in $PATH
4942do
4943 IFS=$as_save_IFS
4944 test -z "$as_dir" && as_dir=.
ae1362a3
AS
4945 # Account for people who put trailing slashes in PATH elements.
4946case $as_dir/ in #((
4947 ./ | .// | /[cC]/* | \
c0d27fcc 4948 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
ae1362a3 4949 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
c0d27fcc
MR
4950 /usr/ucb/* ) ;;
4951 *)
4952 # OSF1 and SCO ODT 3.0 have their own names for install.
4953 # Don't use installbsd from OSF since it installs stuff as root
4954 # by default.
4955 for ac_prog in ginstall scoinst install; do
4956 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4957 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4958 if test $ac_prog = install &&
4959 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4960 # AIX install. It has an incompatible calling convention.
4961 :
4962 elif test $ac_prog = install &&
4963 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4964 # program-specific install script used by HP pwplus--don't use.
4965 :
4966 else
e9a63f04
GM
4967 rm -rf conftest.one conftest.two conftest.dir
4968 echo one > conftest.one
4969 echo two > conftest.two
4970 mkdir conftest.dir
4971 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4972 test -s conftest.one && test -s conftest.two &&
4973 test -s conftest.dir/conftest.one &&
4974 test -s conftest.dir/conftest.two
4975 then
4976 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4977 break 3
4978 fi
edfaf76d
LK
4979 fi
4980 fi
ba4481b5 4981 done
c0d27fcc
MR
4982 done
4983 ;;
4984esac
e9a63f04 4985
ae1362a3 4986 done
ca81d7a0 4987IFS=$as_save_IFS
c0d27fcc 4988
e9a63f04 4989rm -rf conftest.one conftest.two conftest.dir
ba4481b5
DL
4990
4991fi
4992 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4993 INSTALL=$ac_cv_path_install
ba4481b5 4994 else
ca81d7a0
JD
4995 # As a last resort, use the slow shell script. Don't cache a
4996 # value for INSTALL within a source directory, because that will
ba4481b5 4997 # break other packages using the cache if that directory is
ca81d7a0 4998 # removed, or if the value is a relative name.
503d2be0 4999 INSTALL=$ac_install_sh
ba4481b5
DL
5000 fi
5001fi
ae1362a3 5002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
e9a63f04 5003$as_echo "$INSTALL" >&6; }
ba4481b5
DL
5004
5005# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5006# It thinks the first close brace ends the variable substitution.
5007test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5008
503d2be0 5009test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5010
ba4481b5
DL
5011test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5012
c0d27fcc
MR
5013if test "x$RANLIB" = x; then
5014 if test -n "$ac_tool_prefix"; then
5015 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5016set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ae1362a3 5017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5018$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5019if test "${ac_cv_prog_RANLIB+set}" = set; then :
e9a63f04 5020 $as_echo_n "(cached) " >&6
7397acc4
DL
5021else
5022 if test -n "$RANLIB"; then
5023 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5024else
c0d27fcc
MR
5025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5026for as_dir in $PATH
5027do
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
ae1362a3 5030 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5031 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 5032 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
ae1362a3 5033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
5034 break 2
5035 fi
5036done
ae1362a3 5037 done
ca81d7a0 5038IFS=$as_save_IFS
503d2be0 5039
7397acc4
DL
5040fi
5041fi
503d2be0 5042RANLIB=$ac_cv_prog_RANLIB
7397acc4 5043if test -n "$RANLIB"; then
ae1362a3 5044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
e9a63f04 5045$as_echo "$RANLIB" >&6; }
503d2be0 5046else
ae1362a3 5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5048$as_echo "no" >&6; }
503d2be0
AS
5049fi
5050
ca81d7a0 5051
503d2be0
AS
5052fi
5053if test -z "$ac_cv_prog_RANLIB"; then
5054 ac_ct_RANLIB=$RANLIB
5055 # Extract the first word of "ranlib", so it can be a program name with args.
5056set dummy ranlib; ac_word=$2
ae1362a3 5057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5058$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5059if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
e9a63f04 5060 $as_echo_n "(cached) " >&6
503d2be0
AS
5061else
5062 if test -n "$ac_ct_RANLIB"; then
5063 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5064else
c0d27fcc
MR
5065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5066for as_dir in $PATH
5067do
5068 IFS=$as_save_IFS
5069 test -z "$as_dir" && as_dir=.
ae1362a3 5070 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5071 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 5072 ac_cv_prog_ac_ct_RANLIB="ranlib"
ae1362a3 5073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
5074 break 2
5075 fi
5076done
ae1362a3 5077 done
ca81d7a0 5078IFS=$as_save_IFS
503d2be0 5079
503d2be0
AS
5080fi
5081fi
5082ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5083if test -n "$ac_ct_RANLIB"; then
ae1362a3 5084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
e9a63f04 5085$as_echo "$ac_ct_RANLIB" >&6; }
503d2be0 5086else
ae1362a3 5087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5088$as_echo "no" >&6; }
503d2be0
AS
5089fi
5090
ca81d7a0
JD
5091 if test "x$ac_ct_RANLIB" = x; then
5092 RANLIB=":"
5093 else
5094 case $cross_compiling:$ac_tool_warned in
5095yes:)
ae1362a3
AS
5096{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5097$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ca81d7a0
JD
5098ac_tool_warned=yes ;;
5099esac
5100 RANLIB=$ac_ct_RANLIB
5101 fi
7397acc4 5102else
503d2be0 5103 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5104fi
5105
5106fi
9e71690e
DK
5107# Extract the first word of "install-info", so it can be a program name with args.
5108set dummy install-info; ac_word=$2
ae1362a3 5109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5110$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5111if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
e9a63f04 5112 $as_echo_n "(cached) " >&6
9e71690e
DK
5113else
5114 case $INSTALL_INFO in
5115 [\\/]* | ?:[\\/]*)
5116 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5117 ;;
5118 *)
5119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5120for as_dir in $PATH
5121do
5122 IFS=$as_save_IFS
5123 test -z "$as_dir" && as_dir=.
ae1362a3 5124 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5125 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5126 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5128 break 2
5129 fi
5130done
ae1362a3 5131 done
ca81d7a0 5132IFS=$as_save_IFS
9e71690e
DK
5133
5134 ;;
5135esac
5136fi
5137INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5138if test -n "$INSTALL_INFO"; then
ae1362a3 5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
e9a63f04 5140$as_echo "$INSTALL_INFO" >&6; }
9e71690e 5141else
ae1362a3 5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5143$as_echo "no" >&6; }
9e71690e
DK
5144fi
5145
ca81d7a0 5146
9e71690e
DK
5147# Extract the first word of "install-info", so it can be a program name with args.
5148set dummy install-info; ac_word=$2
ae1362a3 5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5150$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5151if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
e9a63f04 5152 $as_echo_n "(cached) " >&6
9e71690e
DK
5153else
5154 case $INSTALL_INFO in
5155 [\\/]* | ?:[\\/]*)
5156 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5157 ;;
5158 *)
5159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5160for as_dir in /usr/sbin
5161do
5162 IFS=$as_save_IFS
5163 test -z "$as_dir" && as_dir=.
ae1362a3 5164 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5165 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5166 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5168 break 2
5169 fi
5170done
ae1362a3 5171 done
ca81d7a0 5172IFS=$as_save_IFS
9e71690e
DK
5173
5174 ;;
5175esac
5176fi
5177INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5178if test -n "$INSTALL_INFO"; then
ae1362a3 5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
e9a63f04 5180$as_echo "$INSTALL_INFO" >&6; }
9e71690e 5181else
ae1362a3 5182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5183$as_echo "no" >&6; }
9e71690e
DK
5184fi
5185
ca81d7a0 5186
9e71690e
DK
5187# Extract the first word of "install-info", so it can be a program name with args.
5188set dummy install-info; ac_word=$2
ae1362a3 5189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5190$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5191if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
e9a63f04 5192 $as_echo_n "(cached) " >&6
9e71690e
DK
5193else
5194 case $INSTALL_INFO in
5195 [\\/]* | ?:[\\/]*)
5196 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5197 ;;
5198 *)
5199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200for as_dir in /sbin
5201do
5202 IFS=$as_save_IFS
5203 test -z "$as_dir" && as_dir=.
ae1362a3 5204 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5205 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5206 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5207 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5208 break 2
5209 fi
5210done
ae1362a3 5211 done
ca81d7a0 5212IFS=$as_save_IFS
9e71690e
DK
5213
5214 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5215 ;;
5216esac
5217fi
5218INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5219if test -n "$INSTALL_INFO"; then
ae1362a3 5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
e9a63f04 5221$as_echo "$INSTALL_INFO" >&6; }
9e71690e 5222else
ae1362a3 5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5224$as_echo "no" >&6; }
9e71690e
DK
5225fi
5226
ca81d7a0 5227
8ae52ca6
RF
5228# Extract the first word of "gzip", so it can be a program name with args.
5229set dummy gzip; ac_word=$2
ae1362a3 5230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5231$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5232if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
e9a63f04 5233 $as_echo_n "(cached) " >&6
8ae52ca6 5234else
46e35e9f 5235 case $GZIP_PROG in
8ae52ca6 5236 [\\/]* | ?:[\\/]*)
46e35e9f 5237 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5238 ;;
5239 *)
5240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5241for as_dir in $PATH
5242do
5243 IFS=$as_save_IFS
5244 test -z "$as_dir" && as_dir=.
ae1362a3 5245 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5246 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5247 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8ae52ca6
RF
5249 break 2
5250 fi
5251done
ae1362a3 5252 done
ca81d7a0 5253IFS=$as_save_IFS
8ae52ca6
RF
5254
5255 ;;
5256esac
5257fi
46e35e9f 5258GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5259if test -n "$GZIP_PROG"; then
ae1362a3 5260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
e9a63f04 5261$as_echo "$GZIP_PROG" >&6; }
8ae52ca6 5262else
ae1362a3 5263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5264$as_echo "no" >&6; }
8ae52ca6
RF
5265fi
5266
ba4481b5 5267
c0d27fcc 5268
ca81d7a0 5269
1bb9a689
MB
5270## Need makeinfo >= 4.6 (?) to build the manuals.
5271# Extract the first word of "makeinfo", so it can be a program name with args.
5272set dummy makeinfo; ac_word=$2
ae1362a3 5273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5274$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5275if test "${ac_cv_path_MAKEINFO+set}" = set; then :
e9a63f04 5276 $as_echo_n "(cached) " >&6
1bb9a689
MB
5277else
5278 case $MAKEINFO in
5279 [\\/]* | ?:[\\/]*)
5280 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5281 ;;
5282 *)
5283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5284for as_dir in $PATH
5285do
5286 IFS=$as_save_IFS
5287 test -z "$as_dir" && as_dir=.
ae1362a3 5288 for ac_exec_ext in '' $ac_executable_extensions; do
1bb9a689
MB
5289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5290 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1bb9a689
MB
5292 break 2
5293 fi
5294done
ae1362a3 5295 done
1bb9a689
MB
5296IFS=$as_save_IFS
5297
5298 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5299 ;;
5300esac
5301fi
5302MAKEINFO=$ac_cv_path_MAKEINFO
5303if test -n "$MAKEINFO"; then
ae1362a3 5304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
e9a63f04 5305$as_echo "$MAKEINFO" >&6; }
1bb9a689 5306else
ae1362a3 5307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5308$as_echo "no" >&6; }
1bb9a689
MB
5309fi
5310
5311
5312if test "$MAKEINFO" != "no" && \
d4840f44 5313 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
1bb9a689
MB
5314 MAKEINFO=no
5315fi
5316
e1b89931
GM
5317## Makeinfo is unusual. For a released Emacs, the manuals are
5318## pre-built, and not deleted by the normal clean rules. makeinfo is
5319## therefore in the category of "special tools" not normally required, which
5320## configure does not have to check for (eg autoconf itself).
8bb25908
KF
5321## In a Bazaar checkout on the other hand, the manuals are not included.
5322## So makeinfo is a requirement to build from Bazaar, and configure
e1b89931
GM
5323## should test for it as it does for any other build requirement.
5324## We use the presence of $srcdir/info/emacs to distinguish a release,
8bb25908 5325## with pre-built manuals, from a Bazaar checkout.
e1b89931
GM
5326if test "$MAKEINFO" = "no"; then
5327 if test "x${with_makeinfo}" = "xno"; then
5328 MAKEINFO=off
5329 elif ! test -e $srcdir/info/emacs; then
ae1362a3 5330 as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your
e1b89931 5331source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5332Either install a suitable version of makeinfo, or re-run configure
ae1362a3 5333with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
e1b89931 5334 fi
921fbdf0 5335fi
1bb9a689
MB
5336
5337
8e967cf7
MR
5338if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5339then
5340 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5341fi
5342
5343if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5344then
5345 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5346fi
5347
c0d27fcc 5348
fe239f0f 5349late_LDFLAGS=$LDFLAGS
4af002d6 5350if test "$GCC" = yes; then
fe239f0f
AS
5351 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5352else
5353 LDFLAGS="$LDFLAGS -znocombreloc"
5354fi
5355
ae1362a3 5356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
e9a63f04 5357$as_echo_n "checking for -znocombreloc... " >&6; }
ae1362a3
AS
5358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5359/* end confdefs.h. */
fe239f0f
AS
5360main(){return 0;}
5361_ACEOF
ae1362a3
AS
5362if ac_fn_c_try_link "$LINENO"; then :
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
e9a63f04 5364$as_echo "yes" >&6; }
fe239f0f 5365else
ae1362a3
AS
5366 LDFLAGS=$late_LDFLAGS
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5368$as_echo "no" >&6; }
fe239f0f 5369fi
ae1362a3
AS
5370rm -f core conftest.err conftest.$ac_objext \
5371 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5372
3b33a005
DL
5373#### Extract some information from the operating system and machine files.
5374
ae1362a3 5375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine- and system-dependent files to find out
3b33a005 5376 - which libraries the lib-src programs will want, and
503d2be0 5377 - whether the GNU malloc routines are usable..." >&5
e9a63f04 5378$as_echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5379 - which libraries the lib-src programs will want, and
503d2be0 5380 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5381
5382### First figure out CFLAGS (which we use for running the compiler here)
5383### and REAL_CFLAGS (which we use for real compilation).
5384### The two are the same except on a few systems, where they are made
5385### different to work around various lossages. For example,
5386### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5387### as implying static linking.
5388
5389### If the CFLAGS env var is specified, we use that value
5390### instead of the default.
5391
5392### It's not important that this name contain the PID; you can't run
5393### two configures in the same directory and have anything work
5394### anyway.
5395tempcname="conftest.c"
5396
5397echo '
5398#include "'${srcdir}'/src/'${opsysfile}'"
5399#include "'${srcdir}'/src/'${machfile}'"
5400#ifndef LIBS_MACHINE
5401#define LIBS_MACHINE
5402#endif
5403#ifndef LIBS_SYSTEM
5404#define LIBS_SYSTEM
5405#endif
5406#ifndef C_SWITCH_SYSTEM
5407#define C_SWITCH_SYSTEM
5408#endif
5409#ifndef C_SWITCH_MACHINE
5410#define C_SWITCH_MACHINE
5411#endif
5412configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5413configure___ c_switch_system=C_SWITCH_SYSTEM
5414configure___ c_switch_machine=C_SWITCH_MACHINE
5415
5416#ifndef LIB_X11_LIB
5417#define LIB_X11_LIB -lX11
5418#endif
5419
3b33a005
DL
5420#ifndef LIBX11_SYSTEM
5421#define LIBX11_SYSTEM
5422#endif
9d2818d6 5423configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5424
5425#ifdef UNEXEC
5426configure___ unexec=UNEXEC
5427#else
5428configure___ unexec=unexec.o
5429#endif
5430
5431#ifdef SYSTEM_MALLOC
5432configure___ system_malloc=yes
5433#else
5434configure___ system_malloc=no
5435#endif
5436
ef9e4345
GM
5437#ifdef USE_MMAP_FOR_BUFFERS
5438configure___ use_mmap_for_buffers=yes
73b77ee5 5439#else
ef9e4345 5440configure___ use_mmap_for_buffers=no
73b77ee5
GM
5441#endif
5442
3b33a005
DL
5443#ifndef C_DEBUG_SWITCH
5444#define C_DEBUG_SWITCH -g
5445#endif
5446
5447#ifndef C_OPTIMIZE_SWITCH
5448#ifdef __GNUC__
5449#define C_OPTIMIZE_SWITCH -O2
5450#else
5451#define C_OPTIMIZE_SWITCH -O
5452#endif
5453#endif
5454
01abe918
CY
5455#ifndef C_WARNINGS_SWITCH
5456#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5457#endif
5458
3b33a005
DL
5459#ifndef LD_SWITCH_MACHINE
5460#define LD_SWITCH_MACHINE
5461#endif
5462
5463#ifndef LD_SWITCH_SYSTEM
5464#define LD_SWITCH_SYSTEM
5465#endif
5466
5467#ifndef LD_SWITCH_X_SITE_AUX
5468#define LD_SWITCH_X_SITE_AUX
503d2be0 5469#endif
3b33a005
DL
5470
5471configure___ ld_switch_system=LD_SWITCH_SYSTEM
5472configure___ ld_switch_machine=LD_SWITCH_MACHINE
5473
5474#ifdef THIS_IS_CONFIGURE
5475
5476/* Get the CFLAGS for tests in configure. */
5477#ifdef __GNUC__
5478configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5479#else
5480configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5481#endif
5482
5483#else /* not THIS_IS_CONFIGURE */
5484
5485/* Get the CFLAGS for real compilation. */
5486#ifdef __GNUC__
9fe40f0e 5487configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
3b33a005
DL
5488#else
5489configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5490#endif
5491
5492#endif /* not THIS_IS_CONFIGURE */
5493' > ${tempcname}
5494
9fe40f0e
DN
5495LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
5496
3b33a005
DL
5497# The value of CPP is a quoted variable reference, so we need to do this
5498# to get its actual value...
5499CPP=`eval "echo $CPP"`
5500eval `${CPP} -Isrc ${tempcname} \
5501 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5502if test "x$SPECIFIED_CFLAGS" = x; then
5503 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5504 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5505else
5506 REAL_CFLAGS="$CFLAGS"
5507fi
5508rm ${tempcname}
5509
5510ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5511
5512### Make sure subsequent tests use flags consistent with the build flags.
5513
5514if test x"${OVERRIDE_CPPFLAGS}" != x; then
5515 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5516else
5517 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5518fi
5519
6bae0ccf
DL
5520
5521
ca81d7a0 5522# Check whether --enable-largefile was given.
ae1362a3 5523if test "${enable_largefile+set}" = set; then :
ca81d7a0
JD
5524 enableval=$enable_largefile;
5525fi
f4988be7 5526
503d2be0 5527if test "$enable_largefile" != no; then
f4988be7 5528
ae1362a3 5529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
e9a63f04 5530$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
ae1362a3 5531if test "${ac_cv_sys_largefile_CC+set}" = set; then :
e9a63f04 5532 $as_echo_n "(cached) " >&6
ba4481b5 5533else
f4988be7 5534 ac_cv_sys_largefile_CC=no
503d2be0
AS
5535 if test "$GCC" != yes; then
5536 ac_save_CC=$CC
5537 while :; do
ca81d7a0
JD
5538 # IRIX 6.2 and later do not support large files by default,
5539 # so use the C compiler's -n32 option if that helps.
ae1362a3 5540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5541/* end confdefs.h. */
f4988be7 5542#include <sys/types.h>
503d2be0
AS
5543 /* Check that off_t can represent 2**63 - 1 correctly.
5544 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5545 since some C++ compilers masquerading as C compilers
5546 incorrectly reject 9223372036854775807. */
5547#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5548 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5549 && LARGE_OFF_T % 2147483647 == 1)
5550 ? 1 : -1];
5551int
5552main ()
5553{
f4988be7 5554
503d2be0
AS
5555 ;
5556 return 0;
5557}
5558_ACEOF
ae1362a3 5559 if ac_fn_c_try_compile "$LINENO"; then :
503d2be0 5560 break
503d2be0 5561fi
ca81d7a0
JD
5562rm -f core conftest.err conftest.$ac_objext
5563 CC="$CC -n32"
ae1362a3 5564 if ac_fn_c_try_compile "$LINENO"; then :
503d2be0 5565 ac_cv_sys_largefile_CC=' -n32'; break
503d2be0 5566fi
ca81d7a0 5567rm -f core conftest.err conftest.$ac_objext
edfaf76d 5568 break
503d2be0
AS
5569 done
5570 CC=$ac_save_CC
5571 rm -f conftest.$ac_ext
5572 fi
b192d653 5573fi
ae1362a3 5574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
e9a63f04 5575$as_echo "$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5576 if test "$ac_cv_sys_largefile_CC" != no; then
5577 CC=$CC$ac_cv_sys_largefile_CC
5578 fi
b192d653 5579
ae1362a3 5580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
e9a63f04 5581$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
ae1362a3 5582if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
e9a63f04 5583 $as_echo_n "(cached) " >&6
ba4481b5 5584else
503d2be0 5585 while :; do
ae1362a3 5586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5587/* end confdefs.h. */
f4988be7 5588#include <sys/types.h>
503d2be0
AS
5589 /* Check that off_t can represent 2**63 - 1 correctly.
5590 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5591 since some C++ compilers masquerading as C compilers
5592 incorrectly reject 9223372036854775807. */
5593#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5594 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5595 && LARGE_OFF_T % 2147483647 == 1)
5596 ? 1 : -1];
5597int
5598main ()
5599{
f4988be7 5600
503d2be0
AS
5601 ;
5602 return 0;
5603}
5604_ACEOF
ae1362a3 5605if ac_fn_c_try_compile "$LINENO"; then :
f053c89f 5606 ac_cv_sys_file_offset_bits=no; break
503d2be0 5607fi
ca81d7a0 5608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3 5609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5610/* end confdefs.h. */
f4988be7
GM
5611#define _FILE_OFFSET_BITS 64
5612#include <sys/types.h>
503d2be0
AS
5613 /* Check that off_t can represent 2**63 - 1 correctly.
5614 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5615 since some C++ compilers masquerading as C compilers
5616 incorrectly reject 9223372036854775807. */
5617#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5618 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5619 && LARGE_OFF_T % 2147483647 == 1)
5620 ? 1 : -1];
5621int
5622main ()
5623{
5624
5625 ;
5626 return 0;
5627}
5628_ACEOF
ae1362a3 5629if ac_fn_c_try_compile "$LINENO"; then :
503d2be0 5630 ac_cv_sys_file_offset_bits=64; break
503d2be0 5631fi
ca81d7a0 5632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5633 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5634 break
5635done
ba4481b5 5636fi
ae1362a3 5637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
e9a63f04 5638$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5639case $ac_cv_sys_file_offset_bits in #(
5640 no | unknown) ;;
5641 *)
c0d27fcc 5642cat >>confdefs.h <<_ACEOF
f4988be7 5643#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5644_ACEOF
f053c89f
CY
5645;;
5646esac
e9a63f04 5647rm -rf conftest*
f053c89f 5648 if test $ac_cv_sys_file_offset_bits = unknown; then
ae1362a3 5649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
e9a63f04 5650$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
ae1362a3 5651if test "${ac_cv_sys_large_files+set}" = set; then :
e9a63f04 5652 $as_echo_n "(cached) " >&6
ba4481b5 5653else
503d2be0 5654 while :; do
ae1362a3 5655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5656/* end confdefs.h. */
503d2be0
AS
5657#include <sys/types.h>
5658 /* Check that off_t can represent 2**63 - 1 correctly.
5659 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5660 since some C++ compilers masquerading as C compilers
5661 incorrectly reject 9223372036854775807. */
5662#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5663 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5664 && LARGE_OFF_T % 2147483647 == 1)
5665 ? 1 : -1];
5666int
5667main ()
5668{
ba4481b5 5669
503d2be0
AS
5670 ;
5671 return 0;
5672}
5673_ACEOF
ae1362a3 5674if ac_fn_c_try_compile "$LINENO"; then :
f053c89f 5675 ac_cv_sys_large_files=no; break
503d2be0 5676fi
ca81d7a0 5677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3 5678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5679/* end confdefs.h. */
f4988be7 5680#define _LARGE_FILES 1
503d2be0
AS
5681#include <sys/types.h>
5682 /* Check that off_t can represent 2**63 - 1 correctly.
5683 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5684 since some C++ compilers masquerading as C compilers
5685 incorrectly reject 9223372036854775807. */
5686#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5687 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5688 && LARGE_OFF_T % 2147483647 == 1)
5689 ? 1 : -1];
5690int
5691main ()
5692{
f4988be7 5693
503d2be0
AS
5694 ;
5695 return 0;
5696}
5697_ACEOF
ae1362a3 5698if ac_fn_c_try_compile "$LINENO"; then :
503d2be0 5699 ac_cv_sys_large_files=1; break
503d2be0 5700fi
ca81d7a0 5701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5702 ac_cv_sys_large_files=unknown
503d2be0
AS
5703 break
5704done
ba4481b5 5705fi
ae1362a3 5706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
e9a63f04 5707$as_echo "$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5708case $ac_cv_sys_large_files in #(
5709 no | unknown) ;;
5710 *)
c0d27fcc 5711cat >>confdefs.h <<_ACEOF
f4988be7 5712#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5713_ACEOF
f053c89f
CY
5714;;
5715esac
e9a63f04 5716rm -rf conftest*
f053c89f 5717 fi
503d2be0 5718fi
ba4481b5 5719
c0d27fcc 5720
a7702be6
CY
5721## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x.
5722## Other machine types hard-code the location in src/[ms]/*.h.
bc5d9888 5723case "${canonical}" in
55e6d9b2 5724 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
a7702be6
CY
5725 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5726 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5727 ## For anything else (eg /usr/lib32), it is up the user to specify
5728 ## the location (bug#5655).
5729 ## Test for crtn.o, not just the directory, because sometimes the
5730 ## directory exists but does not have the relevant files (bug#1287).
5731 ## If user specified a crt-dir, use that unconditionally.
5732 if test "X$CRT_DIR" = "X"; then
5733 CRT_DIR=/usr/lib
5734 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5735 fi
bc5d9888 5736
a7702be6
CY
5737 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
5738 as_fn_error $? "crt*.o not found. Use --with-crt-dir to specify the location." "$LINENO" 5
5739 ;;
bc5d9888 5740esac
a7702be6
CY
5741test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
5742
bc5d9888 5743
439f58ee
JD
5744
5745
5746
2c9dccc9
PJ
5747if test "${with_sound}" != "no"; then
5748 # Sound support for GNU/Linux and the free BSDs.
ae1362a3
AS
5749 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5750do :
5751 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5752ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5753if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c0d27fcc 5754 cat >>confdefs.h <<_ACEOF
e9a63f04 5755#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5756_ACEOF
f4988be7
GM
5757
5758fi
c0d27fcc 5759
98418dba
CW
5760done
5761
5762 # Emulation library used on NetBSD.
ae1362a3 5763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
e9a63f04 5764$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
ae1362a3 5765if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
e9a63f04 5766 $as_echo_n "(cached) " >&6
f4988be7 5767else
98418dba
CW
5768 ac_check_lib_save_LIBS=$LIBS
5769LIBS="-lossaudio $LIBS"
ae1362a3 5770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5771/* end confdefs.h. */
98418dba 5772
ca81d7a0
JD
5773/* Override any GCC internal prototype to avoid an error.
5774 Use char because int might match the return type of a GCC
5775 builtin and then its argument prototype would still apply. */
98418dba
CW
5776#ifdef __cplusplus
5777extern "C"
f4988be7 5778#endif
98418dba 5779char _oss_ioctl ();
503d2be0
AS
5780int
5781main ()
5782{
ca81d7a0 5783return _oss_ioctl ();
503d2be0
AS
5784 ;
5785 return 0;
5786}
5787_ACEOF
ae1362a3 5788if ac_fn_c_try_link "$LINENO"; then :
98418dba 5789 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5790else
ae1362a3 5791 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5792fi
ae1362a3
AS
5793rm -f core conftest.err conftest.$ac_objext \
5794 conftest$ac_exeext conftest.$ac_ext
98418dba 5795LIBS=$ac_check_lib_save_LIBS
f4988be7 5796fi
ae1362a3 5797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
e9a63f04 5798$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
ae1362a3 5799if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
98418dba
CW
5800 LIBSOUND=-lossaudio
5801else
5802 LIBSOUND=
5803fi
5804
c0d27fcc 5805
439f58ee
JD
5806
5807 ALSA_REQUIRED=1.0.0
5808 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
5809
5810 succeeded=no
5811
00b9c927 5812 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 5813set dummy pkg-config; ac_word=$2
ae1362a3 5814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5815$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5816if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
e9a63f04 5817 $as_echo_n "(cached) " >&6
439f58ee
JD
5818else
5819 case $PKG_CONFIG in
5820 [\\/]* | ?:[\\/]*)
5821 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5822 ;;
5823 *)
5824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5825for as_dir in $PATH
5826do
5827 IFS=$as_save_IFS
5828 test -z "$as_dir" && as_dir=.
ae1362a3 5829 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5830 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee 5831 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
439f58ee
JD
5833 break 2
5834 fi
5835done
ae1362a3 5836 done
ca81d7a0 5837IFS=$as_save_IFS
439f58ee
JD
5838
5839 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
5840 ;;
5841esac
5842fi
5843PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 5844if test -n "$PKG_CONFIG"; then
ae1362a3 5845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
e9a63f04 5846$as_echo "$PKG_CONFIG" >&6; }
439f58ee 5847else
ae1362a3 5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5849$as_echo "no" >&6; }
439f58ee
JD
5850fi
5851
ca81d7a0 5852
439f58ee
JD
5853
5854 if test "$PKG_CONFIG" = "no" ; then
5855 HAVE_ALSA=no
5856 else
5857 PKG_CONFIG_MIN_VERSION=0.9.0
5858 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ae1362a3 5859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
e9a63f04 5860$as_echo_n "checking for $ALSA_MODULES... " >&6; }
439f58ee 5861
67db6aa2 5862 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ae1362a3 5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
e9a63f04 5864$as_echo "yes" >&6; }
439f58ee
JD
5865 succeeded=yes
5866
ae1362a3 5867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
e9a63f04 5868$as_echo_n "checking ALSA_CFLAGS... " >&6; }
94315858 5869 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ae1362a3 5870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
e9a63f04 5871$as_echo "$ALSA_CFLAGS" >&6; }
439f58ee 5872
ae1362a3 5873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
e9a63f04 5874$as_echo_n "checking ALSA_LIBS... " >&6; }
94315858 5875 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ae1362a3 5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
e9a63f04 5877$as_echo "$ALSA_LIBS" >&6; }
439f58ee 5878 else
ae1362a3 5879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5880$as_echo "no" >&6; }
439f58ee
JD
5881 ALSA_CFLAGS=""
5882 ALSA_LIBS=""
5883 ## If we have a custom action on failure, don't print errors, but
5884 ## do set a variable so people can do so.
5885 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5886
5887 fi
5888
5889
5890
5891 else
5892 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
5893 echo "*** See http://www.freedesktop.org/software/pkgconfig"
5894 fi
5895 fi
5896
5897 if test $succeeded = yes; then
5898 HAVE_ALSA=yes
5899 else
5900 HAVE_ALSA=no
5901 fi
5902
5903 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
5904 SAVE_CFLAGS="$CFLAGS"
5905 SAVE_LDFLAGS="$LDFLAGS"
5906 CFLAGS="$ALSA_CFLAGS $CFLAGS"
5907 LDFLAGS="$ALSA_LIBS $LDFLAGS"
ae1362a3 5908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
5909/* end confdefs.h. */
5910#include <asoundlib.h>
5911int
5912main ()
5913{
5914snd_lib_error_set_handler (0);
5915 ;
5916 return 0;
5917}
5918_ACEOF
ae1362a3 5919if ac_fn_c_try_compile "$LINENO"; then :
ca81d7a0
JD
5920 emacs_alsa_normal=yes
5921else
ae1362a3 5922 emacs_alsa_normal=no
ca81d7a0 5923fi
ca81d7a0
JD
5924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5925 if test "$emacs_alsa_normal" != yes; then
ae1362a3 5926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
5927/* end confdefs.h. */
5928#include <alsa/asoundlib.h>
5929int
5930main ()
5931{
5932snd_lib_error_set_handler (0);
5933 ;
5934 return 0;
5935}
5936_ACEOF
ae1362a3 5937if ac_fn_c_try_compile "$LINENO"; then :
ca81d7a0
JD
5938 emacs_alsa_subdir=yes
5939else
ae1362a3 5940 emacs_alsa_subdir=no
bf89cb4d 5941fi
bf89cb4d 5942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ca81d7a0 5943 if test "$emacs_alsa_subdir" != yes; then
ae1362a3 5944 as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
ca81d7a0
JD
5945 fi
5946 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
5947 fi
5948
5949 CFLAGS="$SAVE_CFLAGS"
5950 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
5951 LIBSOUND="$LIBSOUND $ALSA_LIBS"
5952 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
5953
ae1362a3 5954$as_echo "#define HAVE_ALSA 1" >>confdefs.h
439f58ee
JD
5955
5956 fi
5957
f4988be7 5958fi
c0d27fcc 5959
98418dba
CW
5960for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5961 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5962 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5963 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
c6d09b8d 5964 sys/utsname.h pwd.h utmp.h
ae1362a3
AS
5965do :
5966 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5967ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5968if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c0d27fcc 5969 cat >>confdefs.h <<_ACEOF
e9a63f04 5970#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5971_ACEOF
34ec9ebe 5972
98418dba 5973fi
c0d27fcc 5974
98418dba
CW
5975done
5976
22044edf 5977
ae1362a3 5978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
e9a63f04 5979$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
ae1362a3 5980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f17e308a
JD
5981/* end confdefs.h. */
5982#include <sys/personality.h>
5983int
5984main ()
5985{
5986personality (PER_LINUX32)
5987 ;
5988 return 0;
5989}
5990_ACEOF
ae1362a3 5991if ac_fn_c_try_compile "$LINENO"; then :
f17e308a
JD
5992 emacs_cv_personality_linux32=yes
5993else
ae1362a3 5994 emacs_cv_personality_linux32=no
f17e308a 5995fi
ca81d7a0 5996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3 5997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
e9a63f04 5998$as_echo "$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
5999
6000if test $emacs_cv_personality_linux32 = yes; then
6001
ae1362a3 6002$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
f17e308a
JD
6003
6004fi
6005
22044edf 6006for ac_header in term.h
ae1362a3
AS
6007do :
6008 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6009if test "x$ac_cv_header_term_h" = x""yes; then :
22044edf 6010 cat >>confdefs.h <<_ACEOF
ae1362a3 6011#define HAVE_TERM_H 1
22044edf
DL
6012_ACEOF
6013
6014fi
6015
6016done
6017
ae1362a3 6018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
e9a63f04 6019$as_echo_n "checking for ANSI C header files... " >&6; }
ae1362a3 6020if test "${ac_cv_header_stdc+set}" = set; then :
e9a63f04 6021 $as_echo_n "(cached) " >&6
ba4481b5 6022else
ae1362a3 6023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6024/* end confdefs.h. */
98418dba
CW
6025#include <stdlib.h>
6026#include <stdarg.h>
6027#include <string.h>
6028#include <float.h>
6029
19650fd6
AS
6030int
6031main ()
6032{
6033
6034 ;
6035 return 0;
6036}
98418dba 6037_ACEOF
ae1362a3 6038if ac_fn_c_try_compile "$LINENO"; then :
98418dba 6039 ac_cv_header_stdc=yes
ba4481b5 6040else
ae1362a3 6041 ac_cv_header_stdc=no
ba4481b5 6042fi
ca81d7a0 6043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6044
6045if test $ac_cv_header_stdc = yes; then
6046 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ae1362a3 6047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6048/* end confdefs.h. */
98418dba
CW
6049#include <string.h>
6050
6051_ACEOF
6052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3
AS
6053 $EGREP "memchr" >/dev/null 2>&1; then :
6054
98418dba
CW
6055else
6056 ac_cv_header_stdc=no
ba4481b5 6057fi
98418dba 6058rm -f conftest*
ba4481b5
DL
6059
6060fi
6061
98418dba
CW
6062if test $ac_cv_header_stdc = yes; then
6063 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ae1362a3 6064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6065/* end confdefs.h. */
98418dba
CW
6066#include <stdlib.h>
6067
6068_ACEOF
6069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3
AS
6070 $EGREP "free" >/dev/null 2>&1; then :
6071
98418dba
CW
6072else
6073 ac_cv_header_stdc=no
6074fi
6075rm -f conftest*
6076
6077fi
6078
6079if test $ac_cv_header_stdc = yes; then
6080 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ae1362a3 6081 if test "$cross_compiling" = yes; then :
98418dba 6082 :
d42122a3 6083else
ae1362a3 6084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6085/* end confdefs.h. */
98418dba 6086#include <ctype.h>
ca81d7a0 6087#include <stdlib.h>
98418dba
CW
6088#if ((' ' & 0x0FF) == 0x020)
6089# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6090# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6091#else
19650fd6 6092# define ISLOWER(c) \
edfaf76d
LK
6093 (('a' <= (c) && (c) <= 'i') \
6094 || ('j' <= (c) && (c) <= 'r') \
6095 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6096# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6097#endif
6098
6099#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6100int
6101main ()
6102{
98418dba
CW
6103 int i;
6104 for (i = 0; i < 256; i++)
6105 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6106 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6107 return 2;
6108 return 0;
503d2be0
AS
6109}
6110_ACEOF
ae1362a3 6111if ac_fn_c_try_run "$LINENO"; then :
bf89cb4d 6112
ae1362a3
AS
6113else
6114 ac_cv_header_stdc=no
d42122a3 6115fi
ae1362a3
AS
6116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6117 conftest.$ac_objext conftest.beam conftest.$ac_ext
d42122a3 6118fi
ca81d7a0 6119
98418dba
CW
6120fi
6121fi
ae1362a3 6122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
e9a63f04 6123$as_echo "$ac_cv_header_stdc" >&6; }
98418dba
CW
6124if test $ac_cv_header_stdc = yes; then
6125
ae1362a3 6126$as_echo "#define STDC_HEADERS 1" >>confdefs.h
d42122a3
DL
6127
6128fi
6129
ae1362a3 6130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
e9a63f04 6131$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
ae1362a3 6132if test "${ac_cv_header_time+set}" = set; then :
e9a63f04 6133 $as_echo_n "(cached) " >&6
ba4481b5 6134else
ae1362a3 6135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6136/* end confdefs.h. */
ba4481b5 6137#include <sys/types.h>
98418dba 6138#include <sys/time.h>
ba4481b5 6139#include <time.h>
503d2be0
AS
6140
6141int
6142main ()
6143{
98418dba
CW
6144if ((struct tm *) 0)
6145return 0;
503d2be0
AS
6146 ;
6147 return 0;
6148}
6149_ACEOF
ae1362a3 6150if ac_fn_c_try_compile "$LINENO"; then :
98418dba 6151 ac_cv_header_time=yes
ba4481b5 6152else
ae1362a3 6153 ac_cv_header_time=no
ba4481b5 6154fi
ca81d7a0 6155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6156fi
ae1362a3 6157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
e9a63f04 6158$as_echo "$ac_cv_header_time" >&6; }
98418dba 6159if test $ac_cv_header_time = yes; then
503d2be0 6160
ae1362a3 6161$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
ba4481b5
DL
6162
6163fi
6164
ae1362a3
AS
6165ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6166if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6167 ac_have_decl=1
ba4481b5 6168else
ae1362a3 6169 ac_have_decl=0
503d2be0 6170fi
503d2be0 6171
cd958eb3 6172cat >>confdefs.h <<_ACEOF
ae1362a3 6173#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
bf89cb4d
GM
6174_ACEOF
6175
bf89cb4d
GM
6176if test $ac_cv_have_decl_sys_siglist != yes; then
6177 # For Tru64, at least:
ae1362a3
AS
6178 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6179if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6180 ac_have_decl=1
ba4481b5 6181else
ae1362a3 6182 ac_have_decl=0
ba4481b5 6183fi
bf89cb4d
GM
6184
6185cat >>confdefs.h <<_ACEOF
ae1362a3 6186#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
bf89cb4d
GM
6187_ACEOF
6188
bf89cb4d
GM
6189 if test $ac_cv_have_decl___sys_siglist = yes; then
6190
ae1362a3 6191$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
bf89cb4d
GM
6192
6193 fi
6194fi
ae1362a3 6195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
bf89cb4d 6196$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
ae1362a3 6197if test "${ac_cv_header_sys_wait_h+set}" = set; then :
bf89cb4d
GM
6198 $as_echo_n "(cached) " >&6
6199else
ae1362a3 6200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d
GM
6201/* end confdefs.h. */
6202#include <sys/types.h>
6203#include <sys/wait.h>
6204#ifndef WEXITSTATUS
6205# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6206#endif
6207#ifndef WIFEXITED
6208# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6209#endif
6210
6211int
6212main ()
6213{
6214 int s;
6215 wait (&s);
6216 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6217 ;
6218 return 0;
6219}
6220_ACEOF
ae1362a3 6221if ac_fn_c_try_compile "$LINENO"; then :
bf89cb4d
GM
6222 ac_cv_header_sys_wait_h=yes
6223else
ae1362a3 6224 ac_cv_header_sys_wait_h=no
bf89cb4d 6225fi
bf89cb4d
GM
6226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6227fi
ae1362a3 6228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
bf89cb4d
GM
6229$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6230if test $ac_cv_header_sys_wait_h = yes; then
6231
ae1362a3 6232$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
ba4481b5 6233
ba4481b5
DL
6234fi
6235
c0d27fcc 6236
ae1362a3 6237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
e9a63f04 6238$as_echo_n "checking for struct utimbuf... " >&6; }
ae1362a3 6239if test "${emacs_cv_struct_utimbuf+set}" = set; then :
e9a63f04 6240 $as_echo_n "(cached) " >&6
1113b624 6241else
ae1362a3 6242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6243/* end confdefs.h. */
98418dba
CW
6244#ifdef TIME_WITH_SYS_TIME
6245#include <sys/time.h>
6246#include <time.h>
6247#else
6248#ifdef HAVE_SYS_TIME_H
6249#include <sys/time.h>
6250#else
1113b624 6251#include <time.h>
98418dba
CW
6252#endif
6253#endif
6254#ifdef HAVE_UTIME_H
6255#include <utime.h>
6256#endif
503d2be0
AS
6257int
6258main ()
6259{
98418dba 6260static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6261 ;
6262 return 0;
6263}
6264_ACEOF
ae1362a3 6265if ac_fn_c_try_compile "$LINENO"; then :
98418dba 6266 emacs_cv_struct_utimbuf=yes
1113b624 6267else
ae1362a3 6268 emacs_cv_struct_utimbuf=no
1113b624 6269fi
ca81d7a0 6270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6271fi
ae1362a3 6272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
e9a63f04 6273$as_echo "$emacs_cv_struct_utimbuf" >&6; }
98418dba 6274if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6275
ae1362a3 6276$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1113b624
PE
6277
6278fi
ba4481b5 6279
ae1362a3 6280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
e9a63f04 6281$as_echo_n "checking return type of signal handlers... " >&6; }
ae1362a3 6282if test "${ac_cv_type_signal+set}" = set; then :
e9a63f04 6283 $as_echo_n "(cached) " >&6
7397acc4 6284else
ae1362a3 6285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6286/* end confdefs.h. */
7397acc4 6287#include <sys/types.h>
98418dba 6288#include <signal.h>
98418dba 6289
503d2be0
AS
6290int
6291main ()
6292{
ca81d7a0 6293return *(signal (0, 0)) (0) == 1;
503d2be0
AS
6294 ;
6295 return 0;
6296}
6297_ACEOF
ae1362a3 6298if ac_fn_c_try_compile "$LINENO"; then :
ca81d7a0 6299 ac_cv_type_signal=int
503d2be0 6300else
ae1362a3 6301 ac_cv_type_signal=void
503d2be0 6302fi
ca81d7a0 6303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6304fi
ae1362a3 6305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
e9a63f04 6306$as_echo "$ac_cv_type_signal" >&6; }
7397acc4 6307
c0d27fcc 6308cat >>confdefs.h <<_ACEOF
98418dba 6309#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6310_ACEOF
6311
503d2be0 6312
c0d27fcc 6313
ae1362a3 6314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
e9a63f04 6315$as_echo_n "checking for speed_t... " >&6; }
ae1362a3 6316if test "${emacs_cv_speed_t+set}" = set; then :
e9a63f04 6317 $as_echo_n "(cached) " >&6
7397acc4 6318else
ae1362a3 6319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6320/* end confdefs.h. */
98418dba 6321#include <termios.h>
98418dba
CW
6322int
6323main ()
6324{
6325speed_t x = 1;
6326 ;
6327 return 0;
6328}
6329_ACEOF
ae1362a3 6330if ac_fn_c_try_compile "$LINENO"; then :
98418dba
CW
6331 emacs_cv_speed_t=yes
6332else
ae1362a3 6333 emacs_cv_speed_t=no
98418dba 6334fi
ca81d7a0 6335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6336fi
ae1362a3 6337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
e9a63f04 6338$as_echo "$emacs_cv_speed_t" >&6; }
98418dba 6339if test $emacs_cv_speed_t = yes; then
b936fae4 6340
ae1362a3 6341$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
98418dba 6342
7397acc4
DL
6343fi
6344
ae1362a3 6345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
e9a63f04 6346$as_echo_n "checking for struct timeval... " >&6; }
ae1362a3 6347if test "${emacs_cv_struct_timeval+set}" = set; then :
e9a63f04 6348 $as_echo_n "(cached) " >&6
7397acc4 6349else
ae1362a3 6350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6351/* end confdefs.h. */
98418dba
CW
6352#ifdef TIME_WITH_SYS_TIME
6353#include <sys/time.h>
6354#include <time.h>
6355#else
6356#ifdef HAVE_SYS_TIME_H
6357#include <sys/time.h>
6358#else
6359#include <time.h>
6360#endif
6361#endif
503d2be0
AS
6362int
6363main ()
6364{
98418dba 6365static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6366 ;
6367 return 0;
6368}
6369_ACEOF
ae1362a3 6370if ac_fn_c_try_compile "$LINENO"; then :
edfaf76d
LK
6371 emacs_cv_struct_timeval=yes
6372else
ae1362a3 6373 emacs_cv_struct_timeval=no
7397acc4 6374fi
ca81d7a0 6375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6376fi
ae1362a3 6377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
e9a63f04 6378$as_echo "$emacs_cv_struct_timeval" >&6; }
98418dba
CW
6379HAVE_TIMEVAL=$emacs_cv_struct_timeval
6380if test $emacs_cv_struct_timeval = yes; then
b936fae4 6381
ae1362a3 6382$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
7397acc4
DL
6383
6384fi
6385
ae1362a3 6386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
e9a63f04 6387$as_echo_n "checking for struct exception... " >&6; }
ae1362a3 6388if test "${emacs_cv_struct_exception+set}" = set; then :
e9a63f04 6389 $as_echo_n "(cached) " >&6
ba4481b5 6390else
ae1362a3 6391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6392/* end confdefs.h. */
98418dba 6393#include <math.h>
503d2be0
AS
6394int
6395main ()
6396{
98418dba 6397static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6398 ;
6399 return 0;
ba4481b5 6400}
503d2be0 6401_ACEOF
ae1362a3 6402if ac_fn_c_try_compile "$LINENO"; then :
98418dba 6403 emacs_cv_struct_exception=yes
ba4481b5 6404else
ae1362a3 6405 emacs_cv_struct_exception=no
ba4481b5 6406fi
ca81d7a0 6407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6408fi
ae1362a3 6409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
e9a63f04 6410$as_echo "$emacs_cv_struct_exception" >&6; }
98418dba
CW
6411HAVE_EXCEPTION=$emacs_cv_struct_exception
6412if test $emacs_cv_struct_exception != yes; then
b936fae4 6413
ae1362a3 6414$as_echo "#define NO_MATHERR 1" >>confdefs.h
ba4481b5
DL
6415
6416fi
6417
7862d3a8 6418for ac_header in sys/socket.h
ae1362a3
AS
6419do :
6420 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6421if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
7862d3a8 6422 cat >>confdefs.h <<_ACEOF
ae1362a3 6423#define HAVE_SYS_SOCKET_H 1
7862d3a8
AS
6424_ACEOF
6425
6426fi
6427
6428done
6429
7862d3a8 6430for ac_header in net/if.h
ae1362a3
AS
6431do :
6432 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
7862d3a8
AS
6433#if HAVE_SYS_SOCKET_H
6434#include <sys/socket.h>
6435#endif
ae1362a3
AS
6436"
6437if test "x$ac_cv_header_net_if_h" = x""yes; then :
7862d3a8 6438 cat >>confdefs.h <<_ACEOF
ae1362a3 6439#define HAVE_NET_IF_H 1
7862d3a8
AS
6440_ACEOF
6441
6442fi
6443
6444done
6445
6446
ae1362a3 6447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
e9a63f04 6448$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
ae1362a3 6449if test "${ac_cv_struct_tm+set}" = set; then :
e9a63f04 6450 $as_echo_n "(cached) " >&6
7397acc4 6451else
ae1362a3 6452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6453/* end confdefs.h. */
98418dba
CW
6454#include <sys/types.h>
6455#include <time.h>
7397acc4 6456
503d2be0
AS
6457int
6458main ()
6459{
f053c89f
CY
6460struct tm tm;
6461 int *p = &tm.tm_sec;
e9a63f04 6462 return !p;
503d2be0
AS
6463 ;
6464 return 0;
6465}
6466_ACEOF
ae1362a3 6467if ac_fn_c_try_compile "$LINENO"; then :
35996d22
AS
6468 ac_cv_struct_tm=time.h
6469else
ae1362a3 6470 ac_cv_struct_tm=sys/time.h
7397acc4 6471fi
ca81d7a0 6472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6473fi
ae1362a3 6474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
e9a63f04 6475$as_echo "$ac_cv_struct_tm" >&6; }
98418dba 6476if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6477
ae1362a3 6478$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
7397acc4
DL
6479
6480fi
ba4481b5 6481
ae1362a3 6482ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
98418dba 6483#include <$ac_cv_struct_tm>
ba4481b5 6484
ae1362a3
AS
6485"
6486if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
c0d27fcc 6487
ae1362a3
AS
6488cat >>confdefs.h <<_ACEOF
6489#define HAVE_STRUCT_TM_TM_ZONE 1
bf89cb4d 6490_ACEOF
ae1362a3
AS
6491
6492
6493fi
6494
6495if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
6496
6497$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
6498
bf89cb4d 6499else
ae1362a3
AS
6500 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6501"
6502if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6503 ac_have_decl=1
6504else
6505 ac_have_decl=0
6506fi
bf89cb4d 6507
ae1362a3
AS
6508cat >>confdefs.h <<_ACEOF
6509#define HAVE_DECL_TZNAME $ac_have_decl
bf89cb4d 6510_ACEOF
bf89cb4d 6511
ae1362a3
AS
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6513$as_echo_n "checking for tzname... " >&6; }
6514if test "${ac_cv_var_tzname+set}" = set; then :
6515 $as_echo_n "(cached) " >&6
6516else
6517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6518/* end confdefs.h. */
6519#include <time.h>
6520#if !HAVE_DECL_TZNAME
6521extern char *tzname[];
6522#endif
bf89cb4d
GM
6523
6524int
6525main ()
6526{
ae1362a3 6527return tzname[0][0];
bf89cb4d
GM
6528 ;
6529 return 0;
6530}
6531_ACEOF
ae1362a3
AS
6532if ac_fn_c_try_link "$LINENO"; then :
6533 ac_cv_var_tzname=yes
bf89cb4d 6534else
ae1362a3 6535 ac_cv_var_tzname=no
bf89cb4d 6536fi
ae1362a3
AS
6537rm -f core conftest.err conftest.$ac_objext \
6538 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 6539fi
ae1362a3
AS
6540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6541$as_echo "$ac_cv_var_tzname" >&6; }
6542 if test $ac_cv_var_tzname = yes; then
bf89cb4d 6543
ae1362a3
AS
6544$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6545
6546 fi
bf89cb4d 6547fi
bf89cb4d 6548
ae1362a3
AS
6549ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6550"
6551if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
0ca10bb7 6552
ae1362a3 6553$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
0ca10bb7
RC
6554
6555fi
6556
ae1362a3
AS
6557ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6558#if HAVE_SYS_SOCKET_H
6559#include <sys/socket.h>
6560#endif
6561#if HAVE_NET_IF_H
6562#include <net/if.h>
6563#endif
6564"
6565if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
0ca10bb7 6566
ae1362a3
AS
6567cat >>confdefs.h <<_ACEOF
6568#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
bf89cb4d 6569_ACEOF
0ca10bb7 6570
bf89cb4d 6571
ae1362a3
AS
6572fi
6573ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6574#if HAVE_SYS_SOCKET_H
6575#include <sys/socket.h>
6576#endif
6577#if HAVE_NET_IF_H
6578#include <net/if.h>
bf89cb4d 6579#endif
ae1362a3
AS
6580"
6581if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
bf89cb4d 6582
ae1362a3
AS
6583cat >>confdefs.h <<_ACEOF
6584#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
bf89cb4d 6585_ACEOF
bf89cb4d 6586
ae1362a3 6587
0ca10bb7 6588fi
ae1362a3
AS
6589ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6590#if HAVE_SYS_SOCKET_H
6591#include <sys/socket.h>
6592#endif
6593#if HAVE_NET_IF_H
6594#include <net/if.h>
6595#endif
6596"
6597if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
6598
6599cat >>confdefs.h <<_ACEOF
6600#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
6601_ACEOF
6602
19650fd6 6603
bf89cb4d 6604fi
ae1362a3
AS
6605ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6606#if HAVE_SYS_SOCKET_H
6607#include <sys/socket.h>
6608#endif
6609#if HAVE_NET_IF_H
6610#include <net/if.h>
6611#endif
6612"
6613if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
bf89cb4d 6614
0ca10bb7 6615cat >>confdefs.h <<_ACEOF
ae1362a3 6616#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
bf89cb4d
GM
6617_ACEOF
6618
6619
ae1362a3
AS
6620fi
6621ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6622#if HAVE_SYS_SOCKET_H
6623#include <sys/socket.h>
6624#endif
6625#if HAVE_NET_IF_H
6626#include <net/if.h>
6627#endif
6628"
6629if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
6630
6631cat >>confdefs.h <<_ACEOF
6632#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
19650fd6 6633_ACEOF
6bae0ccf 6634
bf89cb4d
GM
6635
6636fi
6637
6638
ae1362a3
AS
6639
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6641$as_echo_n "checking for function prototypes... " >&6; }
6642if test "$ac_cv_prog_cc_c89" != no; then
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6644$as_echo "yes" >&6; }
6645
6646$as_echo "#define PROTOTYPES 1" >>confdefs.h
6647
6648
6649$as_echo "#define __PROTOTYPES 1" >>confdefs.h
6650
6651else
6652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6653$as_echo "no" >&6; }
6654fi
6655
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6657$as_echo_n "checking for working volatile... " >&6; }
6658if test "${ac_cv_c_volatile+set}" = set; then :
0ca10bb7
RC
6659 $as_echo_n "(cached) " >&6
6660else
ae1362a3 6661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 6662/* end confdefs.h. */
6bae0ccf
DL
6663
6664int
6665main ()
6666{
ae1362a3
AS
6667
6668volatile int x;
6669int * volatile y = (int *) 0;
6670return !x && !y;
6bae0ccf
DL
6671 ;
6672 return 0;
6673}
6674_ACEOF
ae1362a3
AS
6675if ac_fn_c_try_compile "$LINENO"; then :
6676 ac_cv_c_volatile=yes
6bae0ccf 6677else
ae1362a3 6678 ac_cv_c_volatile=no
ba4481b5 6679fi
ae1362a3 6680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6681fi
ae1362a3
AS
6682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6683$as_echo "$ac_cv_c_volatile" >&6; }
6684if test $ac_cv_c_volatile = no; then
ca81d7a0 6685
ae1362a3 6686$as_echo "#define volatile /**/" >>confdefs.h
0ca10bb7 6687
6bae0ccf 6688fi
503d2be0 6689
ae1362a3
AS
6690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6691$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6692if test "${ac_cv_c_const+set}" = set; then :
bf89cb4d
GM
6693 $as_echo_n "(cached) " >&6
6694else
ae1362a3 6695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 6696/* end confdefs.h. */
ba4481b5 6697
bf89cb4d
GM
6698int
6699main ()
6700{
ae1362a3
AS
6701/* FIXME: Include the comments suggested by Paul. */
6702#ifndef __cplusplus
6703 /* Ultrix mips cc rejects this. */
6704 typedef int charset[2];
6705 const charset cs;
6706 /* SunOS 4.1.1 cc rejects this. */
6707 char const *const *pcpcc;
6708 char **ppc;
6709 /* NEC SVR4.0.2 mips cc rejects this. */
6710 struct point {int x, y;};
6711 static struct point const zero = {0,0};
6712 /* AIX XL C 1.02.0.0 rejects this.
6713 It does not let you subtract one const X* pointer from another in
6714 an arm of an if-expression whose if-part is not a constant
6715 expression */
6716 const char *g = "string";
6717 pcpcc = &g + (g ? g-g : 0);
6718 /* HPUX 7.0 cc rejects these. */
6719 ++pcpcc;
6720 ppc = (char**) pcpcc;
6721 pcpcc = (char const *const *) ppc;
6722 { /* SCO 3.2v4 cc rejects this. */
6723 char *t;
6724 char const *s = 0 ? (char *) 0 : (char const *) 0;
6725
6726 *t++ = 0;
6727 if (s) return 0;
6728 }
6729 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6730 int x[] = {25, 17};
6731 const int *foo = &x[0];
6732 ++foo;
6733 }
6734 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6735 typedef const int *iptr;
6736 iptr p = 0;
6737 ++p;
6738 }
6739 { /* AIX XL C 1.02.0.0 rejects this saying
6740 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6741 struct s { int j; const int *ap[3]; };
6742 struct s *b; b->j = 5;
6743 }
6744 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6745 const int foo = 10;
6746 if (!foo) return 0;
6747 }
6748 return !cs[0] && !zero.x;
6749#endif
6750
bf89cb4d
GM
6751 ;
6752 return 0;
6753}
6754_ACEOF
ae1362a3
AS
6755if ac_fn_c_try_compile "$LINENO"; then :
6756 ac_cv_c_const=yes
bf89cb4d 6757else
ae1362a3
AS
6758 ac_cv_c_const=no
6759fi
6760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6761fi
6762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6763$as_echo "$ac_cv_c_const" >&6; }
6764if test $ac_cv_c_const = no; then
ba4481b5 6765
ae1362a3
AS
6766$as_echo "#define const /**/" >>confdefs.h
6767
6768fi
6769
6770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
6771$as_echo_n "checking for void * support... " >&6; }
6772if test "${emacs_cv_void_star+set}" = set; then :
6773 $as_echo_n "(cached) " >&6
6774else
6775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 6776/* end confdefs.h. */
ba4481b5 6777
bf89cb4d
GM
6778int
6779main ()
6780{
ae1362a3 6781void * foo;
bf89cb4d
GM
6782 ;
6783 return 0;
6784}
6785_ACEOF
ae1362a3
AS
6786if ac_fn_c_try_compile "$LINENO"; then :
6787 emacs_cv_void_star=yes
bf89cb4d 6788else
ae1362a3 6789 emacs_cv_void_star=no
0ca10bb7 6790fi
bf89cb4d
GM
6791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6792fi
ae1362a3
AS
6793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
6794$as_echo "$emacs_cv_void_star" >&6; }
6795if test $emacs_cv_void_star = yes; then
6796 $as_echo "#define POINTER_TYPE void" >>confdefs.h
6797
6798else
6799 $as_echo "#define POINTER_TYPE char" >>confdefs.h
0ca10bb7 6800
ba4481b5 6801fi
0ca10bb7 6802
0ca10bb7 6803
bf89cb4d 6804
ae1362a3
AS
6805
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6807$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6808set x ${MAKE-make}
6809ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6810if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
bf89cb4d
GM
6811 $as_echo_n "(cached) " >&6
6812else
ae1362a3
AS
6813 cat >conftest.make <<\_ACEOF
6814SHELL = /bin/sh
6815all:
6816 @echo '@@@%%%=$(MAKE)=@@@%%%'
bf89cb4d 6817_ACEOF
ae1362a3
AS
6818# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6819case `${MAKE-make} -f conftest.make 2>/dev/null` in
6820 *@@@%%%=?*=@@@%%%*)
6821 eval ac_cv_prog_make_${ac_make}_set=yes;;
6822 *)
6823 eval ac_cv_prog_make_${ac_make}_set=no;;
6824esac
6825rm -f conftest.make
6826fi
6827if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6829$as_echo "yes" >&6; }
6830 SET_MAKE=
6831else
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834 SET_MAKE="MAKE=${MAKE-make}"
6835fi
6836
6837
6838if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
6840$as_echo_n "checking whether we are using GNU Make... " >&6; }
6841 HAVE_GNU_MAKE=no
6842 testval=`make --version 2>/dev/null | grep 'GNU Make'`
6843 if test "x$testval" != x; then
6844 HAVE_GNU_MAKE=yes
6845 else
6846 ac_enable_autodepend=no
6847 fi
6848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
6849$as_echo "$HAVE_GNU_MAKE" >&6; }
6850 if test $HAVE_GNU_MAKE = yes; then
6851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
6852$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
6853 SAVE_CFLAGS="$CFLAGS"
6854 CFLAGS="$CFLAGS -MMD -MF deps.d"
6855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 6856/* end confdefs.h. */
503d2be0 6857
bf89cb4d
GM
6858int
6859main ()
6860{
ae1362a3 6861
bf89cb4d
GM
6862 ;
6863 return 0;
6864}
c0d27fcc 6865_ACEOF
ae1362a3 6866if ac_fn_c_try_compile "$LINENO"; then :
b936fae4 6867
98418dba 6868else
ae1362a3 6869 ac_enable_autodepend=no
0ca10bb7 6870fi
bf89cb4d 6871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3
AS
6872 CFLAGS="$SAVE_CFLAGS"
6873 test -f deps.d || ac_enable_autodepend=no
6874 rm -rf deps.d
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
6876$as_echo "$ac_enable_autodepend" >&6; }
6877 fi
6878 if test $ac_enable_autodepend = yes; then
ca81d7a0 6879
ae1362a3 6880$as_echo "#define AUTO_DEPEND 1" >>confdefs.h
6bae0ccf 6881
ae1362a3 6882 fi
bf89cb4d 6883fi
0ca10bb7 6884
ae1362a3
AS
6885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
6886$as_echo_n "checking for long file names... " >&6; }
6887if test "${ac_cv_sys_long_file_names+set}" = set; then :
e9a63f04 6888 $as_echo_n "(cached) " >&6
96f3a036 6889else
ae1362a3
AS
6890 ac_cv_sys_long_file_names=yes
6891# Test for long file names in all the places we know might matter:
6892# . the current directory, where building will happen
6893# $prefix/lib where we will be installing things
6894# $exec_prefix/lib likewise
6895# $TMPDIR if set, where it might want to write temporary files
6896# /tmp where it might want to write temporary files
6897# /var/tmp likewise
6898# /usr/tmp likewise
6899for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
6900 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
6901 # in the usual case where exec_prefix is '${prefix}'.
6902 case $ac_dir in #(
6903 . | /* | ?:[\\/]*) ;; #(
6904 *) continue;;
6905 esac
6906 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
6907 ac_xdir=$ac_dir/cf$$
6908 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
6909 ac_tf1=$ac_xdir/conftest9012345
6910 ac_tf2=$ac_xdir/conftest9012346
6911 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
6912 ac_cv_sys_long_file_names=no
6913 rm -f -r "$ac_xdir" 2>/dev/null
6914 test $ac_cv_sys_long_file_names = no && break
6915done
bf89cb4d 6916fi
ae1362a3
AS
6917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
6918$as_echo "$ac_cv_sys_long_file_names" >&6; }
6919if test $ac_cv_sys_long_file_names = yes; then
6920
6921$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
bf89cb4d 6922
bf89cb4d 6923fi
bf89cb4d 6924
bf89cb4d 6925
ae1362a3 6926#### Choose a window system.
bf89cb4d 6927
ae1362a3
AS
6928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6929$as_echo_n "checking for X... " >&6; }
6930
6931
6932# Check whether --with-x was given.
6933if test "${with_x+set}" = set; then :
6934 withval=$with_x;
bf89cb4d
GM
6935fi
6936
ae1362a3
AS
6937# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6938if test "x$with_x" = xno; then
6939 # The user explicitly disabled X.
6940 have_x=disabled
bf89cb4d 6941else
ae1362a3
AS
6942 case $x_includes,$x_libraries in #(
6943 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
6944 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
6945 $as_echo_n "(cached) " >&6
bf89cb4d 6946else
ae1362a3
AS
6947 # One or both of the vars are not set, and there is no cached value.
6948ac_x_includes=no ac_x_libraries=no
6949rm -f -r conftest.dir
6950if mkdir conftest.dir; then
6951 cd conftest.dir
6952 cat >Imakefile <<'_ACEOF'
6953incroot:
6954 @echo incroot='${INCROOT}'
6955usrlibdir:
6956 @echo usrlibdir='${USRLIBDIR}'
6957libdir:
6958 @echo libdir='${LIBDIR}'
bf89cb4d 6959_ACEOF
ae1362a3
AS
6960 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
6961 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
6962 for ac_var in incroot usrlibdir libdir; do
6963 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6964 done
6965 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6966 for ac_extension in a so sl dylib la dll; do
6967 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6968 test -f "$ac_im_libdir/libX11.$ac_extension"; then
6969 ac_im_usrlibdir=$ac_im_libdir; break
6970 fi
6971 done
6972 # Screen out bogus values from the imake configuration. They are
6973 # bogus both because they are the default anyway, and because
6974 # using them would break gcc on systems where it needs fixed includes.
6975 case $ac_im_incroot in
6976 /usr/include) ac_x_includes= ;;
6977 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6978 esac
6979 case $ac_im_usrlibdir in
6980 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6981 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6982 esac
6983 fi
6984 cd ..
6985 rm -f -r conftest.dir
bf89cb4d
GM
6986fi
6987
ae1362a3
AS
6988# Standard set of common directories for X headers.
6989# Check X11 before X11Rn because it is often a symlink to the current release.
6990ac_x_header_dirs='
6991/usr/X11/include
6992/usr/X11R7/include
6993/usr/X11R6/include
6994/usr/X11R5/include
6995/usr/X11R4/include
bf89cb4d 6996
ae1362a3
AS
6997/usr/include/X11
6998/usr/include/X11R7
6999/usr/include/X11R6
7000/usr/include/X11R5
7001/usr/include/X11R4
bf89cb4d 7002
ae1362a3
AS
7003/usr/local/X11/include
7004/usr/local/X11R7/include
7005/usr/local/X11R6/include
7006/usr/local/X11R5/include
7007/usr/local/X11R4/include
bf89cb4d 7008
ae1362a3
AS
7009/usr/local/include/X11
7010/usr/local/include/X11R7
7011/usr/local/include/X11R6
7012/usr/local/include/X11R5
7013/usr/local/include/X11R4
bf89cb4d 7014
ae1362a3
AS
7015/usr/X386/include
7016/usr/x386/include
7017/usr/XFree86/include/X11
bf89cb4d 7018
ae1362a3
AS
7019/usr/include
7020/usr/local/include
7021/usr/unsupported/include
7022/usr/athena/include
7023/usr/local/x11r5/include
7024/usr/lpp/Xamples/include
bf89cb4d 7025
ae1362a3
AS
7026/usr/openwin/include
7027/usr/openwin/share/include'
bf89cb4d 7028
ae1362a3
AS
7029if test "$ac_x_includes" = no; then
7030 # Guess where to find include files, by looking for Xlib.h.
7031 # First, try using that file with no special directory specified.
7032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 7033/* end confdefs.h. */
ae1362a3
AS
7034#include <X11/Xlib.h>
7035_ACEOF
7036if ac_fn_c_try_cpp "$LINENO"; then :
7037 # We can compile using X headers with no special include directory.
7038ac_x_includes=
7039else
7040 for ac_dir in $ac_x_header_dirs; do
7041 if test -r "$ac_dir/X11/Xlib.h"; then
7042 ac_x_includes=$ac_dir
7043 break
7044 fi
7045done
7046fi
7047rm -f conftest.err conftest.i conftest.$ac_ext
7048fi # $ac_x_includes = no
bf89cb4d 7049
ae1362a3
AS
7050if test "$ac_x_libraries" = no; then
7051 # Check for the libraries.
7052 # See if we find them without any special options.
7053 # Don't add to $LIBS permanently.
7054 ac_save_LIBS=$LIBS
7055 LIBS="-lX11 $LIBS"
7056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7057/* end confdefs.h. */
7058#include <X11/Xlib.h>
bf89cb4d
GM
7059int
7060main ()
7061{
ae1362a3 7062XrmInitialize ()
bf89cb4d
GM
7063 ;
7064 return 0;
7065}
7066_ACEOF
ae1362a3
AS
7067if ac_fn_c_try_link "$LINENO"; then :
7068 LIBS=$ac_save_LIBS
7069# We can link X programs with no special library path.
7070ac_x_libraries=
bf89cb4d 7071else
ae1362a3
AS
7072 LIBS=$ac_save_LIBS
7073for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7074do
7075 # Don't even attempt the hair of trying to link an X program!
7076 for ac_extension in a so sl dylib la dll; do
7077 if test -r "$ac_dir/libX11.$ac_extension"; then
7078 ac_x_libraries=$ac_dir
7079 break 2
7080 fi
7081 done
7082done
bf89cb4d 7083fi
ae1362a3
AS
7084rm -f core conftest.err conftest.$ac_objext \
7085 conftest$ac_exeext conftest.$ac_ext
7086fi # $ac_x_libraries = no
bf89cb4d 7087
ae1362a3
AS
7088case $ac_x_includes,$ac_x_libraries in #(
7089 no,* | *,no | *\'*)
7090 # Didn't find X, or a directory has "'" in its name.
7091 ac_cv_have_x="have_x=no";; #(
7092 *)
7093 # Record where we found X for the cache.
7094 ac_cv_have_x="have_x=yes\
7095 ac_x_includes='$ac_x_includes'\
7096 ac_x_libraries='$ac_x_libraries'"
7097esac
bf89cb4d 7098fi
ae1362a3
AS
7099;; #(
7100 *) have_x=yes;;
7101 esac
7102 eval "$ac_cv_have_x"
7103fi # $with_x != no
bf89cb4d 7104
ae1362a3
AS
7105if test "$have_x" != yes; then
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7107$as_echo "$have_x" >&6; }
7108 no_x=yes
7109else
7110 # If each of the values was on the command line, it overrides each guess.
7111 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7112 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7113 # Update the cache value to reflect the command line values.
7114 ac_cv_have_x="have_x=yes\
7115 ac_x_includes='$x_includes'\
7116 ac_x_libraries='$x_libraries'"
7117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7118$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
bf89cb4d
GM
7119fi
7120
ae1362a3
AS
7121if test "$no_x" = yes; then
7122 window_system=none
0ca10bb7 7123else
ae1362a3
AS
7124 window_system=x11
7125fi
98418dba 7126
ae1362a3
AS
7127## Workaround for bug in autoconf <= 2.62.
7128## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7129## No need to do anything special for these standard directories.
7130## This is an experiment, take it out if it causes problems.
7131if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
7132
7133 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
98418dba 7134
bf89cb4d 7135fi
edfaf76d 7136
ae1362a3
AS
7137if test "${x_libraries}" != NONE; then
7138 if test -n "${x_libraries}"; then
7139 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7140 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7141 fi
7142 x_default_search_path=""
7143 x_search_path=${x_libraries}
7144 if test -z "${x_search_path}"; then
7145 x_search_path=/usr/lib
7146 fi
7147 for x_library in `echo ${x_search_path}: | \
7148 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7149 x_search_path="\
7150${x_library}/X11/%L/%T/%N%C%S:\
7151${x_library}/X11/%l/%T/%N%C%S:\
7152${x_library}/X11/%T/%N%C%S:\
7153${x_library}/X11/%L/%T/%N%S:\
7154${x_library}/X11/%l/%T/%N%S:\
7155${x_library}/X11/%T/%N%S"
7156 if test x"${x_default_search_path}" = x; then
7157 x_default_search_path=${x_search_path}
7158 else
7159 x_default_search_path="${x_search_path}:${x_default_search_path}"
7160 fi
7161 done
7162fi
7163if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7164 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
bf89cb4d 7165fi
ba4481b5 7166
ae1362a3
AS
7167if test x"${x_includes}" = x; then
7168 bitmapdir=/usr/include/X11/bitmaps
7169else
7170 # accumulate include directories that have X11 bitmap subdirectories
7171 bmd_acc="dummyval"
7172 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7173 if test -d "${bmd}/X11/bitmaps"; then
7174 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7175 fi
7176 if test -d "${bmd}/bitmaps"; then
7177 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7178 fi
7179 done
7180 if test ${bmd_acc} != "dummyval"; then
7181 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7182 fi
7183fi
bf89cb4d 7184
ae1362a3
AS
7185HAVE_NS=no
7186NS_IMPL_COCOA=no
7187NS_IMPL_GNUSTEP=no
7188tmp_CPPFLAGS="$CPPFLAGS"
7189tmp_CFLAGS="$CFLAGS"
7190CPPFLAGS="$CPPFLAGS -x objective-c"
7191CFLAGS="$CFLAGS -x objective-c"
7192if test "${with_ns}" != no; then
7193 if test "${opsys}" = darwin; then
7194 NS_IMPL_COCOA=yes
7195 ns_appdir=`pwd`/nextstep/Emacs.app
7196 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
7197 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
7198 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7199 elif test -f $GNUSTEP_CONFIG_FILE; then
7200 NS_IMPL_GNUSTEP=yes
7201 ns_appdir=`pwd`/nextstep/Emacs.app
7202 ns_appbindir=`pwd`/nextstep/Emacs.app
7203 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
7204 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7205 GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
7206 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7207 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7208 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7209 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7210 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7211 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
7212 fi
7213 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7214if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7215 HAVE_NS=yes
7216else
7217 as_fn_error $? "\`--with-ns' was specified, but the include
7218 files are missing or cannot be compiled." "$LINENO" 5
bf89cb4d
GM
7219fi
7220
7221
ae1362a3
AS
7222 NS_HAVE_NSINTEGER=yes
7223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 7224/* end confdefs.h. */
ae1362a3 7225#include <Foundation/NSObjCRuntime.h>
bf89cb4d
GM
7226int
7227main ()
7228{
ae1362a3 7229NSInteger i;
bf89cb4d
GM
7230 ;
7231 return 0;
7232}
7233_ACEOF
ae1362a3
AS
7234if ac_fn_c_try_compile "$LINENO"; then :
7235 ns_have_nsinteger=yes
bf89cb4d 7236else
ae1362a3 7237 ns_have_nsinteger=no
bf89cb4d 7238fi
ae1362a3
AS
7239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7240 if test $ns_have_nsinteger = no; then
7241 NS_HAVE_NSINTEGER=no
7242 fi
bf89cb4d 7243fi
ae1362a3
AS
7244if test "${HAVE_NS}" = yes; then
7245 window_system=nextstep
7246 with_xft=no
7247 # set up packaging dirs
7248 exec_prefix=${ns_appbindir}
7249 libexecdir=${ns_appbindir}/libexec
7250 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7251 prefix=${ns_appresdir}
7252 fi
bf89cb4d 7253fi
ae1362a3
AS
7254CFLAGS="$tmp_CFLAGS"
7255CPPFLAGS="$tmp_CPPFLAGS"
bf89cb4d 7256
ae1362a3
AS
7257case "${window_system}" in
7258 x11 )
7259 HAVE_X_WINDOWS=yes
7260 HAVE_X11=yes
7261 case "${with_x_toolkit}" in
7262 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7263 motif ) USE_X_TOOLKIT=MOTIF ;;
7264 gtk ) with_gtk=yes
7265 USE_X_TOOLKIT=none ;;
7266 no ) USE_X_TOOLKIT=none ;;
7267 * ) USE_X_TOOLKIT=maybe ;;
7268 esac
7269 ;;
7270 nextstep | none )
7271 HAVE_X_WINDOWS=no
7272 HAVE_X11=no
7273 USE_X_TOOLKIT=none
7274 ;;
7275esac
7276
7277if test "$window_system" = none && test "X$with_x" != "Xno"; then
7278 # Extract the first word of "X", so it can be a program name with args.
7279set dummy X; ac_word=$2
7280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
bf89cb4d 7281$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 7282if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
bf89cb4d
GM
7283 $as_echo_n "(cached) " >&6
7284else
ae1362a3
AS
7285 if test -n "$HAVE_XSERVER"; then
7286 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
bf89cb4d
GM
7287else
7288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ae1362a3 7289for as_dir in $PATH
bf89cb4d
GM
7290do
7291 IFS=$as_save_IFS
7292 test -z "$as_dir" && as_dir=.
ae1362a3 7293 for ac_exec_ext in '' $ac_executable_extensions; do
bf89cb4d 7294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ae1362a3
AS
7295 ac_cv_prog_HAVE_XSERVER="true"
7296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bf89cb4d
GM
7297 break 2
7298 fi
7299done
ae1362a3 7300 done
bf89cb4d
GM
7301IFS=$as_save_IFS
7302
ae1362a3 7303 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
bf89cb4d
GM
7304fi
7305fi
ae1362a3
AS
7306HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7307if test -n "$HAVE_XSERVER"; then
7308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7309$as_echo "$HAVE_XSERVER" >&6; }
7310else
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7312$as_echo "no" >&6; }
7313fi
7314
7315
7316 if test "$HAVE_XSERVER" = true ||
7317 test -n "$DISPLAY" ||
7318 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
7319 as_fn_error $? "You seem to be running X, but no X development libraries
7320were found. You should install the relevant development files for X
7321and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7322sure you have development files for image handling, i.e.
7323tiff, gif, jpeg, png and xpm.
7324If you are sure you want Emacs compiled without X window support, pass
7325 --without-x
7326to configure." "$LINENO" 5
7327 fi
7328fi
7329
7330### If we're using X11, we should use the X menu package.
7331HAVE_MENUS=no
7332case ${HAVE_X11} in
7333 yes ) HAVE_MENUS=yes ;;
7334esac
7335
7336# Do the opsystem or machine files prohibit the use of the GNU malloc?
7337# Assume not, until told otherwise.
7338GNU_MALLOC=yes
7339doug_lea_malloc=yes
7340ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7341if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
7342
bf89cb4d 7343else
ae1362a3 7344 doug_lea_malloc=no
bf89cb4d
GM
7345fi
7346
ae1362a3
AS
7347ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7348if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
bf89cb4d 7349
ae1362a3
AS
7350else
7351 doug_lea_malloc=no
bf89cb4d 7352fi
f053c89f 7353
ae1362a3
AS
7354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7355$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7356if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
bf89cb4d
GM
7357 $as_echo_n "(cached) " >&6
7358else
ae1362a3 7359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 7360/* end confdefs.h. */
ae1362a3 7361extern void (* __after_morecore_hook)();
98418dba
CW
7362int
7363main ()
7364{
ae1362a3 7365__after_morecore_hook = 0
bf89cb4d
GM
7366 ;
7367 return 0;
7368}
7369_ACEOF
ae1362a3
AS
7370if ac_fn_c_try_link "$LINENO"; then :
7371 emacs_cv_var___after_morecore_hook=yes
bf89cb4d 7372else
ae1362a3 7373 emacs_cv_var___after_morecore_hook=no
bf89cb4d 7374fi
ae1362a3
AS
7375rm -f core conftest.err conftest.$ac_objext \
7376 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 7377fi
ae1362a3
AS
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7379$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7380if test $emacs_cv_var___after_morecore_hook = no; then
7381 doug_lea_malloc=no
bf89cb4d 7382fi
ae1362a3
AS
7383if test "${system_malloc}" = "yes"; then
7384 GNU_MALLOC=no
7385 GNU_MALLOC_reason="
7386 (The GNU allocators don't work with this system configuration.)"
7387fi
7388if test "$doug_lea_malloc" = "yes" ; then
7389 if test "$GNU_MALLOC" = yes ; then
7390 GNU_MALLOC_reason="
7391 (Using Doug Lea's new malloc from the GNU C Library.)"
7392 fi
98418dba 7393
ae1362a3 7394$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
0ca10bb7 7395
bf89cb4d 7396fi
bf89cb4d 7397
ae1362a3
AS
7398if test x"${REL_ALLOC}" = x; then
7399 REL_ALLOC=${GNU_MALLOC}
503d2be0 7400fi
ca81d7a0 7401
0ca10bb7 7402
bf89cb4d 7403
ca81d7a0 7404
bf89cb4d 7405
ae1362a3
AS
7406 for ac_header in $ac_header_list
7407do :
7408 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7409ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7410"
7411if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bf89cb4d
GM
7412 cat >>confdefs.h <<_ACEOF
7413#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7414_ACEOF
edfaf76d 7415
ba4481b5
DL
7416fi
7417
bf89cb4d
GM
7418done
7419
7420
7421
7422
7423
7424
7425
7426
ae1362a3
AS
7427for ac_func in getpagesize
7428do :
7429 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7430if test "x$ac_cv_func_getpagesize" = x""yes; then :
7431 cat >>confdefs.h <<_ACEOF
7432#define HAVE_GETPAGESIZE 1
7433_ACEOF
bf89cb4d 7434
ae1362a3
AS
7435fi
7436done
bf89cb4d 7437
ae1362a3
AS
7438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7439$as_echo_n "checking for working mmap... " >&6; }
7440if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7441 $as_echo_n "(cached) " >&6
7442else
7443 if test "$cross_compiling" = yes; then :
7444 ac_cv_func_mmap_fixed_mapped=no
7445else
7446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7447/* end confdefs.h. */
7448$ac_includes_default
7449/* malloc might have been renamed as rpl_malloc. */
7450#undef malloc
bf89cb4d 7451
ae1362a3
AS
7452/* Thanks to Mike Haertel and Jim Avera for this test.
7453 Here is a matrix of mmap possibilities:
7454 mmap private not fixed
7455 mmap private fixed at somewhere currently unmapped
7456 mmap private fixed at somewhere already mapped
7457 mmap shared not fixed
7458 mmap shared fixed at somewhere currently unmapped
7459 mmap shared fixed at somewhere already mapped
7460 For private mappings, we should verify that changes cannot be read()
7461 back from the file, nor mmap's back from the file at a different
7462 address. (There have been systems where private was not correctly
7463 implemented like the infamous i386 svr4.0, and systems where the
7464 VM page cache was not coherent with the file system buffer cache
7465 like early versions of FreeBSD and possibly contemporary NetBSD.)
7466 For shared mappings, we should conversely verify that changes get
7467 propagated back to all the places they're supposed to be.
bf89cb4d 7468
ae1362a3
AS
7469 Grep wants private fixed already mapped.
7470 The main things grep needs to know about mmap are:
7471 * does it exist and is it safe to write into the mmap'd area
7472 * how to use it (BSD variants) */
bf89cb4d 7473
ae1362a3
AS
7474#include <fcntl.h>
7475#include <sys/mman.h>
bf89cb4d 7476
ae1362a3
AS
7477#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7478char *malloc ();
7479#endif
bf89cb4d 7480
ae1362a3
AS
7481/* This mess was copied from the GNU getpagesize.h. */
7482#ifndef HAVE_GETPAGESIZE
7483# ifdef _SC_PAGESIZE
7484# define getpagesize() sysconf(_SC_PAGESIZE)
7485# else /* no _SC_PAGESIZE */
7486# ifdef HAVE_SYS_PARAM_H
7487# include <sys/param.h>
7488# ifdef EXEC_PAGESIZE
7489# define getpagesize() EXEC_PAGESIZE
7490# else /* no EXEC_PAGESIZE */
7491# ifdef NBPG
7492# define getpagesize() NBPG * CLSIZE
7493# ifndef CLSIZE
7494# define CLSIZE 1
7495# endif /* no CLSIZE */
7496# else /* no NBPG */
7497# ifdef NBPC
7498# define getpagesize() NBPC
7499# else /* no NBPC */
7500# ifdef PAGESIZE
7501# define getpagesize() PAGESIZE
7502# endif /* PAGESIZE */
7503# endif /* no NBPC */
7504# endif /* no NBPG */
7505# endif /* no EXEC_PAGESIZE */
7506# else /* no HAVE_SYS_PARAM_H */
7507# define getpagesize() 8192 /* punt totally */
7508# endif /* no HAVE_SYS_PARAM_H */
7509# endif /* no _SC_PAGESIZE */
bf89cb4d 7510
ae1362a3 7511#endif /* no HAVE_GETPAGESIZE */
bf89cb4d 7512
ae1362a3
AS
7513int
7514main ()
7515{
7516 char *data, *data2, *data3;
7517 const char *cdata2;
7518 int i, pagesize;
7519 int fd, fd2;
bf89cb4d 7520
ae1362a3 7521 pagesize = getpagesize ();
bf89cb4d 7522
ae1362a3
AS
7523 /* First, make a file with some known garbage in it. */
7524 data = (char *) malloc (pagesize);
7525 if (!data)
7526 return 1;
7527 for (i = 0; i < pagesize; ++i)
7528 *(data + i) = rand ();
7529 umask (0);
7530 fd = creat ("conftest.mmap", 0600);
7531 if (fd < 0)
7532 return 2;
7533 if (write (fd, data, pagesize) != pagesize)
7534 return 3;
7535 close (fd);
bf89cb4d 7536
ae1362a3
AS
7537 /* Next, check that the tail of a page is zero-filled. File must have
7538 non-zero length, otherwise we risk SIGBUS for entire page. */
7539 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7540 if (fd2 < 0)
7541 return 4;
7542 cdata2 = "";
7543 if (write (fd2, cdata2, 1) != 1)
7544 return 5;
7545 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7546 if (data2 == MAP_FAILED)
7547 return 6;
7548 for (i = 0; i < pagesize; ++i)
7549 if (*(data2 + i))
7550 return 7;
7551 close (fd2);
7552 if (munmap (data2, pagesize))
7553 return 8;
bf89cb4d 7554
ae1362a3
AS
7555 /* Next, try to mmap the file at a fixed address which already has
7556 something else allocated at it. If we can, also make sure that
7557 we see the same garbage. */
7558 fd = open ("conftest.mmap", O_RDWR);
7559 if (fd < 0)
7560 return 9;
7561 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7562 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7563 return 10;
7564 for (i = 0; i < pagesize; ++i)
7565 if (*(data + i) != *(data2 + i))
7566 return 11;
bf89cb4d 7567
ae1362a3
AS
7568 /* Finally, make sure that changes to the mapped area do not
7569 percolate back to the file as seen by read(). (This is a bug on
7570 some variants of i386 svr4.0.) */
7571 for (i = 0; i < pagesize; ++i)
7572 *(data2 + i) = *(data2 + i) + 1;
7573 data3 = (char *) malloc (pagesize);
7574 if (!data3)
7575 return 12;
7576 if (read (fd, data3, pagesize) != pagesize)
7577 return 13;
7578 for (i = 0; i < pagesize; ++i)
7579 if (*(data + i) != *(data3 + i))
7580 return 14;
7581 close (fd);
7582 return 0;
7583}
7584_ACEOF
7585if ac_fn_c_try_run "$LINENO"; then :
7586 ac_cv_func_mmap_fixed_mapped=yes
7587else
7588 ac_cv_func_mmap_fixed_mapped=no
7589fi
7590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7591 conftest.$ac_objext conftest.beam conftest.$ac_ext
7592fi
bf89cb4d 7593
ae1362a3
AS
7594fi
7595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7596$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7597if test $ac_cv_func_mmap_fixed_mapped = yes; then
bf89cb4d 7598
ae1362a3 7599$as_echo "#define HAVE_MMAP 1" >>confdefs.h
bf89cb4d 7600
ae1362a3
AS
7601fi
7602rm -f conftest.mmap conftest.txt
bf89cb4d 7603
ae1362a3
AS
7604if test $use_mmap_for_buffers = yes; then
7605 REL_ALLOC=no
7606fi
bf89cb4d 7607
ae1362a3 7608LIBS="$libsrc_libs $LIBS"
bf89cb4d 7609
ae1362a3
AS
7610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
7611$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7612if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
7613 $as_echo_n "(cached) " >&6
7614else
7615 ac_check_lib_save_LIBS=$LIBS
7616LIBS="-ldnet $LIBS"
7617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7618/* end confdefs.h. */
bf89cb4d 7619
ae1362a3
AS
7620/* Override any GCC internal prototype to avoid an error.
7621 Use char because int might match the return type of a GCC
7622 builtin and then its argument prototype would still apply. */
7623#ifdef __cplusplus
7624extern "C"
7625#endif
7626char dnet_ntoa ();
7627int
7628main ()
7629{
7630return dnet_ntoa ();
7631 ;
7632 return 0;
7633}
7634_ACEOF
7635if ac_fn_c_try_link "$LINENO"; then :
7636 ac_cv_lib_dnet_dnet_ntoa=yes
7637else
7638 ac_cv_lib_dnet_dnet_ntoa=no
7639fi
7640rm -f core conftest.err conftest.$ac_objext \
7641 conftest$ac_exeext conftest.$ac_ext
7642LIBS=$ac_check_lib_save_LIBS
7643fi
7644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7645$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7646if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
7647 cat >>confdefs.h <<_ACEOF
7648#define HAVE_LIBDNET 1
7649_ACEOF
bf89cb4d 7650
ae1362a3 7651 LIBS="-ldnet $LIBS"
bf89cb4d 7652
ae1362a3 7653fi
bf89cb4d
GM
7654
7655
ae1362a3
AS
7656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
7657$as_echo_n "checking for main in -lXbsd... " >&6; }
7658if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
7659 $as_echo_n "(cached) " >&6
7660else
7661 ac_check_lib_save_LIBS=$LIBS
7662LIBS="-lXbsd $LIBS"
7663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7664/* end confdefs.h. */
bf89cb4d
GM
7665
7666
ae1362a3
AS
7667int
7668main ()
7669{
7670return main ();
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675if ac_fn_c_try_link "$LINENO"; then :
7676 ac_cv_lib_Xbsd_main=yes
7677else
7678 ac_cv_lib_Xbsd_main=no
7679fi
7680rm -f core conftest.err conftest.$ac_objext \
7681 conftest$ac_exeext conftest.$ac_ext
7682LIBS=$ac_check_lib_save_LIBS
7683fi
7684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
7685$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
7686if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
7687 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
7688fi
bf89cb4d
GM
7689
7690
ae1362a3
AS
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
7692$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
7693if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
bf89cb4d
GM
7694 $as_echo_n "(cached) " >&6
7695else
ae1362a3
AS
7696 ac_check_lib_save_LIBS=$LIBS
7697LIBS="-lpthreads $LIBS"
7698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 7699/* end confdefs.h. */
ba4481b5 7700
0ca10bb7
RC
7701/* Override any GCC internal prototype to avoid an error.
7702 Use char because int might match the return type of a GCC
7703 builtin and then its argument prototype would still apply. */
7704#ifdef __cplusplus
7705extern "C"
7706#endif
ae1362a3 7707char cma_open ();
0ca10bb7
RC
7708int
7709main ()
7710{
ae1362a3 7711return cma_open ();
0ca10bb7
RC
7712 ;
7713 return 0;
7714}
7715_ACEOF
ae1362a3
AS
7716if ac_fn_c_try_link "$LINENO"; then :
7717 ac_cv_lib_pthreads_cma_open=yes
0ca10bb7 7718else
ae1362a3 7719 ac_cv_lib_pthreads_cma_open=no
0ca10bb7 7720fi
ae1362a3
AS
7721rm -f core conftest.err conftest.$ac_objext \
7722 conftest$ac_exeext conftest.$ac_ext
7723LIBS=$ac_check_lib_save_LIBS
ba4481b5 7724fi
ae1362a3
AS
7725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
7726$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
7727if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
0ca10bb7 7728 cat >>confdefs.h <<_ACEOF
ae1362a3 7729#define HAVE_LIBPTHREADS 1
0ca10bb7 7730_ACEOF
503d2be0 7731
ae1362a3
AS
7732 LIBS="-lpthreads $LIBS"
7733
0ca10bb7 7734fi
6bae0ccf 7735
98418dba 7736
bf89cb4d 7737
ae1362a3
AS
7738case ${host_os} in
7739aix*)
7740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
7741$as_echo_n "checking for -bbigtoc option... " >&6; }
7742if test "${gdb_cv_bigtoc+set}" = set; then :
e9a63f04 7743 $as_echo_n "(cached) " >&6
ba4481b5 7744else
ae1362a3
AS
7745
7746 case $GCC in
7747 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
7748 *) gdb_cv_bigtoc=-bbigtoc ;;
7749 esac
7750
7751 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
7752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 7753/* end confdefs.h. */
ae1362a3
AS
7754
7755int
7756main ()
7757{
7758int i;
7759 ;
7760 return 0;
7761}
0ca10bb7 7762_ACEOF
ae1362a3
AS
7763if ac_fn_c_try_link "$LINENO"; then :
7764
0ca10bb7 7765else
ae1362a3
AS
7766 gdb_cv_bigtoc=
7767fi
7768rm -f core conftest.err conftest.$ac_objext \
7769 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 7770
0ca10bb7 7771fi
ae1362a3
AS
7772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
7773$as_echo "$gdb_cv_bigtoc" >&6; }
7774 ;;
7775esac
0ca10bb7 7776
ae1362a3
AS
7777# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
7778# used for the tests that follow. We set them back to REAL_CFLAGS and
7779# REAL_CPPFLAGS later on.
7780
7781REAL_CPPFLAGS="$CPPFLAGS"
7782
7783if test "${HAVE_X11}" = "yes"; then
7784 DEFS="$C_SWITCH_X_SITE $DEFS"
7785 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
7786 LIBS="$LIBX $LIBS"
7787 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
7788 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
7789
7790 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
7791 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
7792 # but it's more convenient here to set LD_RUN_PATH
7793 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
7794 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
7795 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
7796 export LD_RUN_PATH
7797 fi
7798
7799 if test "${opsys}" = "gnu-linux"; then
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
7801$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
7802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7803/* end confdefs.h. */
7804
7805int
7806main ()
7807{
7808XOpenDisplay ("foo");
7809 ;
7810 return 0;
7811}
7812_ACEOF
7813if ac_fn_c_try_link "$LINENO"; then :
7814 xlinux_first_failure=no
7815else
7816 xlinux_first_failure=yes
7817fi
7818rm -f core conftest.err conftest.$ac_objext \
7819 conftest$ac_exeext conftest.$ac_ext
7820 if test "${xlinux_first_failure}" = "yes"; then
7821 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
7822 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
7823 OLD_CPPFLAGS="$CPPFLAGS"
7824 OLD_LIBS="$LIBS"
7825 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
7826 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
7827 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
7828 LIBS="$LIBS -b i486-linuxaout"
7829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7830/* end confdefs.h. */
7831
7832int
7833main ()
7834{
7835XOpenDisplay ("foo");
7836 ;
7837 return 0;
7838}
7839_ACEOF
7840if ac_fn_c_try_link "$LINENO"; then :
7841 xlinux_second_failure=no
7842else
7843 xlinux_second_failure=yes
7844fi
7845rm -f core conftest.err conftest.$ac_objext \
7846 conftest$ac_exeext conftest.$ac_ext
7847 if test "${xlinux_second_failure}" = "yes"; then
7848 # If we get the same failure with -b, there is no use adding -b.
7849 # So take it out. This plays safe.
7850 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
7851 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
7852 CPPFLAGS="$OLD_CPPFLAGS"
7853 LIBS="$OLD_LIBS"
7854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7855$as_echo "no" >&6; }
7856 else
7857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7858$as_echo "yes" >&6; }
7859 fi
7860 else
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7862$as_echo "no" >&6; }
7863 fi
7864 fi
edfaf76d 7865
ae1362a3
AS
7866 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
7867 # header files included from there.
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
7869$as_echo_n "checking for Xkb... " >&6; }
7870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 7871/* end confdefs.h. */
ae1362a3
AS
7872#include <X11/Xlib.h>
7873#include <X11/XKBlib.h>
7874int
7875main ()
7876{
7877XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
7878 ;
7879 return 0;
7880}
503d2be0 7881_ACEOF
ae1362a3
AS
7882if ac_fn_c_try_link "$LINENO"; then :
7883 emacs_xkb=yes
503d2be0 7884else
ae1362a3 7885 emacs_xkb=no
ba4481b5 7886fi
ae1362a3
AS
7887rm -f core conftest.err conftest.$ac_objext \
7888 conftest$ac_exeext conftest.$ac_ext
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
7890$as_echo "$emacs_xkb" >&6; }
7891 if test $emacs_xkb = yes; then
ba4481b5 7892
ae1362a3 7893$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
0ca10bb7 7894
ae1362a3 7895 fi
0ca10bb7 7896
ae1362a3
AS
7897 for ac_func in XrmSetDatabase XScreenResourceString \
7898XScreenNumberOfScreen XSetWMProtocols
7899do :
7900 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7901ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7902if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
bf89cb4d 7903 cat >>confdefs.h <<_ACEOF
ae1362a3 7904#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
0ca10bb7 7905_ACEOF
edfaf76d 7906
0ca10bb7 7907fi
bf89cb4d 7908done
edfaf76d 7909
ae1362a3 7910fi
0ca10bb7 7911
ae1362a3
AS
7912if test "${window_system}" = "x11"; then
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
7914$as_echo_n "checking X11 version 6... " >&6; }
7915 if test "${emacs_cv_x11_version_6+set}" = set; then :
bf89cb4d 7916 $as_echo_n "(cached) " >&6
f21fadcc 7917else
ae1362a3 7918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 7919/* end confdefs.h. */
ae1362a3
AS
7920#include <X11/Xlib.h>
7921int
7922main ()
7923{
7924#if XlibSpecificationRelease < 6
7925fail;
7926#endif
7927
7928 ;
7929 return 0;
7930}
f21fadcc 7931_ACEOF
ae1362a3
AS
7932if ac_fn_c_try_link "$LINENO"; then :
7933 emacs_cv_x11_version_6=yes
f21fadcc 7934else
ae1362a3
AS
7935 emacs_cv_x11_version_6=no
7936fi
7937rm -f core conftest.err conftest.$ac_objext \
7938 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 7939fi
0ca10bb7 7940
ae1362a3
AS
7941 if test $emacs_cv_x11_version_6 = yes; then
7942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
7943$as_echo "6 or newer" >&6; }
0ca10bb7 7944
ae1362a3 7945$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f21fadcc 7946
ae1362a3
AS
7947 else
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
7949$as_echo "before 6" >&6; }
7950 fi
f21fadcc
JD
7951fi
7952
98418dba 7953
ae1362a3
AS
7954### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
7955HAVE_RSVG=no
7956if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
7957 if test "${with_rsvg}" != "no"; then
7958 RSVG_REQUIRED=2.11.0
7959 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
bf89cb4d 7960
ae1362a3
AS
7961
7962 succeeded=no
7963
7964 # Extract the first word of "pkg-config", so it can be a program name with args.
7965set dummy pkg-config; ac_word=$2
7966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7967$as_echo_n "checking for $ac_word... " >&6; }
7968if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
e9a63f04 7969 $as_echo_n "(cached) " >&6
ba4481b5 7970else
ae1362a3
AS
7971 case $PKG_CONFIG in
7972 [\\/]* | ?:[\\/]*)
7973 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7974 ;;
7975 *)
7976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7977for as_dir in $PATH
7978do
7979 IFS=$as_save_IFS
7980 test -z "$as_dir" && as_dir=.
7981 for ac_exec_ext in '' $ac_executable_extensions; do
7982 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7983 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7985 break 2
7986 fi
7987done
7988 done
7989IFS=$as_save_IFS
0ca10bb7 7990
ae1362a3
AS
7991 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
7992 ;;
7993esac
ba4481b5 7994fi
ae1362a3
AS
7995PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7996if test -n "$PKG_CONFIG"; then
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7998$as_echo "$PKG_CONFIG" >&6; }
7999else
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8001$as_echo "no" >&6; }
ba4481b5
DL
8002fi
8003
0ca10bb7 8004
bf89cb4d 8005
ae1362a3
AS
8006 if test "$PKG_CONFIG" = "no" ; then
8007 :
8008 else
8009 PKG_CONFIG_MIN_VERSION=0.9.0
8010 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8012$as_echo_n "checking for $RSVG_MODULE... " >&6; }
bf89cb4d 8013
ae1362a3
AS
8014 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8016$as_echo "yes" >&6; }
8017 succeeded=yes
ca81d7a0 8018
ae1362a3
AS
8019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8020$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8021 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8023$as_echo "$RSVG_CFLAGS" >&6; }
503d2be0 8024
ae1362a3
AS
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8026$as_echo_n "checking RSVG_LIBS... " >&6; }
8027 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8029$as_echo "$RSVG_LIBS" >&6; }
8030 else
8031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8032$as_echo "no" >&6; }
8033 RSVG_CFLAGS=""
8034 RSVG_LIBS=""
8035 ## If we have a custom action on failure, don't print errors, but
8036 ## do set a variable so people can do so.
8037 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
ba4481b5 8038
ae1362a3 8039 fi
ba4481b5 8040
19650fd6 8041
ca81d7a0 8042
ae1362a3
AS
8043 else
8044 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8045 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8046 fi
8047 fi
ba4481b5 8048
ae1362a3
AS
8049 if test $succeeded = yes; then
8050 :
8051 else
8052 :
8053 fi
98418dba 8054
98418dba 8055
edfaf76d 8056
edfaf76d 8057
ae1362a3
AS
8058 if test ".${RSVG_CFLAGS}" != "."; then
8059 HAVE_RSVG=yes
edfaf76d 8060
ae1362a3 8061$as_echo "#define HAVE_RSVG 1" >>confdefs.h
edfaf76d 8062
ae1362a3
AS
8063 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8064 LIBS="$RSVG_LIBS $LIBS"
8065 fi
8066 fi
8067fi
cd958eb3 8068
19650fd6 8069
ae1362a3
AS
8070HAVE_GTK=no
8071if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8072 GLIB_REQUIRED=2.6
8073 GTK_REQUIRED=2.6
8074 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
ca81d7a0 8075
0ca10bb7 8076
ae1362a3 8077 succeeded=no
503d2be0 8078
ae1362a3
AS
8079 # Extract the first word of "pkg-config", so it can be a program name with args.
8080set dummy pkg-config; ac_word=$2
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8082$as_echo_n "checking for $ac_word... " >&6; }
8083if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8084 $as_echo_n "(cached) " >&6
8085else
8086 case $PKG_CONFIG in
8087 [\\/]* | ?:[\\/]*)
8088 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8089 ;;
8090 *)
8091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8092for as_dir in $PATH
8093do
8094 IFS=$as_save_IFS
8095 test -z "$as_dir" && as_dir=.
8096 for ac_exec_ext in '' $ac_executable_extensions; do
8097 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8098 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8100 break 2
8101 fi
8102done
8103 done
8104IFS=$as_save_IFS
0ca10bb7 8105
ae1362a3
AS
8106 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8107 ;;
8108esac
8109fi
8110PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8111if test -n "$PKG_CONFIG"; then
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8113$as_echo "$PKG_CONFIG" >&6; }
8114else
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
8117fi
edfaf76d 8118
ba4481b5 8119
ba4481b5 8120
ae1362a3
AS
8121 if test "$PKG_CONFIG" = "no" ; then
8122 pkg_check_gtk=no
8123 else
8124 PKG_CONFIG_MIN_VERSION=0.9.0
8125 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8127$as_echo_n "checking for $GTK_MODULES... " >&6; }
bf89cb4d 8128
ae1362a3
AS
8129 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8131$as_echo "yes" >&6; }
8132 succeeded=yes
bf89cb4d 8133
ae1362a3
AS
8134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8135$as_echo_n "checking GTK_CFLAGS... " >&6; }
8136 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8138$as_echo "$GTK_CFLAGS" >&6; }
c0d27fcc 8139
ae1362a3
AS
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8141$as_echo_n "checking GTK_LIBS... " >&6; }
8142 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8144$as_echo "$GTK_LIBS" >&6; }
8145 else
8146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8147$as_echo "no" >&6; }
8148 GTK_CFLAGS=""
8149 GTK_LIBS=""
8150 ## If we have a custom action on failure, don't print errors, but
8151 ## do set a variable so people can do so.
8152 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
19650fd6 8153
ae1362a3 8154 fi
0ca10bb7 8155
0ca10bb7 8156
0ca10bb7 8157
ae1362a3
AS
8158 else
8159 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8160 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8161 fi
8162 fi
0ca10bb7 8163
ae1362a3
AS
8164 if test $succeeded = yes; then
8165 pkg_check_gtk=yes
8166 else
8167 pkg_check_gtk=no
8168 fi
ca81d7a0 8169
ae1362a3
AS
8170 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
8171 as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5
8172 fi
8173fi
c0d27fcc 8174
ca81d7a0 8175
ae1362a3 8176if test x"$pkg_check_gtk" = xyes; then
c0d27fcc 8177
ba4481b5 8178
c0d27fcc 8179
ae1362a3
AS
8180 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8181 CFLAGS="$CFLAGS $GTK_CFLAGS"
8182 LIBS="$GTK_LIBS $LIBS"
8183 GTK_COMPILES=no
8184 for ac_func in gtk_main
8185do :
8186 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8187if test "x$ac_cv_func_gtk_main" = x""yes; then :
8188 cat >>confdefs.h <<_ACEOF
8189#define HAVE_GTK_MAIN 1
8190_ACEOF
8191 GTK_COMPILES=yes
8192fi
8193done
503d2be0 8194
ae1362a3
AS
8195 if test "${GTK_COMPILES}" != "yes"; then
8196 if test "$USE_X_TOOLKIT" != "maybe"; then
8197 as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
8198 fi
8199 else
8200 HAVE_GTK=yes
503d2be0 8201
ae1362a3 8202$as_echo "#define USE_GTK 1" >>confdefs.h
19650fd6 8203
ae1362a3
AS
8204 USE_X_TOOLKIT=none
8205 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
8206 :
8207 else
8208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
8209 closing open displays. This is no problem if you just use
8210 one display, but if you use more than one and close one of them
8211 Emacs may crash." >&5
8212$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
8213 closing open displays. This is no problem if you just use
8214 one display, but if you use more than one and close one of them
8215 Emacs may crash." >&2;}
8216 sleep 3
8217 fi
8218 fi
ca81d7a0 8219
ae1362a3 8220fi
ba4481b5 8221
ba4481b5 8222
ae1362a3 8223if test "${HAVE_GTK}" = "yes"; then
0ca10bb7 8224
ae1362a3
AS
8225 if test "$with_toolkit_scroll_bars" != no; then
8226 with_toolkit_scroll_bars=yes
8227 fi
ba4481b5 8228
ae1362a3
AS
8229 HAVE_GTK_MULTIDISPLAY=no
8230 for ac_func in gdk_display_open
8231do :
8232 ac_fn_c_check_func "$LINENO" "gdk_display_open" "ac_cv_func_gdk_display_open"
8233if test "x$ac_cv_func_gdk_display_open" = x""yes; then :
8234 cat >>confdefs.h <<_ACEOF
8235#define HAVE_GDK_DISPLAY_OPEN 1
8236_ACEOF
8237 HAVE_GTK_MULTIDISPLAY=yes
8238fi
8239done
503d2be0 8240
ae1362a3 8241 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
c0d27fcc 8242
ae1362a3 8243$as_echo "#define HAVE_GTK_MULTIDISPLAY 1" >>confdefs.h
c0d27fcc 8244
ae1362a3 8245 fi
19650fd6 8246
ae1362a3
AS
8247 HAVE_GTK_FILE_SELECTION=no
8248 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
8249#include <gtk/gtk.h>
8250"
8251if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
8252 HAVE_GTK_FILE_SELECTION=yes
0ca10bb7 8253else
ae1362a3 8254 HAVE_GTK_FILE_SELECTION=no
bf89cb4d 8255fi
ae1362a3
AS
8256
8257 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
8258 for ac_func in gtk_file_selection_new
8259do :
8260 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
8261if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
8262 cat >>confdefs.h <<_ACEOF
8263#define HAVE_GTK_FILE_SELECTION_NEW 1
8264_ACEOF
8265 HAVE_GTK_FILE_SELECTION=yes
8266else
8267 HAVE_GTK_FILE_SELECTION=no
0ca10bb7 8268fi
ae1362a3 8269done
c0d27fcc 8270
ae1362a3 8271 fi
ca81d7a0 8272
ae1362a3
AS
8273 HAVE_GTK_FILE_CHOOSER=no
8274 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_CHOOSER" "ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" "$ac_includes_default
8275#include <gtk/gtk.h>
8276"
8277if test "x$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" = x""yes; then :
8278 HAVE_GTK_FILE_CHOOSER=yes
8279else
8280 HAVE_GTK_FILE_CHOOSER=no
ba4481b5 8281fi
98418dba 8282
ae1362a3
AS
8283 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8284 for ac_func in gtk_file_chooser_dialog_new
8285do :
8286 ac_fn_c_check_func "$LINENO" "gtk_file_chooser_dialog_new" "ac_cv_func_gtk_file_chooser_dialog_new"
8287if test "x$ac_cv_func_gtk_file_chooser_dialog_new" = x""yes; then :
8288 cat >>confdefs.h <<_ACEOF
8289#define HAVE_GTK_FILE_CHOOSER_DIALOG_NEW 1
8290_ACEOF
8291 HAVE_GTK_FILE_CHOOSER=yes
8292else
8293 HAVE_GTK_FILE_CHOOSER=no
c0d27fcc 8294fi
ae1362a3 8295done
0ca10bb7 8296
ae1362a3 8297 fi
0ca10bb7 8298
ae1362a3
AS
8299 if test "$HAVE_GTK_FILE_SELECTION" = yes \
8300 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
edfaf76d 8301
ae1362a3 8302$as_echo "#define HAVE_GTK_FILE_BOTH 1" >>confdefs.h
edfaf76d 8303
ae1362a3 8304 fi
edfaf76d 8305
ae1362a3
AS
8306 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8307 HAVE_GTK_AND_PTHREAD=no
8308 for ac_header in pthread.h
8309do :
8310 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8311if test "x$ac_cv_header_pthread_h" = x""yes; then :
8312 cat >>confdefs.h <<_ACEOF
8313#define HAVE_PTHREAD_H 1
8314_ACEOF
bf89cb4d 8315
ae1362a3 8316fi
bf89cb4d 8317
ae1362a3
AS
8318done
8319
8320 if test "$ac_cv_header_pthread_h"; then
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
8322$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
8323if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
0ca10bb7
RC
8324 $as_echo_n "(cached) " >&6
8325else
ae1362a3
AS
8326 ac_check_lib_save_LIBS=$LIBS
8327LIBS="-lpthread $LIBS"
8328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 8329/* end confdefs.h. */
edfaf76d 8330
ca81d7a0
JD
8331/* Override any GCC internal prototype to avoid an error.
8332 Use char because int might match the return type of a GCC
8333 builtin and then its argument prototype would still apply. */
503d2be0
AS
8334#ifdef __cplusplus
8335extern "C"
8336#endif
ae1362a3 8337char pthread_self ();
19650fd6
AS
8338int
8339main ()
8340{
ae1362a3 8341return pthread_self ();
503d2be0
AS
8342 ;
8343 return 0;
8344}
8345_ACEOF
ae1362a3
AS
8346if ac_fn_c_try_link "$LINENO"; then :
8347 ac_cv_lib_pthread_pthread_self=yes
503d2be0 8348else
ae1362a3
AS
8349 ac_cv_lib_pthread_pthread_self=no
8350fi
8351rm -f core conftest.err conftest.$ac_objext \
8352 conftest$ac_exeext conftest.$ac_ext
8353LIBS=$ac_check_lib_save_LIBS
8354fi
8355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
8356$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
8357if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
8358 HAVE_GTK_AND_PTHREAD=yes
8359fi
8360
8361 fi
8362 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
8363 case "${canonical}" in
8364 *-hpux*) ;;
8365 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
8366 esac
0ca10bb7 8367
ae1362a3
AS
8368$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
8369
8370 fi
8371 fi
c0d27fcc 8372fi
ca81d7a0 8373
ae1362a3
AS
8374HAVE_DBUS=no
8375if test "${with_dbus}" = "yes"; then
8376
8377 succeeded=no
8378
8379 # Extract the first word of "pkg-config", so it can be a program name with args.
8380set dummy pkg-config; ac_word=$2
8381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8382$as_echo_n "checking for $ac_word... " >&6; }
8383if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8384 $as_echo_n "(cached) " >&6
8385else
8386 case $PKG_CONFIG in
8387 [\\/]* | ?:[\\/]*)
8388 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8389 ;;
8390 *)
8391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8392for as_dir in $PATH
8393do
8394 IFS=$as_save_IFS
8395 test -z "$as_dir" && as_dir=.
8396 for ac_exec_ext in '' $ac_executable_extensions; do
8397 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8398 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400 break 2
8401 fi
8402done
8403 done
8404IFS=$as_save_IFS
8405
8406 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8407 ;;
8408esac
bf89cb4d 8409fi
ae1362a3
AS
8410PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8411if test -n "$PKG_CONFIG"; then
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8413$as_echo "$PKG_CONFIG" >&6; }
bf89cb4d 8414else
ae1362a3
AS
8415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8416$as_echo "no" >&6; }
bf89cb4d 8417fi
c0d27fcc 8418
19650fd6 8419
c0d27fcc 8420
ae1362a3
AS
8421 if test "$PKG_CONFIG" = "no" ; then
8422 HAVE_DBUS=no
8423 else
8424 PKG_CONFIG_MIN_VERSION=0.9.0
8425 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
8427$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
0ca10bb7 8428
ae1362a3
AS
8429 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
8430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8431$as_echo "yes" >&6; }
8432 succeeded=yes
0ca10bb7 8433
ae1362a3
AS
8434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
8435$as_echo_n "checking DBUS_CFLAGS... " >&6; }
8436 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
8438$as_echo "$DBUS_CFLAGS" >&6; }
0ca10bb7 8439
ae1362a3
AS
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
8441$as_echo_n "checking DBUS_LIBS... " >&6; }
8442 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
8444$as_echo "$DBUS_LIBS" >&6; }
8445 else
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8447$as_echo "no" >&6; }
8448 DBUS_CFLAGS=""
8449 DBUS_LIBS=""
8450 ## If we have a custom action on failure, don't print errors, but
8451 ## do set a variable so people can do so.
8452 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
8453
8454 fi
0ca10bb7 8455
ba4481b5 8456
98418dba 8457
ae1362a3
AS
8458 else
8459 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8460 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8461 fi
8462 fi
8463
8464 if test $succeeded = yes; then
8465 HAVE_DBUS=yes
8466 else
8467 HAVE_DBUS=no
8468 fi
8469
8470 if test "$HAVE_DBUS" = yes; then
8471 LIBS="$LIBS $DBUS_LIBS"
8472
8473$as_echo "#define HAVE_DBUS 1" >>confdefs.h
8474
8475 for ac_func in dbus_watch_get_unix_fd
8476do :
8477 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
8478if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
bf89cb4d 8479 cat >>confdefs.h <<_ACEOF
ae1362a3 8480#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
bf89cb4d 8481_ACEOF
c0d27fcc 8482
98418dba 8483fi
bf89cb4d 8484done
98418dba 8485
ae1362a3
AS
8486 fi
8487fi
bf89cb4d 8488
ae1362a3
AS
8489HAVE_GCONF=no
8490if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
bf89cb4d 8491
ae1362a3
AS
8492 succeeded=no
8493
8494 # Extract the first word of "pkg-config", so it can be a program name with args.
8495set dummy pkg-config; ac_word=$2
8496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8497$as_echo_n "checking for $ac_word... " >&6; }
8498if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
e9a63f04 8499 $as_echo_n "(cached) " >&6
98418dba 8500else
ae1362a3
AS
8501 case $PKG_CONFIG in
8502 [\\/]* | ?:[\\/]*)
8503 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8504 ;;
8505 *)
8506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8507for as_dir in $PATH
8508do
8509 IFS=$as_save_IFS
8510 test -z "$as_dir" && as_dir=.
8511 for ac_exec_ext in '' $ac_executable_extensions; do
8512 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8513 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8514 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8515 break 2
8516 fi
8517done
8518 done
8519IFS=$as_save_IFS
19650fd6 8520
ae1362a3
AS
8521 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8522 ;;
bf89cb4d 8523esac
ae1362a3
AS
8524fi
8525PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8526if test -n "$PKG_CONFIG"; then
8527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8528$as_echo "$PKG_CONFIG" >&6; }
c0d27fcc 8529else
ae1362a3
AS
8530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8531$as_echo "no" >&6; }
0ca10bb7 8532fi
bf89cb4d 8533
ca81d7a0 8534
c0d27fcc 8535
ae1362a3
AS
8536 if test "$PKG_CONFIG" = "no" ; then
8537 HAVE_GCONF=no
8538 else
8539 PKG_CONFIG_MIN_VERSION=0.9.0
8540 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
8542$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
ca81d7a0 8543
ae1362a3
AS
8544 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8546$as_echo "yes" >&6; }
8547 succeeded=yes
bf89cb4d 8548
ae1362a3
AS
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
8550$as_echo_n "checking GCONF_CFLAGS... " >&6; }
8551 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
8553$as_echo "$GCONF_CFLAGS" >&6; }
c0d27fcc 8554
ae1362a3
AS
8555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
8556$as_echo_n "checking GCONF_LIBS... " >&6; }
8557 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
8559$as_echo "$GCONF_LIBS" >&6; }
8560 else
8561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8562$as_echo "no" >&6; }
8563 GCONF_CFLAGS=""
8564 GCONF_LIBS=""
8565 ## If we have a custom action on failure, don't print errors, but
8566 ## do set a variable so people can do so.
8567 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
c0d27fcc 8568
ae1362a3 8569 fi
c0d27fcc
MR
8570
8571
ae1362a3
AS
8572
8573 else
8574 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8575 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8576 fi
8577 fi
8578
8579 if test $succeeded = yes; then
8580 HAVE_GCONF=yes
8581 else
8582 HAVE_GCONF=no
8583 fi
8584
8585 if test "$HAVE_GCONF" = yes; then
8586
8587$as_echo "#define HAVE_GCONF 1" >>confdefs.h
8588
8589 fi
bf89cb4d 8590fi
ae1362a3
AS
8591
8592HAVE_XAW3D=no
8593if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
8594 if test "$with_xaw3d" != no; then
8595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
8596$as_echo_n "checking for xaw3d... " >&6; }
8597 if test "${emacs_cv_xaw3d+set}" = set; then :
e9a63f04 8598 $as_echo_n "(cached) " >&6
c0d27fcc 8599else
ae1362a3 8600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 8601/* end confdefs.h. */
bf89cb4d 8602
ae1362a3
AS
8603#include <X11/Intrinsic.h>
8604#include <X11/Xaw3d/Simple.h>
0ca10bb7
RC
8605int
8606main ()
8607{
ae1362a3 8608
0ca10bb7
RC
8609 ;
8610 return 0;
8611}
503d2be0 8612_ACEOF
ae1362a3
AS
8613if ac_fn_c_try_link "$LINENO"; then :
8614 emacs_cv_xaw3d=yes
503d2be0 8615else
ae1362a3 8616 emacs_cv_xaw3d=no
bf89cb4d 8617fi
ae1362a3
AS
8618rm -f core conftest.err conftest.$ac_objext \
8619 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 8620fi
c0d27fcc 8621
ae1362a3
AS
8622 else
8623 emacs_cv_xaw3d=no
8624 fi
8625 if test $emacs_cv_xaw3d = yes; then
8626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
8627$as_echo "yes; using Lucid toolkit" >&6; }
8628 USE_X_TOOLKIT=LUCID
8629 HAVE_XAW3D=yes
8630
8631$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
8632
8633 else
8634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8635$as_echo "no" >&6; }
8636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
8637$as_echo_n "checking for libXaw... " >&6; }
8638 if test "${emacs_cv_xaw+set}" = set; then :
e9a63f04 8639 $as_echo_n "(cached) " >&6
b5de8dc0 8640else
ae1362a3 8641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 8642/* end confdefs.h. */
b5de8dc0 8643
ae1362a3
AS
8644#include <X11/Intrinsic.h>
8645#include <X11/Xaw/Simple.h>
503d2be0
AS
8646int
8647main ()
8648{
ae1362a3 8649
503d2be0
AS
8650 ;
8651 return 0;
8652}
8653_ACEOF
ae1362a3
AS
8654if ac_fn_c_try_link "$LINENO"; then :
8655 emacs_cv_xaw=yes
503d2be0 8656else
ae1362a3 8657 emacs_cv_xaw=no
0ca10bb7 8658fi
ae1362a3
AS
8659rm -f core conftest.err conftest.$ac_objext \
8660 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
8661fi
8662
ae1362a3
AS
8663 if test $emacs_cv_xaw = yes; then
8664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
8665$as_echo "yes; using Lucid toolkit" >&6; }
8666 USE_X_TOOLKIT=LUCID
8667 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
8668 as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
8669 else
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
8671$as_echo "no; do not use toolkit by default" >&6; }
8672 USE_X_TOOLKIT=none
8673 fi
8674 fi
0ca10bb7
RC
8675fi
8676
ae1362a3
AS
8677X_TOOLKIT_TYPE=$USE_X_TOOLKIT
8678
8679if test "${USE_X_TOOLKIT}" != "none"; then
8680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
8681$as_echo_n "checking X11 toolkit version... " >&6; }
8682 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
0ca10bb7
RC
8683 $as_echo_n "(cached) " >&6
8684else
ae1362a3 8685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 8686/* end confdefs.h. */
ae1362a3 8687#include <X11/Intrinsic.h>
6bae0ccf
DL
8688int
8689main ()
8690{
ae1362a3
AS
8691#if XtSpecificationRelease < 6
8692fail;
8693#endif
8694
6bae0ccf
DL
8695 ;
8696 return 0;
8697}
8698_ACEOF
ae1362a3
AS
8699if ac_fn_c_try_link "$LINENO"; then :
8700 emacs_cv_x11_toolkit_version_6=yes
6bae0ccf 8701else
ae1362a3 8702 emacs_cv_x11_toolkit_version_6=no
6bae0ccf 8703fi
ae1362a3
AS
8704rm -f core conftest.err conftest.$ac_objext \
8705 conftest$ac_exeext conftest.$ac_ext
98418dba 8706fi
c0d27fcc 8707
ae1362a3
AS
8708 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
8709 if test $emacs_cv_x11_toolkit_version_6 = yes; then
8710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8711$as_echo "6 or newer" >&6; }
c0d27fcc 8712
ae1362a3 8713$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
bf89cb4d 8714
ae1362a3
AS
8715 else
8716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8717$as_echo "before 6" >&6; }
8718 fi
8719
8720 OLDLIBS="$LIBS"
8721 if test x$HAVE_X11XTR6 = xyes; then
8722 LIBS="-lXt -lSM -lICE $LIBS"
8723 else
8724 LIBS="-lXt $LIBS"
8725 fi
8726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
8727$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
8728if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
e9a63f04 8729 $as_echo_n "(cached) " >&6
98418dba 8730else
ae1362a3
AS
8731 ac_check_lib_save_LIBS=$LIBS
8732LIBS="-lXmu $LIBS"
8733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 8734/* end confdefs.h. */
98418dba 8735
0ca10bb7
RC
8736/* Override any GCC internal prototype to avoid an error.
8737 Use char because int might match the return type of a GCC
8738 builtin and then its argument prototype would still apply. */
8739#ifdef __cplusplus
8740extern "C"
8741#endif
ae1362a3 8742char XmuConvertStandardSelection ();
0ca10bb7
RC
8743int
8744main ()
8745{
ae1362a3 8746return XmuConvertStandardSelection ();
0ca10bb7
RC
8747 ;
8748 return 0;
8749}
8750_ACEOF
ae1362a3
AS
8751if ac_fn_c_try_link "$LINENO"; then :
8752 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
0ca10bb7 8753else
ae1362a3 8754 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
b5de8dc0 8755fi
ae1362a3
AS
8756rm -f core conftest.err conftest.$ac_objext \
8757 conftest$ac_exeext conftest.$ac_ext
8758LIBS=$ac_check_lib_save_LIBS
b5de8dc0 8759fi
ae1362a3
AS
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
8761$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
8762if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
bf89cb4d 8763 cat >>confdefs.h <<_ACEOF
ae1362a3 8764#define HAVE_LIBXMU 1
bf89cb4d 8765_ACEOF
0ca10bb7 8766
ae1362a3 8767 LIBS="-lXmu $LIBS"
0ca10bb7 8768
bf89cb4d 8769fi
ca81d7a0 8770
ae1362a3 8771 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
b936fae4 8772fi
bf89cb4d 8773
ae1362a3
AS
8774# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
8775if test "${HAVE_X11}" = "yes"; then
8776 if test "${USE_X_TOOLKIT}" != "none"; then
8777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
8778$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
8779if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
bf89cb4d
GM
8780 $as_echo_n "(cached) " >&6
8781else
8782 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
8783LIBS="-lXext $LIBS"
8784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7
RC
8785/* end confdefs.h. */
8786
bf89cb4d
GM
8787/* Override any GCC internal prototype to avoid an error.
8788 Use char because int might match the return type of a GCC
8789 builtin and then its argument prototype would still apply. */
8790#ifdef __cplusplus
8791extern "C"
8792#endif
ae1362a3 8793char XShapeQueryExtension ();
0ca10bb7
RC
8794int
8795main ()
8796{
ae1362a3
AS
8797return XShapeQueryExtension ();
8798 ;
8799 return 0;
8800}
8801_ACEOF
8802if ac_fn_c_try_link "$LINENO"; then :
8803 ac_cv_lib_Xext_XShapeQueryExtension=yes
0ca10bb7 8804else
ae1362a3 8805 ac_cv_lib_Xext_XShapeQueryExtension=no
bf89cb4d 8806fi
ae1362a3
AS
8807rm -f core conftest.err conftest.$ac_objext \
8808 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
8809LIBS=$ac_check_lib_save_LIBS
8810fi
ae1362a3
AS
8811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
8812$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
8813if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
bf89cb4d 8814 cat >>confdefs.h <<_ACEOF
ae1362a3 8815#define HAVE_LIBXEXT 1
bf89cb4d 8816_ACEOF
52dbaac8 8817
ae1362a3 8818 LIBS="-lXext $LIBS"
52dbaac8 8819
bf89cb4d 8820fi
52dbaac8 8821
ae1362a3 8822 fi
bf89cb4d 8823fi
52dbaac8 8824
ae1362a3
AS
8825if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
8827$as_echo_n "checking for Motif version 2.1... " >&6; }
8828if test "${emacs_cv_motif_version_2_1+set}" = set; then :
e9a63f04 8829 $as_echo_n "(cached) " >&6
52dbaac8 8830else
ae1362a3 8831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 8832/* end confdefs.h. */
ae1362a3
AS
8833#include <Xm/Xm.h>
8834int
8835main ()
8836{
8837#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
8838int x = 5;
8839#else
8840Motif version prior to 2.1.
8841#endif
8842 ;
8843 return 0;
8844}
bf89cb4d 8845_ACEOF
ae1362a3
AS
8846if ac_fn_c_try_compile "$LINENO"; then :
8847 emacs_cv_motif_version_2_1=yes
52dbaac8 8848else
ae1362a3 8849 emacs_cv_motif_version_2_1=no
bf89cb4d 8850fi
bf89cb4d 8851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf89cb4d 8852fi
ae1362a3
AS
8853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
8854$as_echo "$emacs_cv_motif_version_2_1" >&6; }
8855 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
8856 if test $emacs_cv_motif_version_2_1 = yes; then
8857 HAVE_LIBXP=no
52dbaac8 8858
ae1362a3 8859$as_echo "#define HAVE_MOTIF_2_1 1" >>confdefs.h
52dbaac8 8860
ae1362a3
AS
8861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
8862$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
8863if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
e9a63f04 8864 $as_echo_n "(cached) " >&6
52dbaac8 8865else
ae1362a3
AS
8866 ac_check_lib_save_LIBS=$LIBS
8867LIBS="-lXp $LIBS"
8868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52dbaac8 8869/* end confdefs.h. */
52dbaac8 8870
0ca10bb7
RC
8871/* Override any GCC internal prototype to avoid an error.
8872 Use char because int might match the return type of a GCC
8873 builtin and then its argument prototype would still apply. */
8874#ifdef __cplusplus
8875extern "C"
52dbaac8 8876#endif
ae1362a3 8877char XpCreateContext ();
0ca10bb7
RC
8878int
8879main ()
8880{
ae1362a3 8881return XpCreateContext ();
0ca10bb7
RC
8882 ;
8883 return 0;
8884}
8885_ACEOF
ae1362a3
AS
8886if ac_fn_c_try_link "$LINENO"; then :
8887 ac_cv_lib_Xp_XpCreateContext=yes
0ca10bb7 8888else
ae1362a3 8889 ac_cv_lib_Xp_XpCreateContext=no
0ca10bb7 8890fi
ae1362a3
AS
8891rm -f core conftest.err conftest.$ac_objext \
8892 conftest$ac_exeext conftest.$ac_ext
8893LIBS=$ac_check_lib_save_LIBS
0ca10bb7 8894fi
ae1362a3
AS
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
8896$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
8897if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
8898 HAVE_LIBXP=yes
0ca10bb7 8899fi
bf89cb4d 8900
ae1362a3 8901 if test ${HAVE_LIBXP} = yes; then
bf89cb4d 8902
ae1362a3 8903$as_echo "#define HAVE_LIBXP 1" >>confdefs.h
bf89cb4d 8904
ae1362a3
AS
8905 fi
8906 else
8907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
8908$as_echo_n "checking for LessTif where some systems put it... " >&6; }
8909if test "${emacs_cv_lesstif+set}" = set; then :
0ca10bb7
RC
8910 $as_echo_n "(cached) " >&6
8911else
ae1362a3
AS
8912 # We put this in CFLAGS temporarily to precede other -I options
8913 # that might be in CFLAGS temporarily.
8914 # We put this in CPPFLAGS where it precedes the other -I options.
8915 OLD_CPPFLAGS=$CPPFLAGS
8916 OLD_CFLAGS=$CFLAGS
8917 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
8918 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 8920/* end confdefs.h. */
ae1362a3
AS
8921#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
8922int
8923main ()
8924{
8925int x = 5;
8926 ;
8927 return 0;
8928}
bf89cb4d 8929_ACEOF
ae1362a3
AS
8930if ac_fn_c_try_compile "$LINENO"; then :
8931 emacs_cv_lesstif=yes
bf89cb4d 8932else
ae1362a3 8933 emacs_cv_lesstif=no
bf89cb4d 8934fi
bf89cb4d 8935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3
AS
8936fi
8937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
8938$as_echo "$emacs_cv_lesstif" >&6; }
8939 if test $emacs_cv_lesstif = yes; then
8940 # Make sure this -I option remains in CPPFLAGS after it is set
8941 # back to REAL_CPPFLAGS.
8942 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
8943 # have those other -I options anyway. Ultimately, having this
8944 # directory ultimately in CPPFLAGS will be enough.
8945 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
8946 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
8947 else
8948 CFLAGS=$OLD_CFLAGS
8949 CPPFLAGS=$OLD_CPPFLAGS
8950 fi
8951 fi
8952fi
bf89cb4d 8953
bf89cb4d 8954
ae1362a3
AS
8955USE_TOOLKIT_SCROLL_BARS=no
8956if test "${with_toolkit_scroll_bars}" != "no"; then
8957 if test "${USE_X_TOOLKIT}" != "none"; then
8958 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8959 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
bf89cb4d 8960
ae1362a3
AS
8961 HAVE_XAW3D=no
8962 USE_TOOLKIT_SCROLL_BARS=yes
8963 elif test "${HAVE_XAW3D}" = "yes"; then
8964 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
bf89cb4d 8965
ae1362a3
AS
8966 USE_TOOLKIT_SCROLL_BARS=yes
8967 fi
8968 elif test "${HAVE_GTK}" = "yes"; then
8969 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
bf89cb4d 8970
ae1362a3
AS
8971 USE_TOOLKIT_SCROLL_BARS=yes
8972 elif test "${HAVE_NS}" = "yes"; then
8973 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
8974
8975 USE_TOOLKIT_SCROLL_BARS=yes
8976 fi
0ca10bb7 8977fi
bf89cb4d 8978
ae1362a3
AS
8979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8980/* end confdefs.h. */
8981
8982 #include <X11/Xlib.h>
8983 #include <X11/Xresource.h>
8984int
8985main ()
8986{
8987XIMProc callback;
8988 ;
8989 return 0;
8990}
8991_ACEOF
8992if ac_fn_c_try_compile "$LINENO"; then :
8993 HAVE_XIM=yes
8994
8995$as_echo "#define HAVE_XIM 1" >>confdefs.h
8996
8997else
8998 HAVE_XIM=no
52dbaac8 8999fi
ae1362a3 9000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf89cb4d 9001
bf89cb4d 9002
ae1362a3 9003if test "${with_xim}" != "no"; then
bf89cb4d 9004
ae1362a3 9005$as_echo "#define USE_XIM 1" >>confdefs.h
52dbaac8 9006
52dbaac8 9007fi
52dbaac8 9008
52dbaac8 9009
ae1362a3
AS
9010if test "${HAVE_XIM}" != "no"; then
9011 late_CFLAGS=$CFLAGS
9012 if test "$GCC" = yes; then
9013 CFLAGS="$CFLAGS --pedantic-errors"
9014 fi
9015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 9016/* end confdefs.h. */
0ca10bb7 9017
ae1362a3
AS
9018#include <X11/Xlib.h>
9019#include <X11/Xresource.h>
9020int
9021main ()
9022{
9023Display *display;
9024XrmDatabase db;
9025char *res_name;
9026char *res_class;
9027XIMProc callback;
9028XPointer *client_data;
9029#ifndef __GNUC__
9030/* If we're not using GCC, it's probably not XFree86, and this is
9031 probably right, but we can't use something like --pedantic-errors. */
9032extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9033 char*, XIMProc, XPointer*);
9034#endif
9035(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9036 client_data);
9037 ;
9038 return 0;
9039}
9040_ACEOF
9041if ac_fn_c_try_compile "$LINENO"; then :
9042 emacs_cv_arg6_star=yes
bf89cb4d 9043fi
bf89cb4d 9044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3
AS
9045 if test "$emacs_cv_arg6_star" = yes; then
9046 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
0ca10bb7 9047
ae1362a3
AS
9048 else
9049 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
0ca10bb7 9050
ae1362a3
AS
9051 fi
9052 CFLAGS=$late_CFLAGS
bf89cb4d 9053fi
0ca10bb7 9054
ae1362a3
AS
9055### Start of font-backend (under any platform) section.
9056# (nothing here yet -- this is a placeholder)
9057### End of font-backend (under any platform) section.
0ca10bb7 9058
ae1362a3
AS
9059### Start of font-backend (under X11) section.
9060if test "${HAVE_X11}" = "yes"; then
bf89cb4d 9061
ae1362a3
AS
9062 succeeded=no
9063
9064 # Extract the first word of "pkg-config", so it can be a program name with args.
9065set dummy pkg-config; ac_word=$2
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9067$as_echo_n "checking for $ac_word... " >&6; }
9068if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
bf89cb4d
GM
9069 $as_echo_n "(cached) " >&6
9070else
ae1362a3
AS
9071 case $PKG_CONFIG in
9072 [\\/]* | ?:[\\/]*)
9073 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9074 ;;
9075 *)
9076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077for as_dir in $PATH
9078do
9079 IFS=$as_save_IFS
9080 test -z "$as_dir" && as_dir=.
9081 for ac_exec_ext in '' $ac_executable_extensions; do
9082 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9083 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085 break 2
9086 fi
9087done
9088 done
9089IFS=$as_save_IFS
0ca10bb7 9090
ae1362a3
AS
9091 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9092 ;;
9093esac
bf89cb4d 9094fi
ae1362a3
AS
9095PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9096if test -n "$PKG_CONFIG"; then
9097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9098$as_echo "$PKG_CONFIG" >&6; }
9099else
9100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9101$as_echo "no" >&6; }
bf89cb4d 9102fi
0ca10bb7 9103
0ca10bb7 9104
0ca10bb7 9105
ae1362a3
AS
9106 if test "$PKG_CONFIG" = "no" ; then
9107 HAVE_FC=no
9108 else
9109 PKG_CONFIG_MIN_VERSION=0.9.0
9110 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
9112$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
bf89cb4d 9113
ae1362a3
AS
9114 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9116$as_echo "yes" >&6; }
9117 succeeded=yes
52dbaac8 9118
ae1362a3
AS
9119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
9120$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
9121 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
9123$as_echo "$FONTCONFIG_CFLAGS" >&6; }
0ca10bb7 9124
ae1362a3
AS
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
9126$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
9127 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
9129$as_echo "$FONTCONFIG_LIBS" >&6; }
9130 else
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132$as_echo "no" >&6; }
9133 FONTCONFIG_CFLAGS=""
9134 FONTCONFIG_LIBS=""
9135 ## If we have a custom action on failure, don't print errors, but
9136 ## do set a variable so people can do so.
9137 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
0ca10bb7 9138
ae1362a3 9139 fi
0ca10bb7 9140
0ca10bb7 9141
0ca10bb7 9142
ae1362a3
AS
9143 else
9144 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9145 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9146 fi
9147 fi
0ca10bb7 9148
ae1362a3
AS
9149 if test $succeeded = yes; then
9150 HAVE_FC=yes
9151 else
9152 HAVE_FC=no
9153 fi
9154
9155
9156 ## Use -lXft if available, unless `--with-xft=no'.
9157 HAVE_XFT=maybe
9158 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
9159 with_xft="no";
9160 fi
9161 if test "x${with_xft}" != "xno"; then
9162
9163
9164 succeeded=no
9165
9166 # Extract the first word of "pkg-config", so it can be a program name with args.
9167set dummy pkg-config; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
bf89cb4d
GM
9171 $as_echo_n "(cached) " >&6
9172else
ae1362a3
AS
9173 case $PKG_CONFIG in
9174 [\\/]* | ?:[\\/]*)
9175 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9176 ;;
9177 *)
9178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181 IFS=$as_save_IFS
9182 test -z "$as_dir" && as_dir=.
9183 for ac_exec_ext in '' $ac_executable_extensions; do
9184 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9185 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187 break 2
9188 fi
9189done
9190 done
9191IFS=$as_save_IFS
0ca10bb7 9192
ae1362a3
AS
9193 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9194 ;;
9195esac
bf89cb4d 9196fi
ae1362a3
AS
9197PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9198if test -n "$PKG_CONFIG"; then
9199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9200$as_echo "$PKG_CONFIG" >&6; }
9201else
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203$as_echo "no" >&6; }
bf89cb4d 9204fi
52dbaac8 9205
0ca10bb7 9206
0ca10bb7 9207
ae1362a3
AS
9208 if test "$PKG_CONFIG" = "no" ; then
9209 HAVE_XFT=no
9210 else
9211 PKG_CONFIG_MIN_VERSION=0.9.0
9212 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
9214$as_echo_n "checking for xft >= 0.13.0... " >&6; }
0ca10bb7 9215
ae1362a3
AS
9216 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
9217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9218$as_echo "yes" >&6; }
9219 succeeded=yes
bf89cb4d 9220
ae1362a3
AS
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
9222$as_echo_n "checking XFT_CFLAGS... " >&6; }
9223 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
9225$as_echo "$XFT_CFLAGS" >&6; }
52dbaac8 9226
ae1362a3
AS
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
9228$as_echo_n "checking XFT_LIBS... " >&6; }
9229 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
9231$as_echo "$XFT_LIBS" >&6; }
9232 else
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9234$as_echo "no" >&6; }
9235 XFT_CFLAGS=""
9236 XFT_LIBS=""
9237 ## If we have a custom action on failure, don't print errors, but
9238 ## do set a variable so people can do so.
9239 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
bf89cb4d 9240
ae1362a3 9241 fi
52dbaac8 9242
52dbaac8 9243
0ca10bb7 9244
ae1362a3
AS
9245 else
9246 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9247 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9248 fi
9249 fi
0ca10bb7 9250
ae1362a3
AS
9251 if test $succeeded = yes; then
9252 :
9253 else
9254 HAVE_XFT=no
9255 fi
0ca10bb7 9256
ae1362a3
AS
9257 ## Because xftfont.c uses XRenderQueryExtension, we also
9258 ## need to link to -lXrender.
9259 HAVE_XRENDER=no
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
9261$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
9262if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
0ca10bb7 9263 $as_echo_n "(cached) " >&6
52dbaac8 9264else
ae1362a3
AS
9265 ac_check_lib_save_LIBS=$LIBS
9266LIBS="-lXrender $LIBS"
9267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 9268/* end confdefs.h. */
52dbaac8 9269
ae1362a3
AS
9270/* Override any GCC internal prototype to avoid an error.
9271 Use char because int might match the return type of a GCC
9272 builtin and then its argument prototype would still apply. */
9273#ifdef __cplusplus
9274extern "C"
9275#endif
9276char XRenderQueryExtension ();
bf89cb4d
GM
9277int
9278main ()
9279{
ae1362a3 9280return XRenderQueryExtension ();
bf89cb4d
GM
9281 ;
9282 return 0;
9283}
9284_ACEOF
ae1362a3
AS
9285if ac_fn_c_try_link "$LINENO"; then :
9286 ac_cv_lib_Xrender_XRenderQueryExtension=yes
0ca10bb7 9287else
ae1362a3
AS
9288 ac_cv_lib_Xrender_XRenderQueryExtension=no
9289fi
9290rm -f core conftest.err conftest.$ac_objext \
9291 conftest$ac_exeext conftest.$ac_ext
9292LIBS=$ac_check_lib_save_LIBS
9293fi
9294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
9295$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
9296if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
9297 HAVE_XRENDER=yes
9298fi
52dbaac8 9299
ae1362a3
AS
9300 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
9301 OLD_CPPFLAGS="$CPPFLAGS"
9302 OLD_CFLAGS="$CFLAGS"
9303 OLD_LIBS="$LIBS"
9304 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
9305 CFLAGS="$CFLAGS $XFT_CFLAGS"
9306 XFT_LIBS="-lXrender $XFT_LIBS"
9307 LIBS="$XFT_LIBS $LIBS"
9308 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
9309if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
9310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
9311$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
9312if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
9313 $as_echo_n "(cached) " >&6
9314else
9315 ac_check_lib_save_LIBS=$LIBS
9316LIBS="-lXft $XFT_LIBS $LIBS"
9317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 9318/* end confdefs.h. */
52dbaac8 9319
ae1362a3
AS
9320/* Override any GCC internal prototype to avoid an error.
9321 Use char because int might match the return type of a GCC
9322 builtin and then its argument prototype would still apply. */
9323#ifdef __cplusplus
9324extern "C"
9325#endif
9326char XftFontOpen ();
bf89cb4d
GM
9327int
9328main ()
9329{
ae1362a3 9330return XftFontOpen ();
bf89cb4d
GM
9331 ;
9332 return 0;
9333}
9334_ACEOF
ae1362a3
AS
9335if ac_fn_c_try_link "$LINENO"; then :
9336 ac_cv_lib_Xft_XftFontOpen=yes
bf89cb4d 9337else
ae1362a3 9338 ac_cv_lib_Xft_XftFontOpen=no
bf89cb4d 9339fi
ae1362a3
AS
9340rm -f core conftest.err conftest.$ac_objext \
9341 conftest$ac_exeext conftest.$ac_ext
9342LIBS=$ac_check_lib_save_LIBS
9343fi
9344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
9345$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
9346if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
9347 HAVE_XFT=yes
bf89cb4d 9348fi
52dbaac8 9349
bf89cb4d 9350fi
52dbaac8
PE
9351
9352
9353
ae1362a3 9354 if test "${HAVE_XFT}" = "yes"; then
52dbaac8 9355
ae1362a3 9356$as_echo "#define HAVE_XFT 1" >>confdefs.h
52dbaac8
PE
9357
9358
ae1362a3
AS
9359 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
9360 else
9361 CPPFLAGS="$OLD_CPPFLAGS"
9362 CFLAGS="$OLD_CFLAGS"
9363 LIBS="$OLD_LIBS"
9364 fi # "${HAVE_XFT}" = "yes"
9365 fi # "$HAVE_XFT" != no
9366 fi # "x${with_xft}" != "xno"
52dbaac8 9367
ae1362a3
AS
9368 if test "$HAVE_XFT" != "yes"; then
9369 HAVE_XFT=no
9370 fi
52dbaac8 9371
cd958eb3 9372
ae1362a3
AS
9373 HAVE_FREETYPE=no
9374 ## We used to allow building with FreeType and without Xft.
9375 ## However, the ftx font backend driver is not in good shape.
9376 if test "${HAVE_XFT}" = "yes"; then
9377 HAVE_FREETYPE=yes
9378 FONTCONFIG_CFLAGS=
9379 FONTCONFIG_LIBS=
9380 fi
9381
9382 HAVE_LIBOTF=no
9383 if test "${HAVE_FREETYPE}" = "yes"; then
9384
9385$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
cd958eb3 9386
ae1362a3
AS
9387 if test "${with_libotf}" != "no"; then
9388
9389 succeeded=no
9390
9391 # Extract the first word of "pkg-config", so it can be a program name with args.
9392set dummy pkg-config; ac_word=$2
9393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9394$as_echo_n "checking for $ac_word... " >&6; }
9395if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
bf89cb4d
GM
9396 $as_echo_n "(cached) " >&6
9397else
ae1362a3
AS
9398 case $PKG_CONFIG in
9399 [\\/]* | ?:[\\/]*)
9400 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9401 ;;
9402 *)
9403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9404for as_dir in $PATH
9405do
9406 IFS=$as_save_IFS
9407 test -z "$as_dir" && as_dir=.
9408 for ac_exec_ext in '' $ac_executable_extensions; do
9409 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9410 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9412 break 2
9413 fi
9414done
9415 done
9416IFS=$as_save_IFS
9417
9418 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9419 ;;
9420esac
9421fi
9422PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9423if test -n "$PKG_CONFIG"; then
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9425$as_echo "$PKG_CONFIG" >&6; }
bf89cb4d 9426else
ae1362a3
AS
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9428$as_echo "no" >&6; }
bf89cb4d 9429fi
973a76b1 9430
edfaf76d 9431
edfaf76d 9432
ae1362a3
AS
9433 if test "$PKG_CONFIG" = "no" ; then
9434 HAVE_LIBOTF=no
9435 else
9436 PKG_CONFIG_MIN_VERSION=0.9.0
9437 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
9439$as_echo_n "checking for libotf... " >&6; }
9440
9441 if $PKG_CONFIG --exists "libotf" 2>&5; then
9442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9443$as_echo "yes" >&6; }
9444 succeeded=yes
9445
9446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
9447$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
9448 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
9449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
9450$as_echo "$LIBOTF_CFLAGS" >&6; }
9451
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
9453$as_echo_n "checking LIBOTF_LIBS... " >&6; }
9454 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
9455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
9456$as_echo "$LIBOTF_LIBS" >&6; }
9457 else
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459$as_echo "no" >&6; }
9460 LIBOTF_CFLAGS=""
9461 LIBOTF_LIBS=""
9462 ## If we have a custom action on failure, don't print errors, but
9463 ## do set a variable so people can do so.
9464 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
9465
9466 fi
edfaf76d 9467
973a76b1 9468
19650fd6 9469
ae1362a3
AS
9470 else
9471 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9472 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9473 fi
9474 fi
9475
9476 if test $succeeded = yes; then
9477 HAVE_LIBOTF=yes
9478 else
9479 HAVE_LIBOTF=no
9480 fi
9481
9482 if test "$HAVE_LIBOTF" = "yes"; then
ca81d7a0 9483
ae1362a3 9484$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
973a76b1 9485
ae1362a3
AS
9486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
9487$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
9488if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
e9a63f04 9489 $as_echo_n "(cached) " >&6
973a76b1 9490else
ae1362a3
AS
9491 ac_check_lib_save_LIBS=$LIBS
9492LIBS="-lotf $LIBS"
9493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 9494/* end confdefs.h. */
973a76b1 9495
ae1362a3
AS
9496/* Override any GCC internal prototype to avoid an error.
9497 Use char because int might match the return type of a GCC
9498 builtin and then its argument prototype would still apply. */
9499#ifdef __cplusplus
9500extern "C"
9501#endif
9502char OTF_get_variation_glyphs ();
bf89cb4d
GM
9503int
9504main ()
9505{
ae1362a3 9506return OTF_get_variation_glyphs ();
bf89cb4d
GM
9507 ;
9508 return 0;
9509}
9510_ACEOF
ae1362a3
AS
9511if ac_fn_c_try_link "$LINENO"; then :
9512 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
bf89cb4d 9513else
ae1362a3 9514 ac_cv_lib_otf_OTF_get_variation_glyphs=no
973a76b1 9515fi
ae1362a3
AS
9516rm -f core conftest.err conftest.$ac_objext \
9517 conftest$ac_exeext conftest.$ac_ext
9518LIBS=$ac_check_lib_save_LIBS
bf89cb4d 9519fi
ae1362a3
AS
9520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
9521$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
9522if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
9523 HAVE_OTF_GET_VARIATION_GLYPHS=yes
9524else
9525 HAVE_OTF_GET_VARIATION_GLYPHS=no
0ca10bb7 9526fi
edfaf76d 9527
ae1362a3 9528 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
edfaf76d 9529
ae1362a3 9530$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
bf89cb4d 9531
ae1362a3
AS
9532 fi
9533 fi
9534 fi
9535 fi
bf89cb4d 9536
ae1362a3
AS
9537 HAVE_M17N_FLT=no
9538 if test "${HAVE_LIBOTF}" = yes; then
9539 if test "${with_m17n_flt}" != "no"; then
bf89cb4d 9540
ae1362a3 9541 succeeded=no
bf89cb4d 9542
ae1362a3
AS
9543 # Extract the first word of "pkg-config", so it can be a program name with args.
9544set dummy pkg-config; ac_word=$2
9545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9546$as_echo_n "checking for $ac_word... " >&6; }
9547if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9548 $as_echo_n "(cached) " >&6
9549else
9550 case $PKG_CONFIG in
9551 [\\/]* | ?:[\\/]*)
9552 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9553 ;;
9554 *)
9555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9556for as_dir in $PATH
9557do
9558 IFS=$as_save_IFS
9559 test -z "$as_dir" && as_dir=.
9560 for ac_exec_ext in '' $ac_executable_extensions; do
9561 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9562 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9564 break 2
9565 fi
9566done
9567 done
9568IFS=$as_save_IFS
bf89cb4d 9569
ae1362a3
AS
9570 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9571 ;;
9572esac
9573fi
9574PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9575if test -n "$PKG_CONFIG"; then
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9577$as_echo "$PKG_CONFIG" >&6; }
9578else
9579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9580$as_echo "no" >&6; }
9581fi
bf89cb4d
GM
9582
9583
9584
ae1362a3
AS
9585 if test "$PKG_CONFIG" = "no" ; then
9586 HAVE_M17N_FLT=no
9587 else
9588 PKG_CONFIG_MIN_VERSION=0.9.0
9589 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
9591$as_echo_n "checking for m17n-flt... " >&6; }
bf89cb4d 9592
ae1362a3
AS
9593 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
9594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9595$as_echo "yes" >&6; }
9596 succeeded=yes
bf89cb4d 9597
ae1362a3
AS
9598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
9599$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
9600 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
9601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
9602$as_echo "$M17N_FLT_CFLAGS" >&6; }
0ca10bb7 9603
ae1362a3
AS
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
9605$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
9606 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
9607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
9608$as_echo "$M17N_FLT_LIBS" >&6; }
9609 else
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611$as_echo "no" >&6; }
9612 M17N_FLT_CFLAGS=""
9613 M17N_FLT_LIBS=""
9614 ## If we have a custom action on failure, don't print errors, but
9615 ## do set a variable so people can do so.
9616 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
0ca10bb7 9617
ae1362a3 9618 fi
0ca10bb7 9619
edfaf76d 9620
bf89cb4d 9621
ae1362a3
AS
9622 else
9623 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9624 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9625 fi
9626 fi
bf89cb4d 9627
ae1362a3
AS
9628 if test $succeeded = yes; then
9629 HAVE_M17N_FLT=yes
9630 else
9631 HAVE_M17N_FLT=no
9632 fi
0ca10bb7 9633
ae1362a3 9634 if test "$HAVE_M17N_FLT" = "yes"; then
0ca10bb7 9635
ae1362a3 9636$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
0ca10bb7 9637
ae1362a3
AS
9638 fi
9639 fi
9640 fi
bf89cb4d 9641else
ae1362a3
AS
9642 HAVE_XFT=no
9643 HAVE_FREETYPE=no
9644 HAVE_LIBOTF=no
9645 HAVE_M17N_FLT=no
bf89cb4d 9646fi
ae1362a3 9647### End of font-backend (under X11) section.
19650fd6 9648
0ca10bb7 9649
0ca10bb7 9650
ca81d7a0 9651
4c343001 9652
c0d27fcc 9653
4c343001 9654
bf89cb4d 9655
ae1362a3
AS
9656
9657
9658### Use -lXpm if available, unless `--with-xpm=no'.
9659HAVE_XPM=no
9660if test "${HAVE_X11}" = "yes"; then
9661 if test "${with_xpm}" != "no"; then
9662 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
9663if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
9665$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
9666if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
e9a63f04 9667 $as_echo_n "(cached) " >&6
4c343001 9668else
ae1362a3
AS
9669 ac_check_lib_save_LIBS=$LIBS
9670LIBS="-lXpm -lX11 $LIBS"
9671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 9672/* end confdefs.h. */
503d2be0 9673
ca81d7a0
JD
9674/* Override any GCC internal prototype to avoid an error.
9675 Use char because int might match the return type of a GCC
9676 builtin and then its argument prototype would still apply. */
503d2be0
AS
9677#ifdef __cplusplus
9678extern "C"
9679#endif
ae1362a3 9680char XpmReadFileToPixmap ();
503d2be0
AS
9681int
9682main ()
9683{
ae1362a3 9684return XpmReadFileToPixmap ();
503d2be0
AS
9685 ;
9686 return 0;
9687}
9688_ACEOF
ae1362a3
AS
9689if ac_fn_c_try_link "$LINENO"; then :
9690 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0 9691else
ae1362a3
AS
9692 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
9693fi
9694rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext
9696LIBS=$ac_check_lib_save_LIBS
9697fi
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
9699$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
9700if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
9701 HAVE_XPM=yes
ba4481b5
DL
9702fi
9703
bf89cb4d 9704fi
c0d27fcc 9705
ae1362a3
AS
9706
9707 if test "${HAVE_XPM}" = "yes"; then
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
9709$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
9710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9711/* end confdefs.h. */
9712#include "X11/xpm.h"
9713#ifndef XpmReturnAllocPixels
9714no_return_alloc_pixels
9715#endif
9716
9717_ACEOF
9718if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9719 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
9720 HAVE_XPM=no
bf89cb4d 9721else
ae1362a3 9722 HAVE_XPM=yes
bf89cb4d 9723fi
ae1362a3 9724rm -f conftest*
0ca10bb7 9725
ae1362a3
AS
9726
9727 if test "${HAVE_XPM}" = "yes"; then
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9729$as_echo "yes" >&6; }
9730 else
9731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9732$as_echo "no" >&6; }
9733 fi
9734 fi
0ca10bb7 9735 fi
bc3512d0 9736
ae1362a3
AS
9737 if test "${HAVE_XPM}" = "yes"; then
9738
9739$as_echo "#define HAVE_XPM 1" >>confdefs.h
9740
9741 fi
9742fi
9743
9744### Use -ljpeg if available, unless `--with-jpeg=no'.
9745HAVE_JPEG=no
9746if test "${HAVE_X11}" = "yes"; then
9747 if test "${with_jpeg}" != "no"; then
9748 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
9749if test "x$ac_cv_header_jerror_h" = x""yes; then :
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
9751$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
9752if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
0ca10bb7
RC
9753 $as_echo_n "(cached) " >&6
9754else
ae1362a3
AS
9755 ac_check_lib_save_LIBS=$LIBS
9756LIBS="-ljpeg $LIBS"
9757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bc3512d0 9758/* end confdefs.h. */
0ca10bb7 9759
ae1362a3
AS
9760/* Override any GCC internal prototype to avoid an error.
9761 Use char because int might match the return type of a GCC
9762 builtin and then its argument prototype would still apply. */
9763#ifdef __cplusplus
9764extern "C"
9765#endif
9766char jpeg_destroy_compress ();
bc3512d0
CY
9767int
9768main ()
9769{
ae1362a3 9770return jpeg_destroy_compress ();
bc3512d0
CY
9771 ;
9772 return 0;
9773}
9774_ACEOF
ae1362a3
AS
9775if ac_fn_c_try_link "$LINENO"; then :
9776 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
0ca10bb7 9777else
ae1362a3 9778 ac_cv_lib_jpeg_jpeg_destroy_compress=no
bf89cb4d 9779fi
ae1362a3
AS
9780rm -f core conftest.err conftest.$ac_objext \
9781 conftest$ac_exeext conftest.$ac_ext
9782LIBS=$ac_check_lib_save_LIBS
bf89cb4d 9783fi
ae1362a3
AS
9784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
9785$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
9786if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
9787 HAVE_JPEG=yes
9788fi
9789
0ca10bb7 9790fi
bc3512d0 9791
ae1362a3 9792
0ca10bb7
RC
9793 fi
9794
ae1362a3
AS
9795 if test "${HAVE_JPEG}" = "yes"; then
9796 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
9797
9798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9799/* end confdefs.h. */
9800#include <jpeglib.h>
9801 version=JPEG_LIB_VERSION
9802
9803_ACEOF
9804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9805 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
9806 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
9807
84e70f78 9808else
ae1362a3
AS
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
9810$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
9811 HAVE_JPEG=no
9812fi
9813rm -f conftest*
9814
9815 fi
9816fi
9817
9818### Use -lpng if available, unless `--with-png=no'.
9819HAVE_PNG=no
9820if test "${HAVE_X11}" = "yes"; then
9821 if test "${with_png}" != "no"; then
9822 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
9823 # in /usr/include/libpng.
9824 for ac_header in png.h libpng/png.h
9825do :
9826 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9827ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9828if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9829 cat >>confdefs.h <<_ACEOF
9830#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9831_ACEOF
9832
9833fi
9834
9835done
9836
9837 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
9838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
9839$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
9840if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
bf89cb4d
GM
9841 $as_echo_n "(cached) " >&6
9842else
ae1362a3
AS
9843 ac_check_lib_save_LIBS=$LIBS
9844LIBS="-lpng -lz -lm $LIBS"
9845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 9846/* end confdefs.h. */
edfaf76d 9847
ae1362a3
AS
9848/* Override any GCC internal prototype to avoid an error.
9849 Use char because int might match the return type of a GCC
9850 builtin and then its argument prototype would still apply. */
9851#ifdef __cplusplus
9852extern "C"
9853#endif
9854char png_get_channels ();
19650fd6
AS
9855int
9856main ()
9857{
ae1362a3 9858return png_get_channels ();
84e70f78
KR
9859 ;
9860 return 0;
9861}
9862_ACEOF
ae1362a3
AS
9863if ac_fn_c_try_link "$LINENO"; then :
9864 ac_cv_lib_png_png_get_channels=yes
84e70f78 9865else
ae1362a3 9866 ac_cv_lib_png_png_get_channels=no
84e70f78 9867fi
ae1362a3
AS
9868rm -f core conftest.err conftest.$ac_objext \
9869 conftest$ac_exeext conftest.$ac_ext
9870LIBS=$ac_check_lib_save_LIBS
bf89cb4d 9871fi
ae1362a3
AS
9872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
9873$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
9874if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
9875 HAVE_PNG=yes
9876fi
9877
9878 fi
9879 fi
9880
9881 if test "${HAVE_PNG}" = "yes"; then
9882
9883$as_echo "#define HAVE_PNG 1" >>confdefs.h
9884
9885 fi
84e70f78 9886fi
0ca10bb7 9887
ae1362a3
AS
9888### Use -ltiff if available, unless `--with-tiff=no'.
9889HAVE_TIFF=no
9890if test "${HAVE_X11}" = "yes"; then
9891 if test "${with_tiff}" != "no"; then
9892 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
9893if test "x$ac_cv_header_tiffio_h" = x""yes; then :
9894 tifflibs="-lz -lm"
9895 # At least one tiff package requires the jpeg library.
9896 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
9897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
9898$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
9899if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
9900 $as_echo_n "(cached) " >&6
84e70f78 9901else
ae1362a3
AS
9902 ac_check_lib_save_LIBS=$LIBS
9903LIBS="-ltiff $tifflibs $LIBS"
9904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 9905/* end confdefs.h. */
ae1362a3
AS
9906
9907/* Override any GCC internal prototype to avoid an error.
9908 Use char because int might match the return type of a GCC
9909 builtin and then its argument prototype would still apply. */
9910#ifdef __cplusplus
9911extern "C"
9912#endif
9913char TIFFGetVersion ();
19650fd6
AS
9914int
9915main ()
9916{
ae1362a3 9917return TIFFGetVersion ();
84e70f78
KR
9918 ;
9919 return 0;
9920}
9921_ACEOF
ae1362a3
AS
9922if ac_fn_c_try_link "$LINENO"; then :
9923 ac_cv_lib_tiff_TIFFGetVersion=yes
84e70f78 9924else
ae1362a3 9925 ac_cv_lib_tiff_TIFFGetVersion=no
84e70f78 9926fi
ae1362a3
AS
9927rm -f core conftest.err conftest.$ac_objext \
9928 conftest$ac_exeext conftest.$ac_ext
9929LIBS=$ac_check_lib_save_LIBS
84e70f78 9930fi
ae1362a3
AS
9931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
9932$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
9933if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
9934 HAVE_TIFF=yes
0ca10bb7 9935fi
0ca10bb7 9936
ae1362a3 9937fi
0ca10bb7 9938
0ca10bb7 9939
ae1362a3 9940 fi
0ca10bb7 9941
ae1362a3 9942 if test "${HAVE_TIFF}" = "yes"; then
0ca10bb7 9943
ae1362a3 9944$as_echo "#define HAVE_TIFF 1" >>confdefs.h
0ca10bb7 9945
ae1362a3 9946 fi
bf89cb4d 9947fi
0ca10bb7 9948
ae1362a3
AS
9949### Use -lgif or -lungif if available, unless `--with-gif=no'.
9950HAVE_GIF=no
9951if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
9952 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
9953if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
9954 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
9955# Earlier versions can crash Emacs.
9956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
9957$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
9958if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
e9a63f04 9959 $as_echo_n "(cached) " >&6
84e70f78 9960else
ae1362a3
AS
9961 ac_check_lib_save_LIBS=$LIBS
9962LIBS="-lgif $LIBS"
9963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 9964/* end confdefs.h. */
ae1362a3
AS
9965
9966/* Override any GCC internal prototype to avoid an error.
9967 Use char because int might match the return type of a GCC
9968 builtin and then its argument prototype would still apply. */
9969#ifdef __cplusplus
9970extern "C"
9971#endif
9972char EGifPutExtensionLast ();
84e70f78
KR
9973int
9974main ()
9975{
ae1362a3 9976return EGifPutExtensionLast ();
84e70f78
KR
9977 ;
9978 return 0;
9979}
9980_ACEOF
ae1362a3
AS
9981if ac_fn_c_try_link "$LINENO"; then :
9982 ac_cv_lib_gif_EGifPutExtensionLast=yes
84e70f78 9983else
ae1362a3 9984 ac_cv_lib_gif_EGifPutExtensionLast=no
84e70f78 9985fi
ae1362a3
AS
9986rm -f core conftest.err conftest.$ac_objext \
9987 conftest$ac_exeext conftest.$ac_ext
9988LIBS=$ac_check_lib_save_LIBS
9989fi
9990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
9991$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
9992if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
9993 HAVE_GIF=yes
9994else
9995 try_libungif=yes
bf89cb4d 9996fi
0ca10bb7 9997
84e70f78 9998fi
0ca10bb7 9999
bf89cb4d
GM
10000
10001
ae1362a3
AS
10002 if test "$HAVE_GIF" = yes; then
10003 ac_gif_lib_name="-lgif"
10004 fi
10005
10006# If gif_lib.h but no libgif, try libungif.
10007 if test x"$try_libungif" = xyes; then
10008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10009$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10010if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
e9a63f04 10011 $as_echo_n "(cached) " >&6
84e70f78 10012else
ae1362a3
AS
10013 ac_check_lib_save_LIBS=$LIBS
10014LIBS="-lungif $LIBS"
10015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 10016/* end confdefs.h. */
bf89cb4d
GM
10017
10018/* Override any GCC internal prototype to avoid an error.
10019 Use char because int might match the return type of a GCC
10020 builtin and then its argument prototype would still apply. */
10021#ifdef __cplusplus
10022extern "C"
10023#endif
ae1362a3 10024char EGifPutExtensionLast ();
0ca10bb7
RC
10025int
10026main ()
10027{
ae1362a3 10028return EGifPutExtensionLast ();
0ca10bb7
RC
10029 ;
10030 return 0;
10031}
19650fd6 10032_ACEOF
ae1362a3
AS
10033if ac_fn_c_try_link "$LINENO"; then :
10034 ac_cv_lib_ungif_EGifPutExtensionLast=yes
0ca10bb7 10035else
ae1362a3
AS
10036 ac_cv_lib_ungif_EGifPutExtensionLast=no
10037fi
10038rm -f core conftest.err conftest.$ac_objext \
10039 conftest$ac_exeext conftest.$ac_ext
10040LIBS=$ac_check_lib_save_LIBS
10041fi
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10043$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10044if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10045 HAVE_GIF=yes
10046fi
10047
0ca10bb7 10048
ae1362a3
AS
10049 if test "$HAVE_GIF" = yes; then
10050
10051$as_echo "#define LIBGIF -lungif" >>confdefs.h
10052
10053 ac_gif_lib_name="-lungif"
10054 fi
10055 fi
10056
10057 if test "${HAVE_GIF}" = "yes"; then
10058
10059$as_echo "#define HAVE_GIF 1" >>confdefs.h
10060
10061 fi
bf89cb4d 10062fi
0ca10bb7 10063
ae1362a3
AS
10064if test "${HAVE_X11}" = "yes"; then
10065 MISSING=""
10066 WITH_NO=""
10067 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
10068 MISSING="libXpm" && WITH_NO="--with-xpm=no"
10069 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
10070 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
10071 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
10072 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
10073 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
10074 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
10075 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
10076 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
10077
10078 if test "X${MISSING}" != X; then
10079 as_fn_error $? "The following required libraries were not found:
10080 $MISSING
10081Maybe some development libraries/packages are missing?
10082If you don't want to link with them give
10083 $WITH_NO
10084as options to configure" "$LINENO" 5
10085 fi
0ca10bb7
RC
10086fi
10087
ae1362a3
AS
10088### Use -lgpm if available, unless `--with-gpm=no'.
10089HAVE_GPM=no
10090if test "${with_gpm}" != "no"; then
10091 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
10092if test "x$ac_cv_header_gpm_h" = x""yes; then :
10093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
10094$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
10095if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
0ca10bb7
RC
10096 $as_echo_n "(cached) " >&6
10097else
bf89cb4d 10098 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
10099LIBS="-lgpm $LIBS"
10100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10101/* end confdefs.h. */
bf89cb4d
GM
10102
10103/* Override any GCC internal prototype to avoid an error.
10104 Use char because int might match the return type of a GCC
10105 builtin and then its argument prototype would still apply. */
10106#ifdef __cplusplus
10107extern "C"
10108#endif
ae1362a3 10109char Gpm_Open ();
84e70f78
KR
10110int
10111main ()
10112{
ae1362a3 10113return Gpm_Open ();
84e70f78
KR
10114 ;
10115 return 0;
10116}
10117_ACEOF
ae1362a3
AS
10118if ac_fn_c_try_link "$LINENO"; then :
10119 ac_cv_lib_gpm_Gpm_Open=yes
84e70f78 10120else
ae1362a3
AS
10121 ac_cv_lib_gpm_Gpm_Open=no
10122fi
10123rm -f core conftest.err conftest.$ac_objext \
10124 conftest$ac_exeext conftest.$ac_ext
10125LIBS=$ac_check_lib_save_LIBS
10126fi
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10128$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
10129if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
10130 HAVE_GPM=yes
10131fi
10132
10133fi
10134
10135
10136fi
10137
10138if test "${HAVE_GPM}" = "yes"; then
10139
10140$as_echo "#define HAVE_GPM 1" >>confdefs.h
10141
10142fi
10143
10144ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
10145if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
10146
10147$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
10148
10149fi
10150
10151
10152
10153### Use NeXTstep API to implement GUI.
10154if test "${HAVE_NS}" = "yes"; then
10155
10156$as_echo "#define HAVE_NS 1" >>confdefs.h
10157
10158 if test "${NS_IMPL_COCOA}" = "yes"; then
10159
10160$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
10161
10162 GNU_OBJC_CFLAGS=
10163 fi
10164 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
bf89cb4d 10165
ae1362a3 10166$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
bf89cb4d 10167
ae1362a3
AS
10168 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
10169 fi
10170 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
84e70f78 10171
ae1362a3 10172$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
84e70f78 10173
ae1362a3
AS
10174 fi
10175 # We also have mouse menus.
10176 HAVE_MENUS=yes
10177 OTHER_FILES=ns-app
84e70f78
KR
10178fi
10179
bf89cb4d 10180
ae1362a3
AS
10181### Use session management (-lSM -lICE) if available
10182HAVE_X_SM=no
10183if test "${HAVE_X11}" = "yes"; then
10184 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10185if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
10187$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
10188if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
e9a63f04 10189 $as_echo_n "(cached) " >&6
84e70f78 10190else
ae1362a3
AS
10191 ac_check_lib_save_LIBS=$LIBS
10192LIBS="-lSM -lICE $LIBS"
10193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10194/* end confdefs.h. */
bf89cb4d
GM
10195
10196/* Override any GCC internal prototype to avoid an error.
10197 Use char because int might match the return type of a GCC
10198 builtin and then its argument prototype would still apply. */
10199#ifdef __cplusplus
10200extern "C"
10201#endif
ae1362a3 10202char SmcOpenConnection ();
19650fd6
AS
10203int
10204main ()
10205{
ae1362a3 10206return SmcOpenConnection ();
84e70f78
KR
10207 ;
10208 return 0;
10209}
10210_ACEOF
ae1362a3
AS
10211if ac_fn_c_try_link "$LINENO"; then :
10212 ac_cv_lib_SM_SmcOpenConnection=yes
84e70f78 10213else
ae1362a3 10214 ac_cv_lib_SM_SmcOpenConnection=no
bf89cb4d 10215fi
ae1362a3
AS
10216rm -f core conftest.err conftest.$ac_objext \
10217 conftest$ac_exeext conftest.$ac_ext
10218LIBS=$ac_check_lib_save_LIBS
bf89cb4d 10219fi
ae1362a3
AS
10220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
10221$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
10222if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
10223 HAVE_X_SM=yes
bf89cb4d 10224fi
0ca10bb7 10225
ae1362a3 10226fi
0ca10bb7 10227
bf89cb4d 10228
bf89cb4d 10229
ae1362a3 10230 if test "${HAVE_X_SM}" = "yes"; then
bf89cb4d 10231
ae1362a3 10232$as_echo "#define HAVE_X_SM 1" >>confdefs.h
bf89cb4d 10233
ae1362a3
AS
10234 case "$LIBS" in
10235 *-lSM*) ;;
10236 *) LIBS="-lSM -lICE $LIBS" ;;
10237 esac
10238 fi
10239fi
0ca10bb7 10240
ae1362a3
AS
10241# If netdb.h doesn't declare h_errno, we must declare it by hand.
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
10243$as_echo_n "checking whether netdb declares h_errno... " >&6; }
10244if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
10245 $as_echo_n "(cached) " >&6
10246else
10247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10248/* end confdefs.h. */
10249#include <netdb.h>
bf89cb4d
GM
10250int
10251main ()
10252{
ae1362a3 10253return h_errno;
bf89cb4d
GM
10254 ;
10255 return 0;
10256}
84e70f78 10257_ACEOF
ae1362a3
AS
10258if ac_fn_c_try_link "$LINENO"; then :
10259 emacs_cv_netdb_declares_h_errno=yes
84e70f78 10260else
ae1362a3 10261 emacs_cv_netdb_declares_h_errno=no
84e70f78 10262fi
ae1362a3
AS
10263rm -f core conftest.err conftest.$ac_objext \
10264 conftest$ac_exeext conftest.$ac_ext
84e70f78 10265fi
ae1362a3
AS
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
10267$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
10268if test $emacs_cv_netdb_declares_h_errno = yes; then
84e70f78 10269
ae1362a3 10270$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
84e70f78 10271
ae1362a3 10272fi
bf89cb4d 10273
ae1362a3
AS
10274# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10275# for constant arguments. Useless!
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10277$as_echo_n "checking for working alloca.h... " >&6; }
10278if test "${ac_cv_working_alloca_h+set}" = set; then :
0ca10bb7
RC
10279 $as_echo_n "(cached) " >&6
10280else
ae1362a3 10281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 10282/* end confdefs.h. */
ae1362a3 10283#include <alloca.h>
0ca10bb7
RC
10284int
10285main ()
10286{
ae1362a3
AS
10287char *p = (char *) alloca (2 * sizeof (int));
10288 if (p) return 0;
bf89cb4d
GM
10289 ;
10290 return 0;
0ca10bb7
RC
10291}
10292_ACEOF
ae1362a3
AS
10293if ac_fn_c_try_link "$LINENO"; then :
10294 ac_cv_working_alloca_h=yes
0ca10bb7 10295else
ae1362a3 10296 ac_cv_working_alloca_h=no
0ca10bb7 10297fi
ae1362a3
AS
10298rm -f core conftest.err conftest.$ac_objext \
10299 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 10300fi
ae1362a3
AS
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10302$as_echo "$ac_cv_working_alloca_h" >&6; }
10303if test $ac_cv_working_alloca_h = yes; then
bc3512d0 10304
ae1362a3 10305$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
0ca10bb7 10306
bc3512d0
CY
10307fi
10308
ae1362a3
AS
10309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10310$as_echo_n "checking for alloca... " >&6; }
10311if test "${ac_cv_func_alloca_works+set}" = set; then :
10312 $as_echo_n "(cached) " >&6
10313else
10314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10315/* end confdefs.h. */
ae1362a3
AS
10316#ifdef __GNUC__
10317# define alloca __builtin_alloca
10318#else
10319# ifdef _MSC_VER
10320# include <malloc.h>
10321# define alloca _alloca
10322# else
10323# ifdef HAVE_ALLOCA_H
10324# include <alloca.h>
10325# else
10326# ifdef _AIX
10327 #pragma alloca
10328# else
10329# ifndef alloca /* predefined by HP cc +Olibcalls */
10330char *alloca ();
10331# endif
10332# endif
10333# endif
10334# endif
10335#endif
10336
503d2be0
AS
10337int
10338main ()
10339{
ae1362a3
AS
10340char *p = (char *) alloca (1);
10341 if (p) return 0;
503d2be0
AS
10342 ;
10343 return 0;
10344}
10345_ACEOF
ae1362a3
AS
10346if ac_fn_c_try_link "$LINENO"; then :
10347 ac_cv_func_alloca_works=yes
10348else
10349 ac_cv_func_alloca_works=no
10350fi
10351rm -f core conftest.err conftest.$ac_objext \
10352 conftest$ac_exeext conftest.$ac_ext
10353fi
10354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10355$as_echo "$ac_cv_func_alloca_works" >&6; }
10356
10357if test $ac_cv_func_alloca_works = yes; then
10358
10359$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10360
10361else
10362 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10363# that cause trouble. Some versions do not even contain alloca or
10364# contain a buggy version. If you still want to use their alloca,
10365# use ar to extract alloca.o from them instead of compiling alloca.c.
10366
10367ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10368
10369$as_echo "#define C_ALLOCA 1" >>confdefs.h
10370
10371
10372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10373$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10374if test "${ac_cv_os_cray+set}" = set; then :
10375 $as_echo_n "(cached) " >&6
10376else
10377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10378/* end confdefs.h. */
10379#if defined CRAY && ! defined CRAY2
10380webecray
10381#else
10382wenotbecray
10383#endif
10384
10385_ACEOF
10386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10387 $EGREP "webecray" >/dev/null 2>&1; then :
10388 ac_cv_os_cray=yes
503d2be0 10389else
ae1362a3
AS
10390 ac_cv_os_cray=no
10391fi
10392rm -f conftest*
a21616bd 10393
a21616bd 10394fi
ae1362a3
AS
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10396$as_echo "$ac_cv_os_cray" >&6; }
10397if test $ac_cv_os_cray = yes; then
10398 for ac_func in _getb67 GETB67 getb67; do
10399 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10400ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10401if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a21616bd 10402
ae1362a3
AS
10403cat >>confdefs.h <<_ACEOF
10404#define CRAY_STACKSEG_END $ac_func
bf89cb4d 10405_ACEOF
ae1362a3
AS
10406
10407 break
10408fi
10409
10410 done
10411fi
10412
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10414$as_echo_n "checking stack direction for C alloca... " >&6; }
10415if test "${ac_cv_c_stack_direction+set}" = set; then :
10416 $as_echo_n "(cached) " >&6
10417else
10418 if test "$cross_compiling" = yes; then :
10419 ac_cv_c_stack_direction=0
10420else
10421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10422/* end confdefs.h. */
ae1362a3
AS
10423$ac_includes_default
10424int
10425find_stack_direction ()
10426{
10427 static char *addr = 0;
10428 auto char dummy;
10429 if (addr == 0)
10430 {
10431 addr = &dummy;
10432 return find_stack_direction ();
10433 }
10434 else
10435 return (&dummy > addr) ? 1 : -1;
10436}
10437
503d2be0
AS
10438int
10439main ()
10440{
ae1362a3 10441 return find_stack_direction () < 0;
503d2be0
AS
10442}
10443_ACEOF
ae1362a3
AS
10444if ac_fn_c_try_run "$LINENO"; then :
10445 ac_cv_c_stack_direction=1
503d2be0 10446else
ae1362a3
AS
10447 ac_cv_c_stack_direction=-1
10448fi
10449rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10450 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 10451fi
bf89cb4d 10452
503d2be0 10453fi
ae1362a3
AS
10454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10455$as_echo "$ac_cv_c_stack_direction" >&6; }
10456cat >>confdefs.h <<_ACEOF
10457#define STACK_DIRECTION $ac_cv_c_stack_direction
10458_ACEOF
a21616bd 10459
bf89cb4d 10460
ae1362a3
AS
10461fi
10462
a21616bd 10463
ae1362a3
AS
10464if test x"$ac_cv_func_alloca_works" != xyes; then
10465 as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5
a21616bd
KR
10466fi
10467
ae1362a3
AS
10468# fmod, logb, and frexp are found in -lm on most systems.
10469# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
10471$as_echo_n "checking for sqrt in -lm... " >&6; }
10472if test "${ac_cv_lib_m_sqrt+set}" = set; then :
e9a63f04 10473 $as_echo_n "(cached) " >&6
a21616bd 10474else
ae1362a3
AS
10475 ac_check_lib_save_LIBS=$LIBS
10476LIBS="-lm $LIBS"
10477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10478/* end confdefs.h. */
503d2be0 10479
ca81d7a0
JD
10480/* Override any GCC internal prototype to avoid an error.
10481 Use char because int might match the return type of a GCC
10482 builtin and then its argument prototype would still apply. */
503d2be0
AS
10483#ifdef __cplusplus
10484extern "C"
10485#endif
ae1362a3 10486char sqrt ();
503d2be0
AS
10487int
10488main ()
10489{
ae1362a3 10490return sqrt ();
503d2be0
AS
10491 ;
10492 return 0;
10493}
10494_ACEOF
ae1362a3
AS
10495if ac_fn_c_try_link "$LINENO"; then :
10496 ac_cv_lib_m_sqrt=yes
503d2be0 10497else
ae1362a3 10498 ac_cv_lib_m_sqrt=no
503d2be0 10499fi
ae1362a3
AS
10500rm -f core conftest.err conftest.$ac_objext \
10501 conftest$ac_exeext conftest.$ac_ext
10502LIBS=$ac_check_lib_save_LIBS
503d2be0 10503fi
ae1362a3
AS
10504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
10505$as_echo "$ac_cv_lib_m_sqrt" >&6; }
10506if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
10507 cat >>confdefs.h <<_ACEOF
10508#define HAVE_LIBM 1
c0d27fcc 10509_ACEOF
a21616bd 10510
ae1362a3
AS
10511 LIBS="-lm $LIBS"
10512
10513fi
a21616bd 10514
a21616bd 10515
ae1362a3
AS
10516# Check for mail-locking functions in a "mail" library. Probably this should
10517# have the same check as for liblockfile below.
10518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
10519$as_echo_n "checking for maillock in -lmail... " >&6; }
10520if test "${ac_cv_lib_mail_maillock+set}" = set; then :
10521 $as_echo_n "(cached) " >&6
10522else
10523 ac_check_lib_save_LIBS=$LIBS
10524LIBS="-lmail $LIBS"
10525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10526/* end confdefs.h. */
c0d27fcc 10527
bf89cb4d
GM
10528/* Override any GCC internal prototype to avoid an error.
10529 Use char because int might match the return type of a GCC
10530 builtin and then its argument prototype would still apply. */
10531#ifdef __cplusplus
10532extern "C"
10533#endif
ae1362a3 10534char maillock ();
bf89cb4d
GM
10535int
10536main ()
10537{
ae1362a3 10538return maillock ();
bf89cb4d
GM
10539 ;
10540 return 0;
10541}
0ca10bb7 10542_ACEOF
ae1362a3
AS
10543if ac_fn_c_try_link "$LINENO"; then :
10544 ac_cv_lib_mail_maillock=yes
bf89cb4d 10545else
ae1362a3
AS
10546 ac_cv_lib_mail_maillock=no
10547fi
10548rm -f core conftest.err conftest.$ac_objext \
10549 conftest$ac_exeext conftest.$ac_ext
10550LIBS=$ac_check_lib_save_LIBS
0ca10bb7 10551fi
ae1362a3
AS
10552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
10553$as_echo "$ac_cv_lib_mail_maillock" >&6; }
10554if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
10555 cat >>confdefs.h <<_ACEOF
10556#define HAVE_LIBMAIL 1
10557_ACEOF
10558
10559 LIBS="-lmail $LIBS"
0ca10bb7 10560
bf89cb4d 10561fi
ae1362a3
AS
10562
10563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
10564$as_echo_n "checking for maillock in -llockfile... " >&6; }
10565if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
bf89cb4d
GM
10566 $as_echo_n "(cached) " >&6
10567else
10568 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
10569LIBS="-llockfile $LIBS"
10570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 10571/* end confdefs.h. */
0ca10bb7 10572
bf89cb4d
GM
10573/* Override any GCC internal prototype to avoid an error.
10574 Use char because int might match the return type of a GCC
10575 builtin and then its argument prototype would still apply. */
10576#ifdef __cplusplus
10577extern "C"
10578#endif
ae1362a3 10579char maillock ();
bf89cb4d
GM
10580int
10581main ()
10582{
ae1362a3 10583return maillock ();
bf89cb4d
GM
10584 ;
10585 return 0;
10586}
0ca10bb7 10587_ACEOF
ae1362a3
AS
10588if ac_fn_c_try_link "$LINENO"; then :
10589 ac_cv_lib_lockfile_maillock=yes
bf89cb4d 10590else
ae1362a3
AS
10591 ac_cv_lib_lockfile_maillock=no
10592fi
10593rm -f core conftest.err conftest.$ac_objext \
10594 conftest$ac_exeext conftest.$ac_ext
10595LIBS=$ac_check_lib_save_LIBS
10596fi
10597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
10598$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
10599if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
10600 cat >>confdefs.h <<_ACEOF
10601#define HAVE_LIBLOCKFILE 1
10602_ACEOF
10603
10604 LIBS="-llockfile $LIBS"
10605
10606fi
10607
10608# If we have the shared liblockfile, assume we must use it for mail
10609# locking (e.g. Debian). If we couldn't link against liblockfile
10610# (no liblockfile.a installed), ensure that we don't need to.
10611if test "$ac_cv_lib_lockfile_maillock" = no; then
10612 # Extract the first word of "liblockfile.so", so it can be a program name with args.
10613set dummy liblockfile.so; ac_word=$2
10614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10615$as_echo_n "checking for $ac_word... " >&6; }
10616if test "${ac_cv_prog_liblockfile+set}" = set; then :
10617 $as_echo_n "(cached) " >&6
10618else
10619 if test -n "$liblockfile"; then
10620 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
10621else
10622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10623as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
10624for as_dir in $as_dummy
10625do
10626 IFS=$as_save_IFS
10627 test -z "$as_dir" && as_dir=.
10628 for ac_exec_ext in '' $ac_executable_extensions; do
10629 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10630 ac_cv_prog_liblockfile="yes"
10631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10632 break 2
10633 fi
10634done
10635 done
10636IFS=$as_save_IFS
0ca10bb7 10637
ae1362a3 10638 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
0ca10bb7 10639fi
bf89cb4d 10640fi
ae1362a3
AS
10641liblockfile=$ac_cv_prog_liblockfile
10642if test -n "$liblockfile"; then
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
10644$as_echo "$liblockfile" >&6; }
bf89cb4d 10645else
ae1362a3
AS
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10647$as_echo "no" >&6; }
10648fi
0ca10bb7 10649
0ca10bb7 10650
ae1362a3
AS
10651 if test $ac_cv_prog_liblockfile = yes; then
10652 as_fn_error $? "Shared liblockfile found but can't link against it.
10653This probably means that movemail could lose mail.
10654There may be a \`development' package to install containing liblockfile." "$LINENO" 5
10655 else :
10656 fi
0ca10bb7 10657fi
ae1362a3
AS
10658for ac_func in touchlock
10659do :
10660 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
10661if test "x$ac_cv_func_touchlock" = x""yes; then :
10662 cat >>confdefs.h <<_ACEOF
10663#define HAVE_TOUCHLOCK 1
10664_ACEOF
0ca10bb7 10665
bf89cb4d 10666fi
ae1362a3
AS
10667done
10668
10669for ac_header in maillock.h
10670do :
10671 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
10672if test "x$ac_cv_header_maillock_h" = x""yes; then :
10673 cat >>confdefs.h <<_ACEOF
10674#define HAVE_MAILLOCK_H 1
10675_ACEOF
10676
bf89cb4d 10677fi
0ca10bb7 10678
ae1362a3
AS
10679done
10680
10681
10682for ac_func in gethostname getdomainname dup2 \
10683rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
10684random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
10685strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
10686utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
10687__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
10688sendto recvfrom getsockopt setsockopt getsockname getpeername \
10689gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
10690memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
10691cfmakeraw cfsetspeed
10692do :
10693 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10694ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10695if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10696 cat >>confdefs.h <<_ACEOF
10697#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10698_ACEOF
10699
bf89cb4d 10700fi
ae1362a3
AS
10701done
10702
10703
10704for ac_header in sys/un.h
10705do :
10706 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
10707if test "x$ac_cv_header_sys_un_h" = x""yes; then :
10708 cat >>confdefs.h <<_ACEOF
10709#define HAVE_SYS_UN_H 1
10710_ACEOF
0ca10bb7 10711
bf89cb4d 10712fi
0ca10bb7 10713
ae1362a3
AS
10714done
10715
10716
10717
10718
10719
10720
10721
10722 for ac_func in $ac_func_list
10723do :
10724 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10725ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10726if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10727 cat >>confdefs.h <<_ACEOF
10728#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10729_ACEOF
10730
bf89cb4d 10731fi
ae1362a3 10732done
0ca10bb7 10733
ae1362a3
AS
10734
10735
10736
10737
10738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
10739$as_echo_n "checking for working mktime... " >&6; }
10740if test "${ac_cv_func_working_mktime+set}" = set; then :
e9a63f04 10741 $as_echo_n "(cached) " >&6
a21616bd 10742else
ae1362a3
AS
10743 if test "$cross_compiling" = yes; then :
10744 ac_cv_func_working_mktime=no
10745else
10746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10747/* end confdefs.h. */
ae1362a3
AS
10748/* Test program from Paul Eggert and Tony Leneis. */
10749#ifdef TIME_WITH_SYS_TIME
10750# include <sys/time.h>
10751# include <time.h>
0ca10bb7 10752#else
ae1362a3
AS
10753# ifdef HAVE_SYS_TIME_H
10754# include <sys/time.h>
10755# else
10756# include <time.h>
10757# endif
0ca10bb7
RC
10758#endif
10759
ae1362a3
AS
10760#include <limits.h>
10761#include <stdlib.h>
0ca10bb7 10762
ae1362a3
AS
10763#ifdef HAVE_UNISTD_H
10764# include <unistd.h>
0ca10bb7 10765#endif
ae1362a3
AS
10766
10767#ifndef HAVE_ALARM
10768# define alarm(X) /* empty */
0ca10bb7
RC
10769#endif
10770
ae1362a3
AS
10771/* Work around redefinition to rpl_putenv by other config tests. */
10772#undef putenv
10773
10774static time_t time_t_max;
10775static time_t time_t_min;
10776
10777/* Values we'll use to set the TZ environment variable. */
10778static const char *tz_strings[] = {
10779 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
10780 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
10781};
10782#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
10783
10784/* Return 0 if mktime fails to convert a date in the spring-forward gap.
10785 Based on a problem report from Andreas Jaeger. */
10786static int
10787spring_forward_gap ()
0ca10bb7 10788{
ae1362a3
AS
10789 /* glibc (up to about 1998-10-07) failed this test. */
10790 struct tm tm;
0ca10bb7 10791
ae1362a3
AS
10792 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10793 instead of "TZ=America/Vancouver" in order to detect the bug even
10794 on systems that don't support the Olson extension, or don't have the
10795 full zoneinfo tables installed. */
10796 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
0ca10bb7 10797
ae1362a3
AS
10798 tm.tm_year = 98;
10799 tm.tm_mon = 3;
10800 tm.tm_mday = 5;
10801 tm.tm_hour = 2;
10802 tm.tm_min = 0;
10803 tm.tm_sec = 0;
10804 tm.tm_isdst = -1;
10805 return mktime (&tm) != (time_t) -1;
10806}
a21616bd 10807
ae1362a3
AS
10808static int
10809mktime_test1 (time_t now)
503d2be0 10810{
ae1362a3
AS
10811 struct tm *lt;
10812 return ! (lt = localtime (&now)) || mktime (lt) == now;
10813}
10814
10815static int
10816mktime_test (time_t now)
10817{
10818 return (mktime_test1 (now)
10819 && mktime_test1 ((time_t) (time_t_max - now))
10820 && mktime_test1 ((time_t) (time_t_min + now)));
10821}
10822
10823static int
10824irix_6_4_bug ()
10825{
10826 /* Based on code from Ariel Faigon. */
10827 struct tm tm;
10828 tm.tm_year = 96;
10829 tm.tm_mon = 3;
10830 tm.tm_mday = 0;
10831 tm.tm_hour = 0;
10832 tm.tm_min = 0;
10833 tm.tm_sec = 0;
10834 tm.tm_isdst = -1;
10835 mktime (&tm);
10836 return tm.tm_mon == 2 && tm.tm_mday == 31;
503d2be0 10837}
ca81d7a0 10838
ae1362a3
AS
10839static int
10840bigtime_test (int j)
10841{
10842 struct tm tm;
10843 time_t now;
10844 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
10845 now = mktime (&tm);
10846 if (now != (time_t) -1)
10847 {
10848 struct tm *lt = localtime (&now);
10849 if (! (lt
10850 && lt->tm_year == tm.tm_year
10851 && lt->tm_mon == tm.tm_mon
10852 && lt->tm_mday == tm.tm_mday
10853 && lt->tm_hour == tm.tm_hour
10854 && lt->tm_min == tm.tm_min
10855 && lt->tm_sec == tm.tm_sec
10856 && lt->tm_yday == tm.tm_yday
10857 && lt->tm_wday == tm.tm_wday
10858 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
10859 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
10860 return 0;
10861 }
10862 return 1;
10863}
a21616bd 10864
ae1362a3
AS
10865static int
10866year_2050_test ()
10867{
10868 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
10869 ignoring leap seconds. */
10870 unsigned long int answer = 2527315200UL;
a21616bd 10871
ae1362a3
AS
10872 struct tm tm;
10873 time_t t;
10874 tm.tm_year = 2050 - 1900;
10875 tm.tm_mon = 2 - 1;
10876 tm.tm_mday = 1;
10877 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
10878 tm.tm_isdst = -1;
a21616bd 10879
ae1362a3
AS
10880 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10881 instead of "TZ=America/Vancouver" in order to detect the bug even
10882 on systems that don't support the Olson extension, or don't have the
10883 full zoneinfo tables installed. */
10884 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
503d2be0 10885
ae1362a3 10886 t = mktime (&tm);
503d2be0 10887
ae1362a3
AS
10888 /* Check that the result is either a failure, or close enough
10889 to the correct answer that we can assume the discrepancy is
10890 due to leap seconds. */
10891 return (t == (time_t) -1
10892 || (0 < t && answer - 120 <= t && t <= answer + 120));
10893}
ca81d7a0 10894
ae1362a3
AS
10895int
10896main ()
10897{
10898 time_t t, delta;
10899 int i, j;
a21616bd 10900
ae1362a3
AS
10901 /* This test makes some buggy mktime implementations loop.
10902 Give up after 60 seconds; a mktime slower than that
10903 isn't worth using anyway. */
10904 alarm (60);
a21616bd 10905
ae1362a3
AS
10906 for (;;)
10907 {
10908 t = (time_t_max << 1) + 1;
10909 if (t <= time_t_max)
10910 break;
10911 time_t_max = t;
10912 }
10913 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
503d2be0 10914
ae1362a3
AS
10915 delta = time_t_max / 997; /* a suitable prime number */
10916 for (i = 0; i < N_STRINGS; i++)
10917 {
10918 if (tz_strings[i])
10919 putenv ((char*) tz_strings[i]);
503d2be0 10920
ae1362a3
AS
10921 for (t = 0; t <= time_t_max - delta; t += delta)
10922 if (! mktime_test (t))
10923 return 1;
10924 if (! (mktime_test ((time_t) 1)
10925 && mktime_test ((time_t) (60 * 60))
10926 && mktime_test ((time_t) (60 * 60 * 24))))
10927 return 1;
bf89cb4d 10928
ae1362a3
AS
10929 for (j = 1; ; j <<= 1)
10930 if (! bigtime_test (j))
10931 return 1;
10932 else if (INT_MAX / 2 < j)
10933 break;
10934 if (! bigtime_test (INT_MAX))
10935 return 1;
10936 }
10937 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
10938}
10939_ACEOF
ae1362a3
AS
10940if ac_fn_c_try_run "$LINENO"; then :
10941 ac_cv_func_working_mktime=yes
503d2be0 10942else
ae1362a3
AS
10943 ac_cv_func_working_mktime=no
10944fi
10945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10946 conftest.$ac_objext conftest.beam conftest.$ac_ext
10947fi
19650fd6 10948
503d2be0 10949fi
ae1362a3
AS
10950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
10951$as_echo "$ac_cv_func_working_mktime" >&6; }
10952if test $ac_cv_func_working_mktime = no; then
10953 case " $LIBOBJS " in
10954 *" mktime.$ac_objext "* ) ;;
10955 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
10956 ;;
10957esac
ca81d7a0 10958
503d2be0 10959fi
a21616bd 10960
ae1362a3
AS
10961if test "$ac_cv_func_working_mktime" = no; then
10962
10963$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
a21616bd
KR
10964
10965fi
10966
ae1362a3 10967ac_have_func=no # yes means we've found a way to get the load average.
19650fd6 10968
ae1362a3
AS
10969# Make sure getloadavg.c is where it belongs, at configure-time.
10970test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
10971 as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
ca81d7a0 10972
ae1362a3 10973ac_save_LIBS=$LIBS
bf89cb4d 10974
ae1362a3
AS
10975# Check for getloadavg, but be sure not to touch the cache variable.
10976(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
10977if test "x$ac_cv_func_getloadavg" = x""yes; then :
10978 exit 0
10979else
10980 exit 1
503d2be0 10981fi
ae1362a3 10982) && ac_have_func=yes
0ca10bb7 10983
ae1362a3
AS
10984# On HPUX9, an unprivileged user can get load averages through this function.
10985for ac_func in pstat_getdynamic
10986do :
10987 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
10988if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
c0d27fcc 10989 cat >>confdefs.h <<_ACEOF
ae1362a3 10990#define HAVE_PSTAT_GETDYNAMIC 1
c0d27fcc 10991_ACEOF
a21616bd 10992
0ca10bb7 10993fi
ae1362a3 10994done
a21616bd 10995
503d2be0 10996
ae1362a3
AS
10997# Solaris has libkstat which does not require root.
10998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
10999$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
11000if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
e9a63f04 11001 $as_echo_n "(cached) " >&6
a21616bd 11002else
503d2be0 11003 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11004LIBS="-lkstat $LIBS"
11005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11006/* end confdefs.h. */
503d2be0 11007
ca81d7a0
JD
11008/* Override any GCC internal prototype to avoid an error.
11009 Use char because int might match the return type of a GCC
11010 builtin and then its argument prototype would still apply. */
503d2be0
AS
11011#ifdef __cplusplus
11012extern "C"
11013#endif
ae1362a3 11014char kstat_open ();
503d2be0
AS
11015int
11016main ()
11017{
ae1362a3 11018return kstat_open ();
503d2be0
AS
11019 ;
11020 return 0;
11021}
11022_ACEOF
ae1362a3
AS
11023if ac_fn_c_try_link "$LINENO"; then :
11024 ac_cv_lib_kstat_kstat_open=yes
503d2be0 11025else
ae1362a3 11026 ac_cv_lib_kstat_kstat_open=no
503d2be0 11027fi
ae1362a3
AS
11028rm -f core conftest.err conftest.$ac_objext \
11029 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
11030LIBS=$ac_check_lib_save_LIBS
11031fi
ae1362a3
AS
11032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
11033$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
11034if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
c0d27fcc 11035 cat >>confdefs.h <<_ACEOF
ae1362a3 11036#define HAVE_LIBKSTAT 1
c0d27fcc 11037_ACEOF
a21616bd 11038
ae1362a3 11039 LIBS="-lkstat $LIBS"
a21616bd
KR
11040
11041fi
11042
ae1362a3 11043test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
503d2be0 11044
ae1362a3
AS
11045# Some systems with -lutil have (and need) -lkvm as well, some do not.
11046# On Solaris, -lkvm requires nlist from -lelf, so check that first
11047# to get the right answer into the cache.
11048# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11049if test $ac_have_func = no; then
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
11051$as_echo_n "checking for elf_begin in -lelf... " >&6; }
11052if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
e9a63f04 11053 $as_echo_n "(cached) " >&6
98418dba 11054else
0ca10bb7 11055 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11056LIBS="-lelf $LIBS"
11057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11058/* end confdefs.h. */
ca81d7a0 11059
0ca10bb7
RC
11060/* Override any GCC internal prototype to avoid an error.
11061 Use char because int might match the return type of a GCC
11062 builtin and then its argument prototype would still apply. */
11063#ifdef __cplusplus
11064extern "C"
11065#endif
ae1362a3 11066char elf_begin ();
0ca10bb7
RC
11067int
11068main ()
11069{
ae1362a3 11070return elf_begin ();
0ca10bb7
RC
11071 ;
11072 return 0;
11073}
503d2be0 11074_ACEOF
ae1362a3
AS
11075if ac_fn_c_try_link "$LINENO"; then :
11076 ac_cv_lib_elf_elf_begin=yes
503d2be0 11077else
ae1362a3 11078 ac_cv_lib_elf_elf_begin=no
a21616bd 11079fi
ae1362a3
AS
11080rm -f core conftest.err conftest.$ac_objext \
11081 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11082LIBS=$ac_check_lib_save_LIBS
11083fi
ae1362a3
AS
11084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
11085$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
11086if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
11087 LIBS="-lelf $LIBS"
c0d27fcc 11088fi
bf89cb4d 11089
ae1362a3
AS
11090fi
11091if test $ac_have_func = no; then
11092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
11093$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
11094if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
e9a63f04 11095 $as_echo_n "(cached) " >&6
21287a21 11096else
0ca10bb7 11097 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11098LIBS="-lkvm $LIBS"
11099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11100/* end confdefs.h. */
21287a21 11101
0ca10bb7
RC
11102/* Override any GCC internal prototype to avoid an error.
11103 Use char because int might match the return type of a GCC
11104 builtin and then its argument prototype would still apply. */
11105#ifdef __cplusplus
11106extern "C"
11107#endif
ae1362a3 11108char kvm_open ();
21287a21
CY
11109int
11110main ()
11111{
ae1362a3 11112return kvm_open ();
21287a21
CY
11113 ;
11114 return 0;
11115}
11116_ACEOF
ae1362a3
AS
11117if ac_fn_c_try_link "$LINENO"; then :
11118 ac_cv_lib_kvm_kvm_open=yes
21287a21 11119else
ae1362a3 11120 ac_cv_lib_kvm_kvm_open=no
0ca10bb7 11121fi
ae1362a3
AS
11122rm -f core conftest.err conftest.$ac_objext \
11123 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11124LIBS=$ac_check_lib_save_LIBS
11125fi
ae1362a3
AS
11126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
11127$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
11128if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
11129 LIBS="-lkvm $LIBS"
11130fi
bf89cb4d 11131
ae1362a3
AS
11132 # Check for the 4.4BSD definition of getloadavg.
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
11134$as_echo_n "checking for getloadavg in -lutil... " >&6; }
11135if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
0ca10bb7
RC
11136 $as_echo_n "(cached) " >&6
11137else
11138 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11139LIBS="-lutil $LIBS"
11140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11141/* end confdefs.h. */
21287a21 11142
0ca10bb7
RC
11143/* Override any GCC internal prototype to avoid an error.
11144 Use char because int might match the return type of a GCC
11145 builtin and then its argument prototype would still apply. */
11146#ifdef __cplusplus
11147extern "C"
11148#endif
ae1362a3 11149char getloadavg ();
21287a21
CY
11150int
11151main ()
11152{
ae1362a3 11153return getloadavg ();
21287a21
CY
11154 ;
11155 return 0;
11156}
11157_ACEOF
ae1362a3
AS
11158if ac_fn_c_try_link "$LINENO"; then :
11159 ac_cv_lib_util_getloadavg=yes
21287a21 11160else
ae1362a3 11161 ac_cv_lib_util_getloadavg=no
21287a21 11162fi
ae1362a3
AS
11163rm -f core conftest.err conftest.$ac_objext \
11164 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 11165LIBS=$ac_check_lib_save_LIBS
21287a21 11166fi
ae1362a3
AS
11167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
11168$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
11169if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
11170 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
21287a21 11171fi
21287a21
CY
11172
11173fi
0ca10bb7 11174
ae1362a3
AS
11175if test $ac_have_func = no; then
11176 # There is a commonly available library for RS/6000 AIX.
11177 # Since it is not a standard part of AIX, it might be installed locally.
11178 ac_getloadavg_LIBS=$LIBS
11179 LIBS="-L/usr/local/lib $LIBS"
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
11181$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
11182if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
e9a63f04 11183 $as_echo_n "(cached) " >&6
21287a21 11184else
0ca10bb7 11185 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11186LIBS="-lgetloadavg $LIBS"
11187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11188/* end confdefs.h. */
21287a21 11189
0ca10bb7
RC
11190/* Override any GCC internal prototype to avoid an error.
11191 Use char because int might match the return type of a GCC
11192 builtin and then its argument prototype would still apply. */
11193#ifdef __cplusplus
11194extern "C"
11195#endif
ae1362a3 11196char getloadavg ();
21287a21
CY
11197int
11198main ()
11199{
ae1362a3 11200return getloadavg ();
21287a21
CY
11201 ;
11202 return 0;
11203}
11204_ACEOF
ae1362a3
AS
11205if ac_fn_c_try_link "$LINENO"; then :
11206 ac_cv_lib_getloadavg_getloadavg=yes
0ca10bb7 11207else
ae1362a3 11208 ac_cv_lib_getloadavg_getloadavg=no
0ca10bb7 11209fi
ae1362a3
AS
11210rm -f core conftest.err conftest.$ac_objext \
11211 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
11212LIBS=$ac_check_lib_save_LIBS
11213fi
ae1362a3
AS
11214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
11215$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
11216if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
11217 LIBS="-lgetloadavg $LIBS"
11218else
11219 LIBS=$ac_getloadavg_LIBS
11220fi
11221
11222fi
11223
11224# Make sure it is really in the library, if we think we found it,
11225# otherwise set up the replacement function.
11226for ac_func in getloadavg
11227do :
11228 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11229if test "x$ac_cv_func_getloadavg" = x""yes; then :
0ca10bb7 11230 cat >>confdefs.h <<_ACEOF
ae1362a3 11231#define HAVE_GETLOADAVG 1
0ca10bb7
RC
11232_ACEOF
11233
bf89cb4d 11234else
ae1362a3
AS
11235 case " $LIBOBJS " in
11236 *" getloadavg.$ac_objext "* ) ;;
11237 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
11238 ;;
11239esac
0ca10bb7 11240
ae1362a3
AS
11241
11242$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
11243
11244# Figure out what our getloadavg.c needs.
11245ac_have_func=no
11246ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
11247if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
11248 ac_have_func=yes
11249
11250$as_echo "#define DGUX 1" >>confdefs.h
11251
11252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
11253$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
11254if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
0ca10bb7
RC
11255 $as_echo_n "(cached) " >&6
11256else
11257 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11258LIBS="-ldgc $LIBS"
11259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11260/* end confdefs.h. */
21287a21 11261
0ca10bb7
RC
11262/* Override any GCC internal prototype to avoid an error.
11263 Use char because int might match the return type of a GCC
11264 builtin and then its argument prototype would still apply. */
11265#ifdef __cplusplus
11266extern "C"
11267#endif
ae1362a3 11268char dg_sys_info ();
21287a21
CY
11269int
11270main ()
11271{
ae1362a3 11272return dg_sys_info ();
21287a21
CY
11273 ;
11274 return 0;
11275}
11276_ACEOF
ae1362a3
AS
11277if ac_fn_c_try_link "$LINENO"; then :
11278 ac_cv_lib_dgc_dg_sys_info=yes
bf89cb4d 11279else
ae1362a3 11280 ac_cv_lib_dgc_dg_sys_info=no
c0d27fcc 11281fi
ae1362a3
AS
11282rm -f core conftest.err conftest.$ac_objext \
11283 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 11284LIBS=$ac_check_lib_save_LIBS
0ca10bb7 11285fi
ae1362a3
AS
11286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
11287$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
11288if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
0ca10bb7 11289 cat >>confdefs.h <<_ACEOF
ae1362a3 11290#define HAVE_LIBDGC 1
503d2be0 11291_ACEOF
19650fd6 11292
ae1362a3 11293 LIBS="-ldgc $LIBS"
0ca10bb7 11294
a21616bd 11295fi
ca81d7a0 11296
0ca10bb7 11297fi
ca81d7a0 11298
0ca10bb7
RC
11299
11300
ae1362a3
AS
11301ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11302if test "x$ac_cv_header_locale_h" = x""yes; then :
11303
bf89cb4d 11304fi
ae1362a3
AS
11305
11306
11307for ac_func in setlocale
11308do :
11309 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
11310if test "x$ac_cv_func_setlocale" = x""yes; then :
11311 cat >>confdefs.h <<_ACEOF
11312#define HAVE_SETLOCALE 1
bf89cb4d 11313_ACEOF
ae1362a3
AS
11314
11315fi
11316done
11317
11318
11319# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
11320# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
11321# Irix 4.0.5F has the header but not the library.
11322if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
11323 ac_have_func=yes
11324
11325$as_echo "#define SVR4 1" >>confdefs.h
11326
11327fi
11328
11329if test $ac_have_func = no; then
11330 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
11331if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
11332 ac_have_func=yes
11333
11334$as_echo "#define UMAX 1" >>confdefs.h
11335
11336
11337$as_echo "#define UMAX4_3 1" >>confdefs.h
11338
11339fi
11340
11341
11342fi
11343
11344if test $ac_have_func = no; then
11345 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
11346if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
11347 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
11348
11349fi
11350
11351
11352fi
11353
11354if test $ac_have_func = no; then
11355 for ac_header in mach/mach.h
11356do :
11357 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
11358if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
11359 cat >>confdefs.h <<_ACEOF
11360#define HAVE_MACH_MACH_H 1
0ca10bb7 11361_ACEOF
c0d27fcc
MR
11362
11363fi
0ca10bb7 11364
ae1362a3
AS
11365done
11366
11367fi
11368
11369for ac_header in nlist.h
11370do :
11371 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
11372if test "x$ac_cv_header_nlist_h" = x""yes; then :
11373 cat >>confdefs.h <<_ACEOF
11374#define HAVE_NLIST_H 1
bf89cb4d 11375_ACEOF
ae1362a3
AS
11376 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
11377"
11378if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
11379
11380cat >>confdefs.h <<_ACEOF
11381#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
bf89cb4d 11382_ACEOF
bf89cb4d 11383
503d2be0 11384
ae1362a3
AS
11385$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
11386
11387fi
19650fd6 11388
bf89cb4d 11389
0ca10bb7 11390fi
ae1362a3
AS
11391
11392done
0ca10bb7 11393
bf89cb4d 11394fi
ae1362a3
AS
11395done
11396
11397
11398# Some definitions of getloadavg require that the program be installed setgid.
11399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
11400$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
11401if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
0ca10bb7
RC
11402 $as_echo_n "(cached) " >&6
11403else
ae1362a3 11404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 11405/* end confdefs.h. */
ae1362a3
AS
11406#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
11407#ifdef LDAV_PRIVILEGED
11408Yowza Am I SETGID yet
11409#endif
19650fd6 11410_ACEOF
ae1362a3
AS
11411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11412 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
11413 ac_cv_func_getloadavg_setgid=yes
bf89cb4d 11414else
ae1362a3
AS
11415 ac_cv_func_getloadavg_setgid=no
11416fi
11417rm -f conftest*
bf89cb4d 11418
ae1362a3
AS
11419fi
11420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
11421$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
11422if test $ac_cv_func_getloadavg_setgid = yes; then
11423 NEED_SETGID=true
bf89cb4d 11424
ae1362a3 11425$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
0ca10bb7 11426
ae1362a3
AS
11427else
11428 NEED_SETGID=false
bf89cb4d 11429fi
0ca10bb7 11430
ae1362a3
AS
11431if test $ac_cv_func_getloadavg_setgid = yes; then
11432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
11433$as_echo_n "checking group of /dev/kmem... " >&6; }
11434if test "${ac_cv_group_kmem+set}" = set; then :
11435 $as_echo_n "(cached) " >&6
11436else
11437 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
11438 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
11439 # If we got an error (system does not support symlinks), try without -L.
11440 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
11441 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
11442 | sed -ne 's/[ ][ ]*/ /g;
11443 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
11444 / /s/.* //;p;'`
19650fd6 11445
a21616bd 11446fi
ae1362a3
AS
11447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
11448$as_echo "$ac_cv_group_kmem" >&6; }
11449 KMEM_GROUP=$ac_cv_group_kmem
11450fi
11451if test "x$ac_save_LIBS" = x; then
11452 GETLOADAVG_LIBS=$LIBS
11453else
11454 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
11455fi
11456LIBS=$ac_save_LIBS
ca81d7a0 11457
c0d27fcc 11458
ca81d7a0 11459
ae1362a3
AS
11460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11461$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11462if test "${ac_cv_sys_largefile_source+set}" = set; then :
bf89cb4d
GM
11463 $as_echo_n "(cached) " >&6
11464else
ae1362a3
AS
11465 while :; do
11466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11467/* end confdefs.h. */
ae1362a3
AS
11468#include <sys/types.h> /* for off_t */
11469 #include <stdio.h>
bf89cb4d
GM
11470int
11471main ()
11472{
ae1362a3
AS
11473int (*fp) (FILE *, off_t, int) = fseeko;
11474 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
bf89cb4d
GM
11475 ;
11476 return 0;
11477}
11478_ACEOF
ae1362a3
AS
11479if ac_fn_c_try_link "$LINENO"; then :
11480 ac_cv_sys_largefile_source=no; break
11481fi
11482rm -f core conftest.err conftest.$ac_objext \
11483 conftest$ac_exeext conftest.$ac_ext
11484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11485/* end confdefs.h. */
ae1362a3
AS
11486#define _LARGEFILE_SOURCE 1
11487#include <sys/types.h> /* for off_t */
11488 #include <stdio.h>
bf89cb4d
GM
11489int
11490main ()
11491{
ae1362a3
AS
11492int (*fp) (FILE *, off_t, int) = fseeko;
11493 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
bf89cb4d
GM
11494 ;
11495 return 0;
11496}
11497_ACEOF
ae1362a3
AS
11498if ac_fn_c_try_link "$LINENO"; then :
11499 ac_cv_sys_largefile_source=1; break
bf89cb4d 11500fi
ae1362a3
AS
11501rm -f core conftest.err conftest.$ac_objext \
11502 conftest$ac_exeext conftest.$ac_ext
11503 ac_cv_sys_largefile_source=unknown
11504 break
11505done
bf89cb4d 11506fi
ae1362a3
AS
11507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11508$as_echo "$ac_cv_sys_largefile_source" >&6; }
11509case $ac_cv_sys_largefile_source in #(
11510 no | unknown) ;;
11511 *)
bf89cb4d 11512cat >>confdefs.h <<_ACEOF
ae1362a3 11513#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
bf89cb4d 11514_ACEOF
ae1362a3
AS
11515;;
11516esac
11517rm -rf conftest*
19650fd6 11518
ae1362a3
AS
11519# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11520# in glibc 2.1.3, but that breaks too many other things.
11521# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11522if test $ac_cv_sys_largefile_source != unknown; then
ca81d7a0 11523
ae1362a3 11524$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
c0d27fcc 11525
bf89cb4d 11526fi
ca81d7a0 11527
c0d27fcc 11528
ae1362a3
AS
11529# Configure getopt.
11530# getopt.m4 serial 10
11531
11532# The getopt module assume you want GNU getopt, with getopt_long etc,
11533# rather than vanilla POSIX getopt. This means your your code should
11534# always include <getopt.h> for the getopt prototypes.
0ca10bb7
RC
11535
11536
11537
11538
bf89cb4d 11539
c0d27fcc 11540
a21616bd 11541
c0d27fcc 11542
c0d27fcc 11543
98418dba 11544
c0d27fcc 11545
ae1362a3 11546# Prerequisites of lib/getopt*.
19650fd6 11547
ca81d7a0 11548
c0d27fcc 11549
ae1362a3
AS
11550
11551 GETOPT_H=
11552 for ac_header in getopt.h
11553do :
11554 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11555if test "x$ac_cv_header_getopt_h" = x""yes; then :
11556 cat >>confdefs.h <<_ACEOF
11557#define HAVE_GETOPT_H 1
bf89cb4d 11558_ACEOF
ca81d7a0 11559
ae1362a3
AS
11560else
11561 GETOPT_H=getopt.h
bf89cb4d 11562fi
ca81d7a0 11563
ae1362a3 11564done
c0d27fcc 11565
ae1362a3
AS
11566 if test -z "$GETOPT_H"; then
11567 for ac_func in getopt_long_only
11568do :
11569 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11570if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
11571 cat >>confdefs.h <<_ACEOF
11572#define HAVE_GETOPT_LONG_ONLY 1
11573_ACEOF
19650fd6 11574
bf89cb4d 11575else
ae1362a3 11576 GETOPT_H=getopt.h
a21616bd 11577fi
ae1362a3
AS
11578done
11579
11580 fi
ca81d7a0 11581
ae1362a3
AS
11582 if test -z "$GETOPT_H"; then
11583 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
11584"
11585if test "x$ac_cv_have_decl_optreset" = x""yes; then :
11586 GETOPT_H=getopt.h
bf89cb4d 11587fi
c0d27fcc 11588
ae1362a3 11589 fi
ca81d7a0 11590
ae1362a3
AS
11591 if test -z "$GETOPT_H"; then
11592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11593$as_echo_n "checking for working GNU getopt function... " >&6; }
11594if test "${gl_cv_func_gnu_getopt+set}" = set; then :
e9a63f04 11595 $as_echo_n "(cached) " >&6
c0d27fcc 11596else
ae1362a3
AS
11597 if test "$cross_compiling" = yes; then :
11598 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
11599"
11600if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
11601 gl_cv_func_gnu_getopt=no
0ca10bb7 11602else
ae1362a3 11603 gl_cv_func_gnu_getopt=yes
0ca10bb7 11604fi
0ca10bb7 11605
ae1362a3
AS
11606else
11607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11608/* end confdefs.h. */
ae1362a3
AS
11609#include <getopt.h>
11610int
11611main ()
11612{
11613
11614 char *myargv[3];
11615 myargv[0] = "conftest";
11616 myargv[1] = "-+";
11617 myargv[2] = 0;
11618 return getopt (2, myargv, "+a") != '?';
11619
11620 ;
11621 return 0;
11622}
bf89cb4d 11623_ACEOF
ae1362a3
AS
11624if ac_fn_c_try_run "$LINENO"; then :
11625 gl_cv_func_gnu_getopt=yes
bf89cb4d 11626else
ae1362a3
AS
11627 gl_cv_func_gnu_getopt=no
11628fi
11629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11630 conftest.$ac_objext conftest.beam conftest.$ac_ext
11631fi
c0d27fcc
MR
11632
11633fi
ae1362a3
AS
11634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
11635$as_echo "$gl_cv_func_gnu_getopt" >&6; }
11636 if test "$gl_cv_func_gnu_getopt" = "no"; then
11637 GETOPT_H=getopt.h
11638 fi
11639 fi
0ca10bb7
RC
11640
11641
503d2be0 11642
ae1362a3 11643 if test -n "$GETOPT_H"; then :
0ca10bb7 11644
bf89cb4d 11645
ae1362a3 11646 GETOPT_H=getopt.h
19650fd6 11647
ae1362a3 11648$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
bf89cb4d 11649
ca81d7a0 11650
ae1362a3
AS
11651
11652 :
11653 GETOPTOBJS='getopt.o getopt1.o'
bf89cb4d 11654
0ca10bb7 11655fi
bf89cb4d 11656
c0d27fcc 11657
0ca10bb7 11658
ae1362a3
AS
11659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
11660$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
11661if test "${ac_cv_func_getpgrp_void+set}" = set; then :
bf89cb4d 11662 $as_echo_n "(cached) " >&6
bf89cb4d 11663else
ae1362a3
AS
11664 # Use it with a single arg.
11665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d
GM
11666/* end confdefs.h. */
11667$ac_includes_default
ae1362a3
AS
11668int
11669main ()
11670{
11671getpgrp (0);
11672 ;
11673 return 0;
11674}
bf89cb4d 11675_ACEOF
ae1362a3
AS
11676if ac_fn_c_try_compile "$LINENO"; then :
11677 ac_cv_func_getpgrp_void=no
bf89cb4d 11678else
ae1362a3
AS
11679 ac_cv_func_getpgrp_void=yes
11680fi
11681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19650fd6 11682
a21616bd 11683fi
ae1362a3
AS
11684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
11685$as_echo "$ac_cv_func_getpgrp_void" >&6; }
11686if test $ac_cv_func_getpgrp_void = yes; then
ca81d7a0 11687
ae1362a3 11688$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
35996d22 11689
ae1362a3
AS
11690fi
11691
11692
11693for ac_func in strftime
11694do :
11695 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
11696if test "x$ac_cv_func_strftime" = x""yes; then :
11697 cat >>confdefs.h <<_ACEOF
11698#define HAVE_STRFTIME 1
bf89cb4d 11699_ACEOF
ae1362a3
AS
11700
11701else
11702 # strftime is in -lintl on SCO UNIX.
11703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
11704$as_echo_n "checking for strftime in -lintl... " >&6; }
11705if test "${ac_cv_lib_intl_strftime+set}" = set; then :
11706 $as_echo_n "(cached) " >&6
11707else
11708 ac_check_lib_save_LIBS=$LIBS
11709LIBS="-lintl $LIBS"
11710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11711/* end confdefs.h. */
ae1362a3
AS
11712
11713/* Override any GCC internal prototype to avoid an error.
11714 Use char because int might match the return type of a GCC
11715 builtin and then its argument prototype would still apply. */
11716#ifdef __cplusplus
11717extern "C"
11718#endif
11719char strftime ();
11720int
11721main ()
11722{
11723return strftime ();
11724 ;
11725 return 0;
11726}
0ca10bb7 11727_ACEOF
ae1362a3
AS
11728if ac_fn_c_try_link "$LINENO"; then :
11729 ac_cv_lib_intl_strftime=yes
bf89cb4d 11730else
ae1362a3
AS
11731 ac_cv_lib_intl_strftime=no
11732fi
11733rm -f core conftest.err conftest.$ac_objext \
11734 conftest$ac_exeext conftest.$ac_ext
11735LIBS=$ac_check_lib_save_LIBS
11736fi
11737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
11738$as_echo "$ac_cv_lib_intl_strftime" >&6; }
11739if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
11740 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
ca81d7a0 11741
ae1362a3 11742LIBS="-lintl $LIBS"
0ca10bb7 11743fi
0ca10bb7 11744
ae1362a3
AS
11745fi
11746done
0ca10bb7 11747
c0d27fcc 11748
ae1362a3
AS
11749# UNIX98 PTYs.
11750for ac_func in grantpt
11751do :
11752 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
11753if test "x$ac_cv_func_grantpt" = x""yes; then :
11754 cat >>confdefs.h <<_ACEOF
11755#define HAVE_GRANTPT 1
11756_ACEOF
11757
c0d27fcc 11758fi
ae1362a3
AS
11759done
11760
bf89cb4d 11761
ae1362a3
AS
11762# PTY-related GNU extensions.
11763for ac_func in getpt
11764do :
11765 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
11766if test "x$ac_cv_func_getpt" = x""yes; then :
c0d27fcc 11767 cat >>confdefs.h <<_ACEOF
ae1362a3 11768#define HAVE_GETPT 1
c0d27fcc 11769_ACEOF
503d2be0 11770
ae1362a3
AS
11771fi
11772done
0ca10bb7 11773
ae1362a3
AS
11774
11775# Check this now, so that we will NOT find the above functions in ncurses.
11776# That is because we have not set up to link ncurses in lib-src.
11777# It's better to believe a function is not available
11778# than to expect to find it in ncurses.
11779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tparm in -lncurses" >&5
11780$as_echo_n "checking for tparm in -lncurses... " >&6; }
11781if test "${ac_cv_lib_ncurses_tparm+set}" = set; then :
bf89cb4d 11782 $as_echo_n "(cached) " >&6
bf89cb4d 11783else
ae1362a3
AS
11784 ac_check_lib_save_LIBS=$LIBS
11785LIBS="-lncurses $LIBS"
11786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 11787/* end confdefs.h. */
ae1362a3
AS
11788
11789/* Override any GCC internal prototype to avoid an error.
11790 Use char because int might match the return type of a GCC
11791 builtin and then its argument prototype would still apply. */
11792#ifdef __cplusplus
11793extern "C"
11794#endif
11795char tparm ();
11796int
11797main ()
11798{
11799return tparm ();
11800 ;
11801 return 0;
11802}
0ca10bb7 11803_ACEOF
ae1362a3
AS
11804if ac_fn_c_try_link "$LINENO"; then :
11805 ac_cv_lib_ncurses_tparm=yes
0ca10bb7 11806else
ae1362a3
AS
11807 ac_cv_lib_ncurses_tparm=no
11808fi
11809rm -f core conftest.err conftest.$ac_objext \
11810 conftest$ac_exeext conftest.$ac_ext
11811LIBS=$ac_check_lib_save_LIBS
11812fi
11813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tparm" >&5
11814$as_echo "$ac_cv_lib_ncurses_tparm" >&6; }
11815if test "x$ac_cv_lib_ncurses_tparm" = x""yes; then :
11816 cat >>confdefs.h <<_ACEOF
11817#define HAVE_LIBNCURSES 1
11818_ACEOF
11819
11820 LIBS="-lncurses $LIBS"
bf89cb4d 11821
0ca10bb7 11822fi
bf89cb4d 11823
bf89cb4d 11824
ae1362a3
AS
11825# Do we have res_init, for detecting changes in /etc/resolv.conf?
11826
11827resolv=no
11828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11829/* end confdefs.h. */
11830#include <netinet/in.h>
11831#include <arpa/nameser.h>
11832#include <resolv.h>
11833int
11834main ()
11835{
11836return res_init();
11837 ;
11838 return 0;
11839}
bf89cb4d 11840_ACEOF
ae1362a3
AS
11841if ac_fn_c_try_link "$LINENO"; then :
11842 have_res_init=yes
11843else
11844 have_res_init=no
11845fi
11846rm -f core conftest.err conftest.$ac_objext \
11847 conftest$ac_exeext conftest.$ac_ext
11848if test "$have_res_init" = no; then
11849 OLIBS="$LIBS"
11850 LIBS="$LIBS -lresolv"
11851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
11852$as_echo_n "checking for res_init with -lresolv... " >&6; }
11853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 11854/* end confdefs.h. */
ae1362a3
AS
11855#include <netinet/in.h>
11856#include <arpa/nameser.h>
11857#include <resolv.h>
11858int
11859main ()
11860{
11861return res_init();
11862 ;
11863 return 0;
11864}
0ca10bb7 11865_ACEOF
ae1362a3
AS
11866if ac_fn_c_try_link "$LINENO"; then :
11867 have_res_init=yes
0ca10bb7 11868else
ae1362a3
AS
11869 have_res_init=no
11870fi
11871rm -f core conftest.err conftest.$ac_objext \
11872 conftest$ac_exeext conftest.$ac_ext
11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
11874$as_echo "$have_res_init" >&6; }
11875 if test "$have_res_init" = yes ; then
11876 resolv=yes
11877 fi
11878 LIBS="$OLIBS"
a21616bd 11879fi
c0d27fcc 11880
ae1362a3 11881if test "$have_res_init" = yes; then
0ca10bb7 11882
ae1362a3 11883$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
a21616bd
KR
11884
11885fi
c0d27fcc 11886
ae1362a3
AS
11887# Do we need the Hesiod library to provide the support routines?
11888if test "$with_hesiod" != no ; then
11889 # Don't set $LIBS here -- see comments above.
11890 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
11891if test "x$ac_cv_func_res_send" = x""yes; then :
a21616bd 11892
0ca10bb7 11893else
ae1362a3
AS
11894 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
11895if test "x$ac_cv_func___res_send" = x""yes; then :
503d2be0 11896
ae1362a3
AS
11897else
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
11899$as_echo_n "checking for res_send in -lresolv... " >&6; }
11900if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
e9a63f04 11901 $as_echo_n "(cached) " >&6
98418dba 11902else
ae1362a3
AS
11903 ac_check_lib_save_LIBS=$LIBS
11904LIBS="-lresolv $LIBS"
11905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 11906/* end confdefs.h. */
ae1362a3
AS
11907
11908/* Override any GCC internal prototype to avoid an error.
11909 Use char because int might match the return type of a GCC
11910 builtin and then its argument prototype would still apply. */
11911#ifdef __cplusplus
11912extern "C"
11913#endif
11914char res_send ();
11915int
11916main ()
11917{
11918return res_send ();
11919 ;
11920 return 0;
11921}
19650fd6 11922_ACEOF
ae1362a3
AS
11923if ac_fn_c_try_link "$LINENO"; then :
11924 ac_cv_lib_resolv_res_send=yes
0ca10bb7 11925else
ae1362a3 11926 ac_cv_lib_resolv_res_send=no
0ca10bb7 11927fi
ae1362a3
AS
11928rm -f core conftest.err conftest.$ac_objext \
11929 conftest$ac_exeext conftest.$ac_ext
11930LIBS=$ac_check_lib_save_LIBS
11931fi
11932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
11933$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
11934if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
11935 resolv=yes
11936else
11937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
11938$as_echo_n "checking for __res_send in -lresolv... " >&6; }
11939if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
11940 $as_echo_n "(cached) " >&6
11941else
11942 ac_check_lib_save_LIBS=$LIBS
11943LIBS="-lresolv $LIBS"
11944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11945/* end confdefs.h. */
ae1362a3
AS
11946
11947/* Override any GCC internal prototype to avoid an error.
11948 Use char because int might match the return type of a GCC
11949 builtin and then its argument prototype would still apply. */
11950#ifdef __cplusplus
11951extern "C"
11952#endif
11953char __res_send ();
11954int
11955main ()
11956{
11957return __res_send ();
11958 ;
11959 return 0;
11960}
bf89cb4d 11961_ACEOF
ae1362a3
AS
11962if ac_fn_c_try_link "$LINENO"; then :
11963 ac_cv_lib_resolv___res_send=yes
c0d27fcc 11964else
ae1362a3
AS
11965 ac_cv_lib_resolv___res_send=no
11966fi
11967rm -f core conftest.err conftest.$ac_objext \
11968 conftest$ac_exeext conftest.$ac_ext
11969LIBS=$ac_check_lib_save_LIBS
11970fi
11971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
11972$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
11973if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
11974 resolv=yes
11975fi
bf89cb4d 11976
0ca10bb7 11977fi
bf89cb4d 11978
ae1362a3 11979fi
bf89cb4d 11980
ae1362a3 11981fi
bf89cb4d 11982
ae1362a3
AS
11983 if test "$resolv" = yes ; then
11984 RESOLVLIB=-lresolv
11985 else
11986 RESOLVLIB=
11987 fi
11988 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
11989if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
11990
11991else
11992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
11993$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
11994if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
bf89cb4d
GM
11995 $as_echo_n "(cached) " >&6
11996else
ae1362a3
AS
11997 ac_check_lib_save_LIBS=$LIBS
11998LIBS="-lhesiod $RESOLVLIB $LIBS"
11999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12000/* end confdefs.h. */
bf89cb4d 12001
ae1362a3
AS
12002/* Override any GCC internal prototype to avoid an error.
12003 Use char because int might match the return type of a GCC
12004 builtin and then its argument prototype would still apply. */
12005#ifdef __cplusplus
12006extern "C"
12007#endif
12008char hes_getmailhost ();
12009int
12010main ()
12011{
12012return hes_getmailhost ();
12013 ;
12014 return 0;
12015}
bf89cb4d 12016_ACEOF
ae1362a3
AS
12017if ac_fn_c_try_link "$LINENO"; then :
12018 ac_cv_lib_hesiod_hes_getmailhost=yes
12019else
12020 ac_cv_lib_hesiod_hes_getmailhost=no
12021fi
12022rm -f core conftest.err conftest.$ac_objext \
12023 conftest$ac_exeext conftest.$ac_ext
12024LIBS=$ac_check_lib_save_LIBS
0ca10bb7 12025fi
ae1362a3
AS
12026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
12027$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
12028if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
0ca10bb7 12029
ae1362a3 12030$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
bf89cb4d 12031
ae1362a3
AS
12032else
12033 :
0ca10bb7 12034fi
19650fd6 12035
ae1362a3 12036fi
bf89cb4d 12037
c0d27fcc 12038fi
ca81d7a0 12039
ae1362a3
AS
12040# Do we need libresolv (due to res_init or Hesiod)?
12041if test "$resolv" = yes ; then
bf89cb4d 12042
ae1362a3 12043$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
c0d27fcc 12044
bf89cb4d 12045fi
ae1362a3
AS
12046
12047# These tell us which Kerberos-related libraries to use.
12048if test "${with_kerberos}" != no; then
12049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
12050$as_echo_n "checking for com_err in -lcom_err... " >&6; }
12051if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
12052 $as_echo_n "(cached) " >&6
0ca10bb7 12053else
ae1362a3
AS
12054 ac_check_lib_save_LIBS=$LIBS
12055LIBS="-lcom_err $LIBS"
12056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12057/* end confdefs.h. */
ca81d7a0 12058
ae1362a3
AS
12059/* Override any GCC internal prototype to avoid an error.
12060 Use char because int might match the return type of a GCC
12061 builtin and then its argument prototype would still apply. */
12062#ifdef __cplusplus
12063extern "C"
12064#endif
12065char com_err ();
12066int
12067main ()
12068{
12069return com_err ();
12070 ;
12071 return 0;
12072}
bf89cb4d 12073_ACEOF
ae1362a3
AS
12074if ac_fn_c_try_link "$LINENO"; then :
12075 ac_cv_lib_com_err_com_err=yes
c0d27fcc 12076else
ae1362a3
AS
12077 ac_cv_lib_com_err_com_err=no
12078fi
12079rm -f core conftest.err conftest.$ac_objext \
12080 conftest$ac_exeext conftest.$ac_ext
12081LIBS=$ac_check_lib_save_LIBS
a21616bd 12082fi
ae1362a3
AS
12083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
12084$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
12085if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
12086 cat >>confdefs.h <<_ACEOF
12087#define HAVE_LIBCOM_ERR 1
12088_ACEOF
c0d27fcc 12089
ae1362a3 12090 LIBS="-lcom_err $LIBS"
a21616bd 12091
ae1362a3 12092fi
503d2be0 12093
ae1362a3
AS
12094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
12095$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
12096if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
e9a63f04 12097 $as_echo_n "(cached) " >&6
ba4481b5 12098else
ae1362a3
AS
12099 ac_check_lib_save_LIBS=$LIBS
12100LIBS="-lk5crypto $LIBS"
12101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12102/* end confdefs.h. */
bf89cb4d 12103
ae1362a3
AS
12104/* Override any GCC internal prototype to avoid an error.
12105 Use char because int might match the return type of a GCC
12106 builtin and then its argument prototype would still apply. */
12107#ifdef __cplusplus
12108extern "C"
12109#endif
12110char mit_des_cbc_encrypt ();
12111int
12112main ()
12113{
12114return mit_des_cbc_encrypt ();
12115 ;
12116 return 0;
12117}
12118_ACEOF
12119if ac_fn_c_try_link "$LINENO"; then :
12120 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
12121else
12122 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
12123fi
12124rm -f core conftest.err conftest.$ac_objext \
12125 conftest$ac_exeext conftest.$ac_ext
12126LIBS=$ac_check_lib_save_LIBS
503d2be0 12127fi
ae1362a3
AS
12128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
12129$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
12130if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
c0d27fcc 12131 cat >>confdefs.h <<_ACEOF
ae1362a3 12132#define HAVE_LIBK5CRYPTO 1
c0d27fcc 12133_ACEOF
ba4481b5 12134
ae1362a3 12135 LIBS="-lk5crypto $LIBS"
ba4481b5 12136
ba4481b5
DL
12137fi
12138
ae1362a3
AS
12139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
12140$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
12141if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
e9a63f04 12142 $as_echo_n "(cached) " >&6
ba4481b5 12143else
0ca10bb7 12144 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
12145LIBS="-lcrypto $LIBS"
12146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12147/* end confdefs.h. */
0ca10bb7
RC
12148
12149/* Override any GCC internal prototype to avoid an error.
12150 Use char because int might match the return type of a GCC
12151 builtin and then its argument prototype would still apply. */
12152#ifdef __cplusplus
12153extern "C"
12154#endif
ae1362a3 12155char mit_des_cbc_encrypt ();
0ca10bb7
RC
12156int
12157main ()
ba4481b5 12158{
ae1362a3 12159return mit_des_cbc_encrypt ();
0ca10bb7
RC
12160 ;
12161 return 0;
ba4481b5 12162}
503d2be0 12163_ACEOF
ae1362a3
AS
12164if ac_fn_c_try_link "$LINENO"; then :
12165 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
ba4481b5 12166else
ae1362a3 12167 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
ba4481b5 12168fi
ae1362a3
AS
12169rm -f core conftest.err conftest.$ac_objext \
12170 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 12171LIBS=$ac_check_lib_save_LIBS
ba4481b5 12172fi
ae1362a3
AS
12173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
12174$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
12175if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
0ca10bb7 12176 cat >>confdefs.h <<_ACEOF
ae1362a3 12177#define HAVE_LIBCRYPTO 1
0ca10bb7
RC
12178_ACEOF
12179
ae1362a3 12180 LIBS="-lcrypto $LIBS"
ca81d7a0 12181
0ca10bb7 12182fi
ca81d7a0 12183
ae1362a3
AS
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
12185$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
12186if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
0ca10bb7 12187 $as_echo_n "(cached) " >&6
ba4481b5 12188else
ae1362a3
AS
12189 ac_check_lib_save_LIBS=$LIBS
12190LIBS="-lkrb5 $LIBS"
12191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12192/* end confdefs.h. */
ae1362a3
AS
12193
12194/* Override any GCC internal prototype to avoid an error.
12195 Use char because int might match the return type of a GCC
12196 builtin and then its argument prototype would still apply. */
12197#ifdef __cplusplus
12198extern "C"
12199#endif
12200char krb5_init_context ();
12201int
12202main ()
bf89cb4d 12203{
ae1362a3
AS
12204return krb5_init_context ();
12205 ;
12206 return 0;
0ca10bb7
RC
12207}
12208_ACEOF
ae1362a3
AS
12209if ac_fn_c_try_link "$LINENO"; then :
12210 ac_cv_lib_krb5_krb5_init_context=yes
0ca10bb7 12211else
ae1362a3 12212 ac_cv_lib_krb5_krb5_init_context=no
ba4481b5 12213fi
ae1362a3
AS
12214rm -f core conftest.err conftest.$ac_objext \
12215 conftest$ac_exeext conftest.$ac_ext
12216LIBS=$ac_check_lib_save_LIBS
ba4481b5 12217fi
ae1362a3
AS
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
12219$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
12220if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
12221 cat >>confdefs.h <<_ACEOF
12222#define HAVE_LIBKRB5 1
bf89cb4d 12223_ACEOF
ba4481b5 12224
ae1362a3 12225 LIBS="-lkrb5 $LIBS"
503d2be0 12226
ae1362a3 12227fi
bf89cb4d 12228
ae1362a3
AS
12229 if test "${with_kerberos5}" = no; then
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
12231$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
12232if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
e9a63f04 12233 $as_echo_n "(cached) " >&6
48d4b120 12234else
ae1362a3
AS
12235 ac_check_lib_save_LIBS=$LIBS
12236LIBS="-ldes425 $LIBS"
12237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12238/* end confdefs.h. */
edfaf76d 12239
0ca10bb7
RC
12240/* Override any GCC internal prototype to avoid an error.
12241 Use char because int might match the return type of a GCC
12242 builtin and then its argument prototype would still apply. */
12243#ifdef __cplusplus
12244extern "C"
19650fd6 12245#endif
ae1362a3 12246char des_cbc_encrypt ();
0ca10bb7
RC
12247int
12248main ()
12249{
ae1362a3 12250return des_cbc_encrypt ();
0ca10bb7
RC
12251 ;
12252 return 0;
12253}
12254_ACEOF
ae1362a3
AS
12255if ac_fn_c_try_link "$LINENO"; then :
12256 ac_cv_lib_des425_des_cbc_encrypt=yes
0ca10bb7 12257else
ae1362a3 12258 ac_cv_lib_des425_des_cbc_encrypt=no
0ca10bb7 12259fi
ae1362a3
AS
12260rm -f core conftest.err conftest.$ac_objext \
12261 conftest$ac_exeext conftest.$ac_ext
12262LIBS=$ac_check_lib_save_LIBS
0ca10bb7 12263fi
ae1362a3
AS
12264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
12265$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
12266if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
0ca10bb7 12267 cat >>confdefs.h <<_ACEOF
ae1362a3 12268#define HAVE_LIBDES425 1
0ca10bb7
RC
12269_ACEOF
12270
ae1362a3 12271 LIBS="-ldes425 $LIBS"
edfaf76d 12272
ae1362a3
AS
12273else
12274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
12275$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
12276if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
12277 $as_echo_n "(cached) " >&6
12278else
ae1362a3
AS
12279 ac_check_lib_save_LIBS=$LIBS
12280LIBS="-ldes $LIBS"
12281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12282/* end confdefs.h. */
edfaf76d 12283
ae1362a3
AS
12284/* Override any GCC internal prototype to avoid an error.
12285 Use char because int might match the return type of a GCC
12286 builtin and then its argument prototype would still apply. */
12287#ifdef __cplusplus
12288extern "C"
503d2be0 12289#endif
ae1362a3 12290char des_cbc_encrypt ();
19650fd6
AS
12291int
12292main ()
12293{
ae1362a3 12294return des_cbc_encrypt ();
503d2be0
AS
12295 ;
12296 return 0;
12297}
12298_ACEOF
ae1362a3
AS
12299if ac_fn_c_try_link "$LINENO"; then :
12300 ac_cv_lib_des_des_cbc_encrypt=yes
503d2be0 12301else
ae1362a3 12302 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 12303fi
ae1362a3
AS
12304rm -f core conftest.err conftest.$ac_objext \
12305 conftest$ac_exeext conftest.$ac_ext
12306LIBS=$ac_check_lib_save_LIBS
503d2be0 12307fi
ae1362a3
AS
12308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
12309$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
12310if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
12311 cat >>confdefs.h <<_ACEOF
12312#define HAVE_LIBDES 1
c0d27fcc 12313_ACEOF
48d4b120 12314
ae1362a3
AS
12315 LIBS="-ldes $LIBS"
12316
bf89cb4d 12317fi
48d4b120 12318
ae1362a3
AS
12319fi
12320
12321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
12322$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
12323if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
e9a63f04 12324 $as_echo_n "(cached) " >&6
ba4481b5 12325else
ae1362a3
AS
12326 ac_check_lib_save_LIBS=$LIBS
12327LIBS="-lkrb4 $LIBS"
12328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12329/* end confdefs.h. */
ba4481b5 12330
0ca10bb7
RC
12331/* Override any GCC internal prototype to avoid an error.
12332 Use char because int might match the return type of a GCC
12333 builtin and then its argument prototype would still apply. */
12334#ifdef __cplusplus
12335extern "C"
a3f08d9e 12336#endif
ae1362a3 12337char krb_get_cred ();
503d2be0
AS
12338int
12339main ()
12340{
ae1362a3 12341return krb_get_cred ();
503d2be0
AS
12342 ;
12343 return 0;
12344}
12345_ACEOF
ae1362a3
AS
12346if ac_fn_c_try_link "$LINENO"; then :
12347 ac_cv_lib_krb4_krb_get_cred=yes
bf89cb4d 12348else
ae1362a3 12349 ac_cv_lib_krb4_krb_get_cred=no
bf89cb4d 12350fi
ae1362a3
AS
12351rm -f core conftest.err conftest.$ac_objext \
12352 conftest$ac_exeext conftest.$ac_ext
12353LIBS=$ac_check_lib_save_LIBS
c0d27fcc 12354fi
ae1362a3
AS
12355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
12356$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
12357if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
12358 cat >>confdefs.h <<_ACEOF
12359#define HAVE_LIBKRB4 1
bf89cb4d 12360_ACEOF
bf89cb4d 12361
ae1362a3 12362 LIBS="-lkrb4 $LIBS"
c0d27fcc 12363
bf89cb4d 12364else
ae1362a3
AS
12365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
12366$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
12367if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
bf89cb4d 12368 $as_echo_n "(cached) " >&6
bf89cb4d 12369else
ae1362a3
AS
12370 ac_check_lib_save_LIBS=$LIBS
12371LIBS="-lkrb $LIBS"
12372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12373/* end confdefs.h. */
ba4481b5 12374
ae1362a3
AS
12375/* Override any GCC internal prototype to avoid an error.
12376 Use char because int might match the return type of a GCC
12377 builtin and then its argument prototype would still apply. */
12378#ifdef __cplusplus
12379extern "C"
12380#endif
12381char krb_get_cred ();
12382int
12383main ()
12384{
12385return krb_get_cred ();
12386 ;
12387 return 0;
12388}
12389_ACEOF
12390if ac_fn_c_try_link "$LINENO"; then :
12391 ac_cv_lib_krb_krb_get_cred=yes
12392else
12393 ac_cv_lib_krb_krb_get_cred=no
ba4481b5 12394fi
ae1362a3
AS
12395rm -f core conftest.err conftest.$ac_objext \
12396 conftest$ac_exeext conftest.$ac_ext
12397LIBS=$ac_check_lib_save_LIBS
12398fi
12399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
12400$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
12401if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
12402 cat >>confdefs.h <<_ACEOF
12403#define HAVE_LIBKRB 1
12404_ACEOF
0ca10bb7 12405
ae1362a3 12406 LIBS="-lkrb $LIBS"
2d2b6695 12407
2d2b6695 12408fi
2d2b6695 12409
2d2b6695 12410fi
ca81d7a0 12411
ae1362a3 12412 fi
ca81d7a0 12413
ae1362a3
AS
12414 if test "${with_kerberos5}" != no; then
12415 for ac_header in krb5.h
12416do :
12417 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
12418if test "x$ac_cv_header_krb5_h" = x""yes; then :
12419 cat >>confdefs.h <<_ACEOF
12420#define HAVE_KRB5_H 1
12421_ACEOF
12422 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
12423"
12424if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
0ca10bb7 12425
ae1362a3
AS
12426cat >>confdefs.h <<_ACEOF
12427#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 12428_ACEOF
2d2b6695 12429
ae1362a3 12430
2d2b6695 12431fi
ae1362a3
AS
12432ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
12433"
12434if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
12435
12436cat >>confdefs.h <<_ACEOF
12437#define HAVE_KRB5_ERROR_E_TEXT 1
12438_ACEOF
0ca10bb7 12439
0ca10bb7 12440
bf89cb4d 12441fi
2d2b6695
KS
12442
12443fi
12444
ae1362a3 12445done
b936fae4 12446
ae1362a3
AS
12447 else
12448 for ac_header in des.h
12449do :
12450 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
12451if test "x$ac_cv_header_des_h" = x""yes; then :
12452 cat >>confdefs.h <<_ACEOF
12453#define HAVE_DES_H 1
bf89cb4d 12454_ACEOF
ae1362a3
AS
12455
12456else
12457 for ac_header in kerberosIV/des.h
12458do :
12459 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
12460if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
12461 cat >>confdefs.h <<_ACEOF
12462#define HAVE_KERBEROSIV_DES_H 1
c0d27fcc 12463_ACEOF
ae1362a3 12464
bf89cb4d 12465else
ae1362a3
AS
12466 for ac_header in kerberos/des.h
12467do :
12468 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
12469if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
12470 cat >>confdefs.h <<_ACEOF
12471#define HAVE_KERBEROS_DES_H 1
12472_ACEOF
3d9fec71 12473
3d9fec71
DL
12474fi
12475
ae1362a3 12476done
0ca10bb7 12477
0ca10bb7 12478fi
ae1362a3
AS
12479
12480done
bf89cb4d 12481
0ca10bb7 12482fi
ae1362a3
AS
12483
12484done
12485
12486 for ac_header in krb.h
12487do :
12488 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
12489if test "x$ac_cv_header_krb_h" = x""yes; then :
0ca10bb7 12490 cat >>confdefs.h <<_ACEOF
ae1362a3
AS
12491#define HAVE_KRB_H 1
12492_ACEOF
12493
12494else
12495 for ac_header in kerberosIV/krb.h
12496do :
12497 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
12498if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
12499 cat >>confdefs.h <<_ACEOF
12500#define HAVE_KERBEROSIV_KRB_H 1
12501_ACEOF
12502
12503else
12504 for ac_header in kerberos/krb.h
12505do :
12506 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
12507if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
12508 cat >>confdefs.h <<_ACEOF
12509#define HAVE_KERBEROS_KRB_H 1
e9a63f04 12510_ACEOF
0ca10bb7 12511
0ca10bb7
RC
12512fi
12513
bf89cb4d 12514done
0ca10bb7 12515
ae1362a3 12516fi
0ca10bb7 12517
ae1362a3 12518done
0ca10bb7
RC
12519
12520fi
12521
ae1362a3 12522done
bf89cb4d 12523
ae1362a3
AS
12524 fi
12525 for ac_header in com_err.h
12526do :
12527 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
12528if test "x$ac_cv_header_com_err_h" = x""yes; then :
12529 cat >>confdefs.h <<_ACEOF
12530#define HAVE_COM_ERR_H 1
0ca10bb7
RC
12531_ACEOF
12532
12533fi
0ca10bb7 12534
ae1362a3
AS
12535done
12536
12537fi
12538
12539# Solaris requires -lintl if you want strerror (which calls dgettext)
12540# to return localized messages.
12541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
12542$as_echo_n "checking for dgettext in -lintl... " >&6; }
12543if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
0ca10bb7
RC
12544 $as_echo_n "(cached) " >&6
12545else
ae1362a3
AS
12546 ac_check_lib_save_LIBS=$LIBS
12547LIBS="-lintl $LIBS"
12548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12549/* end confdefs.h. */
ae1362a3
AS
12550
12551/* Override any GCC internal prototype to avoid an error.
12552 Use char because int might match the return type of a GCC
12553 builtin and then its argument prototype would still apply. */
12554#ifdef __cplusplus
12555extern "C"
12556#endif
12557char dgettext ();
e9a63f04
GM
12558int
12559main ()
12560{
ae1362a3 12561return dgettext ();
bf89cb4d
GM
12562 ;
12563 return 0;
12564}
12565_ACEOF
ae1362a3
AS
12566if ac_fn_c_try_link "$LINENO"; then :
12567 ac_cv_lib_intl_dgettext=yes
12568else
12569 ac_cv_lib_intl_dgettext=no
12570fi
12571rm -f core conftest.err conftest.$ac_objext \
12572 conftest$ac_exeext conftest.$ac_ext
12573LIBS=$ac_check_lib_save_LIBS
12574fi
12575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
12576$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
12577if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
12578 cat >>confdefs.h <<_ACEOF
12579#define HAVE_LIBINTL 1
bf89cb4d 12580_ACEOF
ae1362a3
AS
12581
12582 LIBS="-lintl $LIBS"
12583
12584fi
12585
12586
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
12588$as_echo_n "checking whether localtime caches TZ... " >&6; }
12589if test "${emacs_cv_localtime_cache+set}" = set; then :
12590 $as_echo_n "(cached) " >&6
12591else
12592 if test x$ac_cv_func_tzset = xyes; then
12593if test "$cross_compiling" = yes; then :
12594 # If we have tzset, assume the worst when cross-compiling.
12595emacs_cv_localtime_cache=yes
12596else
12597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12598/* end confdefs.h. */
ae1362a3
AS
12599#include <time.h>
12600extern char **environ;
12601unset_TZ ()
bf89cb4d 12602{
ae1362a3
AS
12603 char **from, **to;
12604 for (to = from = environ; (*to = *from); from++)
12605 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
12606 to++;
12607}
12608char TZ_GMT0[] = "TZ=GMT0";
12609char TZ_PST8[] = "TZ=PST8";
12610main()
12611{
12612 time_t now = time ((time_t *) 0);
12613 int hour_GMT0, hour_unset;
12614 if (putenv (TZ_GMT0) != 0)
12615 exit (1);
12616 hour_GMT0 = localtime (&now)->tm_hour;
12617 unset_TZ ();
12618 hour_unset = localtime (&now)->tm_hour;
12619 if (putenv (TZ_PST8) != 0)
12620 exit (1);
12621 if (localtime (&now)->tm_hour == hour_GMT0)
12622 exit (1);
12623 unset_TZ ();
12624 if (localtime (&now)->tm_hour != hour_unset)
12625 exit (1);
12626 exit (0);
503d2be0
AS
12627}
12628_ACEOF
ae1362a3
AS
12629if ac_fn_c_try_run "$LINENO"; then :
12630 emacs_cv_localtime_cache=no
12631else
12632 emacs_cv_localtime_cache=yes
12633fi
12634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12635 conftest.$ac_objext conftest.beam conftest.$ac_ext
12636fi
12637
12638else
12639 # If we lack tzset, report that localtime does not cache TZ,
12640 # since we can't invalidate the cache if we don't have tzset.
12641 emacs_cv_localtime_cache=no
12642fi
12643fi
12644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
12645$as_echo "$emacs_cv_localtime_cache" >&6; }
12646if test $emacs_cv_localtime_cache = yes; then
12647
12648$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
12649
12650fi
12651
12652if test "x$HAVE_TIMEVAL" = xyes; then
12653 for ac_func in gettimeofday
12654do :
12655 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
12656if test "x$ac_cv_func_gettimeofday" = x""yes; then :
12657 cat >>confdefs.h <<_ACEOF
12658#define HAVE_GETTIMEOFDAY 1
12659_ACEOF
12660
12661fi
12662done
12663
12664 if test $ac_cv_func_gettimeofday = yes; then
12665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
12666$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
12667if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
12668 $as_echo_n "(cached) " >&6
12669else
12670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12671/* end confdefs.h. */
12672
12673#ifdef TIME_WITH_SYS_TIME
12674#include <sys/time.h>
12675#include <time.h>
12676#else
12677#ifdef HAVE_SYS_TIME_H
12678#include <sys/time.h>
12679#else
12680#include <time.h>
12681#endif
12682#endif
12683int
12684main ()
12685{
12686struct timeval time;
12687 gettimeofday (&time, 0);
12688 ;
12689 return 0;
12690}
12691_ACEOF
12692if ac_fn_c_try_compile "$LINENO"; then :
12693 emacs_cv_gettimeofday_two_arguments=yes
e9a63f04 12694else
ae1362a3 12695 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 12696fi
e9a63f04 12697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3
AS
12698fi
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
12700$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
12701 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 12702
ae1362a3 12703$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 12704
ae1362a3
AS
12705 fi
12706 fi
647847ea 12707fi
ca81d7a0 12708
ae1362a3
AS
12709ok_so_far=yes
12710ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
12711if test "x$ac_cv_func_socket" = x""yes; then :
12712
bf89cb4d 12713else
ae1362a3
AS
12714 ok_so_far=no
12715fi
503d2be0 12716
ae1362a3
AS
12717if test $ok_so_far = yes; then
12718 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
12719if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
647847ea 12720
ae1362a3
AS
12721else
12722 ok_so_far=no
647847ea
DL
12723fi
12724
c0d27fcc 12725
c0d27fcc 12726fi
ae1362a3
AS
12727if test $ok_so_far = yes; then
12728 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
12729if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
bf89cb4d 12730
ae1362a3
AS
12731else
12732 ok_so_far=no
c0d27fcc 12733fi
ca81d7a0 12734
19650fd6 12735
647847ea 12736fi
ae1362a3 12737if test $ok_so_far = yes; then
ca81d7a0 12738
ae1362a3 12739$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
ca81d7a0 12740
647847ea 12741fi
c0d27fcc 12742
ae1362a3
AS
12743for ac_header in sys/ioctl.h
12744do :
12745 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
12746if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 12747 cat >>confdefs.h <<_ACEOF
ae1362a3 12748#define HAVE_SYS_IOCTL_H 1
c0d27fcc 12749_ACEOF
647847ea 12750
73b77ee5 12751fi
c0d27fcc 12752
503d2be0 12753done
73b77ee5 12754
c0d27fcc 12755
ae1362a3 12756if test -f /usr/lpp/X11/bin/smt.exp; then
edfaf76d 12757
ae1362a3 12758$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
0ca10bb7 12759
ae1362a3 12760fi
fa0b693c 12761
ae1362a3
AS
12762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
12763$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
12764if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
12765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12766$as_echo "yes" >&6; }
19650fd6 12767
ae1362a3 12768$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
0ca10bb7 12769
ae1362a3
AS
12770else
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12772$as_echo "no" >&6; }
12773fi
12774
12775ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12776if test "x$ac_cv_type_pid_t" = x""yes; then :
ca81d7a0 12777
bf89cb4d 12778else
0ca10bb7 12779
ae1362a3
AS
12780cat >>confdefs.h <<_ACEOF
12781#define pid_t int
12782_ACEOF
12783
503d2be0 12784fi
0ca10bb7 12785
ae1362a3
AS
12786for ac_header in vfork.h
12787do :
12788 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12789if test "x$ac_cv_header_vfork_h" = x""yes; then :
12790 cat >>confdefs.h <<_ACEOF
12791#define HAVE_VFORK_H 1
12792_ACEOF
12793
bf89cb4d 12794fi
ae1362a3
AS
12795
12796done
12797
12798for ac_func in fork vfork
12799do :
12800 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12801ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12802if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
c0d27fcc 12803 cat >>confdefs.h <<_ACEOF
e9a63f04 12804#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12805_ACEOF
503d2be0 12806
fa0b693c 12807fi
503d2be0 12808done
fa0b693c 12809
503d2be0 12810if test "x$ac_cv_func_fork" = xyes; then
ae1362a3 12811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
e9a63f04 12812$as_echo_n "checking for working fork... " >&6; }
ae1362a3 12813if test "${ac_cv_func_fork_works+set}" = set; then :
e9a63f04 12814 $as_echo_n "(cached) " >&6
fa0b693c 12815else
ae1362a3 12816 if test "$cross_compiling" = yes; then :
503d2be0
AS
12817 ac_cv_func_fork_works=cross
12818else
ae1362a3 12819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
12820/* end confdefs.h. */
12821$ac_includes_default
12822int
12823main ()
12824{
12825
12826 /* By Ruediger Kuhlmann. */
12827 return fork () < 0;
12828
12829 ;
12830 return 0;
12831}
503d2be0 12832_ACEOF
ae1362a3 12833if ac_fn_c_try_run "$LINENO"; then :
503d2be0
AS
12834 ac_cv_func_fork_works=yes
12835else
ae1362a3 12836 ac_cv_func_fork_works=no
503d2be0 12837fi
ae1362a3
AS
12838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12839 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 12840fi
ca81d7a0 12841
503d2be0 12842fi
ae1362a3 12843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
e9a63f04 12844$as_echo "$ac_cv_func_fork_works" >&6; }
503d2be0 12845
6bae0ccf
DL
12846else
12847 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
12848fi
12849if test "x$ac_cv_func_fork_works" = xcross; then
12850 case $host in
12851 *-*-amigaos* | *-*-msdosdjgpp*)
12852 # Override, as these systems have only a dummy fork() stub
12853 ac_cv_func_fork_works=no
12854 ;;
12855 *)
12856 ac_cv_func_fork_works=yes
12857 ;;
12858 esac
ae1362a3 12859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
e9a63f04 12860$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 12861fi
73b77ee5 12862ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 12863if test "x$ac_cv_func_vfork" = xyes; then
ae1362a3 12864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
e9a63f04 12865$as_echo_n "checking for working vfork... " >&6; }
ae1362a3 12866if test "${ac_cv_func_vfork_works+set}" = set; then :
e9a63f04 12867 $as_echo_n "(cached) " >&6
503d2be0 12868else
ae1362a3 12869 if test "$cross_compiling" = yes; then :
503d2be0 12870 ac_cv_func_vfork_works=cross
fa0b693c 12871else
ae1362a3 12872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12873/* end confdefs.h. */
73b77ee5 12874/* Thanks to Paul Eggert for this test. */
ca81d7a0 12875$ac_includes_default
19650fd6 12876#include <sys/wait.h>
f053c89f 12877#ifdef HAVE_VFORK_H
503d2be0 12878# include <vfork.h>
73b77ee5
GM
12879#endif
12880/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
12881 argument registers are propagated back to the parent. The compiler
12882 is told about this with #include <vfork.h>, but some compilers
12883 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12884 static variable whose address is put into a register that is
12885 clobbered by the vfork. */
19650fd6 12886static void
fa0b693c 12887#ifdef __cplusplus
73b77ee5 12888sparc_address_test (int arg)
503d2be0 12889# else
73b77ee5 12890sparc_address_test (arg) int arg;
fa0b693c 12891#endif
fa0b693c 12892{
73b77ee5
GM
12893 static pid_t child;
12894 if (!child) {
12895 child = vfork ();
12896 if (child < 0) {
12897 perror ("vfork");
12898 _exit(2);
12899 }
12900 if (!child) {
12901 arg = getpid();
12902 write(-1, "", 0);
12903 _exit (arg);
12904 }
12905 }
12906}
503d2be0
AS
12907
12908int
12909main ()
12910{
73b77ee5
GM
12911 pid_t parent = getpid ();
12912 pid_t child;
fa0b693c 12913
19650fd6 12914 sparc_address_test (0);
fa0b693c 12915
73b77ee5 12916 child = vfork ();
fa0b693c 12917
73b77ee5 12918 if (child == 0) {
503d2be0
AS
12919 /* Here is another test for sparc vfork register problems. This
12920 test uses lots of local variables, at least as many local
12921 variables as main has allocated so far including compiler
12922 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12923 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12924 reuse the register of parent for one of the local variables,
12925 since it will think that parent can't possibly be used any more
12926 in this routine. Assigning to the local variable will thus
12927 munge parent in the parent process. */
73b77ee5
GM
12928 pid_t
12929 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12930 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12931 /* Convince the compiler that p..p7 are live; otherwise, it might
12932 use the same hardware register for all 8 local variables. */
12933 if (p != p1 || p != p2 || p != p3 || p != p4
12934 || p != p5 || p != p6 || p != p7)
12935 _exit(1);
fa0b693c 12936
503d2be0
AS
12937 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12938 from child file descriptors. If the child closes a descriptor
12939 before it execs or exits, this munges the parent's descriptor
12940 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
12941 _exit(close(fileno(stdout)) != 0);
12942 } else {
12943 int status;
12944 struct stat st;
12945
12946 while (wait(&status) != child)
12947 ;
ca81d7a0 12948 return (
73b77ee5
GM
12949 /* Was there some problem with vforking? */
12950 child < 0
12951
12952 /* Did the child fail? (This shouldn't happen.) */
12953 || status
12954
12955 /* Did the vfork/compiler bug occur? */
12956 || parent != getpid()
fa0b693c 12957
73b77ee5
GM
12958 /* Did the file descriptor bug occur? */
12959 || fstat(fileno(stdout), &st) != 0
12960 );
12961 }
12962}
503d2be0 12963_ACEOF
ae1362a3 12964if ac_fn_c_try_run "$LINENO"; then :
73b77ee5 12965 ac_cv_func_vfork_works=yes
fa0b693c 12966else
ae1362a3 12967 ac_cv_func_vfork_works=no
503d2be0 12968fi
ae1362a3
AS
12969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12970 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa0b693c 12971fi
ca81d7a0 12972
fa0b693c 12973fi
ae1362a3 12974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
e9a63f04 12975$as_echo "$ac_cv_func_vfork_works" >&6; }
fa0b693c 12976
503d2be0
AS
12977fi;
12978if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 12979 ac_cv_func_vfork_works=$ac_cv_func_vfork
ae1362a3 12980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
e9a63f04 12981$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
12982fi
12983
503d2be0
AS
12984if test "x$ac_cv_func_vfork_works" = xyes; then
12985
ae1362a3 12986$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
503d2be0
AS
12987
12988else
12989
ae1362a3 12990$as_echo "#define vfork fork" >>confdefs.h
fa0b693c
GM
12991
12992fi
503d2be0
AS
12993if test "x$ac_cv_func_fork_works" = xyes; then
12994
ae1362a3 12995$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fa0b693c 12996
503d2be0 12997fi
647847ea 12998
c0d27fcc 12999
ae1362a3 13000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
e9a63f04 13001$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
ae1362a3 13002if test "${emacs_cv_langinfo_codeset+set}" = set; then :
e9a63f04 13003 $as_echo_n "(cached) " >&6
6a3a24fa 13004else
ae1362a3 13005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13006/* end confdefs.h. */
6a3a24fa
JD
13007#include <langinfo.h>
13008int
13009main ()
13010{
13011char* cs = nl_langinfo(CODESET);
0ca10bb7
RC
13012 ;
13013 return 0;
13014}
13015_ACEOF
ae1362a3
AS
13016if ac_fn_c_try_link "$LINENO"; then :
13017 emacs_cv_langinfo_codeset=yes
bf89cb4d 13018else
ae1362a3 13019 emacs_cv_langinfo_codeset=no
0ca10bb7 13020fi
ae1362a3
AS
13021rm -f core conftest.err conftest.$ac_objext \
13022 conftest$ac_exeext conftest.$ac_ext
e9a63f04 13023
ae1362a3
AS
13024fi
13025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
13026$as_echo "$emacs_cv_langinfo_codeset" >&6; }
13027if test $emacs_cv_langinfo_codeset = yes; then
bf89cb4d 13028
ae1362a3 13029$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
e9a63f04 13030
8730a8da 13031fi
dc2933eb 13032
ae1362a3
AS
13033ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13034if test "x$ac_cv_type_size_t" = x""yes; then :
503d2be0 13035
c0d27fcc
MR
13036cat >>confdefs.h <<_ACEOF
13037#define HAVE_SIZE_T 1
13038_ACEOF
13039
8730a8da
DL
13040
13041fi
13042
c0d27fcc 13043
ae1362a3 13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
e9a63f04 13045$as_echo_n "checking for mbstate_t... " >&6; }
ae1362a3 13046if test "${ac_cv_type_mbstate_t+set}" = set; then :
e9a63f04 13047 $as_echo_n "(cached) " >&6
973a76b1 13048else
ae1362a3 13049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13050/* end confdefs.h. */
973a76b1
DL
13051$ac_includes_default
13052# include <wchar.h>
13053int
13054main ()
13055{
13056mbstate_t x; return sizeof x;
13057 ;
13058 return 0;
13059}
13060_ACEOF
ae1362a3 13061if ac_fn_c_try_compile "$LINENO"; then :
973a76b1
DL
13062 ac_cv_type_mbstate_t=yes
13063else
ae1362a3 13064 ac_cv_type_mbstate_t=no
973a76b1 13065fi
ca81d7a0 13066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 13067fi
ae1362a3 13068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
e9a63f04 13069$as_echo "$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
13070 if test $ac_cv_type_mbstate_t = yes; then
13071
ae1362a3 13072$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
973a76b1
DL
13073
13074 else
13075
ae1362a3 13076$as_echo "#define mbstate_t int" >>confdefs.h
973a76b1
DL
13077
13078 fi
13079
ae1362a3 13080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
e9a63f04 13081$as_echo_n "checking for C restrict keyword... " >&6; }
ae1362a3 13082if test "${emacs_cv_c_restrict+set}" = set; then :
e9a63f04 13083 $as_echo_n "(cached) " >&6
22044edf 13084else
ae1362a3 13085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13086/* end confdefs.h. */
22044edf
DL
13087void fred (int *restrict x);
13088int
13089main ()
13090{
b936fae4 13091
22044edf
DL
13092 ;
13093 return 0;
13094}
c0d27fcc 13095_ACEOF
ae1362a3 13096if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13097 emacs_cv_c_restrict=yes
13098else
ae1362a3 13099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13100/* end confdefs.h. */
22044edf
DL
13101void fred (int *__restrict x);
13102int
13103main ()
13104{
c0d27fcc 13105
22044edf
DL
13106 ;
13107 return 0;
13108}
c0d27fcc 13109_ACEOF
ae1362a3 13110if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13111 emacs_cv_c_restrict=__restrict
13112else
ae1362a3 13113 emacs_cv_c_restrict=no
ba4481b5 13114fi
ca81d7a0 13115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13116fi
ca81d7a0 13117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13118fi
ae1362a3 13119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
e9a63f04 13120$as_echo "$emacs_cv_c_restrict" >&6; }
22044edf
DL
13121case "$emacs_cv_c_restrict" in
13122 yes) emacs_restrict=restrict;;
13123 no) emacs_restrict="";;
13124 *) emacs_restrict="$emacs_cv_c_restrict";;
13125esac
13126if test "$emacs_restrict" != __restrict; then
b936fae4 13127
22044edf
DL
13128cat >>confdefs.h <<_ACEOF
13129#define __restrict $emacs_restrict
c0d27fcc 13130_ACEOF
ba4481b5
DL
13131
13132fi
ba4481b5 13133
ae1362a3 13134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
e9a63f04 13135$as_echo_n "checking for C restricted array declarations... " >&6; }
ae1362a3 13136if test "${emacs_cv_c_restrict_arr+set}" = set; then :
e9a63f04 13137 $as_echo_n "(cached) " >&6
22044edf 13138else
ae1362a3 13139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13140/* end confdefs.h. */
22044edf
DL
13141void fred (int x[__restrict]);
13142int
13143main ()
13144{
b936fae4 13145
22044edf
DL
13146 ;
13147 return 0;
13148}
c0d27fcc 13149_ACEOF
ae1362a3 13150if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13151 emacs_cv_c_restrict_arr=yes
13152else
ae1362a3 13153 emacs_cv_c_restrict_arr=no
ba4481b5 13154fi
ca81d7a0 13155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 13156fi
ae1362a3 13157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
e9a63f04 13158$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22044edf 13159if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 13160
ae1362a3 13161$as_echo "#define __restrict_arr __restrict" >>confdefs.h
ba4481b5 13162
ba4481b5
DL
13163fi
13164
c0d27fcc 13165
c0d27fcc 13166
22044edf
DL
13167# Set up the CFLAGS for real compilation, so we can substitute it.
13168CFLAGS="$REAL_CFLAGS"
13169CPPFLAGS="$REAL_CPPFLAGS"
13170
9978c06c
CY
13171## Hack to detect a buggy GCC version.
13172if test "x$GCC" = xyes \
13173 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
13174 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
13175 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
ae1362a3 13176 as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
9978c06c
CY
13177fi
13178
22044edf
DL
13179#### Find out which version of Emacs this is.
13180version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
13181 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
13182if test x"${version}" = x; then
ae1362a3 13183 as_fn_error $? "can't find current emacs version in \`${srcdir}/lisp/version.el'." "$LINENO" 5
22044edf 13184fi
879de935 13185if test x"${version}" != x"$PACKAGE_VERSION"; then
ae1362a3 13186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&5
879de935
KR
13187$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&2;}
13188fi
22044edf
DL
13189
13190### Specify what sort of things we'll be editing into Makefile and config.h.
13191### Use configuration here uncanonicalized to avoid exceeding size limits.
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
6a3a24fa 13224
06b62770
AR
13225
13226
13227
48fad8e8
DN
13228
13229
5e159d07
CY
13230
13231
edfda783 13232
91231421 13233
22044edf
DL
13234
13235
13236cat >>confdefs.h <<_ACEOF
13237#define EMACS_CONFIGURATION "${canonical}"
13238_ACEOF
13239
13240
13241cat >>confdefs.h <<_ACEOF
13242#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
13243_ACEOF
13244
13245
13246cat >>confdefs.h <<_ACEOF
13247#define config_machfile "${machfile}"
13248_ACEOF
13249
13250
13251cat >>confdefs.h <<_ACEOF
13252#define config_opsysfile "${opsysfile}"
13253_ACEOF
13254
13255
13256cat >>confdefs.h <<_ACEOF
13257#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
13258_ACEOF
13259
13260
13261cat >>confdefs.h <<_ACEOF
13262#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
13263_ACEOF
13264
13265
13266cat >>confdefs.h <<_ACEOF
13267#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
13268_ACEOF
13269
13270
13271cat >>confdefs.h <<_ACEOF
13272#define UNEXEC_SRC ${UNEXEC_SRC}
13273_ACEOF
13274
13275
13276if test "${HAVE_X_WINDOWS}" = "yes" ; then
13277
ae1362a3 13278$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
22044edf
DL
13279
13280fi
13281if test "${USE_X_TOOLKIT}" != "none" ; then
13282
ae1362a3 13283$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
22044edf 13284
39dd4d52 13285 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5 13286
ae1362a3 13287$as_echo "#define USE_LUCID 1" >>confdefs.h
73d798d5 13288
39dd4d52 13289 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5 13290
ae1362a3 13291$as_echo "#define USE_MOTIF 1" >>confdefs.h
73d798d5
SM
13292
13293 fi
22044edf
DL
13294fi
13295if test "${HAVE_X11}" = "yes" ; then
13296
ae1362a3 13297$as_echo "#define HAVE_X11 1" >>confdefs.h
22044edf 13298
22044edf
DL
13299fi
13300if test "${HAVE_MENUS}" = "yes" ; then
13301
ae1362a3 13302$as_echo "#define HAVE_MENUS 1" >>confdefs.h
22044edf
DL
13303
13304fi
13305if test "${GNU_MALLOC}" = "yes" ; then
13306
ae1362a3 13307$as_echo "#define GNU_MALLOC 1" >>confdefs.h
22044edf
DL
13308
13309fi
13310if test "${REL_ALLOC}" = "yes" ; then
13311
ae1362a3 13312$as_echo "#define REL_ALLOC 1" >>confdefs.h
22044edf
DL
13313
13314fi
13315
13316
13317
c0d27fcc 13318
ba4481b5 13319#### Report on what we decided to do.
488dd4c4
JD
13320#### Report GTK as a toolkit, even if it doesn't use Xt.
13321#### It makes printing result more understandable as using GTK sets
13322#### toolkit_scroll_bars to yes by default.
13323if test "${HAVE_GTK}" = "yes"; then
13324 USE_X_TOOLKIT=GTK
13325fi
13326
ba4481b5
DL
13327echo "
13328Configured for \`${canonical}'.
13329
13330 Where should the build process find the source code? ${srcdir}
13331 What operating system and machine description files should Emacs use?
13332 \`${opsysfile}' and \`${machfile}'
13333 What compiler should emacs be built with? ${CC} ${CFLAGS}
13334 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 13335 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 13336 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 13337 What window system should Emacs use? ${window_system}
8e967cf7 13338 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
13339
13340if test -n "${x_includes}"; then
13341echo " Where do we find X Windows header files? ${x_includes}"
13342else
13343echo " Where do we find X Windows header files? Standard dirs"
13344fi
13345if test -n "${x_libraries}"; then
13346echo " Where do we find X Windows libraries? ${x_libraries}"
13347else
13348echo " Where do we find X Windows libraries? Standard dirs"
13349fi
13350
13351echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
13352echo " Does Emacs use -lXpm? ${HAVE_XPM}"
13353echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
13354echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 13355echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 13356echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 13357echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 13358echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 13359echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
637fa988 13360echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
2ee27f27 13361
edfda783
AR
13362echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
13363echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
13364echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
13365echo " Does Emacs use -lxft? ${HAVE_XFT}"
13366
8d87199b 13367echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
13368echo
13369
d0098f13
JD
13370if test $USE_XASSERTS = yes; then
13371 echo " Compiling with asserts turned on."
d0098f13 13372 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 13373fi
05cf15c6 13374
ca34d75a
JD
13375echo
13376
06b62770
AR
13377if test "$HAVE_NS" = "yes"; then
13378 echo
13379 echo "You must run \"make install\" in order to test the built application.
13380The installed application will go to nextstep/Emacs.app and can be
13381run or moved from there."
13382 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
13383 echo "The application will be fully self-contained."
13384 else
13385 echo "The lisp resources for the application will be installed under ${prefix}.
13386You may need to run \"make install\" with sudo. The application will fail
13387to run if these resources are not installed."
13388 fi
13389 echo
13390fi
13391
05cf15c6 13392
ba4481b5
DL
13393# Remove any trailing slashes in these variables.
13394test "${prefix}" != NONE &&
13395 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
13396test "${exec_prefix}" != NONE &&
13397 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
13398
8acdcf6f
GM
13399# Now get this: Some word that is part of the ${srcdir} directory name
13400# or the ${configuration} value might, just might, happen to be an
13401# identifier like `sun4' or `i386' or something, and be predefined by
13402# the C preprocessor to some helpful value like 1, or maybe the empty
13403# string. Needless to say consequent macro substitutions are less
13404# than conducive to the makefile finding the correct directory.
ae1362a3 13405cpp_undefs="`echo $srcdir $configuration $canonical unix |
8acdcf6f
GM
13406 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
13407 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
13408
d0e9bfd2
GM
13409## Check if the C preprocessor will convert `..' to `. .'. If so, set
13410## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
13411## from Makefile.c can correctly provide the arg `-traditional' to the
13412## C preprocessor.
13413
ae1362a3 13414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13415/* end confdefs.h. */
d0e9bfd2 13416yes..yes
503d2be0 13417_ACEOF
d0e9bfd2 13418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3 13419 $EGREP "yes..yes" >/dev/null 2>&1; then :
d0e9bfd2
GM
13420 CPP_NEED_TRADITIONAL=no
13421else
d0e9bfd2
GM
13422 CPP_NEED_TRADITIONAL=yes
13423fi
13424rm -f conftest*
13425
c0d27fcc 13426
f657c21b 13427ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
ca81d7a0
JD
13428
13429ac_config_commands="$ac_config_commands default"
13430
503d2be0 13431cat >confcache <<\_ACEOF
ba4481b5
DL
13432# This file is a shell script that caches the results of configure
13433# tests run on this system so they can be shared between configure
503d2be0
AS
13434# scripts and configure runs, see configure's option --config-cache.
13435# It is not useful on other systems. If it contains results you don't
13436# want to keep, you may remove or edit it.
ba4481b5 13437#
503d2be0
AS
13438# config.status only pays attention to the cache file if you give it
13439# the --recheck option to rerun configure.
ba4481b5 13440#
6bae0ccf 13441# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
13442# loading this file, other *unset* `ac_cv_foo' will be assigned the
13443# following values.
13444
13445_ACEOF
13446
ba4481b5
DL
13447# The following way of writing the cache mishandles newlines in values,
13448# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 13449# So, we kill variables containing newlines.
ba4481b5
DL
13450# Ultrix sh set writes to stderr and can't be redirected directly,
13451# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
13452(
13453 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13454 eval ac_val=\$$ac_var
13455 case $ac_val in #(
13456 *${as_nl}*)
13457 case $ac_var in #(
ae1362a3
AS
13458 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13459$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
13460 esac
13461 case $ac_var in #(
13462 _ | IFS | as_nl) ;; #(
e9a63f04 13463 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
ae1362a3 13464 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
13465 esac ;;
13466 esac
13467 done
13468
503d2be0 13469 (set) 2>&1 |
ca81d7a0
JD
13470 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13471 *${as_nl}ac_space=\ *)
ae1362a3
AS
13472 # `set' does not quote correctly, so add quotes: double-quote
13473 # substitution turns \\\\ into \\, and sed turns \\ into \.
503d2be0 13474 sed -n \
edfaf76d
LK
13475 "s/'/'\\\\''/g;
13476 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 13477 ;; #(
503d2be0
AS
13478 *)
13479 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 13480 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 13481 ;;
ca81d7a0
JD
13482 esac |
13483 sort
13484) |
503d2be0 13485 sed '
ca81d7a0 13486 /^ac_cv_env_/b end
503d2be0 13487 t clear
ca81d7a0 13488 :clear
503d2be0
AS
13489 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13490 t end
ca81d7a0
JD
13491 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13492 :end' >>confcache
13493if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13494 if test -w "$cache_file"; then
13495 test "x$cache_file" != "x/dev/null" &&
ae1362a3 13496 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
e9a63f04 13497$as_echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 13498 cat confcache >$cache_file
ba4481b5 13499 else
ae1362a3 13500 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
e9a63f04 13501$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
13502 fi
13503fi
13504rm -f confcache
13505
ba4481b5
DL
13506test "x$prefix" = xNONE && prefix=$ac_default_prefix
13507# Let make expand exec_prefix.
13508test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13509
ba4481b5
DL
13510DEFS=-DHAVE_CONFIG_H
13511
6bae0ccf
DL
13512ac_libobjs=
13513ac_ltlibobjs=
ae1362a3 13514U=
6bae0ccf
DL
13515for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13516 # 1. Remove the extension, and $U if already installed.
ca81d7a0 13517 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 13518 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
13519 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13520 # will be set to the directory where LIBOBJS objects are built.
ae1362a3
AS
13521 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13522 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
13523done
13524LIBOBJS=$ac_libobjs
13525
13526LTLIBOBJS=$ac_ltlibobjs
13527
13528
c0d27fcc 13529
ba4481b5 13530: ${CONFIG_STATUS=./config.status}
e9a63f04 13531ac_write_fail=0
503d2be0
AS
13532ac_clean_files_save=$ac_clean_files
13533ac_clean_files="$ac_clean_files $CONFIG_STATUS"
ae1362a3 13534{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 13535$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
ae1362a3
AS
13536as_write_fail=0
13537cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 13538#! $SHELL
c0d27fcc 13539# Generated by $as_me.
ba4481b5 13540# Run this file to recreate the current configuration.
ba4481b5 13541# Compiler output produced by configure, useful for debugging
503d2be0 13542# configure, is in config.log if it exists.
ba4481b5 13543
503d2be0 13544debug=false
19650fd6
AS
13545ac_cs_recheck=false
13546ac_cs_silent=false
bf89cb4d 13547
ae1362a3
AS
13548SHELL=\${CONFIG_SHELL-$SHELL}
13549export SHELL
13550_ASEOF
13551cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13552## -------------------- ##
13553## M4sh Initialization. ##
13554## -------------------- ##
c0d27fcc 13555
f053c89f
CY
13556# Be more Bourne compatible
13557DUALCASE=1; export DUALCASE # for MKS sh
ae1362a3 13558if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
13559 emulate sh
13560 NULLCMD=:
e9a63f04 13561 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
13562 # is contrary to our usage. Disable this feature.
13563 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
13564 setopt NO_GLOB_SUBST
13565else
ae1362a3
AS
13566 case `(set -o) 2>/dev/null` in #(
13567 *posix*) :
13568 set -o posix ;; #(
13569 *) :
13570 ;;
f053c89f 13571esac
503d2be0 13572fi
f053c89f
CY
13573
13574
e9a63f04
GM
13575as_nl='
13576'
13577export as_nl
13578# Printing a long string crashes Solaris 7 /usr/bin/printf.
13579as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13580as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13581as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
ae1362a3
AS
13582# Prefer a ksh shell builtin over an external printf program on Solaris,
13583# but without wasting forks for bash or zsh.
13584if test -z "$BASH_VERSION$ZSH_VERSION" \
13585 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13586 as_echo='print -r --'
13587 as_echo_n='print -rn --'
13588elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
13589 as_echo='printf %s\n'
13590 as_echo_n='printf %s'
13591else
13592 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13593 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13594 as_echo_n='/usr/ucb/echo -n'
7bbec45b 13595 else
e9a63f04
GM
13596 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13597 as_echo_n_body='eval
13598 arg=$1;
ae1362a3 13599 case $arg in #(
e9a63f04
GM
13600 *"$as_nl"*)
13601 expr "X$arg" : "X\\(.*\\)$as_nl";
13602 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13603 esac;
13604 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13605 '
13606 export as_echo_n_body
13607 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 13608 fi
e9a63f04
GM
13609 export as_echo_body
13610 as_echo='sh -c $as_echo_body as_echo'
13611fi
13612
13613# The user is always right.
13614if test "${PATH_SEPARATOR+set}" != set; then
13615 PATH_SEPARATOR=:
13616 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13617 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13618 PATH_SEPARATOR=';'
13619 }
503d2be0
AS
13620fi
13621
6bae0ccf 13622
ca81d7a0
JD
13623# IFS
13624# We need space, tab and new line, in precisely that order. Quoting is
13625# there to prevent editors from complaining about space-tab.
13626# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13627# splitting by setting IFS to empty value.)
ca81d7a0
JD
13628IFS=" "" $as_nl"
13629
13630# Find who we are. Look in the path if we contain no directory separator.
ae1362a3 13631case $0 in #((
ca81d7a0
JD
13632 *[\\/]* ) as_myself=$0 ;;
13633 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13634for as_dir in $PATH
13635do
13636 IFS=$as_save_IFS
13637 test -z "$as_dir" && as_dir=.
ae1362a3
AS
13638 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13639 done
ca81d7a0
JD
13640IFS=$as_save_IFS
13641
13642 ;;
13643esac
13644# We did not find ourselves, most probably we were run as `sh COMMAND'
13645# in which case we are not to be found in the path.
13646if test "x$as_myself" = x; then
13647 as_myself=$0
13648fi
13649if test ! -f "$as_myself"; then
e9a63f04 13650 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ae1362a3 13651 exit 1
ca81d7a0
JD
13652fi
13653
ae1362a3
AS
13654# Unset variables that we do not need and which cause bugs (e.g. in
13655# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13656# suppresses any "Segmentation fault" message there. '((' could
13657# trigger a bug in pdksh 5.2.14.
13658for as_var in BASH_ENV ENV MAIL MAILPATH
13659do eval test x\${$as_var+set} = xset \
13660 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 13661done
6bae0ccf
DL
13662PS1='$ '
13663PS2='> '
13664PS4='+ '
13665
13666# NLS nuisances.
e9a63f04
GM
13667LC_ALL=C
13668export LC_ALL
13669LANGUAGE=C
13670export LANGUAGE
6bae0ccf 13671
ae1362a3
AS
13672# CDPATH.
13673(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13674
13675
13676# as_fn_error STATUS ERROR [LINENO LOG_FD]
13677# ----------------------------------------
13678# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13679# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
13680# script with STATUS, using 1 if that was 0.
13681as_fn_error ()
13682{
13683 as_status=$1; test $as_status -eq 0 && as_status=1
13684 if test "$4"; then
13685 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13686 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
13687 fi
13688 $as_echo "$as_me: error: $2" >&2
13689 as_fn_exit $as_status
13690} # as_fn_error
13691
13692
13693# as_fn_set_status STATUS
13694# -----------------------
13695# Set $? to STATUS, without forking.
13696as_fn_set_status ()
13697{
13698 return $1
13699} # as_fn_set_status
13700
13701# as_fn_exit STATUS
13702# -----------------
13703# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13704as_fn_exit ()
13705{
13706 set +e
13707 as_fn_set_status $1
13708 exit $1
13709} # as_fn_exit
13710
13711# as_fn_unset VAR
13712# ---------------
13713# Portably unset VAR.
13714as_fn_unset ()
13715{
13716 { eval $1=; unset $1;}
13717}
13718as_unset=as_fn_unset
13719# as_fn_append VAR VALUE
13720# ----------------------
13721# Append the text in VALUE to the end of the definition contained in VAR. Take
13722# advantage of any shell optimizations that allow amortized linear growth over
13723# repeated appends, instead of the typical quadratic growth present in naive
13724# implementations.
13725if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13726 eval 'as_fn_append ()
13727 {
13728 eval $1+=\$2
13729 }'
13730else
13731 as_fn_append ()
13732 {
13733 eval $1=\$$1\$2
13734 }
13735fi # as_fn_append
13736
13737# as_fn_arith ARG...
13738# ------------------
13739# Perform arithmetic evaluation on the ARGs, and store the result in the
13740# global $as_val. Take advantage of shells that can avoid forks. The arguments
13741# must be portable across $(()) and expr.
13742if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13743 eval 'as_fn_arith ()
13744 {
13745 as_val=$(( $* ))
13746 }'
13747else
13748 as_fn_arith ()
13749 {
13750 as_val=`expr "$@" || test $? -eq 1`
13751 }
13752fi # as_fn_arith
13753
13754
ca81d7a0
JD
13755if expr a : '\(a\)' >/dev/null 2>&1 &&
13756 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
13757 as_expr=expr
13758else
13759 as_expr=false
13760fi
13761
ca81d7a0 13762if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
13763 as_basename=basename
13764else
13765 as_basename=false
13766fi
c0d27fcc 13767
ae1362a3
AS
13768if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13769 as_dirname=dirname
13770else
13771 as_dirname=false
13772fi
c0d27fcc 13773
ca81d7a0 13774as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
13775$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13776 X"$0" : 'X\(//\)$' \| \
ca81d7a0 13777 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 13778$as_echo X/"$0" |
ca81d7a0
JD
13779 sed '/^.*\/\([^/][^/]*\)\/*$/{
13780 s//\1/
13781 q
13782 }
13783 /^X\/\(\/\/\)$/{
13784 s//\1/
13785 q
13786 }
13787 /^X\/\(\/\).*/{
13788 s//\1/
13789 q
13790 }
13791 s/.*/./; q'`
c0d27fcc 13792
ae1362a3
AS
13793# Avoid depending upon Character Ranges.
13794as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13795as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13796as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13797as_cr_digits='0123456789'
13798as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
13799
13800ECHO_C= ECHO_N= ECHO_T=
ae1362a3 13801case `echo -n x` in #(((((
ca81d7a0 13802-n*)
ae1362a3 13803 case `echo 'xy\c'` in
ca81d7a0 13804 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
ae1362a3
AS
13805 xy) ECHO_C='\c';;
13806 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13807 ECHO_T=' ';;
ca81d7a0
JD
13808 esac;;
13809*)
13810 ECHO_N='-n';;
c0d27fcc 13811esac
503d2be0
AS
13812
13813rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
13814if test -d conf$$.dir; then
13815 rm -f conf$$.dir/conf$$.file
13816else
13817 rm -f conf$$.dir
e9a63f04
GM
13818 mkdir conf$$.dir 2>/dev/null
13819fi
13820if (echo >conf$$.file) 2>/dev/null; then
13821 if ln -s conf$$.file conf$$ 2>/dev/null; then
13822 as_ln_s='ln -s'
13823 # ... but there are two gotchas:
13824 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13825 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13826 # In both cases, we have to default to `cp -p'.
13827 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13828 as_ln_s='cp -p'
13829 elif ln conf$$.file conf$$ 2>/dev/null; then
13830 as_ln_s=ln
13831 else
503d2be0 13832 as_ln_s='cp -p'
e9a63f04 13833 fi
503d2be0
AS
13834else
13835 as_ln_s='cp -p'
13836fi
ca81d7a0
JD
13837rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13838rmdir conf$$.dir 2>/dev/null
503d2be0 13839
ae1362a3
AS
13840
13841# as_fn_mkdir_p
13842# -------------
13843# Create "$as_dir" as a directory, including parents if necessary.
13844as_fn_mkdir_p ()
13845{
13846
13847 case $as_dir in #(
13848 -*) as_dir=./$as_dir;;
13849 esac
13850 test -d "$as_dir" || eval $as_mkdir_p || {
13851 as_dirs=
13852 while :; do
13853 case $as_dir in #(
13854 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13855 *) as_qdir=$as_dir;;
13856 esac
13857 as_dirs="'$as_qdir' $as_dirs"
13858 as_dir=`$as_dirname -- "$as_dir" ||
13859$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13860 X"$as_dir" : 'X\(//\)[^/]' \| \
13861 X"$as_dir" : 'X\(//\)$' \| \
13862 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13863$as_echo X"$as_dir" |
13864 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13865 s//\1/
13866 q
13867 }
13868 /^X\(\/\/\)[^/].*/{
13869 s//\1/
13870 q
13871 }
13872 /^X\(\/\/\)$/{
13873 s//\1/
13874 q
13875 }
13876 /^X\(\/\).*/{
13877 s//\1/
13878 q
13879 }
13880 s/.*/./; q'`
13881 test -d "$as_dir" && break
13882 done
13883 test -z "$as_dirs" || eval "mkdir $as_dirs"
13884 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
13885
13886
13887} # as_fn_mkdir_p
6bae0ccf 13888if mkdir -p . 2>/dev/null; then
ae1362a3 13889 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 13890else
edfaf76d 13891 test -d ./-p && rmdir ./-p
6bae0ccf
DL
13892 as_mkdir_p=false
13893fi
13894
f053c89f
CY
13895if test -x / >/dev/null 2>&1; then
13896 as_test_x='test -x'
ca81d7a0 13897else
f053c89f
CY
13898 if ls -dL / >/dev/null 2>&1; then
13899 as_ls_L_option=L
13900 else
13901 as_ls_L_option=
13902 fi
13903 as_test_x='
13904 eval sh -c '\''
13905 if test -d "$1"; then
e9a63f04 13906 test -d "$1/.";
f053c89f 13907 else
ae1362a3 13908 case $1 in #(
e9a63f04 13909 -*)set "./$1";;
f053c89f 13910 esac;
ae1362a3 13911 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
13912 ???[sx]*):;;*)false;;esac;fi
13913 '\'' sh
13914 '
ca81d7a0 13915fi
f053c89f 13916as_executable_p=$as_test_x
503d2be0 13917
c0d27fcc 13918# Sed expression to map a string onto a valid CPP name.
edfaf76d 13919as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
13920
13921# Sed expression to map a string onto a valid variable name.
edfaf76d 13922as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 13923
503d2be0 13924
503d2be0 13925exec 6>&1
ae1362a3
AS
13926## ----------------------------------- ##
13927## Main body of $CONFIG_STATUS script. ##
13928## ----------------------------------- ##
13929_ASEOF
13930test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 13931
ae1362a3
AS
13932cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
13933# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 13934# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
13935# values after options handling.
13936ac_log="
0f161c71 13937This file was extended by emacs $as_me 23.2.90, which was
ae1362a3 13938generated by GNU Autoconf 2.67. Invocation command line was
c0d27fcc
MR
13939
13940 CONFIG_FILES = $CONFIG_FILES
13941 CONFIG_HEADERS = $CONFIG_HEADERS
13942 CONFIG_LINKS = $CONFIG_LINKS
13943 CONFIG_COMMANDS = $CONFIG_COMMANDS
13944 $ $0 $@
13945
ca81d7a0
JD
13946on `(hostname || uname -n) 2>/dev/null | sed 1q`
13947"
13948
503d2be0
AS
13949_ACEOF
13950
ae1362a3
AS
13951case $ac_config_files in *"
13952"*) set x $ac_config_files; shift; ac_config_files=$*;;
13953esac
13954
13955case $ac_config_headers in *"
13956"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
13957esac
13958
13959
e9a63f04 13960cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 13961# Files that config.status was made for.
ca81d7a0
JD
13962config_files="$ac_config_files"
13963config_headers="$ac_config_headers"
13964config_commands="$ac_config_commands"
503d2be0 13965
ca81d7a0 13966_ACEOF
503d2be0 13967
e9a63f04 13968cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 13969ac_cs_usage="\
ae1362a3
AS
13970\`$as_me' instantiates files and other configuration actions
13971from templates according to the current configuration. Unless the files
13972and actions are specified as TAGs, all are instantiated by default.
503d2be0 13973
ae1362a3 13974Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
13975
13976 -h, --help print this help, then exit
f053c89f 13977 -V, --version print version number and configuration settings, then exit
ae1362a3
AS
13978 --config print configuration, then exit
13979 -q, --quiet, --silent
13980 do not print progress messages
503d2be0
AS
13981 -d, --debug don't remove temporary files
13982 --recheck update $as_me by reconfiguring in the same conditions
ae1362a3 13983 --file=FILE[:TEMPLATE]
e9a63f04 13984 instantiate the configuration file FILE
ae1362a3 13985 --header=FILE[:TEMPLATE]
e9a63f04 13986 instantiate the configuration header FILE
503d2be0
AS
13987
13988Configuration files:
13989$config_files
13990
13991Configuration headers:
13992$config_headers
13993
13994Configuration commands:
13995$config_commands
13996
ae1362a3 13997Report bugs to the package provider."
503d2be0 13998
ca81d7a0 13999_ACEOF
e9a63f04 14000cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ae1362a3 14001ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 14002ac_cs_version="\\
0f161c71 14003emacs config.status 23.2.90
ae1362a3
AS
14004configured by $0, generated by GNU Autoconf 2.67,
14005 with options \\"\$ac_cs_config\\"
503d2be0 14006
ae1362a3 14007Copyright (C) 2010 Free Software Foundation, Inc.
503d2be0
AS
14008This config.status script is free software; the Free Software Foundation
14009gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
14010
14011ac_pwd='$ac_pwd'
14012srcdir='$srcdir'
14013INSTALL='$INSTALL'
e9a63f04 14014test -n "\$AWK" || AWK=awk
c0d27fcc 14015_ACEOF
503d2be0 14016
e9a63f04
GM
14017cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14018# The default lists apply if the user does not specify any file.
503d2be0
AS
14019ac_need_defaults=:
14020while test $# != 0
ba4481b5 14021do
503d2be0 14022 case $1 in
ae1362a3 14023 --*=?*)
ca81d7a0
JD
14024 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14025 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
14026 ac_shift=:
14027 ;;
ae1362a3
AS
14028 --*=)
14029 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14030 ac_optarg=
14031 ac_shift=:
14032 ;;
ca81d7a0 14033 *)
6bae0ccf
DL
14034 ac_option=$1
14035 ac_optarg=$2
14036 ac_shift=shift
503d2be0 14037 ;;
503d2be0
AS
14038 esac
14039
6bae0ccf 14040 case $ac_option in
503d2be0 14041 # Handling of the options.
19650fd6
AS
14042 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14043 ac_cs_recheck=: ;;
ca81d7a0 14044 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 14045 $as_echo "$ac_cs_version"; exit ;;
ae1362a3
AS
14046 --config | --confi | --conf | --con | --co | --c )
14047 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 14048 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
14049 debug=: ;;
14050 --file | --fil | --fi | --f )
6bae0ccf 14051 $ac_shift
e9a63f04
GM
14052 case $ac_optarg in
14053 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
ae1362a3 14054 '') as_fn_error $? "missing file argument" ;;
e9a63f04 14055 esac
ae1362a3 14056 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
14057 ac_need_defaults=false;;
14058 --header | --heade | --head | --hea )
6bae0ccf 14059 $ac_shift
e9a63f04
GM
14060 case $ac_optarg in
14061 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14062 esac
ae1362a3 14063 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 14064 ac_need_defaults=false;;
ca81d7a0
JD
14065 --he | --h)
14066 # Conflict between --help and --header
ae1362a3
AS
14067 as_fn_error $? "ambiguous option: \`$1'
14068Try \`$0 --help' for more information.";;
ca81d7a0 14069 --help | --hel | -h )
e9a63f04 14070 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
14071 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14072 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14073 ac_cs_silent=: ;;
503d2be0
AS
14074
14075 # This is an error.
ae1362a3
AS
14076 -*) as_fn_error $? "unrecognized option: \`$1'
14077Try \`$0 --help' for more information." ;;
503d2be0 14078
ae1362a3 14079 *) as_fn_append ac_config_targets " $1"
ca81d7a0 14080 ac_need_defaults=false ;;
503d2be0 14081
ba4481b5 14082 esac
503d2be0 14083 shift
ba4481b5
DL
14084done
14085
19650fd6
AS
14086ac_configure_extra_args=
14087
14088if $ac_cs_silent; then
14089 exec 6>/dev/null
14090 ac_configure_extra_args="$ac_configure_extra_args --silent"
14091fi
14092
14093_ACEOF
e9a63f04 14094cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 14095if \$ac_cs_recheck; then
e9a63f04
GM
14096 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14097 shift
14098 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14099 CONFIG_SHELL='$SHELL'
ca81d7a0 14100 export CONFIG_SHELL
e9a63f04 14101 exec "\$@"
19650fd6
AS
14102fi
14103
503d2be0 14104_ACEOF
e9a63f04 14105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14106exec 5>>config.log
14107{
14108 echo
14109 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14110## Running $as_me. ##
14111_ASBOX
e9a63f04 14112 $as_echo "$ac_log"
ca81d7a0 14113} >&5
ba4481b5 14114
ca81d7a0 14115_ACEOF
e9a63f04 14116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14117#
ca81d7a0 14118# INIT-COMMANDS
503d2be0 14119#
8acdcf6f 14120GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 14121
c0d27fcc
MR
14122_ACEOF
14123
e9a63f04 14124cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14125
14126# Handling of arguments.
503d2be0
AS
14127for ac_config_target in $ac_config_targets
14128do
ca81d7a0
JD
14129 case $ac_config_target in
14130 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
14131 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14132 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
14133 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
14134 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
14135 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
14136 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
14137 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 14138 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 14139 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 14140 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
14141 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
14142 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14143
ae1362a3 14144 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 14145 esac
ba4481b5 14146done
503d2be0 14147
ca81d7a0 14148
503d2be0
AS
14149# If the user did not use the arguments to specify the items to instantiate,
14150# then the envvar interface is used. Set only those that are not.
14151# We use the long form for the default assignment because of an extremely
14152# bizarre bug on SunOS 4.1.3.
14153if $ac_need_defaults; then
14154 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14155 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14156 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 14157fi
503d2be0 14158
19650fd6 14159# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 14160# simply because there is no reason against having it here, and in addition,
19650fd6 14161# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
14162# Hook for its removal unless debugging.
14163# Note that there is a small window in which the directory will not be cleaned:
14164# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
14165$debug ||
14166{
ca81d7a0
JD
14167 tmp=
14168 trap 'exit_status=$?
14169 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14170' 0
ae1362a3 14171 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 14172}
503d2be0 14173# Create a (secure) tmp directory for tmp files.
19650fd6 14174
503d2be0 14175{
ca81d7a0 14176 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
14177 test -n "$tmp" && test -d "$tmp"
14178} ||
14179{
ca81d7a0
JD
14180 tmp=./conf$$-$RANDOM
14181 (umask 077 && mkdir "$tmp")
ae1362a3 14182} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 14183
e9a63f04
GM
14184# Set up the scripts for CONFIG_FILES section.
14185# No need to generate them if there are no CONFIG_FILES.
14186# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
14187if test -n "$CONFIG_FILES"; then
14188
7bbec45b 14189
ae1362a3
AS
14190ac_cr=`echo X | tr X '\015'`
14191# On cygwin, bash can eat \r inside `` if the user requested igncr.
14192# But we know of no other shell where ac_cr would be empty at this
14193# point, so we can use a bashism as a fallback.
14194if test "x$ac_cr" = x; then
14195 eval ac_cr=\$\'\\r\'
14196fi
e9a63f04
GM
14197ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14198if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
bf89cb4d 14199 ac_cs_awk_cr='\\r'
e9a63f04
GM
14200else
14201 ac_cs_awk_cr=$ac_cr
ca81d7a0 14202fi
503d2be0 14203
e9a63f04 14204echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 14205_ACEOF
503d2be0 14206
ca81d7a0 14207
e9a63f04
GM
14208{
14209 echo "cat >conf$$subs.awk <<_ACEOF" &&
14210 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14211 echo "_ACEOF"
14212} >conf$$subs.sh ||
ae1362a3
AS
14213 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14214ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ca81d7a0
JD
14215ac_delim='%!_!# '
14216for ac_last_try in false false false false false :; do
e9a63f04 14217 . ./conf$$subs.sh ||
ae1362a3 14218 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 14219
ae1362a3
AS
14220 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14221 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
14222 break
14223 elif $ac_last_try; then
ae1362a3 14224 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
14225 else
14226 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 14227 fi
ca81d7a0 14228done
e9a63f04
GM
14229rm -f conf$$subs.sh
14230
14231cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14232cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14233_ACEOF
14234sed -n '
14235h
14236s/^/S["/; s/!.*/"]=/
14237p
14238g
14239s/^[^!]*!//
14240:repl
14241t repl
14242s/'"$ac_delim"'$//
14243t delim
14244:nl
14245h
ae1362a3 14246s/\(.\{148\}\)..*/\1/
e9a63f04
GM
14247t more1
14248s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14249p
14250n
14251b repl
14252:more1
14253s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14254p
14255g
14256s/.\{148\}//
14257t nl
14258:delim
14259h
ae1362a3 14260s/\(.\{148\}\)..*/\1/
e9a63f04
GM
14261t more2
14262s/["\\]/\\&/g; s/^/"/; s/$/"/
14263p
14264b
14265:more2
14266s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14267p
14268g
14269s/.\{148\}//
14270t delim
14271' <conf$$subs.awk | sed '
14272/^[^""]/{
14273 N
14274 s/\n//
14275}
14276' >>$CONFIG_STATUS || ac_write_fail=1
14277rm -f conf$$subs.awk
14278cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14279_ACAWK
14280cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14281 for (key in S) S_is_set[key] = 1
14282 FS = "\a"
1e0093ea 14283
e9a63f04
GM
14284}
14285{
14286 line = $ 0
14287 nfields = split(line, field, "@")
14288 substed = 0
14289 len = length(field[1])
14290 for (i = 2; i < nfields; i++) {
14291 key = field[i]
14292 keylen = length(key)
14293 if (S_is_set[key]) {
14294 value = S[key]
14295 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14296 len += length(value) + length(field[++i])
14297 substed = 1
14298 } else
14299 len += 1 + keylen
14300 }
ba4481b5 14301
e9a63f04
GM
14302 print line
14303}
14304
14305_ACAWK
ca81d7a0 14306_ACEOF
e9a63f04
GM
14307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14308if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14309 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14310else
14311 cat
14312fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
ae1362a3 14313 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c0d27fcc 14314_ACEOF
ca81d7a0 14315
ae1362a3
AS
14316# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14317# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
ca81d7a0
JD
14318# trailing colons and then remove the whole line if VPATH becomes empty
14319# (actually we leave an empty line to preserve line numbers).
14320if test "x$srcdir" = x.; then
ae1362a3
AS
14321 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14322h
14323s///
14324s/^/:/
14325s/[ ]*$/:/
14326s/:\$(srcdir):/:/g
14327s/:\${srcdir}:/:/g
14328s/:@srcdir@:/:/g
14329s/^:*//
ca81d7a0 14330s/:*$//
ae1362a3
AS
14331x
14332s/\(=[ ]*\).*/\1/
14333G
14334s/\n//
ca81d7a0
JD
14335s/^[^=]*=[ ]*$//
14336}'
14337fi
14338
e9a63f04 14339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14340fi # test -n "$CONFIG_FILES"
14341
e9a63f04
GM
14342# Set up the scripts for CONFIG_HEADERS section.
14343# No need to generate them if there are no CONFIG_HEADERS.
14344# This happens for instance with `./config.status Makefile'.
14345if test -n "$CONFIG_HEADERS"; then
14346cat >"$tmp/defines.awk" <<\_ACAWK ||
14347BEGIN {
14348_ACEOF
dc2933eb 14349
e9a63f04
GM
14350# Transform confdefs.h into an awk script `defines.awk', embedded as
14351# here-document in config.status, that substitutes the proper values into
14352# config.h.in to produce config.h.
14353
14354# Create a delimiter string that does not exist in confdefs.h, to ease
14355# handling of long lines.
14356ac_delim='%!_!# '
14357for ac_last_try in false false :; do
14358 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14359 if test -z "$ac_t"; then
14360 break
14361 elif $ac_last_try; then
ae1362a3 14362 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
14363 else
14364 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14365 fi
14366done
14367
14368# For the awk script, D is an array of macro values keyed by name,
14369# likewise P contains macro parameters if any. Preserve backslash
14370# newline sequences.
14371
14372ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14373sed -n '
14374s/.\{148\}/&'"$ac_delim"'/g
14375t rset
14376:rset
14377s/^[ ]*#[ ]*define[ ][ ]*/ /
14378t def
14379d
14380:def
14381s/\\$//
14382t bsnl
14383s/["\\]/\\&/g
14384s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14385D["\1"]=" \3"/p
14386s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14387d
14388:bsnl
14389s/["\\]/\\&/g
14390s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14391D["\1"]=" \3\\\\\\n"\\/p
14392t cont
14393s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14394t cont
14395d
14396:cont
14397n
14398s/.\{148\}/&'"$ac_delim"'/g
14399t clear
14400:clear
14401s/\\$//
14402t bsnlc
14403s/["\\]/\\&/g; s/^/"/; s/$/"/p
14404d
14405:bsnlc
14406s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14407b cont
14408' <confdefs.h | sed '
14409s/'"$ac_delim"'/"\\\
14410"/g' >>$CONFIG_STATUS || ac_write_fail=1
14411
14412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14413 for (key in D) D_is_set[key] = 1
14414 FS = "\a"
14415}
14416/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14417 line = \$ 0
14418 split(line, arg, " ")
14419 if (arg[1] == "#") {
14420 defundef = arg[2]
14421 mac1 = arg[3]
14422 } else {
14423 defundef = substr(arg[1], 2)
14424 mac1 = arg[2]
14425 }
14426 split(mac1, mac2, "(") #)
14427 macro = mac2[1]
ae1362a3 14428 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
14429 if (D_is_set[macro]) {
14430 # Preserve the white space surrounding the "#".
e9a63f04
GM
14431 print prefix "define", macro P[macro] D[macro]
14432 next
14433 } else {
14434 # Replace #undef with comments. This is necessary, for example,
14435 # in the case of _POSIX_SOURCE, which is predefined and required
14436 # on some systems where configure will not decide to define it.
14437 if (defundef == "undef") {
ae1362a3 14438 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
14439 next
14440 }
14441 }
14442}
14443{ print }
14444_ACAWK
14445_ACEOF
14446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ae1362a3 14447 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
14448fi # test -n "$CONFIG_HEADERS"
14449
14450
14451eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
14452shift
14453for ac_tag
ca81d7a0
JD
14454do
14455 case $ac_tag in
14456 :[FHLC]) ac_mode=$ac_tag; continue;;
14457 esac
14458 case $ac_mode$ac_tag in
14459 :[FHL]*:*);;
ae1362a3 14460 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
14461 :[FH]-) ac_tag=-:-;;
14462 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14463 esac
14464 ac_save_IFS=$IFS
14465 IFS=:
14466 set x $ac_tag
14467 IFS=$ac_save_IFS
14468 shift
14469 ac_file=$1
14470 shift
14471
14472 case $ac_mode in
14473 :L) ac_source=$1;;
14474 :[FH])
14475 ac_file_inputs=
14476 for ac_f
14477 do
14478 case $ac_f in
14479 -) ac_f="$tmp/stdin";;
14480 *) # Look for the file first in the build tree, then in the source tree
14481 # (if the path is not absolute). The absolute path cannot be DOS-style,
14482 # because $ac_f cannot contain `:'.
14483 test -f "$ac_f" ||
14484 case $ac_f in
14485 [\\/$]*) false;;
14486 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14487 esac ||
ae1362a3 14488 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 14489 esac
e9a63f04 14490 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
ae1362a3 14491 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
14492 done
14493
14494 # Let's still pretend it is `configure' which instantiates (i.e., don't
14495 # use $as_me), people would be surprised to read:
14496 # /* config.h. Generated by config.status. */
e9a63f04
GM
14497 configure_input='Generated from '`
14498 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14499 `' by configure.'
ca81d7a0
JD
14500 if test x"$ac_file" != x-; then
14501 configure_input="$ac_file. $configure_input"
ae1362a3 14502 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 14503$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 14504 fi
e9a63f04
GM
14505 # Neutralize special characters interpreted by sed in replacement strings.
14506 case $configure_input in #(
14507 *\&* | *\|* | *\\* )
14508 ac_sed_conf_input=`$as_echo "$configure_input" |
14509 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14510 *) ac_sed_conf_input=$configure_input;;
14511 esac
ca81d7a0
JD
14512
14513 case $ac_tag in
e9a63f04 14514 *:-:* | *:-) cat >"$tmp/stdin" \
ae1362a3 14515 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
14516 esac
14517 ;;
ba4481b5
DL
14518 esac
14519
ca81d7a0 14520 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 14521$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
14522 X"$ac_file" : 'X\(//\)[^/]' \| \
14523 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 14524 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 14525$as_echo X"$ac_file" |
ca81d7a0
JD
14526 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14527 s//\1/
14528 q
14529 }
14530 /^X\(\/\/\)[^/].*/{
14531 s//\1/
14532 q
14533 }
14534 /^X\(\/\/\)$/{
14535 s//\1/
14536 q
14537 }
14538 /^X\(\/\).*/{
14539 s//\1/
14540 q
14541 }
14542 s/.*/./; q'`
ae1362a3 14543 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 14544 ac_builddir=.
98418dba 14545
ca81d7a0
JD
14546case "$ac_dir" in
14547.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14548*)
e9a63f04 14549 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 14550 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 14551 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
14552 case $ac_top_builddir_sub in
14553 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14554 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14555 esac ;;
14556esac
14557ac_abs_top_builddir=$ac_pwd
14558ac_abs_builddir=$ac_pwd$ac_dir_suffix
14559# for backward compatibility:
14560ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
14561
14562case $srcdir in
ca81d7a0 14563 .) # We are building in place.
c0d27fcc 14564 ac_srcdir=.
ca81d7a0
JD
14565 ac_top_srcdir=$ac_top_builddir_sub
14566 ac_abs_top_srcdir=$ac_pwd ;;
14567 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 14568 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
14569 ac_top_srcdir=$srcdir
14570 ac_abs_top_srcdir=$srcdir ;;
14571 *) # Relative name.
14572 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14573 ac_top_srcdir=$ac_top_build_prefix$srcdir
14574 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 14575esac
ca81d7a0 14576ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 14577
c0d27fcc 14578
ca81d7a0
JD
14579 case $ac_mode in
14580 :F)
14581 #
14582 # CONFIG_FILE
14583 #
ba4481b5 14584
503d2be0
AS
14585 case $INSTALL in
14586 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 14587 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 14588 esac
ca81d7a0 14589_ACEOF
ba4481b5 14590
e9a63f04 14591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14592# If the template does not know about datarootdir, expand it.
14593# FIXME: This hack should be removed a few years after 2.60.
14594ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
14595ac_sed_dataroot='
14596/datarootdir/ {
ca81d7a0
JD
14597 p
14598 q
14599}
14600/@datadir@/p
14601/@docdir@/p
14602/@infodir@/p
14603/@localedir@/p
ae1362a3 14604/@mandir@/p'
e9a63f04 14605case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
14606*datarootdir*) ac_datarootdir_seen=yes;;
14607*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
ae1362a3 14608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 14609$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 14610_ACEOF
e9a63f04 14611cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
14612 ac_datarootdir_hack='
14613 s&@datadir@&$datadir&g
14614 s&@docdir@&$docdir&g
14615 s&@infodir@&$infodir&g
14616 s&@localedir@&$localedir&g
14617 s&@mandir@&$mandir&g
ae1362a3 14618 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 14619esac
c0d27fcc 14620_ACEOF
ca81d7a0
JD
14621
14622# Neutralize VPATH when `$srcdir' = `.'.
14623# Shell code in configure.ac might set extrasub.
14624# FIXME: do we really want to maintain this feature?
e9a63f04
GM
14625cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14626ac_sed_extra="$ac_vpsub
503d2be0 14627$extrasub
c0d27fcc 14628_ACEOF
e9a63f04 14629cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
14630:t
14631/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 14632s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 14633s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 14634s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
14635s&@srcdir@&$ac_srcdir&;t t
14636s&@abs_srcdir@&$ac_abs_srcdir&;t t
14637s&@top_srcdir@&$ac_top_srcdir&;t t
14638s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14639s&@builddir@&$ac_builddir&;t t
14640s&@abs_builddir@&$ac_abs_builddir&;t t
14641s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14642s&@INSTALL@&$ac_INSTALL&;t t
14643$ac_datarootdir_hack
e9a63f04
GM
14644"
14645eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
ae1362a3 14646 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
14647
14648test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14649 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14650 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
ae1362a3
AS
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
14652which seems to be undefined. Please make sure it is defined" >&5
e9a63f04 14653$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ae1362a3 14654which seems to be undefined. Please make sure it is defined" >&2;}
ca81d7a0
JD
14655
14656 rm -f "$tmp/stdin"
503d2be0 14657 case $ac_file in
e9a63f04
GM
14658 -) cat "$tmp/out" && rm -f "$tmp/out";;
14659 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14660 esac \
ae1362a3 14661 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
14662 ;;
14663 :H)
14664 #
14665 # CONFIG_HEADER
14666 #
503d2be0 14667 if test x"$ac_file" != x-; then
e9a63f04
GM
14668 {
14669 $as_echo "/* $configure_input */" \
14670 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14671 } >"$tmp/config.h" \
ae1362a3 14672 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
e9a63f04 14673 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
ae1362a3 14674 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 14675$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 14676 else
e9a63f04
GM
14677 rm -f "$ac_file"
14678 mv "$tmp/config.h" "$ac_file" \
ae1362a3 14679 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ba4481b5 14680 fi
503d2be0 14681 else
e9a63f04
GM
14682 $as_echo "/* $configure_input */" \
14683 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
ae1362a3 14684 || as_fn_error $? "could not create -" "$LINENO" 5
ba4481b5 14685 fi
ca81d7a0 14686 ;;
edfaf76d 14687
ae1362a3 14688 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 14689$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
14690 ;;
14691 esac
ba4481b5 14692
c0d27fcc 14693
ca81d7a0
JD
14694 case $ac_file$ac_mode in
14695 "default":C)
ba4481b5
DL
14696
14697### Make the necessary directories, if they don't exist.
14698for dir in etc lisp ; do
14699 test -d ${dir} || mkdir ${dir}
14700done
14701
14702# Build src/Makefile from ${srcdir}/src/Makefile.c
14703# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
14704# This must be done after src/config.h is built, since we rely on that file.
14705
ba4481b5 14706echo creating src/epaths.h
4aa6b955 14707${MAKE-make} epaths-force
ba4481b5 14708
1c203d4c
DL
14709# As of 2000-11-19, newest development versions of GNU cpp preprocess
14710# `..' to `. .' unless invoked with -traditional
14711
d0e9bfd2 14712if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
14713 CPPFLAGS="$CPPFLAGS -traditional"
14714fi
14715
ba4481b5
DL
14716echo creating lib-src/Makefile
14717( cd lib-src
14718 rm -f junk.c junk1.c junk2.c
14719 sed -e '/start of cpp stuff/q' \
14720 < Makefile.c > junk1.c
14721 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 14722 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 14723 < Makefile.c > junk.c
91231421 14724 $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
14725 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
14726 cat junk1.c junk2.c > Makefile.new
14727 rm -f junk.c junk1.c junk2.c
14728 chmod 444 Makefile.new
14729 mv -f Makefile.new Makefile
14730)
14731
14732echo creating src/Makefile
14733( cd src
14734 rm -f junk.c junk1.c junk2.c
14735 sed -e '/start of cpp stuff/q' \
14736 < Makefile.c > junk1.c
14737 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 14738 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 14739 < Makefile.c > junk.c
91231421 14740 $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
14741 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
14742 cat junk1.c junk2.c > Makefile.new
14743 rm -f junk.c junk1.c junk2.c
14744 chmod 444 Makefile.new
14745 mv -f Makefile.new Makefile
14746)
14747
503d2be0 14748if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 14749 echo creating src/.gdbinit
503d2be0 14750 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
14751fi
14752
503d2be0 14753 ;;
ca81d7a0 14754
503d2be0 14755 esac
ca81d7a0 14756done # for ac_tag
503d2be0 14757
ba4481b5 14758
ae1362a3 14759as_fn_exit 0
c0d27fcc 14760_ACEOF
503d2be0
AS
14761ac_clean_files=$ac_clean_files_save
14762
e9a63f04 14763test $ac_write_fail = 0 ||
ae1362a3 14764 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 14765
c0d27fcc 14766
503d2be0
AS
14767# configure is writing to config.log, and then calls config.status.
14768# config.status does its own redirection, appending to config.log.
14769# Unfortunately, on DOS this fails, as config.log is still kept open
14770# by configure, so config.status won't be able to write to it; its
14771# output is simply discarded. So we exec the FD to /dev/null,
14772# effectively closing config.log, so it can be properly (re)opened and
14773# appended to by config.status. When coming back to configure, we
14774# need to make the FD available again.
14775if test "$no_create" != yes; then
14776 ac_cs_success=:
19650fd6
AS
14777 ac_config_status_args=
14778 test "$silent" = yes &&
14779 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 14780 exec 5>/dev/null
19650fd6 14781 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
14782 exec 5>>config.log
14783 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14784 # would make configure fail if this is the last instruction.
ae1362a3 14785 $ac_cs_success || as_fn_exit 1
503d2be0 14786fi
e9a63f04 14787if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
ae1362a3
AS
14788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14789$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 14790fi
f5f47add 14791
c0d27fcc 14792