merge emacs-23
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
22770c84 3# Generated by GNU Autoconf 2.67 for emacs 23.3.
ae1362a3 4#
ba4481b5 5#
ca81d7a0 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1f10e750
CY
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
8# Foundation, Inc.
ae1362a3
AS
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"
1f10e750 319 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
ae1362a3
AS
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
1f10e750
CY
359# as_fn_error STATUS ERROR [LINENO LOG_FD]
360# ----------------------------------------
ae1362a3
AS
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
1f10e750 363# script with STATUS, using 1 if that was 0.
ae1362a3
AS
364as_fn_error ()
365{
1f10e750
CY
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
ae1362a3 370 fi
1f10e750 371 $as_echo "$as_me: error: $2" >&2
ae1362a3
AS
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.
1f10e750 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'
22770c84
CY
552PACKAGE_VERSION='23.3'
553PACKAGE_STRING='emacs 23.3'
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
1f10e750
CY
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 &&
1f10e750 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 &&
1f10e750 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 &&
1f10e750 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 &&
1f10e750 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
1f10e750
CY
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]* )
1f10e750 1175 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
ae1362a3 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'`
1f10e750 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) ;;
1f10e750 1199 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
ae1362a3 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
1f10e750 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
1f10e750
CY
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 .` ||
1f10e750 1252 as_fn_error $? "working directory cannot be determined"
ca81d7a0 1253test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1f10e750 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 .."
1f10e750 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=`(
1f10e750 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
22770c84 1323\`configure' configures emacs 23.3 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
1f10e750 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
22770c84 1397 short | recursive ) echo "Configuration of emacs 23.3:";;
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
22770c84 1543emacs configure 23.3
1f10e750 1544generated by GNU Autoconf 2.67
503d2be0 1545
1f10e750 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
1f10e750 1662 test $ac_status = 0; } > conftest.i && {
ae1362a3
AS
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
1f10e750 1686 if eval "test \"\${$3+set}\"" = set; then :
ae1362a3
AS
1687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1688$as_echo_n "checking for $2... " >&6; }
1f10e750 1689if eval "test \"\${$3+set}\"" = set; then :
ae1362a3
AS
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
1f10e750 1725rm -f conftest.err conftest.i conftest.$ac_ext
ae1362a3
AS
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; }
1f10e750 1752if eval "test \"\${$3+set}\"" = set; then :
ae1362a3
AS
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; }
1f10e750 1816if eval "test \"\${$3+set}\"" = set; then :
ae1362a3
AS
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; }
1f10e750 1846if eval "test \"\${$3+set}\"" = set; then :
ae1362a3
AS
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
1f10e750 1858rm -f conftest.err conftest.i conftest.$ac_ext
ae1362a3
AS
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
1f10e750
CY
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.
ae1362a3
AS
1871ac_fn_c_check_decl ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1f10e750
CY
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 :
ae1362a3
AS
1879 $as_echo_n "(cached) " >&6
1880else
1881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1882/* end confdefs.h. */
1883$4
1884int
1885main ()
1886{
1f10e750
CY
1887#ifndef $as_decl_name
1888#ifdef __cplusplus
1889 (void) $as_decl_use;
1890#else
1891 (void) $as_decl_name;
1892#endif
ae1362a3
AS
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; }
1f10e750 1922if eval "test \"\${$4+set}\"" = set; then :
ae1362a3
AS
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; }
1f10e750 1978if eval "test \"\${$3+set}\"" = set; then :
ae1362a3
AS
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; }
1f10e750 2046if eval "test \"\${$3+set}\"" = set; then :
ae1362a3
AS
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
22770c84 2094It was created by emacs $as_me 23.3, which was
1f10e750 2095generated by GNU Autoconf 2.67. Invocation command line was
ae1362a3
AS
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
1f10e750 2205 $as_echo "## ---------------- ##
c0d27fcc 2206## Cache variables. ##
1f10e750 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
1f10e750 2241 $as_echo "## ----------------- ##
6bae0ccf 2242## Output variables. ##
1f10e750 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
1f10e750 2256 $as_echo "## ------------------- ##
ca81d7a0 2257## File substitutions. ##
1f10e750 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
1f10e750 2272 $as_echo "## ----------- ##
c0d27fcc 2273## confdefs.h. ##
1f10e750 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
1f10e750
CY
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
1f10e750
CY
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;}
1f10e750 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 * )
1f10e750 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 2723if test "${with_gtk+set}" = set; then :
1f10e750 2724 withval=$with_gtk; as_fn_error $? "--with-gtk has been removed. Use --with-x-toolkit to
ae1362a3 2725specify a toolkit." "$LINENO" 5
9d2818d6
DN
2726fi
2727
2728
2729
2730# Check whether --with-gcc was given.
ae1362a3 2731if test "${with_gcc+set}" = set; then :
1f10e750 2732 withval=$with_gcc; as_fn_error $? "--with-gcc has been removed. Set the \`CC' environment
ae1362a3 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 ;;
1f10e750 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
1f10e750
CY
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
1f10e750 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 ||
1f10e750 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 &&
1f10e750 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` ||
1f10e750 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*-*-*) ;;
1f10e750 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` ||
1f10e750 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*-*-*) ;;
1f10e750 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
6de1218f
PG
3185 ia64*-hp-hpux1[1-9]* )
3186 machine=hp800 opsys=hpux11
3187 ;;
3188
409d9577
GM
3189 hppa*-*-linux-gnu* )
3190 machine=hp800 opsys=gnu-linux
3191 ;;
3192
ba4481b5 3193 ## IBM machines
55597d70 3194 s390-*-linux-gnu* )
138f0859
GM
3195 machine=ibms390 opsys=gnu-linux
3196 ;;
bcdb1378
EZ
3197 s390x-*-linux-gnu* )
3198 machine=ibms390x opsys=gnu-linux
3199 ;;
ba4481b5
DL
3200 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
3201 machine=ibmrs6000 opsys=aix4-2
3202 ;;
67bf991b
CY
3203 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
3204 machine=ibmrs6000 opsys=aix4-2
3205 ;;
55597d70 3206 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
3207 machine=ibmrs6000 opsys=aix4-2
3208 ;;
1e447232 3209 rs6000-ibm-aix6* | powerpc-ibm-aix6* )
26a42dac
DN
3210 machine=ibmrs6000 opsys=aix4-2
3211 ;;
ba4481b5 3212
c76e04a8
GM
3213 ## Macintosh PowerPC
3214 powerpc*-*-linux-gnu* )
3215 machine=macppc opsys=gnu-linux
3216 ;;
3217
ba4481b5 3218 ## Silicon Graphics machines
ba4481b5 3219 ## Iris 4D
ba4481b5
DL
3220 mips-sgi-irix6.5 )
3221 machine=iris4d opsys=irix6-5
946173ad
DL
3222 # Without defining _LANGUAGE_C, things get masked out in the headers
3223 # so that, for instance, grepping for `free' in stdlib.h fails and
3224 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3225 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 3226 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 3227 ;;
ba4481b5 3228
ba4481b5
DL
3229 ## Suns
3230 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3231 machine=sparc opsys=gnu-linux
3232 ;;
3233
176fe5fc 3234 *-sun-solaris* \
7c54c0a0
DN
3235 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3236 | x86_64-*-solaris2* | x86_64-*-sunos5* \
3237 | powerpc*-*-solaris2* | rs6000-*-solaris2*)
ba4481b5 3238 case "${canonical}" in
ba4481b5 3239 i[3456]86-*-* ) machine=intel386 ;;
af46e133 3240 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
3241 powerpc* | rs6000* ) machine=ibmrs6000 ;;
3242 sparc* ) machine=sparc ;;
3243 * ) unported=yes ;;
3244 esac
3245 case "${canonical}" in
ba4481b5
DL
3246 *-sunos5.3* | *-solaris2.3* )
3247 opsys=sol2-3
3248 NON_GNU_CPP=/usr/ccs/lib/cpp
3249 ;;
3250 *-sunos5.4* | *-solaris2.4* )
3251 opsys=sol2-4
3252 NON_GNU_CPP=/usr/ccs/lib/cpp
3253 RANLIB="ar -ts"
3254 ;;
3255 *-sunos5.5* | *-solaris2.5* )
3256 opsys=sol2-5
3257 NON_GNU_CPP=/usr/ccs/lib/cpp
3258 RANLIB="ar -ts"
3259 ;;
8e967cf7
MR
3260 *-sunos5.6* | *-solaris2.6* )
3261 opsys=sol2-6
3262 NON_GNU_CPP=/usr/ccs/lib/cpp
3263 RANLIB="ar -ts"
3264 ;;
2194ea1c 3265 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
9e71690e 3266 opsys=sol2-6
089a966d
GM
3267 emacs_check_sunpro_c=yes
3268 NON_GNU_CPP=/usr/ccs/lib/cpp
6623890a 3269 ;;
9b3362b8
DN
3270 *-sunos5* | *-solaris* )
3271 opsys=sol2-10
3272 emacs_check_sunpro_c=yes
3273 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 3274 ;;
ba4481b5
DL
3275 esac
3276 ## Watch out for a compiler that we know will not work.
3277 case "${canonical}" in
3278 *-solaris* | *-sunos5* )
3279 if [ "x$CC" = x/usr/ucb/cc ]; then
3280 ## /usr/ucb/cc doesn't work;
3281 ## we should find some other compiler that does work.
3282 unset CC
3283 fi
3284 ;;
3285 *) ;;
3286 esac
3287 ;;
ba4481b5 3288
f4988be7
GM
3289 ## IA-64
3290 ia64*-*-linux* )
3291 machine=ia64 opsys=gnu-linux
3292 ;;
3293
ba4481b5
DL
3294 ## Intel 386 machines where we don't care about the manufacturer
3295 i[3456]86-*-* )
3296 machine=intel386
3297 case "${canonical}" in
c60ee5e7 3298 *-cygwin ) opsys=cygwin ;;
eae54018 3299 *-darwin* ) opsys=darwin
23fd4483
ST
3300 CPP="${CC-cc} -E -no-cpp-precomp"
3301 ;;
ba4481b5 3302 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 3303 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3304 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3305 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
3306 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3307 esac
3308 ;;
3309
3310 ## m68k Linux-based GNU system
3311 m68k-*-linux-gnu* )
3312 machine=m68k opsys=gnu-linux
3313 ;;
3314
3315 ## Mips Linux-based GNU system
8bff6137
GM
3316 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3317 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
ba4481b5
DL
3318 machine=mips opsys=gnu-linux
3319 ;;
3320
598a2813
AS
3321 ## AMD x86-64 Linux-based GNU system
3322 x86_64-*-linux-gnu* )
24b01ec4 3323 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3324 ;;
3325
94218e27 3326 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 3327 xtensa*-*-linux-gnu* )
94218e27
DN
3328 machine=xtensa opsys=gnu-linux
3329 ;;
3330
fac5dc61
DN
3331 ## SuperH Linux-based GNU system
3332 sh[34]*-*-linux-gnu* )
3333 machine=sh3 opsys=gnu-linux
3334 ;;
3335
ba4481b5
DL
3336 * )
3337 unported=yes
3338 ;;
3339esac
3340
3341### If the code above didn't choose an operating system, just choose
3342### an operating system based on the configuration name. You really
3343### only want to use this when you have no idea what the right
3344### operating system is; if you know what operating systems a machine
3345### runs, it's cleaner to make it explicit in the case statement
3346### above.
3347if test x"${opsys}" = x; then
3348 case "${canonical}" in
3349 *-gnu* ) opsys=gnu ;;
ba4481b5 3350 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3351 *-sysv5uw* ) opsys=unixware ;;
3352 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3353 *-sysv4.1* | *-sysvr4.1* )
3354 NON_GNU_CPP=/usr/lib/cpp
3355 opsys=usg5-4 ;;
3356 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3357 if [ x$NON_GNU_CPP = x ]; then
3358 if [ -f /usr/ccs/lib/cpp ]; then
3359 NON_GNU_CPP=/usr/ccs/lib/cpp
3360 else
3361 NON_GNU_CPP=/lib/cpp
3362 fi
3363 fi
3364 opsys=usg5-4-2 ;;
3365 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3366 * )
3367 unported=yes
3368 ;;
3369 esac
3370fi
3371
c0d27fcc 3372
22044edf 3373
ba4481b5 3374if test $unported = yes; then
1f10e750 3375 as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems.
ae1362a3 3376Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
ba4481b5
DL
3377fi
3378
3379machfile="m/${machine}.h"
3380opsysfile="s/${opsys}.h"
3381
c0d27fcc 3382
ba4481b5
DL
3383#### Choose a compiler.
3384test -n "$CC" && cc_specified=yes
3385
3386# Save the value of CFLAGS that the user specified.
3387SPECIFIED_CFLAGS="$CFLAGS"
3388
503d2be0
AS
3389ac_ext=c
3390ac_cpp='$CPP $CPPFLAGS'
3391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3393ac_compiler_gnu=$ac_cv_c_compiler_gnu
3394if test -n "$ac_tool_prefix"; then
3395 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3396set dummy ${ac_tool_prefix}gcc; ac_word=$2
ae1362a3 3397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3398$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3399if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3400 $as_echo_n "(cached) " >&6
ba4481b5
DL
3401else
3402 if test -n "$CC"; then
3403 ac_cv_prog_CC="$CC" # Let the user override the test.
3404else
c0d27fcc
MR
3405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3406for as_dir in $PATH
3407do
3408 IFS=$as_save_IFS
3409 test -z "$as_dir" && as_dir=.
ae1362a3 3410 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3411 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3412 ac_cv_prog_CC="${ac_tool_prefix}gcc"
ae1362a3 3413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3414 break 2
3415 fi
3416done
ae1362a3 3417 done
ca81d7a0 3418IFS=$as_save_IFS
503d2be0 3419
ba4481b5
DL
3420fi
3421fi
503d2be0 3422CC=$ac_cv_prog_CC
ba4481b5 3423if test -n "$CC"; then
ae1362a3 3424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
e9a63f04 3425$as_echo "$CC" >&6; }
503d2be0 3426else
ae1362a3 3427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3428$as_echo "no" >&6; }
503d2be0
AS
3429fi
3430
ca81d7a0 3431
503d2be0
AS
3432fi
3433if test -z "$ac_cv_prog_CC"; then
3434 ac_ct_CC=$CC
3435 # Extract the first word of "gcc", so it can be a program name with args.
3436set dummy gcc; ac_word=$2
ae1362a3 3437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3438$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3439if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
e9a63f04 3440 $as_echo_n "(cached) " >&6
503d2be0
AS
3441else
3442 if test -n "$ac_ct_CC"; then
3443 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3444else
c0d27fcc
MR
3445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
ae1362a3 3450 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3451 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3452 ac_cv_prog_ac_ct_CC="gcc"
ae1362a3 3453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3454 break 2
3455 fi
3456done
ae1362a3 3457 done
ca81d7a0 3458IFS=$as_save_IFS
503d2be0
AS
3459
3460fi
3461fi
3462ac_ct_CC=$ac_cv_prog_ac_ct_CC
3463if test -n "$ac_ct_CC"; then
ae1362a3 3464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
e9a63f04 3465$as_echo "$ac_ct_CC" >&6; }
ba4481b5 3466else
ae1362a3 3467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3468$as_echo "no" >&6; }
503d2be0
AS
3469fi
3470
ca81d7a0
JD
3471 if test "x$ac_ct_CC" = x; then
3472 CC=""
3473 else
3474 case $cross_compiling:$ac_tool_warned in
3475yes:)
ae1362a3
AS
3476{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3477$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ca81d7a0
JD
3478ac_tool_warned=yes ;;
3479esac
3480 CC=$ac_ct_CC
3481 fi
503d2be0
AS
3482else
3483 CC="$ac_cv_prog_CC"
ba4481b5
DL
3484fi
3485
3486if test -z "$CC"; then
ca81d7a0
JD
3487 if test -n "$ac_tool_prefix"; then
3488 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3489set dummy ${ac_tool_prefix}cc; ac_word=$2
ae1362a3 3490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3491$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3492if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3493 $as_echo_n "(cached) " >&6
ba4481b5
DL
3494else
3495 if test -n "$CC"; then
3496 ac_cv_prog_CC="$CC" # Let the user override the test.
3497else
c0d27fcc
MR
3498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3499for as_dir in $PATH
3500do
3501 IFS=$as_save_IFS
3502 test -z "$as_dir" && as_dir=.
ae1362a3 3503 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3504 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3505 ac_cv_prog_CC="${ac_tool_prefix}cc"
ae1362a3 3506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3507 break 2
3508 fi
3509done
ae1362a3 3510 done
ca81d7a0 3511IFS=$as_save_IFS
503d2be0
AS
3512
3513fi
3514fi
3515CC=$ac_cv_prog_CC
3516if test -n "$CC"; then
ae1362a3 3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
e9a63f04 3518$as_echo "$CC" >&6; }
503d2be0 3519else
ae1362a3 3520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3521$as_echo "no" >&6; }
503d2be0
AS
3522fi
3523
503d2be0 3524
ca81d7a0 3525 fi
503d2be0
AS
3526fi
3527if test -z "$CC"; then
3528 # Extract the first word of "cc", so it can be a program name with args.
3529set dummy cc; ac_word=$2
ae1362a3 3530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3531$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3532if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3533 $as_echo_n "(cached) " >&6
503d2be0
AS
3534else
3535 if test -n "$CC"; then
3536 ac_cv_prog_CC="$CC" # Let the user override the test.
3537else
3538 ac_prog_rejected=no
c0d27fcc
MR
3539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3540for as_dir in $PATH
3541do
3542 IFS=$as_save_IFS
3543 test -z "$as_dir" && as_dir=.
ae1362a3 3544 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3545 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3546 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3547 ac_prog_rejected=yes
3548 continue
3549 fi
3550 ac_cv_prog_CC="cc"
ae1362a3 3551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3552 break 2
3553 fi
3554done
ae1362a3 3555 done
ca81d7a0 3556IFS=$as_save_IFS
503d2be0 3557
ba4481b5
DL
3558if test $ac_prog_rejected = yes; then
3559 # We found a bogon in the path, so make sure we never use it.
3560 set dummy $ac_cv_prog_CC
3561 shift
503d2be0 3562 if test $# != 0; then
ba4481b5
DL
3563 # We chose a different compiler from the bogus one.
3564 # However, it has the same basename, so the bogon will be chosen
3565 # first if we set CC to just the basename; use the full file name.
3566 shift
6bae0ccf 3567 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3568 fi
3569fi
3570fi
3571fi
503d2be0 3572CC=$ac_cv_prog_CC
ba4481b5 3573if test -n "$CC"; then
ae1362a3 3574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
e9a63f04 3575$as_echo "$CC" >&6; }
ba4481b5 3576else
ae1362a3 3577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3578$as_echo "no" >&6; }
ba4481b5
DL
3579fi
3580
ca81d7a0 3581
503d2be0
AS
3582fi
3583if test -z "$CC"; then
3584 if test -n "$ac_tool_prefix"; then
ca81d7a0 3585 for ac_prog in cl.exe
503d2be0
AS
3586 do
3587 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3588set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ae1362a3 3589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3590$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3591if test "${ac_cv_prog_CC+set}" = set; then :
e9a63f04 3592 $as_echo_n "(cached) " >&6
c4bb2108
DL
3593else
3594 if test -n "$CC"; then
3595 ac_cv_prog_CC="$CC" # Let the user override the test.
3596else
c0d27fcc
MR
3597as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3598for as_dir in $PATH
3599do
3600 IFS=$as_save_IFS
3601 test -z "$as_dir" && as_dir=.
ae1362a3 3602 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3603 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3604 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
ae1362a3 3605 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3606 break 2
3607 fi
3608done
ae1362a3 3609 done
ca81d7a0 3610IFS=$as_save_IFS
503d2be0 3611
c4bb2108
DL
3612fi
3613fi
503d2be0 3614CC=$ac_cv_prog_CC
c4bb2108 3615if test -n "$CC"; then
ae1362a3 3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
e9a63f04 3617$as_echo "$CC" >&6; }
c4bb2108 3618else
ae1362a3 3619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3620$as_echo "no" >&6; }
503d2be0
AS
3621fi
3622
ca81d7a0 3623
503d2be0
AS
3624 test -n "$CC" && break
3625 done
3626fi
3627if test -z "$CC"; then
3628 ac_ct_CC=$CC
ca81d7a0 3629 for ac_prog in cl.exe
503d2be0
AS
3630do
3631 # Extract the first word of "$ac_prog", so it can be a program name with args.
3632set dummy $ac_prog; ac_word=$2
ae1362a3 3633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 3634$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 3635if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
e9a63f04 3636 $as_echo_n "(cached) " >&6
503d2be0
AS
3637else
3638 if test -n "$ac_ct_CC"; then
3639 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3640else
c0d27fcc
MR
3641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3642for as_dir in $PATH
3643do
3644 IFS=$as_save_IFS
3645 test -z "$as_dir" && as_dir=.
ae1362a3 3646 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3647 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 3648 ac_cv_prog_ac_ct_CC="$ac_prog"
ae1362a3 3649 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
3650 break 2
3651 fi
3652done
ae1362a3 3653 done
ca81d7a0 3654IFS=$as_save_IFS
503d2be0 3655
c4bb2108 3656fi
503d2be0
AS
3657fi
3658ac_ct_CC=$ac_cv_prog_ac_ct_CC
3659if test -n "$ac_ct_CC"; then
ae1362a3 3660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
e9a63f04 3661$as_echo "$ac_ct_CC" >&6; }
503d2be0 3662else
ae1362a3 3663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 3664$as_echo "no" >&6; }
ba4481b5
DL
3665fi
3666
ca81d7a0 3667
503d2be0
AS
3668 test -n "$ac_ct_CC" && break
3669done
ba4481b5 3670
ca81d7a0
JD
3671 if test "x$ac_ct_CC" = x; then
3672 CC=""
3673 else
3674 case $cross_compiling:$ac_tool_warned in
3675yes:)
ae1362a3
AS
3676{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3677$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ca81d7a0
JD
3678ac_tool_warned=yes ;;
3679esac
3680 CC=$ac_ct_CC
3681 fi
503d2be0
AS
3682fi
3683
3684fi
ba4481b5 3685
c0d27fcc 3686
ae1362a3
AS
3687test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1f10e750
CY
3689as_fn_error $? "no acceptable C compiler found in \$PATH
3690See \`config.log' for more details" "$LINENO" 5; }
c4bb2108 3691
503d2be0 3692# Provide some information about the compiler.
ae1362a3 3693$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
e9a63f04
GM
3694set X $ac_compile
3695ac_compiler=$2
ae1362a3
AS
3696for ac_option in --version -v -V -qversion; do
3697 { { ac_try="$ac_compiler $ac_option >&5"
bf89cb4d
GM
3698case "(($ac_try" in
3699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3700 *) ac_try_echo=$ac_try;;
3701esac
ae1362a3
AS
3702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3703$as_echo "$ac_try_echo"; } >&5
3704 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
bf89cb4d 3705 ac_status=$?
ae1362a3
AS
3706 if test -s conftest.err; then
3707 sed '10a\
3708... rest of stderr output deleted ...
3709 10q' conftest.err >conftest.er1
3710 cat conftest.er1 >&5
3711 fi
3712 rm -f conftest.er1 conftest.err
3713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3714 test $ac_status = 0; }
3715done
503d2be0 3716
ae1362a3 3717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 3718/* end confdefs.h. */
c4bb2108 3719
503d2be0
AS
3720int
3721main ()
3722{
3723
3724 ;
3725 return 0;
3726}
3727_ACEOF
3728ac_clean_files_save=$ac_clean_files
e9a63f04 3729ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
503d2be0
AS
3730# Try to create an executable without -o first, disregard a.out.
3731# It will help us diagnose broken compilers, and finding out an intuition
3732# of exeext.
ae1362a3
AS
3733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3734$as_echo_n "checking whether the C compiler works... " >&6; }
e9a63f04
GM
3735ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3736
3737# The possible output files:
3738ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3739
ca81d7a0
JD
3740ac_rmfiles=
3741for ac_file in $ac_files
3742do
3743 case $ac_file in
e9a63f04 3744 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
ca81d7a0
JD
3745 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3746 esac
3747done
3748rm -f $ac_rmfiles
3749
ae1362a3 3750if { { ac_try="$ac_link_default"
ca81d7a0
JD
3751case "(($ac_try" in
3752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3753 *) ac_try_echo=$ac_try;;
3754esac
ae1362a3
AS
3755eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3756$as_echo "$ac_try_echo"; } >&5
ca81d7a0 3757 (eval "$ac_link_default") 2>&5
503d2be0 3758 ac_status=$?
ae1362a3
AS
3759 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3760 test $ac_status = 0; }; then :
ca81d7a0
JD
3761 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3762# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3763# in a Makefile. We should not override ac_cv_exeext if it was cached,
3764# so that the user can short-circuit this test for compilers unknown to
3765# Autoconf.
f053c89f 3766for ac_file in $ac_files ''
19650fd6 3767do
6bae0ccf 3768 test -f "$ac_file" || continue
503d2be0 3769 case $ac_file in
e9a63f04 3770 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
edfaf76d 3771 ;;
19650fd6 3772 [ab].out )
edfaf76d
LK
3773 # We found the default executable, but exeext='' is most
3774 # certainly right.
3775 break;;
19650fd6 3776 *.* )
ae1362a3 3777 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
ca81d7a0
JD
3778 then :; else
3779 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3780 fi
3781 # We set ac_cv_exeext here because the later test for it is not
3782 # safe: cross compilers may not add the suffix if given an `-o'
3783 # argument, so we may need to know it at that point already.
3784 # Even if this section looks crufty: it has the advantage of
3785 # actually working.
edfaf76d 3786 break;;
19650fd6 3787 * )
edfaf76d 3788 break;;
503d2be0
AS
3789 esac
3790done
ca81d7a0
JD
3791test "$ac_cv_exeext" = no && ac_cv_exeext=
3792
503d2be0 3793else
f053c89f
CY
3794 ac_file=''
3795fi
ae1362a3
AS
3796if test -z "$ac_file"; then :
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3798$as_echo "no" >&6; }
3799$as_echo "$as_me: failed program was:" >&5
19650fd6
AS
3800sed 's/^/| /' conftest.$ac_ext >&5
3801
ae1362a3
AS
3802{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1f10e750
CY
3804as_fn_error 77 "C compiler cannot create executables
3805See \`config.log' for more details" "$LINENO" 5; }
ae1362a3
AS
3806else
3807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3808$as_echo "yes" >&6; }
503d2be0 3809fi
ae1362a3
AS
3810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3811$as_echo_n "checking for C compiler default output file name... " >&6; }
3812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3813$as_echo "$ac_file" >&6; }
503d2be0 3814ac_exeext=$ac_cv_exeext
503d2be0 3815
e9a63f04 3816rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
503d2be0 3817ac_clean_files=$ac_clean_files_save
ae1362a3 3818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
e9a63f04 3819$as_echo_n "checking for suffix of executables... " >&6; }
ae1362a3 3820if { { ac_try="$ac_link"
ca81d7a0
JD
3821case "(($ac_try" in
3822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3823 *) ac_try_echo=$ac_try;;
3824esac
ae1362a3
AS
3825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3826$as_echo "$ac_try_echo"; } >&5
ca81d7a0 3827 (eval "$ac_link") 2>&5
503d2be0 3828 ac_status=$?
ae1362a3
AS
3829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3830 test $ac_status = 0; }; then :
503d2be0
AS
3831 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3832# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3833# work properly (i.e., refer to `conftest.exe'), while it won't with
3834# `rm'.
6bae0ccf
DL
3835for ac_file in conftest.exe conftest conftest.*; do
3836 test -f "$ac_file" || continue
503d2be0 3837 case $ac_file in
e9a63f04 3838 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
503d2be0 3839 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3840 break;;
503d2be0
AS
3841 * ) break;;
3842 esac
3843done
ba4481b5 3844else
ae1362a3
AS
3845 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1f10e750
CY
3847as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3848See \`config.log' for more details" "$LINENO" 5; }
ba4481b5 3849fi
ae1362a3
AS
3850rm -f conftest conftest$ac_cv_exeext
3851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
e9a63f04 3852$as_echo "$ac_cv_exeext" >&6; }
ba4481b5 3853
503d2be0
AS
3854rm -f conftest.$ac_ext
3855EXEEXT=$ac_cv_exeext
3856ac_exeext=$EXEEXT
ae1362a3
AS
3857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3858/* end confdefs.h. */
3859#include <stdio.h>
3860int
3861main ()
3862{
3863FILE *f = fopen ("conftest.out", "w");
3864 return ferror (f) || fclose (f) != 0;
3865
3866 ;
3867 return 0;
3868}
3869_ACEOF
3870ac_clean_files="$ac_clean_files conftest.out"
3871# Check that the compiler produces executables we can run. If not, either
3872# the compiler is broken, or we cross compile.
3873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3874$as_echo_n "checking whether we are cross compiling... " >&6; }
3875if test "$cross_compiling" != yes; then
3876 { { ac_try="$ac_link"
3877case "(($ac_try" in
3878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3879 *) ac_try_echo=$ac_try;;
3880esac
3881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3882$as_echo "$ac_try_echo"; } >&5
3883 (eval "$ac_link") 2>&5
3884 ac_status=$?
3885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3886 test $ac_status = 0; }
3887 if { ac_try='./conftest$ac_cv_exeext'
3888 { { case "(($ac_try" in
3889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3890 *) ac_try_echo=$ac_try;;
3891esac
3892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3893$as_echo "$ac_try_echo"; } >&5
3894 (eval "$ac_try") 2>&5
3895 ac_status=$?
3896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3897 test $ac_status = 0; }; }; then
3898 cross_compiling=no
3899 else
3900 if test "$cross_compiling" = maybe; then
3901 cross_compiling=yes
3902 else
3903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1f10e750 3905as_fn_error $? "cannot run C compiled programs.
ae1362a3 3906If you meant to cross compile, use \`--host'.
1f10e750 3907See \`config.log' for more details" "$LINENO" 5; }
ae1362a3
AS
3908 fi
3909 fi
3910fi
3911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3912$as_echo "$cross_compiling" >&6; }
3913
3914rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3915ac_clean_files=$ac_clean_files_save
3916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
e9a63f04 3917$as_echo_n "checking for suffix of object files... " >&6; }
ae1362a3 3918if test "${ac_cv_objext+set}" = set; then :
e9a63f04 3919 $as_echo_n "(cached) " >&6
ba4481b5 3920else
ae1362a3 3921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 3922/* end confdefs.h. */
ba4481b5 3923
503d2be0
AS
3924int
3925main ()
3926{
ba4481b5 3927
503d2be0
AS
3928 ;
3929 return 0;
3930}
3931_ACEOF
3932rm -f conftest.o conftest.obj
ae1362a3 3933if { { ac_try="$ac_compile"
ca81d7a0
JD
3934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
ae1362a3
AS
3938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939$as_echo "$ac_try_echo"; } >&5
ca81d7a0 3940 (eval "$ac_compile") 2>&5
503d2be0 3941 ac_status=$?
ae1362a3
AS
3942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3943 test $ac_status = 0; }; then :
ca81d7a0
JD
3944 for ac_file in conftest.o conftest.obj conftest.*; do
3945 test -f "$ac_file" || continue;
503d2be0 3946 case $ac_file in
e9a63f04 3947 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
503d2be0
AS
3948 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3949 break;;
3950 esac
3951done
c4bb2108 3952else
e9a63f04 3953 $as_echo "$as_me: failed program was:" >&5
19650fd6
AS
3954sed 's/^/| /' conftest.$ac_ext >&5
3955
ae1362a3
AS
3956{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1f10e750
CY
3958as_fn_error $? "cannot compute suffix of object files: cannot compile
3959See \`config.log' for more details" "$LINENO" 5; }
c4bb2108 3960fi
503d2be0
AS
3961rm -f conftest.$ac_cv_objext conftest.$ac_ext
3962fi
ae1362a3 3963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
e9a63f04 3964$as_echo "$ac_cv_objext" >&6; }
503d2be0
AS
3965OBJEXT=$ac_cv_objext
3966ac_objext=$OBJEXT
ae1362a3 3967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
e9a63f04 3968$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
ae1362a3 3969if test "${ac_cv_c_compiler_gnu+set}" = set; then :
e9a63f04 3970 $as_echo_n "(cached) " >&6
ba4481b5 3971else
ae1362a3 3972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 3973/* end confdefs.h. */
503d2be0
AS
3974
3975int
3976main ()
3977{
3978#ifndef __GNUC__
3979 choke me
3980#endif
3981
3982 ;
3983 return 0;
3984}
3985_ACEOF
ae1362a3 3986if ac_fn_c_try_compile "$LINENO"; then :
503d2be0
AS
3987 ac_compiler_gnu=yes
3988else
ae1362a3 3989 ac_compiler_gnu=no
503d2be0 3990fi
ca81d7a0 3991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3992ac_cv_c_compiler_gnu=$ac_compiler_gnu
3993
3994fi
ae1362a3 3995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
e9a63f04
GM
3996$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3997if test $ac_compiler_gnu = yes; then
3998 GCC=yes
3999else
4000 GCC=
4001fi
503d2be0
AS
4002ac_test_CFLAGS=${CFLAGS+set}
4003ac_save_CFLAGS=$CFLAGS
ae1362a3 4004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
e9a63f04 4005$as_echo_n "checking whether $CC accepts -g... " >&6; }
ae1362a3 4006if test "${ac_cv_prog_cc_g+set}" = set; then :
e9a63f04 4007 $as_echo_n "(cached) " >&6
503d2be0 4008else
ca81d7a0
JD
4009 ac_save_c_werror_flag=$ac_c_werror_flag
4010 ac_c_werror_flag=yes
4011 ac_cv_prog_cc_g=no
4012 CFLAGS="-g"
ae1362a3 4013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4014/* end confdefs.h. */
503d2be0
AS
4015
4016int
4017main ()
4018{
4019
4020 ;
4021 return 0;
4022}
4023_ACEOF
ae1362a3 4024if ac_fn_c_try_compile "$LINENO"; then :
ba4481b5
DL
4025 ac_cv_prog_cc_g=yes
4026else
ae1362a3
AS
4027 CFLAGS=""
4028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4029/* end confdefs.h. */
edfaf76d 4030
6bae0ccf
DL
4031int
4032main ()
4033{
ca81d7a0 4034
6bae0ccf
DL
4035 ;
4036 return 0;
4037}
4038_ACEOF
ae1362a3 4039if ac_fn_c_try_compile "$LINENO"; then :
bf89cb4d 4040
ae1362a3
AS
4041else
4042 ac_c_werror_flag=$ac_save_c_werror_flag
ca81d7a0 4043 CFLAGS="-g"
ae1362a3 4044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4045/* end confdefs.h. */
ca81d7a0 4046
503d2be0
AS
4047int
4048main ()
4049{
ca81d7a0 4050
503d2be0
AS
4051 ;
4052 return 0;
4053}
4054_ACEOF
ae1362a3 4055if ac_fn_c_try_compile "$LINENO"; then :
ba4481b5 4056 ac_cv_prog_cc_g=yes
ba4481b5 4057fi
ca81d7a0
JD
4058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4059fi
ca81d7a0
JD
4060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4061fi
ca81d7a0
JD
4062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4063 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 4064fi
ae1362a3 4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
e9a63f04 4066$as_echo "$ac_cv_prog_cc_g" >&6; }
c4bb2108 4067if test "$ac_test_CFLAGS" = set; then
503d2be0 4068 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
4069elif test $ac_cv_prog_cc_g = yes; then
4070 if test "$GCC" = yes; then
ba4481b5
DL
4071 CFLAGS="-g -O2"
4072 else
c4bb2108 4073 CFLAGS="-g"
ba4481b5 4074 fi
22afa6e8 4075else
c4bb2108
DL
4076 if test "$GCC" = yes; then
4077 CFLAGS="-O2"
4078 else
4079 CFLAGS=
4080 fi
ba4481b5 4081fi
ae1362a3 4082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
e9a63f04 4083$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
ae1362a3 4084if test "${ac_cv_prog_cc_c89+set}" = set; then :
e9a63f04 4085 $as_echo_n "(cached) " >&6
6bae0ccf 4086else
ca81d7a0 4087 ac_cv_prog_cc_c89=no
6bae0ccf 4088ac_save_CC=$CC
ae1362a3 4089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4090/* end confdefs.h. */
6bae0ccf
DL
4091#include <stdarg.h>
4092#include <stdio.h>
4093#include <sys/types.h>
4094#include <sys/stat.h>
4095/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4096struct buf { int x; };
4097FILE * (*rcsopen) (struct buf *, struct stat *, int);
4098static char *e (p, i)
4099 char **p;
4100 int i;
4101{
4102 return p[i];
4103}
4104static char *f (char * (*g) (char **, int), char **p, ...)
4105{
4106 char *s;
4107 va_list v;
4108 va_start (v,p);
4109 s = g (p, va_arg (v,int));
4110 va_end (v);
4111 return s;
4112}
edfaf76d
LK
4113
4114/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4115 function prototypes and stuff, but not '\xHH' hex character constants.
4116 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 4117 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
4118 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4119 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 4120 that's true only with -std. */
edfaf76d
LK
4121int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4122
ca81d7a0
JD
4123/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4124 inside strings and character constants. */
4125#define FOO(x) 'x'
4126int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4127
6bae0ccf
DL
4128int test (int i, double x);
4129struct s1 {int (*f) (int a);};
4130struct s2 {int (*f) (double a);};
4131int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4132int argc;
4133char **argv;
4134int
4135main ()
4136{
4137return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4138 ;
4139 return 0;
4140}
4141_ACEOF
ca81d7a0
JD
4142for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4143 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
4144do
4145 CC="$ac_save_CC $ac_arg"
ae1362a3 4146 if ac_fn_c_try_compile "$LINENO"; then :
ca81d7a0 4147 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf 4148fi
ca81d7a0
JD
4149rm -f core conftest.err conftest.$ac_objext
4150 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 4151done
ca81d7a0 4152rm -f conftest.$ac_ext
6bae0ccf
DL
4153CC=$ac_save_CC
4154
4155fi
ca81d7a0
JD
4156# AC_CACHE_VAL
4157case "x$ac_cv_prog_cc_c89" in
4158 x)
ae1362a3 4159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
e9a63f04 4160$as_echo "none needed" >&6; } ;;
ca81d7a0 4161 xno)
ae1362a3 4162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
e9a63f04 4163$as_echo "unsupported" >&6; } ;;
6bae0ccf 4164 *)
ca81d7a0 4165 CC="$CC $ac_cv_prog_cc_c89"
ae1362a3 4166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
e9a63f04 4167$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf 4168esac
ae1362a3 4169if test "x$ac_cv_prog_cc_c89" != xno; then :
6bae0ccf 4170
ae1362a3 4171fi
19650fd6 4172
503d2be0
AS
4173ac_ext=c
4174ac_cpp='$CPP $CPPFLAGS'
4175ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4176ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4177ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4178
c0d27fcc 4179
ba4481b5
DL
4180# On Suns, sometimes $CPP names a directory.
4181if test -n "$CPP" && test -d "$CPP"; then
4182 CPP=
4183fi
4184
089a966d
GM
4185## If not using gcc, and on Solaris, and no CPP specified, see if
4186## using a Sun compiler, which needs -Xs to prevent whitespace.
4187if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4188 test x"$CPP" = x; then
ae1362a3 4189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
e9a63f04 4190$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
089a966d 4191
ae1362a3 4192if test "${emacs_cv_sunpro_c+set}" = set; then :
e9a63f04 4193 $as_echo_n "(cached) " >&6
089a966d 4194else
ae1362a3 4195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
089a966d
GM
4196/* end confdefs.h. */
4197
4198int
4199main ()
4200{
4201#ifndef __SUNPRO_C
4202fail;
4203#endif
4204
4205 ;
4206 return 0;
4207}
4208_ACEOF
ae1362a3 4209if ac_fn_c_try_link "$LINENO"; then :
089a966d
GM
4210 emacs_cv_sunpro_c=yes
4211else
ae1362a3 4212 emacs_cv_sunpro_c=no
089a966d 4213fi
ae1362a3
AS
4214rm -f core conftest.err conftest.$ac_objext \
4215 conftest$ac_exeext conftest.$ac_ext
089a966d
GM
4216fi
4217
ae1362a3 4218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
e9a63f04 4219$as_echo "$emacs_cv_sunpro_c" >&6; }
089a966d
GM
4220
4221 if test x"$emacs_cv_sunpro_c" = xyes; then
4222 NON_GNU_CPP="$CC -E -Xs"
4223 fi
4224fi
4225
ba4481b5
DL
4226#### Some systems specify a CPP to use unless we are using GCC.
4227#### Now that we know whether we are using GCC, we can decide whether
4228#### to use that one.
4229if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4230then
4231 CPP="$NON_GNU_CPP"
4232fi
4233
4234#### Some systems specify a CC to use unless we are using GCC.
4235#### Now that we know whether we are using GCC, we can decide whether
4236#### to use that one.
4237if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4238 test x$cc_specified != xyes
4239then
4240 CC="$NON_GNU_CC"
4241fi
4242
4243if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4244then
4245 CC="$CC $GCC_TEST_OPTIONS"
4246fi
4247
4248if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4249then
4250 CC="$CC $NON_GCC_TEST_OPTIONS"
4251fi
4252
e143ad11
AS
4253ac_ext=c
4254ac_cpp='$CPP $CPPFLAGS'
4255ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4256ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4257ac_compiler_gnu=$ac_cv_c_compiler_gnu
ae1362a3 4258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
e9a63f04 4259$as_echo_n "checking how to run the C preprocessor... " >&6; }
e143ad11
AS
4260# On Suns, sometimes $CPP names a directory.
4261if test -n "$CPP" && test -d "$CPP"; then
4262 CPP=
4263fi
4264if test -z "$CPP"; then
ae1362a3 4265 if test "${ac_cv_prog_CPP+set}" = set; then :
e9a63f04 4266 $as_echo_n "(cached) " >&6
e143ad11
AS
4267else
4268 # Double quotes because CPP needs to be expanded
4269 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4270 do
4271 ac_preproc_ok=false
4272for ac_c_preproc_warn_flag in '' yes
4273do
4274 # Use a header file that comes with gcc, so configuring glibc
4275 # with a fresh cross-compiler works.
4276 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4277 # <limits.h> exists even on freestanding compilers.
4278 # On the NeXT, cc -E runs the code through the compiler's parser,
4279 # not just through cpp. "Syntax error" is here to catch this case.
ae1362a3 4280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e143ad11
AS
4281/* end confdefs.h. */
4282#ifdef __STDC__
4283# include <limits.h>
4284#else
4285# include <assert.h>
4286#endif
4287 Syntax error
4288_ACEOF
ae1362a3
AS
4289if ac_fn_c_try_cpp "$LINENO"; then :
4290
0ca10bb7 4291else
bf89cb4d 4292 # Broken: fails on valid input.
e143ad11
AS
4293continue
4294fi
1f10e750 4295rm -f conftest.err conftest.i conftest.$ac_ext
e143ad11 4296
ca81d7a0 4297 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11 4298 # can be detected and how.
ae1362a3 4299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e143ad11
AS
4300/* end confdefs.h. */
4301#include <ac_nonexistent.h>
4302_ACEOF
ae1362a3 4303if ac_fn_c_try_cpp "$LINENO"; then :
e143ad11
AS
4304 # Broken: success on invalid input.
4305continue
4306else
e143ad11
AS
4307 # Passes both tests.
4308ac_preproc_ok=:
4309break
4310fi
1f10e750 4311rm -f conftest.err conftest.i conftest.$ac_ext
e143ad11
AS
4312
4313done
4314# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1f10e750 4315rm -f conftest.i conftest.err conftest.$ac_ext
ae1362a3 4316if $ac_preproc_ok; then :
e143ad11
AS
4317 break
4318fi
4319
4320 done
4321 ac_cv_prog_CPP=$CPP
4322
4323fi
4324 CPP=$ac_cv_prog_CPP
4325else
4326 ac_cv_prog_CPP=$CPP
4327fi
ae1362a3 4328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
e9a63f04 4329$as_echo "$CPP" >&6; }
e143ad11
AS
4330ac_preproc_ok=false
4331for ac_c_preproc_warn_flag in '' yes
4332do
4333 # Use a header file that comes with gcc, so configuring glibc
4334 # with a fresh cross-compiler works.
4335 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4336 # <limits.h> exists even on freestanding compilers.
4337 # On the NeXT, cc -E runs the code through the compiler's parser,
4338 # not just through cpp. "Syntax error" is here to catch this case.
ae1362a3 4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e143ad11
AS
4340/* end confdefs.h. */
4341#ifdef __STDC__
4342# include <limits.h>
4343#else
4344# include <assert.h>
4345#endif
4346 Syntax error
4347_ACEOF
ae1362a3 4348if ac_fn_c_try_cpp "$LINENO"; then :
bf89cb4d 4349
ae1362a3 4350else
e143ad11
AS
4351 # Broken: fails on valid input.
4352continue
4353fi
1f10e750 4354rm -f conftest.err conftest.i conftest.$ac_ext
e143ad11 4355
ca81d7a0 4356 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11 4357 # can be detected and how.
ae1362a3 4358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e143ad11
AS
4359/* end confdefs.h. */
4360#include <ac_nonexistent.h>
4361_ACEOF
ae1362a3 4362if ac_fn_c_try_cpp "$LINENO"; then :
e143ad11
AS
4363 # Broken: success on invalid input.
4364continue
4365else
e143ad11
AS
4366 # Passes both tests.
4367ac_preproc_ok=:
4368break
4369fi
1f10e750 4370rm -f conftest.err conftest.i conftest.$ac_ext
e143ad11
AS
4371
4372done
4373# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1f10e750 4374rm -f conftest.i conftest.err conftest.$ac_ext
ae1362a3
AS
4375if $ac_preproc_ok; then :
4376
e143ad11 4377else
ae1362a3
AS
4378 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4379$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1f10e750
CY
4380as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4381See \`config.log' for more details" "$LINENO" 5; }
e143ad11
AS
4382fi
4383
4384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389
4390
ae1362a3 4391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
e9a63f04 4392$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
ae1362a3 4393if test "${ac_cv_path_GREP+set}" = set; then :
e9a63f04 4394 $as_echo_n "(cached) " >&6
ca81d7a0 4395else
e9a63f04 4396 if test -z "$GREP"; then
ca81d7a0 4397 ac_path_GREP_found=false
e9a63f04
GM
4398 # Loop through the user's path and test for each of PROGNAME-LIST
4399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0
JD
4400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4401do
4402 IFS=$as_save_IFS
4403 test -z "$as_dir" && as_dir=.
ae1362a3 4404 for ac_prog in grep ggrep; do
e9a63f04
GM
4405 for ac_exec_ext in '' $ac_executable_extensions; do
4406 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4407 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4408# Check for GNU ac_path_GREP and select it if it is found.
ca81d7a0
JD
4409 # Check for GNU $ac_path_GREP
4410case `"$ac_path_GREP" --version 2>&1` in
4411*GNU*)
4412 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4413*)
4414 ac_count=0
e9a63f04 4415 $as_echo_n 0123456789 >"conftest.in"
ca81d7a0
JD
4416 while :
4417 do
4418 cat "conftest.in" "conftest.in" >"conftest.tmp"
4419 mv "conftest.tmp" "conftest.in"
4420 cp "conftest.in" "conftest.nl"
e9a63f04 4421 $as_echo 'GREP' >> "conftest.nl"
ca81d7a0
JD
4422 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4423 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ae1362a3 4424 as_fn_arith $ac_count + 1 && ac_count=$as_val
ca81d7a0
JD
4425 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4426 # Best one so far, save it but keep looking for a better one
4427 ac_cv_path_GREP="$ac_path_GREP"
4428 ac_path_GREP_max=$ac_count
4429 fi
4430 # 10*(2^10) chars as input seems more than enough
4431 test $ac_count -gt 10 && break
4432 done
4433 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4434esac
4435
e9a63f04
GM
4436 $ac_path_GREP_found && break 3
4437 done
ca81d7a0 4438 done
ae1362a3 4439 done
ca81d7a0 4440IFS=$as_save_IFS
e9a63f04 4441 if test -z "$ac_cv_path_GREP"; then
1f10e750 4442 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
e9a63f04 4443 fi
ca81d7a0
JD
4444else
4445 ac_cv_path_GREP=$GREP
4446fi
4447
ca81d7a0 4448fi
ae1362a3 4449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
e9a63f04 4450$as_echo "$ac_cv_path_GREP" >&6; }
ca81d7a0
JD
4451 GREP="$ac_cv_path_GREP"
4452
4453
ae1362a3 4454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
e9a63f04 4455$as_echo_n "checking for egrep... " >&6; }
ae1362a3 4456if test "${ac_cv_path_EGREP+set}" = set; then :
e9a63f04 4457 $as_echo_n "(cached) " >&6
e143ad11 4458else
ca81d7a0
JD
4459 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4460 then ac_cv_path_EGREP="$GREP -E"
4461 else
e9a63f04 4462 if test -z "$EGREP"; then
ca81d7a0 4463 ac_path_EGREP_found=false
e9a63f04
GM
4464 # Loop through the user's path and test for each of PROGNAME-LIST
4465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ca81d7a0
JD
4466for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4467do
4468 IFS=$as_save_IFS
4469 test -z "$as_dir" && as_dir=.
ae1362a3 4470 for ac_prog in egrep; do
e9a63f04
GM
4471 for ac_exec_ext in '' $ac_executable_extensions; do
4472 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4473 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4474# Check for GNU ac_path_EGREP and select it if it is found.
ca81d7a0
JD
4475 # Check for GNU $ac_path_EGREP
4476case `"$ac_path_EGREP" --version 2>&1` in
4477*GNU*)
4478 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4479*)
4480 ac_count=0
e9a63f04 4481 $as_echo_n 0123456789 >"conftest.in"
ca81d7a0
JD
4482 while :
4483 do
4484 cat "conftest.in" "conftest.in" >"conftest.tmp"
4485 mv "conftest.tmp" "conftest.in"
4486 cp "conftest.in" "conftest.nl"
e9a63f04 4487 $as_echo 'EGREP' >> "conftest.nl"
ca81d7a0
JD
4488 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4489 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
ae1362a3 4490 as_fn_arith $ac_count + 1 && ac_count=$as_val
ca81d7a0
JD
4491 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4492 # Best one so far, save it but keep looking for a better one
4493 ac_cv_path_EGREP="$ac_path_EGREP"
4494 ac_path_EGREP_max=$ac_count
e143ad11 4495 fi
ca81d7a0
JD
4496 # 10*(2^10) chars as input seems more than enough
4497 test $ac_count -gt 10 && break
4498 done
4499 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4500esac
4501
e9a63f04
GM
4502 $ac_path_EGREP_found && break 3
4503 done
ca81d7a0 4504 done
ae1362a3 4505 done
ca81d7a0 4506IFS=$as_save_IFS
e9a63f04 4507 if test -z "$ac_cv_path_EGREP"; then
1f10e750 4508 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
e9a63f04 4509 fi
ca81d7a0
JD
4510else
4511 ac_cv_path_EGREP=$EGREP
4512fi
e143ad11 4513
ca81d7a0 4514 fi
8eeae1c9 4515fi
ae1362a3 4516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
e9a63f04 4517$as_echo "$ac_cv_path_EGREP" >&6; }
ca81d7a0 4518 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4519
4520
ae1362a3 4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
e9a63f04 4522$as_echo_n "checking for ANSI C header files... " >&6; }
ae1362a3 4523if test "${ac_cv_header_stdc+set}" = set; then :
e9a63f04 4524 $as_echo_n "(cached) " >&6
a51f4969 4525else
ae1362a3 4526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4527/* end confdefs.h. */
4528#include <stdlib.h>
4529#include <stdarg.h>
4530#include <string.h>
4531#include <float.h>
4532
4533int
4534main ()
4535{
4536
4537 ;
4538 return 0;
4539}
4540_ACEOF
ae1362a3 4541if ac_fn_c_try_compile "$LINENO"; then :
a51f4969
SM
4542 ac_cv_header_stdc=yes
4543else
ae1362a3 4544 ac_cv_header_stdc=no
a51f4969 4545fi
a51f4969
SM
4546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4547
4548if test $ac_cv_header_stdc = yes; then
4549 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ae1362a3 4550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4551/* end confdefs.h. */
4552#include <string.h>
4553
4554_ACEOF
4555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3
AS
4556 $EGREP "memchr" >/dev/null 2>&1; then :
4557
a51f4969
SM
4558else
4559 ac_cv_header_stdc=no
4560fi
4561rm -f conftest*
4562
4563fi
4564
4565if test $ac_cv_header_stdc = yes; then
4566 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ae1362a3 4567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4568/* end confdefs.h. */
4569#include <stdlib.h>
4570
4571_ACEOF
4572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3
AS
4573 $EGREP "free" >/dev/null 2>&1; then :
4574
a51f4969
SM
4575else
4576 ac_cv_header_stdc=no
4577fi
4578rm -f conftest*
4579
4580fi
4581
4582if test $ac_cv_header_stdc = yes; then
4583 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ae1362a3 4584 if test "$cross_compiling" = yes; then :
a51f4969
SM
4585 :
4586else
ae1362a3 4587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4588/* end confdefs.h. */
4589#include <ctype.h>
4590#include <stdlib.h>
4591#if ((' ' & 0x0FF) == 0x020)
4592# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4593# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4594#else
4595# define ISLOWER(c) \
4596 (('a' <= (c) && (c) <= 'i') \
4597 || ('j' <= (c) && (c) <= 'r') \
4598 || ('s' <= (c) && (c) <= 'z'))
4599# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4600#endif
4601
4602#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4603int
4604main ()
4605{
4606 int i;
4607 for (i = 0; i < 256; i++)
4608 if (XOR (islower (i), ISLOWER (i))
4609 || toupper (i) != TOUPPER (i))
4610 return 2;
4611 return 0;
4612}
4613_ACEOF
ae1362a3 4614if ac_fn_c_try_run "$LINENO"; then :
bf89cb4d 4615
ae1362a3
AS
4616else
4617 ac_cv_header_stdc=no
a51f4969 4618fi
ae1362a3
AS
4619rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4620 conftest.$ac_objext conftest.beam conftest.$ac_ext
a51f4969
SM
4621fi
4622
a51f4969
SM
4623fi
4624fi
ae1362a3 4625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
e9a63f04 4626$as_echo "$ac_cv_header_stdc" >&6; }
a51f4969
SM
4627if test $ac_cv_header_stdc = yes; then
4628
ae1362a3 4629$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a51f4969
SM
4630
4631fi
4632
4633# On IRIX 5.3, sys/types and inttypes.h are conflicting.
a51f4969
SM
4634for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4635 inttypes.h stdint.h unistd.h
ae1362a3
AS
4636do :
4637 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4638ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4639"
1f10e750 4640if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
a51f4969 4641 cat >>confdefs.h <<_ACEOF
e9a63f04 4642#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
a51f4969
SM
4643_ACEOF
4644
4645fi
4646
4647done
4648
4649
e9a63f04 4650
ae1362a3
AS
4651 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4652if test "x$ac_cv_header_minix_config_h" = x""yes; then :
a51f4969
SM
4653 MINIX=yes
4654else
4655 MINIX=
4656fi
4657
4658
e9a63f04 4659 if test "$MINIX" = yes; then
a51f4969 4660
ae1362a3 4661$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
a51f4969
SM
4662
4663
ae1362a3 4664$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
a51f4969
SM
4665
4666
ae1362a3 4667$as_echo "#define _MINIX 1" >>confdefs.h
a51f4969 4668
e9a63f04 4669 fi
7bbec45b
CY
4670
4671
ae1362a3 4672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
e9a63f04 4673$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
ae1362a3 4674if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
e9a63f04 4675 $as_echo_n "(cached) " >&6
a51f4969 4676else
ae1362a3 4677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a51f4969
SM
4678/* end confdefs.h. */
4679
4680# define __EXTENSIONS__ 1
4681 $ac_includes_default
4682int
4683main ()
4684{
4685
4686 ;
4687 return 0;
4688}
4689_ACEOF
ae1362a3 4690if ac_fn_c_try_compile "$LINENO"; then :
a51f4969
SM
4691 ac_cv_safe_to_define___extensions__=yes
4692else
ae1362a3 4693 ac_cv_safe_to_define___extensions__=no
a51f4969 4694fi
a51f4969
SM
4695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4696fi
ae1362a3 4697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
e9a63f04 4698$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
a51f4969 4699 test $ac_cv_safe_to_define___extensions__ = yes &&
ae1362a3 4700 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
e9a63f04 4701
ae1362a3 4702 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
e9a63f04 4703
ae1362a3 4704 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
e143ad11 4705
ae1362a3 4706 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
e143ad11 4707
ae1362a3 4708 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
e143ad11
AS
4709
4710
4711
01abe918 4712### Use -Wno-pointer-sign if the compiler supports it
ae1362a3 4713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
e9a63f04 4714$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
01abe918
CY
4715SAVE_CFLAGS="$CFLAGS"
4716CFLAGS="$CFLAGS -Wno-pointer-sign"
ae1362a3 4717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
01abe918
CY
4718/* end confdefs.h. */
4719
4720int
4721main ()
4722{
4723
4724 ;
4725 return 0;
4726}
4727_ACEOF
ae1362a3 4728if ac_fn_c_try_compile "$LINENO"; then :
01abe918
CY
4729 has_option=yes
4730else
ae1362a3 4731 has_option=no
01abe918 4732fi
ca81d7a0 4733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4734if test $has_option = yes; then
4735 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4736fi
ae1362a3 4737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
e9a63f04 4738$as_echo "$has_option" >&6; }
01abe918
CY
4739CFLAGS="$SAVE_CFLAGS"
4740unset has_option
4741unset SAVE_CFLAGS
4742
7a2efa6f 4743### Use -Wdeclaration-after-statement if the compiler supports it
ae1362a3 4744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
7a2efa6f
DN
4745$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4746SAVE_CFLAGS="$CFLAGS"
4747CFLAGS="$CFLAGS -Wdeclaration-after-statement"
ae1362a3 4748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7a2efa6f
DN
4749/* end confdefs.h. */
4750
4751int
4752main ()
4753{
4754
4755 ;
4756 return 0;
4757}
4758_ACEOF
ae1362a3 4759if ac_fn_c_try_compile "$LINENO"; then :
7a2efa6f
DN
4760 has_option=yes
4761else
ae1362a3 4762 has_option=no
7a2efa6f 4763fi
7a2efa6f
DN
4764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4765if test $has_option = yes; then
4766 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
4767fi
ae1362a3 4768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
7a2efa6f
DN
4769$as_echo "$has_option" >&6; }
4770CFLAGS="$SAVE_CFLAGS"
4771unset has_option
4772unset SAVE_CFLAGS
4773
6a3a24fa 4774#### Some other nice autoconf tests.
ba4481b5 4775
ae1362a3 4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
e9a63f04 4777$as_echo_n "checking whether ln -s works... " >&6; }
503d2be0
AS
4778LN_S=$as_ln_s
4779if test "$LN_S" = "ln -s"; then
ae1362a3 4780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
e9a63f04 4781$as_echo "yes" >&6; }
ba4481b5 4782else
ae1362a3 4783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
e9a63f04 4784$as_echo "no, using $LN_S" >&6; }
ba4481b5
DL
4785fi
4786
503d2be0
AS
4787ac_ext=c
4788ac_cpp='$CPP $CPPFLAGS'
4789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4791ac_compiler_gnu=$ac_cv_c_compiler_gnu
ae1362a3 4792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
e9a63f04 4793$as_echo_n "checking how to run the C preprocessor... " >&6; }
ba4481b5
DL
4794# On Suns, sometimes $CPP names a directory.
4795if test -n "$CPP" && test -d "$CPP"; then
4796 CPP=
4797fi
4798if test -z "$CPP"; then
ae1362a3 4799 if test "${ac_cv_prog_CPP+set}" = set; then :
e9a63f04 4800 $as_echo_n "(cached) " >&6
503d2be0
AS
4801else
4802 # Double quotes because CPP needs to be expanded
4803 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4804 do
4805 ac_preproc_ok=false
4806for ac_c_preproc_warn_flag in '' yes
4807do
4808 # Use a header file that comes with gcc, so configuring glibc
4809 # with a fresh cross-compiler works.
19650fd6
AS
4810 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4811 # <limits.h> exists even on freestanding compilers.
ba4481b5 4812 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0 4813 # not just through cpp. "Syntax error" is here to catch this case.
ae1362a3 4814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6
AS
4815/* end confdefs.h. */
4816#ifdef __STDC__
4817# include <limits.h>
4818#else
4819# include <assert.h>
4820#endif
edfaf76d 4821 Syntax error
503d2be0 4822_ACEOF
ae1362a3 4823if ac_fn_c_try_cpp "$LINENO"; then :
bf89cb4d 4824
ae1362a3 4825else
503d2be0
AS
4826 # Broken: fails on valid input.
4827continue
4828fi
1f10e750 4829rm -f conftest.err conftest.i conftest.$ac_ext
503d2be0 4830
ca81d7a0 4831 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0 4832 # can be detected and how.
ae1362a3 4833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4834/* end confdefs.h. */
503d2be0
AS
4835#include <ac_nonexistent.h>
4836_ACEOF
ae1362a3 4837if ac_fn_c_try_cpp "$LINENO"; then :
503d2be0
AS
4838 # Broken: success on invalid input.
4839continue
c4bb2108 4840else
503d2be0
AS
4841 # Passes both tests.
4842ac_preproc_ok=:
4843break
4844fi
1f10e750 4845rm -f conftest.err conftest.i conftest.$ac_ext
503d2be0
AS
4846
4847done
4848# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1f10e750 4849rm -f conftest.i conftest.err conftest.$ac_ext
ae1362a3 4850if $ac_preproc_ok; then :
503d2be0
AS
4851 break
4852fi
4853
4854 done
4855 ac_cv_prog_CPP=$CPP
4856
4857fi
4858 CPP=$ac_cv_prog_CPP
4859else
4860 ac_cv_prog_CPP=$CPP
4861fi
ae1362a3 4862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
e9a63f04 4863$as_echo "$CPP" >&6; }
503d2be0
AS
4864ac_preproc_ok=false
4865for ac_c_preproc_warn_flag in '' yes
4866do
4867 # Use a header file that comes with gcc, so configuring glibc
4868 # with a fresh cross-compiler works.
19650fd6
AS
4869 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4870 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4871 # On the NeXT, cc -E runs the code through the compiler's parser,
4872 # not just through cpp. "Syntax error" is here to catch this case.
ae1362a3 4873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6
AS
4874/* end confdefs.h. */
4875#ifdef __STDC__
4876# include <limits.h>
4877#else
4878# include <assert.h>
4879#endif
edfaf76d 4880 Syntax error
503d2be0 4881_ACEOF
ae1362a3 4882if ac_fn_c_try_cpp "$LINENO"; then :
bf89cb4d 4883
ae1362a3 4884else
503d2be0
AS
4885 # Broken: fails on valid input.
4886continue
4887fi
1f10e750 4888rm -f conftest.err conftest.i conftest.$ac_ext
503d2be0 4889
ca81d7a0 4890 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0 4891 # can be detected and how.
ae1362a3 4892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 4893/* end confdefs.h. */
503d2be0
AS
4894#include <ac_nonexistent.h>
4895_ACEOF
ae1362a3 4896if ac_fn_c_try_cpp "$LINENO"; then :
503d2be0
AS
4897 # Broken: success on invalid input.
4898continue
4899else
503d2be0
AS
4900 # Passes both tests.
4901ac_preproc_ok=:
4902break
ba4481b5 4903fi
1f10e750 4904rm -f conftest.err conftest.i conftest.$ac_ext
503d2be0
AS
4905
4906done
4907# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1f10e750 4908rm -f conftest.i conftest.err conftest.$ac_ext
ae1362a3
AS
4909if $ac_preproc_ok; then :
4910
ba4481b5 4911else
ae1362a3
AS
4912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1f10e750
CY
4914as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4915See \`config.log' for more details" "$LINENO" 5; }
ba4481b5 4916fi
503d2be0
AS
4917
4918ac_ext=c
4919ac_cpp='$CPP $CPPFLAGS'
4920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4922ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4923
4924# Find a good install program. We prefer a C program (faster),
4925# so one script is as good as another. But avoid the broken or
4926# incompatible versions:
4927# SysV /etc/install, /usr/sbin/install
4928# SunOS /usr/etc/install
4929# IRIX /sbin/install
4930# AIX /bin/install
503d2be0 4931# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4932# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4933# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4934# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4935# OS/2's system install, which has a completely different semantic
ba4481b5 4936# ./install, which can be erroneously created by make from ./install.sh.
e9a63f04 4937# Reject install programs that cannot install multiple files.
ae1362a3 4938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
e9a63f04 4939$as_echo_n "checking for a BSD-compatible install... " >&6; }
ba4481b5 4940if test -z "$INSTALL"; then
ae1362a3 4941if test "${ac_cv_path_install+set}" = set; then :
e9a63f04 4942 $as_echo_n "(cached) " >&6
ba4481b5 4943else
c0d27fcc
MR
4944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4945for as_dir in $PATH
4946do
4947 IFS=$as_save_IFS
4948 test -z "$as_dir" && as_dir=.
ae1362a3
AS
4949 # Account for people who put trailing slashes in PATH elements.
4950case $as_dir/ in #((
4951 ./ | .// | /[cC]/* | \
c0d27fcc 4952 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
ae1362a3 4953 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
c0d27fcc
MR
4954 /usr/ucb/* ) ;;
4955 *)
4956 # OSF1 and SCO ODT 3.0 have their own names for install.
4957 # Don't use installbsd from OSF since it installs stuff as root
4958 # by default.
4959 for ac_prog in ginstall scoinst install; do
4960 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4961 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4962 if test $ac_prog = install &&
4963 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4964 # AIX install. It has an incompatible calling convention.
4965 :
4966 elif test $ac_prog = install &&
4967 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4968 # program-specific install script used by HP pwplus--don't use.
4969 :
4970 else
e9a63f04
GM
4971 rm -rf conftest.one conftest.two conftest.dir
4972 echo one > conftest.one
4973 echo two > conftest.two
4974 mkdir conftest.dir
4975 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4976 test -s conftest.one && test -s conftest.two &&
4977 test -s conftest.dir/conftest.one &&
4978 test -s conftest.dir/conftest.two
4979 then
4980 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4981 break 3
4982 fi
edfaf76d
LK
4983 fi
4984 fi
ba4481b5 4985 done
c0d27fcc
MR
4986 done
4987 ;;
4988esac
e9a63f04 4989
ae1362a3 4990 done
ca81d7a0 4991IFS=$as_save_IFS
c0d27fcc 4992
e9a63f04 4993rm -rf conftest.one conftest.two conftest.dir
ba4481b5
DL
4994
4995fi
4996 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4997 INSTALL=$ac_cv_path_install
ba4481b5 4998 else
ca81d7a0
JD
4999 # As a last resort, use the slow shell script. Don't cache a
5000 # value for INSTALL within a source directory, because that will
ba4481b5 5001 # break other packages using the cache if that directory is
ca81d7a0 5002 # removed, or if the value is a relative name.
503d2be0 5003 INSTALL=$ac_install_sh
ba4481b5
DL
5004 fi
5005fi
ae1362a3 5006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
e9a63f04 5007$as_echo "$INSTALL" >&6; }
ba4481b5
DL
5008
5009# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5010# It thinks the first close brace ends the variable substitution.
5011test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5012
503d2be0 5013test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5014
ba4481b5
DL
5015test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5016
c0d27fcc
MR
5017if test "x$RANLIB" = x; then
5018 if test -n "$ac_tool_prefix"; then
5019 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5020set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ae1362a3 5021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5022$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5023if test "${ac_cv_prog_RANLIB+set}" = set; then :
e9a63f04 5024 $as_echo_n "(cached) " >&6
7397acc4
DL
5025else
5026 if test -n "$RANLIB"; then
5027 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5028else
c0d27fcc
MR
5029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
ae1362a3 5034 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5035 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 5036 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
ae1362a3 5037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
5038 break 2
5039 fi
5040done
ae1362a3 5041 done
ca81d7a0 5042IFS=$as_save_IFS
503d2be0 5043
7397acc4
DL
5044fi
5045fi
503d2be0 5046RANLIB=$ac_cv_prog_RANLIB
7397acc4 5047if test -n "$RANLIB"; then
ae1362a3 5048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
e9a63f04 5049$as_echo "$RANLIB" >&6; }
503d2be0 5050else
ae1362a3 5051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5052$as_echo "no" >&6; }
503d2be0
AS
5053fi
5054
ca81d7a0 5055
503d2be0
AS
5056fi
5057if test -z "$ac_cv_prog_RANLIB"; then
5058 ac_ct_RANLIB=$RANLIB
5059 # Extract the first word of "ranlib", so it can be a program name with args.
5060set dummy ranlib; ac_word=$2
ae1362a3 5061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5062$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5063if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
e9a63f04 5064 $as_echo_n "(cached) " >&6
503d2be0
AS
5065else
5066 if test -n "$ac_ct_RANLIB"; then
5067 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5068else
c0d27fcc
MR
5069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5070for as_dir in $PATH
5071do
5072 IFS=$as_save_IFS
5073 test -z "$as_dir" && as_dir=.
ae1362a3 5074 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5075 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc 5076 ac_cv_prog_ac_ct_RANLIB="ranlib"
ae1362a3 5077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
c0d27fcc
MR
5078 break 2
5079 fi
5080done
ae1362a3 5081 done
ca81d7a0 5082IFS=$as_save_IFS
503d2be0 5083
503d2be0
AS
5084fi
5085fi
5086ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5087if test -n "$ac_ct_RANLIB"; then
ae1362a3 5088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
e9a63f04 5089$as_echo "$ac_ct_RANLIB" >&6; }
503d2be0 5090else
ae1362a3 5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5092$as_echo "no" >&6; }
503d2be0
AS
5093fi
5094
ca81d7a0
JD
5095 if test "x$ac_ct_RANLIB" = x; then
5096 RANLIB=":"
5097 else
5098 case $cross_compiling:$ac_tool_warned in
5099yes:)
ae1362a3
AS
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ca81d7a0
JD
5102ac_tool_warned=yes ;;
5103esac
5104 RANLIB=$ac_ct_RANLIB
5105 fi
7397acc4 5106else
503d2be0 5107 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5108fi
5109
5110fi
9e71690e
DK
5111# Extract the first word of "install-info", so it can be a program name with args.
5112set dummy install-info; ac_word=$2
ae1362a3 5113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5114$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5115if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
e9a63f04 5116 $as_echo_n "(cached) " >&6
9e71690e
DK
5117else
5118 case $INSTALL_INFO in
5119 [\\/]* | ?:[\\/]*)
5120 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5121 ;;
5122 *)
5123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124for as_dir in $PATH
5125do
5126 IFS=$as_save_IFS
5127 test -z "$as_dir" && as_dir=.
ae1362a3 5128 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5129 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5130 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5132 break 2
5133 fi
5134done
ae1362a3 5135 done
ca81d7a0 5136IFS=$as_save_IFS
9e71690e
DK
5137
5138 ;;
5139esac
5140fi
5141INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5142if test -n "$INSTALL_INFO"; then
ae1362a3 5143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
e9a63f04 5144$as_echo "$INSTALL_INFO" >&6; }
9e71690e 5145else
ae1362a3 5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5147$as_echo "no" >&6; }
9e71690e
DK
5148fi
5149
ca81d7a0 5150
9e71690e
DK
5151# Extract the first word of "install-info", so it can be a program name with args.
5152set dummy install-info; ac_word=$2
ae1362a3 5153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5154$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5155if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
e9a63f04 5156 $as_echo_n "(cached) " >&6
9e71690e
DK
5157else
5158 case $INSTALL_INFO in
5159 [\\/]* | ?:[\\/]*)
5160 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5161 ;;
5162 *)
5163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5164for as_dir in /usr/sbin
5165do
5166 IFS=$as_save_IFS
5167 test -z "$as_dir" && as_dir=.
ae1362a3 5168 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5169 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5170 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5172 break 2
5173 fi
5174done
ae1362a3 5175 done
ca81d7a0 5176IFS=$as_save_IFS
9e71690e
DK
5177
5178 ;;
5179esac
5180fi
5181INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5182if test -n "$INSTALL_INFO"; then
ae1362a3 5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
e9a63f04 5184$as_echo "$INSTALL_INFO" >&6; }
9e71690e 5185else
ae1362a3 5186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5187$as_echo "no" >&6; }
9e71690e
DK
5188fi
5189
ca81d7a0 5190
9e71690e
DK
5191# Extract the first word of "install-info", so it can be a program name with args.
5192set dummy install-info; ac_word=$2
ae1362a3 5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5194$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5195if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
e9a63f04 5196 $as_echo_n "(cached) " >&6
9e71690e
DK
5197else
5198 case $INSTALL_INFO in
5199 [\\/]* | ?:[\\/]*)
5200 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5201 ;;
5202 *)
5203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5204for as_dir in /sbin
5205do
5206 IFS=$as_save_IFS
5207 test -z "$as_dir" && as_dir=.
ae1362a3 5208 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5209 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e 5210 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5211 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9e71690e
DK
5212 break 2
5213 fi
5214done
ae1362a3 5215 done
ca81d7a0 5216IFS=$as_save_IFS
9e71690e
DK
5217
5218 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5219 ;;
5220esac
5221fi
5222INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5223if test -n "$INSTALL_INFO"; then
ae1362a3 5224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
e9a63f04 5225$as_echo "$INSTALL_INFO" >&6; }
9e71690e 5226else
ae1362a3 5227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5228$as_echo "no" >&6; }
9e71690e
DK
5229fi
5230
ca81d7a0 5231
8ae52ca6
RF
5232# Extract the first word of "gzip", so it can be a program name with args.
5233set dummy gzip; ac_word=$2
ae1362a3 5234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5235$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5236if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
e9a63f04 5237 $as_echo_n "(cached) " >&6
8ae52ca6 5238else
46e35e9f 5239 case $GZIP_PROG in
8ae52ca6 5240 [\\/]* | ?:[\\/]*)
46e35e9f 5241 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5242 ;;
5243 *)
5244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5245for as_dir in $PATH
5246do
5247 IFS=$as_save_IFS
5248 test -z "$as_dir" && as_dir=.
ae1362a3 5249 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5250 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5251 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5252 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8ae52ca6
RF
5253 break 2
5254 fi
5255done
ae1362a3 5256 done
ca81d7a0 5257IFS=$as_save_IFS
8ae52ca6
RF
5258
5259 ;;
5260esac
5261fi
46e35e9f 5262GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5263if test -n "$GZIP_PROG"; then
ae1362a3 5264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
e9a63f04 5265$as_echo "$GZIP_PROG" >&6; }
8ae52ca6 5266else
ae1362a3 5267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5268$as_echo "no" >&6; }
8ae52ca6
RF
5269fi
5270
ba4481b5 5271
c0d27fcc 5272
ca81d7a0 5273
1bb9a689
MB
5274## Need makeinfo >= 4.6 (?) to build the manuals.
5275# Extract the first word of "makeinfo", so it can be a program name with args.
5276set dummy makeinfo; ac_word=$2
ae1362a3 5277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5278$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5279if test "${ac_cv_path_MAKEINFO+set}" = set; then :
e9a63f04 5280 $as_echo_n "(cached) " >&6
1bb9a689
MB
5281else
5282 case $MAKEINFO in
5283 [\\/]* | ?:[\\/]*)
5284 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5285 ;;
5286 *)
5287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5288for as_dir in $PATH
5289do
5290 IFS=$as_save_IFS
5291 test -z "$as_dir" && as_dir=.
ae1362a3 5292 for ac_exec_ext in '' $ac_executable_extensions; do
1bb9a689
MB
5293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5294 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5295 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1bb9a689
MB
5296 break 2
5297 fi
5298done
ae1362a3 5299 done
1bb9a689
MB
5300IFS=$as_save_IFS
5301
5302 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5303 ;;
5304esac
5305fi
5306MAKEINFO=$ac_cv_path_MAKEINFO
5307if test -n "$MAKEINFO"; then
ae1362a3 5308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
e9a63f04 5309$as_echo "$MAKEINFO" >&6; }
1bb9a689 5310else
ae1362a3 5311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5312$as_echo "no" >&6; }
1bb9a689
MB
5313fi
5314
5315
5316if test "$MAKEINFO" != "no" && \
d4840f44 5317 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
5318 MAKEINFO=no
5319fi
5320
e1b89931
GM
5321## Makeinfo is unusual. For a released Emacs, the manuals are
5322## pre-built, and not deleted by the normal clean rules. makeinfo is
5323## therefore in the category of "special tools" not normally required, which
5324## configure does not have to check for (eg autoconf itself).
8bb25908
KF
5325## In a Bazaar checkout on the other hand, the manuals are not included.
5326## So makeinfo is a requirement to build from Bazaar, and configure
e1b89931
GM
5327## should test for it as it does for any other build requirement.
5328## We use the presence of $srcdir/info/emacs to distinguish a release,
8bb25908 5329## with pre-built manuals, from a Bazaar checkout.
e1b89931
GM
5330if test "$MAKEINFO" = "no"; then
5331 if test "x${with_makeinfo}" = "xno"; then
5332 MAKEINFO=off
5333 elif ! test -e $srcdir/info/emacs; then
1f10e750 5334 as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your
e1b89931 5335source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5336Either install a suitable version of makeinfo, or re-run configure
ae1362a3 5337with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
e1b89931 5338 fi
921fbdf0 5339fi
1bb9a689
MB
5340
5341
8e967cf7
MR
5342if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5343then
5344 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5345fi
5346
5347if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5348then
5349 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5350fi
5351
c0d27fcc 5352
fe239f0f 5353late_LDFLAGS=$LDFLAGS
4af002d6 5354if test "$GCC" = yes; then
fe239f0f
AS
5355 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5356else
5357 LDFLAGS="$LDFLAGS -znocombreloc"
5358fi
5359
ae1362a3 5360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
e9a63f04 5361$as_echo_n "checking for -znocombreloc... " >&6; }
ae1362a3
AS
5362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5363/* end confdefs.h. */
fe239f0f
AS
5364main(){return 0;}
5365_ACEOF
ae1362a3
AS
5366if ac_fn_c_try_link "$LINENO"; then :
5367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
e9a63f04 5368$as_echo "yes" >&6; }
fe239f0f 5369else
ae1362a3
AS
5370 LDFLAGS=$late_LDFLAGS
5371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5372$as_echo "no" >&6; }
fe239f0f 5373fi
ae1362a3
AS
5374rm -f core conftest.err conftest.$ac_objext \
5375 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5376
3b33a005
DL
5377#### Extract some information from the operating system and machine files.
5378
ae1362a3 5379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine- and system-dependent files to find out
3b33a005 5380 - which libraries the lib-src programs will want, and
503d2be0 5381 - whether the GNU malloc routines are usable..." >&5
e9a63f04 5382$as_echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5383 - which libraries the lib-src programs will want, and
503d2be0 5384 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5385
5386### First figure out CFLAGS (which we use for running the compiler here)
5387### and REAL_CFLAGS (which we use for real compilation).
5388### The two are the same except on a few systems, where they are made
5389### different to work around various lossages. For example,
5390### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5391### as implying static linking.
5392
5393### If the CFLAGS env var is specified, we use that value
5394### instead of the default.
5395
5396### It's not important that this name contain the PID; you can't run
5397### two configures in the same directory and have anything work
5398### anyway.
5399tempcname="conftest.c"
5400
5401echo '
5402#include "'${srcdir}'/src/'${opsysfile}'"
5403#include "'${srcdir}'/src/'${machfile}'"
5404#ifndef LIBS_MACHINE
5405#define LIBS_MACHINE
5406#endif
5407#ifndef LIBS_SYSTEM
5408#define LIBS_SYSTEM
5409#endif
5410#ifndef C_SWITCH_SYSTEM
5411#define C_SWITCH_SYSTEM
5412#endif
5413#ifndef C_SWITCH_MACHINE
5414#define C_SWITCH_MACHINE
5415#endif
5416configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5417configure___ c_switch_system=C_SWITCH_SYSTEM
5418configure___ c_switch_machine=C_SWITCH_MACHINE
5419
5420#ifndef LIB_X11_LIB
5421#define LIB_X11_LIB -lX11
5422#endif
5423
3b33a005
DL
5424#ifndef LIBX11_SYSTEM
5425#define LIBX11_SYSTEM
5426#endif
9d2818d6 5427configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5428
5429#ifdef UNEXEC
5430configure___ unexec=UNEXEC
5431#else
5432configure___ unexec=unexec.o
5433#endif
5434
5435#ifdef SYSTEM_MALLOC
5436configure___ system_malloc=yes
5437#else
5438configure___ system_malloc=no
5439#endif
5440
ef9e4345
GM
5441#ifdef USE_MMAP_FOR_BUFFERS
5442configure___ use_mmap_for_buffers=yes
73b77ee5 5443#else
ef9e4345 5444configure___ use_mmap_for_buffers=no
73b77ee5
GM
5445#endif
5446
3b33a005
DL
5447#ifndef C_DEBUG_SWITCH
5448#define C_DEBUG_SWITCH -g
5449#endif
5450
5451#ifndef C_OPTIMIZE_SWITCH
5452#ifdef __GNUC__
5453#define C_OPTIMIZE_SWITCH -O2
5454#else
5455#define C_OPTIMIZE_SWITCH -O
5456#endif
5457#endif
5458
01abe918
CY
5459#ifndef C_WARNINGS_SWITCH
5460#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5461#endif
5462
3b33a005
DL
5463#ifndef LD_SWITCH_MACHINE
5464#define LD_SWITCH_MACHINE
5465#endif
5466
5467#ifndef LD_SWITCH_SYSTEM
5468#define LD_SWITCH_SYSTEM
5469#endif
5470
5471#ifndef LD_SWITCH_X_SITE_AUX
5472#define LD_SWITCH_X_SITE_AUX
503d2be0 5473#endif
3b33a005
DL
5474
5475configure___ ld_switch_system=LD_SWITCH_SYSTEM
5476configure___ ld_switch_machine=LD_SWITCH_MACHINE
5477
5478#ifdef THIS_IS_CONFIGURE
5479
5480/* Get the CFLAGS for tests in configure. */
5481#ifdef __GNUC__
5482configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5483#else
5484configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5485#endif
5486
5487#else /* not THIS_IS_CONFIGURE */
5488
5489/* Get the CFLAGS for real compilation. */
5490#ifdef __GNUC__
9fe40f0e 5491configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
3b33a005
DL
5492#else
5493configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5494#endif
5495
5496#endif /* not THIS_IS_CONFIGURE */
5497' > ${tempcname}
5498
9fe40f0e
DN
5499LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
5500
3b33a005
DL
5501# The value of CPP is a quoted variable reference, so we need to do this
5502# to get its actual value...
5503CPP=`eval "echo $CPP"`
5504eval `${CPP} -Isrc ${tempcname} \
5505 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5506if test "x$SPECIFIED_CFLAGS" = x; then
5507 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5508 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5509else
5510 REAL_CFLAGS="$CFLAGS"
5511fi
5512rm ${tempcname}
5513
5514ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5515
5516### Make sure subsequent tests use flags consistent with the build flags.
5517
5518if test x"${OVERRIDE_CPPFLAGS}" != x; then
5519 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5520else
5521 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5522fi
5523
6bae0ccf
DL
5524
5525
ca81d7a0 5526# Check whether --enable-largefile was given.
ae1362a3 5527if test "${enable_largefile+set}" = set; then :
ca81d7a0
JD
5528 enableval=$enable_largefile;
5529fi
f4988be7 5530
503d2be0 5531if test "$enable_largefile" != no; then
f4988be7 5532
ae1362a3 5533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
e9a63f04 5534$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
ae1362a3 5535if test "${ac_cv_sys_largefile_CC+set}" = set; then :
e9a63f04 5536 $as_echo_n "(cached) " >&6
ba4481b5 5537else
f4988be7 5538 ac_cv_sys_largefile_CC=no
503d2be0
AS
5539 if test "$GCC" != yes; then
5540 ac_save_CC=$CC
5541 while :; do
ca81d7a0
JD
5542 # IRIX 6.2 and later do not support large files by default,
5543 # so use the C compiler's -n32 option if that helps.
ae1362a3 5544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5545/* end confdefs.h. */
f4988be7 5546#include <sys/types.h>
503d2be0
AS
5547 /* Check that off_t can represent 2**63 - 1 correctly.
5548 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5549 since some C++ compilers masquerading as C compilers
5550 incorrectly reject 9223372036854775807. */
5551#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5552 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5553 && LARGE_OFF_T % 2147483647 == 1)
5554 ? 1 : -1];
5555int
5556main ()
5557{
f4988be7 5558
503d2be0
AS
5559 ;
5560 return 0;
5561}
5562_ACEOF
ae1362a3 5563 if ac_fn_c_try_compile "$LINENO"; then :
503d2be0 5564 break
503d2be0 5565fi
ca81d7a0
JD
5566rm -f core conftest.err conftest.$ac_objext
5567 CC="$CC -n32"
ae1362a3 5568 if ac_fn_c_try_compile "$LINENO"; then :
503d2be0 5569 ac_cv_sys_largefile_CC=' -n32'; break
503d2be0 5570fi
ca81d7a0 5571rm -f core conftest.err conftest.$ac_objext
edfaf76d 5572 break
503d2be0
AS
5573 done
5574 CC=$ac_save_CC
5575 rm -f conftest.$ac_ext
5576 fi
b192d653 5577fi
ae1362a3 5578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
e9a63f04 5579$as_echo "$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5580 if test "$ac_cv_sys_largefile_CC" != no; then
5581 CC=$CC$ac_cv_sys_largefile_CC
5582 fi
b192d653 5583
ae1362a3 5584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
e9a63f04 5585$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
ae1362a3 5586if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
e9a63f04 5587 $as_echo_n "(cached) " >&6
ba4481b5 5588else
503d2be0 5589 while :; do
ae1362a3 5590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5591/* end confdefs.h. */
f4988be7 5592#include <sys/types.h>
503d2be0
AS
5593 /* Check that off_t can represent 2**63 - 1 correctly.
5594 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5595 since some C++ compilers masquerading as C compilers
5596 incorrectly reject 9223372036854775807. */
5597#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5598 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5599 && LARGE_OFF_T % 2147483647 == 1)
5600 ? 1 : -1];
5601int
5602main ()
5603{
f4988be7 5604
503d2be0
AS
5605 ;
5606 return 0;
5607}
5608_ACEOF
ae1362a3 5609if ac_fn_c_try_compile "$LINENO"; then :
f053c89f 5610 ac_cv_sys_file_offset_bits=no; break
503d2be0 5611fi
ca81d7a0 5612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3 5613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5614/* end confdefs.h. */
f4988be7
GM
5615#define _FILE_OFFSET_BITS 64
5616#include <sys/types.h>
503d2be0
AS
5617 /* Check that off_t can represent 2**63 - 1 correctly.
5618 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5619 since some C++ compilers masquerading as C compilers
5620 incorrectly reject 9223372036854775807. */
5621#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5622 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5623 && LARGE_OFF_T % 2147483647 == 1)
5624 ? 1 : -1];
5625int
5626main ()
5627{
5628
5629 ;
5630 return 0;
5631}
5632_ACEOF
ae1362a3 5633if ac_fn_c_try_compile "$LINENO"; then :
503d2be0 5634 ac_cv_sys_file_offset_bits=64; break
503d2be0 5635fi
ca81d7a0 5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5637 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5638 break
5639done
ba4481b5 5640fi
ae1362a3 5641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
e9a63f04 5642$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5643case $ac_cv_sys_file_offset_bits in #(
5644 no | unknown) ;;
5645 *)
c0d27fcc 5646cat >>confdefs.h <<_ACEOF
f4988be7 5647#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5648_ACEOF
f053c89f
CY
5649;;
5650esac
e9a63f04 5651rm -rf conftest*
f053c89f 5652 if test $ac_cv_sys_file_offset_bits = unknown; then
ae1362a3 5653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
e9a63f04 5654$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
ae1362a3 5655if test "${ac_cv_sys_large_files+set}" = set; then :
e9a63f04 5656 $as_echo_n "(cached) " >&6
ba4481b5 5657else
503d2be0 5658 while :; do
ae1362a3 5659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5660/* end confdefs.h. */
503d2be0
AS
5661#include <sys/types.h>
5662 /* Check that off_t can represent 2**63 - 1 correctly.
5663 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5664 since some C++ compilers masquerading as C compilers
5665 incorrectly reject 9223372036854775807. */
5666#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5667 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5668 && LARGE_OFF_T % 2147483647 == 1)
5669 ? 1 : -1];
5670int
5671main ()
5672{
ba4481b5 5673
503d2be0
AS
5674 ;
5675 return 0;
5676}
5677_ACEOF
ae1362a3 5678if ac_fn_c_try_compile "$LINENO"; then :
f053c89f 5679 ac_cv_sys_large_files=no; break
503d2be0 5680fi
ca81d7a0 5681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3 5682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5683/* end confdefs.h. */
f4988be7 5684#define _LARGE_FILES 1
503d2be0
AS
5685#include <sys/types.h>
5686 /* Check that off_t can represent 2**63 - 1 correctly.
5687 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5688 since some C++ compilers masquerading as C compilers
5689 incorrectly reject 9223372036854775807. */
5690#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5691 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5692 && LARGE_OFF_T % 2147483647 == 1)
5693 ? 1 : -1];
5694int
5695main ()
5696{
f4988be7 5697
503d2be0
AS
5698 ;
5699 return 0;
5700}
5701_ACEOF
ae1362a3 5702if ac_fn_c_try_compile "$LINENO"; then :
503d2be0 5703 ac_cv_sys_large_files=1; break
503d2be0 5704fi
ca81d7a0 5705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5706 ac_cv_sys_large_files=unknown
503d2be0
AS
5707 break
5708done
ba4481b5 5709fi
ae1362a3 5710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
e9a63f04 5711$as_echo "$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5712case $ac_cv_sys_large_files in #(
5713 no | unknown) ;;
5714 *)
c0d27fcc 5715cat >>confdefs.h <<_ACEOF
f4988be7 5716#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5717_ACEOF
f053c89f
CY
5718;;
5719esac
e9a63f04 5720rm -rf conftest*
f053c89f 5721 fi
503d2be0 5722fi
ba4481b5 5723
c0d27fcc 5724
a7702be6
CY
5725## Note: at present CRT_DIR is only used for amdx86-64 and ibms390x.
5726## Other machine types hard-code the location in src/[ms]/*.h.
bc5d9888 5727case "${canonical}" in
55e6d9b2 5728 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
a7702be6
CY
5729 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5730 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5731 ## For anything else (eg /usr/lib32), it is up the user to specify
5732 ## the location (bug#5655).
5733 ## Test for crtn.o, not just the directory, because sometimes the
5734 ## directory exists but does not have the relevant files (bug#1287).
5735 ## If user specified a crt-dir, use that unconditionally.
5736 if test "X$CRT_DIR" = "X"; then
5737 CRT_DIR=/usr/lib
5738 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5739 fi
bc5d9888 5740
a7702be6 5741 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
1f10e750 5742 as_fn_error $? "crt*.o not found. Use --with-crt-dir to specify the location." "$LINENO" 5
a7702be6 5743 ;;
bc5d9888 5744esac
a7702be6
CY
5745test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
5746
bc5d9888 5747
439f58ee
JD
5748
5749
5750
2c9dccc9
PJ
5751if test "${with_sound}" != "no"; then
5752 # Sound support for GNU/Linux and the free BSDs.
ae1362a3
AS
5753 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5754do :
5755 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5756ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1f10e750 5757if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c0d27fcc 5758 cat >>confdefs.h <<_ACEOF
e9a63f04 5759#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5760_ACEOF
f4988be7
GM
5761
5762fi
c0d27fcc 5763
98418dba
CW
5764done
5765
5766 # Emulation library used on NetBSD.
ae1362a3 5767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
e9a63f04 5768$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
ae1362a3 5769if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
e9a63f04 5770 $as_echo_n "(cached) " >&6
f4988be7 5771else
98418dba
CW
5772 ac_check_lib_save_LIBS=$LIBS
5773LIBS="-lossaudio $LIBS"
ae1362a3 5774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 5775/* end confdefs.h. */
98418dba 5776
ca81d7a0
JD
5777/* Override any GCC internal prototype to avoid an error.
5778 Use char because int might match the return type of a GCC
5779 builtin and then its argument prototype would still apply. */
98418dba
CW
5780#ifdef __cplusplus
5781extern "C"
f4988be7 5782#endif
98418dba 5783char _oss_ioctl ();
503d2be0
AS
5784int
5785main ()
5786{
ca81d7a0 5787return _oss_ioctl ();
503d2be0
AS
5788 ;
5789 return 0;
5790}
5791_ACEOF
ae1362a3 5792if ac_fn_c_try_link "$LINENO"; then :
98418dba 5793 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5794else
ae1362a3 5795 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5796fi
ae1362a3
AS
5797rm -f core conftest.err conftest.$ac_objext \
5798 conftest$ac_exeext conftest.$ac_ext
98418dba 5799LIBS=$ac_check_lib_save_LIBS
f4988be7 5800fi
ae1362a3 5801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
e9a63f04 5802$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
ae1362a3 5803if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
98418dba
CW
5804 LIBSOUND=-lossaudio
5805else
5806 LIBSOUND=
5807fi
5808
c0d27fcc 5809
439f58ee
JD
5810
5811 ALSA_REQUIRED=1.0.0
5812 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
5813
5814 succeeded=no
5815
00b9c927 5816 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 5817set dummy pkg-config; ac_word=$2
ae1362a3 5818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
e9a63f04 5819$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 5820if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
e9a63f04 5821 $as_echo_n "(cached) " >&6
439f58ee
JD
5822else
5823 case $PKG_CONFIG in
5824 [\\/]* | ?:[\\/]*)
5825 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5826 ;;
5827 *)
5828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5829for as_dir in $PATH
5830do
5831 IFS=$as_save_IFS
5832 test -z "$as_dir" && as_dir=.
ae1362a3 5833 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee 5835 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
ae1362a3 5836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
439f58ee
JD
5837 break 2
5838 fi
5839done
ae1362a3 5840 done
ca81d7a0 5841IFS=$as_save_IFS
439f58ee
JD
5842
5843 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
5844 ;;
5845esac
5846fi
5847PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 5848if test -n "$PKG_CONFIG"; then
ae1362a3 5849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
e9a63f04 5850$as_echo "$PKG_CONFIG" >&6; }
439f58ee 5851else
ae1362a3 5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5853$as_echo "no" >&6; }
439f58ee
JD
5854fi
5855
ca81d7a0 5856
439f58ee
JD
5857
5858 if test "$PKG_CONFIG" = "no" ; then
5859 HAVE_ALSA=no
5860 else
5861 PKG_CONFIG_MIN_VERSION=0.9.0
5862 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ae1362a3 5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
e9a63f04 5864$as_echo_n "checking for $ALSA_MODULES... " >&6; }
439f58ee 5865
67db6aa2 5866 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ae1362a3 5867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
e9a63f04 5868$as_echo "yes" >&6; }
439f58ee
JD
5869 succeeded=yes
5870
ae1362a3 5871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
e9a63f04 5872$as_echo_n "checking ALSA_CFLAGS... " >&6; }
94315858 5873 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ae1362a3 5874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
e9a63f04 5875$as_echo "$ALSA_CFLAGS" >&6; }
439f58ee 5876
ae1362a3 5877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
e9a63f04 5878$as_echo_n "checking ALSA_LIBS... " >&6; }
94315858 5879 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ae1362a3 5880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
e9a63f04 5881$as_echo "$ALSA_LIBS" >&6; }
439f58ee 5882 else
ae1362a3 5883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
e9a63f04 5884$as_echo "no" >&6; }
439f58ee
JD
5885 ALSA_CFLAGS=""
5886 ALSA_LIBS=""
5887 ## If we have a custom action on failure, don't print errors, but
5888 ## do set a variable so people can do so.
5889 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5890
5891 fi
5892
5893
5894
5895 else
5896 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
5897 echo "*** See http://www.freedesktop.org/software/pkgconfig"
5898 fi
5899 fi
5900
5901 if test $succeeded = yes; then
5902 HAVE_ALSA=yes
5903 else
5904 HAVE_ALSA=no
5905 fi
5906
5907 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
5908 SAVE_CFLAGS="$CFLAGS"
5909 SAVE_LDFLAGS="$LDFLAGS"
5910 CFLAGS="$ALSA_CFLAGS $CFLAGS"
5911 LDFLAGS="$ALSA_LIBS $LDFLAGS"
ae1362a3 5912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
5913/* end confdefs.h. */
5914#include <asoundlib.h>
5915int
5916main ()
5917{
5918snd_lib_error_set_handler (0);
5919 ;
5920 return 0;
5921}
5922_ACEOF
ae1362a3 5923if ac_fn_c_try_compile "$LINENO"; then :
ca81d7a0
JD
5924 emacs_alsa_normal=yes
5925else
ae1362a3 5926 emacs_alsa_normal=no
ca81d7a0 5927fi
ca81d7a0
JD
5928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929 if test "$emacs_alsa_normal" != yes; then
ae1362a3 5930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
5931/* end confdefs.h. */
5932#include <alsa/asoundlib.h>
5933int
5934main ()
5935{
5936snd_lib_error_set_handler (0);
5937 ;
5938 return 0;
5939}
5940_ACEOF
ae1362a3 5941if ac_fn_c_try_compile "$LINENO"; then :
ca81d7a0
JD
5942 emacs_alsa_subdir=yes
5943else
ae1362a3 5944 emacs_alsa_subdir=no
bf89cb4d 5945fi
bf89cb4d 5946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ca81d7a0 5947 if test "$emacs_alsa_subdir" != yes; then
1f10e750 5948 as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
ca81d7a0
JD
5949 fi
5950 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
5951 fi
5952
5953 CFLAGS="$SAVE_CFLAGS"
5954 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
5955 LIBSOUND="$LIBSOUND $ALSA_LIBS"
5956 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
5957
ae1362a3 5958$as_echo "#define HAVE_ALSA 1" >>confdefs.h
439f58ee
JD
5959
5960 fi
5961
f4988be7 5962fi
c0d27fcc 5963
98418dba
CW
5964for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
5965 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 5966 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 5967 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
c6d09b8d 5968 sys/utsname.h pwd.h utmp.h
ae1362a3
AS
5969do :
5970 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5971ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1f10e750 5972if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
c0d27fcc 5973 cat >>confdefs.h <<_ACEOF
e9a63f04 5974#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5975_ACEOF
34ec9ebe 5976
98418dba 5977fi
c0d27fcc 5978
98418dba
CW
5979done
5980
22044edf 5981
ae1362a3 5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
e9a63f04 5983$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
ae1362a3 5984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
f17e308a
JD
5985/* end confdefs.h. */
5986#include <sys/personality.h>
5987int
5988main ()
5989{
5990personality (PER_LINUX32)
5991 ;
5992 return 0;
5993}
5994_ACEOF
ae1362a3 5995if ac_fn_c_try_compile "$LINENO"; then :
f17e308a
JD
5996 emacs_cv_personality_linux32=yes
5997else
ae1362a3 5998 emacs_cv_personality_linux32=no
f17e308a 5999fi
ca81d7a0 6000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3 6001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
e9a63f04 6002$as_echo "$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6003
6004if test $emacs_cv_personality_linux32 = yes; then
6005
ae1362a3 6006$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
f17e308a
JD
6007
6008fi
6009
22044edf 6010for ac_header in term.h
ae1362a3
AS
6011do :
6012 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6013if test "x$ac_cv_header_term_h" = x""yes; then :
22044edf 6014 cat >>confdefs.h <<_ACEOF
ae1362a3 6015#define HAVE_TERM_H 1
22044edf
DL
6016_ACEOF
6017
6018fi
6019
6020done
6021
ae1362a3 6022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
e9a63f04 6023$as_echo_n "checking for ANSI C header files... " >&6; }
ae1362a3 6024if test "${ac_cv_header_stdc+set}" = set; then :
e9a63f04 6025 $as_echo_n "(cached) " >&6
ba4481b5 6026else
ae1362a3 6027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6028/* end confdefs.h. */
98418dba
CW
6029#include <stdlib.h>
6030#include <stdarg.h>
6031#include <string.h>
6032#include <float.h>
6033
19650fd6
AS
6034int
6035main ()
6036{
6037
6038 ;
6039 return 0;
6040}
98418dba 6041_ACEOF
ae1362a3 6042if ac_fn_c_try_compile "$LINENO"; then :
98418dba 6043 ac_cv_header_stdc=yes
ba4481b5 6044else
ae1362a3 6045 ac_cv_header_stdc=no
ba4481b5 6046fi
ca81d7a0 6047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6048
6049if test $ac_cv_header_stdc = yes; then
6050 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
ae1362a3 6051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6052/* end confdefs.h. */
98418dba
CW
6053#include <string.h>
6054
6055_ACEOF
6056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3
AS
6057 $EGREP "memchr" >/dev/null 2>&1; then :
6058
98418dba
CW
6059else
6060 ac_cv_header_stdc=no
ba4481b5 6061fi
98418dba 6062rm -f conftest*
ba4481b5
DL
6063
6064fi
6065
98418dba
CW
6066if test $ac_cv_header_stdc = yes; then
6067 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
ae1362a3 6068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6069/* end confdefs.h. */
98418dba
CW
6070#include <stdlib.h>
6071
6072_ACEOF
6073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3
AS
6074 $EGREP "free" >/dev/null 2>&1; then :
6075
98418dba
CW
6076else
6077 ac_cv_header_stdc=no
6078fi
6079rm -f conftest*
6080
6081fi
6082
6083if test $ac_cv_header_stdc = yes; then
6084 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
ae1362a3 6085 if test "$cross_compiling" = yes; then :
98418dba 6086 :
d42122a3 6087else
ae1362a3 6088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6089/* end confdefs.h. */
98418dba 6090#include <ctype.h>
ca81d7a0 6091#include <stdlib.h>
98418dba
CW
6092#if ((' ' & 0x0FF) == 0x020)
6093# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6094# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6095#else
19650fd6 6096# define ISLOWER(c) \
edfaf76d
LK
6097 (('a' <= (c) && (c) <= 'i') \
6098 || ('j' <= (c) && (c) <= 'r') \
6099 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6100# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6101#endif
6102
6103#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6104int
6105main ()
6106{
98418dba
CW
6107 int i;
6108 for (i = 0; i < 256; i++)
6109 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6110 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6111 return 2;
6112 return 0;
503d2be0
AS
6113}
6114_ACEOF
ae1362a3 6115if ac_fn_c_try_run "$LINENO"; then :
bf89cb4d 6116
ae1362a3
AS
6117else
6118 ac_cv_header_stdc=no
d42122a3 6119fi
ae1362a3
AS
6120rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6121 conftest.$ac_objext conftest.beam conftest.$ac_ext
d42122a3 6122fi
ca81d7a0 6123
98418dba
CW
6124fi
6125fi
ae1362a3 6126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
e9a63f04 6127$as_echo "$ac_cv_header_stdc" >&6; }
98418dba
CW
6128if test $ac_cv_header_stdc = yes; then
6129
ae1362a3 6130$as_echo "#define STDC_HEADERS 1" >>confdefs.h
d42122a3
DL
6131
6132fi
6133
ae1362a3 6134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
e9a63f04 6135$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
ae1362a3 6136if test "${ac_cv_header_time+set}" = set; then :
e9a63f04 6137 $as_echo_n "(cached) " >&6
ba4481b5 6138else
ae1362a3 6139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6140/* end confdefs.h. */
ba4481b5 6141#include <sys/types.h>
98418dba 6142#include <sys/time.h>
ba4481b5 6143#include <time.h>
503d2be0
AS
6144
6145int
6146main ()
6147{
98418dba
CW
6148if ((struct tm *) 0)
6149return 0;
503d2be0
AS
6150 ;
6151 return 0;
6152}
6153_ACEOF
ae1362a3 6154if ac_fn_c_try_compile "$LINENO"; then :
98418dba 6155 ac_cv_header_time=yes
ba4481b5 6156else
ae1362a3 6157 ac_cv_header_time=no
ba4481b5 6158fi
ca81d7a0 6159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6160fi
ae1362a3 6161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
e9a63f04 6162$as_echo "$ac_cv_header_time" >&6; }
98418dba 6163if test $ac_cv_header_time = yes; then
503d2be0 6164
ae1362a3 6165$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
ba4481b5
DL
6166
6167fi
6168
ae1362a3
AS
6169ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6170if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6171 ac_have_decl=1
ba4481b5 6172else
ae1362a3 6173 ac_have_decl=0
503d2be0 6174fi
503d2be0 6175
cd958eb3 6176cat >>confdefs.h <<_ACEOF
ae1362a3 6177#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
bf89cb4d
GM
6178_ACEOF
6179
bf89cb4d
GM
6180if test $ac_cv_have_decl_sys_siglist != yes; then
6181 # For Tru64, at least:
ae1362a3
AS
6182 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6183if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6184 ac_have_decl=1
ba4481b5 6185else
ae1362a3 6186 ac_have_decl=0
ba4481b5 6187fi
bf89cb4d
GM
6188
6189cat >>confdefs.h <<_ACEOF
ae1362a3 6190#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
bf89cb4d
GM
6191_ACEOF
6192
bf89cb4d
GM
6193 if test $ac_cv_have_decl___sys_siglist = yes; then
6194
ae1362a3 6195$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
bf89cb4d
GM
6196
6197 fi
6198fi
ae1362a3 6199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
bf89cb4d 6200$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
ae1362a3 6201if test "${ac_cv_header_sys_wait_h+set}" = set; then :
bf89cb4d
GM
6202 $as_echo_n "(cached) " >&6
6203else
ae1362a3 6204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d
GM
6205/* end confdefs.h. */
6206#include <sys/types.h>
6207#include <sys/wait.h>
6208#ifndef WEXITSTATUS
6209# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6210#endif
6211#ifndef WIFEXITED
6212# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6213#endif
6214
6215int
6216main ()
6217{
6218 int s;
6219 wait (&s);
6220 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6221 ;
6222 return 0;
6223}
6224_ACEOF
ae1362a3 6225if ac_fn_c_try_compile "$LINENO"; then :
bf89cb4d
GM
6226 ac_cv_header_sys_wait_h=yes
6227else
ae1362a3 6228 ac_cv_header_sys_wait_h=no
bf89cb4d 6229fi
bf89cb4d
GM
6230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6231fi
ae1362a3 6232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
bf89cb4d
GM
6233$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6234if test $ac_cv_header_sys_wait_h = yes; then
6235
ae1362a3 6236$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
ba4481b5 6237
ba4481b5
DL
6238fi
6239
c0d27fcc 6240
ae1362a3 6241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
e9a63f04 6242$as_echo_n "checking for struct utimbuf... " >&6; }
ae1362a3 6243if test "${emacs_cv_struct_utimbuf+set}" = set; then :
e9a63f04 6244 $as_echo_n "(cached) " >&6
1113b624 6245else
ae1362a3 6246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6247/* end confdefs.h. */
98418dba
CW
6248#ifdef TIME_WITH_SYS_TIME
6249#include <sys/time.h>
6250#include <time.h>
6251#else
6252#ifdef HAVE_SYS_TIME_H
6253#include <sys/time.h>
6254#else
1113b624 6255#include <time.h>
98418dba
CW
6256#endif
6257#endif
6258#ifdef HAVE_UTIME_H
6259#include <utime.h>
6260#endif
503d2be0
AS
6261int
6262main ()
6263{
98418dba 6264static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6265 ;
6266 return 0;
6267}
6268_ACEOF
ae1362a3 6269if ac_fn_c_try_compile "$LINENO"; then :
98418dba 6270 emacs_cv_struct_utimbuf=yes
1113b624 6271else
ae1362a3 6272 emacs_cv_struct_utimbuf=no
1113b624 6273fi
ca81d7a0 6274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6275fi
ae1362a3 6276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
e9a63f04 6277$as_echo "$emacs_cv_struct_utimbuf" >&6; }
98418dba 6278if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6279
ae1362a3 6280$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
1113b624
PE
6281
6282fi
ba4481b5 6283
ae1362a3 6284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
e9a63f04 6285$as_echo_n "checking return type of signal handlers... " >&6; }
ae1362a3 6286if test "${ac_cv_type_signal+set}" = set; then :
e9a63f04 6287 $as_echo_n "(cached) " >&6
7397acc4 6288else
ae1362a3 6289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6290/* end confdefs.h. */
7397acc4 6291#include <sys/types.h>
98418dba 6292#include <signal.h>
98418dba 6293
503d2be0
AS
6294int
6295main ()
6296{
ca81d7a0 6297return *(signal (0, 0)) (0) == 1;
503d2be0
AS
6298 ;
6299 return 0;
6300}
6301_ACEOF
ae1362a3 6302if ac_fn_c_try_compile "$LINENO"; then :
ca81d7a0 6303 ac_cv_type_signal=int
503d2be0 6304else
ae1362a3 6305 ac_cv_type_signal=void
503d2be0 6306fi
ca81d7a0 6307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6308fi
ae1362a3 6309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
e9a63f04 6310$as_echo "$ac_cv_type_signal" >&6; }
7397acc4 6311
c0d27fcc 6312cat >>confdefs.h <<_ACEOF
98418dba 6313#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
6314_ACEOF
6315
503d2be0 6316
c0d27fcc 6317
ae1362a3 6318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
e9a63f04 6319$as_echo_n "checking for speed_t... " >&6; }
ae1362a3 6320if test "${emacs_cv_speed_t+set}" = set; then :
e9a63f04 6321 $as_echo_n "(cached) " >&6
7397acc4 6322else
ae1362a3 6323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6324/* end confdefs.h. */
98418dba 6325#include <termios.h>
98418dba
CW
6326int
6327main ()
6328{
6329speed_t x = 1;
6330 ;
6331 return 0;
6332}
6333_ACEOF
ae1362a3 6334if ac_fn_c_try_compile "$LINENO"; then :
98418dba
CW
6335 emacs_cv_speed_t=yes
6336else
ae1362a3 6337 emacs_cv_speed_t=no
98418dba 6338fi
ca81d7a0 6339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 6340fi
ae1362a3 6341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
e9a63f04 6342$as_echo "$emacs_cv_speed_t" >&6; }
98418dba 6343if test $emacs_cv_speed_t = yes; then
b936fae4 6344
ae1362a3 6345$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
98418dba 6346
7397acc4
DL
6347fi
6348
ae1362a3 6349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
e9a63f04 6350$as_echo_n "checking for struct timeval... " >&6; }
ae1362a3 6351if test "${emacs_cv_struct_timeval+set}" = set; then :
e9a63f04 6352 $as_echo_n "(cached) " >&6
7397acc4 6353else
ae1362a3 6354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6355/* end confdefs.h. */
98418dba
CW
6356#ifdef TIME_WITH_SYS_TIME
6357#include <sys/time.h>
6358#include <time.h>
6359#else
6360#ifdef HAVE_SYS_TIME_H
6361#include <sys/time.h>
6362#else
6363#include <time.h>
6364#endif
6365#endif
503d2be0
AS
6366int
6367main ()
6368{
98418dba 6369static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
6370 ;
6371 return 0;
6372}
6373_ACEOF
ae1362a3 6374if ac_fn_c_try_compile "$LINENO"; then :
edfaf76d
LK
6375 emacs_cv_struct_timeval=yes
6376else
ae1362a3 6377 emacs_cv_struct_timeval=no
7397acc4 6378fi
ca81d7a0 6379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6380fi
ae1362a3 6381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
e9a63f04 6382$as_echo "$emacs_cv_struct_timeval" >&6; }
98418dba
CW
6383HAVE_TIMEVAL=$emacs_cv_struct_timeval
6384if test $emacs_cv_struct_timeval = yes; then
b936fae4 6385
ae1362a3 6386$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
7397acc4
DL
6387
6388fi
6389
ae1362a3 6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
e9a63f04 6391$as_echo_n "checking for struct exception... " >&6; }
ae1362a3 6392if test "${emacs_cv_struct_exception+set}" = set; then :
e9a63f04 6393 $as_echo_n "(cached) " >&6
ba4481b5 6394else
ae1362a3 6395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6396/* end confdefs.h. */
98418dba 6397#include <math.h>
503d2be0
AS
6398int
6399main ()
6400{
98418dba 6401static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
6402 ;
6403 return 0;
ba4481b5 6404}
503d2be0 6405_ACEOF
ae1362a3 6406if ac_fn_c_try_compile "$LINENO"; then :
98418dba 6407 emacs_cv_struct_exception=yes
ba4481b5 6408else
ae1362a3 6409 emacs_cv_struct_exception=no
ba4481b5 6410fi
ca81d7a0 6411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6412fi
ae1362a3 6413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
e9a63f04 6414$as_echo "$emacs_cv_struct_exception" >&6; }
98418dba
CW
6415HAVE_EXCEPTION=$emacs_cv_struct_exception
6416if test $emacs_cv_struct_exception != yes; then
b936fae4 6417
ae1362a3 6418$as_echo "#define NO_MATHERR 1" >>confdefs.h
ba4481b5
DL
6419
6420fi
6421
7862d3a8 6422for ac_header in sys/socket.h
ae1362a3
AS
6423do :
6424 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6425if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
7862d3a8 6426 cat >>confdefs.h <<_ACEOF
ae1362a3 6427#define HAVE_SYS_SOCKET_H 1
7862d3a8
AS
6428_ACEOF
6429
6430fi
6431
6432done
6433
7862d3a8 6434for ac_header in net/if.h
ae1362a3
AS
6435do :
6436 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
7862d3a8
AS
6437#if HAVE_SYS_SOCKET_H
6438#include <sys/socket.h>
6439#endif
ae1362a3
AS
6440"
6441if test "x$ac_cv_header_net_if_h" = x""yes; then :
7862d3a8 6442 cat >>confdefs.h <<_ACEOF
ae1362a3 6443#define HAVE_NET_IF_H 1
7862d3a8
AS
6444_ACEOF
6445
6446fi
6447
6448done
6449
6450
ae1362a3 6451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
e9a63f04 6452$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
ae1362a3 6453if test "${ac_cv_struct_tm+set}" = set; then :
e9a63f04 6454 $as_echo_n "(cached) " >&6
7397acc4 6455else
ae1362a3 6456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 6457/* end confdefs.h. */
98418dba
CW
6458#include <sys/types.h>
6459#include <time.h>
7397acc4 6460
503d2be0
AS
6461int
6462main ()
6463{
f053c89f
CY
6464struct tm tm;
6465 int *p = &tm.tm_sec;
e9a63f04 6466 return !p;
503d2be0
AS
6467 ;
6468 return 0;
6469}
6470_ACEOF
ae1362a3 6471if ac_fn_c_try_compile "$LINENO"; then :
35996d22
AS
6472 ac_cv_struct_tm=time.h
6473else
ae1362a3 6474 ac_cv_struct_tm=sys/time.h
7397acc4 6475fi
ca81d7a0 6476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 6477fi
ae1362a3 6478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
e9a63f04 6479$as_echo "$ac_cv_struct_tm" >&6; }
98418dba 6480if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 6481
ae1362a3 6482$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
7397acc4
DL
6483
6484fi
ba4481b5 6485
ae1362a3 6486ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
98418dba 6487#include <$ac_cv_struct_tm>
ba4481b5 6488
ae1362a3
AS
6489"
6490if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
c0d27fcc 6491
ae1362a3
AS
6492cat >>confdefs.h <<_ACEOF
6493#define HAVE_STRUCT_TM_TM_ZONE 1
bf89cb4d 6494_ACEOF
ae1362a3
AS
6495
6496
6497fi
6498
6499if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
6500
6501$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
6502
bf89cb4d 6503else
ae1362a3
AS
6504 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6505"
6506if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6507 ac_have_decl=1
6508else
6509 ac_have_decl=0
6510fi
bf89cb4d 6511
ae1362a3
AS
6512cat >>confdefs.h <<_ACEOF
6513#define HAVE_DECL_TZNAME $ac_have_decl
bf89cb4d 6514_ACEOF
bf89cb4d 6515
ae1362a3
AS
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6517$as_echo_n "checking for tzname... " >&6; }
6518if test "${ac_cv_var_tzname+set}" = set; then :
6519 $as_echo_n "(cached) " >&6
6520else
6521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6522/* end confdefs.h. */
6523#include <time.h>
6524#if !HAVE_DECL_TZNAME
6525extern char *tzname[];
6526#endif
bf89cb4d
GM
6527
6528int
6529main ()
6530{
ae1362a3 6531return tzname[0][0];
bf89cb4d
GM
6532 ;
6533 return 0;
6534}
6535_ACEOF
ae1362a3
AS
6536if ac_fn_c_try_link "$LINENO"; then :
6537 ac_cv_var_tzname=yes
bf89cb4d 6538else
ae1362a3 6539 ac_cv_var_tzname=no
bf89cb4d 6540fi
ae1362a3
AS
6541rm -f core conftest.err conftest.$ac_objext \
6542 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 6543fi
ae1362a3
AS
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6545$as_echo "$ac_cv_var_tzname" >&6; }
6546 if test $ac_cv_var_tzname = yes; then
bf89cb4d 6547
ae1362a3
AS
6548$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6549
6550 fi
bf89cb4d 6551fi
bf89cb4d 6552
ae1362a3
AS
6553ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6554"
6555if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
0ca10bb7 6556
ae1362a3 6557$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
0ca10bb7
RC
6558
6559fi
6560
ae1362a3
AS
6561ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6562#if HAVE_SYS_SOCKET_H
6563#include <sys/socket.h>
6564#endif
6565#if HAVE_NET_IF_H
6566#include <net/if.h>
6567#endif
6568"
6569if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
0ca10bb7 6570
ae1362a3
AS
6571cat >>confdefs.h <<_ACEOF
6572#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
bf89cb4d 6573_ACEOF
0ca10bb7 6574
bf89cb4d 6575
ae1362a3
AS
6576fi
6577ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6578#if HAVE_SYS_SOCKET_H
6579#include <sys/socket.h>
6580#endif
6581#if HAVE_NET_IF_H
6582#include <net/if.h>
bf89cb4d 6583#endif
ae1362a3
AS
6584"
6585if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
bf89cb4d 6586
ae1362a3
AS
6587cat >>confdefs.h <<_ACEOF
6588#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
bf89cb4d 6589_ACEOF
bf89cb4d 6590
ae1362a3 6591
0ca10bb7 6592fi
ae1362a3
AS
6593ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6594#if HAVE_SYS_SOCKET_H
6595#include <sys/socket.h>
6596#endif
6597#if HAVE_NET_IF_H
6598#include <net/if.h>
6599#endif
6600"
6601if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
6602
6603cat >>confdefs.h <<_ACEOF
6604#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
6605_ACEOF
6606
19650fd6 6607
bf89cb4d 6608fi
ae1362a3
AS
6609ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6610#if HAVE_SYS_SOCKET_H
6611#include <sys/socket.h>
6612#endif
6613#if HAVE_NET_IF_H
6614#include <net/if.h>
6615#endif
6616"
6617if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
bf89cb4d 6618
0ca10bb7 6619cat >>confdefs.h <<_ACEOF
ae1362a3 6620#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
bf89cb4d
GM
6621_ACEOF
6622
6623
ae1362a3
AS
6624fi
6625ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6626#if HAVE_SYS_SOCKET_H
6627#include <sys/socket.h>
6628#endif
6629#if HAVE_NET_IF_H
6630#include <net/if.h>
6631#endif
6632"
6633if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
6634
6635cat >>confdefs.h <<_ACEOF
6636#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
19650fd6 6637_ACEOF
6bae0ccf 6638
bf89cb4d
GM
6639
6640fi
6641
6642
ae1362a3
AS
6643
6644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6645$as_echo_n "checking for function prototypes... " >&6; }
6646if test "$ac_cv_prog_cc_c89" != no; then
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6648$as_echo "yes" >&6; }
6649
6650$as_echo "#define PROTOTYPES 1" >>confdefs.h
6651
6652
6653$as_echo "#define __PROTOTYPES 1" >>confdefs.h
6654
6655else
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6657$as_echo "no" >&6; }
6658fi
6659
6660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6661$as_echo_n "checking for working volatile... " >&6; }
6662if test "${ac_cv_c_volatile+set}" = set; then :
0ca10bb7
RC
6663 $as_echo_n "(cached) " >&6
6664else
ae1362a3 6665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 6666/* end confdefs.h. */
6bae0ccf
DL
6667
6668int
6669main ()
6670{
ae1362a3
AS
6671
6672volatile int x;
6673int * volatile y = (int *) 0;
6674return !x && !y;
6bae0ccf
DL
6675 ;
6676 return 0;
6677}
6678_ACEOF
ae1362a3
AS
6679if ac_fn_c_try_compile "$LINENO"; then :
6680 ac_cv_c_volatile=yes
6bae0ccf 6681else
ae1362a3 6682 ac_cv_c_volatile=no
ba4481b5 6683fi
ae1362a3 6684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6685fi
ae1362a3
AS
6686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6687$as_echo "$ac_cv_c_volatile" >&6; }
6688if test $ac_cv_c_volatile = no; then
ca81d7a0 6689
ae1362a3 6690$as_echo "#define volatile /**/" >>confdefs.h
0ca10bb7 6691
6bae0ccf 6692fi
503d2be0 6693
ae1362a3
AS
6694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6695$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6696if test "${ac_cv_c_const+set}" = set; then :
bf89cb4d
GM
6697 $as_echo_n "(cached) " >&6
6698else
ae1362a3 6699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 6700/* end confdefs.h. */
ba4481b5 6701
bf89cb4d
GM
6702int
6703main ()
6704{
ae1362a3
AS
6705/* FIXME: Include the comments suggested by Paul. */
6706#ifndef __cplusplus
6707 /* Ultrix mips cc rejects this. */
6708 typedef int charset[2];
6709 const charset cs;
6710 /* SunOS 4.1.1 cc rejects this. */
6711 char const *const *pcpcc;
6712 char **ppc;
6713 /* NEC SVR4.0.2 mips cc rejects this. */
6714 struct point {int x, y;};
6715 static struct point const zero = {0,0};
6716 /* AIX XL C 1.02.0.0 rejects this.
6717 It does not let you subtract one const X* pointer from another in
6718 an arm of an if-expression whose if-part is not a constant
6719 expression */
6720 const char *g = "string";
6721 pcpcc = &g + (g ? g-g : 0);
6722 /* HPUX 7.0 cc rejects these. */
6723 ++pcpcc;
6724 ppc = (char**) pcpcc;
6725 pcpcc = (char const *const *) ppc;
6726 { /* SCO 3.2v4 cc rejects this. */
6727 char *t;
6728 char const *s = 0 ? (char *) 0 : (char const *) 0;
6729
6730 *t++ = 0;
6731 if (s) return 0;
6732 }
6733 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6734 int x[] = {25, 17};
6735 const int *foo = &x[0];
6736 ++foo;
6737 }
6738 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6739 typedef const int *iptr;
6740 iptr p = 0;
6741 ++p;
6742 }
6743 { /* AIX XL C 1.02.0.0 rejects this saying
6744 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6745 struct s { int j; const int *ap[3]; };
6746 struct s *b; b->j = 5;
6747 }
6748 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6749 const int foo = 10;
6750 if (!foo) return 0;
6751 }
6752 return !cs[0] && !zero.x;
6753#endif
6754
bf89cb4d
GM
6755 ;
6756 return 0;
6757}
6758_ACEOF
ae1362a3
AS
6759if ac_fn_c_try_compile "$LINENO"; then :
6760 ac_cv_c_const=yes
bf89cb4d 6761else
ae1362a3
AS
6762 ac_cv_c_const=no
6763fi
6764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6765fi
6766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6767$as_echo "$ac_cv_c_const" >&6; }
6768if test $ac_cv_c_const = no; then
ba4481b5 6769
ae1362a3
AS
6770$as_echo "#define const /**/" >>confdefs.h
6771
6772fi
6773
6774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
6775$as_echo_n "checking for void * support... " >&6; }
6776if test "${emacs_cv_void_star+set}" = set; then :
6777 $as_echo_n "(cached) " >&6
6778else
6779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 6780/* end confdefs.h. */
ba4481b5 6781
bf89cb4d
GM
6782int
6783main ()
6784{
ae1362a3 6785void * foo;
bf89cb4d
GM
6786 ;
6787 return 0;
6788}
6789_ACEOF
ae1362a3
AS
6790if ac_fn_c_try_compile "$LINENO"; then :
6791 emacs_cv_void_star=yes
bf89cb4d 6792else
ae1362a3 6793 emacs_cv_void_star=no
0ca10bb7 6794fi
bf89cb4d
GM
6795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6796fi
ae1362a3
AS
6797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
6798$as_echo "$emacs_cv_void_star" >&6; }
6799if test $emacs_cv_void_star = yes; then
6800 $as_echo "#define POINTER_TYPE void" >>confdefs.h
6801
6802else
6803 $as_echo "#define POINTER_TYPE char" >>confdefs.h
0ca10bb7 6804
ba4481b5 6805fi
0ca10bb7 6806
0ca10bb7 6807
bf89cb4d 6808
ae1362a3
AS
6809
6810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6811$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6812set x ${MAKE-make}
6813ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
1f10e750 6814if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
bf89cb4d
GM
6815 $as_echo_n "(cached) " >&6
6816else
ae1362a3
AS
6817 cat >conftest.make <<\_ACEOF
6818SHELL = /bin/sh
6819all:
6820 @echo '@@@%%%=$(MAKE)=@@@%%%'
bf89cb4d 6821_ACEOF
1f10e750 6822# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
ae1362a3
AS
6823case `${MAKE-make} -f conftest.make 2>/dev/null` in
6824 *@@@%%%=?*=@@@%%%*)
6825 eval ac_cv_prog_make_${ac_make}_set=yes;;
6826 *)
6827 eval ac_cv_prog_make_${ac_make}_set=no;;
6828esac
6829rm -f conftest.make
6830fi
6831if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6833$as_echo "yes" >&6; }
6834 SET_MAKE=
6835else
6836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
6838 SET_MAKE="MAKE=${MAKE-make}"
6839fi
6840
6841
6842if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
6843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
6844$as_echo_n "checking whether we are using GNU Make... " >&6; }
6845 HAVE_GNU_MAKE=no
6846 testval=`make --version 2>/dev/null | grep 'GNU Make'`
6847 if test "x$testval" != x; then
6848 HAVE_GNU_MAKE=yes
6849 else
6850 ac_enable_autodepend=no
6851 fi
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
6853$as_echo "$HAVE_GNU_MAKE" >&6; }
6854 if test $HAVE_GNU_MAKE = yes; then
6855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
6856$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
6857 SAVE_CFLAGS="$CFLAGS"
6858 CFLAGS="$CFLAGS -MMD -MF deps.d"
6859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 6860/* end confdefs.h. */
503d2be0 6861
bf89cb4d
GM
6862int
6863main ()
6864{
ae1362a3 6865
bf89cb4d
GM
6866 ;
6867 return 0;
6868}
c0d27fcc 6869_ACEOF
ae1362a3 6870if ac_fn_c_try_compile "$LINENO"; then :
b936fae4 6871
98418dba 6872else
ae1362a3 6873 ac_enable_autodepend=no
0ca10bb7 6874fi
bf89cb4d 6875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3
AS
6876 CFLAGS="$SAVE_CFLAGS"
6877 test -f deps.d || ac_enable_autodepend=no
6878 rm -rf deps.d
6879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
6880$as_echo "$ac_enable_autodepend" >&6; }
6881 fi
6882 if test $ac_enable_autodepend = yes; then
ca81d7a0 6883
ae1362a3 6884$as_echo "#define AUTO_DEPEND 1" >>confdefs.h
6bae0ccf 6885
ae1362a3 6886 fi
bf89cb4d 6887fi
0ca10bb7 6888
ae1362a3
AS
6889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
6890$as_echo_n "checking for long file names... " >&6; }
6891if test "${ac_cv_sys_long_file_names+set}" = set; then :
e9a63f04 6892 $as_echo_n "(cached) " >&6
96f3a036 6893else
ae1362a3
AS
6894 ac_cv_sys_long_file_names=yes
6895# Test for long file names in all the places we know might matter:
6896# . the current directory, where building will happen
6897# $prefix/lib where we will be installing things
6898# $exec_prefix/lib likewise
6899# $TMPDIR if set, where it might want to write temporary files
6900# /tmp where it might want to write temporary files
6901# /var/tmp likewise
6902# /usr/tmp likewise
6903for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
6904 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
6905 # in the usual case where exec_prefix is '${prefix}'.
6906 case $ac_dir in #(
6907 . | /* | ?:[\\/]*) ;; #(
6908 *) continue;;
6909 esac
6910 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
6911 ac_xdir=$ac_dir/cf$$
6912 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
6913 ac_tf1=$ac_xdir/conftest9012345
6914 ac_tf2=$ac_xdir/conftest9012346
6915 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
6916 ac_cv_sys_long_file_names=no
6917 rm -f -r "$ac_xdir" 2>/dev/null
6918 test $ac_cv_sys_long_file_names = no && break
6919done
bf89cb4d 6920fi
ae1362a3
AS
6921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
6922$as_echo "$ac_cv_sys_long_file_names" >&6; }
6923if test $ac_cv_sys_long_file_names = yes; then
6924
6925$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
bf89cb4d 6926
bf89cb4d 6927fi
bf89cb4d 6928
bf89cb4d 6929
ae1362a3 6930#### Choose a window system.
bf89cb4d 6931
ae1362a3
AS
6932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
6933$as_echo_n "checking for X... " >&6; }
6934
6935
6936# Check whether --with-x was given.
6937if test "${with_x+set}" = set; then :
6938 withval=$with_x;
bf89cb4d
GM
6939fi
6940
ae1362a3
AS
6941# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6942if test "x$with_x" = xno; then
6943 # The user explicitly disabled X.
6944 have_x=disabled
bf89cb4d 6945else
ae1362a3 6946 case $x_includes,$x_libraries in #(
1f10e750 6947 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
ae1362a3
AS
6948 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
6949 $as_echo_n "(cached) " >&6
bf89cb4d 6950else
ae1362a3
AS
6951 # One or both of the vars are not set, and there is no cached value.
6952ac_x_includes=no ac_x_libraries=no
6953rm -f -r conftest.dir
6954if mkdir conftest.dir; then
6955 cd conftest.dir
6956 cat >Imakefile <<'_ACEOF'
6957incroot:
6958 @echo incroot='${INCROOT}'
6959usrlibdir:
6960 @echo usrlibdir='${USRLIBDIR}'
6961libdir:
6962 @echo libdir='${LIBDIR}'
bf89cb4d 6963_ACEOF
ae1362a3 6964 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
1f10e750 6965 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
ae1362a3
AS
6966 for ac_var in incroot usrlibdir libdir; do
6967 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
6968 done
6969 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6970 for ac_extension in a so sl dylib la dll; do
6971 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
6972 test -f "$ac_im_libdir/libX11.$ac_extension"; then
6973 ac_im_usrlibdir=$ac_im_libdir; break
6974 fi
6975 done
6976 # Screen out bogus values from the imake configuration. They are
6977 # bogus both because they are the default anyway, and because
6978 # using them would break gcc on systems where it needs fixed includes.
6979 case $ac_im_incroot in
6980 /usr/include) ac_x_includes= ;;
6981 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
6982 esac
6983 case $ac_im_usrlibdir in
6984 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
6985 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
6986 esac
6987 fi
6988 cd ..
6989 rm -f -r conftest.dir
bf89cb4d
GM
6990fi
6991
ae1362a3
AS
6992# Standard set of common directories for X headers.
6993# Check X11 before X11Rn because it is often a symlink to the current release.
6994ac_x_header_dirs='
6995/usr/X11/include
6996/usr/X11R7/include
6997/usr/X11R6/include
6998/usr/X11R5/include
6999/usr/X11R4/include
bf89cb4d 7000
ae1362a3
AS
7001/usr/include/X11
7002/usr/include/X11R7
7003/usr/include/X11R6
7004/usr/include/X11R5
7005/usr/include/X11R4
bf89cb4d 7006
ae1362a3
AS
7007/usr/local/X11/include
7008/usr/local/X11R7/include
7009/usr/local/X11R6/include
7010/usr/local/X11R5/include
7011/usr/local/X11R4/include
bf89cb4d 7012
ae1362a3
AS
7013/usr/local/include/X11
7014/usr/local/include/X11R7
7015/usr/local/include/X11R6
7016/usr/local/include/X11R5
7017/usr/local/include/X11R4
bf89cb4d 7018
ae1362a3
AS
7019/usr/X386/include
7020/usr/x386/include
7021/usr/XFree86/include/X11
bf89cb4d 7022
ae1362a3
AS
7023/usr/include
7024/usr/local/include
7025/usr/unsupported/include
7026/usr/athena/include
7027/usr/local/x11r5/include
7028/usr/lpp/Xamples/include
bf89cb4d 7029
ae1362a3
AS
7030/usr/openwin/include
7031/usr/openwin/share/include'
bf89cb4d 7032
ae1362a3
AS
7033if test "$ac_x_includes" = no; then
7034 # Guess where to find include files, by looking for Xlib.h.
7035 # First, try using that file with no special directory specified.
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 7037/* end confdefs.h. */
ae1362a3
AS
7038#include <X11/Xlib.h>
7039_ACEOF
7040if ac_fn_c_try_cpp "$LINENO"; then :
7041 # We can compile using X headers with no special include directory.
7042ac_x_includes=
7043else
7044 for ac_dir in $ac_x_header_dirs; do
7045 if test -r "$ac_dir/X11/Xlib.h"; then
7046 ac_x_includes=$ac_dir
7047 break
7048 fi
7049done
7050fi
1f10e750 7051rm -f conftest.err conftest.i conftest.$ac_ext
ae1362a3 7052fi # $ac_x_includes = no
bf89cb4d 7053
ae1362a3
AS
7054if test "$ac_x_libraries" = no; then
7055 # Check for the libraries.
7056 # See if we find them without any special options.
7057 # Don't add to $LIBS permanently.
7058 ac_save_LIBS=$LIBS
7059 LIBS="-lX11 $LIBS"
7060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7061/* end confdefs.h. */
7062#include <X11/Xlib.h>
bf89cb4d
GM
7063int
7064main ()
7065{
ae1362a3 7066XrmInitialize ()
bf89cb4d
GM
7067 ;
7068 return 0;
7069}
7070_ACEOF
ae1362a3
AS
7071if ac_fn_c_try_link "$LINENO"; then :
7072 LIBS=$ac_save_LIBS
7073# We can link X programs with no special library path.
7074ac_x_libraries=
bf89cb4d 7075else
ae1362a3
AS
7076 LIBS=$ac_save_LIBS
7077for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7078do
7079 # Don't even attempt the hair of trying to link an X program!
7080 for ac_extension in a so sl dylib la dll; do
7081 if test -r "$ac_dir/libX11.$ac_extension"; then
7082 ac_x_libraries=$ac_dir
7083 break 2
7084 fi
7085 done
7086done
bf89cb4d 7087fi
ae1362a3
AS
7088rm -f core conftest.err conftest.$ac_objext \
7089 conftest$ac_exeext conftest.$ac_ext
7090fi # $ac_x_libraries = no
bf89cb4d 7091
ae1362a3
AS
7092case $ac_x_includes,$ac_x_libraries in #(
7093 no,* | *,no | *\'*)
7094 # Didn't find X, or a directory has "'" in its name.
7095 ac_cv_have_x="have_x=no";; #(
7096 *)
7097 # Record where we found X for the cache.
7098 ac_cv_have_x="have_x=yes\
7099 ac_x_includes='$ac_x_includes'\
7100 ac_x_libraries='$ac_x_libraries'"
7101esac
bf89cb4d 7102fi
ae1362a3
AS
7103;; #(
7104 *) have_x=yes;;
7105 esac
7106 eval "$ac_cv_have_x"
7107fi # $with_x != no
bf89cb4d 7108
ae1362a3
AS
7109if test "$have_x" != yes; then
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7111$as_echo "$have_x" >&6; }
7112 no_x=yes
7113else
7114 # If each of the values was on the command line, it overrides each guess.
7115 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7116 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7117 # Update the cache value to reflect the command line values.
7118 ac_cv_have_x="have_x=yes\
7119 ac_x_includes='$x_includes'\
7120 ac_x_libraries='$x_libraries'"
7121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7122$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
bf89cb4d
GM
7123fi
7124
ae1362a3
AS
7125if test "$no_x" = yes; then
7126 window_system=none
0ca10bb7 7127else
ae1362a3
AS
7128 window_system=x11
7129fi
98418dba 7130
ae1362a3
AS
7131## Workaround for bug in autoconf <= 2.62.
7132## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7133## No need to do anything special for these standard directories.
7134## This is an experiment, take it out if it causes problems.
7135if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
7136
7137 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
98418dba 7138
bf89cb4d 7139fi
edfaf76d 7140
ae1362a3
AS
7141if test "${x_libraries}" != NONE; then
7142 if test -n "${x_libraries}"; then
7143 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7144 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7145 fi
7146 x_default_search_path=""
7147 x_search_path=${x_libraries}
7148 if test -z "${x_search_path}"; then
7149 x_search_path=/usr/lib
7150 fi
7151 for x_library in `echo ${x_search_path}: | \
7152 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7153 x_search_path="\
7154${x_library}/X11/%L/%T/%N%C%S:\
7155${x_library}/X11/%l/%T/%N%C%S:\
7156${x_library}/X11/%T/%N%C%S:\
7157${x_library}/X11/%L/%T/%N%S:\
7158${x_library}/X11/%l/%T/%N%S:\
7159${x_library}/X11/%T/%N%S"
7160 if test x"${x_default_search_path}" = x; then
7161 x_default_search_path=${x_search_path}
7162 else
7163 x_default_search_path="${x_search_path}:${x_default_search_path}"
7164 fi
7165 done
7166fi
7167if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7168 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
bf89cb4d 7169fi
ba4481b5 7170
ae1362a3
AS
7171if test x"${x_includes}" = x; then
7172 bitmapdir=/usr/include/X11/bitmaps
7173else
7174 # accumulate include directories that have X11 bitmap subdirectories
7175 bmd_acc="dummyval"
7176 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7177 if test -d "${bmd}/X11/bitmaps"; then
7178 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7179 fi
7180 if test -d "${bmd}/bitmaps"; then
7181 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7182 fi
7183 done
7184 if test ${bmd_acc} != "dummyval"; then
7185 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7186 fi
7187fi
bf89cb4d 7188
ae1362a3
AS
7189HAVE_NS=no
7190NS_IMPL_COCOA=no
7191NS_IMPL_GNUSTEP=no
7192tmp_CPPFLAGS="$CPPFLAGS"
7193tmp_CFLAGS="$CFLAGS"
7194CPPFLAGS="$CPPFLAGS -x objective-c"
7195CFLAGS="$CFLAGS -x objective-c"
7196if test "${with_ns}" != no; then
7197 if test "${opsys}" = darwin; then
7198 NS_IMPL_COCOA=yes
7199 ns_appdir=`pwd`/nextstep/Emacs.app
7200 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
7201 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
7202 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7203 elif test -f $GNUSTEP_CONFIG_FILE; then
7204 NS_IMPL_GNUSTEP=yes
7205 ns_appdir=`pwd`/nextstep/Emacs.app
7206 ns_appbindir=`pwd`/nextstep/Emacs.app
7207 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
7208 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7209 GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
7210 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7211 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7212 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7213 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7214 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
7215 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
7216 fi
7217 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7218if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7219 HAVE_NS=yes
7220else
1f10e750 7221 as_fn_error $? "\`--with-ns' was specified, but the include
ae1362a3 7222 files are missing or cannot be compiled." "$LINENO" 5
bf89cb4d
GM
7223fi
7224
7225
ae1362a3
AS
7226 NS_HAVE_NSINTEGER=yes
7227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 7228/* end confdefs.h. */
ae1362a3 7229#include <Foundation/NSObjCRuntime.h>
bf89cb4d
GM
7230int
7231main ()
7232{
ae1362a3 7233NSInteger i;
bf89cb4d
GM
7234 ;
7235 return 0;
7236}
7237_ACEOF
ae1362a3
AS
7238if ac_fn_c_try_compile "$LINENO"; then :
7239 ns_have_nsinteger=yes
bf89cb4d 7240else
ae1362a3 7241 ns_have_nsinteger=no
bf89cb4d 7242fi
ae1362a3
AS
7243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7244 if test $ns_have_nsinteger = no; then
7245 NS_HAVE_NSINTEGER=no
7246 fi
bf89cb4d 7247fi
ae1362a3
AS
7248if test "${HAVE_NS}" = yes; then
7249 window_system=nextstep
7250 with_xft=no
7251 # set up packaging dirs
7252 exec_prefix=${ns_appbindir}
7253 libexecdir=${ns_appbindir}/libexec
7254 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7255 prefix=${ns_appresdir}
7256 fi
bf89cb4d 7257fi
ae1362a3
AS
7258CFLAGS="$tmp_CFLAGS"
7259CPPFLAGS="$tmp_CPPFLAGS"
bf89cb4d 7260
ae1362a3
AS
7261case "${window_system}" in
7262 x11 )
7263 HAVE_X_WINDOWS=yes
7264 HAVE_X11=yes
7265 case "${with_x_toolkit}" in
7266 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7267 motif ) USE_X_TOOLKIT=MOTIF ;;
7268 gtk ) with_gtk=yes
7269 USE_X_TOOLKIT=none ;;
7270 no ) USE_X_TOOLKIT=none ;;
7271 * ) USE_X_TOOLKIT=maybe ;;
7272 esac
7273 ;;
7274 nextstep | none )
7275 HAVE_X_WINDOWS=no
7276 HAVE_X11=no
7277 USE_X_TOOLKIT=none
7278 ;;
7279esac
7280
7281if test "$window_system" = none && test "X$with_x" != "Xno"; then
7282 # Extract the first word of "X", so it can be a program name with args.
7283set dummy X; ac_word=$2
7284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
bf89cb4d 7285$as_echo_n "checking for $ac_word... " >&6; }
ae1362a3 7286if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
bf89cb4d
GM
7287 $as_echo_n "(cached) " >&6
7288else
ae1362a3
AS
7289 if test -n "$HAVE_XSERVER"; then
7290 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
bf89cb4d
GM
7291else
7292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ae1362a3 7293for as_dir in $PATH
bf89cb4d
GM
7294do
7295 IFS=$as_save_IFS
7296 test -z "$as_dir" && as_dir=.
ae1362a3 7297 for ac_exec_ext in '' $ac_executable_extensions; do
bf89cb4d 7298 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ae1362a3
AS
7299 ac_cv_prog_HAVE_XSERVER="true"
7300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
bf89cb4d
GM
7301 break 2
7302 fi
7303done
ae1362a3 7304 done
bf89cb4d
GM
7305IFS=$as_save_IFS
7306
ae1362a3 7307 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
bf89cb4d
GM
7308fi
7309fi
ae1362a3
AS
7310HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7311if test -n "$HAVE_XSERVER"; then
7312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7313$as_echo "$HAVE_XSERVER" >&6; }
7314else
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7316$as_echo "no" >&6; }
7317fi
7318
7319
7320 if test "$HAVE_XSERVER" = true ||
7321 test -n "$DISPLAY" ||
7322 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
1f10e750 7323 as_fn_error $? "You seem to be running X, but no X development libraries
ae1362a3
AS
7324were found. You should install the relevant development files for X
7325and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7326sure you have development files for image handling, i.e.
7327tiff, gif, jpeg, png and xpm.
7328If you are sure you want Emacs compiled without X window support, pass
7329 --without-x
7330to configure." "$LINENO" 5
7331 fi
7332fi
7333
7334### If we're using X11, we should use the X menu package.
7335HAVE_MENUS=no
7336case ${HAVE_X11} in
7337 yes ) HAVE_MENUS=yes ;;
7338esac
7339
7340# Do the opsystem or machine files prohibit the use of the GNU malloc?
7341# Assume not, until told otherwise.
7342GNU_MALLOC=yes
7343doug_lea_malloc=yes
7344ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7345if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
7346
bf89cb4d 7347else
ae1362a3 7348 doug_lea_malloc=no
bf89cb4d
GM
7349fi
7350
ae1362a3
AS
7351ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7352if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
bf89cb4d 7353
ae1362a3
AS
7354else
7355 doug_lea_malloc=no
bf89cb4d 7356fi
f053c89f 7357
ae1362a3
AS
7358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7359$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7360if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
bf89cb4d
GM
7361 $as_echo_n "(cached) " >&6
7362else
ae1362a3 7363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 7364/* end confdefs.h. */
ae1362a3 7365extern void (* __after_morecore_hook)();
98418dba
CW
7366int
7367main ()
7368{
ae1362a3 7369__after_morecore_hook = 0
bf89cb4d
GM
7370 ;
7371 return 0;
7372}
7373_ACEOF
ae1362a3
AS
7374if ac_fn_c_try_link "$LINENO"; then :
7375 emacs_cv_var___after_morecore_hook=yes
bf89cb4d 7376else
ae1362a3 7377 emacs_cv_var___after_morecore_hook=no
bf89cb4d 7378fi
ae1362a3
AS
7379rm -f core conftest.err conftest.$ac_objext \
7380 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 7381fi
ae1362a3
AS
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7383$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7384if test $emacs_cv_var___after_morecore_hook = no; then
7385 doug_lea_malloc=no
bf89cb4d 7386fi
ae1362a3
AS
7387if test "${system_malloc}" = "yes"; then
7388 GNU_MALLOC=no
7389 GNU_MALLOC_reason="
7390 (The GNU allocators don't work with this system configuration.)"
7391fi
7392if test "$doug_lea_malloc" = "yes" ; then
7393 if test "$GNU_MALLOC" = yes ; then
7394 GNU_MALLOC_reason="
7395 (Using Doug Lea's new malloc from the GNU C Library.)"
7396 fi
98418dba 7397
ae1362a3 7398$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
0ca10bb7 7399
bf89cb4d 7400fi
bf89cb4d 7401
ae1362a3
AS
7402if test x"${REL_ALLOC}" = x; then
7403 REL_ALLOC=${GNU_MALLOC}
503d2be0 7404fi
ca81d7a0 7405
0ca10bb7 7406
bf89cb4d 7407
ca81d7a0 7408
bf89cb4d 7409
ae1362a3
AS
7410 for ac_header in $ac_header_list
7411do :
7412 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7413ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7414"
1f10e750 7415if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
bf89cb4d
GM
7416 cat >>confdefs.h <<_ACEOF
7417#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7418_ACEOF
edfaf76d 7419
ba4481b5
DL
7420fi
7421
bf89cb4d
GM
7422done
7423
7424
7425
7426
7427
7428
7429
7430
ae1362a3
AS
7431for ac_func in getpagesize
7432do :
7433 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7434if test "x$ac_cv_func_getpagesize" = x""yes; then :
7435 cat >>confdefs.h <<_ACEOF
7436#define HAVE_GETPAGESIZE 1
7437_ACEOF
bf89cb4d 7438
ae1362a3
AS
7439fi
7440done
bf89cb4d 7441
ae1362a3
AS
7442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7443$as_echo_n "checking for working mmap... " >&6; }
7444if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7445 $as_echo_n "(cached) " >&6
7446else
7447 if test "$cross_compiling" = yes; then :
7448 ac_cv_func_mmap_fixed_mapped=no
7449else
7450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7451/* end confdefs.h. */
7452$ac_includes_default
7453/* malloc might have been renamed as rpl_malloc. */
7454#undef malloc
bf89cb4d 7455
ae1362a3
AS
7456/* Thanks to Mike Haertel and Jim Avera for this test.
7457 Here is a matrix of mmap possibilities:
7458 mmap private not fixed
7459 mmap private fixed at somewhere currently unmapped
7460 mmap private fixed at somewhere already mapped
7461 mmap shared not fixed
7462 mmap shared fixed at somewhere currently unmapped
7463 mmap shared fixed at somewhere already mapped
7464 For private mappings, we should verify that changes cannot be read()
7465 back from the file, nor mmap's back from the file at a different
7466 address. (There have been systems where private was not correctly
7467 implemented like the infamous i386 svr4.0, and systems where the
7468 VM page cache was not coherent with the file system buffer cache
7469 like early versions of FreeBSD and possibly contemporary NetBSD.)
7470 For shared mappings, we should conversely verify that changes get
7471 propagated back to all the places they're supposed to be.
bf89cb4d 7472
ae1362a3
AS
7473 Grep wants private fixed already mapped.
7474 The main things grep needs to know about mmap are:
7475 * does it exist and is it safe to write into the mmap'd area
7476 * how to use it (BSD variants) */
bf89cb4d 7477
ae1362a3
AS
7478#include <fcntl.h>
7479#include <sys/mman.h>
bf89cb4d 7480
ae1362a3
AS
7481#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7482char *malloc ();
7483#endif
bf89cb4d 7484
ae1362a3
AS
7485/* This mess was copied from the GNU getpagesize.h. */
7486#ifndef HAVE_GETPAGESIZE
7487# ifdef _SC_PAGESIZE
7488# define getpagesize() sysconf(_SC_PAGESIZE)
7489# else /* no _SC_PAGESIZE */
7490# ifdef HAVE_SYS_PARAM_H
7491# include <sys/param.h>
7492# ifdef EXEC_PAGESIZE
7493# define getpagesize() EXEC_PAGESIZE
7494# else /* no EXEC_PAGESIZE */
7495# ifdef NBPG
7496# define getpagesize() NBPG * CLSIZE
7497# ifndef CLSIZE
7498# define CLSIZE 1
7499# endif /* no CLSIZE */
7500# else /* no NBPG */
7501# ifdef NBPC
7502# define getpagesize() NBPC
7503# else /* no NBPC */
7504# ifdef PAGESIZE
7505# define getpagesize() PAGESIZE
7506# endif /* PAGESIZE */
7507# endif /* no NBPC */
7508# endif /* no NBPG */
7509# endif /* no EXEC_PAGESIZE */
7510# else /* no HAVE_SYS_PARAM_H */
7511# define getpagesize() 8192 /* punt totally */
7512# endif /* no HAVE_SYS_PARAM_H */
7513# endif /* no _SC_PAGESIZE */
bf89cb4d 7514
ae1362a3 7515#endif /* no HAVE_GETPAGESIZE */
bf89cb4d 7516
ae1362a3
AS
7517int
7518main ()
7519{
7520 char *data, *data2, *data3;
1f10e750 7521 const char *cdata2;
ae1362a3
AS
7522 int i, pagesize;
7523 int fd, fd2;
bf89cb4d 7524
ae1362a3 7525 pagesize = getpagesize ();
bf89cb4d 7526
ae1362a3
AS
7527 /* First, make a file with some known garbage in it. */
7528 data = (char *) malloc (pagesize);
7529 if (!data)
7530 return 1;
7531 for (i = 0; i < pagesize; ++i)
7532 *(data + i) = rand ();
7533 umask (0);
7534 fd = creat ("conftest.mmap", 0600);
7535 if (fd < 0)
7536 return 2;
7537 if (write (fd, data, pagesize) != pagesize)
7538 return 3;
7539 close (fd);
bf89cb4d 7540
ae1362a3
AS
7541 /* Next, check that the tail of a page is zero-filled. File must have
7542 non-zero length, otherwise we risk SIGBUS for entire page. */
7543 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7544 if (fd2 < 0)
7545 return 4;
1f10e750
CY
7546 cdata2 = "";
7547 if (write (fd2, cdata2, 1) != 1)
ae1362a3 7548 return 5;
1f10e750 7549 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
ae1362a3
AS
7550 if (data2 == MAP_FAILED)
7551 return 6;
7552 for (i = 0; i < pagesize; ++i)
7553 if (*(data2 + i))
7554 return 7;
7555 close (fd2);
7556 if (munmap (data2, pagesize))
7557 return 8;
bf89cb4d 7558
ae1362a3
AS
7559 /* Next, try to mmap the file at a fixed address which already has
7560 something else allocated at it. If we can, also make sure that
7561 we see the same garbage. */
7562 fd = open ("conftest.mmap", O_RDWR);
7563 if (fd < 0)
7564 return 9;
7565 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7566 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7567 return 10;
7568 for (i = 0; i < pagesize; ++i)
7569 if (*(data + i) != *(data2 + i))
7570 return 11;
bf89cb4d 7571
ae1362a3
AS
7572 /* Finally, make sure that changes to the mapped area do not
7573 percolate back to the file as seen by read(). (This is a bug on
7574 some variants of i386 svr4.0.) */
7575 for (i = 0; i < pagesize; ++i)
7576 *(data2 + i) = *(data2 + i) + 1;
7577 data3 = (char *) malloc (pagesize);
7578 if (!data3)
7579 return 12;
7580 if (read (fd, data3, pagesize) != pagesize)
7581 return 13;
7582 for (i = 0; i < pagesize; ++i)
7583 if (*(data + i) != *(data3 + i))
7584 return 14;
7585 close (fd);
7586 return 0;
7587}
7588_ACEOF
7589if ac_fn_c_try_run "$LINENO"; then :
7590 ac_cv_func_mmap_fixed_mapped=yes
7591else
7592 ac_cv_func_mmap_fixed_mapped=no
7593fi
7594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7595 conftest.$ac_objext conftest.beam conftest.$ac_ext
7596fi
bf89cb4d 7597
ae1362a3
AS
7598fi
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7600$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7601if test $ac_cv_func_mmap_fixed_mapped = yes; then
bf89cb4d 7602
ae1362a3 7603$as_echo "#define HAVE_MMAP 1" >>confdefs.h
bf89cb4d 7604
ae1362a3
AS
7605fi
7606rm -f conftest.mmap conftest.txt
bf89cb4d 7607
ae1362a3
AS
7608if test $use_mmap_for_buffers = yes; then
7609 REL_ALLOC=no
7610fi
bf89cb4d 7611
ae1362a3 7612LIBS="$libsrc_libs $LIBS"
bf89cb4d 7613
ae1362a3
AS
7614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
7615$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7616if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
7617 $as_echo_n "(cached) " >&6
7618else
7619 ac_check_lib_save_LIBS=$LIBS
7620LIBS="-ldnet $LIBS"
7621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7622/* end confdefs.h. */
bf89cb4d 7623
ae1362a3
AS
7624/* Override any GCC internal prototype to avoid an error.
7625 Use char because int might match the return type of a GCC
7626 builtin and then its argument prototype would still apply. */
7627#ifdef __cplusplus
7628extern "C"
7629#endif
7630char dnet_ntoa ();
7631int
7632main ()
7633{
7634return dnet_ntoa ();
7635 ;
7636 return 0;
7637}
7638_ACEOF
7639if ac_fn_c_try_link "$LINENO"; then :
7640 ac_cv_lib_dnet_dnet_ntoa=yes
7641else
7642 ac_cv_lib_dnet_dnet_ntoa=no
7643fi
7644rm -f core conftest.err conftest.$ac_objext \
7645 conftest$ac_exeext conftest.$ac_ext
7646LIBS=$ac_check_lib_save_LIBS
7647fi
7648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7649$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7650if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
7651 cat >>confdefs.h <<_ACEOF
7652#define HAVE_LIBDNET 1
7653_ACEOF
bf89cb4d 7654
ae1362a3 7655 LIBS="-ldnet $LIBS"
bf89cb4d 7656
ae1362a3 7657fi
bf89cb4d
GM
7658
7659
ae1362a3
AS
7660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
7661$as_echo_n "checking for main in -lXbsd... " >&6; }
7662if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
7663 $as_echo_n "(cached) " >&6
7664else
7665 ac_check_lib_save_LIBS=$LIBS
7666LIBS="-lXbsd $LIBS"
7667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7668/* end confdefs.h. */
bf89cb4d
GM
7669
7670
ae1362a3
AS
7671int
7672main ()
7673{
7674return main ();
7675 ;
7676 return 0;
7677}
7678_ACEOF
7679if ac_fn_c_try_link "$LINENO"; then :
7680 ac_cv_lib_Xbsd_main=yes
7681else
7682 ac_cv_lib_Xbsd_main=no
7683fi
7684rm -f core conftest.err conftest.$ac_objext \
7685 conftest$ac_exeext conftest.$ac_ext
7686LIBS=$ac_check_lib_save_LIBS
7687fi
7688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
7689$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
7690if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
7691 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
7692fi
bf89cb4d
GM
7693
7694
ae1362a3
AS
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
7696$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
7697if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
bf89cb4d
GM
7698 $as_echo_n "(cached) " >&6
7699else
ae1362a3
AS
7700 ac_check_lib_save_LIBS=$LIBS
7701LIBS="-lpthreads $LIBS"
7702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 7703/* end confdefs.h. */
ba4481b5 7704
0ca10bb7
RC
7705/* Override any GCC internal prototype to avoid an error.
7706 Use char because int might match the return type of a GCC
7707 builtin and then its argument prototype would still apply. */
7708#ifdef __cplusplus
7709extern "C"
7710#endif
ae1362a3 7711char cma_open ();
0ca10bb7
RC
7712int
7713main ()
7714{
ae1362a3 7715return cma_open ();
0ca10bb7
RC
7716 ;
7717 return 0;
7718}
7719_ACEOF
ae1362a3
AS
7720if ac_fn_c_try_link "$LINENO"; then :
7721 ac_cv_lib_pthreads_cma_open=yes
0ca10bb7 7722else
ae1362a3 7723 ac_cv_lib_pthreads_cma_open=no
0ca10bb7 7724fi
ae1362a3
AS
7725rm -f core conftest.err conftest.$ac_objext \
7726 conftest$ac_exeext conftest.$ac_ext
7727LIBS=$ac_check_lib_save_LIBS
ba4481b5 7728fi
ae1362a3
AS
7729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
7730$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
7731if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
0ca10bb7 7732 cat >>confdefs.h <<_ACEOF
ae1362a3 7733#define HAVE_LIBPTHREADS 1
0ca10bb7 7734_ACEOF
503d2be0 7735
ae1362a3
AS
7736 LIBS="-lpthreads $LIBS"
7737
0ca10bb7 7738fi
6bae0ccf 7739
98418dba 7740
bf89cb4d 7741
ae1362a3
AS
7742case ${host_os} in
7743aix*)
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
7745$as_echo_n "checking for -bbigtoc option... " >&6; }
7746if test "${gdb_cv_bigtoc+set}" = set; then :
e9a63f04 7747 $as_echo_n "(cached) " >&6
ba4481b5 7748else
ae1362a3
AS
7749
7750 case $GCC in
7751 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
7752 *) gdb_cv_bigtoc=-bbigtoc ;;
7753 esac
7754
7755 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
7756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 7757/* end confdefs.h. */
ae1362a3
AS
7758
7759int
7760main ()
7761{
7762int i;
7763 ;
7764 return 0;
7765}
0ca10bb7 7766_ACEOF
ae1362a3
AS
7767if ac_fn_c_try_link "$LINENO"; then :
7768
0ca10bb7 7769else
ae1362a3
AS
7770 gdb_cv_bigtoc=
7771fi
7772rm -f core conftest.err conftest.$ac_objext \
7773 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 7774
0ca10bb7 7775fi
ae1362a3
AS
7776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
7777$as_echo "$gdb_cv_bigtoc" >&6; }
7778 ;;
7779esac
0ca10bb7 7780
ae1362a3
AS
7781# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
7782# used for the tests that follow. We set them back to REAL_CFLAGS and
7783# REAL_CPPFLAGS later on.
7784
7785REAL_CPPFLAGS="$CPPFLAGS"
7786
7787if test "${HAVE_X11}" = "yes"; then
7788 DEFS="$C_SWITCH_X_SITE $DEFS"
7789 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
7790 LIBS="$LIBX $LIBS"
7791 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
7792 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
7793
7794 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
7795 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
7796 # but it's more convenient here to set LD_RUN_PATH
7797 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
7798 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
7799 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
7800 export LD_RUN_PATH
7801 fi
7802
7803 if test "${opsys}" = "gnu-linux"; then
7804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
7805$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
7806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7807/* end confdefs.h. */
7808
7809int
7810main ()
7811{
7812XOpenDisplay ("foo");
7813 ;
7814 return 0;
7815}
7816_ACEOF
7817if ac_fn_c_try_link "$LINENO"; then :
7818 xlinux_first_failure=no
7819else
7820 xlinux_first_failure=yes
7821fi
7822rm -f core conftest.err conftest.$ac_objext \
7823 conftest$ac_exeext conftest.$ac_ext
7824 if test "${xlinux_first_failure}" = "yes"; then
7825 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
7826 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
7827 OLD_CPPFLAGS="$CPPFLAGS"
7828 OLD_LIBS="$LIBS"
7829 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
7830 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
7831 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
7832 LIBS="$LIBS -b i486-linuxaout"
7833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7834/* end confdefs.h. */
7835
7836int
7837main ()
7838{
7839XOpenDisplay ("foo");
7840 ;
7841 return 0;
7842}
7843_ACEOF
7844if ac_fn_c_try_link "$LINENO"; then :
7845 xlinux_second_failure=no
7846else
7847 xlinux_second_failure=yes
7848fi
7849rm -f core conftest.err conftest.$ac_objext \
7850 conftest$ac_exeext conftest.$ac_ext
7851 if test "${xlinux_second_failure}" = "yes"; then
7852 # If we get the same failure with -b, there is no use adding -b.
7853 # So take it out. This plays safe.
7854 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
7855 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
7856 CPPFLAGS="$OLD_CPPFLAGS"
7857 LIBS="$OLD_LIBS"
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7859$as_echo "no" >&6; }
7860 else
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7862$as_echo "yes" >&6; }
7863 fi
7864 else
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7866$as_echo "no" >&6; }
7867 fi
7868 fi
edfaf76d 7869
ae1362a3
AS
7870 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
7871 # header files included from there.
7872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
7873$as_echo_n "checking for Xkb... " >&6; }
7874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 7875/* end confdefs.h. */
ae1362a3
AS
7876#include <X11/Xlib.h>
7877#include <X11/XKBlib.h>
7878int
7879main ()
7880{
7881XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
7882 ;
7883 return 0;
7884}
503d2be0 7885_ACEOF
ae1362a3
AS
7886if ac_fn_c_try_link "$LINENO"; then :
7887 emacs_xkb=yes
503d2be0 7888else
ae1362a3 7889 emacs_xkb=no
ba4481b5 7890fi
ae1362a3
AS
7891rm -f core conftest.err conftest.$ac_objext \
7892 conftest$ac_exeext conftest.$ac_ext
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
7894$as_echo "$emacs_xkb" >&6; }
7895 if test $emacs_xkb = yes; then
ba4481b5 7896
ae1362a3 7897$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
0ca10bb7 7898
ae1362a3 7899 fi
0ca10bb7 7900
ae1362a3
AS
7901 for ac_func in XrmSetDatabase XScreenResourceString \
7902XScreenNumberOfScreen XSetWMProtocols
7903do :
7904 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7905ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
1f10e750 7906if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
bf89cb4d 7907 cat >>confdefs.h <<_ACEOF
ae1362a3 7908#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
0ca10bb7 7909_ACEOF
edfaf76d 7910
0ca10bb7 7911fi
bf89cb4d 7912done
edfaf76d 7913
ae1362a3 7914fi
0ca10bb7 7915
ae1362a3
AS
7916if test "${window_system}" = "x11"; then
7917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
7918$as_echo_n "checking X11 version 6... " >&6; }
7919 if test "${emacs_cv_x11_version_6+set}" = set; then :
bf89cb4d 7920 $as_echo_n "(cached) " >&6
f21fadcc 7921else
ae1362a3 7922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 7923/* end confdefs.h. */
ae1362a3
AS
7924#include <X11/Xlib.h>
7925int
7926main ()
7927{
7928#if XlibSpecificationRelease < 6
7929fail;
7930#endif
7931
7932 ;
7933 return 0;
7934}
f21fadcc 7935_ACEOF
ae1362a3
AS
7936if ac_fn_c_try_link "$LINENO"; then :
7937 emacs_cv_x11_version_6=yes
f21fadcc 7938else
ae1362a3
AS
7939 emacs_cv_x11_version_6=no
7940fi
7941rm -f core conftest.err conftest.$ac_objext \
7942 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 7943fi
0ca10bb7 7944
ae1362a3
AS
7945 if test $emacs_cv_x11_version_6 = yes; then
7946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
7947$as_echo "6 or newer" >&6; }
0ca10bb7 7948
ae1362a3 7949$as_echo "#define HAVE_X11R6 1" >>confdefs.h
f21fadcc 7950
ae1362a3
AS
7951 else
7952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
7953$as_echo "before 6" >&6; }
7954 fi
f21fadcc
JD
7955fi
7956
98418dba 7957
ae1362a3
AS
7958### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
7959HAVE_RSVG=no
7960if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
7961 if test "${with_rsvg}" != "no"; then
7962 RSVG_REQUIRED=2.11.0
7963 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
bf89cb4d 7964
ae1362a3
AS
7965
7966 succeeded=no
7967
7968 # Extract the first word of "pkg-config", so it can be a program name with args.
7969set dummy pkg-config; ac_word=$2
7970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7971$as_echo_n "checking for $ac_word... " >&6; }
7972if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
e9a63f04 7973 $as_echo_n "(cached) " >&6
ba4481b5 7974else
ae1362a3
AS
7975 case $PKG_CONFIG in
7976 [\\/]* | ?:[\\/]*)
7977 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7978 ;;
7979 *)
7980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7981for as_dir in $PATH
7982do
7983 IFS=$as_save_IFS
7984 test -z "$as_dir" && as_dir=.
7985 for ac_exec_ext in '' $ac_executable_extensions; do
7986 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7987 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7989 break 2
7990 fi
7991done
7992 done
7993IFS=$as_save_IFS
0ca10bb7 7994
ae1362a3
AS
7995 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
7996 ;;
7997esac
ba4481b5 7998fi
ae1362a3
AS
7999PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8000if test -n "$PKG_CONFIG"; then
8001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8002$as_echo "$PKG_CONFIG" >&6; }
8003else
8004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8005$as_echo "no" >&6; }
ba4481b5
DL
8006fi
8007
0ca10bb7 8008
bf89cb4d 8009
ae1362a3
AS
8010 if test "$PKG_CONFIG" = "no" ; then
8011 :
8012 else
8013 PKG_CONFIG_MIN_VERSION=0.9.0
8014 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8016$as_echo_n "checking for $RSVG_MODULE... " >&6; }
bf89cb4d 8017
ae1362a3
AS
8018 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8020$as_echo "yes" >&6; }
8021 succeeded=yes
ca81d7a0 8022
ae1362a3
AS
8023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8024$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8025 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8027$as_echo "$RSVG_CFLAGS" >&6; }
503d2be0 8028
ae1362a3
AS
8029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8030$as_echo_n "checking RSVG_LIBS... " >&6; }
8031 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8033$as_echo "$RSVG_LIBS" >&6; }
8034 else
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8036$as_echo "no" >&6; }
8037 RSVG_CFLAGS=""
8038 RSVG_LIBS=""
8039 ## If we have a custom action on failure, don't print errors, but
8040 ## do set a variable so people can do so.
8041 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
ba4481b5 8042
ae1362a3 8043 fi
ba4481b5 8044
19650fd6 8045
ca81d7a0 8046
ae1362a3
AS
8047 else
8048 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8049 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8050 fi
8051 fi
ba4481b5 8052
ae1362a3
AS
8053 if test $succeeded = yes; then
8054 :
8055 else
8056 :
8057 fi
98418dba 8058
98418dba 8059
edfaf76d 8060
edfaf76d 8061
ae1362a3
AS
8062 if test ".${RSVG_CFLAGS}" != "."; then
8063 HAVE_RSVG=yes
edfaf76d 8064
ae1362a3 8065$as_echo "#define HAVE_RSVG 1" >>confdefs.h
edfaf76d 8066
ae1362a3
AS
8067 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8068 LIBS="$RSVG_LIBS $LIBS"
8069 fi
8070 fi
8071fi
cd958eb3 8072
19650fd6 8073
ae1362a3
AS
8074HAVE_GTK=no
8075if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8076 GLIB_REQUIRED=2.6
8077 GTK_REQUIRED=2.6
8078 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
ca81d7a0 8079
0ca10bb7 8080
ae1362a3 8081 succeeded=no
503d2be0 8082
ae1362a3
AS
8083 # Extract the first word of "pkg-config", so it can be a program name with args.
8084set dummy pkg-config; ac_word=$2
8085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8086$as_echo_n "checking for $ac_word... " >&6; }
8087if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8088 $as_echo_n "(cached) " >&6
8089else
8090 case $PKG_CONFIG in
8091 [\\/]* | ?:[\\/]*)
8092 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8093 ;;
8094 *)
8095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8096for as_dir in $PATH
8097do
8098 IFS=$as_save_IFS
8099 test -z "$as_dir" && as_dir=.
8100 for ac_exec_ext in '' $ac_executable_extensions; do
8101 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8102 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8104 break 2
8105 fi
8106done
8107 done
8108IFS=$as_save_IFS
0ca10bb7 8109
ae1362a3
AS
8110 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8111 ;;
8112esac
8113fi
8114PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8115if test -n "$PKG_CONFIG"; then
8116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8117$as_echo "$PKG_CONFIG" >&6; }
8118else
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8120$as_echo "no" >&6; }
8121fi
edfaf76d 8122
ba4481b5 8123
ba4481b5 8124
ae1362a3
AS
8125 if test "$PKG_CONFIG" = "no" ; then
8126 pkg_check_gtk=no
8127 else
8128 PKG_CONFIG_MIN_VERSION=0.9.0
8129 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8131$as_echo_n "checking for $GTK_MODULES... " >&6; }
bf89cb4d 8132
ae1362a3
AS
8133 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8135$as_echo "yes" >&6; }
8136 succeeded=yes
bf89cb4d 8137
ae1362a3
AS
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8139$as_echo_n "checking GTK_CFLAGS... " >&6; }
8140 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8142$as_echo "$GTK_CFLAGS" >&6; }
c0d27fcc 8143
ae1362a3
AS
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8145$as_echo_n "checking GTK_LIBS... " >&6; }
8146 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8148$as_echo "$GTK_LIBS" >&6; }
8149 else
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8151$as_echo "no" >&6; }
8152 GTK_CFLAGS=""
8153 GTK_LIBS=""
8154 ## If we have a custom action on failure, don't print errors, but
8155 ## do set a variable so people can do so.
8156 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
19650fd6 8157
ae1362a3 8158 fi
0ca10bb7 8159
0ca10bb7 8160
0ca10bb7 8161
ae1362a3
AS
8162 else
8163 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8164 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8165 fi
8166 fi
0ca10bb7 8167
ae1362a3
AS
8168 if test $succeeded = yes; then
8169 pkg_check_gtk=yes
8170 else
8171 pkg_check_gtk=no
8172 fi
ca81d7a0 8173
ae1362a3 8174 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
1f10e750 8175 as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5
ae1362a3
AS
8176 fi
8177fi
c0d27fcc 8178
ca81d7a0 8179
ae1362a3 8180if test x"$pkg_check_gtk" = xyes; then
c0d27fcc 8181
ba4481b5 8182
c0d27fcc 8183
ae1362a3
AS
8184 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8185 CFLAGS="$CFLAGS $GTK_CFLAGS"
8186 LIBS="$GTK_LIBS $LIBS"
8187 GTK_COMPILES=no
8188 for ac_func in gtk_main
8189do :
8190 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8191if test "x$ac_cv_func_gtk_main" = x""yes; then :
8192 cat >>confdefs.h <<_ACEOF
8193#define HAVE_GTK_MAIN 1
8194_ACEOF
8195 GTK_COMPILES=yes
8196fi
8197done
503d2be0 8198
ae1362a3
AS
8199 if test "${GTK_COMPILES}" != "yes"; then
8200 if test "$USE_X_TOOLKIT" != "maybe"; then
1f10e750 8201 as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
ae1362a3
AS
8202 fi
8203 else
8204 HAVE_GTK=yes
503d2be0 8205
ae1362a3 8206$as_echo "#define USE_GTK 1" >>confdefs.h
19650fd6 8207
ae1362a3
AS
8208 USE_X_TOOLKIT=none
8209 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
8210 :
8211 else
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: 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." >&5
8216$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
8217 closing open displays. This is no problem if you just use
8218 one display, but if you use more than one and close one of them
8219 Emacs may crash." >&2;}
8220 sleep 3
8221 fi
8222 fi
ca81d7a0 8223
ae1362a3 8224fi
ba4481b5 8225
ba4481b5 8226
ae1362a3 8227if test "${HAVE_GTK}" = "yes"; then
0ca10bb7 8228
ae1362a3
AS
8229 if test "$with_toolkit_scroll_bars" != no; then
8230 with_toolkit_scroll_bars=yes
8231 fi
ba4481b5 8232
ae1362a3
AS
8233 HAVE_GTK_MULTIDISPLAY=no
8234 for ac_func in gdk_display_open
8235do :
8236 ac_fn_c_check_func "$LINENO" "gdk_display_open" "ac_cv_func_gdk_display_open"
8237if test "x$ac_cv_func_gdk_display_open" = x""yes; then :
8238 cat >>confdefs.h <<_ACEOF
8239#define HAVE_GDK_DISPLAY_OPEN 1
8240_ACEOF
8241 HAVE_GTK_MULTIDISPLAY=yes
8242fi
8243done
503d2be0 8244
ae1362a3 8245 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
c0d27fcc 8246
ae1362a3 8247$as_echo "#define HAVE_GTK_MULTIDISPLAY 1" >>confdefs.h
c0d27fcc 8248
ae1362a3 8249 fi
19650fd6 8250
ae1362a3
AS
8251 HAVE_GTK_FILE_SELECTION=no
8252 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
8253#include <gtk/gtk.h>
8254"
8255if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
8256 HAVE_GTK_FILE_SELECTION=yes
0ca10bb7 8257else
ae1362a3 8258 HAVE_GTK_FILE_SELECTION=no
bf89cb4d 8259fi
ae1362a3
AS
8260
8261 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
8262 for ac_func in gtk_file_selection_new
8263do :
8264 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
8265if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
8266 cat >>confdefs.h <<_ACEOF
8267#define HAVE_GTK_FILE_SELECTION_NEW 1
8268_ACEOF
8269 HAVE_GTK_FILE_SELECTION=yes
8270else
8271 HAVE_GTK_FILE_SELECTION=no
0ca10bb7 8272fi
ae1362a3 8273done
c0d27fcc 8274
ae1362a3 8275 fi
ca81d7a0 8276
ae1362a3
AS
8277 HAVE_GTK_FILE_CHOOSER=no
8278 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_CHOOSER" "ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" "$ac_includes_default
8279#include <gtk/gtk.h>
8280"
8281if test "x$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" = x""yes; then :
8282 HAVE_GTK_FILE_CHOOSER=yes
8283else
8284 HAVE_GTK_FILE_CHOOSER=no
ba4481b5 8285fi
98418dba 8286
ae1362a3
AS
8287 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8288 for ac_func in gtk_file_chooser_dialog_new
8289do :
8290 ac_fn_c_check_func "$LINENO" "gtk_file_chooser_dialog_new" "ac_cv_func_gtk_file_chooser_dialog_new"
8291if test "x$ac_cv_func_gtk_file_chooser_dialog_new" = x""yes; then :
8292 cat >>confdefs.h <<_ACEOF
8293#define HAVE_GTK_FILE_CHOOSER_DIALOG_NEW 1
8294_ACEOF
8295 HAVE_GTK_FILE_CHOOSER=yes
8296else
8297 HAVE_GTK_FILE_CHOOSER=no
c0d27fcc 8298fi
ae1362a3 8299done
0ca10bb7 8300
ae1362a3 8301 fi
0ca10bb7 8302
ae1362a3
AS
8303 if test "$HAVE_GTK_FILE_SELECTION" = yes \
8304 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
edfaf76d 8305
ae1362a3 8306$as_echo "#define HAVE_GTK_FILE_BOTH 1" >>confdefs.h
edfaf76d 8307
ae1362a3 8308 fi
edfaf76d 8309
ae1362a3
AS
8310 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8311 HAVE_GTK_AND_PTHREAD=no
8312 for ac_header in pthread.h
8313do :
8314 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8315if test "x$ac_cv_header_pthread_h" = x""yes; then :
8316 cat >>confdefs.h <<_ACEOF
8317#define HAVE_PTHREAD_H 1
8318_ACEOF
bf89cb4d 8319
ae1362a3 8320fi
bf89cb4d 8321
ae1362a3
AS
8322done
8323
8324 if test "$ac_cv_header_pthread_h"; then
8325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
8326$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
8327if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
0ca10bb7
RC
8328 $as_echo_n "(cached) " >&6
8329else
ae1362a3
AS
8330 ac_check_lib_save_LIBS=$LIBS
8331LIBS="-lpthread $LIBS"
8332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 8333/* end confdefs.h. */
edfaf76d 8334
ca81d7a0
JD
8335/* Override any GCC internal prototype to avoid an error.
8336 Use char because int might match the return type of a GCC
8337 builtin and then its argument prototype would still apply. */
503d2be0
AS
8338#ifdef __cplusplus
8339extern "C"
8340#endif
ae1362a3 8341char pthread_self ();
19650fd6
AS
8342int
8343main ()
8344{
ae1362a3 8345return pthread_self ();
503d2be0
AS
8346 ;
8347 return 0;
8348}
8349_ACEOF
ae1362a3
AS
8350if ac_fn_c_try_link "$LINENO"; then :
8351 ac_cv_lib_pthread_pthread_self=yes
503d2be0 8352else
ae1362a3
AS
8353 ac_cv_lib_pthread_pthread_self=no
8354fi
8355rm -f core conftest.err conftest.$ac_objext \
8356 conftest$ac_exeext conftest.$ac_ext
8357LIBS=$ac_check_lib_save_LIBS
8358fi
8359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
8360$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
8361if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
8362 HAVE_GTK_AND_PTHREAD=yes
8363fi
8364
8365 fi
8366 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
8367 case "${canonical}" in
8368 *-hpux*) ;;
8369 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
8370 esac
0ca10bb7 8371
ae1362a3
AS
8372$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
8373
8374 fi
8375 fi
c0d27fcc 8376fi
ca81d7a0 8377
ae1362a3
AS
8378HAVE_DBUS=no
8379if test "${with_dbus}" = "yes"; then
8380
8381 succeeded=no
8382
8383 # Extract the first word of "pkg-config", so it can be a program name with args.
8384set dummy pkg-config; ac_word=$2
8385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8386$as_echo_n "checking for $ac_word... " >&6; }
8387if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8388 $as_echo_n "(cached) " >&6
8389else
8390 case $PKG_CONFIG in
8391 [\\/]* | ?:[\\/]*)
8392 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8393 ;;
8394 *)
8395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8396for as_dir in $PATH
8397do
8398 IFS=$as_save_IFS
8399 test -z "$as_dir" && as_dir=.
8400 for ac_exec_ext in '' $ac_executable_extensions; do
8401 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8402 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8403 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8404 break 2
8405 fi
8406done
8407 done
8408IFS=$as_save_IFS
8409
8410 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8411 ;;
8412esac
bf89cb4d 8413fi
ae1362a3
AS
8414PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8415if test -n "$PKG_CONFIG"; then
8416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8417$as_echo "$PKG_CONFIG" >&6; }
bf89cb4d 8418else
ae1362a3
AS
8419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8420$as_echo "no" >&6; }
bf89cb4d 8421fi
c0d27fcc 8422
19650fd6 8423
c0d27fcc 8424
ae1362a3
AS
8425 if test "$PKG_CONFIG" = "no" ; then
8426 HAVE_DBUS=no
8427 else
8428 PKG_CONFIG_MIN_VERSION=0.9.0
8429 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
8431$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
0ca10bb7 8432
ae1362a3
AS
8433 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
8434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8435$as_echo "yes" >&6; }
8436 succeeded=yes
0ca10bb7 8437
ae1362a3
AS
8438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
8439$as_echo_n "checking DBUS_CFLAGS... " >&6; }
8440 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
8442$as_echo "$DBUS_CFLAGS" >&6; }
0ca10bb7 8443
ae1362a3
AS
8444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
8445$as_echo_n "checking DBUS_LIBS... " >&6; }
8446 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
8448$as_echo "$DBUS_LIBS" >&6; }
8449 else
8450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8451$as_echo "no" >&6; }
8452 DBUS_CFLAGS=""
8453 DBUS_LIBS=""
8454 ## If we have a custom action on failure, don't print errors, but
8455 ## do set a variable so people can do so.
8456 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
8457
8458 fi
0ca10bb7 8459
ba4481b5 8460
98418dba 8461
ae1362a3
AS
8462 else
8463 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8464 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8465 fi
8466 fi
8467
8468 if test $succeeded = yes; then
8469 HAVE_DBUS=yes
8470 else
8471 HAVE_DBUS=no
8472 fi
8473
8474 if test "$HAVE_DBUS" = yes; then
8475 LIBS="$LIBS $DBUS_LIBS"
8476
8477$as_echo "#define HAVE_DBUS 1" >>confdefs.h
8478
8479 for ac_func in dbus_watch_get_unix_fd
8480do :
8481 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
8482if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
bf89cb4d 8483 cat >>confdefs.h <<_ACEOF
ae1362a3 8484#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
bf89cb4d 8485_ACEOF
c0d27fcc 8486
98418dba 8487fi
bf89cb4d 8488done
98418dba 8489
ae1362a3
AS
8490 fi
8491fi
bf89cb4d 8492
ae1362a3
AS
8493HAVE_GCONF=no
8494if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
bf89cb4d 8495
ae1362a3
AS
8496 succeeded=no
8497
8498 # Extract the first word of "pkg-config", so it can be a program name with args.
8499set dummy pkg-config; ac_word=$2
8500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8501$as_echo_n "checking for $ac_word... " >&6; }
8502if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
e9a63f04 8503 $as_echo_n "(cached) " >&6
98418dba 8504else
ae1362a3
AS
8505 case $PKG_CONFIG in
8506 [\\/]* | ?:[\\/]*)
8507 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8508 ;;
8509 *)
8510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8511for as_dir in $PATH
8512do
8513 IFS=$as_save_IFS
8514 test -z "$as_dir" && as_dir=.
8515 for ac_exec_ext in '' $ac_executable_extensions; do
8516 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8517 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8518 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8519 break 2
8520 fi
8521done
8522 done
8523IFS=$as_save_IFS
19650fd6 8524
ae1362a3
AS
8525 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8526 ;;
bf89cb4d 8527esac
ae1362a3
AS
8528fi
8529PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8530if test -n "$PKG_CONFIG"; then
8531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8532$as_echo "$PKG_CONFIG" >&6; }
c0d27fcc 8533else
ae1362a3
AS
8534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8535$as_echo "no" >&6; }
0ca10bb7 8536fi
bf89cb4d 8537
ca81d7a0 8538
c0d27fcc 8539
ae1362a3
AS
8540 if test "$PKG_CONFIG" = "no" ; then
8541 HAVE_GCONF=no
8542 else
8543 PKG_CONFIG_MIN_VERSION=0.9.0
8544 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
8546$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
ca81d7a0 8547
ae1362a3
AS
8548 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8550$as_echo "yes" >&6; }
8551 succeeded=yes
bf89cb4d 8552
ae1362a3
AS
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
8554$as_echo_n "checking GCONF_CFLAGS... " >&6; }
8555 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
8557$as_echo "$GCONF_CFLAGS" >&6; }
c0d27fcc 8558
ae1362a3
AS
8559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
8560$as_echo_n "checking GCONF_LIBS... " >&6; }
8561 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
8563$as_echo "$GCONF_LIBS" >&6; }
8564 else
8565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8566$as_echo "no" >&6; }
8567 GCONF_CFLAGS=""
8568 GCONF_LIBS=""
8569 ## If we have a custom action on failure, don't print errors, but
8570 ## do set a variable so people can do so.
8571 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
c0d27fcc 8572
ae1362a3 8573 fi
c0d27fcc
MR
8574
8575
ae1362a3
AS
8576
8577 else
8578 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8579 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8580 fi
8581 fi
8582
8583 if test $succeeded = yes; then
8584 HAVE_GCONF=yes
8585 else
8586 HAVE_GCONF=no
8587 fi
8588
8589 if test "$HAVE_GCONF" = yes; then
8590
8591$as_echo "#define HAVE_GCONF 1" >>confdefs.h
8592
1e600395
J
8593 for ac_func in g_type_init
8594do :
8595 ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
8596if test "x$ac_cv_func_g_type_init" = x""yes; then :
8597 cat >>confdefs.h <<_ACEOF
8598#define HAVE_G_TYPE_INIT 1
8599_ACEOF
8600
8601fi
8602done
8603
ae1362a3 8604 fi
bf89cb4d 8605fi
ae1362a3
AS
8606
8607HAVE_XAW3D=no
8608if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
8609 if test "$with_xaw3d" != no; then
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
8611$as_echo_n "checking for xaw3d... " >&6; }
8612 if test "${emacs_cv_xaw3d+set}" = set; then :
e9a63f04 8613 $as_echo_n "(cached) " >&6
c0d27fcc 8614else
ae1362a3 8615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 8616/* end confdefs.h. */
bf89cb4d 8617
ae1362a3
AS
8618#include <X11/Intrinsic.h>
8619#include <X11/Xaw3d/Simple.h>
0ca10bb7
RC
8620int
8621main ()
8622{
ae1362a3 8623
0ca10bb7
RC
8624 ;
8625 return 0;
8626}
503d2be0 8627_ACEOF
ae1362a3 8628if ac_fn_c_try_link "$LINENO"; then :
37f7b784
CY
8629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XawScrollbarSetThumb in -lXaw3d" >&5
8630$as_echo_n "checking for XawScrollbarSetThumb in -lXaw3d... " >&6; }
8631if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then :
8632 $as_echo_n "(cached) " >&6
8633else
8634 ac_check_lib_save_LIBS=$LIBS
8635LIBS="-lXaw3d $LIBS"
8636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8637/* end confdefs.h. */
8638
8639/* Override any GCC internal prototype to avoid an error.
8640 Use char because int might match the return type of a GCC
8641 builtin and then its argument prototype would still apply. */
8642#ifdef __cplusplus
8643extern "C"
8644#endif
8645char XawScrollbarSetThumb ();
8646int
8647main ()
8648{
8649return XawScrollbarSetThumb ();
8650 ;
8651 return 0;
8652}
8653_ACEOF
8654if ac_fn_c_try_link "$LINENO"; then :
8655 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
8656else
8657 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
8658fi
8659rm -f core conftest.err conftest.$ac_objext \
8660 conftest$ac_exeext conftest.$ac_ext
8661LIBS=$ac_check_lib_save_LIBS
8662fi
8663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
8664$as_echo "$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
8665if test "x$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" = x""yes; then :
ae1362a3 8666 emacs_cv_xaw3d=yes
503d2be0 8667else
ae1362a3 8668 emacs_cv_xaw3d=no
bf89cb4d 8669fi
37f7b784
CY
8670
8671else
8672 emacs_cv_xaw3d=no
8673fi
ae1362a3
AS
8674rm -f core conftest.err conftest.$ac_objext \
8675 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 8676fi
c0d27fcc 8677
ae1362a3
AS
8678 else
8679 emacs_cv_xaw3d=no
8680 fi
8681 if test $emacs_cv_xaw3d = yes; then
8682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
8683$as_echo "yes; using Lucid toolkit" >&6; }
8684 USE_X_TOOLKIT=LUCID
8685 HAVE_XAW3D=yes
8686
8687$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
8688
8689 else
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8691$as_echo "no" >&6; }
8692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
8693$as_echo_n "checking for libXaw... " >&6; }
8694 if test "${emacs_cv_xaw+set}" = set; then :
e9a63f04 8695 $as_echo_n "(cached) " >&6
b5de8dc0 8696else
ae1362a3 8697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 8698/* end confdefs.h. */
b5de8dc0 8699
ae1362a3
AS
8700#include <X11/Intrinsic.h>
8701#include <X11/Xaw/Simple.h>
503d2be0
AS
8702int
8703main ()
8704{
ae1362a3 8705
503d2be0
AS
8706 ;
8707 return 0;
8708}
8709_ACEOF
ae1362a3
AS
8710if ac_fn_c_try_link "$LINENO"; then :
8711 emacs_cv_xaw=yes
503d2be0 8712else
ae1362a3 8713 emacs_cv_xaw=no
0ca10bb7 8714fi
ae1362a3
AS
8715rm -f core conftest.err conftest.$ac_objext \
8716 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
8717fi
8718
ae1362a3
AS
8719 if test $emacs_cv_xaw = yes; then
8720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
8721$as_echo "yes; using Lucid toolkit" >&6; }
8722 USE_X_TOOLKIT=LUCID
8723 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
1f10e750 8724 as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
ae1362a3
AS
8725 else
8726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
8727$as_echo "no; do not use toolkit by default" >&6; }
8728 USE_X_TOOLKIT=none
8729 fi
8730 fi
0ca10bb7
RC
8731fi
8732
ae1362a3
AS
8733X_TOOLKIT_TYPE=$USE_X_TOOLKIT
8734
8735if test "${USE_X_TOOLKIT}" != "none"; then
8736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
8737$as_echo_n "checking X11 toolkit version... " >&6; }
8738 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
0ca10bb7
RC
8739 $as_echo_n "(cached) " >&6
8740else
ae1362a3 8741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 8742/* end confdefs.h. */
ae1362a3 8743#include <X11/Intrinsic.h>
6bae0ccf
DL
8744int
8745main ()
8746{
ae1362a3
AS
8747#if XtSpecificationRelease < 6
8748fail;
8749#endif
8750
6bae0ccf
DL
8751 ;
8752 return 0;
8753}
8754_ACEOF
ae1362a3
AS
8755if ac_fn_c_try_link "$LINENO"; then :
8756 emacs_cv_x11_toolkit_version_6=yes
6bae0ccf 8757else
ae1362a3 8758 emacs_cv_x11_toolkit_version_6=no
6bae0ccf 8759fi
ae1362a3
AS
8760rm -f core conftest.err conftest.$ac_objext \
8761 conftest$ac_exeext conftest.$ac_ext
98418dba 8762fi
c0d27fcc 8763
ae1362a3
AS
8764 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
8765 if test $emacs_cv_x11_toolkit_version_6 = yes; then
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8767$as_echo "6 or newer" >&6; }
c0d27fcc 8768
ae1362a3 8769$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
bf89cb4d 8770
ae1362a3
AS
8771 else
8772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8773$as_echo "before 6" >&6; }
8774 fi
8775
8776 OLDLIBS="$LIBS"
8777 if test x$HAVE_X11XTR6 = xyes; then
8778 LIBS="-lXt -lSM -lICE $LIBS"
8779 else
8780 LIBS="-lXt $LIBS"
8781 fi
8782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
8783$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
8784if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
e9a63f04 8785 $as_echo_n "(cached) " >&6
98418dba 8786else
ae1362a3
AS
8787 ac_check_lib_save_LIBS=$LIBS
8788LIBS="-lXmu $LIBS"
8789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 8790/* end confdefs.h. */
98418dba 8791
0ca10bb7
RC
8792/* Override any GCC internal prototype to avoid an error.
8793 Use char because int might match the return type of a GCC
8794 builtin and then its argument prototype would still apply. */
8795#ifdef __cplusplus
8796extern "C"
8797#endif
ae1362a3 8798char XmuConvertStandardSelection ();
0ca10bb7
RC
8799int
8800main ()
8801{
ae1362a3 8802return XmuConvertStandardSelection ();
0ca10bb7
RC
8803 ;
8804 return 0;
8805}
8806_ACEOF
ae1362a3
AS
8807if ac_fn_c_try_link "$LINENO"; then :
8808 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
0ca10bb7 8809else
ae1362a3 8810 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
b5de8dc0 8811fi
ae1362a3
AS
8812rm -f core conftest.err conftest.$ac_objext \
8813 conftest$ac_exeext conftest.$ac_ext
8814LIBS=$ac_check_lib_save_LIBS
b5de8dc0 8815fi
ae1362a3
AS
8816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
8817$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
8818if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
bf89cb4d 8819 cat >>confdefs.h <<_ACEOF
ae1362a3 8820#define HAVE_LIBXMU 1
bf89cb4d 8821_ACEOF
0ca10bb7 8822
ae1362a3 8823 LIBS="-lXmu $LIBS"
0ca10bb7 8824
bf89cb4d 8825fi
ca81d7a0 8826
ae1362a3 8827 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
b936fae4 8828fi
bf89cb4d 8829
ae1362a3
AS
8830# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
8831if test "${HAVE_X11}" = "yes"; then
8832 if test "${USE_X_TOOLKIT}" != "none"; then
8833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
8834$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
8835if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
bf89cb4d
GM
8836 $as_echo_n "(cached) " >&6
8837else
8838 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
8839LIBS="-lXext $LIBS"
8840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7
RC
8841/* end confdefs.h. */
8842
bf89cb4d
GM
8843/* Override any GCC internal prototype to avoid an error.
8844 Use char because int might match the return type of a GCC
8845 builtin and then its argument prototype would still apply. */
8846#ifdef __cplusplus
8847extern "C"
8848#endif
ae1362a3 8849char XShapeQueryExtension ();
0ca10bb7
RC
8850int
8851main ()
8852{
ae1362a3
AS
8853return XShapeQueryExtension ();
8854 ;
8855 return 0;
8856}
8857_ACEOF
8858if ac_fn_c_try_link "$LINENO"; then :
8859 ac_cv_lib_Xext_XShapeQueryExtension=yes
0ca10bb7 8860else
ae1362a3 8861 ac_cv_lib_Xext_XShapeQueryExtension=no
bf89cb4d 8862fi
ae1362a3
AS
8863rm -f core conftest.err conftest.$ac_objext \
8864 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
8865LIBS=$ac_check_lib_save_LIBS
8866fi
ae1362a3
AS
8867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
8868$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
8869if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
bf89cb4d 8870 cat >>confdefs.h <<_ACEOF
ae1362a3 8871#define HAVE_LIBXEXT 1
bf89cb4d 8872_ACEOF
52dbaac8 8873
ae1362a3 8874 LIBS="-lXext $LIBS"
52dbaac8 8875
bf89cb4d 8876fi
52dbaac8 8877
ae1362a3 8878 fi
bf89cb4d 8879fi
52dbaac8 8880
ae1362a3
AS
8881if test "${USE_X_TOOLKIT}" = "MOTIF"; then
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
8883$as_echo_n "checking for Motif version 2.1... " >&6; }
8884if test "${emacs_cv_motif_version_2_1+set}" = set; then :
e9a63f04 8885 $as_echo_n "(cached) " >&6
52dbaac8 8886else
ae1362a3 8887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 8888/* end confdefs.h. */
ae1362a3
AS
8889#include <Xm/Xm.h>
8890int
8891main ()
8892{
8893#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
8894int x = 5;
8895#else
8896Motif version prior to 2.1.
8897#endif
8898 ;
8899 return 0;
8900}
bf89cb4d 8901_ACEOF
ae1362a3
AS
8902if ac_fn_c_try_compile "$LINENO"; then :
8903 emacs_cv_motif_version_2_1=yes
52dbaac8 8904else
ae1362a3 8905 emacs_cv_motif_version_2_1=no
bf89cb4d 8906fi
bf89cb4d 8907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf89cb4d 8908fi
ae1362a3
AS
8909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
8910$as_echo "$emacs_cv_motif_version_2_1" >&6; }
8911 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
8912 if test $emacs_cv_motif_version_2_1 = yes; then
8913 HAVE_LIBXP=no
52dbaac8 8914
ae1362a3 8915$as_echo "#define HAVE_MOTIF_2_1 1" >>confdefs.h
52dbaac8 8916
ae1362a3
AS
8917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
8918$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
8919if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
e9a63f04 8920 $as_echo_n "(cached) " >&6
52dbaac8 8921else
ae1362a3
AS
8922 ac_check_lib_save_LIBS=$LIBS
8923LIBS="-lXp $LIBS"
8924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52dbaac8 8925/* end confdefs.h. */
52dbaac8 8926
0ca10bb7
RC
8927/* Override any GCC internal prototype to avoid an error.
8928 Use char because int might match the return type of a GCC
8929 builtin and then its argument prototype would still apply. */
8930#ifdef __cplusplus
8931extern "C"
52dbaac8 8932#endif
ae1362a3 8933char XpCreateContext ();
0ca10bb7
RC
8934int
8935main ()
8936{
ae1362a3 8937return XpCreateContext ();
0ca10bb7
RC
8938 ;
8939 return 0;
8940}
8941_ACEOF
ae1362a3
AS
8942if ac_fn_c_try_link "$LINENO"; then :
8943 ac_cv_lib_Xp_XpCreateContext=yes
0ca10bb7 8944else
ae1362a3 8945 ac_cv_lib_Xp_XpCreateContext=no
0ca10bb7 8946fi
ae1362a3
AS
8947rm -f core conftest.err conftest.$ac_objext \
8948 conftest$ac_exeext conftest.$ac_ext
8949LIBS=$ac_check_lib_save_LIBS
0ca10bb7 8950fi
ae1362a3
AS
8951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
8952$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
8953if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
8954 HAVE_LIBXP=yes
0ca10bb7 8955fi
bf89cb4d 8956
ae1362a3 8957 if test ${HAVE_LIBXP} = yes; then
bf89cb4d 8958
ae1362a3 8959$as_echo "#define HAVE_LIBXP 1" >>confdefs.h
bf89cb4d 8960
ae1362a3
AS
8961 fi
8962 else
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
8964$as_echo_n "checking for LessTif where some systems put it... " >&6; }
8965if test "${emacs_cv_lesstif+set}" = set; then :
0ca10bb7
RC
8966 $as_echo_n "(cached) " >&6
8967else
ae1362a3
AS
8968 # We put this in CFLAGS temporarily to precede other -I options
8969 # that might be in CFLAGS temporarily.
8970 # We put this in CPPFLAGS where it precedes the other -I options.
8971 OLD_CPPFLAGS=$CPPFLAGS
8972 OLD_CFLAGS=$CFLAGS
8973 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
8974 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
8975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 8976/* end confdefs.h. */
ae1362a3
AS
8977#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
8978int
8979main ()
8980{
8981int x = 5;
8982 ;
8983 return 0;
8984}
bf89cb4d 8985_ACEOF
ae1362a3
AS
8986if ac_fn_c_try_compile "$LINENO"; then :
8987 emacs_cv_lesstif=yes
bf89cb4d 8988else
ae1362a3 8989 emacs_cv_lesstif=no
bf89cb4d 8990fi
bf89cb4d 8991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3
AS
8992fi
8993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
8994$as_echo "$emacs_cv_lesstif" >&6; }
8995 if test $emacs_cv_lesstif = yes; then
8996 # Make sure this -I option remains in CPPFLAGS after it is set
8997 # back to REAL_CPPFLAGS.
8998 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
8999 # have those other -I options anyway. Ultimately, having this
9000 # directory ultimately in CPPFLAGS will be enough.
9001 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
9002 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
9003 else
9004 CFLAGS=$OLD_CFLAGS
9005 CPPFLAGS=$OLD_CPPFLAGS
9006 fi
9007 fi
9008fi
bf89cb4d 9009
bf89cb4d 9010
ae1362a3
AS
9011USE_TOOLKIT_SCROLL_BARS=no
9012if test "${with_toolkit_scroll_bars}" != "no"; then
9013 if test "${USE_X_TOOLKIT}" != "none"; then
9014 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9015 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
bf89cb4d 9016
ae1362a3
AS
9017 HAVE_XAW3D=no
9018 USE_TOOLKIT_SCROLL_BARS=yes
9019 elif test "${HAVE_XAW3D}" = "yes"; then
9020 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
bf89cb4d 9021
ae1362a3
AS
9022 USE_TOOLKIT_SCROLL_BARS=yes
9023 fi
9024 elif test "${HAVE_GTK}" = "yes"; then
9025 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
bf89cb4d 9026
ae1362a3
AS
9027 USE_TOOLKIT_SCROLL_BARS=yes
9028 elif test "${HAVE_NS}" = "yes"; then
9029 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9030
9031 USE_TOOLKIT_SCROLL_BARS=yes
9032 fi
0ca10bb7 9033fi
bf89cb4d 9034
ae1362a3
AS
9035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9036/* end confdefs.h. */
9037
9038 #include <X11/Xlib.h>
9039 #include <X11/Xresource.h>
9040int
9041main ()
9042{
9043XIMProc callback;
9044 ;
9045 return 0;
9046}
9047_ACEOF
9048if ac_fn_c_try_compile "$LINENO"; then :
9049 HAVE_XIM=yes
9050
9051$as_echo "#define HAVE_XIM 1" >>confdefs.h
9052
9053else
9054 HAVE_XIM=no
52dbaac8 9055fi
ae1362a3 9056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
bf89cb4d 9057
bf89cb4d 9058
ae1362a3 9059if test "${with_xim}" != "no"; then
bf89cb4d 9060
ae1362a3 9061$as_echo "#define USE_XIM 1" >>confdefs.h
52dbaac8 9062
52dbaac8 9063fi
52dbaac8 9064
52dbaac8 9065
ae1362a3
AS
9066if test "${HAVE_XIM}" != "no"; then
9067 late_CFLAGS=$CFLAGS
9068 if test "$GCC" = yes; then
9069 CFLAGS="$CFLAGS --pedantic-errors"
9070 fi
9071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 9072/* end confdefs.h. */
0ca10bb7 9073
ae1362a3
AS
9074#include <X11/Xlib.h>
9075#include <X11/Xresource.h>
9076int
9077main ()
9078{
9079Display *display;
9080XrmDatabase db;
9081char *res_name;
9082char *res_class;
9083XIMProc callback;
9084XPointer *client_data;
9085#ifndef __GNUC__
9086/* If we're not using GCC, it's probably not XFree86, and this is
9087 probably right, but we can't use something like --pedantic-errors. */
9088extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9089 char*, XIMProc, XPointer*);
9090#endif
9091(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9092 client_data);
9093 ;
9094 return 0;
9095}
9096_ACEOF
9097if ac_fn_c_try_compile "$LINENO"; then :
9098 emacs_cv_arg6_star=yes
bf89cb4d 9099fi
bf89cb4d 9100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3
AS
9101 if test "$emacs_cv_arg6_star" = yes; then
9102 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
0ca10bb7 9103
ae1362a3
AS
9104 else
9105 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
0ca10bb7 9106
ae1362a3
AS
9107 fi
9108 CFLAGS=$late_CFLAGS
bf89cb4d 9109fi
0ca10bb7 9110
ae1362a3
AS
9111### Start of font-backend (under any platform) section.
9112# (nothing here yet -- this is a placeholder)
9113### End of font-backend (under any platform) section.
0ca10bb7 9114
ae1362a3
AS
9115### Start of font-backend (under X11) section.
9116if test "${HAVE_X11}" = "yes"; then
bf89cb4d 9117
ae1362a3
AS
9118 succeeded=no
9119
9120 # Extract the first word of "pkg-config", so it can be a program name with args.
9121set dummy pkg-config; ac_word=$2
9122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9123$as_echo_n "checking for $ac_word... " >&6; }
9124if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
bf89cb4d
GM
9125 $as_echo_n "(cached) " >&6
9126else
ae1362a3
AS
9127 case $PKG_CONFIG in
9128 [\\/]* | ?:[\\/]*)
9129 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9130 ;;
9131 *)
9132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9133for as_dir in $PATH
9134do
9135 IFS=$as_save_IFS
9136 test -z "$as_dir" && as_dir=.
9137 for ac_exec_ext in '' $ac_executable_extensions; do
9138 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9139 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9141 break 2
9142 fi
9143done
9144 done
9145IFS=$as_save_IFS
0ca10bb7 9146
ae1362a3
AS
9147 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9148 ;;
9149esac
bf89cb4d 9150fi
ae1362a3
AS
9151PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9152if test -n "$PKG_CONFIG"; then
9153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9154$as_echo "$PKG_CONFIG" >&6; }
9155else
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157$as_echo "no" >&6; }
bf89cb4d 9158fi
0ca10bb7 9159
0ca10bb7 9160
0ca10bb7 9161
ae1362a3
AS
9162 if test "$PKG_CONFIG" = "no" ; then
9163 HAVE_FC=no
9164 else
9165 PKG_CONFIG_MIN_VERSION=0.9.0
9166 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
9168$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
bf89cb4d 9169
ae1362a3
AS
9170 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9172$as_echo "yes" >&6; }
9173 succeeded=yes
52dbaac8 9174
ae1362a3
AS
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
9176$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
9177 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
9179$as_echo "$FONTCONFIG_CFLAGS" >&6; }
0ca10bb7 9180
ae1362a3
AS
9181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
9182$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
9183 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
9185$as_echo "$FONTCONFIG_LIBS" >&6; }
9186 else
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9188$as_echo "no" >&6; }
9189 FONTCONFIG_CFLAGS=""
9190 FONTCONFIG_LIBS=""
9191 ## If we have a custom action on failure, don't print errors, but
9192 ## do set a variable so people can do so.
9193 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
0ca10bb7 9194
ae1362a3 9195 fi
0ca10bb7 9196
0ca10bb7 9197
0ca10bb7 9198
ae1362a3
AS
9199 else
9200 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9201 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9202 fi
9203 fi
0ca10bb7 9204
ae1362a3
AS
9205 if test $succeeded = yes; then
9206 HAVE_FC=yes
9207 else
9208 HAVE_FC=no
9209 fi
9210
9211
9212 ## Use -lXft if available, unless `--with-xft=no'.
9213 HAVE_XFT=maybe
9214 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
9215 with_xft="no";
9216 fi
9217 if test "x${with_xft}" != "xno"; then
9218
9219
9220 succeeded=no
9221
9222 # Extract the first word of "pkg-config", so it can be a program name with args.
9223set dummy pkg-config; ac_word=$2
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9225$as_echo_n "checking for $ac_word... " >&6; }
9226if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
bf89cb4d
GM
9227 $as_echo_n "(cached) " >&6
9228else
ae1362a3
AS
9229 case $PKG_CONFIG in
9230 [\\/]* | ?:[\\/]*)
9231 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9232 ;;
9233 *)
9234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9235for as_dir in $PATH
9236do
9237 IFS=$as_save_IFS
9238 test -z "$as_dir" && as_dir=.
9239 for ac_exec_ext in '' $ac_executable_extensions; do
9240 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9241 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9243 break 2
9244 fi
9245done
9246 done
9247IFS=$as_save_IFS
0ca10bb7 9248
ae1362a3
AS
9249 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9250 ;;
9251esac
bf89cb4d 9252fi
ae1362a3
AS
9253PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9254if test -n "$PKG_CONFIG"; then
9255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9256$as_echo "$PKG_CONFIG" >&6; }
9257else
9258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
bf89cb4d 9260fi
52dbaac8 9261
0ca10bb7 9262
0ca10bb7 9263
ae1362a3
AS
9264 if test "$PKG_CONFIG" = "no" ; then
9265 HAVE_XFT=no
9266 else
9267 PKG_CONFIG_MIN_VERSION=0.9.0
9268 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
9270$as_echo_n "checking for xft >= 0.13.0... " >&6; }
0ca10bb7 9271
ae1362a3
AS
9272 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
9273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9274$as_echo "yes" >&6; }
9275 succeeded=yes
bf89cb4d 9276
ae1362a3
AS
9277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
9278$as_echo_n "checking XFT_CFLAGS... " >&6; }
9279 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
9281$as_echo "$XFT_CFLAGS" >&6; }
52dbaac8 9282
ae1362a3
AS
9283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
9284$as_echo_n "checking XFT_LIBS... " >&6; }
9285 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
9287$as_echo "$XFT_LIBS" >&6; }
9288 else
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9290$as_echo "no" >&6; }
9291 XFT_CFLAGS=""
9292 XFT_LIBS=""
9293 ## If we have a custom action on failure, don't print errors, but
9294 ## do set a variable so people can do so.
9295 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
bf89cb4d 9296
ae1362a3 9297 fi
52dbaac8 9298
52dbaac8 9299
0ca10bb7 9300
ae1362a3
AS
9301 else
9302 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9303 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9304 fi
9305 fi
0ca10bb7 9306
ae1362a3
AS
9307 if test $succeeded = yes; then
9308 :
9309 else
9310 HAVE_XFT=no
9311 fi
0ca10bb7 9312
ae1362a3
AS
9313 ## Because xftfont.c uses XRenderQueryExtension, we also
9314 ## need to link to -lXrender.
9315 HAVE_XRENDER=no
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
9317$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
9318if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
0ca10bb7 9319 $as_echo_n "(cached) " >&6
52dbaac8 9320else
ae1362a3
AS
9321 ac_check_lib_save_LIBS=$LIBS
9322LIBS="-lXrender $LIBS"
9323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 9324/* end confdefs.h. */
52dbaac8 9325
ae1362a3
AS
9326/* Override any GCC internal prototype to avoid an error.
9327 Use char because int might match the return type of a GCC
9328 builtin and then its argument prototype would still apply. */
9329#ifdef __cplusplus
9330extern "C"
9331#endif
9332char XRenderQueryExtension ();
bf89cb4d
GM
9333int
9334main ()
9335{
ae1362a3 9336return XRenderQueryExtension ();
bf89cb4d
GM
9337 ;
9338 return 0;
9339}
9340_ACEOF
ae1362a3
AS
9341if ac_fn_c_try_link "$LINENO"; then :
9342 ac_cv_lib_Xrender_XRenderQueryExtension=yes
0ca10bb7 9343else
ae1362a3
AS
9344 ac_cv_lib_Xrender_XRenderQueryExtension=no
9345fi
9346rm -f core conftest.err conftest.$ac_objext \
9347 conftest$ac_exeext conftest.$ac_ext
9348LIBS=$ac_check_lib_save_LIBS
9349fi
9350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
9351$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
9352if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
9353 HAVE_XRENDER=yes
9354fi
52dbaac8 9355
ae1362a3
AS
9356 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
9357 OLD_CPPFLAGS="$CPPFLAGS"
9358 OLD_CFLAGS="$CFLAGS"
9359 OLD_LIBS="$LIBS"
9360 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
9361 CFLAGS="$CFLAGS $XFT_CFLAGS"
9362 XFT_LIBS="-lXrender $XFT_LIBS"
9363 LIBS="$XFT_LIBS $LIBS"
9364 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
9365if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
9366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
9367$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
9368if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
9369 $as_echo_n "(cached) " >&6
9370else
9371 ac_check_lib_save_LIBS=$LIBS
9372LIBS="-lXft $XFT_LIBS $LIBS"
9373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 9374/* end confdefs.h. */
52dbaac8 9375
ae1362a3
AS
9376/* Override any GCC internal prototype to avoid an error.
9377 Use char because int might match the return type of a GCC
9378 builtin and then its argument prototype would still apply. */
9379#ifdef __cplusplus
9380extern "C"
9381#endif
9382char XftFontOpen ();
bf89cb4d
GM
9383int
9384main ()
9385{
ae1362a3 9386return XftFontOpen ();
bf89cb4d
GM
9387 ;
9388 return 0;
9389}
9390_ACEOF
ae1362a3
AS
9391if ac_fn_c_try_link "$LINENO"; then :
9392 ac_cv_lib_Xft_XftFontOpen=yes
bf89cb4d 9393else
ae1362a3 9394 ac_cv_lib_Xft_XftFontOpen=no
bf89cb4d 9395fi
ae1362a3
AS
9396rm -f core conftest.err conftest.$ac_objext \
9397 conftest$ac_exeext conftest.$ac_ext
9398LIBS=$ac_check_lib_save_LIBS
9399fi
9400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
9401$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
9402if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
9403 HAVE_XFT=yes
bf89cb4d 9404fi
52dbaac8 9405
bf89cb4d 9406fi
52dbaac8
PE
9407
9408
9409
ae1362a3 9410 if test "${HAVE_XFT}" = "yes"; then
52dbaac8 9411
ae1362a3 9412$as_echo "#define HAVE_XFT 1" >>confdefs.h
52dbaac8
PE
9413
9414
ae1362a3
AS
9415 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
9416 else
9417 CPPFLAGS="$OLD_CPPFLAGS"
9418 CFLAGS="$OLD_CFLAGS"
9419 LIBS="$OLD_LIBS"
9420 fi # "${HAVE_XFT}" = "yes"
9421 fi # "$HAVE_XFT" != no
9422 fi # "x${with_xft}" != "xno"
52dbaac8 9423
ae1362a3
AS
9424 if test "$HAVE_XFT" != "yes"; then
9425 HAVE_XFT=no
9426 fi
52dbaac8 9427
cd958eb3 9428
ae1362a3
AS
9429 HAVE_FREETYPE=no
9430 ## We used to allow building with FreeType and without Xft.
9431 ## However, the ftx font backend driver is not in good shape.
9432 if test "${HAVE_XFT}" = "yes"; then
9433 HAVE_FREETYPE=yes
9434 FONTCONFIG_CFLAGS=
9435 FONTCONFIG_LIBS=
9436 fi
9437
9438 HAVE_LIBOTF=no
9439 if test "${HAVE_FREETYPE}" = "yes"; then
9440
9441$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
cd958eb3 9442
ae1362a3
AS
9443 if test "${with_libotf}" != "no"; then
9444
9445 succeeded=no
9446
9447 # Extract the first word of "pkg-config", so it can be a program name with args.
9448set dummy pkg-config; ac_word=$2
9449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9450$as_echo_n "checking for $ac_word... " >&6; }
9451if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
bf89cb4d
GM
9452 $as_echo_n "(cached) " >&6
9453else
ae1362a3
AS
9454 case $PKG_CONFIG in
9455 [\\/]* | ?:[\\/]*)
9456 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9457 ;;
9458 *)
9459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9460for as_dir in $PATH
9461do
9462 IFS=$as_save_IFS
9463 test -z "$as_dir" && as_dir=.
9464 for ac_exec_ext in '' $ac_executable_extensions; do
9465 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9466 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9468 break 2
9469 fi
9470done
9471 done
9472IFS=$as_save_IFS
9473
9474 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9475 ;;
9476esac
9477fi
9478PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9479if test -n "$PKG_CONFIG"; then
9480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9481$as_echo "$PKG_CONFIG" >&6; }
bf89cb4d 9482else
ae1362a3
AS
9483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
bf89cb4d 9485fi
973a76b1 9486
edfaf76d 9487
edfaf76d 9488
ae1362a3
AS
9489 if test "$PKG_CONFIG" = "no" ; then
9490 HAVE_LIBOTF=no
9491 else
9492 PKG_CONFIG_MIN_VERSION=0.9.0
9493 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
9495$as_echo_n "checking for libotf... " >&6; }
9496
9497 if $PKG_CONFIG --exists "libotf" 2>&5; then
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9499$as_echo "yes" >&6; }
9500 succeeded=yes
9501
9502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
9503$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
9504 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
9505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
9506$as_echo "$LIBOTF_CFLAGS" >&6; }
9507
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
9509$as_echo_n "checking LIBOTF_LIBS... " >&6; }
9510 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
9511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
9512$as_echo "$LIBOTF_LIBS" >&6; }
9513 else
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9515$as_echo "no" >&6; }
9516 LIBOTF_CFLAGS=""
9517 LIBOTF_LIBS=""
9518 ## If we have a custom action on failure, don't print errors, but
9519 ## do set a variable so people can do so.
9520 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
9521
9522 fi
edfaf76d 9523
973a76b1 9524
19650fd6 9525
ae1362a3
AS
9526 else
9527 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9528 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9529 fi
9530 fi
9531
9532 if test $succeeded = yes; then
9533 HAVE_LIBOTF=yes
9534 else
9535 HAVE_LIBOTF=no
9536 fi
9537
9538 if test "$HAVE_LIBOTF" = "yes"; then
ca81d7a0 9539
ae1362a3 9540$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
973a76b1 9541
ae1362a3
AS
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
9543$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
9544if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
e9a63f04 9545 $as_echo_n "(cached) " >&6
973a76b1 9546else
ae1362a3
AS
9547 ac_check_lib_save_LIBS=$LIBS
9548LIBS="-lotf $LIBS"
9549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 9550/* end confdefs.h. */
973a76b1 9551
ae1362a3
AS
9552/* Override any GCC internal prototype to avoid an error.
9553 Use char because int might match the return type of a GCC
9554 builtin and then its argument prototype would still apply. */
9555#ifdef __cplusplus
9556extern "C"
9557#endif
9558char OTF_get_variation_glyphs ();
bf89cb4d
GM
9559int
9560main ()
9561{
ae1362a3 9562return OTF_get_variation_glyphs ();
bf89cb4d
GM
9563 ;
9564 return 0;
9565}
9566_ACEOF
ae1362a3
AS
9567if ac_fn_c_try_link "$LINENO"; then :
9568 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
bf89cb4d 9569else
ae1362a3 9570 ac_cv_lib_otf_OTF_get_variation_glyphs=no
973a76b1 9571fi
ae1362a3
AS
9572rm -f core conftest.err conftest.$ac_objext \
9573 conftest$ac_exeext conftest.$ac_ext
9574LIBS=$ac_check_lib_save_LIBS
bf89cb4d 9575fi
ae1362a3
AS
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
9577$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
9578if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
9579 HAVE_OTF_GET_VARIATION_GLYPHS=yes
9580else
9581 HAVE_OTF_GET_VARIATION_GLYPHS=no
0ca10bb7 9582fi
edfaf76d 9583
ae1362a3 9584 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
edfaf76d 9585
ae1362a3 9586$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
bf89cb4d 9587
ae1362a3
AS
9588 fi
9589 fi
9590 fi
9591 fi
bf89cb4d 9592
ae1362a3
AS
9593 HAVE_M17N_FLT=no
9594 if test "${HAVE_LIBOTF}" = yes; then
9595 if test "${with_m17n_flt}" != "no"; then
bf89cb4d 9596
ae1362a3 9597 succeeded=no
bf89cb4d 9598
ae1362a3
AS
9599 # Extract the first word of "pkg-config", so it can be a program name with args.
9600set dummy pkg-config; ac_word=$2
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9602$as_echo_n "checking for $ac_word... " >&6; }
9603if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9604 $as_echo_n "(cached) " >&6
9605else
9606 case $PKG_CONFIG in
9607 [\\/]* | ?:[\\/]*)
9608 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9609 ;;
9610 *)
9611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9612for as_dir in $PATH
9613do
9614 IFS=$as_save_IFS
9615 test -z "$as_dir" && as_dir=.
9616 for ac_exec_ext in '' $ac_executable_extensions; do
9617 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9618 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9619 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9620 break 2
9621 fi
9622done
9623 done
9624IFS=$as_save_IFS
bf89cb4d 9625
ae1362a3
AS
9626 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9627 ;;
9628esac
9629fi
9630PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9631if test -n "$PKG_CONFIG"; then
9632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9633$as_echo "$PKG_CONFIG" >&6; }
9634else
9635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9636$as_echo "no" >&6; }
9637fi
bf89cb4d
GM
9638
9639
9640
ae1362a3
AS
9641 if test "$PKG_CONFIG" = "no" ; then
9642 HAVE_M17N_FLT=no
9643 else
9644 PKG_CONFIG_MIN_VERSION=0.9.0
9645 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
9647$as_echo_n "checking for m17n-flt... " >&6; }
bf89cb4d 9648
ae1362a3
AS
9649 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9651$as_echo "yes" >&6; }
9652 succeeded=yes
bf89cb4d 9653
ae1362a3
AS
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
9655$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
9656 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
9658$as_echo "$M17N_FLT_CFLAGS" >&6; }
0ca10bb7 9659
ae1362a3
AS
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
9661$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
9662 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
9664$as_echo "$M17N_FLT_LIBS" >&6; }
9665 else
9666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668 M17N_FLT_CFLAGS=""
9669 M17N_FLT_LIBS=""
9670 ## If we have a custom action on failure, don't print errors, but
9671 ## do set a variable so people can do so.
9672 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
0ca10bb7 9673
ae1362a3 9674 fi
0ca10bb7 9675
edfaf76d 9676
bf89cb4d 9677
ae1362a3
AS
9678 else
9679 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9680 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9681 fi
9682 fi
bf89cb4d 9683
ae1362a3
AS
9684 if test $succeeded = yes; then
9685 HAVE_M17N_FLT=yes
9686 else
9687 HAVE_M17N_FLT=no
9688 fi
0ca10bb7 9689
ae1362a3 9690 if test "$HAVE_M17N_FLT" = "yes"; then
0ca10bb7 9691
ae1362a3 9692$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
0ca10bb7 9693
ae1362a3
AS
9694 fi
9695 fi
9696 fi
bf89cb4d 9697else
ae1362a3
AS
9698 HAVE_XFT=no
9699 HAVE_FREETYPE=no
9700 HAVE_LIBOTF=no
9701 HAVE_M17N_FLT=no
bf89cb4d 9702fi
ae1362a3 9703### End of font-backend (under X11) section.
19650fd6 9704
0ca10bb7 9705
0ca10bb7 9706
ca81d7a0 9707
4c343001 9708
c0d27fcc 9709
4c343001 9710
bf89cb4d 9711
ae1362a3
AS
9712
9713
9714### Use -lXpm if available, unless `--with-xpm=no'.
9715HAVE_XPM=no
9716if test "${HAVE_X11}" = "yes"; then
9717 if test "${with_xpm}" != "no"; then
9718 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
9719if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
9720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
9721$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
9722if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
e9a63f04 9723 $as_echo_n "(cached) " >&6
4c343001 9724else
ae1362a3
AS
9725 ac_check_lib_save_LIBS=$LIBS
9726LIBS="-lXpm -lX11 $LIBS"
9727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 9728/* end confdefs.h. */
503d2be0 9729
ca81d7a0
JD
9730/* Override any GCC internal prototype to avoid an error.
9731 Use char because int might match the return type of a GCC
9732 builtin and then its argument prototype would still apply. */
503d2be0
AS
9733#ifdef __cplusplus
9734extern "C"
9735#endif
ae1362a3 9736char XpmReadFileToPixmap ();
503d2be0
AS
9737int
9738main ()
9739{
ae1362a3 9740return XpmReadFileToPixmap ();
503d2be0
AS
9741 ;
9742 return 0;
9743}
9744_ACEOF
ae1362a3
AS
9745if ac_fn_c_try_link "$LINENO"; then :
9746 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0 9747else
ae1362a3
AS
9748 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
9749fi
9750rm -f core conftest.err conftest.$ac_objext \
9751 conftest$ac_exeext conftest.$ac_ext
9752LIBS=$ac_check_lib_save_LIBS
9753fi
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
9755$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
9756if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
9757 HAVE_XPM=yes
ba4481b5
DL
9758fi
9759
bf89cb4d 9760fi
c0d27fcc 9761
ae1362a3
AS
9762
9763 if test "${HAVE_XPM}" = "yes"; then
9764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
9765$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
9766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9767/* end confdefs.h. */
9768#include "X11/xpm.h"
9769#ifndef XpmReturnAllocPixels
9770no_return_alloc_pixels
9771#endif
9772
9773_ACEOF
9774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9775 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
9776 HAVE_XPM=no
bf89cb4d 9777else
ae1362a3 9778 HAVE_XPM=yes
bf89cb4d 9779fi
ae1362a3 9780rm -f conftest*
0ca10bb7 9781
ae1362a3
AS
9782
9783 if test "${HAVE_XPM}" = "yes"; then
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9785$as_echo "yes" >&6; }
9786 else
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9788$as_echo "no" >&6; }
9789 fi
9790 fi
0ca10bb7 9791 fi
bc3512d0 9792
ae1362a3
AS
9793 if test "${HAVE_XPM}" = "yes"; then
9794
9795$as_echo "#define HAVE_XPM 1" >>confdefs.h
9796
9797 fi
9798fi
9799
9800### Use -ljpeg if available, unless `--with-jpeg=no'.
9801HAVE_JPEG=no
9802if test "${HAVE_X11}" = "yes"; then
9803 if test "${with_jpeg}" != "no"; then
9804 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
9805if test "x$ac_cv_header_jerror_h" = x""yes; then :
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
9807$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
9808if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
0ca10bb7
RC
9809 $as_echo_n "(cached) " >&6
9810else
ae1362a3
AS
9811 ac_check_lib_save_LIBS=$LIBS
9812LIBS="-ljpeg $LIBS"
9813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bc3512d0 9814/* end confdefs.h. */
0ca10bb7 9815
ae1362a3
AS
9816/* Override any GCC internal prototype to avoid an error.
9817 Use char because int might match the return type of a GCC
9818 builtin and then its argument prototype would still apply. */
9819#ifdef __cplusplus
9820extern "C"
9821#endif
9822char jpeg_destroy_compress ();
bc3512d0
CY
9823int
9824main ()
9825{
ae1362a3 9826return jpeg_destroy_compress ();
bc3512d0
CY
9827 ;
9828 return 0;
9829}
9830_ACEOF
ae1362a3
AS
9831if ac_fn_c_try_link "$LINENO"; then :
9832 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
0ca10bb7 9833else
ae1362a3 9834 ac_cv_lib_jpeg_jpeg_destroy_compress=no
bf89cb4d 9835fi
ae1362a3
AS
9836rm -f core conftest.err conftest.$ac_objext \
9837 conftest$ac_exeext conftest.$ac_ext
9838LIBS=$ac_check_lib_save_LIBS
bf89cb4d 9839fi
ae1362a3
AS
9840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
9841$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
9842if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
9843 HAVE_JPEG=yes
9844fi
9845
0ca10bb7 9846fi
bc3512d0 9847
ae1362a3 9848
0ca10bb7
RC
9849 fi
9850
ae1362a3
AS
9851 if test "${HAVE_JPEG}" = "yes"; then
9852 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
9853
9854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9855/* end confdefs.h. */
9856#include <jpeglib.h>
9857 version=JPEG_LIB_VERSION
9858
9859_ACEOF
9860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9861 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
9862 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
9863
84e70f78 9864else
ae1362a3
AS
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
9866$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
9867 HAVE_JPEG=no
9868fi
9869rm -f conftest*
9870
9871 fi
9872fi
9873
9874### Use -lpng if available, unless `--with-png=no'.
9875HAVE_PNG=no
9876if test "${HAVE_X11}" = "yes"; then
9877 if test "${with_png}" != "no"; then
9878 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
9879 # in /usr/include/libpng.
9880 for ac_header in png.h libpng/png.h
9881do :
9882 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9883ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1f10e750 9884if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
ae1362a3
AS
9885 cat >>confdefs.h <<_ACEOF
9886#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9887_ACEOF
9888
9889fi
9890
9891done
9892
9893 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
9895$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
9896if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
bf89cb4d
GM
9897 $as_echo_n "(cached) " >&6
9898else
ae1362a3
AS
9899 ac_check_lib_save_LIBS=$LIBS
9900LIBS="-lpng -lz -lm $LIBS"
9901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 9902/* end confdefs.h. */
edfaf76d 9903
ae1362a3
AS
9904/* Override any GCC internal prototype to avoid an error.
9905 Use char because int might match the return type of a GCC
9906 builtin and then its argument prototype would still apply. */
9907#ifdef __cplusplus
9908extern "C"
9909#endif
9910char png_get_channels ();
19650fd6
AS
9911int
9912main ()
9913{
ae1362a3 9914return png_get_channels ();
84e70f78
KR
9915 ;
9916 return 0;
9917}
9918_ACEOF
ae1362a3
AS
9919if ac_fn_c_try_link "$LINENO"; then :
9920 ac_cv_lib_png_png_get_channels=yes
84e70f78 9921else
ae1362a3 9922 ac_cv_lib_png_png_get_channels=no
84e70f78 9923fi
ae1362a3
AS
9924rm -f core conftest.err conftest.$ac_objext \
9925 conftest$ac_exeext conftest.$ac_ext
9926LIBS=$ac_check_lib_save_LIBS
bf89cb4d 9927fi
ae1362a3
AS
9928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
9929$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
9930if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
9931 HAVE_PNG=yes
9932fi
9933
9934 fi
9935 fi
9936
9937 if test "${HAVE_PNG}" = "yes"; then
9938
9939$as_echo "#define HAVE_PNG 1" >>confdefs.h
9940
9941 fi
84e70f78 9942fi
0ca10bb7 9943
ae1362a3
AS
9944### Use -ltiff if available, unless `--with-tiff=no'.
9945HAVE_TIFF=no
9946if test "${HAVE_X11}" = "yes"; then
9947 if test "${with_tiff}" != "no"; then
9948 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
9949if test "x$ac_cv_header_tiffio_h" = x""yes; then :
9950 tifflibs="-lz -lm"
9951 # At least one tiff package requires the jpeg library.
9952 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
9954$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
9955if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
9956 $as_echo_n "(cached) " >&6
84e70f78 9957else
ae1362a3
AS
9958 ac_check_lib_save_LIBS=$LIBS
9959LIBS="-ltiff $tifflibs $LIBS"
9960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 9961/* end confdefs.h. */
ae1362a3
AS
9962
9963/* Override any GCC internal prototype to avoid an error.
9964 Use char because int might match the return type of a GCC
9965 builtin and then its argument prototype would still apply. */
9966#ifdef __cplusplus
9967extern "C"
9968#endif
9969char TIFFGetVersion ();
19650fd6
AS
9970int
9971main ()
9972{
ae1362a3 9973return TIFFGetVersion ();
84e70f78
KR
9974 ;
9975 return 0;
9976}
9977_ACEOF
ae1362a3
AS
9978if ac_fn_c_try_link "$LINENO"; then :
9979 ac_cv_lib_tiff_TIFFGetVersion=yes
84e70f78 9980else
ae1362a3 9981 ac_cv_lib_tiff_TIFFGetVersion=no
84e70f78 9982fi
ae1362a3
AS
9983rm -f core conftest.err conftest.$ac_objext \
9984 conftest$ac_exeext conftest.$ac_ext
9985LIBS=$ac_check_lib_save_LIBS
84e70f78 9986fi
ae1362a3
AS
9987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
9988$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
9989if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
9990 HAVE_TIFF=yes
0ca10bb7 9991fi
0ca10bb7 9992
ae1362a3 9993fi
0ca10bb7 9994
0ca10bb7 9995
ae1362a3 9996 fi
0ca10bb7 9997
ae1362a3 9998 if test "${HAVE_TIFF}" = "yes"; then
0ca10bb7 9999
ae1362a3 10000$as_echo "#define HAVE_TIFF 1" >>confdefs.h
0ca10bb7 10001
ae1362a3 10002 fi
bf89cb4d 10003fi
0ca10bb7 10004
ae1362a3
AS
10005### Use -lgif or -lungif if available, unless `--with-gif=no'.
10006HAVE_GIF=no
10007if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
10008 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
10009if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
10010 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10011# Earlier versions can crash Emacs.
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
10013$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
10014if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
e9a63f04 10015 $as_echo_n "(cached) " >&6
84e70f78 10016else
ae1362a3
AS
10017 ac_check_lib_save_LIBS=$LIBS
10018LIBS="-lgif $LIBS"
10019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10020/* end confdefs.h. */
ae1362a3
AS
10021
10022/* Override any GCC internal prototype to avoid an error.
10023 Use char because int might match the return type of a GCC
10024 builtin and then its argument prototype would still apply. */
10025#ifdef __cplusplus
10026extern "C"
10027#endif
10028char EGifPutExtensionLast ();
84e70f78
KR
10029int
10030main ()
10031{
ae1362a3 10032return EGifPutExtensionLast ();
84e70f78
KR
10033 ;
10034 return 0;
10035}
10036_ACEOF
ae1362a3
AS
10037if ac_fn_c_try_link "$LINENO"; then :
10038 ac_cv_lib_gif_EGifPutExtensionLast=yes
84e70f78 10039else
ae1362a3 10040 ac_cv_lib_gif_EGifPutExtensionLast=no
84e70f78 10041fi
ae1362a3
AS
10042rm -f core conftest.err conftest.$ac_objext \
10043 conftest$ac_exeext conftest.$ac_ext
10044LIBS=$ac_check_lib_save_LIBS
10045fi
10046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
10047$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
10048if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
10049 HAVE_GIF=yes
10050else
10051 try_libungif=yes
bf89cb4d 10052fi
0ca10bb7 10053
84e70f78 10054fi
0ca10bb7 10055
bf89cb4d
GM
10056
10057
ae1362a3
AS
10058 if test "$HAVE_GIF" = yes; then
10059 ac_gif_lib_name="-lgif"
10060 fi
10061
10062# If gif_lib.h but no libgif, try libungif.
10063 if test x"$try_libungif" = xyes; then
10064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10065$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10066if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
e9a63f04 10067 $as_echo_n "(cached) " >&6
84e70f78 10068else
ae1362a3
AS
10069 ac_check_lib_save_LIBS=$LIBS
10070LIBS="-lungif $LIBS"
10071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 10072/* end confdefs.h. */
bf89cb4d
GM
10073
10074/* Override any GCC internal prototype to avoid an error.
10075 Use char because int might match the return type of a GCC
10076 builtin and then its argument prototype would still apply. */
10077#ifdef __cplusplus
10078extern "C"
10079#endif
ae1362a3 10080char EGifPutExtensionLast ();
0ca10bb7
RC
10081int
10082main ()
10083{
ae1362a3 10084return EGifPutExtensionLast ();
0ca10bb7
RC
10085 ;
10086 return 0;
10087}
19650fd6 10088_ACEOF
ae1362a3
AS
10089if ac_fn_c_try_link "$LINENO"; then :
10090 ac_cv_lib_ungif_EGifPutExtensionLast=yes
0ca10bb7 10091else
ae1362a3
AS
10092 ac_cv_lib_ungif_EGifPutExtensionLast=no
10093fi
10094rm -f core conftest.err conftest.$ac_objext \
10095 conftest$ac_exeext conftest.$ac_ext
10096LIBS=$ac_check_lib_save_LIBS
10097fi
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10099$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10100if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10101 HAVE_GIF=yes
10102fi
10103
0ca10bb7 10104
ae1362a3
AS
10105 if test "$HAVE_GIF" = yes; then
10106
10107$as_echo "#define LIBGIF -lungif" >>confdefs.h
10108
10109 ac_gif_lib_name="-lungif"
10110 fi
10111 fi
10112
10113 if test "${HAVE_GIF}" = "yes"; then
10114
10115$as_echo "#define HAVE_GIF 1" >>confdefs.h
10116
10117 fi
bf89cb4d 10118fi
0ca10bb7 10119
ae1362a3
AS
10120if test "${HAVE_X11}" = "yes"; then
10121 MISSING=""
10122 WITH_NO=""
10123 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
10124 MISSING="libXpm" && WITH_NO="--with-xpm=no"
10125 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
10126 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
10127 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
10128 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
10129 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
10130 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
10131 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
10132 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
10133
10134 if test "X${MISSING}" != X; then
1f10e750 10135 as_fn_error $? "The following required libraries were not found:
ae1362a3
AS
10136 $MISSING
10137Maybe some development libraries/packages are missing?
10138If you don't want to link with them give
10139 $WITH_NO
10140as options to configure" "$LINENO" 5
10141 fi
0ca10bb7
RC
10142fi
10143
ae1362a3
AS
10144### Use -lgpm if available, unless `--with-gpm=no'.
10145HAVE_GPM=no
10146if test "${with_gpm}" != "no"; then
10147 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
10148if test "x$ac_cv_header_gpm_h" = x""yes; then :
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
10150$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
10151if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
0ca10bb7
RC
10152 $as_echo_n "(cached) " >&6
10153else
bf89cb4d 10154 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
10155LIBS="-lgpm $LIBS"
10156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10157/* end confdefs.h. */
bf89cb4d
GM
10158
10159/* Override any GCC internal prototype to avoid an error.
10160 Use char because int might match the return type of a GCC
10161 builtin and then its argument prototype would still apply. */
10162#ifdef __cplusplus
10163extern "C"
10164#endif
ae1362a3 10165char Gpm_Open ();
84e70f78
KR
10166int
10167main ()
10168{
ae1362a3 10169return Gpm_Open ();
84e70f78
KR
10170 ;
10171 return 0;
10172}
10173_ACEOF
ae1362a3
AS
10174if ac_fn_c_try_link "$LINENO"; then :
10175 ac_cv_lib_gpm_Gpm_Open=yes
84e70f78 10176else
ae1362a3
AS
10177 ac_cv_lib_gpm_Gpm_Open=no
10178fi
10179rm -f core conftest.err conftest.$ac_objext \
10180 conftest$ac_exeext conftest.$ac_ext
10181LIBS=$ac_check_lib_save_LIBS
10182fi
10183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10184$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
10185if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
10186 HAVE_GPM=yes
10187fi
10188
10189fi
10190
10191
10192fi
10193
10194if test "${HAVE_GPM}" = "yes"; then
10195
10196$as_echo "#define HAVE_GPM 1" >>confdefs.h
10197
10198fi
10199
10200ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
10201if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
10202
10203$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
10204
10205fi
10206
10207
10208
10209### Use NeXTstep API to implement GUI.
10210if test "${HAVE_NS}" = "yes"; then
10211
10212$as_echo "#define HAVE_NS 1" >>confdefs.h
10213
10214 if test "${NS_IMPL_COCOA}" = "yes"; then
10215
10216$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
10217
10218 GNU_OBJC_CFLAGS=
10219 fi
10220 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
bf89cb4d 10221
ae1362a3 10222$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
bf89cb4d 10223
ae1362a3
AS
10224 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
10225 fi
10226 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
84e70f78 10227
ae1362a3 10228$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
84e70f78 10229
ae1362a3
AS
10230 fi
10231 # We also have mouse menus.
10232 HAVE_MENUS=yes
10233 OTHER_FILES=ns-app
84e70f78
KR
10234fi
10235
bf89cb4d 10236
ae1362a3
AS
10237### Use session management (-lSM -lICE) if available
10238HAVE_X_SM=no
10239if test "${HAVE_X11}" = "yes"; then
10240 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10241if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
10243$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
10244if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
e9a63f04 10245 $as_echo_n "(cached) " >&6
84e70f78 10246else
ae1362a3
AS
10247 ac_check_lib_save_LIBS=$LIBS
10248LIBS="-lSM -lICE $LIBS"
10249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10250/* end confdefs.h. */
bf89cb4d
GM
10251
10252/* Override any GCC internal prototype to avoid an error.
10253 Use char because int might match the return type of a GCC
10254 builtin and then its argument prototype would still apply. */
10255#ifdef __cplusplus
10256extern "C"
10257#endif
ae1362a3 10258char SmcOpenConnection ();
19650fd6
AS
10259int
10260main ()
10261{
ae1362a3 10262return SmcOpenConnection ();
84e70f78
KR
10263 ;
10264 return 0;
10265}
10266_ACEOF
ae1362a3
AS
10267if ac_fn_c_try_link "$LINENO"; then :
10268 ac_cv_lib_SM_SmcOpenConnection=yes
84e70f78 10269else
ae1362a3 10270 ac_cv_lib_SM_SmcOpenConnection=no
bf89cb4d 10271fi
ae1362a3
AS
10272rm -f core conftest.err conftest.$ac_objext \
10273 conftest$ac_exeext conftest.$ac_ext
10274LIBS=$ac_check_lib_save_LIBS
bf89cb4d 10275fi
ae1362a3
AS
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
10277$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
10278if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
10279 HAVE_X_SM=yes
bf89cb4d 10280fi
0ca10bb7 10281
ae1362a3 10282fi
0ca10bb7 10283
bf89cb4d 10284
bf89cb4d 10285
ae1362a3 10286 if test "${HAVE_X_SM}" = "yes"; then
bf89cb4d 10287
ae1362a3 10288$as_echo "#define HAVE_X_SM 1" >>confdefs.h
bf89cb4d 10289
ae1362a3
AS
10290 case "$LIBS" in
10291 *-lSM*) ;;
10292 *) LIBS="-lSM -lICE $LIBS" ;;
10293 esac
10294 fi
10295fi
0ca10bb7 10296
ae1362a3
AS
10297# If netdb.h doesn't declare h_errno, we must declare it by hand.
10298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
10299$as_echo_n "checking whether netdb declares h_errno... " >&6; }
10300if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
10301 $as_echo_n "(cached) " >&6
10302else
10303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10304/* end confdefs.h. */
10305#include <netdb.h>
bf89cb4d
GM
10306int
10307main ()
10308{
ae1362a3 10309return h_errno;
bf89cb4d
GM
10310 ;
10311 return 0;
10312}
84e70f78 10313_ACEOF
ae1362a3
AS
10314if ac_fn_c_try_link "$LINENO"; then :
10315 emacs_cv_netdb_declares_h_errno=yes
84e70f78 10316else
ae1362a3 10317 emacs_cv_netdb_declares_h_errno=no
84e70f78 10318fi
ae1362a3
AS
10319rm -f core conftest.err conftest.$ac_objext \
10320 conftest$ac_exeext conftest.$ac_ext
84e70f78 10321fi
ae1362a3
AS
10322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
10323$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
10324if test $emacs_cv_netdb_declares_h_errno = yes; then
84e70f78 10325
ae1362a3 10326$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
84e70f78 10327
ae1362a3 10328fi
bf89cb4d 10329
ae1362a3
AS
10330# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10331# for constant arguments. Useless!
10332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10333$as_echo_n "checking for working alloca.h... " >&6; }
10334if test "${ac_cv_working_alloca_h+set}" = set; then :
0ca10bb7
RC
10335 $as_echo_n "(cached) " >&6
10336else
ae1362a3 10337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 10338/* end confdefs.h. */
ae1362a3 10339#include <alloca.h>
0ca10bb7
RC
10340int
10341main ()
10342{
ae1362a3
AS
10343char *p = (char *) alloca (2 * sizeof (int));
10344 if (p) return 0;
bf89cb4d
GM
10345 ;
10346 return 0;
0ca10bb7
RC
10347}
10348_ACEOF
ae1362a3
AS
10349if ac_fn_c_try_link "$LINENO"; then :
10350 ac_cv_working_alloca_h=yes
0ca10bb7 10351else
ae1362a3 10352 ac_cv_working_alloca_h=no
0ca10bb7 10353fi
ae1362a3
AS
10354rm -f core conftest.err conftest.$ac_objext \
10355 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 10356fi
ae1362a3
AS
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10358$as_echo "$ac_cv_working_alloca_h" >&6; }
10359if test $ac_cv_working_alloca_h = yes; then
bc3512d0 10360
ae1362a3 10361$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
0ca10bb7 10362
bc3512d0
CY
10363fi
10364
ae1362a3
AS
10365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10366$as_echo_n "checking for alloca... " >&6; }
10367if test "${ac_cv_func_alloca_works+set}" = set; then :
10368 $as_echo_n "(cached) " >&6
10369else
10370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10371/* end confdefs.h. */
ae1362a3
AS
10372#ifdef __GNUC__
10373# define alloca __builtin_alloca
10374#else
10375# ifdef _MSC_VER
10376# include <malloc.h>
10377# define alloca _alloca
10378# else
10379# ifdef HAVE_ALLOCA_H
10380# include <alloca.h>
10381# else
10382# ifdef _AIX
10383 #pragma alloca
10384# else
10385# ifndef alloca /* predefined by HP cc +Olibcalls */
10386char *alloca ();
10387# endif
10388# endif
10389# endif
10390# endif
10391#endif
10392
503d2be0
AS
10393int
10394main ()
10395{
ae1362a3
AS
10396char *p = (char *) alloca (1);
10397 if (p) return 0;
503d2be0
AS
10398 ;
10399 return 0;
10400}
10401_ACEOF
ae1362a3
AS
10402if ac_fn_c_try_link "$LINENO"; then :
10403 ac_cv_func_alloca_works=yes
10404else
10405 ac_cv_func_alloca_works=no
10406fi
10407rm -f core conftest.err conftest.$ac_objext \
10408 conftest$ac_exeext conftest.$ac_ext
10409fi
10410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10411$as_echo "$ac_cv_func_alloca_works" >&6; }
10412
10413if test $ac_cv_func_alloca_works = yes; then
10414
10415$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10416
10417else
10418 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10419# that cause trouble. Some versions do not even contain alloca or
10420# contain a buggy version. If you still want to use their alloca,
10421# use ar to extract alloca.o from them instead of compiling alloca.c.
10422
10423ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10424
10425$as_echo "#define C_ALLOCA 1" >>confdefs.h
10426
10427
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10429$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10430if test "${ac_cv_os_cray+set}" = set; then :
10431 $as_echo_n "(cached) " >&6
10432else
10433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10434/* end confdefs.h. */
10435#if defined CRAY && ! defined CRAY2
10436webecray
10437#else
10438wenotbecray
10439#endif
10440
10441_ACEOF
10442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10443 $EGREP "webecray" >/dev/null 2>&1; then :
10444 ac_cv_os_cray=yes
503d2be0 10445else
ae1362a3
AS
10446 ac_cv_os_cray=no
10447fi
10448rm -f conftest*
a21616bd 10449
a21616bd 10450fi
ae1362a3
AS
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10452$as_echo "$ac_cv_os_cray" >&6; }
10453if test $ac_cv_os_cray = yes; then
10454 for ac_func in _getb67 GETB67 getb67; do
10455 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10456ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
1f10e750 10457if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
a21616bd 10458
ae1362a3
AS
10459cat >>confdefs.h <<_ACEOF
10460#define CRAY_STACKSEG_END $ac_func
bf89cb4d 10461_ACEOF
ae1362a3
AS
10462
10463 break
10464fi
10465
10466 done
10467fi
10468
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10470$as_echo_n "checking stack direction for C alloca... " >&6; }
10471if test "${ac_cv_c_stack_direction+set}" = set; then :
10472 $as_echo_n "(cached) " >&6
10473else
10474 if test "$cross_compiling" = yes; then :
10475 ac_cv_c_stack_direction=0
10476else
10477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10478/* end confdefs.h. */
ae1362a3
AS
10479$ac_includes_default
10480int
10481find_stack_direction ()
10482{
10483 static char *addr = 0;
10484 auto char dummy;
10485 if (addr == 0)
10486 {
10487 addr = &dummy;
10488 return find_stack_direction ();
10489 }
10490 else
10491 return (&dummy > addr) ? 1 : -1;
10492}
10493
503d2be0
AS
10494int
10495main ()
10496{
ae1362a3 10497 return find_stack_direction () < 0;
503d2be0
AS
10498}
10499_ACEOF
ae1362a3
AS
10500if ac_fn_c_try_run "$LINENO"; then :
10501 ac_cv_c_stack_direction=1
503d2be0 10502else
ae1362a3
AS
10503 ac_cv_c_stack_direction=-1
10504fi
10505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10506 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 10507fi
bf89cb4d 10508
503d2be0 10509fi
ae1362a3
AS
10510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10511$as_echo "$ac_cv_c_stack_direction" >&6; }
10512cat >>confdefs.h <<_ACEOF
10513#define STACK_DIRECTION $ac_cv_c_stack_direction
10514_ACEOF
a21616bd 10515
bf89cb4d 10516
ae1362a3
AS
10517fi
10518
a21616bd 10519
ae1362a3 10520if test x"$ac_cv_func_alloca_works" != xyes; then
1f10e750 10521 as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5
a21616bd
KR
10522fi
10523
ae1362a3
AS
10524# fmod, logb, and frexp are found in -lm on most systems.
10525# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
10527$as_echo_n "checking for sqrt in -lm... " >&6; }
10528if test "${ac_cv_lib_m_sqrt+set}" = set; then :
e9a63f04 10529 $as_echo_n "(cached) " >&6
a21616bd 10530else
ae1362a3
AS
10531 ac_check_lib_save_LIBS=$LIBS
10532LIBS="-lm $LIBS"
10533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10534/* end confdefs.h. */
503d2be0 10535
ca81d7a0
JD
10536/* Override any GCC internal prototype to avoid an error.
10537 Use char because int might match the return type of a GCC
10538 builtin and then its argument prototype would still apply. */
503d2be0
AS
10539#ifdef __cplusplus
10540extern "C"
10541#endif
ae1362a3 10542char sqrt ();
503d2be0
AS
10543int
10544main ()
10545{
ae1362a3 10546return sqrt ();
503d2be0
AS
10547 ;
10548 return 0;
10549}
10550_ACEOF
ae1362a3
AS
10551if ac_fn_c_try_link "$LINENO"; then :
10552 ac_cv_lib_m_sqrt=yes
503d2be0 10553else
ae1362a3 10554 ac_cv_lib_m_sqrt=no
503d2be0 10555fi
ae1362a3
AS
10556rm -f core conftest.err conftest.$ac_objext \
10557 conftest$ac_exeext conftest.$ac_ext
10558LIBS=$ac_check_lib_save_LIBS
503d2be0 10559fi
ae1362a3
AS
10560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
10561$as_echo "$ac_cv_lib_m_sqrt" >&6; }
10562if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
10563 cat >>confdefs.h <<_ACEOF
10564#define HAVE_LIBM 1
c0d27fcc 10565_ACEOF
a21616bd 10566
ae1362a3
AS
10567 LIBS="-lm $LIBS"
10568
10569fi
a21616bd 10570
a21616bd 10571
ae1362a3
AS
10572# Check for mail-locking functions in a "mail" library. Probably this should
10573# have the same check as for liblockfile below.
10574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
10575$as_echo_n "checking for maillock in -lmail... " >&6; }
10576if test "${ac_cv_lib_mail_maillock+set}" = set; then :
10577 $as_echo_n "(cached) " >&6
10578else
10579 ac_check_lib_save_LIBS=$LIBS
10580LIBS="-lmail $LIBS"
10581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582/* end confdefs.h. */
c0d27fcc 10583
bf89cb4d
GM
10584/* Override any GCC internal prototype to avoid an error.
10585 Use char because int might match the return type of a GCC
10586 builtin and then its argument prototype would still apply. */
10587#ifdef __cplusplus
10588extern "C"
10589#endif
ae1362a3 10590char maillock ();
bf89cb4d
GM
10591int
10592main ()
10593{
ae1362a3 10594return maillock ();
bf89cb4d
GM
10595 ;
10596 return 0;
10597}
0ca10bb7 10598_ACEOF
ae1362a3
AS
10599if ac_fn_c_try_link "$LINENO"; then :
10600 ac_cv_lib_mail_maillock=yes
bf89cb4d 10601else
ae1362a3
AS
10602 ac_cv_lib_mail_maillock=no
10603fi
10604rm -f core conftest.err conftest.$ac_objext \
10605 conftest$ac_exeext conftest.$ac_ext
10606LIBS=$ac_check_lib_save_LIBS
0ca10bb7 10607fi
ae1362a3
AS
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
10609$as_echo "$ac_cv_lib_mail_maillock" >&6; }
10610if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
10611 cat >>confdefs.h <<_ACEOF
10612#define HAVE_LIBMAIL 1
10613_ACEOF
10614
10615 LIBS="-lmail $LIBS"
0ca10bb7 10616
bf89cb4d 10617fi
ae1362a3
AS
10618
10619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
10620$as_echo_n "checking for maillock in -llockfile... " >&6; }
10621if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
bf89cb4d
GM
10622 $as_echo_n "(cached) " >&6
10623else
10624 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
10625LIBS="-llockfile $LIBS"
10626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 10627/* end confdefs.h. */
0ca10bb7 10628
bf89cb4d
GM
10629/* Override any GCC internal prototype to avoid an error.
10630 Use char because int might match the return type of a GCC
10631 builtin and then its argument prototype would still apply. */
10632#ifdef __cplusplus
10633extern "C"
10634#endif
ae1362a3 10635char maillock ();
bf89cb4d
GM
10636int
10637main ()
10638{
ae1362a3 10639return maillock ();
bf89cb4d
GM
10640 ;
10641 return 0;
10642}
0ca10bb7 10643_ACEOF
ae1362a3
AS
10644if ac_fn_c_try_link "$LINENO"; then :
10645 ac_cv_lib_lockfile_maillock=yes
bf89cb4d 10646else
ae1362a3
AS
10647 ac_cv_lib_lockfile_maillock=no
10648fi
10649rm -f core conftest.err conftest.$ac_objext \
10650 conftest$ac_exeext conftest.$ac_ext
10651LIBS=$ac_check_lib_save_LIBS
10652fi
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
10654$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
10655if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
10656 cat >>confdefs.h <<_ACEOF
10657#define HAVE_LIBLOCKFILE 1
10658_ACEOF
10659
10660 LIBS="-llockfile $LIBS"
10661
10662fi
10663
10664# If we have the shared liblockfile, assume we must use it for mail
10665# locking (e.g. Debian). If we couldn't link against liblockfile
10666# (no liblockfile.a installed), ensure that we don't need to.
10667if test "$ac_cv_lib_lockfile_maillock" = no; then
10668 # Extract the first word of "liblockfile.so", so it can be a program name with args.
10669set dummy liblockfile.so; ac_word=$2
10670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10671$as_echo_n "checking for $ac_word... " >&6; }
10672if test "${ac_cv_prog_liblockfile+set}" = set; then :
10673 $as_echo_n "(cached) " >&6
10674else
10675 if test -n "$liblockfile"; then
10676 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
10677else
10678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
10680for as_dir in $as_dummy
10681do
10682 IFS=$as_save_IFS
10683 test -z "$as_dir" && as_dir=.
10684 for ac_exec_ext in '' $ac_executable_extensions; do
10685 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10686 ac_cv_prog_liblockfile="yes"
10687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10688 break 2
10689 fi
10690done
10691 done
10692IFS=$as_save_IFS
0ca10bb7 10693
ae1362a3 10694 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
0ca10bb7 10695fi
bf89cb4d 10696fi
ae1362a3
AS
10697liblockfile=$ac_cv_prog_liblockfile
10698if test -n "$liblockfile"; then
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
10700$as_echo "$liblockfile" >&6; }
bf89cb4d 10701else
ae1362a3
AS
10702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
10704fi
0ca10bb7 10705
0ca10bb7 10706
ae1362a3 10707 if test $ac_cv_prog_liblockfile = yes; then
1f10e750 10708 as_fn_error $? "Shared liblockfile found but can't link against it.
ae1362a3
AS
10709This probably means that movemail could lose mail.
10710There may be a \`development' package to install containing liblockfile." "$LINENO" 5
10711 else :
10712 fi
0ca10bb7 10713fi
ae1362a3
AS
10714for ac_func in touchlock
10715do :
10716 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
10717if test "x$ac_cv_func_touchlock" = x""yes; then :
10718 cat >>confdefs.h <<_ACEOF
10719#define HAVE_TOUCHLOCK 1
10720_ACEOF
0ca10bb7 10721
bf89cb4d 10722fi
ae1362a3
AS
10723done
10724
10725for ac_header in maillock.h
10726do :
10727 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
10728if test "x$ac_cv_header_maillock_h" = x""yes; then :
10729 cat >>confdefs.h <<_ACEOF
10730#define HAVE_MAILLOCK_H 1
10731_ACEOF
10732
bf89cb4d 10733fi
0ca10bb7 10734
ae1362a3
AS
10735done
10736
10737
10738for ac_func in gethostname getdomainname dup2 \
10739rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
10740random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
10741strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
10742utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
10743__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
10744sendto recvfrom getsockopt setsockopt getsockname getpeername \
10745gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
10746memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
10747cfmakeraw cfsetspeed
10748do :
10749 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10750ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
1f10e750 10751if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
ae1362a3
AS
10752 cat >>confdefs.h <<_ACEOF
10753#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10754_ACEOF
10755
bf89cb4d 10756fi
ae1362a3
AS
10757done
10758
10759
10760for ac_header in sys/un.h
10761do :
10762 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
10763if test "x$ac_cv_header_sys_un_h" = x""yes; then :
10764 cat >>confdefs.h <<_ACEOF
10765#define HAVE_SYS_UN_H 1
10766_ACEOF
0ca10bb7 10767
bf89cb4d 10768fi
0ca10bb7 10769
ae1362a3
AS
10770done
10771
10772
10773
10774
10775
10776
10777
10778 for ac_func in $ac_func_list
10779do :
10780 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10781ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
1f10e750 10782if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
ae1362a3
AS
10783 cat >>confdefs.h <<_ACEOF
10784#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10785_ACEOF
10786
bf89cb4d 10787fi
ae1362a3 10788done
0ca10bb7 10789
ae1362a3
AS
10790
10791
10792
10793
10794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
10795$as_echo_n "checking for working mktime... " >&6; }
10796if test "${ac_cv_func_working_mktime+set}" = set; then :
e9a63f04 10797 $as_echo_n "(cached) " >&6
a21616bd 10798else
ae1362a3
AS
10799 if test "$cross_compiling" = yes; then :
10800 ac_cv_func_working_mktime=no
10801else
10802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 10803/* end confdefs.h. */
ae1362a3
AS
10804/* Test program from Paul Eggert and Tony Leneis. */
10805#ifdef TIME_WITH_SYS_TIME
10806# include <sys/time.h>
10807# include <time.h>
0ca10bb7 10808#else
ae1362a3
AS
10809# ifdef HAVE_SYS_TIME_H
10810# include <sys/time.h>
10811# else
10812# include <time.h>
10813# endif
0ca10bb7
RC
10814#endif
10815
ae1362a3
AS
10816#include <limits.h>
10817#include <stdlib.h>
0ca10bb7 10818
ae1362a3
AS
10819#ifdef HAVE_UNISTD_H
10820# include <unistd.h>
0ca10bb7 10821#endif
ae1362a3
AS
10822
10823#ifndef HAVE_ALARM
10824# define alarm(X) /* empty */
0ca10bb7
RC
10825#endif
10826
ae1362a3
AS
10827/* Work around redefinition to rpl_putenv by other config tests. */
10828#undef putenv
10829
10830static time_t time_t_max;
10831static time_t time_t_min;
10832
10833/* Values we'll use to set the TZ environment variable. */
1f10e750
CY
10834static const char *tz_strings[] = {
10835 (const char *) 0, "TZ=GMT0", "TZ=JST-9",
ae1362a3
AS
10836 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
10837};
10838#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
10839
10840/* Return 0 if mktime fails to convert a date in the spring-forward gap.
10841 Based on a problem report from Andreas Jaeger. */
10842static int
10843spring_forward_gap ()
0ca10bb7 10844{
ae1362a3
AS
10845 /* glibc (up to about 1998-10-07) failed this test. */
10846 struct tm tm;
0ca10bb7 10847
ae1362a3
AS
10848 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10849 instead of "TZ=America/Vancouver" in order to detect the bug even
10850 on systems that don't support the Olson extension, or don't have the
10851 full zoneinfo tables installed. */
1f10e750 10852 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
0ca10bb7 10853
ae1362a3
AS
10854 tm.tm_year = 98;
10855 tm.tm_mon = 3;
10856 tm.tm_mday = 5;
10857 tm.tm_hour = 2;
10858 tm.tm_min = 0;
10859 tm.tm_sec = 0;
10860 tm.tm_isdst = -1;
10861 return mktime (&tm) != (time_t) -1;
10862}
a21616bd 10863
ae1362a3 10864static int
1f10e750 10865mktime_test1 (time_t now)
503d2be0 10866{
ae1362a3
AS
10867 struct tm *lt;
10868 return ! (lt = localtime (&now)) || mktime (lt) == now;
10869}
10870
10871static int
1f10e750 10872mktime_test (time_t now)
ae1362a3
AS
10873{
10874 return (mktime_test1 (now)
10875 && mktime_test1 ((time_t) (time_t_max - now))
10876 && mktime_test1 ((time_t) (time_t_min + now)));
10877}
10878
10879static int
10880irix_6_4_bug ()
10881{
10882 /* Based on code from Ariel Faigon. */
10883 struct tm tm;
10884 tm.tm_year = 96;
10885 tm.tm_mon = 3;
10886 tm.tm_mday = 0;
10887 tm.tm_hour = 0;
10888 tm.tm_min = 0;
10889 tm.tm_sec = 0;
10890 tm.tm_isdst = -1;
10891 mktime (&tm);
10892 return tm.tm_mon == 2 && tm.tm_mday == 31;
503d2be0 10893}
ca81d7a0 10894
ae1362a3 10895static int
1f10e750 10896bigtime_test (int j)
ae1362a3
AS
10897{
10898 struct tm tm;
10899 time_t now;
10900 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
10901 now = mktime (&tm);
10902 if (now != (time_t) -1)
10903 {
10904 struct tm *lt = localtime (&now);
10905 if (! (lt
10906 && lt->tm_year == tm.tm_year
10907 && lt->tm_mon == tm.tm_mon
10908 && lt->tm_mday == tm.tm_mday
10909 && lt->tm_hour == tm.tm_hour
10910 && lt->tm_min == tm.tm_min
10911 && lt->tm_sec == tm.tm_sec
10912 && lt->tm_yday == tm.tm_yday
10913 && lt->tm_wday == tm.tm_wday
10914 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
10915 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
10916 return 0;
10917 }
10918 return 1;
10919}
a21616bd 10920
ae1362a3
AS
10921static int
10922year_2050_test ()
10923{
10924 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
10925 ignoring leap seconds. */
10926 unsigned long int answer = 2527315200UL;
a21616bd 10927
ae1362a3
AS
10928 struct tm tm;
10929 time_t t;
10930 tm.tm_year = 2050 - 1900;
10931 tm.tm_mon = 2 - 1;
10932 tm.tm_mday = 1;
10933 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
10934 tm.tm_isdst = -1;
a21616bd 10935
ae1362a3
AS
10936 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
10937 instead of "TZ=America/Vancouver" in order to detect the bug even
10938 on systems that don't support the Olson extension, or don't have the
10939 full zoneinfo tables installed. */
1f10e750 10940 putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0");
503d2be0 10941
ae1362a3 10942 t = mktime (&tm);
503d2be0 10943
ae1362a3
AS
10944 /* Check that the result is either a failure, or close enough
10945 to the correct answer that we can assume the discrepancy is
10946 due to leap seconds. */
10947 return (t == (time_t) -1
10948 || (0 < t && answer - 120 <= t && t <= answer + 120));
10949}
ca81d7a0 10950
ae1362a3
AS
10951int
10952main ()
10953{
10954 time_t t, delta;
10955 int i, j;
a21616bd 10956
ae1362a3
AS
10957 /* This test makes some buggy mktime implementations loop.
10958 Give up after 60 seconds; a mktime slower than that
10959 isn't worth using anyway. */
10960 alarm (60);
a21616bd 10961
ae1362a3
AS
10962 for (;;)
10963 {
10964 t = (time_t_max << 1) + 1;
10965 if (t <= time_t_max)
10966 break;
10967 time_t_max = t;
10968 }
10969 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
503d2be0 10970
ae1362a3
AS
10971 delta = time_t_max / 997; /* a suitable prime number */
10972 for (i = 0; i < N_STRINGS; i++)
10973 {
10974 if (tz_strings[i])
1f10e750 10975 putenv ((char*) tz_strings[i]);
503d2be0 10976
ae1362a3
AS
10977 for (t = 0; t <= time_t_max - delta; t += delta)
10978 if (! mktime_test (t))
10979 return 1;
10980 if (! (mktime_test ((time_t) 1)
10981 && mktime_test ((time_t) (60 * 60))
10982 && mktime_test ((time_t) (60 * 60 * 24))))
10983 return 1;
bf89cb4d 10984
ae1362a3
AS
10985 for (j = 1; ; j <<= 1)
10986 if (! bigtime_test (j))
10987 return 1;
10988 else if (INT_MAX / 2 < j)
10989 break;
10990 if (! bigtime_test (INT_MAX))
10991 return 1;
10992 }
10993 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
10994}
10995_ACEOF
ae1362a3
AS
10996if ac_fn_c_try_run "$LINENO"; then :
10997 ac_cv_func_working_mktime=yes
503d2be0 10998else
ae1362a3
AS
10999 ac_cv_func_working_mktime=no
11000fi
11001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11002 conftest.$ac_objext conftest.beam conftest.$ac_ext
11003fi
19650fd6 11004
503d2be0 11005fi
ae1362a3
AS
11006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
11007$as_echo "$ac_cv_func_working_mktime" >&6; }
11008if test $ac_cv_func_working_mktime = no; then
11009 case " $LIBOBJS " in
11010 *" mktime.$ac_objext "* ) ;;
11011 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
11012 ;;
11013esac
ca81d7a0 11014
503d2be0 11015fi
a21616bd 11016
ae1362a3
AS
11017if test "$ac_cv_func_working_mktime" = no; then
11018
11019$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
a21616bd
KR
11020
11021fi
11022
ae1362a3 11023ac_have_func=no # yes means we've found a way to get the load average.
19650fd6 11024
ae1362a3
AS
11025# Make sure getloadavg.c is where it belongs, at configure-time.
11026test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
1f10e750 11027 as_fn_error $? "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
ca81d7a0 11028
ae1362a3 11029ac_save_LIBS=$LIBS
bf89cb4d 11030
ae1362a3
AS
11031# Check for getloadavg, but be sure not to touch the cache variable.
11032(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11033if test "x$ac_cv_func_getloadavg" = x""yes; then :
11034 exit 0
11035else
11036 exit 1
503d2be0 11037fi
ae1362a3 11038) && ac_have_func=yes
0ca10bb7 11039
ae1362a3
AS
11040# On HPUX9, an unprivileged user can get load averages through this function.
11041for ac_func in pstat_getdynamic
11042do :
11043 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
11044if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
c0d27fcc 11045 cat >>confdefs.h <<_ACEOF
ae1362a3 11046#define HAVE_PSTAT_GETDYNAMIC 1
c0d27fcc 11047_ACEOF
a21616bd 11048
0ca10bb7 11049fi
ae1362a3 11050done
a21616bd 11051
503d2be0 11052
ae1362a3
AS
11053# Solaris has libkstat which does not require root.
11054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
11055$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
11056if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
e9a63f04 11057 $as_echo_n "(cached) " >&6
a21616bd 11058else
503d2be0 11059 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11060LIBS="-lkstat $LIBS"
11061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11062/* end confdefs.h. */
503d2be0 11063
ca81d7a0
JD
11064/* Override any GCC internal prototype to avoid an error.
11065 Use char because int might match the return type of a GCC
11066 builtin and then its argument prototype would still apply. */
503d2be0
AS
11067#ifdef __cplusplus
11068extern "C"
11069#endif
ae1362a3 11070char kstat_open ();
503d2be0
AS
11071int
11072main ()
11073{
ae1362a3 11074return kstat_open ();
503d2be0
AS
11075 ;
11076 return 0;
11077}
11078_ACEOF
ae1362a3
AS
11079if ac_fn_c_try_link "$LINENO"; then :
11080 ac_cv_lib_kstat_kstat_open=yes
503d2be0 11081else
ae1362a3 11082 ac_cv_lib_kstat_kstat_open=no
503d2be0 11083fi
ae1362a3
AS
11084rm -f core conftest.err conftest.$ac_objext \
11085 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
11086LIBS=$ac_check_lib_save_LIBS
11087fi
ae1362a3
AS
11088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
11089$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
11090if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
c0d27fcc 11091 cat >>confdefs.h <<_ACEOF
ae1362a3 11092#define HAVE_LIBKSTAT 1
c0d27fcc 11093_ACEOF
a21616bd 11094
ae1362a3 11095 LIBS="-lkstat $LIBS"
a21616bd
KR
11096
11097fi
11098
ae1362a3 11099test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
503d2be0 11100
ae1362a3
AS
11101# Some systems with -lutil have (and need) -lkvm as well, some do not.
11102# On Solaris, -lkvm requires nlist from -lelf, so check that first
11103# to get the right answer into the cache.
11104# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11105if test $ac_have_func = no; then
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
11107$as_echo_n "checking for elf_begin in -lelf... " >&6; }
11108if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
e9a63f04 11109 $as_echo_n "(cached) " >&6
98418dba 11110else
0ca10bb7 11111 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11112LIBS="-lelf $LIBS"
11113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11114/* end confdefs.h. */
ca81d7a0 11115
0ca10bb7
RC
11116/* Override any GCC internal prototype to avoid an error.
11117 Use char because int might match the return type of a GCC
11118 builtin and then its argument prototype would still apply. */
11119#ifdef __cplusplus
11120extern "C"
11121#endif
ae1362a3 11122char elf_begin ();
0ca10bb7
RC
11123int
11124main ()
11125{
ae1362a3 11126return elf_begin ();
0ca10bb7
RC
11127 ;
11128 return 0;
11129}
503d2be0 11130_ACEOF
ae1362a3
AS
11131if ac_fn_c_try_link "$LINENO"; then :
11132 ac_cv_lib_elf_elf_begin=yes
503d2be0 11133else
ae1362a3 11134 ac_cv_lib_elf_elf_begin=no
a21616bd 11135fi
ae1362a3
AS
11136rm -f core conftest.err conftest.$ac_objext \
11137 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11138LIBS=$ac_check_lib_save_LIBS
11139fi
ae1362a3
AS
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
11141$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
11142if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
11143 LIBS="-lelf $LIBS"
c0d27fcc 11144fi
bf89cb4d 11145
ae1362a3
AS
11146fi
11147if test $ac_have_func = no; then
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
11149$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
11150if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
e9a63f04 11151 $as_echo_n "(cached) " >&6
21287a21 11152else
0ca10bb7 11153 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11154LIBS="-lkvm $LIBS"
11155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11156/* end confdefs.h. */
21287a21 11157
0ca10bb7
RC
11158/* Override any GCC internal prototype to avoid an error.
11159 Use char because int might match the return type of a GCC
11160 builtin and then its argument prototype would still apply. */
11161#ifdef __cplusplus
11162extern "C"
11163#endif
ae1362a3 11164char kvm_open ();
21287a21
CY
11165int
11166main ()
11167{
ae1362a3 11168return kvm_open ();
21287a21
CY
11169 ;
11170 return 0;
11171}
11172_ACEOF
ae1362a3
AS
11173if ac_fn_c_try_link "$LINENO"; then :
11174 ac_cv_lib_kvm_kvm_open=yes
21287a21 11175else
ae1362a3 11176 ac_cv_lib_kvm_kvm_open=no
0ca10bb7 11177fi
ae1362a3
AS
11178rm -f core conftest.err conftest.$ac_objext \
11179 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11180LIBS=$ac_check_lib_save_LIBS
11181fi
ae1362a3
AS
11182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
11183$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
11184if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
11185 LIBS="-lkvm $LIBS"
11186fi
bf89cb4d 11187
ae1362a3
AS
11188 # Check for the 4.4BSD definition of getloadavg.
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
11190$as_echo_n "checking for getloadavg in -lutil... " >&6; }
11191if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
0ca10bb7
RC
11192 $as_echo_n "(cached) " >&6
11193else
11194 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11195LIBS="-lutil $LIBS"
11196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11197/* end confdefs.h. */
21287a21 11198
0ca10bb7
RC
11199/* Override any GCC internal prototype to avoid an error.
11200 Use char because int might match the return type of a GCC
11201 builtin and then its argument prototype would still apply. */
11202#ifdef __cplusplus
11203extern "C"
11204#endif
ae1362a3 11205char getloadavg ();
21287a21
CY
11206int
11207main ()
11208{
ae1362a3 11209return getloadavg ();
21287a21
CY
11210 ;
11211 return 0;
11212}
11213_ACEOF
ae1362a3
AS
11214if ac_fn_c_try_link "$LINENO"; then :
11215 ac_cv_lib_util_getloadavg=yes
21287a21 11216else
ae1362a3 11217 ac_cv_lib_util_getloadavg=no
21287a21 11218fi
ae1362a3
AS
11219rm -f core conftest.err conftest.$ac_objext \
11220 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 11221LIBS=$ac_check_lib_save_LIBS
21287a21 11222fi
ae1362a3
AS
11223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
11224$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
11225if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
11226 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
21287a21 11227fi
21287a21
CY
11228
11229fi
0ca10bb7 11230
ae1362a3
AS
11231if test $ac_have_func = no; then
11232 # There is a commonly available library for RS/6000 AIX.
11233 # Since it is not a standard part of AIX, it might be installed locally.
11234 ac_getloadavg_LIBS=$LIBS
11235 LIBS="-L/usr/local/lib $LIBS"
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
11237$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
11238if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
e9a63f04 11239 $as_echo_n "(cached) " >&6
21287a21 11240else
0ca10bb7 11241 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11242LIBS="-lgetloadavg $LIBS"
11243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11244/* end confdefs.h. */
21287a21 11245
0ca10bb7
RC
11246/* Override any GCC internal prototype to avoid an error.
11247 Use char because int might match the return type of a GCC
11248 builtin and then its argument prototype would still apply. */
11249#ifdef __cplusplus
11250extern "C"
11251#endif
ae1362a3 11252char getloadavg ();
21287a21
CY
11253int
11254main ()
11255{
ae1362a3 11256return getloadavg ();
21287a21
CY
11257 ;
11258 return 0;
11259}
11260_ACEOF
ae1362a3
AS
11261if ac_fn_c_try_link "$LINENO"; then :
11262 ac_cv_lib_getloadavg_getloadavg=yes
0ca10bb7 11263else
ae1362a3 11264 ac_cv_lib_getloadavg_getloadavg=no
0ca10bb7 11265fi
ae1362a3
AS
11266rm -f core conftest.err conftest.$ac_objext \
11267 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
11268LIBS=$ac_check_lib_save_LIBS
11269fi
ae1362a3
AS
11270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
11271$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
11272if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
11273 LIBS="-lgetloadavg $LIBS"
11274else
11275 LIBS=$ac_getloadavg_LIBS
11276fi
11277
11278fi
11279
11280# Make sure it is really in the library, if we think we found it,
11281# otherwise set up the replacement function.
11282for ac_func in getloadavg
11283do :
11284 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11285if test "x$ac_cv_func_getloadavg" = x""yes; then :
0ca10bb7 11286 cat >>confdefs.h <<_ACEOF
ae1362a3 11287#define HAVE_GETLOADAVG 1
0ca10bb7
RC
11288_ACEOF
11289
bf89cb4d 11290else
ae1362a3
AS
11291 case " $LIBOBJS " in
11292 *" getloadavg.$ac_objext "* ) ;;
11293 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
11294 ;;
11295esac
0ca10bb7 11296
ae1362a3
AS
11297
11298$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
11299
11300# Figure out what our getloadavg.c needs.
11301ac_have_func=no
11302ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
11303if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
11304 ac_have_func=yes
11305
11306$as_echo "#define DGUX 1" >>confdefs.h
11307
11308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
11309$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
11310if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
0ca10bb7
RC
11311 $as_echo_n "(cached) " >&6
11312else
11313 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
11314LIBS="-ldgc $LIBS"
11315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11316/* end confdefs.h. */
21287a21 11317
0ca10bb7
RC
11318/* Override any GCC internal prototype to avoid an error.
11319 Use char because int might match the return type of a GCC
11320 builtin and then its argument prototype would still apply. */
11321#ifdef __cplusplus
11322extern "C"
11323#endif
ae1362a3 11324char dg_sys_info ();
21287a21
CY
11325int
11326main ()
11327{
ae1362a3 11328return dg_sys_info ();
21287a21
CY
11329 ;
11330 return 0;
11331}
11332_ACEOF
ae1362a3
AS
11333if ac_fn_c_try_link "$LINENO"; then :
11334 ac_cv_lib_dgc_dg_sys_info=yes
bf89cb4d 11335else
ae1362a3 11336 ac_cv_lib_dgc_dg_sys_info=no
c0d27fcc 11337fi
ae1362a3
AS
11338rm -f core conftest.err conftest.$ac_objext \
11339 conftest$ac_exeext conftest.$ac_ext
bf89cb4d 11340LIBS=$ac_check_lib_save_LIBS
0ca10bb7 11341fi
ae1362a3
AS
11342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
11343$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
11344if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
0ca10bb7 11345 cat >>confdefs.h <<_ACEOF
ae1362a3 11346#define HAVE_LIBDGC 1
503d2be0 11347_ACEOF
19650fd6 11348
ae1362a3 11349 LIBS="-ldgc $LIBS"
0ca10bb7 11350
a21616bd 11351fi
ca81d7a0 11352
0ca10bb7 11353fi
ca81d7a0 11354
0ca10bb7
RC
11355
11356
ae1362a3
AS
11357ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11358if test "x$ac_cv_header_locale_h" = x""yes; then :
11359
bf89cb4d 11360fi
ae1362a3
AS
11361
11362
11363for ac_func in setlocale
11364do :
11365 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
11366if test "x$ac_cv_func_setlocale" = x""yes; then :
11367 cat >>confdefs.h <<_ACEOF
11368#define HAVE_SETLOCALE 1
bf89cb4d 11369_ACEOF
ae1362a3
AS
11370
11371fi
11372done
11373
11374
11375# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
11376# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
11377# Irix 4.0.5F has the header but not the library.
11378if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
11379 ac_have_func=yes
11380
11381$as_echo "#define SVR4 1" >>confdefs.h
11382
11383fi
11384
11385if test $ac_have_func = no; then
11386 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
11387if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
11388 ac_have_func=yes
11389
11390$as_echo "#define UMAX 1" >>confdefs.h
11391
11392
11393$as_echo "#define UMAX4_3 1" >>confdefs.h
11394
11395fi
11396
11397
11398fi
11399
11400if test $ac_have_func = no; then
11401 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
11402if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
11403 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
11404
11405fi
11406
11407
11408fi
11409
11410if test $ac_have_func = no; then
11411 for ac_header in mach/mach.h
11412do :
11413 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
11414if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
11415 cat >>confdefs.h <<_ACEOF
11416#define HAVE_MACH_MACH_H 1
0ca10bb7 11417_ACEOF
c0d27fcc
MR
11418
11419fi
0ca10bb7 11420
ae1362a3
AS
11421done
11422
11423fi
11424
11425for ac_header in nlist.h
11426do :
11427 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
11428if test "x$ac_cv_header_nlist_h" = x""yes; then :
11429 cat >>confdefs.h <<_ACEOF
11430#define HAVE_NLIST_H 1
bf89cb4d 11431_ACEOF
ae1362a3
AS
11432 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
11433"
11434if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
11435
11436cat >>confdefs.h <<_ACEOF
11437#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
bf89cb4d 11438_ACEOF
bf89cb4d 11439
503d2be0 11440
ae1362a3
AS
11441$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
11442
11443fi
19650fd6 11444
bf89cb4d 11445
0ca10bb7 11446fi
ae1362a3
AS
11447
11448done
0ca10bb7 11449
bf89cb4d 11450fi
ae1362a3
AS
11451done
11452
11453
11454# Some definitions of getloadavg require that the program be installed setgid.
11455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
11456$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
11457if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
0ca10bb7
RC
11458 $as_echo_n "(cached) " >&6
11459else
ae1362a3 11460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 11461/* end confdefs.h. */
ae1362a3
AS
11462#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
11463#ifdef LDAV_PRIVILEGED
11464Yowza Am I SETGID yet
11465#endif
19650fd6 11466_ACEOF
ae1362a3
AS
11467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11468 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
11469 ac_cv_func_getloadavg_setgid=yes
bf89cb4d 11470else
ae1362a3
AS
11471 ac_cv_func_getloadavg_setgid=no
11472fi
11473rm -f conftest*
bf89cb4d 11474
ae1362a3
AS
11475fi
11476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
11477$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
11478if test $ac_cv_func_getloadavg_setgid = yes; then
11479 NEED_SETGID=true
bf89cb4d 11480
ae1362a3 11481$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
0ca10bb7 11482
ae1362a3
AS
11483else
11484 NEED_SETGID=false
bf89cb4d 11485fi
0ca10bb7 11486
ae1362a3
AS
11487if test $ac_cv_func_getloadavg_setgid = yes; then
11488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
11489$as_echo_n "checking group of /dev/kmem... " >&6; }
11490if test "${ac_cv_group_kmem+set}" = set; then :
11491 $as_echo_n "(cached) " >&6
11492else
11493 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
11494 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
11495 # If we got an error (system does not support symlinks), try without -L.
11496 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
11497 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
11498 | sed -ne 's/[ ][ ]*/ /g;
11499 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
11500 / /s/.* //;p;'`
19650fd6 11501
a21616bd 11502fi
ae1362a3
AS
11503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
11504$as_echo "$ac_cv_group_kmem" >&6; }
11505 KMEM_GROUP=$ac_cv_group_kmem
11506fi
11507if test "x$ac_save_LIBS" = x; then
11508 GETLOADAVG_LIBS=$LIBS
11509else
11510 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
11511fi
11512LIBS=$ac_save_LIBS
ca81d7a0 11513
c0d27fcc 11514
ca81d7a0 11515
ae1362a3
AS
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11517$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11518if test "${ac_cv_sys_largefile_source+set}" = set; then :
bf89cb4d
GM
11519 $as_echo_n "(cached) " >&6
11520else
ae1362a3
AS
11521 while :; do
11522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11523/* end confdefs.h. */
ae1362a3
AS
11524#include <sys/types.h> /* for off_t */
11525 #include <stdio.h>
bf89cb4d
GM
11526int
11527main ()
11528{
ae1362a3
AS
11529int (*fp) (FILE *, off_t, int) = fseeko;
11530 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
bf89cb4d
GM
11531 ;
11532 return 0;
11533}
11534_ACEOF
ae1362a3
AS
11535if ac_fn_c_try_link "$LINENO"; then :
11536 ac_cv_sys_largefile_source=no; break
11537fi
11538rm -f core conftest.err conftest.$ac_objext \
11539 conftest$ac_exeext conftest.$ac_ext
11540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11541/* end confdefs.h. */
ae1362a3
AS
11542#define _LARGEFILE_SOURCE 1
11543#include <sys/types.h> /* for off_t */
11544 #include <stdio.h>
bf89cb4d
GM
11545int
11546main ()
11547{
ae1362a3
AS
11548int (*fp) (FILE *, off_t, int) = fseeko;
11549 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
bf89cb4d
GM
11550 ;
11551 return 0;
11552}
11553_ACEOF
ae1362a3
AS
11554if ac_fn_c_try_link "$LINENO"; then :
11555 ac_cv_sys_largefile_source=1; break
bf89cb4d 11556fi
ae1362a3
AS
11557rm -f core conftest.err conftest.$ac_objext \
11558 conftest$ac_exeext conftest.$ac_ext
11559 ac_cv_sys_largefile_source=unknown
11560 break
11561done
bf89cb4d 11562fi
ae1362a3
AS
11563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
11564$as_echo "$ac_cv_sys_largefile_source" >&6; }
11565case $ac_cv_sys_largefile_source in #(
11566 no | unknown) ;;
11567 *)
bf89cb4d 11568cat >>confdefs.h <<_ACEOF
ae1362a3 11569#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
bf89cb4d 11570_ACEOF
ae1362a3
AS
11571;;
11572esac
11573rm -rf conftest*
19650fd6 11574
ae1362a3
AS
11575# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11576# in glibc 2.1.3, but that breaks too many other things.
11577# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11578if test $ac_cv_sys_largefile_source != unknown; then
ca81d7a0 11579
ae1362a3 11580$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
c0d27fcc 11581
bf89cb4d 11582fi
ca81d7a0 11583
c0d27fcc 11584
ae1362a3
AS
11585# Configure getopt.
11586# getopt.m4 serial 10
11587
11588# The getopt module assume you want GNU getopt, with getopt_long etc,
11589# rather than vanilla POSIX getopt. This means your your code should
11590# always include <getopt.h> for the getopt prototypes.
0ca10bb7
RC
11591
11592
11593
11594
bf89cb4d 11595
c0d27fcc 11596
a21616bd 11597
c0d27fcc 11598
c0d27fcc 11599
98418dba 11600
c0d27fcc 11601
ae1362a3 11602# Prerequisites of lib/getopt*.
19650fd6 11603
ca81d7a0 11604
c0d27fcc 11605
ae1362a3
AS
11606
11607 GETOPT_H=
11608 for ac_header in getopt.h
11609do :
11610 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11611if test "x$ac_cv_header_getopt_h" = x""yes; then :
11612 cat >>confdefs.h <<_ACEOF
11613#define HAVE_GETOPT_H 1
bf89cb4d 11614_ACEOF
ca81d7a0 11615
ae1362a3
AS
11616else
11617 GETOPT_H=getopt.h
bf89cb4d 11618fi
ca81d7a0 11619
ae1362a3 11620done
c0d27fcc 11621
ae1362a3
AS
11622 if test -z "$GETOPT_H"; then
11623 for ac_func in getopt_long_only
11624do :
11625 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11626if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
11627 cat >>confdefs.h <<_ACEOF
11628#define HAVE_GETOPT_LONG_ONLY 1
11629_ACEOF
19650fd6 11630
bf89cb4d 11631else
ae1362a3 11632 GETOPT_H=getopt.h
a21616bd 11633fi
ae1362a3
AS
11634done
11635
11636 fi
ca81d7a0 11637
ae1362a3
AS
11638 if test -z "$GETOPT_H"; then
11639 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
11640"
11641if test "x$ac_cv_have_decl_optreset" = x""yes; then :
11642 GETOPT_H=getopt.h
bf89cb4d 11643fi
c0d27fcc 11644
ae1362a3 11645 fi
ca81d7a0 11646
ae1362a3
AS
11647 if test -z "$GETOPT_H"; then
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11649$as_echo_n "checking for working GNU getopt function... " >&6; }
11650if test "${gl_cv_func_gnu_getopt+set}" = set; then :
e9a63f04 11651 $as_echo_n "(cached) " >&6
c0d27fcc 11652else
ae1362a3
AS
11653 if test "$cross_compiling" = yes; then :
11654 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
11655"
11656if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
11657 gl_cv_func_gnu_getopt=no
0ca10bb7 11658else
ae1362a3 11659 gl_cv_func_gnu_getopt=yes
0ca10bb7 11660fi
0ca10bb7 11661
ae1362a3
AS
11662else
11663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11664/* end confdefs.h. */
ae1362a3
AS
11665#include <getopt.h>
11666int
11667main ()
11668{
11669
11670 char *myargv[3];
11671 myargv[0] = "conftest";
11672 myargv[1] = "-+";
11673 myargv[2] = 0;
11674 return getopt (2, myargv, "+a") != '?';
11675
11676 ;
11677 return 0;
11678}
bf89cb4d 11679_ACEOF
ae1362a3
AS
11680if ac_fn_c_try_run "$LINENO"; then :
11681 gl_cv_func_gnu_getopt=yes
bf89cb4d 11682else
ae1362a3
AS
11683 gl_cv_func_gnu_getopt=no
11684fi
11685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11686 conftest.$ac_objext conftest.beam conftest.$ac_ext
11687fi
c0d27fcc
MR
11688
11689fi
ae1362a3
AS
11690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
11691$as_echo "$gl_cv_func_gnu_getopt" >&6; }
11692 if test "$gl_cv_func_gnu_getopt" = "no"; then
11693 GETOPT_H=getopt.h
11694 fi
11695 fi
0ca10bb7
RC
11696
11697
503d2be0 11698
ae1362a3 11699 if test -n "$GETOPT_H"; then :
0ca10bb7 11700
bf89cb4d 11701
ae1362a3 11702 GETOPT_H=getopt.h
19650fd6 11703
ae1362a3 11704$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
bf89cb4d 11705
ca81d7a0 11706
ae1362a3
AS
11707
11708 :
11709 GETOPTOBJS='getopt.o getopt1.o'
bf89cb4d 11710
0ca10bb7 11711fi
bf89cb4d 11712
c0d27fcc 11713
0ca10bb7 11714
ae1362a3
AS
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
11716$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
11717if test "${ac_cv_func_getpgrp_void+set}" = set; then :
bf89cb4d 11718 $as_echo_n "(cached) " >&6
bf89cb4d 11719else
ae1362a3
AS
11720 # Use it with a single arg.
11721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d
GM
11722/* end confdefs.h. */
11723$ac_includes_default
ae1362a3
AS
11724int
11725main ()
11726{
11727getpgrp (0);
11728 ;
11729 return 0;
11730}
bf89cb4d 11731_ACEOF
ae1362a3
AS
11732if ac_fn_c_try_compile "$LINENO"; then :
11733 ac_cv_func_getpgrp_void=no
bf89cb4d 11734else
ae1362a3
AS
11735 ac_cv_func_getpgrp_void=yes
11736fi
11737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19650fd6 11738
a21616bd 11739fi
ae1362a3
AS
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
11741$as_echo "$ac_cv_func_getpgrp_void" >&6; }
11742if test $ac_cv_func_getpgrp_void = yes; then
ca81d7a0 11743
ae1362a3 11744$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
35996d22 11745
ae1362a3
AS
11746fi
11747
11748
11749for ac_func in strftime
11750do :
11751 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
11752if test "x$ac_cv_func_strftime" = x""yes; then :
11753 cat >>confdefs.h <<_ACEOF
11754#define HAVE_STRFTIME 1
bf89cb4d 11755_ACEOF
ae1362a3
AS
11756
11757else
11758 # strftime is in -lintl on SCO UNIX.
11759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
11760$as_echo_n "checking for strftime in -lintl... " >&6; }
11761if test "${ac_cv_lib_intl_strftime+set}" = set; then :
11762 $as_echo_n "(cached) " >&6
11763else
11764 ac_check_lib_save_LIBS=$LIBS
11765LIBS="-lintl $LIBS"
11766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 11767/* end confdefs.h. */
ae1362a3
AS
11768
11769/* Override any GCC internal prototype to avoid an error.
11770 Use char because int might match the return type of a GCC
11771 builtin and then its argument prototype would still apply. */
11772#ifdef __cplusplus
11773extern "C"
11774#endif
11775char strftime ();
11776int
11777main ()
11778{
11779return strftime ();
11780 ;
11781 return 0;
11782}
0ca10bb7 11783_ACEOF
ae1362a3
AS
11784if ac_fn_c_try_link "$LINENO"; then :
11785 ac_cv_lib_intl_strftime=yes
bf89cb4d 11786else
ae1362a3
AS
11787 ac_cv_lib_intl_strftime=no
11788fi
11789rm -f core conftest.err conftest.$ac_objext \
11790 conftest$ac_exeext conftest.$ac_ext
11791LIBS=$ac_check_lib_save_LIBS
11792fi
11793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
11794$as_echo "$ac_cv_lib_intl_strftime" >&6; }
11795if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
11796 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
ca81d7a0 11797
ae1362a3 11798LIBS="-lintl $LIBS"
0ca10bb7 11799fi
0ca10bb7 11800
ae1362a3
AS
11801fi
11802done
0ca10bb7 11803
c0d27fcc 11804
ae1362a3
AS
11805# UNIX98 PTYs.
11806for ac_func in grantpt
11807do :
11808 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
11809if test "x$ac_cv_func_grantpt" = x""yes; then :
11810 cat >>confdefs.h <<_ACEOF
11811#define HAVE_GRANTPT 1
11812_ACEOF
11813
c0d27fcc 11814fi
ae1362a3
AS
11815done
11816
bf89cb4d 11817
ae1362a3
AS
11818# PTY-related GNU extensions.
11819for ac_func in getpt
11820do :
11821 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
11822if test "x$ac_cv_func_getpt" = x""yes; then :
c0d27fcc 11823 cat >>confdefs.h <<_ACEOF
ae1362a3 11824#define HAVE_GETPT 1
c0d27fcc 11825_ACEOF
503d2be0 11826
ae1362a3
AS
11827fi
11828done
0ca10bb7 11829
ae1362a3
AS
11830
11831# Check this now, so that we will NOT find the above functions in ncurses.
11832# That is because we have not set up to link ncurses in lib-src.
11833# It's better to believe a function is not available
11834# than to expect to find it in ncurses.
11835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tparm in -lncurses" >&5
11836$as_echo_n "checking for tparm in -lncurses... " >&6; }
11837if test "${ac_cv_lib_ncurses_tparm+set}" = set; then :
bf89cb4d 11838 $as_echo_n "(cached) " >&6
bf89cb4d 11839else
ae1362a3
AS
11840 ac_check_lib_save_LIBS=$LIBS
11841LIBS="-lncurses $LIBS"
11842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 11843/* end confdefs.h. */
ae1362a3
AS
11844
11845/* Override any GCC internal prototype to avoid an error.
11846 Use char because int might match the return type of a GCC
11847 builtin and then its argument prototype would still apply. */
11848#ifdef __cplusplus
11849extern "C"
11850#endif
11851char tparm ();
11852int
11853main ()
11854{
11855return tparm ();
11856 ;
11857 return 0;
11858}
0ca10bb7 11859_ACEOF
ae1362a3
AS
11860if ac_fn_c_try_link "$LINENO"; then :
11861 ac_cv_lib_ncurses_tparm=yes
0ca10bb7 11862else
ae1362a3
AS
11863 ac_cv_lib_ncurses_tparm=no
11864fi
11865rm -f core conftest.err conftest.$ac_objext \
11866 conftest$ac_exeext conftest.$ac_ext
11867LIBS=$ac_check_lib_save_LIBS
11868fi
11869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tparm" >&5
11870$as_echo "$ac_cv_lib_ncurses_tparm" >&6; }
11871if test "x$ac_cv_lib_ncurses_tparm" = x""yes; then :
11872 cat >>confdefs.h <<_ACEOF
11873#define HAVE_LIBNCURSES 1
11874_ACEOF
11875
11876 LIBS="-lncurses $LIBS"
bf89cb4d 11877
0ca10bb7 11878fi
bf89cb4d 11879
bf89cb4d 11880
70ba1ec8
CY
11881case "$opsys" in
11882 netbsd)
11883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
11884$as_echo_n "checking for library containing tputs... " >&6; }
11885if test "${ac_cv_search_tputs+set}" = set; then :
11886 $as_echo_n "(cached) " >&6
11887else
11888 ac_func_search_save_LIBS=$LIBS
11889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11890/* end confdefs.h. */
11891
11892/* Override any GCC internal prototype to avoid an error.
11893 Use char because int might match the return type of a GCC
11894 builtin and then its argument prototype would still apply. */
11895#ifdef __cplusplus
11896extern "C"
11897#endif
11898char tputs ();
11899int
11900main ()
11901{
11902return tputs ();
11903 ;
11904 return 0;
11905}
11906_ACEOF
11907for ac_lib in '' ncurses terminfo termcap; do
11908 if test -z "$ac_lib"; then
11909 ac_res="none required"
11910 else
11911 ac_res=-l$ac_lib
11912 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11913 fi
11914 if ac_fn_c_try_link "$LINENO"; then :
11915 ac_cv_search_tputs=$ac_res
11916fi
11917rm -f core conftest.err conftest.$ac_objext \
11918 conftest$ac_exeext
11919 if test "${ac_cv_search_tputs+set}" = set; then :
11920 break
11921fi
11922done
11923if test "${ac_cv_search_tputs+set}" = set; then :
11924
11925else
11926 ac_cv_search_tputs=no
11927fi
11928rm conftest.$ac_ext
11929LIBS=$ac_func_search_save_LIBS
11930fi
11931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
11932$as_echo "$ac_cv_search_tputs" >&6; }
11933ac_res=$ac_cv_search_tputs
11934if test "$ac_res" != no; then :
11935 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11936
11937fi
11938
11939 if test $ac_cv_search_tputs = -lterminfo; then
11940
11941$as_echo "#define TERMINFO 1" >>confdefs.h
11942
11943 fi
11944 ;;
11945esac
11946
ae1362a3
AS
11947# Do we have res_init, for detecting changes in /etc/resolv.conf?
11948
11949resolv=no
11950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11951/* end confdefs.h. */
11952#include <netinet/in.h>
11953#include <arpa/nameser.h>
11954#include <resolv.h>
11955int
11956main ()
11957{
11958return res_init();
11959 ;
11960 return 0;
11961}
bf89cb4d 11962_ACEOF
ae1362a3
AS
11963if ac_fn_c_try_link "$LINENO"; then :
11964 have_res_init=yes
11965else
11966 have_res_init=no
11967fi
11968rm -f core conftest.err conftest.$ac_objext \
11969 conftest$ac_exeext conftest.$ac_ext
11970if test "$have_res_init" = no; then
11971 OLIBS="$LIBS"
11972 LIBS="$LIBS -lresolv"
11973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
11974$as_echo_n "checking for res_init with -lresolv... " >&6; }
11975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 11976/* end confdefs.h. */
ae1362a3
AS
11977#include <netinet/in.h>
11978#include <arpa/nameser.h>
11979#include <resolv.h>
11980int
11981main ()
11982{
11983return res_init();
11984 ;
11985 return 0;
11986}
0ca10bb7 11987_ACEOF
ae1362a3
AS
11988if ac_fn_c_try_link "$LINENO"; then :
11989 have_res_init=yes
0ca10bb7 11990else
ae1362a3
AS
11991 have_res_init=no
11992fi
11993rm -f core conftest.err conftest.$ac_objext \
11994 conftest$ac_exeext conftest.$ac_ext
11995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
11996$as_echo "$have_res_init" >&6; }
11997 if test "$have_res_init" = yes ; then
11998 resolv=yes
11999 fi
12000 LIBS="$OLIBS"
a21616bd 12001fi
c0d27fcc 12002
ae1362a3 12003if test "$have_res_init" = yes; then
0ca10bb7 12004
ae1362a3 12005$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
a21616bd
KR
12006
12007fi
c0d27fcc 12008
ae1362a3
AS
12009# Do we need the Hesiod library to provide the support routines?
12010if test "$with_hesiod" != no ; then
12011 # Don't set $LIBS here -- see comments above.
12012 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
12013if test "x$ac_cv_func_res_send" = x""yes; then :
a21616bd 12014
0ca10bb7 12015else
ae1362a3
AS
12016 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
12017if test "x$ac_cv_func___res_send" = x""yes; then :
503d2be0 12018
ae1362a3
AS
12019else
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
12021$as_echo_n "checking for res_send in -lresolv... " >&6; }
12022if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
e9a63f04 12023 $as_echo_n "(cached) " >&6
98418dba 12024else
ae1362a3
AS
12025 ac_check_lib_save_LIBS=$LIBS
12026LIBS="-lresolv $LIBS"
12027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12028/* end confdefs.h. */
ae1362a3
AS
12029
12030/* Override any GCC internal prototype to avoid an error.
12031 Use char because int might match the return type of a GCC
12032 builtin and then its argument prototype would still apply. */
12033#ifdef __cplusplus
12034extern "C"
12035#endif
12036char res_send ();
12037int
12038main ()
12039{
12040return res_send ();
12041 ;
12042 return 0;
12043}
19650fd6 12044_ACEOF
ae1362a3
AS
12045if ac_fn_c_try_link "$LINENO"; then :
12046 ac_cv_lib_resolv_res_send=yes
0ca10bb7 12047else
ae1362a3 12048 ac_cv_lib_resolv_res_send=no
0ca10bb7 12049fi
ae1362a3
AS
12050rm -f core conftest.err conftest.$ac_objext \
12051 conftest$ac_exeext conftest.$ac_ext
12052LIBS=$ac_check_lib_save_LIBS
12053fi
12054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
12055$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
12056if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
12057 resolv=yes
12058else
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
12060$as_echo_n "checking for __res_send in -lresolv... " >&6; }
12061if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
12062 $as_echo_n "(cached) " >&6
12063else
12064 ac_check_lib_save_LIBS=$LIBS
12065LIBS="-lresolv $LIBS"
12066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12067/* end confdefs.h. */
ae1362a3
AS
12068
12069/* Override any GCC internal prototype to avoid an error.
12070 Use char because int might match the return type of a GCC
12071 builtin and then its argument prototype would still apply. */
12072#ifdef __cplusplus
12073extern "C"
12074#endif
12075char __res_send ();
12076int
12077main ()
12078{
12079return __res_send ();
12080 ;
12081 return 0;
12082}
bf89cb4d 12083_ACEOF
ae1362a3
AS
12084if ac_fn_c_try_link "$LINENO"; then :
12085 ac_cv_lib_resolv___res_send=yes
c0d27fcc 12086else
ae1362a3
AS
12087 ac_cv_lib_resolv___res_send=no
12088fi
12089rm -f core conftest.err conftest.$ac_objext \
12090 conftest$ac_exeext conftest.$ac_ext
12091LIBS=$ac_check_lib_save_LIBS
12092fi
12093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
12094$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
12095if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
12096 resolv=yes
12097fi
bf89cb4d 12098
0ca10bb7 12099fi
bf89cb4d 12100
ae1362a3 12101fi
bf89cb4d 12102
ae1362a3 12103fi
bf89cb4d 12104
ae1362a3
AS
12105 if test "$resolv" = yes ; then
12106 RESOLVLIB=-lresolv
12107 else
12108 RESOLVLIB=
12109 fi
12110 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
12111if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
12112
12113else
12114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
12115$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
12116if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
bf89cb4d
GM
12117 $as_echo_n "(cached) " >&6
12118else
ae1362a3
AS
12119 ac_check_lib_save_LIBS=$LIBS
12120LIBS="-lhesiod $RESOLVLIB $LIBS"
12121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12122/* end confdefs.h. */
bf89cb4d 12123
ae1362a3
AS
12124/* Override any GCC internal prototype to avoid an error.
12125 Use char because int might match the return type of a GCC
12126 builtin and then its argument prototype would still apply. */
12127#ifdef __cplusplus
12128extern "C"
12129#endif
12130char hes_getmailhost ();
12131int
12132main ()
12133{
12134return hes_getmailhost ();
12135 ;
12136 return 0;
12137}
bf89cb4d 12138_ACEOF
ae1362a3
AS
12139if ac_fn_c_try_link "$LINENO"; then :
12140 ac_cv_lib_hesiod_hes_getmailhost=yes
12141else
12142 ac_cv_lib_hesiod_hes_getmailhost=no
12143fi
12144rm -f core conftest.err conftest.$ac_objext \
12145 conftest$ac_exeext conftest.$ac_ext
12146LIBS=$ac_check_lib_save_LIBS
0ca10bb7 12147fi
ae1362a3
AS
12148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
12149$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
12150if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
0ca10bb7 12151
ae1362a3 12152$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
bf89cb4d 12153
ae1362a3
AS
12154else
12155 :
0ca10bb7 12156fi
19650fd6 12157
ae1362a3 12158fi
bf89cb4d 12159
c0d27fcc 12160fi
ca81d7a0 12161
ae1362a3
AS
12162# Do we need libresolv (due to res_init or Hesiod)?
12163if test "$resolv" = yes ; then
bf89cb4d 12164
ae1362a3 12165$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
c0d27fcc 12166
bf89cb4d 12167fi
ae1362a3
AS
12168
12169# These tell us which Kerberos-related libraries to use.
12170if test "${with_kerberos}" != no; then
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
12172$as_echo_n "checking for com_err in -lcom_err... " >&6; }
12173if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
12174 $as_echo_n "(cached) " >&6
0ca10bb7 12175else
ae1362a3
AS
12176 ac_check_lib_save_LIBS=$LIBS
12177LIBS="-lcom_err $LIBS"
12178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12179/* end confdefs.h. */
ca81d7a0 12180
ae1362a3
AS
12181/* Override any GCC internal prototype to avoid an error.
12182 Use char because int might match the return type of a GCC
12183 builtin and then its argument prototype would still apply. */
12184#ifdef __cplusplus
12185extern "C"
12186#endif
12187char com_err ();
12188int
12189main ()
12190{
12191return com_err ();
12192 ;
12193 return 0;
12194}
bf89cb4d 12195_ACEOF
ae1362a3
AS
12196if ac_fn_c_try_link "$LINENO"; then :
12197 ac_cv_lib_com_err_com_err=yes
c0d27fcc 12198else
ae1362a3
AS
12199 ac_cv_lib_com_err_com_err=no
12200fi
12201rm -f core conftest.err conftest.$ac_objext \
12202 conftest$ac_exeext conftest.$ac_ext
12203LIBS=$ac_check_lib_save_LIBS
a21616bd 12204fi
ae1362a3
AS
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
12206$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
12207if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
12208 cat >>confdefs.h <<_ACEOF
12209#define HAVE_LIBCOM_ERR 1
12210_ACEOF
c0d27fcc 12211
ae1362a3 12212 LIBS="-lcom_err $LIBS"
a21616bd 12213
ae1362a3 12214fi
503d2be0 12215
ae1362a3
AS
12216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
12217$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
12218if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
e9a63f04 12219 $as_echo_n "(cached) " >&6
ba4481b5 12220else
ae1362a3
AS
12221 ac_check_lib_save_LIBS=$LIBS
12222LIBS="-lk5crypto $LIBS"
12223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12224/* end confdefs.h. */
bf89cb4d 12225
ae1362a3
AS
12226/* Override any GCC internal prototype to avoid an error.
12227 Use char because int might match the return type of a GCC
12228 builtin and then its argument prototype would still apply. */
12229#ifdef __cplusplus
12230extern "C"
12231#endif
12232char mit_des_cbc_encrypt ();
12233int
12234main ()
12235{
12236return mit_des_cbc_encrypt ();
12237 ;
12238 return 0;
12239}
12240_ACEOF
12241if ac_fn_c_try_link "$LINENO"; then :
12242 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
12243else
12244 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
12245fi
12246rm -f core conftest.err conftest.$ac_objext \
12247 conftest$ac_exeext conftest.$ac_ext
12248LIBS=$ac_check_lib_save_LIBS
503d2be0 12249fi
ae1362a3
AS
12250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
12251$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
12252if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
c0d27fcc 12253 cat >>confdefs.h <<_ACEOF
ae1362a3 12254#define HAVE_LIBK5CRYPTO 1
c0d27fcc 12255_ACEOF
ba4481b5 12256
ae1362a3 12257 LIBS="-lk5crypto $LIBS"
ba4481b5 12258
ba4481b5
DL
12259fi
12260
ae1362a3
AS
12261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
12262$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
12263if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
e9a63f04 12264 $as_echo_n "(cached) " >&6
ba4481b5 12265else
0ca10bb7 12266 ac_check_lib_save_LIBS=$LIBS
ae1362a3
AS
12267LIBS="-lcrypto $LIBS"
12268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12269/* end confdefs.h. */
0ca10bb7
RC
12270
12271/* Override any GCC internal prototype to avoid an error.
12272 Use char because int might match the return type of a GCC
12273 builtin and then its argument prototype would still apply. */
12274#ifdef __cplusplus
12275extern "C"
12276#endif
ae1362a3 12277char mit_des_cbc_encrypt ();
0ca10bb7
RC
12278int
12279main ()
ba4481b5 12280{
ae1362a3 12281return mit_des_cbc_encrypt ();
0ca10bb7
RC
12282 ;
12283 return 0;
ba4481b5 12284}
503d2be0 12285_ACEOF
ae1362a3
AS
12286if ac_fn_c_try_link "$LINENO"; then :
12287 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
ba4481b5 12288else
ae1362a3 12289 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
ba4481b5 12290fi
ae1362a3
AS
12291rm -f core conftest.err conftest.$ac_objext \
12292 conftest$ac_exeext conftest.$ac_ext
0ca10bb7 12293LIBS=$ac_check_lib_save_LIBS
ba4481b5 12294fi
ae1362a3
AS
12295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
12296$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
12297if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
0ca10bb7 12298 cat >>confdefs.h <<_ACEOF
ae1362a3 12299#define HAVE_LIBCRYPTO 1
0ca10bb7
RC
12300_ACEOF
12301
ae1362a3 12302 LIBS="-lcrypto $LIBS"
ca81d7a0 12303
0ca10bb7 12304fi
ca81d7a0 12305
ae1362a3
AS
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
12307$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
12308if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
0ca10bb7 12309 $as_echo_n "(cached) " >&6
ba4481b5 12310else
ae1362a3
AS
12311 ac_check_lib_save_LIBS=$LIBS
12312LIBS="-lkrb5 $LIBS"
12313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12314/* end confdefs.h. */
ae1362a3
AS
12315
12316/* Override any GCC internal prototype to avoid an error.
12317 Use char because int might match the return type of a GCC
12318 builtin and then its argument prototype would still apply. */
12319#ifdef __cplusplus
12320extern "C"
12321#endif
12322char krb5_init_context ();
12323int
12324main ()
bf89cb4d 12325{
ae1362a3
AS
12326return krb5_init_context ();
12327 ;
12328 return 0;
0ca10bb7
RC
12329}
12330_ACEOF
ae1362a3
AS
12331if ac_fn_c_try_link "$LINENO"; then :
12332 ac_cv_lib_krb5_krb5_init_context=yes
0ca10bb7 12333else
ae1362a3 12334 ac_cv_lib_krb5_krb5_init_context=no
ba4481b5 12335fi
ae1362a3
AS
12336rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext conftest.$ac_ext
12338LIBS=$ac_check_lib_save_LIBS
ba4481b5 12339fi
ae1362a3
AS
12340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
12341$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
12342if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
12343 cat >>confdefs.h <<_ACEOF
12344#define HAVE_LIBKRB5 1
bf89cb4d 12345_ACEOF
ba4481b5 12346
ae1362a3 12347 LIBS="-lkrb5 $LIBS"
503d2be0 12348
ae1362a3 12349fi
bf89cb4d 12350
ae1362a3
AS
12351 if test "${with_kerberos5}" = no; then
12352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
12353$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
12354if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
e9a63f04 12355 $as_echo_n "(cached) " >&6
48d4b120 12356else
ae1362a3
AS
12357 ac_check_lib_save_LIBS=$LIBS
12358LIBS="-ldes425 $LIBS"
12359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12360/* end confdefs.h. */
edfaf76d 12361
0ca10bb7
RC
12362/* Override any GCC internal prototype to avoid an error.
12363 Use char because int might match the return type of a GCC
12364 builtin and then its argument prototype would still apply. */
12365#ifdef __cplusplus
12366extern "C"
19650fd6 12367#endif
ae1362a3 12368char des_cbc_encrypt ();
0ca10bb7
RC
12369int
12370main ()
12371{
ae1362a3 12372return des_cbc_encrypt ();
0ca10bb7
RC
12373 ;
12374 return 0;
12375}
12376_ACEOF
ae1362a3
AS
12377if ac_fn_c_try_link "$LINENO"; then :
12378 ac_cv_lib_des425_des_cbc_encrypt=yes
0ca10bb7 12379else
ae1362a3 12380 ac_cv_lib_des425_des_cbc_encrypt=no
0ca10bb7 12381fi
ae1362a3
AS
12382rm -f core conftest.err conftest.$ac_objext \
12383 conftest$ac_exeext conftest.$ac_ext
12384LIBS=$ac_check_lib_save_LIBS
0ca10bb7 12385fi
ae1362a3
AS
12386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
12387$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
12388if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
0ca10bb7 12389 cat >>confdefs.h <<_ACEOF
ae1362a3 12390#define HAVE_LIBDES425 1
0ca10bb7
RC
12391_ACEOF
12392
ae1362a3 12393 LIBS="-ldes425 $LIBS"
edfaf76d 12394
ae1362a3
AS
12395else
12396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
12397$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
12398if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
12399 $as_echo_n "(cached) " >&6
12400else
ae1362a3
AS
12401 ac_check_lib_save_LIBS=$LIBS
12402LIBS="-ldes $LIBS"
12403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12404/* end confdefs.h. */
edfaf76d 12405
ae1362a3
AS
12406/* Override any GCC internal prototype to avoid an error.
12407 Use char because int might match the return type of a GCC
12408 builtin and then its argument prototype would still apply. */
12409#ifdef __cplusplus
12410extern "C"
503d2be0 12411#endif
ae1362a3 12412char des_cbc_encrypt ();
19650fd6
AS
12413int
12414main ()
12415{
ae1362a3 12416return des_cbc_encrypt ();
503d2be0
AS
12417 ;
12418 return 0;
12419}
12420_ACEOF
ae1362a3
AS
12421if ac_fn_c_try_link "$LINENO"; then :
12422 ac_cv_lib_des_des_cbc_encrypt=yes
503d2be0 12423else
ae1362a3 12424 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 12425fi
ae1362a3
AS
12426rm -f core conftest.err conftest.$ac_objext \
12427 conftest$ac_exeext conftest.$ac_ext
12428LIBS=$ac_check_lib_save_LIBS
503d2be0 12429fi
ae1362a3
AS
12430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
12431$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
12432if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
12433 cat >>confdefs.h <<_ACEOF
12434#define HAVE_LIBDES 1
c0d27fcc 12435_ACEOF
48d4b120 12436
ae1362a3
AS
12437 LIBS="-ldes $LIBS"
12438
bf89cb4d 12439fi
48d4b120 12440
ae1362a3
AS
12441fi
12442
12443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
12444$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
12445if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
e9a63f04 12446 $as_echo_n "(cached) " >&6
ba4481b5 12447else
ae1362a3
AS
12448 ac_check_lib_save_LIBS=$LIBS
12449LIBS="-lkrb4 $LIBS"
12450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12451/* end confdefs.h. */
ba4481b5 12452
0ca10bb7
RC
12453/* Override any GCC internal prototype to avoid an error.
12454 Use char because int might match the return type of a GCC
12455 builtin and then its argument prototype would still apply. */
12456#ifdef __cplusplus
12457extern "C"
a3f08d9e 12458#endif
ae1362a3 12459char krb_get_cred ();
503d2be0
AS
12460int
12461main ()
12462{
ae1362a3 12463return krb_get_cred ();
503d2be0
AS
12464 ;
12465 return 0;
12466}
12467_ACEOF
ae1362a3
AS
12468if ac_fn_c_try_link "$LINENO"; then :
12469 ac_cv_lib_krb4_krb_get_cred=yes
bf89cb4d 12470else
ae1362a3 12471 ac_cv_lib_krb4_krb_get_cred=no
bf89cb4d 12472fi
ae1362a3
AS
12473rm -f core conftest.err conftest.$ac_objext \
12474 conftest$ac_exeext conftest.$ac_ext
12475LIBS=$ac_check_lib_save_LIBS
c0d27fcc 12476fi
ae1362a3
AS
12477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
12478$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
12479if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
12480 cat >>confdefs.h <<_ACEOF
12481#define HAVE_LIBKRB4 1
bf89cb4d 12482_ACEOF
bf89cb4d 12483
ae1362a3 12484 LIBS="-lkrb4 $LIBS"
c0d27fcc 12485
bf89cb4d 12486else
ae1362a3
AS
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
12488$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
12489if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
bf89cb4d 12490 $as_echo_n "(cached) " >&6
bf89cb4d 12491else
ae1362a3
AS
12492 ac_check_lib_save_LIBS=$LIBS
12493LIBS="-lkrb $LIBS"
12494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12495/* end confdefs.h. */
ba4481b5 12496
ae1362a3
AS
12497/* Override any GCC internal prototype to avoid an error.
12498 Use char because int might match the return type of a GCC
12499 builtin and then its argument prototype would still apply. */
12500#ifdef __cplusplus
12501extern "C"
12502#endif
12503char krb_get_cred ();
12504int
12505main ()
12506{
12507return krb_get_cred ();
12508 ;
12509 return 0;
12510}
12511_ACEOF
12512if ac_fn_c_try_link "$LINENO"; then :
12513 ac_cv_lib_krb_krb_get_cred=yes
12514else
12515 ac_cv_lib_krb_krb_get_cred=no
ba4481b5 12516fi
ae1362a3
AS
12517rm -f core conftest.err conftest.$ac_objext \
12518 conftest$ac_exeext conftest.$ac_ext
12519LIBS=$ac_check_lib_save_LIBS
12520fi
12521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
12522$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
12523if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
12524 cat >>confdefs.h <<_ACEOF
12525#define HAVE_LIBKRB 1
12526_ACEOF
0ca10bb7 12527
ae1362a3 12528 LIBS="-lkrb $LIBS"
2d2b6695 12529
2d2b6695 12530fi
2d2b6695 12531
2d2b6695 12532fi
ca81d7a0 12533
ae1362a3 12534 fi
ca81d7a0 12535
ae1362a3
AS
12536 if test "${with_kerberos5}" != no; then
12537 for ac_header in krb5.h
12538do :
12539 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
12540if test "x$ac_cv_header_krb5_h" = x""yes; then :
12541 cat >>confdefs.h <<_ACEOF
12542#define HAVE_KRB5_H 1
12543_ACEOF
12544 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
12545"
12546if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
0ca10bb7 12547
ae1362a3
AS
12548cat >>confdefs.h <<_ACEOF
12549#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 12550_ACEOF
2d2b6695 12551
ae1362a3 12552
2d2b6695 12553fi
ae1362a3
AS
12554ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
12555"
12556if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
12557
12558cat >>confdefs.h <<_ACEOF
12559#define HAVE_KRB5_ERROR_E_TEXT 1
12560_ACEOF
0ca10bb7 12561
0ca10bb7 12562
bf89cb4d 12563fi
2d2b6695
KS
12564
12565fi
12566
ae1362a3 12567done
b936fae4 12568
ae1362a3
AS
12569 else
12570 for ac_header in des.h
12571do :
12572 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
12573if test "x$ac_cv_header_des_h" = x""yes; then :
12574 cat >>confdefs.h <<_ACEOF
12575#define HAVE_DES_H 1
bf89cb4d 12576_ACEOF
ae1362a3
AS
12577
12578else
12579 for ac_header in kerberosIV/des.h
12580do :
12581 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
12582if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
12583 cat >>confdefs.h <<_ACEOF
12584#define HAVE_KERBEROSIV_DES_H 1
c0d27fcc 12585_ACEOF
ae1362a3 12586
bf89cb4d 12587else
ae1362a3
AS
12588 for ac_header in kerberos/des.h
12589do :
12590 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
12591if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
12592 cat >>confdefs.h <<_ACEOF
12593#define HAVE_KERBEROS_DES_H 1
12594_ACEOF
3d9fec71 12595
3d9fec71
DL
12596fi
12597
ae1362a3 12598done
0ca10bb7 12599
0ca10bb7 12600fi
ae1362a3
AS
12601
12602done
bf89cb4d 12603
0ca10bb7 12604fi
ae1362a3
AS
12605
12606done
12607
12608 for ac_header in krb.h
12609do :
12610 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
12611if test "x$ac_cv_header_krb_h" = x""yes; then :
0ca10bb7 12612 cat >>confdefs.h <<_ACEOF
ae1362a3
AS
12613#define HAVE_KRB_H 1
12614_ACEOF
12615
12616else
12617 for ac_header in kerberosIV/krb.h
12618do :
12619 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
12620if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
12621 cat >>confdefs.h <<_ACEOF
12622#define HAVE_KERBEROSIV_KRB_H 1
12623_ACEOF
12624
12625else
12626 for ac_header in kerberos/krb.h
12627do :
12628 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
12629if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
12630 cat >>confdefs.h <<_ACEOF
12631#define HAVE_KERBEROS_KRB_H 1
e9a63f04 12632_ACEOF
0ca10bb7 12633
0ca10bb7
RC
12634fi
12635
bf89cb4d 12636done
0ca10bb7 12637
ae1362a3 12638fi
0ca10bb7 12639
ae1362a3 12640done
0ca10bb7
RC
12641
12642fi
12643
ae1362a3 12644done
bf89cb4d 12645
ae1362a3
AS
12646 fi
12647 for ac_header in com_err.h
12648do :
12649 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
12650if test "x$ac_cv_header_com_err_h" = x""yes; then :
12651 cat >>confdefs.h <<_ACEOF
12652#define HAVE_COM_ERR_H 1
0ca10bb7
RC
12653_ACEOF
12654
12655fi
0ca10bb7 12656
ae1362a3
AS
12657done
12658
12659fi
12660
12661# Solaris requires -lintl if you want strerror (which calls dgettext)
12662# to return localized messages.
12663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
12664$as_echo_n "checking for dgettext in -lintl... " >&6; }
12665if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
0ca10bb7
RC
12666 $as_echo_n "(cached) " >&6
12667else
ae1362a3
AS
12668 ac_check_lib_save_LIBS=$LIBS
12669LIBS="-lintl $LIBS"
12670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12671/* end confdefs.h. */
ae1362a3
AS
12672
12673/* Override any GCC internal prototype to avoid an error.
12674 Use char because int might match the return type of a GCC
12675 builtin and then its argument prototype would still apply. */
12676#ifdef __cplusplus
12677extern "C"
12678#endif
12679char dgettext ();
e9a63f04
GM
12680int
12681main ()
12682{
ae1362a3 12683return dgettext ();
bf89cb4d
GM
12684 ;
12685 return 0;
12686}
12687_ACEOF
ae1362a3
AS
12688if ac_fn_c_try_link "$LINENO"; then :
12689 ac_cv_lib_intl_dgettext=yes
12690else
12691 ac_cv_lib_intl_dgettext=no
12692fi
12693rm -f core conftest.err conftest.$ac_objext \
12694 conftest$ac_exeext conftest.$ac_ext
12695LIBS=$ac_check_lib_save_LIBS
12696fi
12697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
12698$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
12699if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
12700 cat >>confdefs.h <<_ACEOF
12701#define HAVE_LIBINTL 1
bf89cb4d 12702_ACEOF
ae1362a3
AS
12703
12704 LIBS="-lintl $LIBS"
12705
12706fi
12707
12708
12709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
12710$as_echo_n "checking whether localtime caches TZ... " >&6; }
12711if test "${emacs_cv_localtime_cache+set}" = set; then :
12712 $as_echo_n "(cached) " >&6
12713else
12714 if test x$ac_cv_func_tzset = xyes; then
12715if test "$cross_compiling" = yes; then :
12716 # If we have tzset, assume the worst when cross-compiling.
12717emacs_cv_localtime_cache=yes
12718else
12719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12720/* end confdefs.h. */
ae1362a3
AS
12721#include <time.h>
12722extern char **environ;
12723unset_TZ ()
bf89cb4d 12724{
ae1362a3
AS
12725 char **from, **to;
12726 for (to = from = environ; (*to = *from); from++)
12727 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
12728 to++;
12729}
12730char TZ_GMT0[] = "TZ=GMT0";
12731char TZ_PST8[] = "TZ=PST8";
12732main()
12733{
12734 time_t now = time ((time_t *) 0);
12735 int hour_GMT0, hour_unset;
12736 if (putenv (TZ_GMT0) != 0)
12737 exit (1);
12738 hour_GMT0 = localtime (&now)->tm_hour;
12739 unset_TZ ();
12740 hour_unset = localtime (&now)->tm_hour;
12741 if (putenv (TZ_PST8) != 0)
12742 exit (1);
12743 if (localtime (&now)->tm_hour == hour_GMT0)
12744 exit (1);
12745 unset_TZ ();
12746 if (localtime (&now)->tm_hour != hour_unset)
12747 exit (1);
12748 exit (0);
503d2be0
AS
12749}
12750_ACEOF
ae1362a3
AS
12751if ac_fn_c_try_run "$LINENO"; then :
12752 emacs_cv_localtime_cache=no
12753else
12754 emacs_cv_localtime_cache=yes
12755fi
12756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12757 conftest.$ac_objext conftest.beam conftest.$ac_ext
12758fi
12759
12760else
12761 # If we lack tzset, report that localtime does not cache TZ,
12762 # since we can't invalidate the cache if we don't have tzset.
12763 emacs_cv_localtime_cache=no
12764fi
12765fi
12766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
12767$as_echo "$emacs_cv_localtime_cache" >&6; }
12768if test $emacs_cv_localtime_cache = yes; then
12769
12770$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
12771
12772fi
12773
12774if test "x$HAVE_TIMEVAL" = xyes; then
12775 for ac_func in gettimeofday
12776do :
12777 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
12778if test "x$ac_cv_func_gettimeofday" = x""yes; then :
12779 cat >>confdefs.h <<_ACEOF
12780#define HAVE_GETTIMEOFDAY 1
12781_ACEOF
12782
12783fi
12784done
12785
12786 if test $ac_cv_func_gettimeofday = yes; then
12787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
12788$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
12789if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
12790 $as_echo_n "(cached) " >&6
12791else
12792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12793/* end confdefs.h. */
12794
12795#ifdef TIME_WITH_SYS_TIME
12796#include <sys/time.h>
12797#include <time.h>
12798#else
12799#ifdef HAVE_SYS_TIME_H
12800#include <sys/time.h>
12801#else
12802#include <time.h>
12803#endif
12804#endif
12805int
12806main ()
12807{
12808struct timeval time;
12809 gettimeofday (&time, 0);
12810 ;
12811 return 0;
12812}
12813_ACEOF
12814if ac_fn_c_try_compile "$LINENO"; then :
12815 emacs_cv_gettimeofday_two_arguments=yes
e9a63f04 12816else
ae1362a3 12817 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 12818fi
e9a63f04 12819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ae1362a3
AS
12820fi
12821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
12822$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
12823 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 12824
ae1362a3 12825$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 12826
ae1362a3
AS
12827 fi
12828 fi
647847ea 12829fi
ca81d7a0 12830
ae1362a3
AS
12831ok_so_far=yes
12832ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
12833if test "x$ac_cv_func_socket" = x""yes; then :
12834
bf89cb4d 12835else
ae1362a3
AS
12836 ok_so_far=no
12837fi
503d2be0 12838
ae1362a3
AS
12839if test $ok_so_far = yes; then
12840 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
12841if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
647847ea 12842
ae1362a3
AS
12843else
12844 ok_so_far=no
647847ea
DL
12845fi
12846
c0d27fcc 12847
c0d27fcc 12848fi
ae1362a3
AS
12849if test $ok_so_far = yes; then
12850 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
12851if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
bf89cb4d 12852
ae1362a3
AS
12853else
12854 ok_so_far=no
c0d27fcc 12855fi
ca81d7a0 12856
19650fd6 12857
647847ea 12858fi
ae1362a3 12859if test $ok_so_far = yes; then
ca81d7a0 12860
ae1362a3 12861$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
ca81d7a0 12862
647847ea 12863fi
c0d27fcc 12864
ae1362a3
AS
12865for ac_header in sys/ioctl.h
12866do :
12867 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
12868if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 12869 cat >>confdefs.h <<_ACEOF
ae1362a3 12870#define HAVE_SYS_IOCTL_H 1
c0d27fcc 12871_ACEOF
647847ea 12872
73b77ee5 12873fi
c0d27fcc 12874
503d2be0 12875done
73b77ee5 12876
c0d27fcc 12877
ae1362a3 12878if test -f /usr/lpp/X11/bin/smt.exp; then
edfaf76d 12879
ae1362a3 12880$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
0ca10bb7 12881
ae1362a3 12882fi
fa0b693c 12883
ae1362a3
AS
12884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
12885$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
12886if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
12887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12888$as_echo "yes" >&6; }
19650fd6 12889
ae1362a3 12890$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
0ca10bb7 12891
ae1362a3
AS
12892else
12893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12894$as_echo "no" >&6; }
12895fi
12896
12897ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12898if test "x$ac_cv_type_pid_t" = x""yes; then :
ca81d7a0 12899
bf89cb4d 12900else
0ca10bb7 12901
ae1362a3
AS
12902cat >>confdefs.h <<_ACEOF
12903#define pid_t int
12904_ACEOF
12905
503d2be0 12906fi
0ca10bb7 12907
ae1362a3
AS
12908for ac_header in vfork.h
12909do :
12910 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12911if test "x$ac_cv_header_vfork_h" = x""yes; then :
12912 cat >>confdefs.h <<_ACEOF
12913#define HAVE_VFORK_H 1
12914_ACEOF
12915
bf89cb4d 12916fi
ae1362a3
AS
12917
12918done
12919
12920for ac_func in fork vfork
12921do :
12922 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12923ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
1f10e750 12924if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
c0d27fcc 12925 cat >>confdefs.h <<_ACEOF
e9a63f04 12926#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 12927_ACEOF
503d2be0 12928
fa0b693c 12929fi
503d2be0 12930done
fa0b693c 12931
503d2be0 12932if test "x$ac_cv_func_fork" = xyes; then
ae1362a3 12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
e9a63f04 12934$as_echo_n "checking for working fork... " >&6; }
ae1362a3 12935if test "${ac_cv_func_fork_works+set}" = set; then :
e9a63f04 12936 $as_echo_n "(cached) " >&6
fa0b693c 12937else
ae1362a3 12938 if test "$cross_compiling" = yes; then :
503d2be0
AS
12939 ac_cv_func_fork_works=cross
12940else
ae1362a3 12941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
12942/* end confdefs.h. */
12943$ac_includes_default
12944int
12945main ()
12946{
12947
12948 /* By Ruediger Kuhlmann. */
12949 return fork () < 0;
12950
12951 ;
12952 return 0;
12953}
503d2be0 12954_ACEOF
ae1362a3 12955if ac_fn_c_try_run "$LINENO"; then :
503d2be0
AS
12956 ac_cv_func_fork_works=yes
12957else
ae1362a3 12958 ac_cv_func_fork_works=no
503d2be0 12959fi
ae1362a3
AS
12960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12961 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 12962fi
ca81d7a0 12963
503d2be0 12964fi
ae1362a3 12965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
e9a63f04 12966$as_echo "$ac_cv_func_fork_works" >&6; }
503d2be0 12967
6bae0ccf
DL
12968else
12969 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
12970fi
12971if test "x$ac_cv_func_fork_works" = xcross; then
12972 case $host in
12973 *-*-amigaos* | *-*-msdosdjgpp*)
12974 # Override, as these systems have only a dummy fork() stub
12975 ac_cv_func_fork_works=no
12976 ;;
12977 *)
12978 ac_cv_func_fork_works=yes
12979 ;;
12980 esac
ae1362a3 12981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
e9a63f04 12982$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 12983fi
73b77ee5 12984ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 12985if test "x$ac_cv_func_vfork" = xyes; then
ae1362a3 12986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
e9a63f04 12987$as_echo_n "checking for working vfork... " >&6; }
ae1362a3 12988if test "${ac_cv_func_vfork_works+set}" = set; then :
e9a63f04 12989 $as_echo_n "(cached) " >&6
503d2be0 12990else
ae1362a3 12991 if test "$cross_compiling" = yes; then :
503d2be0 12992 ac_cv_func_vfork_works=cross
fa0b693c 12993else
ae1362a3 12994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12995/* end confdefs.h. */
73b77ee5 12996/* Thanks to Paul Eggert for this test. */
ca81d7a0 12997$ac_includes_default
19650fd6 12998#include <sys/wait.h>
f053c89f 12999#ifdef HAVE_VFORK_H
503d2be0 13000# include <vfork.h>
73b77ee5
GM
13001#endif
13002/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
13003 argument registers are propagated back to the parent. The compiler
13004 is told about this with #include <vfork.h>, but some compilers
13005 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13006 static variable whose address is put into a register that is
13007 clobbered by the vfork. */
19650fd6 13008static void
fa0b693c 13009#ifdef __cplusplus
73b77ee5 13010sparc_address_test (int arg)
503d2be0 13011# else
73b77ee5 13012sparc_address_test (arg) int arg;
fa0b693c 13013#endif
fa0b693c 13014{
73b77ee5
GM
13015 static pid_t child;
13016 if (!child) {
13017 child = vfork ();
13018 if (child < 0) {
13019 perror ("vfork");
13020 _exit(2);
13021 }
13022 if (!child) {
13023 arg = getpid();
13024 write(-1, "", 0);
13025 _exit (arg);
13026 }
13027 }
13028}
503d2be0
AS
13029
13030int
13031main ()
13032{
73b77ee5
GM
13033 pid_t parent = getpid ();
13034 pid_t child;
fa0b693c 13035
19650fd6 13036 sparc_address_test (0);
fa0b693c 13037
73b77ee5 13038 child = vfork ();
fa0b693c 13039
73b77ee5 13040 if (child == 0) {
503d2be0
AS
13041 /* Here is another test for sparc vfork register problems. This
13042 test uses lots of local variables, at least as many local
13043 variables as main has allocated so far including compiler
13044 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13045 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13046 reuse the register of parent for one of the local variables,
13047 since it will think that parent can't possibly be used any more
13048 in this routine. Assigning to the local variable will thus
13049 munge parent in the parent process. */
73b77ee5
GM
13050 pid_t
13051 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13052 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13053 /* Convince the compiler that p..p7 are live; otherwise, it might
13054 use the same hardware register for all 8 local variables. */
13055 if (p != p1 || p != p2 || p != p3 || p != p4
13056 || p != p5 || p != p6 || p != p7)
13057 _exit(1);
fa0b693c 13058
503d2be0
AS
13059 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13060 from child file descriptors. If the child closes a descriptor
13061 before it execs or exits, this munges the parent's descriptor
13062 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
13063 _exit(close(fileno(stdout)) != 0);
13064 } else {
13065 int status;
13066 struct stat st;
13067
13068 while (wait(&status) != child)
13069 ;
ca81d7a0 13070 return (
73b77ee5
GM
13071 /* Was there some problem with vforking? */
13072 child < 0
13073
13074 /* Did the child fail? (This shouldn't happen.) */
13075 || status
13076
13077 /* Did the vfork/compiler bug occur? */
13078 || parent != getpid()
fa0b693c 13079
73b77ee5
GM
13080 /* Did the file descriptor bug occur? */
13081 || fstat(fileno(stdout), &st) != 0
13082 );
13083 }
13084}
503d2be0 13085_ACEOF
ae1362a3 13086if ac_fn_c_try_run "$LINENO"; then :
73b77ee5 13087 ac_cv_func_vfork_works=yes
fa0b693c 13088else
ae1362a3 13089 ac_cv_func_vfork_works=no
503d2be0 13090fi
ae1362a3
AS
13091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13092 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa0b693c 13093fi
ca81d7a0 13094
fa0b693c 13095fi
ae1362a3 13096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
e9a63f04 13097$as_echo "$ac_cv_func_vfork_works" >&6; }
fa0b693c 13098
503d2be0
AS
13099fi;
13100if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 13101 ac_cv_func_vfork_works=$ac_cv_func_vfork
ae1362a3 13102 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
e9a63f04 13103$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
13104fi
13105
503d2be0
AS
13106if test "x$ac_cv_func_vfork_works" = xyes; then
13107
ae1362a3 13108$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
503d2be0
AS
13109
13110else
13111
ae1362a3 13112$as_echo "#define vfork fork" >>confdefs.h
fa0b693c
GM
13113
13114fi
503d2be0
AS
13115if test "x$ac_cv_func_fork_works" = xyes; then
13116
ae1362a3 13117$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fa0b693c 13118
503d2be0 13119fi
647847ea 13120
c0d27fcc 13121
ae1362a3 13122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
e9a63f04 13123$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
ae1362a3 13124if test "${emacs_cv_langinfo_codeset+set}" = set; then :
e9a63f04 13125 $as_echo_n "(cached) " >&6
6a3a24fa 13126else
ae1362a3 13127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13128/* end confdefs.h. */
6a3a24fa
JD
13129#include <langinfo.h>
13130int
13131main ()
13132{
13133char* cs = nl_langinfo(CODESET);
0ca10bb7
RC
13134 ;
13135 return 0;
13136}
13137_ACEOF
ae1362a3
AS
13138if ac_fn_c_try_link "$LINENO"; then :
13139 emacs_cv_langinfo_codeset=yes
bf89cb4d 13140else
ae1362a3 13141 emacs_cv_langinfo_codeset=no
0ca10bb7 13142fi
ae1362a3
AS
13143rm -f core conftest.err conftest.$ac_objext \
13144 conftest$ac_exeext conftest.$ac_ext
e9a63f04 13145
ae1362a3
AS
13146fi
13147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
13148$as_echo "$emacs_cv_langinfo_codeset" >&6; }
13149if test $emacs_cv_langinfo_codeset = yes; then
bf89cb4d 13150
ae1362a3 13151$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
e9a63f04 13152
8730a8da 13153fi
dc2933eb 13154
ae1362a3
AS
13155ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13156if test "x$ac_cv_type_size_t" = x""yes; then :
503d2be0 13157
c0d27fcc
MR
13158cat >>confdefs.h <<_ACEOF
13159#define HAVE_SIZE_T 1
13160_ACEOF
13161
8730a8da
DL
13162
13163fi
13164
c0d27fcc 13165
ae1362a3 13166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
e9a63f04 13167$as_echo_n "checking for mbstate_t... " >&6; }
ae1362a3 13168if test "${ac_cv_type_mbstate_t+set}" = set; then :
e9a63f04 13169 $as_echo_n "(cached) " >&6
973a76b1 13170else
ae1362a3 13171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13172/* end confdefs.h. */
973a76b1
DL
13173$ac_includes_default
13174# include <wchar.h>
13175int
13176main ()
13177{
13178mbstate_t x; return sizeof x;
13179 ;
13180 return 0;
13181}
13182_ACEOF
ae1362a3 13183if ac_fn_c_try_compile "$LINENO"; then :
973a76b1
DL
13184 ac_cv_type_mbstate_t=yes
13185else
ae1362a3 13186 ac_cv_type_mbstate_t=no
973a76b1 13187fi
ca81d7a0 13188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 13189fi
ae1362a3 13190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
e9a63f04 13191$as_echo "$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
13192 if test $ac_cv_type_mbstate_t = yes; then
13193
ae1362a3 13194$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
973a76b1
DL
13195
13196 else
13197
ae1362a3 13198$as_echo "#define mbstate_t int" >>confdefs.h
973a76b1
DL
13199
13200 fi
13201
ae1362a3 13202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
e9a63f04 13203$as_echo_n "checking for C restrict keyword... " >&6; }
ae1362a3 13204if test "${emacs_cv_c_restrict+set}" = set; then :
e9a63f04 13205 $as_echo_n "(cached) " >&6
22044edf 13206else
ae1362a3 13207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13208/* end confdefs.h. */
22044edf
DL
13209void fred (int *restrict x);
13210int
13211main ()
13212{
b936fae4 13213
22044edf
DL
13214 ;
13215 return 0;
13216}
c0d27fcc 13217_ACEOF
ae1362a3 13218if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13219 emacs_cv_c_restrict=yes
13220else
ae1362a3 13221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13222/* end confdefs.h. */
22044edf
DL
13223void fred (int *__restrict x);
13224int
13225main ()
13226{
c0d27fcc 13227
22044edf
DL
13228 ;
13229 return 0;
13230}
c0d27fcc 13231_ACEOF
ae1362a3 13232if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13233 emacs_cv_c_restrict=__restrict
13234else
ae1362a3 13235 emacs_cv_c_restrict=no
ba4481b5 13236fi
ca81d7a0 13237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13238fi
ca81d7a0 13239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13240fi
ae1362a3 13241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
e9a63f04 13242$as_echo "$emacs_cv_c_restrict" >&6; }
22044edf
DL
13243case "$emacs_cv_c_restrict" in
13244 yes) emacs_restrict=restrict;;
13245 no) emacs_restrict="";;
13246 *) emacs_restrict="$emacs_cv_c_restrict";;
13247esac
13248if test "$emacs_restrict" != __restrict; then
b936fae4 13249
22044edf
DL
13250cat >>confdefs.h <<_ACEOF
13251#define __restrict $emacs_restrict
c0d27fcc 13252_ACEOF
ba4481b5
DL
13253
13254fi
ba4481b5 13255
ae1362a3 13256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
e9a63f04 13257$as_echo_n "checking for C restricted array declarations... " >&6; }
ae1362a3 13258if test "${emacs_cv_c_restrict_arr+set}" = set; then :
e9a63f04 13259 $as_echo_n "(cached) " >&6
22044edf 13260else
ae1362a3 13261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13262/* end confdefs.h. */
22044edf
DL
13263void fred (int x[__restrict]);
13264int
13265main ()
13266{
b936fae4 13267
22044edf
DL
13268 ;
13269 return 0;
13270}
c0d27fcc 13271_ACEOF
ae1362a3 13272if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13273 emacs_cv_c_restrict_arr=yes
13274else
ae1362a3 13275 emacs_cv_c_restrict_arr=no
ba4481b5 13276fi
ca81d7a0 13277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 13278fi
ae1362a3 13279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
e9a63f04 13280$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22044edf 13281if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 13282
ae1362a3 13283$as_echo "#define __restrict_arr __restrict" >>confdefs.h
ba4481b5 13284
ba4481b5
DL
13285fi
13286
c0d27fcc 13287
c0d27fcc 13288
22044edf
DL
13289# Set up the CFLAGS for real compilation, so we can substitute it.
13290CFLAGS="$REAL_CFLAGS"
13291CPPFLAGS="$REAL_CPPFLAGS"
13292
9978c06c
CY
13293## Hack to detect a buggy GCC version.
13294if test "x$GCC" = xyes \
13295 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
13296 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
13297 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
1f10e750 13298 as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
9978c06c
CY
13299fi
13300
22044edf
DL
13301#### Find out which version of Emacs this is.
13302version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
13303 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
13304if test x"${version}" = x; then
1f10e750 13305 as_fn_error $? "can't find current emacs version in \`${srcdir}/lisp/version.el'." "$LINENO" 5
22044edf 13306fi
879de935 13307if test x"${version}" != x"$PACKAGE_VERSION"; then
ae1362a3 13308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&5
879de935
KR
13309$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/lisp/version.el'." >&2;}
13310fi
22044edf
DL
13311
13312### Specify what sort of things we'll be editing into Makefile and config.h.
13313### Use configuration here uncanonicalized to avoid exceeding size limits.
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
6a3a24fa 13346
06b62770
AR
13347
13348
13349
48fad8e8
DN
13350
13351
5e159d07
CY
13352
13353
edfda783 13354
91231421 13355
22044edf
DL
13356
13357
13358cat >>confdefs.h <<_ACEOF
13359#define EMACS_CONFIGURATION "${canonical}"
13360_ACEOF
13361
13362
13363cat >>confdefs.h <<_ACEOF
13364#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
13365_ACEOF
13366
13367
13368cat >>confdefs.h <<_ACEOF
13369#define config_machfile "${machfile}"
13370_ACEOF
13371
13372
13373cat >>confdefs.h <<_ACEOF
13374#define config_opsysfile "${opsysfile}"
13375_ACEOF
13376
13377
13378cat >>confdefs.h <<_ACEOF
13379#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
13380_ACEOF
13381
13382
13383cat >>confdefs.h <<_ACEOF
13384#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
13385_ACEOF
13386
13387
13388cat >>confdefs.h <<_ACEOF
13389#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
13390_ACEOF
13391
13392
13393cat >>confdefs.h <<_ACEOF
13394#define UNEXEC_SRC ${UNEXEC_SRC}
13395_ACEOF
13396
13397
13398if test "${HAVE_X_WINDOWS}" = "yes" ; then
13399
ae1362a3 13400$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
22044edf
DL
13401
13402fi
13403if test "${USE_X_TOOLKIT}" != "none" ; then
13404
ae1362a3 13405$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
22044edf 13406
39dd4d52 13407 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5 13408
ae1362a3 13409$as_echo "#define USE_LUCID 1" >>confdefs.h
73d798d5 13410
39dd4d52 13411 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5 13412
ae1362a3 13413$as_echo "#define USE_MOTIF 1" >>confdefs.h
73d798d5
SM
13414
13415 fi
22044edf
DL
13416fi
13417if test "${HAVE_X11}" = "yes" ; then
13418
ae1362a3 13419$as_echo "#define HAVE_X11 1" >>confdefs.h
22044edf 13420
22044edf
DL
13421fi
13422if test "${HAVE_MENUS}" = "yes" ; then
13423
ae1362a3 13424$as_echo "#define HAVE_MENUS 1" >>confdefs.h
22044edf
DL
13425
13426fi
13427if test "${GNU_MALLOC}" = "yes" ; then
13428
ae1362a3 13429$as_echo "#define GNU_MALLOC 1" >>confdefs.h
22044edf
DL
13430
13431fi
13432if test "${REL_ALLOC}" = "yes" ; then
13433
ae1362a3 13434$as_echo "#define REL_ALLOC 1" >>confdefs.h
22044edf
DL
13435
13436fi
13437
13438
13439
c0d27fcc 13440
ba4481b5 13441#### Report on what we decided to do.
488dd4c4
JD
13442#### Report GTK as a toolkit, even if it doesn't use Xt.
13443#### It makes printing result more understandable as using GTK sets
13444#### toolkit_scroll_bars to yes by default.
13445if test "${HAVE_GTK}" = "yes"; then
13446 USE_X_TOOLKIT=GTK
13447fi
13448
ba4481b5
DL
13449echo "
13450Configured for \`${canonical}'.
13451
13452 Where should the build process find the source code? ${srcdir}
13453 What operating system and machine description files should Emacs use?
13454 \`${opsysfile}' and \`${machfile}'
13455 What compiler should emacs be built with? ${CC} ${CFLAGS}
13456 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 13457 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 13458 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 13459 What window system should Emacs use? ${window_system}
8e967cf7 13460 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
13461
13462if test -n "${x_includes}"; then
13463echo " Where do we find X Windows header files? ${x_includes}"
13464else
13465echo " Where do we find X Windows header files? Standard dirs"
13466fi
13467if test -n "${x_libraries}"; then
13468echo " Where do we find X Windows libraries? ${x_libraries}"
13469else
13470echo " Where do we find X Windows libraries? Standard dirs"
13471fi
13472
13473echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
13474echo " Does Emacs use -lXpm? ${HAVE_XPM}"
13475echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
13476echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 13477echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 13478echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 13479echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 13480echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 13481echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
637fa988 13482echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
2ee27f27 13483
edfda783
AR
13484echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
13485echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
13486echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
13487echo " Does Emacs use -lxft? ${HAVE_XFT}"
13488
8d87199b 13489echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
13490echo
13491
d0098f13
JD
13492if test $USE_XASSERTS = yes; then
13493 echo " Compiling with asserts turned on."
d0098f13 13494 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 13495fi
05cf15c6 13496
ca34d75a
JD
13497echo
13498
06b62770
AR
13499if test "$HAVE_NS" = "yes"; then
13500 echo
13501 echo "You must run \"make install\" in order to test the built application.
13502The installed application will go to nextstep/Emacs.app and can be
13503run or moved from there."
13504 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
13505 echo "The application will be fully self-contained."
13506 else
13507 echo "The lisp resources for the application will be installed under ${prefix}.
13508You may need to run \"make install\" with sudo. The application will fail
13509to run if these resources are not installed."
13510 fi
13511 echo
13512fi
13513
05cf15c6 13514
ba4481b5
DL
13515# Remove any trailing slashes in these variables.
13516test "${prefix}" != NONE &&
13517 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
13518test "${exec_prefix}" != NONE &&
13519 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
13520
8acdcf6f
GM
13521# Now get this: Some word that is part of the ${srcdir} directory name
13522# or the ${configuration} value might, just might, happen to be an
13523# identifier like `sun4' or `i386' or something, and be predefined by
13524# the C preprocessor to some helpful value like 1, or maybe the empty
13525# string. Needless to say consequent macro substitutions are less
13526# than conducive to the makefile finding the correct directory.
ae1362a3 13527cpp_undefs="`echo $srcdir $configuration $canonical unix |
8acdcf6f
GM
13528 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
13529 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
13530
d0e9bfd2
GM
13531## Check if the C preprocessor will convert `..' to `. .'. If so, set
13532## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
13533## from Makefile.c can correctly provide the arg `-traditional' to the
13534## C preprocessor.
13535
ae1362a3 13536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13537/* end confdefs.h. */
d0e9bfd2 13538yes..yes
503d2be0 13539_ACEOF
d0e9bfd2 13540if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ae1362a3 13541 $EGREP "yes..yes" >/dev/null 2>&1; then :
d0e9bfd2
GM
13542 CPP_NEED_TRADITIONAL=no
13543else
d0e9bfd2
GM
13544 CPP_NEED_TRADITIONAL=yes
13545fi
13546rm -f conftest*
13547
c0d27fcc 13548
f657c21b 13549ac_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
13550
13551ac_config_commands="$ac_config_commands default"
13552
503d2be0 13553cat >confcache <<\_ACEOF
ba4481b5
DL
13554# This file is a shell script that caches the results of configure
13555# tests run on this system so they can be shared between configure
503d2be0
AS
13556# scripts and configure runs, see configure's option --config-cache.
13557# It is not useful on other systems. If it contains results you don't
13558# want to keep, you may remove or edit it.
ba4481b5 13559#
503d2be0
AS
13560# config.status only pays attention to the cache file if you give it
13561# the --recheck option to rerun configure.
ba4481b5 13562#
6bae0ccf 13563# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
13564# loading this file, other *unset* `ac_cv_foo' will be assigned the
13565# following values.
13566
13567_ACEOF
13568
ba4481b5
DL
13569# The following way of writing the cache mishandles newlines in values,
13570# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 13571# So, we kill variables containing newlines.
ba4481b5
DL
13572# Ultrix sh set writes to stderr and can't be redirected directly,
13573# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
13574(
13575 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13576 eval ac_val=\$$ac_var
13577 case $ac_val in #(
13578 *${as_nl}*)
13579 case $ac_var in #(
ae1362a3
AS
13580 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13581$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
13582 esac
13583 case $ac_var in #(
13584 _ | IFS | as_nl) ;; #(
e9a63f04 13585 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
ae1362a3 13586 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
13587 esac ;;
13588 esac
13589 done
13590
503d2be0 13591 (set) 2>&1 |
ca81d7a0
JD
13592 case $as_nl`(ac_space=' '; set) 2>&1` in #(
13593 *${as_nl}ac_space=\ *)
ae1362a3
AS
13594 # `set' does not quote correctly, so add quotes: double-quote
13595 # substitution turns \\\\ into \\, and sed turns \\ into \.
503d2be0 13596 sed -n \
edfaf76d
LK
13597 "s/'/'\\\\''/g;
13598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 13599 ;; #(
503d2be0
AS
13600 *)
13601 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 13602 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 13603 ;;
ca81d7a0
JD
13604 esac |
13605 sort
13606) |
503d2be0 13607 sed '
ca81d7a0 13608 /^ac_cv_env_/b end
503d2be0 13609 t clear
ca81d7a0 13610 :clear
503d2be0
AS
13611 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13612 t end
ca81d7a0
JD
13613 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13614 :end' >>confcache
13615if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13616 if test -w "$cache_file"; then
13617 test "x$cache_file" != "x/dev/null" &&
ae1362a3 13618 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
e9a63f04 13619$as_echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 13620 cat confcache >$cache_file
ba4481b5 13621 else
ae1362a3 13622 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
e9a63f04 13623$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
13624 fi
13625fi
13626rm -f confcache
13627
ba4481b5
DL
13628test "x$prefix" = xNONE && prefix=$ac_default_prefix
13629# Let make expand exec_prefix.
13630test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13631
ba4481b5
DL
13632DEFS=-DHAVE_CONFIG_H
13633
6bae0ccf
DL
13634ac_libobjs=
13635ac_ltlibobjs=
1f10e750 13636U=
6bae0ccf
DL
13637for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
13638 # 1. Remove the extension, and $U if already installed.
ca81d7a0 13639 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 13640 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
13641 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
13642 # will be set to the directory where LIBOBJS objects are built.
ae1362a3
AS
13643 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
13644 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
13645done
13646LIBOBJS=$ac_libobjs
13647
13648LTLIBOBJS=$ac_ltlibobjs
13649
13650
c0d27fcc 13651
ba4481b5 13652: ${CONFIG_STATUS=./config.status}
e9a63f04 13653ac_write_fail=0
503d2be0
AS
13654ac_clean_files_save=$ac_clean_files
13655ac_clean_files="$ac_clean_files $CONFIG_STATUS"
ae1362a3 13656{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 13657$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
ae1362a3
AS
13658as_write_fail=0
13659cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 13660#! $SHELL
c0d27fcc 13661# Generated by $as_me.
ba4481b5 13662# Run this file to recreate the current configuration.
ba4481b5 13663# Compiler output produced by configure, useful for debugging
503d2be0 13664# configure, is in config.log if it exists.
ba4481b5 13665
503d2be0 13666debug=false
19650fd6
AS
13667ac_cs_recheck=false
13668ac_cs_silent=false
bf89cb4d 13669
ae1362a3
AS
13670SHELL=\${CONFIG_SHELL-$SHELL}
13671export SHELL
13672_ASEOF
13673cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
13674## -------------------- ##
13675## M4sh Initialization. ##
13676## -------------------- ##
c0d27fcc 13677
f053c89f
CY
13678# Be more Bourne compatible
13679DUALCASE=1; export DUALCASE # for MKS sh
ae1362a3 13680if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
13681 emulate sh
13682 NULLCMD=:
e9a63f04 13683 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
13684 # is contrary to our usage. Disable this feature.
13685 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
13686 setopt NO_GLOB_SUBST
13687else
ae1362a3
AS
13688 case `(set -o) 2>/dev/null` in #(
13689 *posix*) :
13690 set -o posix ;; #(
13691 *) :
13692 ;;
f053c89f 13693esac
503d2be0 13694fi
f053c89f
CY
13695
13696
e9a63f04
GM
13697as_nl='
13698'
13699export as_nl
13700# Printing a long string crashes Solaris 7 /usr/bin/printf.
13701as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
13702as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
13703as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
ae1362a3
AS
13704# Prefer a ksh shell builtin over an external printf program on Solaris,
13705# but without wasting forks for bash or zsh.
13706if test -z "$BASH_VERSION$ZSH_VERSION" \
13707 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
13708 as_echo='print -r --'
13709 as_echo_n='print -rn --'
13710elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
13711 as_echo='printf %s\n'
13712 as_echo_n='printf %s'
13713else
13714 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
13715 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
13716 as_echo_n='/usr/ucb/echo -n'
7bbec45b 13717 else
e9a63f04
GM
13718 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
13719 as_echo_n_body='eval
13720 arg=$1;
ae1362a3 13721 case $arg in #(
e9a63f04
GM
13722 *"$as_nl"*)
13723 expr "X$arg" : "X\\(.*\\)$as_nl";
13724 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
13725 esac;
13726 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
13727 '
13728 export as_echo_n_body
13729 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 13730 fi
e9a63f04
GM
13731 export as_echo_body
13732 as_echo='sh -c $as_echo_body as_echo'
13733fi
13734
13735# The user is always right.
13736if test "${PATH_SEPARATOR+set}" != set; then
13737 PATH_SEPARATOR=:
13738 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
13739 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
13740 PATH_SEPARATOR=';'
13741 }
503d2be0
AS
13742fi
13743
6bae0ccf 13744
ca81d7a0
JD
13745# IFS
13746# We need space, tab and new line, in precisely that order. Quoting is
13747# there to prevent editors from complaining about space-tab.
13748# (If _AS_PATH_WALK were called with IFS unset, it would disable word
13749# splitting by setting IFS to empty value.)
ca81d7a0
JD
13750IFS=" "" $as_nl"
13751
13752# Find who we are. Look in the path if we contain no directory separator.
ae1362a3 13753case $0 in #((
ca81d7a0
JD
13754 *[\\/]* ) as_myself=$0 ;;
13755 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13756for as_dir in $PATH
13757do
13758 IFS=$as_save_IFS
13759 test -z "$as_dir" && as_dir=.
ae1362a3
AS
13760 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
13761 done
ca81d7a0
JD
13762IFS=$as_save_IFS
13763
13764 ;;
13765esac
13766# We did not find ourselves, most probably we were run as `sh COMMAND'
13767# in which case we are not to be found in the path.
13768if test "x$as_myself" = x; then
13769 as_myself=$0
13770fi
13771if test ! -f "$as_myself"; then
e9a63f04 13772 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
ae1362a3 13773 exit 1
ca81d7a0
JD
13774fi
13775
ae1362a3
AS
13776# Unset variables that we do not need and which cause bugs (e.g. in
13777# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
13778# suppresses any "Segmentation fault" message there. '((' could
13779# trigger a bug in pdksh 5.2.14.
13780for as_var in BASH_ENV ENV MAIL MAILPATH
13781do eval test x\${$as_var+set} = xset \
13782 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 13783done
6bae0ccf
DL
13784PS1='$ '
13785PS2='> '
13786PS4='+ '
13787
13788# NLS nuisances.
e9a63f04
GM
13789LC_ALL=C
13790export LC_ALL
13791LANGUAGE=C
13792export LANGUAGE
6bae0ccf 13793
ae1362a3
AS
13794# CDPATH.
13795(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
13796
13797
1f10e750
CY
13798# as_fn_error STATUS ERROR [LINENO LOG_FD]
13799# ----------------------------------------
ae1362a3
AS
13800# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
13801# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
1f10e750 13802# script with STATUS, using 1 if that was 0.
ae1362a3
AS
13803as_fn_error ()
13804{
1f10e750
CY
13805 as_status=$1; test $as_status -eq 0 && as_status=1
13806 if test "$4"; then
13807 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
13808 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
ae1362a3 13809 fi
1f10e750 13810 $as_echo "$as_me: error: $2" >&2
ae1362a3
AS
13811 as_fn_exit $as_status
13812} # as_fn_error
13813
13814
13815# as_fn_set_status STATUS
13816# -----------------------
13817# Set $? to STATUS, without forking.
13818as_fn_set_status ()
13819{
13820 return $1
13821} # as_fn_set_status
13822
13823# as_fn_exit STATUS
13824# -----------------
13825# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
13826as_fn_exit ()
13827{
13828 set +e
13829 as_fn_set_status $1
13830 exit $1
13831} # as_fn_exit
13832
13833# as_fn_unset VAR
13834# ---------------
13835# Portably unset VAR.
13836as_fn_unset ()
13837{
13838 { eval $1=; unset $1;}
13839}
13840as_unset=as_fn_unset
13841# as_fn_append VAR VALUE
13842# ----------------------
13843# Append the text in VALUE to the end of the definition contained in VAR. Take
13844# advantage of any shell optimizations that allow amortized linear growth over
13845# repeated appends, instead of the typical quadratic growth present in naive
13846# implementations.
13847if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
13848 eval 'as_fn_append ()
13849 {
13850 eval $1+=\$2
13851 }'
13852else
13853 as_fn_append ()
13854 {
13855 eval $1=\$$1\$2
13856 }
13857fi # as_fn_append
13858
13859# as_fn_arith ARG...
13860# ------------------
13861# Perform arithmetic evaluation on the ARGs, and store the result in the
13862# global $as_val. Take advantage of shells that can avoid forks. The arguments
13863# must be portable across $(()) and expr.
13864if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
13865 eval 'as_fn_arith ()
13866 {
13867 as_val=$(( $* ))
13868 }'
13869else
13870 as_fn_arith ()
13871 {
13872 as_val=`expr "$@" || test $? -eq 1`
13873 }
13874fi # as_fn_arith
13875
13876
ca81d7a0
JD
13877if expr a : '\(a\)' >/dev/null 2>&1 &&
13878 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
13879 as_expr=expr
13880else
13881 as_expr=false
13882fi
13883
ca81d7a0 13884if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
13885 as_basename=basename
13886else
13887 as_basename=false
13888fi
c0d27fcc 13889
ae1362a3
AS
13890if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
13891 as_dirname=dirname
13892else
13893 as_dirname=false
13894fi
c0d27fcc 13895
ca81d7a0 13896as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
13897$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
13898 X"$0" : 'X\(//\)$' \| \
ca81d7a0 13899 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 13900$as_echo X/"$0" |
ca81d7a0
JD
13901 sed '/^.*\/\([^/][^/]*\)\/*$/{
13902 s//\1/
13903 q
13904 }
13905 /^X\/\(\/\/\)$/{
13906 s//\1/
13907 q
13908 }
13909 /^X\/\(\/\).*/{
13910 s//\1/
13911 q
13912 }
13913 s/.*/./; q'`
c0d27fcc 13914
ae1362a3
AS
13915# Avoid depending upon Character Ranges.
13916as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13917as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13918as_cr_Letters=$as_cr_letters$as_cr_LETTERS
13919as_cr_digits='0123456789'
13920as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
13921
13922ECHO_C= ECHO_N= ECHO_T=
ae1362a3 13923case `echo -n x` in #(((((
ca81d7a0 13924-n*)
ae1362a3 13925 case `echo 'xy\c'` in
ca81d7a0 13926 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
ae1362a3
AS
13927 xy) ECHO_C='\c';;
13928 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
13929 ECHO_T=' ';;
ca81d7a0
JD
13930 esac;;
13931*)
13932 ECHO_N='-n';;
c0d27fcc 13933esac
503d2be0
AS
13934
13935rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
13936if test -d conf$$.dir; then
13937 rm -f conf$$.dir/conf$$.file
13938else
13939 rm -f conf$$.dir
e9a63f04
GM
13940 mkdir conf$$.dir 2>/dev/null
13941fi
13942if (echo >conf$$.file) 2>/dev/null; then
13943 if ln -s conf$$.file conf$$ 2>/dev/null; then
13944 as_ln_s='ln -s'
13945 # ... but there are two gotchas:
13946 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
13947 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
13948 # In both cases, we have to default to `cp -p'.
13949 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
13950 as_ln_s='cp -p'
13951 elif ln conf$$.file conf$$ 2>/dev/null; then
13952 as_ln_s=ln
13953 else
503d2be0 13954 as_ln_s='cp -p'
e9a63f04 13955 fi
503d2be0
AS
13956else
13957 as_ln_s='cp -p'
13958fi
ca81d7a0
JD
13959rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
13960rmdir conf$$.dir 2>/dev/null
503d2be0 13961
ae1362a3
AS
13962
13963# as_fn_mkdir_p
13964# -------------
13965# Create "$as_dir" as a directory, including parents if necessary.
13966as_fn_mkdir_p ()
13967{
13968
13969 case $as_dir in #(
13970 -*) as_dir=./$as_dir;;
13971 esac
13972 test -d "$as_dir" || eval $as_mkdir_p || {
13973 as_dirs=
13974 while :; do
13975 case $as_dir in #(
13976 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
13977 *) as_qdir=$as_dir;;
13978 esac
13979 as_dirs="'$as_qdir' $as_dirs"
13980 as_dir=`$as_dirname -- "$as_dir" ||
13981$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
13982 X"$as_dir" : 'X\(//\)[^/]' \| \
13983 X"$as_dir" : 'X\(//\)$' \| \
13984 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
13985$as_echo X"$as_dir" |
13986 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
13987 s//\1/
13988 q
13989 }
13990 /^X\(\/\/\)[^/].*/{
13991 s//\1/
13992 q
13993 }
13994 /^X\(\/\/\)$/{
13995 s//\1/
13996 q
13997 }
13998 /^X\(\/\).*/{
13999 s//\1/
14000 q
14001 }
14002 s/.*/./; q'`
14003 test -d "$as_dir" && break
14004 done
14005 test -z "$as_dirs" || eval "mkdir $as_dirs"
1f10e750 14006 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
ae1362a3
AS
14007
14008
14009} # as_fn_mkdir_p
6bae0ccf 14010if mkdir -p . 2>/dev/null; then
ae1362a3 14011 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 14012else
edfaf76d 14013 test -d ./-p && rmdir ./-p
6bae0ccf
DL
14014 as_mkdir_p=false
14015fi
14016
f053c89f
CY
14017if test -x / >/dev/null 2>&1; then
14018 as_test_x='test -x'
ca81d7a0 14019else
f053c89f
CY
14020 if ls -dL / >/dev/null 2>&1; then
14021 as_ls_L_option=L
14022 else
14023 as_ls_L_option=
14024 fi
14025 as_test_x='
14026 eval sh -c '\''
14027 if test -d "$1"; then
e9a63f04 14028 test -d "$1/.";
f053c89f 14029 else
ae1362a3 14030 case $1 in #(
e9a63f04 14031 -*)set "./$1";;
f053c89f 14032 esac;
ae1362a3 14033 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
14034 ???[sx]*):;;*)false;;esac;fi
14035 '\'' sh
14036 '
ca81d7a0 14037fi
f053c89f 14038as_executable_p=$as_test_x
503d2be0 14039
c0d27fcc 14040# Sed expression to map a string onto a valid CPP name.
edfaf76d 14041as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
14042
14043# Sed expression to map a string onto a valid variable name.
edfaf76d 14044as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 14045
503d2be0 14046
503d2be0 14047exec 6>&1
ae1362a3
AS
14048## ----------------------------------- ##
14049## Main body of $CONFIG_STATUS script. ##
14050## ----------------------------------- ##
14051_ASEOF
14052test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 14053
ae1362a3
AS
14054cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14055# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 14056# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
14057# values after options handling.
14058ac_log="
22770c84 14059This file was extended by emacs $as_me 23.3, which was
1f10e750 14060generated by GNU Autoconf 2.67. Invocation command line was
c0d27fcc
MR
14061
14062 CONFIG_FILES = $CONFIG_FILES
14063 CONFIG_HEADERS = $CONFIG_HEADERS
14064 CONFIG_LINKS = $CONFIG_LINKS
14065 CONFIG_COMMANDS = $CONFIG_COMMANDS
14066 $ $0 $@
14067
ca81d7a0
JD
14068on `(hostname || uname -n) 2>/dev/null | sed 1q`
14069"
14070
503d2be0
AS
14071_ACEOF
14072
ae1362a3
AS
14073case $ac_config_files in *"
14074"*) set x $ac_config_files; shift; ac_config_files=$*;;
14075esac
14076
14077case $ac_config_headers in *"
14078"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14079esac
14080
14081
e9a63f04 14082cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14083# Files that config.status was made for.
ca81d7a0
JD
14084config_files="$ac_config_files"
14085config_headers="$ac_config_headers"
14086config_commands="$ac_config_commands"
503d2be0 14087
ca81d7a0 14088_ACEOF
503d2be0 14089
e9a63f04 14090cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 14091ac_cs_usage="\
ae1362a3
AS
14092\`$as_me' instantiates files and other configuration actions
14093from templates according to the current configuration. Unless the files
14094and actions are specified as TAGs, all are instantiated by default.
503d2be0 14095
ae1362a3 14096Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
14097
14098 -h, --help print this help, then exit
f053c89f 14099 -V, --version print version number and configuration settings, then exit
ae1362a3
AS
14100 --config print configuration, then exit
14101 -q, --quiet, --silent
14102 do not print progress messages
503d2be0
AS
14103 -d, --debug don't remove temporary files
14104 --recheck update $as_me by reconfiguring in the same conditions
ae1362a3 14105 --file=FILE[:TEMPLATE]
e9a63f04 14106 instantiate the configuration file FILE
ae1362a3 14107 --header=FILE[:TEMPLATE]
e9a63f04 14108 instantiate the configuration header FILE
503d2be0
AS
14109
14110Configuration files:
14111$config_files
14112
14113Configuration headers:
14114$config_headers
14115
14116Configuration commands:
14117$config_commands
14118
ae1362a3 14119Report bugs to the package provider."
503d2be0 14120
ca81d7a0 14121_ACEOF
e9a63f04 14122cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ae1362a3 14123ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 14124ac_cs_version="\\
22770c84 14125emacs config.status 23.3
1f10e750 14126configured by $0, generated by GNU Autoconf 2.67,
ae1362a3 14127 with options \\"\$ac_cs_config\\"
503d2be0 14128
1f10e750 14129Copyright (C) 2010 Free Software Foundation, Inc.
503d2be0
AS
14130This config.status script is free software; the Free Software Foundation
14131gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
14132
14133ac_pwd='$ac_pwd'
14134srcdir='$srcdir'
14135INSTALL='$INSTALL'
e9a63f04 14136test -n "\$AWK" || AWK=awk
c0d27fcc 14137_ACEOF
503d2be0 14138
e9a63f04
GM
14139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14140# The default lists apply if the user does not specify any file.
503d2be0
AS
14141ac_need_defaults=:
14142while test $# != 0
ba4481b5 14143do
503d2be0 14144 case $1 in
1f10e750 14145 --*=?*)
ca81d7a0
JD
14146 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14147 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
14148 ac_shift=:
14149 ;;
1f10e750
CY
14150 --*=)
14151 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14152 ac_optarg=
14153 ac_shift=:
14154 ;;
ca81d7a0 14155 *)
6bae0ccf
DL
14156 ac_option=$1
14157 ac_optarg=$2
14158 ac_shift=shift
503d2be0 14159 ;;
503d2be0
AS
14160 esac
14161
6bae0ccf 14162 case $ac_option in
503d2be0 14163 # Handling of the options.
19650fd6
AS
14164 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14165 ac_cs_recheck=: ;;
ca81d7a0 14166 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 14167 $as_echo "$ac_cs_version"; exit ;;
ae1362a3
AS
14168 --config | --confi | --conf | --con | --co | --c )
14169 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 14170 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
14171 debug=: ;;
14172 --file | --fil | --fi | --f )
6bae0ccf 14173 $ac_shift
e9a63f04
GM
14174 case $ac_optarg in
14175 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
1f10e750 14176 '') as_fn_error $? "missing file argument" ;;
e9a63f04 14177 esac
ae1362a3 14178 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
14179 ac_need_defaults=false;;
14180 --header | --heade | --head | --hea )
6bae0ccf 14181 $ac_shift
e9a63f04
GM
14182 case $ac_optarg in
14183 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14184 esac
ae1362a3 14185 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 14186 ac_need_defaults=false;;
ca81d7a0
JD
14187 --he | --h)
14188 # Conflict between --help and --header
1f10e750 14189 as_fn_error $? "ambiguous option: \`$1'
ae1362a3 14190Try \`$0 --help' for more information.";;
ca81d7a0 14191 --help | --hel | -h )
e9a63f04 14192 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
14193 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14194 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14195 ac_cs_silent=: ;;
503d2be0
AS
14196
14197 # This is an error.
1f10e750 14198 -*) as_fn_error $? "unrecognized option: \`$1'
ae1362a3 14199Try \`$0 --help' for more information." ;;
503d2be0 14200
ae1362a3 14201 *) as_fn_append ac_config_targets " $1"
ca81d7a0 14202 ac_need_defaults=false ;;
503d2be0 14203
ba4481b5 14204 esac
503d2be0 14205 shift
ba4481b5
DL
14206done
14207
19650fd6
AS
14208ac_configure_extra_args=
14209
14210if $ac_cs_silent; then
14211 exec 6>/dev/null
14212 ac_configure_extra_args="$ac_configure_extra_args --silent"
14213fi
14214
14215_ACEOF
e9a63f04 14216cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 14217if \$ac_cs_recheck; then
e9a63f04
GM
14218 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14219 shift
14220 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14221 CONFIG_SHELL='$SHELL'
ca81d7a0 14222 export CONFIG_SHELL
e9a63f04 14223 exec "\$@"
19650fd6
AS
14224fi
14225
503d2be0 14226_ACEOF
e9a63f04 14227cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14228exec 5>>config.log
14229{
14230 echo
14231 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14232## Running $as_me. ##
14233_ASBOX
e9a63f04 14234 $as_echo "$ac_log"
ca81d7a0 14235} >&5
ba4481b5 14236
ca81d7a0 14237_ACEOF
e9a63f04 14238cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14239#
ca81d7a0 14240# INIT-COMMANDS
503d2be0 14241#
8acdcf6f 14242GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 14243
c0d27fcc
MR
14244_ACEOF
14245
e9a63f04 14246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14247
14248# Handling of arguments.
503d2be0
AS
14249for ac_config_target in $ac_config_targets
14250do
ca81d7a0
JD
14251 case $ac_config_target in
14252 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
14253 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14254 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
14255 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
14256 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
14257 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
14258 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
14259 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 14260 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 14261 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 14262 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
14263 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
14264 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14265
1f10e750 14266 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 14267 esac
ba4481b5 14268done
503d2be0 14269
ca81d7a0 14270
503d2be0
AS
14271# If the user did not use the arguments to specify the items to instantiate,
14272# then the envvar interface is used. Set only those that are not.
14273# We use the long form for the default assignment because of an extremely
14274# bizarre bug on SunOS 4.1.3.
14275if $ac_need_defaults; then
14276 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14277 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14278 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 14279fi
503d2be0 14280
19650fd6 14281# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 14282# simply because there is no reason against having it here, and in addition,
19650fd6 14283# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
14284# Hook for its removal unless debugging.
14285# Note that there is a small window in which the directory will not be cleaned:
14286# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
14287$debug ||
14288{
ca81d7a0
JD
14289 tmp=
14290 trap 'exit_status=$?
14291 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
14292' 0
ae1362a3 14293 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 14294}
503d2be0 14295# Create a (secure) tmp directory for tmp files.
19650fd6 14296
503d2be0 14297{
ca81d7a0 14298 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
14299 test -n "$tmp" && test -d "$tmp"
14300} ||
14301{
ca81d7a0
JD
14302 tmp=./conf$$-$RANDOM
14303 (umask 077 && mkdir "$tmp")
1f10e750 14304} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 14305
e9a63f04
GM
14306# Set up the scripts for CONFIG_FILES section.
14307# No need to generate them if there are no CONFIG_FILES.
14308# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
14309if test -n "$CONFIG_FILES"; then
14310
7bbec45b 14311
ae1362a3
AS
14312ac_cr=`echo X | tr X '\015'`
14313# On cygwin, bash can eat \r inside `` if the user requested igncr.
14314# But we know of no other shell where ac_cr would be empty at this
14315# point, so we can use a bashism as a fallback.
14316if test "x$ac_cr" = x; then
14317 eval ac_cr=\$\'\\r\'
14318fi
e9a63f04
GM
14319ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14320if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
1f10e750 14321 ac_cs_awk_cr='\\r'
e9a63f04
GM
14322else
14323 ac_cs_awk_cr=$ac_cr
ca81d7a0 14324fi
503d2be0 14325
e9a63f04 14326echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 14327_ACEOF
503d2be0 14328
ca81d7a0 14329
e9a63f04
GM
14330{
14331 echo "cat >conf$$subs.awk <<_ACEOF" &&
14332 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14333 echo "_ACEOF"
14334} >conf$$subs.sh ||
1f10e750
CY
14335 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14336ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ca81d7a0
JD
14337ac_delim='%!_!# '
14338for ac_last_try in false false false false false :; do
e9a63f04 14339 . ./conf$$subs.sh ||
1f10e750 14340 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 14341
ae1362a3
AS
14342 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14343 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
14344 break
14345 elif $ac_last_try; then
1f10e750 14346 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
14347 else
14348 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 14349 fi
ca81d7a0 14350done
e9a63f04
GM
14351rm -f conf$$subs.sh
14352
14353cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14354cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
14355_ACEOF
14356sed -n '
14357h
14358s/^/S["/; s/!.*/"]=/
14359p
14360g
14361s/^[^!]*!//
14362:repl
14363t repl
14364s/'"$ac_delim"'$//
14365t delim
14366:nl
14367h
ae1362a3 14368s/\(.\{148\}\)..*/\1/
e9a63f04
GM
14369t more1
14370s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14371p
14372n
14373b repl
14374:more1
14375s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14376p
14377g
14378s/.\{148\}//
14379t nl
14380:delim
14381h
ae1362a3 14382s/\(.\{148\}\)..*/\1/
e9a63f04
GM
14383t more2
14384s/["\\]/\\&/g; s/^/"/; s/$/"/
14385p
14386b
14387:more2
14388s/["\\]/\\&/g; s/^/"/; s/$/"\\/
14389p
14390g
14391s/.\{148\}//
14392t delim
14393' <conf$$subs.awk | sed '
14394/^[^""]/{
14395 N
14396 s/\n//
14397}
14398' >>$CONFIG_STATUS || ac_write_fail=1
14399rm -f conf$$subs.awk
14400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14401_ACAWK
14402cat >>"\$tmp/subs1.awk" <<_ACAWK &&
14403 for (key in S) S_is_set[key] = 1
14404 FS = "\a"
1e0093ea 14405
e9a63f04
GM
14406}
14407{
14408 line = $ 0
14409 nfields = split(line, field, "@")
14410 substed = 0
14411 len = length(field[1])
14412 for (i = 2; i < nfields; i++) {
14413 key = field[i]
14414 keylen = length(key)
14415 if (S_is_set[key]) {
14416 value = S[key]
14417 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14418 len += length(value) + length(field[++i])
14419 substed = 1
14420 } else
14421 len += 1 + keylen
14422 }
ba4481b5 14423
e9a63f04
GM
14424 print line
14425}
14426
14427_ACAWK
ca81d7a0 14428_ACEOF
e9a63f04
GM
14429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14430if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14431 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14432else
14433 cat
14434fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
1f10e750 14435 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
c0d27fcc 14436_ACEOF
ca81d7a0 14437
1f10e750
CY
14438# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14439# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
ca81d7a0
JD
14440# trailing colons and then remove the whole line if VPATH becomes empty
14441# (actually we leave an empty line to preserve line numbers).
14442if test "x$srcdir" = x.; then
1f10e750
CY
14443 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
14444h
14445s///
14446s/^/:/
14447s/[ ]*$/:/
14448s/:\$(srcdir):/:/g
14449s/:\${srcdir}:/:/g
14450s/:@srcdir@:/:/g
14451s/^:*//
ca81d7a0 14452s/:*$//
1f10e750
CY
14453x
14454s/\(=[ ]*\).*/\1/
14455G
14456s/\n//
ca81d7a0
JD
14457s/^[^=]*=[ ]*$//
14458}'
14459fi
14460
e9a63f04 14461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14462fi # test -n "$CONFIG_FILES"
14463
e9a63f04
GM
14464# Set up the scripts for CONFIG_HEADERS section.
14465# No need to generate them if there are no CONFIG_HEADERS.
14466# This happens for instance with `./config.status Makefile'.
14467if test -n "$CONFIG_HEADERS"; then
14468cat >"$tmp/defines.awk" <<\_ACAWK ||
14469BEGIN {
14470_ACEOF
dc2933eb 14471
e9a63f04
GM
14472# Transform confdefs.h into an awk script `defines.awk', embedded as
14473# here-document in config.status, that substitutes the proper values into
14474# config.h.in to produce config.h.
14475
14476# Create a delimiter string that does not exist in confdefs.h, to ease
14477# handling of long lines.
14478ac_delim='%!_!# '
14479for ac_last_try in false false :; do
14480 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
14481 if test -z "$ac_t"; then
14482 break
14483 elif $ac_last_try; then
1f10e750 14484 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
14485 else
14486 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14487 fi
14488done
14489
14490# For the awk script, D is an array of macro values keyed by name,
14491# likewise P contains macro parameters if any. Preserve backslash
14492# newline sequences.
14493
14494ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14495sed -n '
14496s/.\{148\}/&'"$ac_delim"'/g
14497t rset
14498:rset
14499s/^[ ]*#[ ]*define[ ][ ]*/ /
14500t def
14501d
14502:def
14503s/\\$//
14504t bsnl
14505s/["\\]/\\&/g
14506s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14507D["\1"]=" \3"/p
14508s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
14509d
14510:bsnl
14511s/["\\]/\\&/g
14512s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
14513D["\1"]=" \3\\\\\\n"\\/p
14514t cont
14515s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14516t cont
14517d
14518:cont
14519n
14520s/.\{148\}/&'"$ac_delim"'/g
14521t clear
14522:clear
14523s/\\$//
14524t bsnlc
14525s/["\\]/\\&/g; s/^/"/; s/$/"/p
14526d
14527:bsnlc
14528s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14529b cont
14530' <confdefs.h | sed '
14531s/'"$ac_delim"'/"\\\
14532"/g' >>$CONFIG_STATUS || ac_write_fail=1
14533
14534cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14535 for (key in D) D_is_set[key] = 1
14536 FS = "\a"
14537}
14538/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14539 line = \$ 0
14540 split(line, arg, " ")
14541 if (arg[1] == "#") {
14542 defundef = arg[2]
14543 mac1 = arg[3]
14544 } else {
14545 defundef = substr(arg[1], 2)
14546 mac1 = arg[2]
14547 }
14548 split(mac1, mac2, "(") #)
14549 macro = mac2[1]
ae1362a3 14550 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
14551 if (D_is_set[macro]) {
14552 # Preserve the white space surrounding the "#".
e9a63f04
GM
14553 print prefix "define", macro P[macro] D[macro]
14554 next
14555 } else {
14556 # Replace #undef with comments. This is necessary, for example,
14557 # in the case of _POSIX_SOURCE, which is predefined and required
14558 # on some systems where configure will not decide to define it.
14559 if (defundef == "undef") {
ae1362a3 14560 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
14561 next
14562 }
14563 }
14564}
14565{ print }
14566_ACAWK
14567_ACEOF
14568cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1f10e750 14569 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
14570fi # test -n "$CONFIG_HEADERS"
14571
14572
14573eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
14574shift
14575for ac_tag
ca81d7a0
JD
14576do
14577 case $ac_tag in
14578 :[FHLC]) ac_mode=$ac_tag; continue;;
14579 esac
14580 case $ac_mode$ac_tag in
14581 :[FHL]*:*);;
1f10e750 14582 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
14583 :[FH]-) ac_tag=-:-;;
14584 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14585 esac
14586 ac_save_IFS=$IFS
14587 IFS=:
14588 set x $ac_tag
14589 IFS=$ac_save_IFS
14590 shift
14591 ac_file=$1
14592 shift
14593
14594 case $ac_mode in
14595 :L) ac_source=$1;;
14596 :[FH])
14597 ac_file_inputs=
14598 for ac_f
14599 do
14600 case $ac_f in
14601 -) ac_f="$tmp/stdin";;
14602 *) # Look for the file first in the build tree, then in the source tree
14603 # (if the path is not absolute). The absolute path cannot be DOS-style,
14604 # because $ac_f cannot contain `:'.
14605 test -f "$ac_f" ||
14606 case $ac_f in
14607 [\\/$]*) false;;
14608 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14609 esac ||
1f10e750 14610 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 14611 esac
e9a63f04 14612 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
ae1362a3 14613 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
14614 done
14615
14616 # Let's still pretend it is `configure' which instantiates (i.e., don't
14617 # use $as_me), people would be surprised to read:
14618 # /* config.h. Generated by config.status. */
e9a63f04
GM
14619 configure_input='Generated from '`
14620 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
14621 `' by configure.'
ca81d7a0
JD
14622 if test x"$ac_file" != x-; then
14623 configure_input="$ac_file. $configure_input"
ae1362a3 14624 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 14625$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 14626 fi
e9a63f04
GM
14627 # Neutralize special characters interpreted by sed in replacement strings.
14628 case $configure_input in #(
14629 *\&* | *\|* | *\\* )
14630 ac_sed_conf_input=`$as_echo "$configure_input" |
14631 sed 's/[\\\\&|]/\\\\&/g'`;; #(
14632 *) ac_sed_conf_input=$configure_input;;
14633 esac
ca81d7a0
JD
14634
14635 case $ac_tag in
e9a63f04 14636 *:-:* | *:-) cat >"$tmp/stdin" \
1f10e750 14637 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
14638 esac
14639 ;;
ba4481b5
DL
14640 esac
14641
ca81d7a0 14642 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 14643$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
14644 X"$ac_file" : 'X\(//\)[^/]' \| \
14645 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 14646 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 14647$as_echo X"$ac_file" |
ca81d7a0
JD
14648 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14649 s//\1/
14650 q
14651 }
14652 /^X\(\/\/\)[^/].*/{
14653 s//\1/
14654 q
14655 }
14656 /^X\(\/\/\)$/{
14657 s//\1/
14658 q
14659 }
14660 /^X\(\/\).*/{
14661 s//\1/
14662 q
14663 }
14664 s/.*/./; q'`
ae1362a3 14665 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 14666 ac_builddir=.
98418dba 14667
ca81d7a0
JD
14668case "$ac_dir" in
14669.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
14670*)
e9a63f04 14671 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 14672 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 14673 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
14674 case $ac_top_builddir_sub in
14675 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
14676 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
14677 esac ;;
14678esac
14679ac_abs_top_builddir=$ac_pwd
14680ac_abs_builddir=$ac_pwd$ac_dir_suffix
14681# for backward compatibility:
14682ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
14683
14684case $srcdir in
ca81d7a0 14685 .) # We are building in place.
c0d27fcc 14686 ac_srcdir=.
ca81d7a0
JD
14687 ac_top_srcdir=$ac_top_builddir_sub
14688 ac_abs_top_srcdir=$ac_pwd ;;
14689 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 14690 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
14691 ac_top_srcdir=$srcdir
14692 ac_abs_top_srcdir=$srcdir ;;
14693 *) # Relative name.
14694 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
14695 ac_top_srcdir=$ac_top_build_prefix$srcdir
14696 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 14697esac
ca81d7a0 14698ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 14699
c0d27fcc 14700
ca81d7a0
JD
14701 case $ac_mode in
14702 :F)
14703 #
14704 # CONFIG_FILE
14705 #
ba4481b5 14706
503d2be0
AS
14707 case $INSTALL in
14708 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 14709 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 14710 esac
ca81d7a0 14711_ACEOF
ba4481b5 14712
e9a63f04 14713cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
14714# If the template does not know about datarootdir, expand it.
14715# FIXME: This hack should be removed a few years after 2.60.
14716ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
14717ac_sed_dataroot='
14718/datarootdir/ {
ca81d7a0
JD
14719 p
14720 q
14721}
14722/@datadir@/p
14723/@docdir@/p
14724/@infodir@/p
14725/@localedir@/p
ae1362a3 14726/@mandir@/p'
e9a63f04 14727case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
14728*datarootdir*) ac_datarootdir_seen=yes;;
14729*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
ae1362a3 14730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 14731$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 14732_ACEOF
e9a63f04 14733cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
14734 ac_datarootdir_hack='
14735 s&@datadir@&$datadir&g
14736 s&@docdir@&$docdir&g
14737 s&@infodir@&$infodir&g
14738 s&@localedir@&$localedir&g
14739 s&@mandir@&$mandir&g
ae1362a3 14740 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 14741esac
c0d27fcc 14742_ACEOF
ca81d7a0
JD
14743
14744# Neutralize VPATH when `$srcdir' = `.'.
14745# Shell code in configure.ac might set extrasub.
14746# FIXME: do we really want to maintain this feature?
e9a63f04
GM
14747cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14748ac_sed_extra="$ac_vpsub
503d2be0 14749$extrasub
c0d27fcc 14750_ACEOF
e9a63f04 14751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
14752:t
14753/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 14754s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 14755s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 14756s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
14757s&@srcdir@&$ac_srcdir&;t t
14758s&@abs_srcdir@&$ac_abs_srcdir&;t t
14759s&@top_srcdir@&$ac_top_srcdir&;t t
14760s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
14761s&@builddir@&$ac_builddir&;t t
14762s&@abs_builddir@&$ac_abs_builddir&;t t
14763s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
14764s&@INSTALL@&$ac_INSTALL&;t t
14765$ac_datarootdir_hack
e9a63f04
GM
14766"
14767eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
1f10e750 14768 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
14769
14770test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
14771 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
14772 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
ae1362a3 14773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
1f10e750 14774which seems to be undefined. Please make sure it is defined" >&5
e9a63f04 14775$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
1f10e750 14776which seems to be undefined. Please make sure it is defined" >&2;}
ca81d7a0
JD
14777
14778 rm -f "$tmp/stdin"
503d2be0 14779 case $ac_file in
e9a63f04
GM
14780 -) cat "$tmp/out" && rm -f "$tmp/out";;
14781 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
14782 esac \
1f10e750 14783 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
14784 ;;
14785 :H)
14786 #
14787 # CONFIG_HEADER
14788 #
503d2be0 14789 if test x"$ac_file" != x-; then
e9a63f04
GM
14790 {
14791 $as_echo "/* $configure_input */" \
14792 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
14793 } >"$tmp/config.h" \
1f10e750 14794 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
e9a63f04 14795 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
ae1362a3 14796 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 14797$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 14798 else
e9a63f04
GM
14799 rm -f "$ac_file"
14800 mv "$tmp/config.h" "$ac_file" \
1f10e750 14801 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
ba4481b5 14802 fi
503d2be0 14803 else
e9a63f04
GM
14804 $as_echo "/* $configure_input */" \
14805 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
1f10e750 14806 || as_fn_error $? "could not create -" "$LINENO" 5
ba4481b5 14807 fi
ca81d7a0 14808 ;;
edfaf76d 14809
ae1362a3 14810 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 14811$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
14812 ;;
14813 esac
ba4481b5 14814
c0d27fcc 14815
ca81d7a0
JD
14816 case $ac_file$ac_mode in
14817 "default":C)
ba4481b5
DL
14818
14819### Make the necessary directories, if they don't exist.
14820for dir in etc lisp ; do
14821 test -d ${dir} || mkdir ${dir}
14822done
14823
14824# Build src/Makefile from ${srcdir}/src/Makefile.c
14825# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
14826# This must be done after src/config.h is built, since we rely on that file.
14827
ba4481b5 14828echo creating src/epaths.h
4aa6b955 14829${MAKE-make} epaths-force
ba4481b5 14830
1c203d4c
DL
14831# As of 2000-11-19, newest development versions of GNU cpp preprocess
14832# `..' to `. .' unless invoked with -traditional
14833
d0e9bfd2 14834if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
14835 CPPFLAGS="$CPPFLAGS -traditional"
14836fi
14837
ba4481b5
DL
14838echo creating lib-src/Makefile
14839( cd lib-src
14840 rm -f junk.c junk1.c junk2.c
14841 sed -e '/start of cpp stuff/q' \
14842 < Makefile.c > junk1.c
14843 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 14844 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 14845 < Makefile.c > junk.c
91231421 14846 $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
14847 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
14848 cat junk1.c junk2.c > Makefile.new
14849 rm -f junk.c junk1.c junk2.c
14850 chmod 444 Makefile.new
14851 mv -f Makefile.new Makefile
14852)
14853
14854echo creating src/Makefile
14855( cd src
14856 rm -f junk.c junk1.c junk2.c
14857 sed -e '/start of cpp stuff/q' \
14858 < Makefile.c > junk1.c
14859 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 14860 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 14861 < Makefile.c > junk.c
91231421 14862 $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
14863 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
14864 cat junk1.c junk2.c > Makefile.new
14865 rm -f junk.c junk1.c junk2.c
14866 chmod 444 Makefile.new
14867 mv -f Makefile.new Makefile
14868)
14869
503d2be0 14870if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 14871 echo creating src/.gdbinit
503d2be0 14872 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
14873fi
14874
503d2be0 14875 ;;
ca81d7a0 14876
503d2be0 14877 esac
ca81d7a0 14878done # for ac_tag
503d2be0 14879
ba4481b5 14880
ae1362a3 14881as_fn_exit 0
c0d27fcc 14882_ACEOF
503d2be0
AS
14883ac_clean_files=$ac_clean_files_save
14884
e9a63f04 14885test $ac_write_fail = 0 ||
1f10e750 14886 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 14887
c0d27fcc 14888
503d2be0
AS
14889# configure is writing to config.log, and then calls config.status.
14890# config.status does its own redirection, appending to config.log.
14891# Unfortunately, on DOS this fails, as config.log is still kept open
14892# by configure, so config.status won't be able to write to it; its
14893# output is simply discarded. So we exec the FD to /dev/null,
14894# effectively closing config.log, so it can be properly (re)opened and
14895# appended to by config.status. When coming back to configure, we
14896# need to make the FD available again.
14897if test "$no_create" != yes; then
14898 ac_cs_success=:
19650fd6
AS
14899 ac_config_status_args=
14900 test "$silent" = yes &&
14901 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 14902 exec 5>/dev/null
19650fd6 14903 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
14904 exec 5>>config.log
14905 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
14906 # would make configure fail if this is the last instruction.
1f10e750 14907 $ac_cs_success || as_fn_exit 1
503d2be0 14908fi
e9a63f04 14909if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
ae1362a3
AS
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
14911$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 14912fi
f5f47add 14913
c0d27fcc 14914