* lib-src/fakemail.c (action): Convert function definitions to standard C.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
eb697db5
DN
3# Generated by GNU Autoconf 2.65 for emacs 24.0.50.
4#
ba4481b5 5#
ca81d7a0 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
eb697db5
DN
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Inc.
9#
10#
ba4481b5
DL
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
eb697db5
DN
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
503d2be0 16
f053c89f
CY
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
20 emulate sh
21 NULLCMD=:
e9a63f04 22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
25 setopt NO_GLOB_SUBST
26else
eb697db5
DN
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
f053c89f 32esac
503d2be0 33fi
f053c89f
CY
34
35
e9a63f04
GM
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
7bbec45b 56 else
e9a63f04
GM
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
eb697db5 60 case $arg in #(
e9a63f04
GM
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 69 fi
e9a63f04
GM
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
503d2be0
AS
81fi
82
6bae0ccf 83
ca81d7a0
JD
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
ca81d7a0
JD
89IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
eb697db5 92case $0 in #((
ca81d7a0
JD
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95for as_dir in $PATH
96do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
eb697db5
DN
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
ca81d7a0
JD
101IFS=$as_save_IFS
102
103 ;;
104esac
105# We did not find ourselves, most probably we were run as `sh COMMAND'
106# in which case we are not to be found in the path.
107if test "x$as_myself" = x; then
108 as_myself=$0
109fi
110if test ! -f "$as_myself"; then
e9a63f04 111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 112 exit 1
ca81d7a0
JD
113fi
114
eb697db5
DN
115# Unset variables that we do not need and which cause bugs (e.g. in
116# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117# suppresses any "Segmentation fault" message there. '((' could
118# trigger a bug in pdksh 5.2.14.
119for as_var in BASH_ENV ENV MAIL MAILPATH
120do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 122done
6bae0ccf
DL
123PS1='$ '
124PS2='> '
125PS4='+ '
126
127# NLS nuisances.
e9a63f04
GM
128LC_ALL=C
129export LC_ALL
130LANGUAGE=C
131export LANGUAGE
6bae0ccf 132
eb697db5
DN
133# CDPATH.
134(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136if test "x$CONFIG_SHELL" = x; then
137 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
138 emulate sh
139 NULLCMD=:
140 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
141 # is contrary to our usage. Disable this feature.
142 alias -g '\${1+\"\$@\"}'='\"\$@\"'
143 setopt NO_GLOB_SUBST
144else
145 case \`(set -o) 2>/dev/null\` in #(
146 *posix*) :
147 set -o posix ;; #(
148 *) :
149 ;;
150esac
151fi
152"
153 as_required="as_fn_return () { (exit \$1); }
154as_fn_success () { as_fn_return 0; }
155as_fn_failure () { as_fn_return 1; }
156as_fn_ret_success () { return 0; }
157as_fn_ret_failure () { return 1; }
158
159exitcode=0
160as_fn_success || { exitcode=1; echo as_fn_success failed.; }
161as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
162as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
163as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
164if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
165
166else
167 exitcode=1; echo positional parameters were not saved.
168fi
169test x\$exitcode = x0 || exit 1"
170 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
171 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
172 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
173 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
174test \$(( 1 + 1 )) = 2 || exit 1"
175 if (eval "$as_required") 2>/dev/null; then :
176 as_have_required=yes
177else
178 as_have_required=no
179fi
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
181
182else
183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
184as_found=false
185for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
186do
187 IFS=$as_save_IFS
188 test -z "$as_dir" && as_dir=.
189 as_found=:
190 case $as_dir in #(
191 /*)
192 for as_base in sh bash ksh sh5; do
193 # Try only shells that exist, to save several forks.
194 as_shell=$as_dir/$as_base
195 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
196 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
197 CONFIG_SHELL=$as_shell as_have_required=yes
198 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 break 2
200fi
201fi
202 done;;
203 esac
204 as_found=false
205done
206$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
207 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
208 CONFIG_SHELL=$SHELL as_have_required=yes
209fi; }
210IFS=$as_save_IFS
211
212
213 if test "x$CONFIG_SHELL" != x; then :
214 # We cannot yet assume a decent shell, so we have to provide a
215 # neutralization value for shells without unset; and this also
216 # works around shells that cannot unset nonexistent variables.
217 BASH_ENV=/dev/null
218 ENV=/dev/null
219 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
220 export CONFIG_SHELL
221 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
222fi
223
224 if test x$as_have_required = xno; then :
225 $as_echo "$0: This script requires a shell more modern than all"
226 $as_echo "$0: the shells that I found on your system."
227 if test x${ZSH_VERSION+set} = xset ; then
228 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
229 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
230 else
231 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
232$0: including any error possibly output before this
233$0: message. Then install a modern shell, or manually run
234$0: the script under such a shell if you do have one."
235 fi
236 exit 1
237fi
238fi
239fi
240SHELL=${CONFIG_SHELL-/bin/sh}
241export SHELL
242# Unset more variables known to interfere with behavior of common tools.
243CLICOLOR_FORCE= GREP_OPTIONS=
244unset CLICOLOR_FORCE GREP_OPTIONS
245
246## --------------------- ##
247## M4sh Shell Functions. ##
248## --------------------- ##
249# as_fn_unset VAR
250# ---------------
251# Portably unset VAR.
252as_fn_unset ()
253{
254 { eval $1=; unset $1;}
255}
256as_unset=as_fn_unset
257
258# as_fn_set_status STATUS
259# -----------------------
260# Set $? to STATUS, without forking.
261as_fn_set_status ()
262{
263 return $1
264} # as_fn_set_status
265
266# as_fn_exit STATUS
267# -----------------
268# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
269as_fn_exit ()
270{
271 set +e
272 as_fn_set_status $1
273 exit $1
274} # as_fn_exit
275
276# as_fn_mkdir_p
277# -------------
278# Create "$as_dir" as a directory, including parents if necessary.
279as_fn_mkdir_p ()
280{
281
282 case $as_dir in #(
283 -*) as_dir=./$as_dir;;
284 esac
285 test -d "$as_dir" || eval $as_mkdir_p || {
286 as_dirs=
287 while :; do
288 case $as_dir in #(
289 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
290 *) as_qdir=$as_dir;;
291 esac
292 as_dirs="'$as_qdir' $as_dirs"
293 as_dir=`$as_dirname -- "$as_dir" ||
294$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
295 X"$as_dir" : 'X\(//\)[^/]' \| \
296 X"$as_dir" : 'X\(//\)$' \| \
297 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
298$as_echo X"$as_dir" |
299 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
300 s//\1/
301 q
302 }
303 /^X\(\/\/\)[^/].*/{
304 s//\1/
305 q
306 }
307 /^X\(\/\/\)$/{
308 s//\1/
309 q
310 }
311 /^X\(\/\).*/{
312 s//\1/
313 q
314 }
315 s/.*/./; q'`
316 test -d "$as_dir" && break
317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs"
319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
320
321
322} # as_fn_mkdir_p
323# as_fn_append VAR VALUE
324# ----------------------
325# Append the text in VALUE to the end of the definition contained in VAR. Take
326# advantage of any shell optimizations that allow amortized linear growth over
327# repeated appends, instead of the typical quadratic growth present in naive
328# implementations.
329if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
330 eval 'as_fn_append ()
331 {
332 eval $1+=\$2
333 }'
334else
335 as_fn_append ()
336 {
337 eval $1=\$$1\$2
338 }
339fi # as_fn_append
340
341# as_fn_arith ARG...
342# ------------------
343# Perform arithmetic evaluation on the ARGs, and store the result in the
344# global $as_val. Take advantage of shells that can avoid forks. The arguments
345# must be portable across $(()) and expr.
346if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
347 eval 'as_fn_arith ()
348 {
349 as_val=$(( $* ))
350 }'
351else
352 as_fn_arith ()
353 {
354 as_val=`expr "$@" || test $? -eq 1`
355 }
356fi # as_fn_arith
357
358
359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
363# script with status $?, using 1 if that was 0.
364as_fn_error ()
365{
366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$3"; then
368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
370 fi
371 $as_echo "$as_me: error: $1" >&2
372 as_fn_exit $as_status
373} # as_fn_error
374
ca81d7a0
JD
375if expr a : '\(a\)' >/dev/null 2>&1 &&
376 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
377 as_expr=expr
378else
379 as_expr=false
380fi
381
ca81d7a0 382if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
383 as_basename=basename
384else
385 as_basename=false
386fi
c0d27fcc 387
eb697db5
DN
388if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
389 as_dirname=dirname
390else
391 as_dirname=false
392fi
c0d27fcc 393
ca81d7a0 394as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
395$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
396 X"$0" : 'X\(//\)$' \| \
ca81d7a0 397 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 398$as_echo X/"$0" |
ca81d7a0
JD
399 sed '/^.*\/\([^/][^/]*\)\/*$/{
400 s//\1/
401 q
402 }
403 /^X\/\(\/\/\)$/{
404 s//\1/
405 q
406 }
407 /^X\/\(\/\).*/{
408 s//\1/
409 q
410 }
411 s/.*/./; q'`
c0d27fcc 412
eb697db5
DN
413# Avoid depending upon Character Ranges.
414as_cr_letters='abcdefghijklmnopqrstuvwxyz'
415as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
416as_cr_Letters=$as_cr_letters$as_cr_LETTERS
417as_cr_digits='0123456789'
418as_cr_alnum=$as_cr_Letters$as_cr_digits
6bae0ccf 419
c0d27fcc 420
eb697db5
DN
421 as_lineno_1=$LINENO as_lineno_1a=$LINENO
422 as_lineno_2=$LINENO as_lineno_2a=$LINENO
423 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
424 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
425 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
426 sed -n '
427 p
428 /[$]LINENO/=
429 ' <$as_myself |
430 sed '
431 s/[$]LINENO.*/&-/
432 t lineno
433 b
434 :lineno
435 N
436 :loop
437 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
438 t loop
439 s/-\n.*//
440 ' >$as_me.lineno &&
441 chmod +x "$as_me.lineno" ||
442 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
c0d27fcc 443
eb697db5
DN
444 # Don't try to exec as it changes $[0], causing all sort of problems
445 # (the dirname of $[0] is not the place where we might find the
446 # original and so on. Autoconf is especially sensitive to this).
447 . "./$as_me.lineno"
448 # Exit status is that of the last command.
449 exit
ca81d7a0 450}
c0d27fcc 451
eb697db5
DN
452ECHO_C= ECHO_N= ECHO_T=
453case `echo -n x` in #(((((
454-n*)
455 case `echo 'xy\c'` in
456 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
457 xy) ECHO_C='\c';;
458 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
459 ECHO_T=' ';;
460 esac;;
461*)
462 ECHO_N='-n';;
463esac
08b47d3d 464
eb697db5
DN
465rm -f conf$$ conf$$.exe conf$$.file
466if test -d conf$$.dir; then
467 rm -f conf$$.dir/conf$$.file
468else
469 rm -f conf$$.dir
470 mkdir conf$$.dir 2>/dev/null
a4f64981 471fi
eb697db5
DN
472if (echo >conf$$.file) 2>/dev/null; then
473 if ln -s conf$$.file conf$$ 2>/dev/null; then
474 as_ln_s='ln -s'
475 # ... but there are two gotchas:
476 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
477 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
478 # In both cases, we have to default to `cp -p'.
479 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
480 as_ln_s='cp -p'
481 elif ln conf$$.file conf$$ 2>/dev/null; then
482 as_ln_s=ln
483 else
484 as_ln_s='cp -p'
485 fi
a4f64981 486else
eb697db5 487 as_ln_s='cp -p'
a4f64981 488fi
eb697db5
DN
489rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
490rmdir conf$$.dir 2>/dev/null
a5edbe4a 491
eb697db5
DN
492if mkdir -p . 2>/dev/null; then
493 as_mkdir_p='mkdir -p "$as_dir"'
494else
495 test -d ./-p && rmdir ./-p
496 as_mkdir_p=false
5929fbe7 497fi
e6df49e4 498
eb697db5
DN
499if test -x / >/dev/null 2>&1; then
500 as_test_x='test -x'
5929fbe7 501else
eb697db5
DN
502 if ls -dL / >/dev/null 2>&1; then
503 as_ls_L_option=L
504 else
505 as_ls_L_option=
506 fi
507 as_test_x='
508 eval sh -c '\''
509 if test -d "$1"; then
510 test -d "$1/.";
511 else
512 case $1 in #(
513 -*)set "./$1";;
514 esac;
515 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
516 ???[sx]*):;;*)false;;esac;fi
517 '\'' sh
518 '
5929fbe7 519fi
eb697db5 520as_executable_p=$as_test_x
e6df49e4 521
eb697db5
DN
522# Sed expression to map a string onto a valid CPP name.
523as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
a4f64981 524
eb697db5
DN
525# Sed expression to map a string onto a valid variable name.
526as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
a4f64981 527
5929fbe7 528
eb697db5
DN
529test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1
5929fbe7
GM
531
532# Name of the host.
533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
503d2be0 536
503d2be0
AS
537#
538# Initializations.
539#
ba4481b5 540ac_default_prefix=/usr/local
ca81d7a0 541ac_clean_files=
6bae0ccf 542ac_config_libobj_dir=.
ca81d7a0 543LIBOBJS=
503d2be0
AS
544cross_compiling=no
545subdirs=
c0d27fcc
MR
546MFLAGS=
547MAKEFLAGS=
503d2be0 548
c0d27fcc 549# Identity of this package.
9cf8f393
JD
550PACKAGE_NAME='emacs'
551PACKAGE_TARNAME='emacs'
49a62e8a
GM
552PACKAGE_VERSION='24.0.50'
553PACKAGE_STRING='emacs 24.0.50'
9cf8f393 554PACKAGE_BUGREPORT=''
eb697db5 555PACKAGE_URL=''
c0d27fcc 556
503d2be0
AS
557ac_unique_file="src/lisp.h"
558# Factoring default headers for most tests.
559ac_includes_default="\
560#include <stdio.h>
f053c89f 561#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
562# include <sys/types.h>
563#endif
f053c89f 564#ifdef HAVE_SYS_STAT_H
503d2be0
AS
565# include <sys/stat.h>
566#endif
f053c89f 567#ifdef STDC_HEADERS
503d2be0
AS
568# include <stdlib.h>
569# include <stddef.h>
570#else
f053c89f 571# ifdef HAVE_STDLIB_H
503d2be0
AS
572# include <stdlib.h>
573# endif
574#endif
f053c89f
CY
575#ifdef HAVE_STRING_H
576# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
577# include <memory.h>
578# endif
579# include <string.h>
580#endif
f053c89f 581#ifdef HAVE_STRINGS_H
503d2be0
AS
582# include <strings.h>
583#endif
f053c89f 584#ifdef HAVE_INTTYPES_H
503d2be0 585# include <inttypes.h>
503d2be0 586#endif
f053c89f 587#ifdef HAVE_STDINT_H
ca81d7a0 588# include <stdint.h>
503d2be0 589#endif
f053c89f 590#ifdef HAVE_UNISTD_H
503d2be0
AS
591# include <unistd.h>
592#endif"
ba4481b5 593
a51f4969 594ac_config_libobj_dir=src
c24fa7dc
MB
595ac_header_list=
596ac_func_list=
eb697db5 597ac_subst_vars='LTLIBOBJS
5929fbe7 598WINDOW_SUPPORT
eb697db5
DN
599TOOLTIP_SUPPORT
600MOUSE_SUPPORT
601LIB_GCC
602LINKER
603POST_EDIT_LDFLAGS
604PRE_EDIT_LDFLAGS
605LD_SWITCH_SYSTEM_TEMACS
606POST_ALLOC_OBJ
607PRE_ALLOC_OBJ
608CYGWIN_OBJ
609RALLOC_OBJ
610OLDXMENU_DEPS
611LIBX_OTHER
612LIBXMENU
613OLDXMENU
614OLDXMENU_TARGET
615LIBXT_OTHER
616TOOLKIT_LIBW
617WIDGET_OBJ
618XOBJ
619XMENU_OBJ
620FONT_OBJ
621OTHER_FILES
622GNU_OBJC_CFLAGS
623ns_appsrc
624ns_appresdir
625ns_appbindir
626ns_appdir
627opsysfile
628machfile
629X_TOOLKIT_TYPE
630C_SWITCH_X_SYSTEM
631C_SWITCH_X_SITE
632LD_SWITCH_X_SITE
633gameuser
634gamedir
635bitmapdir
636archlibdir
637etcdir
638x_default_search_path
639lisppath
640locallisppath
641lispdir
642srcdir
643canonical
644configuration
645version
646KRB4LIB
647DESLIB
648KRB5LIB
649CRYPTOLIB
650COM_ERRLIB
651LIBRESOLV
652LIBHESIOD
653TERMCAP_OBJ
654LIBS_TERMCAP
655GETOPTOBJS
656GETOPT_H
657GETLOADAVG_LIBS
658KMEM_GROUP
659NEED_SETGID
660LIBOBJS
661BLESSMAIL_TARGET
662LIBS_MAIL
663liblockfile
664ALLOCA
665LIBXSM
666LIBGPM
667LIBGIF
668LIBTIFF
669LIBPNG
670LIBJPEG
671LIBXPM
672FREETYPE_LIBS
673FREETYPE_CFLAGS
674M17N_FLT_LIBS
675M17N_FLT_CFLAGS
676LIBOTF_LIBS
677LIBOTF_CFLAGS
678XFT_LIBS
679XFT_CFLAGS
680FONTCONFIG_LIBS
681FONTCONFIG_CFLAGS
682LIBXMU
683LIBXTR6
684LIBSELINUX_LIBS
685GCONF_LIBS
686GCONF_CFLAGS
687DBUS_OBJ
688DBUS_LIBS
689DBUS_CFLAGS
690GTK_OBJ
691GTK_LIBS
692GTK_CFLAGS
693RSVG_LIBS
694RSVG_CFLAGS
695VMLIMIT_OBJ
696GMALLOC_OBJ
697HAVE_XSERVER
698LIB_STANDARD
699NS_SUPPORT
700NS_OBJ
701TEMACS_LDFLAGS2
702LD_SWITCH_X_SITE_AUX_RPATH
703LD_SWITCH_X_SITE_AUX
704XMKMF
705DEPFLAGS
706MKDEPDIR
707SET_MAKE
708CFLAGS_SOUND
709ALSA_LIBS
710ALSA_CFLAGS
711PKG_CONFIG
712LIBSOUND
713START_FILES
714LIB_MATH
715CRT_DIR
716LIBS_SYSTEM
717C_SWITCH_SYSTEM
718UNEXEC_OBJ
719C_SWITCH_MACHINE
720LD_SWITCH_SYSTEM
e7586c7a 721CANNOT_DUMP
eb697db5
DN
722MAKEINFO
723GZIP_PROG
724INSTALL_INFO
725RANLIB
726INSTALL_DATA
727INSTALL_SCRIPT
728INSTALL_PROGRAM
729EGREP
730GREP
731CPP
732OBJEXT
733EXEEXT
734ac_ct_CC
735CPPFLAGS
736LDFLAGS
737CFLAGS
738CC
739host_os
740host_vendor
741host_cpu
742host
743build_os
744build_vendor
745build_cpu
746build
747MAINT
e547b051 748GZIP_INFO
eb697db5
DN
749target_alias
750host_alias
751build_alias
752LIBS
753ECHO_T
754ECHO_N
755ECHO_C
756DEFS
757mandir
758localedir
759libdir
760psdir
761pdfdir
762dvidir
763htmldir
764infodir
765docdir
766oldincludedir
767includedir
768localstatedir
769sharedstatedir
770sysconfdir
771datadir
772datarootdir
773libexecdir
774sbindir
775bindir
776program_transform_name
777prefix
778exec_prefix
779PACKAGE_URL
780PACKAGE_BUGREPORT
781PACKAGE_STRING
782PACKAGE_VERSION
783PACKAGE_TARNAME
784PACKAGE_NAME
785PATH_SEPARATOR
786SHELL'
787ac_subst_files='deps_frag
788ns_frag'
789ac_user_opts='
790enable_option_checking
791with_pop
792with_kerberos
793with_kerberos5
794with_hesiod
795with_mmdf
796with_mail_unlink
797with_mailhost
798with_sound
799with_sync_input
800with_x_toolkit
801with_xpm
802with_jpeg
803with_tiff
804with_gif
805with_png
806with_rsvg
807with_xft
808with_libotf
809with_m17n_flt
810with_toolkit_scroll_bars
811with_xaw3d
812with_xim
813with_ns
814with_gpm
815with_dbus
816with_gconf
817with_selinux
818with_makeinfo
e547b051 819with_compress_info
eb697db5
DN
820with_pkg_config_prog
821with_crt_dir
822with_gnustep_conf
823enable_ns_self_contained
824enable_asserts
825enable_maintainer_mode
826enable_locallisppath
827enable_checking
d9170db5 828enable_use_lisp_union_type
eb697db5
DN
829enable_profiling
830enable_autodepend
831enable_largefile
832with_x
833'
834 ac_precious_vars='build_alias
835host_alias
836target_alias
837CC
838CFLAGS
839LDFLAGS
840LIBS
841CPPFLAGS
842CPP
843XMKMF'
a4f64981 844
5929fbe7 845
eb697db5
DN
846# Initialize some variables set by options.
847ac_init_help=
848ac_init_version=false
849ac_unrecognized_opts=
850ac_unrecognized_sep=
851# The variables have the same names as the options, with
852# dashes changed to underlines.
853cache_file=/dev/null
854exec_prefix=NONE
855no_create=
856no_recursion=
857prefix=NONE
858program_prefix=NONE
859program_suffix=NONE
860program_transform_name=s,x,x,
861silent=
862site=
863srcdir=
864verbose=
865x_includes=NONE
866x_libraries=NONE
5929fbe7 867
eb697db5
DN
868# Installation directory options.
869# These are left unexpanded so users can "make install exec_prefix=/foo"
870# and all the variables that are supposed to be based on exec_prefix
871# by default will actually change.
872# Use braces instead of parens because sh, perl, etc. also accept them.
873# (The list follows the same order as the GNU Coding Standards.)
874bindir='${exec_prefix}/bin'
875sbindir='${exec_prefix}/sbin'
876libexecdir='${exec_prefix}/libexec'
877datarootdir='${prefix}/share'
878datadir='${datarootdir}'
879sysconfdir='${prefix}/etc'
880sharedstatedir='${prefix}/com'
881localstatedir='${prefix}/var'
882includedir='${prefix}/include'
883oldincludedir='/usr/include'
884docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
885infodir='${datarootdir}/info'
886htmldir='${docdir}'
887dvidir='${docdir}'
888pdfdir='${docdir}'
889psdir='${docdir}'
890libdir='${exec_prefix}/lib'
891localedir='${datarootdir}/locale'
892mandir='${datarootdir}/man'
5929fbe7 893
eb697db5
DN
894ac_prev=
895ac_dashdash=
896for ac_option
897do
898 # If the previous option needs an argument, assign it.
899 if test -n "$ac_prev"; then
900 eval $ac_prev=\$ac_option
901 ac_prev=
902 continue
903 fi
a4f64981 904
eb697db5
DN
905 case $ac_option in
906 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
907 *) ac_optarg=yes ;;
908 esac
a4f64981 909
eb697db5 910 # Accept the important Cygnus configure options, so we can diagnose typos.
a4f64981 911
eb697db5
DN
912 case $ac_dashdash$ac_option in
913 --)
914 ac_dashdash=yes ;;
a4f64981 915
eb697db5
DN
916 -bindir | --bindir | --bindi | --bind | --bin | --bi)
917 ac_prev=bindir ;;
918 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
919 bindir=$ac_optarg ;;
a4f64981 920
eb697db5
DN
921 -build | --build | --buil | --bui | --bu)
922 ac_prev=build_alias ;;
923 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
924 build_alias=$ac_optarg ;;
a4f64981 925
eb697db5
DN
926 -cache-file | --cache-file | --cache-fil | --cache-fi \
927 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
928 ac_prev=cache_file ;;
929 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
930 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
931 cache_file=$ac_optarg ;;
5929fbe7 932
eb697db5
DN
933 --config-cache | -C)
934 cache_file=config.cache ;;
8c5ff6dd 935
eb697db5
DN
936 -datadir | --datadir | --datadi | --datad)
937 ac_prev=datadir ;;
938 -datadir=* | --datadir=* | --datadi=* | --datad=*)
939 datadir=$ac_optarg ;;
8c5ff6dd 940
eb697db5
DN
941 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
942 | --dataroo | --dataro | --datar)
943 ac_prev=datarootdir ;;
944 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
945 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
946 datarootdir=$ac_optarg ;;
5929fbe7 947
eb697db5
DN
948 -disable-* | --disable-*)
949 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
950 # Reject names that are not valid shell variable names.
951 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
952 as_fn_error "invalid feature name: $ac_useropt"
953 ac_useropt_orig=$ac_useropt
954 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
955 case $ac_user_opts in
956 *"
957"enable_$ac_useropt"
958"*) ;;
959 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
960 ac_unrecognized_sep=', ';;
961 esac
962 eval enable_$ac_useropt=no ;;
5929fbe7 963
eb697db5
DN
964 -docdir | --docdir | --docdi | --doc | --do)
965 ac_prev=docdir ;;
966 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
967 docdir=$ac_optarg ;;
8c5ff6dd 968
eb697db5
DN
969 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
970 ac_prev=dvidir ;;
971 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
972 dvidir=$ac_optarg ;;
8c5ff6dd 973
eb697db5
DN
974 -enable-* | --enable-*)
975 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
976 # Reject names that are not valid shell variable names.
977 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
978 as_fn_error "invalid feature name: $ac_useropt"
979 ac_useropt_orig=$ac_useropt
980 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
981 case $ac_user_opts in
982 *"
983"enable_$ac_useropt"
984"*) ;;
985 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
986 ac_unrecognized_sep=', ';;
987 esac
988 eval enable_$ac_useropt=\$ac_optarg ;;
648b8e6d 989
eb697db5
DN
990 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
991 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
992 | --exec | --exe | --ex)
993 ac_prev=exec_prefix ;;
994 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
995 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
996 | --exec=* | --exe=* | --ex=*)
997 exec_prefix=$ac_optarg ;;
648b8e6d 998
eb697db5
DN
999 -gas | --gas | --ga | --g)
1000 # Obsolete; use --with-gas.
1001 with_gas=yes ;;
648b8e6d 1002
eb697db5
DN
1003 -help | --help | --hel | --he | -h)
1004 ac_init_help=long ;;
1005 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1006 ac_init_help=recursive ;;
1007 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1008 ac_init_help=short ;;
648b8e6d 1009
eb697db5
DN
1010 -host | --host | --hos | --ho)
1011 ac_prev=host_alias ;;
1012 -host=* | --host=* | --hos=* | --ho=*)
1013 host_alias=$ac_optarg ;;
8c5ff6dd 1014
eb697db5
DN
1015 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1016 ac_prev=htmldir ;;
1017 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1018 | --ht=*)
1019 htmldir=$ac_optarg ;;
a4f64981 1020
eb697db5
DN
1021 -includedir | --includedir | --includedi | --included | --include \
1022 | --includ | --inclu | --incl | --inc)
1023 ac_prev=includedir ;;
1024 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1025 | --includ=* | --inclu=* | --incl=* | --inc=*)
1026 includedir=$ac_optarg ;;
a4f64981 1027
eb697db5
DN
1028 -infodir | --infodir | --infodi | --infod | --info | --inf)
1029 ac_prev=infodir ;;
1030 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1031 infodir=$ac_optarg ;;
7186fb09 1032
eb697db5
DN
1033 -libdir | --libdir | --libdi | --libd)
1034 ac_prev=libdir ;;
1035 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1036 libdir=$ac_optarg ;;
e6df49e4 1037
eb697db5
DN
1038 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1039 | --libexe | --libex | --libe)
1040 ac_prev=libexecdir ;;
1041 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1042 | --libexe=* | --libex=* | --libe=*)
1043 libexecdir=$ac_optarg ;;
a4f64981 1044
eb697db5
DN
1045 -localedir | --localedir | --localedi | --localed | --locale)
1046 ac_prev=localedir ;;
1047 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1048 localedir=$ac_optarg ;;
1049
1050 -localstatedir | --localstatedir | --localstatedi | --localstated \
1051 | --localstate | --localstat | --localsta | --localst | --locals)
1052 ac_prev=localstatedir ;;
1053 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1054 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1055 localstatedir=$ac_optarg ;;
a4f64981 1056
eb697db5
DN
1057 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1058 ac_prev=mandir ;;
1059 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1060 mandir=$ac_optarg ;;
49ebbd65 1061
eb697db5
DN
1062 -nfp | --nfp | --nf)
1063 # Obsolete; use --without-fp.
1064 with_fp=no ;;
a4f64981 1065
eb697db5
DN
1066 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1067 | --no-cr | --no-c | -n)
1068 no_create=yes ;;
1069
1070 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1071 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1072 no_recursion=yes ;;
a4f64981 1073
eb697db5
DN
1074 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1075 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1076 | --oldin | --oldi | --old | --ol | --o)
1077 ac_prev=oldincludedir ;;
1078 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1079 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1080 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1081 oldincludedir=$ac_optarg ;;
e6df49e4 1082
eb697db5
DN
1083 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1084 ac_prev=prefix ;;
1085 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1086 prefix=$ac_optarg ;;
a4f64981 1087
eb697db5
DN
1088 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1089 | --program-pre | --program-pr | --program-p)
1090 ac_prev=program_prefix ;;
1091 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1092 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1093 program_prefix=$ac_optarg ;;
5929fbe7 1094
eb697db5
DN
1095 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1096 | --program-suf | --program-su | --program-s)
1097 ac_prev=program_suffix ;;
1098 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1099 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1100 program_suffix=$ac_optarg ;;
5929fbe7 1101
eb697db5
DN
1102 -program-transform-name | --program-transform-name \
1103 | --program-transform-nam | --program-transform-na \
1104 | --program-transform-n | --program-transform- \
1105 | --program-transform | --program-transfor \
1106 | --program-transfo | --program-transf \
1107 | --program-trans | --program-tran \
1108 | --progr-tra | --program-tr | --program-t)
1109 ac_prev=program_transform_name ;;
1110 -program-transform-name=* | --program-transform-name=* \
1111 | --program-transform-nam=* | --program-transform-na=* \
1112 | --program-transform-n=* | --program-transform-=* \
1113 | --program-transform=* | --program-transfor=* \
1114 | --program-transfo=* | --program-transf=* \
1115 | --program-trans=* | --program-tran=* \
1116 | --progr-tra=* | --program-tr=* | --program-t=*)
1117 program_transform_name=$ac_optarg ;;
5929fbe7 1118
eb697db5
DN
1119 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1120 ac_prev=pdfdir ;;
1121 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1122 pdfdir=$ac_optarg ;;
5929fbe7 1123
eb697db5
DN
1124 -psdir | --psdir | --psdi | --psd | --ps)
1125 ac_prev=psdir ;;
1126 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1127 psdir=$ac_optarg ;;
5929fbe7 1128
eb697db5
DN
1129 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1130 | -silent | --silent | --silen | --sile | --sil)
1131 silent=yes ;;
a4f64981 1132
eb697db5
DN
1133 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1134 ac_prev=sbindir ;;
1135 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1136 | --sbi=* | --sb=*)
1137 sbindir=$ac_optarg ;;
0c309b80 1138
eb697db5
DN
1139 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1140 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1141 | --sharedst | --shareds | --shared | --share | --shar \
1142 | --sha | --sh)
1143 ac_prev=sharedstatedir ;;
1144 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1145 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1146 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1147 | --sha=* | --sh=*)
1148 sharedstatedir=$ac_optarg ;;
5929fbe7 1149
eb697db5
DN
1150 -site | --site | --sit)
1151 ac_prev=site ;;
1152 -site=* | --site=* | --sit=*)
1153 site=$ac_optarg ;;
5929fbe7 1154
eb697db5
DN
1155 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1156 ac_prev=srcdir ;;
1157 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1158 srcdir=$ac_optarg ;;
a4f64981 1159
eb697db5
DN
1160 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1161 | --syscon | --sysco | --sysc | --sys | --sy)
1162 ac_prev=sysconfdir ;;
1163 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1164 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1165 sysconfdir=$ac_optarg ;;
a4f64981 1166
eb697db5
DN
1167 -target | --target | --targe | --targ | --tar | --ta | --t)
1168 ac_prev=target_alias ;;
1169 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1170 target_alias=$ac_optarg ;;
a4f64981 1171
eb697db5
DN
1172 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1173 verbose=yes ;;
a4f64981 1174
eb697db5
DN
1175 -version | --version | --versio | --versi | --vers | -V)
1176 ac_init_version=: ;;
a4f64981 1177
eb697db5
DN
1178 -with-* | --with-*)
1179 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1180 # Reject names that are not valid shell variable names.
1181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1182 as_fn_error "invalid package name: $ac_useropt"
1183 ac_useropt_orig=$ac_useropt
1184 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185 case $ac_user_opts in
1186 *"
1187"with_$ac_useropt"
1188"*) ;;
1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1190 ac_unrecognized_sep=', ';;
1191 esac
1192 eval with_$ac_useropt=\$ac_optarg ;;
1193
1194 -without-* | --without-*)
1195 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1196 # Reject names that are not valid shell variable names.
1197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1198 as_fn_error "invalid package name: $ac_useropt"
1199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=no ;;
e6df49e4 1209
eb697db5
DN
1210 --x)
1211 # Obsolete; use --with-x.
1212 with_x=yes ;;
a4f64981 1213
eb697db5
DN
1214 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1215 | --x-incl | --x-inc | --x-in | --x-i)
1216 ac_prev=x_includes ;;
1217 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1218 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1219 x_includes=$ac_optarg ;;
a4f64981 1220
eb697db5
DN
1221 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1222 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1223 ac_prev=x_libraries ;;
1224 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1225 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1226 x_libraries=$ac_optarg ;;
a4f64981 1227
eb697db5
DN
1228 -*) as_fn_error "unrecognized option: \`$ac_option'
1229Try \`$0 --help' for more information."
1230 ;;
a4f64981 1231
eb697db5
DN
1232 *=*)
1233 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1234 # Reject names that are not valid shell variable names.
1235 case $ac_envvar in #(
1236 '' | [0-9]* | *[!_$as_cr_alnum]* )
1237 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1238 esac
1239 eval $ac_envvar=\$ac_optarg
1240 export $ac_envvar ;;
a4f64981 1241
eb697db5
DN
1242 *)
1243 # FIXME: should be removed in autoconf 3.0.
1244 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1245 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1246 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1247 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1248 ;;
a4f64981 1249
eb697db5
DN
1250 esac
1251done
15e12598 1252
eb697db5
DN
1253if test -n "$ac_prev"; then
1254 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1255 as_fn_error "missing argument to $ac_option"
5929fbe7 1256fi
e6df49e4 1257
eb697db5
DN
1258if test -n "$ac_unrecognized_opts"; then
1259 case $enable_option_checking in
1260 no) ;;
1261 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1262 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1263 esac
e6df49e4 1264fi
15e12598 1265
eb697db5
DN
1266# Check all directory arguments for consistency.
1267for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1268 datadir sysconfdir sharedstatedir localstatedir includedir \
1269 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1270 libdir localedir mandir
1271do
1272 eval ac_val=\$$ac_var
1273 # Remove trailing slashes.
1274 case $ac_val in
1275 */ )
1276 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1277 eval $ac_var=\$ac_val;;
1278 esac
1279 # Be sure to have absolute directory names.
1280 case $ac_val in
1281 [\\/$]* | ?:[\\/]* ) continue;;
1282 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1283 esac
1284 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1285done
a4f64981 1286
eb697db5
DN
1287# There might be people who depend on the old broken behavior: `$host'
1288# used to hold the argument of --host etc.
1289# FIXME: To remove some day.
1290build=$build_alias
1291host=$host_alias
1292target=$target_alias
5929fbe7 1293
eb697db5
DN
1294# FIXME: To remove some day.
1295if test "x$host_alias" != x; then
1296 if test "x$build_alias" = x; then
1297 cross_compiling=maybe
1298 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1299 If a cross compiler is detected then cross compile mode will be used." >&2
1300 elif test "x$build_alias" != "x$host_alias"; then
1301 cross_compiling=yes
1302 fi
49ebbd65 1303fi
15e12598 1304
eb697db5
DN
1305ac_tool_prefix=
1306test -n "$host_alias" && ac_tool_prefix=$host_alias-
a4f64981 1307
eb697db5 1308test "$silent" = yes && exec 6>/dev/null
a5edbe4a 1309
15e12598 1310
eb697db5
DN
1311ac_pwd=`pwd` && test -n "$ac_pwd" &&
1312ac_ls_di=`ls -di .` &&
1313ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1314 as_fn_error "working directory cannot be determined"
1315test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1316 as_fn_error "pwd does not report name of working directory"
e6df49e4 1317
8c5ff6dd 1318
eb697db5
DN
1319# Find the source files, if location was not specified.
1320if test -z "$srcdir"; then
1321 ac_srcdir_defaulted=yes
1322 # Try the directory containing this script, then the parent directory.
1323 ac_confdir=`$as_dirname -- "$as_myself" ||
1324$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1325 X"$as_myself" : 'X\(//\)[^/]' \| \
1326 X"$as_myself" : 'X\(//\)$' \| \
1327 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1328$as_echo X"$as_myself" |
1329 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)[^/].*/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)$/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\).*/{
1342 s//\1/
1343 q
1344 }
1345 s/.*/./; q'`
1346 srcdir=$ac_confdir
1347 if test ! -r "$srcdir/$ac_unique_file"; then
1348 srcdir=..
1349 fi
5929fbe7 1350else
eb697db5 1351 ac_srcdir_defaulted=no
5929fbe7 1352fi
eb697db5
DN
1353if test ! -r "$srcdir/$ac_unique_file"; then
1354 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1355 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1356fi
1357ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1358ac_abs_confdir=`(
1359 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1360 pwd)`
1361# When building in place, set srcdir=.
1362if test "$ac_abs_confdir" = "$ac_pwd"; then
1363 srcdir=.
49ebbd65 1364fi
eb697db5
DN
1365# Remove unnecessary trailing slashes from srcdir.
1366# Double slashes in file names in object file debugging info
1367# mess up M-x gdb in Emacs.
1368case $srcdir in
1369*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1370esac
1371for ac_var in $ac_precious_vars; do
1372 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1373 eval ac_env_${ac_var}_value=\$${ac_var}
1374 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1375 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1376done
a4f64981 1377
eb697db5
DN
1378#
1379# Report the --help message.
1380#
1381if test "$ac_init_help" = "long"; then
1382 # Omit some internal or obsolete options to make the list less imposing.
1383 # This message is too long to be a string in the A/UX 3.1 sh.
1384 cat <<_ACEOF
1385\`configure' configures emacs 24.0.50 to adapt to many kinds of systems.
8c5ff6dd 1386
eb697db5 1387Usage: $0 [OPTION]... [VAR=VALUE]...
a4f64981 1388
eb697db5
DN
1389To assign environment variables (e.g., CC, CFLAGS...), specify them as
1390VAR=VALUE. See below for descriptions of some of the useful variables.
a4f64981 1391
eb697db5 1392Defaults for the options are specified in brackets.
a4f64981 1393
eb697db5
DN
1394Configuration:
1395 -h, --help display this help and exit
1396 --help=short display options specific to this package
1397 --help=recursive display the short help of all the included packages
1398 -V, --version display version information and exit
1399 -q, --quiet, --silent do not print \`checking...' messages
1400 --cache-file=FILE cache test results in FILE [disabled]
1401 -C, --config-cache alias for \`--cache-file=config.cache'
1402 -n, --no-create do not create output files
1403 --srcdir=DIR find the sources in DIR [configure dir or \`..']
a4f64981 1404
eb697db5
DN
1405Installation directories:
1406 --prefix=PREFIX install architecture-independent files in PREFIX
1407 [$ac_default_prefix]
1408 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1409 [PREFIX]
298b8a34 1410
eb697db5
DN
1411By default, \`make install' will install all the files in
1412\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1413an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1414for instance \`--prefix=\$HOME'.
a4f64981 1415
eb697db5 1416For better control, use the options below.
a4f64981 1417
eb697db5
DN
1418Fine tuning of the installation directories:
1419 --bindir=DIR user executables [EPREFIX/bin]
1420 --sbindir=DIR system admin executables [EPREFIX/sbin]
1421 --libexecdir=DIR program executables [EPREFIX/libexec]
1422 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1423 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1424 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1425 --libdir=DIR object code libraries [EPREFIX/lib]
1426 --includedir=DIR C header files [PREFIX/include]
1427 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1428 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1429 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1430 --infodir=DIR info documentation [DATAROOTDIR/info]
1431 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1432 --mandir=DIR man documentation [DATAROOTDIR/man]
1433 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
1434 --htmldir=DIR html documentation [DOCDIR]
1435 --dvidir=DIR dvi documentation [DOCDIR]
1436 --pdfdir=DIR pdf documentation [DOCDIR]
1437 --psdir=DIR ps documentation [DOCDIR]
1438_ACEOF
15e12598 1439
eb697db5 1440 cat <<\_ACEOF
e6df49e4 1441
eb697db5
DN
1442Program names:
1443 --program-prefix=PREFIX prepend PREFIX to installed program names
1444 --program-suffix=SUFFIX append SUFFIX to installed program names
1445 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
a4f64981 1446
eb697db5
DN
1447X features:
1448 --x-includes=DIR X include files are in DIR
1449 --x-libraries=DIR X library files are in DIR
a4f64981 1450
eb697db5
DN
1451System types:
1452 --build=BUILD configure for building on BUILD [guessed]
1453 --host=HOST cross-compile to build programs to run on HOST [BUILD]
8c5ff6dd 1454_ACEOF
eb697db5 1455fi
a4f64981 1456
eb697db5
DN
1457if test -n "$ac_init_help"; then
1458 case $ac_init_help in
1459 short | recursive ) echo "Configuration of emacs 24.0.50:";;
1460 esac
1461 cat <<\_ACEOF
e6df49e4 1462
eb697db5
DN
1463Optional Features:
1464 --disable-option-checking ignore unrecognized --enable/--with options
1465 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1466 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1467 --disable-ns-self-contained
1468 disable self contained build under NeXTstep
1469 --enable-asserts compile code with asserts enabled
1470 --enable-maintainer-mode
1471 enable make rules and dependencies not useful (and
1472 sometimes confusing) to the casual installer
1473 --enable-locallisppath=PATH
1474 directories Emacs should search for lisp files
1475 specific to this site
1476 --enable-checking[=LIST]
1477 enable expensive run-time checks. With LIST, enable
1478 only specific categories of checks. Categories are:
1479 all,yes,no. Flags are: stringbytes, stringoverrun,
1480 stringfreelist, xmallocoverrun, conslist
d9170db5
DN
1481 --enable-use-lisp-union-type
1482 use a union for the Lisp_Object data type. This is
1483 only useful for development for catching certain
1484 types of bugs.
eb697db5
DN
1485 --enable-profiling build emacs with profiling support. This might not
1486 work on all platforms
1487 --enable-autodepend automatically generate dependencies to .h-files.
1488 Requires GNU Make and Gcc. Enabled if GNU Make and
1489 Gcc is found
1490 --disable-largefile omit support for large files
1491
1492Optional Packages:
1493 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1494 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1495 --without-pop don't support POP mail retrieval with movemail
1496 --with-kerberos support Kerberos-authenticated POP
1497 --with-kerberos5 support Kerberos version 5 authenticated POP
1498 --with-hesiod support Hesiod to get the POP server host
1499 --with-mmdf support MMDF mailboxes
1500 --with-mail-unlink unlink, rather than empty, mail spool after reading
1501 --with-mailhost=HOSTNAME
1502 string giving default POP mail host
1503 --without-sound don't compile with sound support
1504 --without-sync-input process async input synchronously
e547b051
J
1505 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
1506 lucid or athena, motif, no)
eb697db5
DN
1507 --without-xpm don't compile with XPM image support
1508 --without-jpeg don't compile with JPEG image support
1509 --without-tiff don't compile with TIFF image support
1510 --without-gif don't compile with GIF image support
1511 --without-png don't compile with PNG image support
1512 --without-rsvg don't compile with SVG image support
1513 --without-xft don't use XFT for anti aliased fonts
1514 --without-libotf don't use libotf for OpenType font support
1515 --without-m17n-flt don't use m17n-flt for text shaping
1516 --without-toolkit-scroll-bars
1517 don't use Motif or Xaw3d scroll bars
1518 --without-xaw3d don't use Xaw3d
1519 --without-xim don't use X11 XIM
1520 --with-ns use nextstep (Cocoa or GNUstep) windowing system
1521 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1522 console
1523 --without-dbus don't compile with D-Bus support
1524 --without-gconf don't compile with GConf support
1525 --without-selinux don't compile with SELinux support
1526 --without-makeinfo don't require makeinfo for building manuals
e547b051 1527 --without-compress-info don't compress the installed Info pages
eb697db5
DN
1528 --with-pkg-config-prog=PATH
1529 path to pkg-config for finding GTK and librsvg
1530 --with-crt-dir=DIR directory containing crtn.o etc. The default is
1531 /usr/lib, or /usr/lib64 on some platforms.
1532 --with-gnustep-conf=PATH
1533 path to GNUstep.conf; default $GNUSTEP_CONFIG_FILE,
1534 or /etc/GNUstep/GNUstep.conf
1535 --with-x use the X Window System
e6df49e4 1536
eb697db5
DN
1537Some influential environment variables:
1538 CC C compiler command
1539 CFLAGS C compiler flags
1540 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1541 nonstandard directory <lib dir>
1542 LIBS libraries to pass to the linker, e.g. -l<library>
1543 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1544 you have headers in a nonstandard directory <include dir>
1545 CPP C preprocessor
1546 XMKMF Path to xmkmf, Makefile generator for X Window System
e6df49e4 1547
eb697db5
DN
1548Use these variables to override the choices made by `configure' or to help
1549it to find libraries and programs with nonstandard names/locations.
49ebbd65 1550
eb697db5 1551Report bugs to the package provider.
5929fbe7 1552_ACEOF
eb697db5 1553ac_status=$?
15e12598 1554fi
49ebbd65 1555
eb697db5
DN
1556if test "$ac_init_help" = "recursive"; then
1557 # If there are subdirs, report their specific --help.
1558 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1559 test -d "$ac_dir" ||
1560 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1561 continue
1562 ac_builddir=.
8c5ff6dd 1563
eb697db5
DN
1564case "$ac_dir" in
1565.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1566*)
1567 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1568 # A ".." for each directory in $ac_dir_suffix.
1569 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1570 case $ac_top_builddir_sub in
1571 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1572 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1573 esac ;;
1574esac
1575ac_abs_top_builddir=$ac_pwd
1576ac_abs_builddir=$ac_pwd$ac_dir_suffix
1577# for backward compatibility:
1578ac_top_builddir=$ac_top_build_prefix
e6df49e4 1579
eb697db5
DN
1580case $srcdir in
1581 .) # We are building in place.
1582 ac_srcdir=.
1583 ac_top_srcdir=$ac_top_builddir_sub
1584 ac_abs_top_srcdir=$ac_pwd ;;
1585 [\\/]* | ?:[\\/]* ) # Absolute name.
1586 ac_srcdir=$srcdir$ac_dir_suffix;
1587 ac_top_srcdir=$srcdir
1588 ac_abs_top_srcdir=$srcdir ;;
1589 *) # Relative name.
1590 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1591 ac_top_srcdir=$ac_top_build_prefix$srcdir
1592 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1593esac
1594ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15e12598 1595
eb697db5
DN
1596 cd "$ac_dir" || { ac_status=$?; continue; }
1597 # Check for guested configure.
1598 if test -f "$ac_srcdir/configure.gnu"; then
1599 echo &&
1600 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1601 elif test -f "$ac_srcdir/configure"; then
1602 echo &&
1603 $SHELL "$ac_srcdir/configure" --help=recursive
1604 else
1605 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1606 fi || ac_status=$?
1607 cd "$ac_pwd" || { ac_status=$?; break; }
1608 done
1609fi
a4f64981 1610
eb697db5
DN
1611test -n "$ac_init_help" && exit $ac_status
1612if $ac_init_version; then
1613 cat <<\_ACEOF
1614emacs configure 24.0.50
1615generated by GNU Autoconf 2.65
a4f64981 1616
eb697db5
DN
1617Copyright (C) 2009 Free Software Foundation, Inc.
1618This configure script is free software; the Free Software Foundation
1619gives unlimited permission to copy, distribute and modify it.
5929fbe7 1620_ACEOF
eb697db5 1621 exit
a4f64981 1622fi
8c5ff6dd 1623
eb697db5
DN
1624## ------------------------ ##
1625## Autoconf initialization. ##
1626## ------------------------ ##
a4f64981 1627
eb697db5
DN
1628# ac_fn_c_try_compile LINENO
1629# --------------------------
1630# Try to compile conftest.$ac_ext, and return whether this succeeded.
1631ac_fn_c_try_compile ()
5929fbe7 1632{
eb697db5
DN
1633 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1634 rm -f conftest.$ac_objext
1635 if { { ac_try="$ac_compile"
5929fbe7
GM
1636case "(($ac_try" in
1637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1638 *) ac_try_echo=$ac_try;;
1639esac
eb697db5
DN
1640eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1641$as_echo "$ac_try_echo"; } >&5
1642 (eval "$ac_compile") 2>conftest.err
5929fbe7 1643 ac_status=$?
eb697db5
DN
1644 if test -s conftest.err; then
1645 grep -v '^ *+' conftest.err >conftest.er1
1646 cat conftest.er1 >&5
1647 mv -f conftest.er1 conftest.err
1648 fi
1649 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1650 test $ac_status = 0; } && {
5929fbe7
GM
1651 test -z "$ac_c_werror_flag" ||
1652 test ! -s conftest.err
eb697db5
DN
1653 } && test -s conftest.$ac_objext; then :
1654 ac_retval=0
8c5ff6dd 1655else
5929fbe7
GM
1656 $as_echo "$as_me: failed program was:" >&5
1657sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1658
eb697db5 1659 ac_retval=1
5929fbe7 1660fi
eb697db5
DN
1661 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1662 as_fn_set_status $ac_retval
1663
1664} # ac_fn_c_try_compile
1665
1666# ac_fn_c_try_link LINENO
1667# -----------------------
1668# Try to link conftest.$ac_ext, and return whether this succeeded.
1669ac_fn_c_try_link ()
1670{
1671 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1672 rm -f conftest.$ac_objext conftest$ac_exeext
1673 if { { ac_try="$ac_link"
5929fbe7
GM
1674case "(($ac_try" in
1675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1676 *) ac_try_echo=$ac_try;;
1677esac
eb697db5
DN
1678eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1679$as_echo "$ac_try_echo"; } >&5
1680 (eval "$ac_link") 2>conftest.err
5929fbe7 1681 ac_status=$?
eb697db5
DN
1682 if test -s conftest.err; then
1683 grep -v '^ *+' conftest.err >conftest.er1
1684 cat conftest.er1 >&5
1685 mv -f conftest.er1 conftest.err
1686 fi
1687 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1688 test $ac_status = 0; } && {
5929fbe7
GM
1689 test -z "$ac_c_werror_flag" ||
1690 test ! -s conftest.err
eb697db5
DN
1691 } && test -s conftest$ac_exeext && {
1692 test "$cross_compiling" = yes ||
1693 $as_test_x conftest$ac_exeext
1694 }; then :
1695 ac_retval=0
5929fbe7
GM
1696else
1697 $as_echo "$as_me: failed program was:" >&5
1698sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1699
eb697db5 1700 ac_retval=1
cd03c74a 1701fi
eb697db5
DN
1702 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1703 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1704 # interfere with the next link command; also delete a directory that is
1705 # left behind by Apple's compiler. We do this before executing the actions.
1706 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1707 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1708 as_fn_set_status $ac_retval
08b47d3d 1709
eb697db5 1710} # ac_fn_c_try_link
08b47d3d 1711
eb697db5
DN
1712# ac_fn_c_try_cpp LINENO
1713# ----------------------
1714# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1715ac_fn_c_try_cpp ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 if { { ac_try="$ac_cpp conftest.$ac_ext"
5929fbe7
GM
1719case "(($ac_try" in
1720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1721 *) ac_try_echo=$ac_try;;
1722esac
eb697db5
DN
1723eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1724$as_echo "$ac_try_echo"; } >&5
1725 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
5929fbe7 1726 ac_status=$?
eb697db5
DN
1727 if test -s conftest.err; then
1728 grep -v '^ *+' conftest.err >conftest.er1
1729 cat conftest.er1 >&5
1730 mv -f conftest.er1 conftest.err
1731 fi
1732 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1733 test $ac_status = 0; } >/dev/null && {
5929fbe7
GM
1734 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1735 test ! -s conftest.err
eb697db5
DN
1736 }; then :
1737 ac_retval=0
5929fbe7
GM
1738else
1739 $as_echo "$as_me: failed program was:" >&5
1740sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 1741
eb697db5
DN
1742 ac_retval=1
1743fi
1744 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1745 as_fn_set_status $ac_retval
1746
1747} # ac_fn_c_try_cpp
1748
1749# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1750# -------------------------------------------------------
1751# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1752# the include files in INCLUDES and setting the cache variable VAR
1753# accordingly.
1754ac_fn_c_check_header_mongrel ()
1755{
1756 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1757 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1759$as_echo_n "checking for $2... " >&6; }
1760if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1761 $as_echo_n "(cached) " >&6
1762fi
1763eval ac_res=\$$3
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1765$as_echo "$ac_res" >&6; }
1766else
1767 # Is the header compilable?
1768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1769$as_echo_n "checking $2 usability... " >&6; }
1770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1771/* end confdefs.h. */
1772$4
1773#include <$2>
1774_ACEOF
1775if ac_fn_c_try_compile "$LINENO"; then :
1776 ac_header_compiler=yes
1777else
1778 ac_header_compiler=no
8c5ff6dd 1779fi
eb697db5
DN
1780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1782$as_echo "$ac_header_compiler" >&6; }
e6df49e4 1783
eb697db5
DN
1784# Is the header present?
1785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1786$as_echo_n "checking $2 presence... " >&6; }
1787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1788/* end confdefs.h. */
1789#include <$2>
1790_ACEOF
1791if ac_fn_c_try_cpp "$LINENO"; then :
1792 ac_header_preproc=yes
1793else
1794 ac_header_preproc=no
1795fi
5929fbe7 1796rm -f conftest.err conftest.$ac_ext
eb697db5 1797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
5929fbe7 1798$as_echo "$ac_header_preproc" >&6; }
a4f64981 1799
5929fbe7 1800# So? What about this header?
eb697db5 1801case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
5929fbe7 1802 yes:no: )
eb697db5
DN
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1804$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1806$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
5929fbe7
GM
1807 ;;
1808 no:yes:* )
eb697db5
DN
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1810$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1812$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1814$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1816$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1818$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
5929fbe7
GM
1819 ;;
1820esac
eb697db5
DN
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1822$as_echo_n "checking for $2... " >&6; }
1823if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7
GM
1824 $as_echo_n "(cached) " >&6
1825else
eb697db5 1826 eval "$3=\$ac_header_compiler"
8c5ff6dd 1827fi
eb697db5
DN
1828eval ac_res=\$$3
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5929fbe7 1830$as_echo "$ac_res" >&6; }
a4f64981 1831fi
eb697db5 1832 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a4f64981 1833
eb697db5 1834} # ac_fn_c_check_header_mongrel
5929fbe7 1835
eb697db5
DN
1836# ac_fn_c_try_run LINENO
1837# ----------------------
1838# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1839# that executables *can* be run.
1840ac_fn_c_try_run ()
5929fbe7 1841{
eb697db5
DN
1842 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1843 if { { ac_try="$ac_link"
5929fbe7
GM
1844case "(($ac_try" in
1845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1846 *) ac_try_echo=$ac_try;;
1847esac
eb697db5
DN
1848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1849$as_echo "$ac_try_echo"; } >&5
1850 (eval "$ac_link") 2>&5
5929fbe7 1851 ac_status=$?
eb697db5
DN
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1854 { { case "(($ac_try" in
1855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1856 *) ac_try_echo=$ac_try;;
1857esac
1858eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1859$as_echo "$ac_try_echo"; } >&5
1860 (eval "$ac_try") 2>&5
1861 ac_status=$?
1862 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1863 test $ac_status = 0; }; }; then :
1864 ac_retval=0
8c5ff6dd 1865else
eb697db5
DN
1866 $as_echo "$as_me: program exited with status $ac_status" >&5
1867 $as_echo "$as_me: failed program was:" >&5
5929fbe7 1868sed 's/^/| /' conftest.$ac_ext >&5
15e12598 1869
eb697db5 1870 ac_retval=$ac_status
5929fbe7 1871fi
eb697db5
DN
1872 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1873 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1874 as_fn_set_status $ac_retval
1875
1876} # ac_fn_c_try_run
8c5ff6dd 1877
eb697db5
DN
1878# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1879# -------------------------------------------------------
1880# Tests whether HEADER exists and can be compiled using the include files in
1881# INCLUDES, setting the cache variable VAR accordingly.
1882ac_fn_c_check_header_compile ()
1883{
1884 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1886$as_echo_n "checking for $2... " >&6; }
1887if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1888 $as_echo_n "(cached) " >&6
1889else
1890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892$4
1893#include <$2>
1894_ACEOF
1895if ac_fn_c_try_compile "$LINENO"; then :
1896 eval "$3=yes"
1897else
1898 eval "$3=no"
1899fi
1900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 1901fi
eb697db5
DN
1902eval ac_res=\$$3
1903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5929fbe7 1904$as_echo "$ac_res" >&6; }
eb697db5 1905 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
15e12598 1906
eb697db5 1907} # ac_fn_c_check_header_compile
e6df49e4 1908
eb697db5
DN
1909# ac_fn_c_check_decl LINENO SYMBOL VAR
1910# ------------------------------------
1911# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
1912ac_fn_c_check_decl ()
1913{
1914 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
1916$as_echo_n "checking whether $2 is declared... " >&6; }
1917if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7
GM
1918 $as_echo_n "(cached) " >&6
1919else
eb697db5 1920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 1921/* end confdefs.h. */
eb697db5 1922$4
5929fbe7
GM
1923int
1924main ()
1925{
eb697db5
DN
1926#ifndef $2
1927 (void) $2;
1928#endif
e6df49e4 1929
eb697db5 1930 ;
5929fbe7
GM
1931 return 0;
1932}
1933_ACEOF
eb697db5
DN
1934if ac_fn_c_try_compile "$LINENO"; then :
1935 eval "$3=yes"
5929fbe7 1936else
eb697db5 1937 eval "$3=no"
5929fbe7 1938fi
eb697db5 1939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
0c309b80 1940fi
eb697db5
DN
1941eval ac_res=\$$3
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1943$as_echo "$ac_res" >&6; }
1944 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
8c5ff6dd 1945
eb697db5 1946} # ac_fn_c_check_decl
0c309b80 1947
eb697db5
DN
1948# ac_fn_c_check_header_preproc LINENO HEADER VAR
1949# ----------------------------------------------
1950# Tests whether HEADER is present, setting the cache variable VAR accordingly.
1951ac_fn_c_check_header_preproc ()
1952{
1953 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1955$as_echo_n "checking for $2... " >&6; }
1956if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1957 $as_echo_n "(cached) " >&6
1958else
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961#include <$2>
1962_ACEOF
1963if ac_fn_c_try_cpp "$LINENO"; then :
1964 eval "$3=yes"
1965else
1966 eval "$3=no"
a4f64981 1967fi
eb697db5
DN
1968rm -f conftest.err conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
1973 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
e6df49e4 1974
eb697db5 1975} # ac_fn_c_check_header_preproc
a5edbe4a 1976
eb697db5
DN
1977# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1978# ----------------------------------------------------
1979# Tries to find if the field MEMBER exists in type AGGR, after including
1980# INCLUDES, setting cache variable VAR accordingly.
1981ac_fn_c_check_member ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1985$as_echo_n "checking for $2.$3... " >&6; }
1986if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
1987 $as_echo_n "(cached) " >&6
1988else
1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990/* end confdefs.h. */
1991$5
1992int
1993main ()
1994{
1995static $2 ac_aggr;
1996if (ac_aggr.$3)
1997return 0;
1998 ;
1999 return 0;
2000}
2001_ACEOF
2002if ac_fn_c_try_compile "$LINENO"; then :
2003 eval "$4=yes"
2004else
2005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$5
2008int
2009main ()
2010{
2011static $2 ac_aggr;
2012if (sizeof ac_aggr.$3)
2013return 0;
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019 eval "$4=yes"
2020else
2021 eval "$4=no"
8c5ff6dd 2022fi
eb697db5 2023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 2024fi
eb697db5
DN
2025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2026fi
2027eval ac_res=\$$4
2028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2029$as_echo "$ac_res" >&6; }
2030 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
a5edbe4a 2031
eb697db5 2032} # ac_fn_c_check_member
106c6f74 2033
eb697db5
DN
2034# ac_fn_c_check_func LINENO FUNC VAR
2035# ----------------------------------
2036# Tests whether FUNC exists, setting the cache variable VAR accordingly
2037ac_fn_c_check_func ()
2038{
2039 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2041$as_echo_n "checking for $2... " >&6; }
2042if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7
GM
2043 $as_echo_n "(cached) " >&6
2044else
eb697db5 2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 2046/* end confdefs.h. */
eb697db5
DN
2047/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2048 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2049#define $2 innocuous_$2
2050
2051/* System header to define __stub macros and hopefully few prototypes,
2052 which can conflict with char $2 (); below.
2053 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2054 <limits.h> exists even on freestanding compilers. */
2055
2056#ifdef __STDC__
2057# include <limits.h>
2058#else
2059# include <assert.h>
2060#endif
2061
2062#undef $2
8c5ff6dd 2063
5929fbe7
GM
2064/* Override any GCC internal prototype to avoid an error.
2065 Use char because int might match the return type of a GCC
2066 builtin and then its argument prototype would still apply. */
2067#ifdef __cplusplus
2068extern "C"
2069#endif
eb697db5
DN
2070char $2 ();
2071/* The GNU C library defines this for functions which it implements
2072 to always fail with ENOSYS. Some functions are actually named
2073 something starting with __ and the normal name is an alias. */
2074#if defined __stub_$2 || defined __stub___$2
2075choke me
2076#endif
2077
5929fbe7
GM
2078int
2079main ()
2080{
eb697db5 2081return $2 ();
5929fbe7
GM
2082 ;
2083 return 0;
2084}
2085_ACEOF
eb697db5
DN
2086if ac_fn_c_try_link "$LINENO"; then :
2087 eval "$3=yes"
5929fbe7 2088else
eb697db5
DN
2089 eval "$3=no"
2090fi
2091rm -f core conftest.err conftest.$ac_objext \
2092 conftest$ac_exeext conftest.$ac_ext
2093fi
2094eval ac_res=\$$3
2095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2096$as_echo "$ac_res" >&6; }
2097 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2098
2099} # ac_fn_c_check_func
2100
2101# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2102# -------------------------------------------
2103# Tests whether TYPE exists after having included INCLUDES, setting cache
2104# variable VAR accordingly.
2105ac_fn_c_check_type ()
2106{
2107 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2109$as_echo_n "checking for $2... " >&6; }
2110if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2111 $as_echo_n "(cached) " >&6
2112else
2113 eval "$3=no"
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
2118main ()
2119{
2120if (sizeof ($2))
2121 return 0;
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130int
2131main ()
2132{
2133if (sizeof (($2)))
2134 return 0;
2135 ;
2136 return 0;
2137}
2138_ACEOF
2139if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 2140
eb697db5
DN
2141else
2142 eval "$3=yes"
2143fi
2144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 2147fi
eb697db5
DN
2148eval ac_res=\$$3
2149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2150$as_echo "$ac_res" >&6; }
2151 eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2152
2153} # ac_fn_c_check_type
2154cat >config.log <<_ACEOF
2155This file contains any messages produced by compilers while
2156running configure, to aid debugging if configure makes a mistake.
2157
2158It was created by emacs $as_me 24.0.50, which was
2159generated by GNU Autoconf 2.65. Invocation command line was
2160
2161 $ $0 $@
2162
2163_ACEOF
2164exec 5>>config.log
2165{
2166cat <<_ASUNAME
2167## --------- ##
2168## Platform. ##
2169## --------- ##
2170
2171hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2172uname -m = `(uname -m) 2>/dev/null || echo unknown`
2173uname -r = `(uname -r) 2>/dev/null || echo unknown`
2174uname -s = `(uname -s) 2>/dev/null || echo unknown`
2175uname -v = `(uname -v) 2>/dev/null || echo unknown`
2176
2177/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2178/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2179
2180/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2181/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2182/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2183/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2184/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2185/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2186/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2187
2188_ASUNAME
2189
2190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2191for as_dir in $PATH
2192do
2193 IFS=$as_save_IFS
2194 test -z "$as_dir" && as_dir=.
2195 $as_echo "PATH: $as_dir"
2196 done
2197IFS=$as_save_IFS
2198
2199} >&5
2200
2201cat >&5 <<_ACEOF
2202
2203
2204## ----------- ##
2205## Core tests. ##
2206## ----------- ##
2207
2208_ACEOF
2209
2210
2211# Keep a trace of the command line.
2212# Strip out --no-create and --no-recursion so they do not pile up.
2213# Strip out --silent because we don't want to record it for future runs.
2214# Also quote any args containing shell meta-characters.
2215# Make two passes to allow for proper duplicate-argument suppression.
2216ac_configure_args=
2217ac_configure_args0=
2218ac_configure_args1=
2219ac_must_keep_next=false
2220for ac_pass in 1 2
2221do
2222 for ac_arg
2223 do
2224 case $ac_arg in
2225 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2226 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2227 | -silent | --silent | --silen | --sile | --sil)
2228 continue ;;
2229 *\'*)
2230 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2231 esac
2232 case $ac_pass in
2233 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2234 2)
2235 as_fn_append ac_configure_args1 " '$ac_arg'"
2236 if test $ac_must_keep_next = true; then
2237 ac_must_keep_next=false # Got value, back to normal.
2238 else
2239 case $ac_arg in
2240 *=* | --config-cache | -C | -disable-* | --disable-* \
2241 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2242 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2243 | -with-* | --with-* | -without-* | --without-* | --x)
2244 case "$ac_configure_args0 " in
2245 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2246 esac
2247 ;;
2248 -* ) ac_must_keep_next=true ;;
2249 esac
2250 fi
2251 as_fn_append ac_configure_args " '$ac_arg'"
2252 ;;
2253 esac
2254 done
2255done
2256{ ac_configure_args0=; unset ac_configure_args0;}
2257{ ac_configure_args1=; unset ac_configure_args1;}
2258
2259# When interrupted or exit'd, cleanup temporary files, and complete
2260# config.log. We remove comments because anyway the quotes in there
2261# would cause problems or look ugly.
2262# WARNING: Use '\'' to represent an apostrophe within the trap.
2263# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2264trap 'exit_status=$?
2265 # Save into config.log some information that might help in debugging.
2266 {
2267 echo
2268
2269 cat <<\_ASBOX
2270## ---------------- ##
2271## Cache variables. ##
2272## ---------------- ##
2273_ASBOX
2274 echo
2275 # The following way of writing the cache mishandles newlines in values,
2276(
2277 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2278 eval ac_val=\$$ac_var
2279 case $ac_val in #(
2280 *${as_nl}*)
2281 case $ac_var in #(
2282 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2283$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2284 esac
2285 case $ac_var in #(
2286 _ | IFS | as_nl) ;; #(
2287 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2288 *) { eval $ac_var=; unset $ac_var;} ;;
2289 esac ;;
2290 esac
2291 done
2292 (set) 2>&1 |
2293 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2294 *${as_nl}ac_space=\ *)
2295 sed -n \
2296 "s/'\''/'\''\\\\'\'''\''/g;
2297 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2298 ;; #(
2299 *)
2300 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2301 ;;
2302 esac |
2303 sort
2304)
2305 echo
08b47d3d 2306
eb697db5
DN
2307 cat <<\_ASBOX
2308## ----------------- ##
2309## Output variables. ##
2310## ----------------- ##
2311_ASBOX
2312 echo
2313 for ac_var in $ac_subst_vars
2314 do
2315 eval ac_val=\$$ac_var
2316 case $ac_val in
2317 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2318 esac
2319 $as_echo "$ac_var='\''$ac_val'\''"
2320 done | sort
2321 echo
a5edbe4a 2322
eb697db5
DN
2323 if test -n "$ac_subst_files"; then
2324 cat <<\_ASBOX
2325## ------------------- ##
2326## File substitutions. ##
2327## ------------------- ##
2328_ASBOX
2329 echo
2330 for ac_var in $ac_subst_files
2331 do
2332 eval ac_val=\$$ac_var
2333 case $ac_val in
2334 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2335 esac
2336 $as_echo "$ac_var='\''$ac_val'\''"
2337 done | sort
2338 echo
2339 fi
a5edbe4a 2340
eb697db5
DN
2341 if test -s confdefs.h; then
2342 cat <<\_ASBOX
2343## ----------- ##
2344## confdefs.h. ##
2345## ----------- ##
2346_ASBOX
2347 echo
2348 cat confdefs.h
2349 echo
2350 fi
2351 test "$ac_signal" != 0 &&
2352 $as_echo "$as_me: caught signal $ac_signal"
2353 $as_echo "$as_me: exit $exit_status"
2354 } >&5
2355 rm -f core *.core core.conftest.* &&
2356 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2357 exit $exit_status
2358' 0
2359for ac_signal in 1 2 13 15; do
2360 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2361done
2362ac_signal=0
cd03c74a 2363
eb697db5
DN
2364# confdefs.h avoids OS command line length limits that DEFS can exceed.
2365rm -f -r conftest* confdefs.h
a5edbe4a 2366
eb697db5 2367$as_echo "/* confdefs.h */" > confdefs.h
a4f64981 2368
eb697db5 2369# Predefined preprocessor variables.
8c5ff6dd 2370
eb697db5
DN
2371cat >>confdefs.h <<_ACEOF
2372#define PACKAGE_NAME "$PACKAGE_NAME"
5929fbe7 2373_ACEOF
8c5ff6dd 2374
eb697db5
DN
2375cat >>confdefs.h <<_ACEOF
2376#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2377_ACEOF
8c5ff6dd 2378
eb697db5
DN
2379cat >>confdefs.h <<_ACEOF
2380#define PACKAGE_VERSION "$PACKAGE_VERSION"
5929fbe7 2381_ACEOF
8c5ff6dd 2382
eb697db5
DN
2383cat >>confdefs.h <<_ACEOF
2384#define PACKAGE_STRING "$PACKAGE_STRING"
5929fbe7 2385_ACEOF
8c5ff6dd 2386
eb697db5
DN
2387cat >>confdefs.h <<_ACEOF
2388#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2389_ACEOF
8c5ff6dd 2390
eb697db5
DN
2391cat >>confdefs.h <<_ACEOF
2392#define PACKAGE_URL "$PACKAGE_URL"
5929fbe7 2393_ACEOF
8c5ff6dd 2394
8c5ff6dd 2395
eb697db5
DN
2396# Let the site file select an alternate cache file if it wants to.
2397# Prefer an explicitly selected file to automatically selected ones.
2398ac_site_file1=NONE
2399ac_site_file2=NONE
2400if test -n "$CONFIG_SITE"; then
2401 ac_site_file1=$CONFIG_SITE
2402elif test "x$prefix" != xNONE; then
2403 ac_site_file1=$prefix/share/config.site
2404 ac_site_file2=$prefix/etc/config.site
2405else
2406 ac_site_file1=$ac_default_prefix/share/config.site
2407 ac_site_file2=$ac_default_prefix/etc/config.site
5929fbe7 2408fi
eb697db5
DN
2409for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2410do
2411 test "x$ac_site_file" = xNONE && continue
2412 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2414$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2415 sed 's/^/| /' "$ac_site_file" >&5
2416 . "$ac_site_file"
2417 fi
2418done
49ebbd65 2419
eb697db5
DN
2420if test -r "$cache_file"; then
2421 # Some versions of bash will fail to source /dev/null (special files
2422 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2423 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2425$as_echo "$as_me: loading cache $cache_file" >&6;}
2426 case $cache_file in
2427 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2428 *) . "./$cache_file";;
2429 esac
2430 fi
5929fbe7 2431else
eb697db5
DN
2432 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2433$as_echo "$as_me: creating cache $cache_file" >&6;}
2434 >$cache_file
2435fi
49ebbd65 2436
eb697db5
DN
2437as_fn_append ac_header_list " stdlib.h"
2438as_fn_append ac_header_list " unistd.h"
2439as_fn_append ac_header_list " sys/param.h"
2440as_fn_append ac_header_list " sys/time.h"
2441as_fn_append ac_func_list " alarm"
2442# Check that the precious variables saved in the cache have kept the same
2443# value.
2444ac_cache_corrupted=false
2445for ac_var in $ac_precious_vars; do
2446 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2447 eval ac_new_set=\$ac_env_${ac_var}_set
2448 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2449 eval ac_new_val=\$ac_env_${ac_var}_value
2450 case $ac_old_set,$ac_new_set in
2451 set,)
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2453$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2454 ac_cache_corrupted=: ;;
2455 ,set)
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2457$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2458 ac_cache_corrupted=: ;;
2459 ,);;
2460 *)
2461 if test "x$ac_old_val" != "x$ac_new_val"; then
2462 # differences in whitespace do not lead to failure.
2463 ac_old_val_w=`echo x $ac_old_val`
2464 ac_new_val_w=`echo x $ac_new_val`
2465 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2467$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2468 ac_cache_corrupted=:
2469 else
2470 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2471$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2472 eval $ac_var=\$ac_old_val
2473 fi
2474 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2475$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2476 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2477$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2478 fi;;
2479 esac
2480 # Pass precious variables to config.status.
2481 if test "$ac_new_set" = set; then
2482 case $ac_new_val in
2483 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2484 *) ac_arg=$ac_var=$ac_new_val ;;
2485 esac
2486 case " $ac_configure_args " in
2487 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2488 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
8c5ff6dd 2489 esac
eb697db5
DN
2490 fi
2491done
2492if $ac_cache_corrupted; then
2493 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2494$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2495 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2496$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2497 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2498fi
2499## -------------------- ##
2500## Main body of script. ##
2501## -------------------- ##
2502
2503ac_ext=c
2504ac_cpp='$CPP $CPPFLAGS'
2505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2507ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 2508
e6df49e4 2509
eb697db5 2510ac_config_headers="$ac_config_headers src/config.h:src/config.in"
49ebbd65 2511
a4f64981 2512
a4f64981 2513
eb697db5
DN
2514test "$program_prefix" != NONE &&
2515 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2516# Use a double $ so make ignores it.
2517test "$program_suffix" != NONE &&
2518 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2519# Double any \ or $.
2520# By default was `s,x,x', remove it if useless.
2521ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2522program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
a4f64981 2523
49ebbd65 2524
eb697db5
DN
2525lispdir='${datadir}/emacs/${version}/lisp'
2526locallisppath='${datadir}/emacs/${version}/site-lisp:'\
2527'${datadir}/emacs/site-lisp'
2528lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
2529etcdir='${datadir}/emacs/${version}/etc'
2530archlibdir='${libexecdir}/emacs/${version}/${configuration}'
2531docdir='${datadir}/emacs/${version}/etc'
2532gamedir='${localstatedir}/games/emacs'
49ebbd65 2533
eb697db5 2534gameuser=games
49ebbd65 2535
49ebbd65 2536
a4f64981 2537
eb697db5
DN
2538
2539# Check whether --with-pop was given.
2540if test "${with_pop+set}" = set; then :
2541 withval=$with_pop;
5929fbe7 2542else
eb697db5
DN
2543 with_pop=yes
2544fi
2545
2546if test "$with_pop" = yes; then
2547 $as_echo "#define MAIL_USE_POP 1" >>confdefs.h
a4f64981 2548
5929fbe7
GM
2549fi
2550
5929fbe7 2551
eb697db5
DN
2552# Check whether --with-kerberos was given.
2553if test "${with_kerberos+set}" = set; then :
2554 withval=$with_kerberos;
5929fbe7 2555else
eb697db5
DN
2556 with_kerberos=no
2557fi
2558
2559if test "$with_kerberos" != no; then
2560 $as_echo "#define KERBEROS 1" >>confdefs.h
9452ded1 2561
5929fbe7 2562fi
a4f64981 2563
15e12598 2564
eb697db5
DN
2565# Check whether --with-kerberos5 was given.
2566if test "${with_kerberos5+set}" = set; then :
2567 withval=$with_kerberos5;
5929fbe7 2568else
eb697db5 2569 with_kerberos5=no
a4f64981
GM
2570fi
2571
eb697db5
DN
2572if test "${with_kerberos5}" != no; then
2573 if test "${with_kerberos}" = no; then
2574 with_kerberos=yes
2575 $as_echo "#define KERBEROS 1" >>confdefs.h
a4f64981 2576
5929fbe7 2577 fi
a5edbe4a 2578
eb697db5 2579$as_echo "#define KERBEROS5 1" >>confdefs.h
a4f64981 2580
eb697db5 2581fi
a4f64981 2582
a5edbe4a 2583
eb697db5
DN
2584# Check whether --with-hesiod was given.
2585if test "${with_hesiod+set}" = set; then :
2586 withval=$with_hesiod;
49ebbd65 2587else
eb697db5
DN
2588 with_hesiod=no
2589fi
5929fbe7 2590
eb697db5 2591if test "$with_hesiod" != no; then
5929fbe7 2592
eb697db5 2593$as_echo "#define HESIOD 1" >>confdefs.h
5929fbe7 2594
eb697db5 2595fi
5929fbe7 2596
5929fbe7 2597
eb697db5
DN
2598# Check whether --with-mmdf was given.
2599if test "${with_mmdf+set}" = set; then :
2600 withval=$with_mmdf;
8c5ff6dd 2601else
eb697db5 2602 with_mmdf=no
15e12598 2603fi
5929fbe7 2604
eb697db5 2605if test "$with_mmdf" != no; then
a5edbe4a 2606
eb697db5 2607$as_echo "#define MAIL_USE_MMDF 1" >>confdefs.h
a5edbe4a 2608
8c5ff6dd 2609fi
5929fbe7 2610
5929fbe7 2611
eb697db5
DN
2612# Check whether --with-mail-unlink was given.
2613if test "${with_mail_unlink+set}" = set; then :
2614 withval=$with_mail_unlink;
8c5ff6dd 2615else
eb697db5 2616 with_mail_unlink=no
8c5ff6dd 2617fi
5929fbe7 2618
eb697db5
DN
2619if test "$with_mail_unlink" != no; then
2620
2621$as_echo "#define MAIL_UNLINK_SPOOL 1" >>confdefs.h
2622
8c5ff6dd 2623fi
a5edbe4a 2624
5929fbe7 2625
eb697db5
DN
2626# Check whether --with-mailhost was given.
2627if test "${with_mailhost+set}" = set; then :
2628 withval=$with_mailhost;
2629cat >>confdefs.h <<_ACEOF
2630#define MAILHOST "$withval"
5929fbe7
GM
2631_ACEOF
2632
8c5ff6dd 2633fi
a4f64981 2634
5929fbe7 2635
5929fbe7 2636
eb697db5
DN
2637# Check whether --with-sound was given.
2638if test "${with_sound+set}" = set; then :
2639 withval=$with_sound;
2640else
2641 with_sound=yes
2642fi
5929fbe7 2643
5929fbe7 2644
a4f64981 2645
eb697db5
DN
2646# Check whether --with-sync-input was given.
2647if test "${with_sync_input+set}" = set; then :
2648 withval=$with_sync_input;
8c5ff6dd 2649else
eb697db5 2650 with_sync_input=yes
8c5ff6dd 2651fi
a4f64981 2652
eb697db5 2653if test "$with_sync_input" = yes; then
a4f64981 2654
eb697db5 2655$as_echo "#define SYNC_INPUT 1" >>confdefs.h
5929fbe7 2656
eb697db5 2657fi
5929fbe7 2658
5929fbe7 2659
eb697db5
DN
2660# Check whether --with-x-toolkit was given.
2661if test "${with_x_toolkit+set}" = set; then :
2662 withval=$with_x_toolkit; case "${withval}" in
2663 y | ye | yes ) val=gtk ;;
2664 n | no ) val=no ;;
2665 l | lu | luc | luci | lucid ) val=lucid ;;
2666 a | at | ath | athe | athen | athena ) val=athena ;;
2667 m | mo | mot | moti | motif ) val=motif ;;
2668 g | gt | gtk ) val=gtk ;;
e547b051 2669 gtk3 ) val=gtk3 ;;
eb697db5
DN
2670 * )
2671as_fn_error "\`--with-x-toolkit=$withval' is invalid;
e547b051
J
2672this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
2673\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
eb697db5
DN
2674 ;;
2675 esac
2676 with_x_toolkit=$val
5929fbe7 2677
eb697db5 2678fi
5929fbe7 2679
5929fbe7
GM
2680
2681
eb697db5
DN
2682# Check whether --with-xpm was given.
2683if test "${with_xpm+set}" = set; then :
2684 withval=$with_xpm;
2685else
2686 with_xpm=yes
2687fi
5929fbe7 2688
5929fbe7 2689
eb697db5
DN
2690# Check whether --with-jpeg was given.
2691if test "${with_jpeg+set}" = set; then :
2692 withval=$with_jpeg;
2693else
2694 with_jpeg=yes
2695fi
5929fbe7
GM
2696
2697
eb697db5
DN
2698# Check whether --with-tiff was given.
2699if test "${with_tiff+set}" = set; then :
2700 withval=$with_tiff;
2701else
2702 with_tiff=yes
2703fi
5929fbe7
GM
2704
2705
eb697db5
DN
2706# Check whether --with-gif was given.
2707if test "${with_gif+set}" = set; then :
2708 withval=$with_gif;
2709else
2710 with_gif=yes
2711fi
5929fbe7 2712
5929fbe7 2713
eb697db5
DN
2714# Check whether --with-png was given.
2715if test "${with_png+set}" = set; then :
2716 withval=$with_png;
2717else
2718 with_png=yes
8c5ff6dd 2719fi
5929fbe7
GM
2720
2721
eb697db5
DN
2722# Check whether --with-rsvg was given.
2723if test "${with_rsvg+set}" = set; then :
2724 withval=$with_rsvg;
2725else
2726 with_rsvg=yes
2727fi
5929fbe7
GM
2728
2729
5929fbe7 2730
eb697db5
DN
2731# Check whether --with-xft was given.
2732if test "${with_xft+set}" = set; then :
2733 withval=$with_xft;
8c5ff6dd 2734else
eb697db5 2735 with_xft=yes
8c5ff6dd 2736fi
eb697db5
DN
2737
2738
2739# Check whether --with-libotf was given.
2740if test "${with_libotf+set}" = set; then :
2741 withval=$with_libotf;
8c5ff6dd 2742else
eb697db5 2743 with_libotf=yes
8c5ff6dd 2744fi
e6df49e4
GM
2745
2746
eb697db5
DN
2747# Check whether --with-m17n-flt was given.
2748if test "${with_m17n_flt+set}" = set; then :
2749 withval=$with_m17n_flt;
2750else
2751 with_m17n_flt=yes
2752fi
2753
5929fbe7 2754
5929fbe7 2755
eb697db5
DN
2756# Check whether --with-toolkit-scroll-bars was given.
2757if test "${with_toolkit_scroll_bars+set}" = set; then :
2758 withval=$with_toolkit_scroll_bars;
2759else
2760 with_toolkit_scroll_bars=yes
2761fi
5929fbe7 2762
5929fbe7 2763
eb697db5
DN
2764# Check whether --with-xaw3d was given.
2765if test "${with_xaw3d+set}" = set; then :
2766 withval=$with_xaw3d;
2767else
2768 with_xaw3d=yes
2769fi
5929fbe7 2770
5929fbe7 2771
eb697db5
DN
2772# Check whether --with-xim was given.
2773if test "${with_xim+set}" = set; then :
2774 withval=$with_xim;
2775else
2776 with_xim=yes
2777fi
5929fbe7
GM
2778
2779
eb697db5
DN
2780# Check whether --with-ns was given.
2781if test "${with_ns+set}" = set; then :
2782 withval=$with_ns;
2783else
2784 with_ns=no
2785fi
5929fbe7 2786
5929fbe7 2787
eb697db5
DN
2788
2789# Check whether --with-gpm was given.
2790if test "${with_gpm+set}" = set; then :
2791 withval=$with_gpm;
2792else
2793 with_gpm=yes
8c5ff6dd 2794fi
5929fbe7
GM
2795
2796
eb697db5
DN
2797# Check whether --with-dbus was given.
2798if test "${with_dbus+set}" = set; then :
2799 withval=$with_dbus;
2800else
2801 with_dbus=yes
2802fi
5929fbe7
GM
2803
2804
eb697db5
DN
2805# Check whether --with-gconf was given.
2806if test "${with_gconf+set}" = set; then :
2807 withval=$with_gconf;
2808else
2809 with_gconf=yes
2810fi
5929fbe7 2811
5929fbe7 2812
eb697db5
DN
2813# Check whether --with-selinux was given.
2814if test "${with_selinux+set}" = set; then :
2815 withval=$with_selinux;
8c5ff6dd 2816else
eb697db5
DN
2817 with_selinux=yes
2818fi
5929fbe7 2819
5929fbe7 2820
eb697db5
DN
2821## For the times when you want to build Emacs but don't have
2822## a suitable makeinfo, and can live without the manuals.
5929fbe7 2823
eb697db5
DN
2824# Check whether --with-makeinfo was given.
2825if test "${with_makeinfo+set}" = set; then :
2826 withval=$with_makeinfo;
2827else
2828 with_makeinfo=yes
2829fi
5929fbe7 2830
5929fbe7 2831
e547b051
J
2832## This is an option because I do not know if all info/man support
2833## compressed files, nor how to test if they do so.
2834
2835# Check whether --with-compress-info was given.
2836if test "${with_compress_info+set}" = set; then :
2837 withval=$with_compress_info;
2838else
2839 with_compress_info=yes
2840fi
2841
2842if test $with_compress_info = yes; then
2843 GZIP_INFO=yes
2844else
2845 GZIP_INFO=
2846fi
2847
2848
0c309b80 2849
eb697db5
DN
2850# Check whether --with-pkg-config-prog was given.
2851if test "${with_pkg_config_prog+set}" = set; then :
2852 withval=$with_pkg_config_prog;
8c5ff6dd 2853fi
5929fbe7 2854
eb697db5
DN
2855if test "X${with_pkg_config_prog}" != X; then
2856 if test "${with_pkg_config_prog}" != yes; then
2857 PKG_CONFIG="${with_pkg_config_prog}"
2858 fi
8c5ff6dd 2859fi
e6df49e4 2860
eb697db5 2861CRT_DIR=
a4f64981 2862
eb697db5
DN
2863# Check whether --with-crt-dir was given.
2864if test "${with_crt_dir+set}" = set; then :
2865 withval=$with_crt_dir;
2866fi
2867
2868CRT_DIR="${with_crt_dir}"
5929fbe7 2869
e6df49e4 2870
eb697db5
DN
2871# Check whether --with-gnustep-conf was given.
2872if test "${with_gnustep_conf+set}" = set; then :
2873 withval=$with_gnustep_conf;
15e12598 2874fi
e6df49e4 2875
eb697db5
DN
2876test "X${with_gnustep_conf}" != X && test "${with_gnustep_conf}" != yes && \
2877 GNUSTEP_CONFIG_FILE="${with_gnustep_conf}"
2878test "X$GNUSTEP_CONFIG_FILE" = "X" && \
2879 GNUSTEP_CONFIG_FILE=/etc/GNUstep/GNUstep.conf
e6df49e4 2880
eb697db5
DN
2881# Check whether --enable-ns-self-contained was given.
2882if test "${enable_ns_self_contained+set}" = set; then :
2883 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=$enableval
2884else
2885 EN_NS_SELF_CONTAINED=yes
2886fi
e6df49e4 2887
5929fbe7 2888
eb697db5
DN
2889# Check whether --enable-asserts was given.
2890if test "${enable_asserts+set}" = set; then :
2891 enableval=$enable_asserts; USE_XASSERTS=$enableval
2892else
2893 USE_XASSERTS=no
2894fi
a4f64981
GM
2895
2896
eb697db5
DN
2897# Check whether --enable-maintainer-mode was given.
2898if test "${enable_maintainer_mode+set}" = set; then :
2899 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
5929fbe7 2900else
eb697db5
DN
2901 USE_MAINTAINER_MODE=no
2902fi
a4f64981 2903
eb697db5
DN
2904if test $USE_MAINTAINER_MODE = yes; then
2905 MAINT=
2906else
2907 MAINT=#
2908fi
e6df49e4 2909
5929fbe7 2910
eb697db5
DN
2911# Check whether --enable-locallisppath was given.
2912if test "${enable_locallisppath+set}" = set; then :
2913 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
2914 locallisppath=
2915elif test "${enableval}" != "yes"; then
2916 locallisppath=${enableval}
2917fi
2918fi
5929fbe7 2919
5929fbe7 2920
eb697db5
DN
2921# Check whether --enable-checking was given.
2922if test "${enable_checking+set}" = set; then :
2923 enableval=$enable_checking; ac_checking_flags="${enableval}"
2924fi
2925
2926IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
2927for check in $ac_checking_flags
2928do
2929 case $check in
2930 # these set all the flags to specific states
2931 yes) ac_enable_checking=1 ;;
2932 no) ac_enable_checking= ;
2933 ac_gc_check_stringbytes= ;
2934 ac_gc_check_string_overrun= ;
2935 ac_gc_check_string_free_list= ;
2936 ac_xmalloc_overrun= ;
2937 ac_gc_check_cons_list= ;;
2938 all) ac_enable_checking=1 ;
2939 ac_gc_check_stringbytes=1 ;
2940 ac_gc_check_string_overrun=1 ;
2941 ac_gc_check_string_free_list=1 ;
2942 ac_xmalloc_overrun=1 ;
2943 ac_gc_check_cons_list=1 ;;
2944 # these enable particular checks
2945 stringbytes) ac_gc_check_stringbytes=1 ;;
2946 stringoverrun) ac_gc_check_string_overrun=1 ;;
2947 stringfreelist) ac_gc_check_string_free_list=1 ;;
2948 xmallocoverrun) ac_xmalloc_overrun=1 ;;
2949 conslist) ac_gc_check_cons_list=1 ;;
2950 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
2951 esac
2952done
2953IFS="$ac_save_IFS"
2954
2955if test x$ac_enable_checking != x ; then
2956
2957$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
2958
2959fi
2960if test x$ac_gc_check_stringbytes != x ; then
2961
2962$as_echo "#define GC_CHECK_STRING_BYTES 1" >>confdefs.h
5929fbe7 2963
5929fbe7 2964fi
eb697db5
DN
2965if test x$ac_gc_check_stringoverrun != x ; then
2966
2967$as_echo "#define GC_CHECK_STRING_OVERRUN 1" >>confdefs.h
5929fbe7 2968
5929fbe7 2969fi
eb697db5
DN
2970if test x$ac_gc_check_string_free_list != x ; then
2971
2972$as_echo "#define GC_CHECK_STRING_FREE_LIST 1" >>confdefs.h
2973
5929fbe7 2974fi
eb697db5 2975if test x$ac_xmalloc_overrun != x ; then
a4f64981 2976
eb697db5 2977$as_echo "#define XMALLOC_OVERRUN_CHECK 1" >>confdefs.h
5929fbe7 2978
eb697db5
DN
2979fi
2980if test x$ac_gc_check_cons_list != x ; then
5929fbe7 2981
eb697db5 2982$as_echo "#define GC_CHECK_CONS_LIST 1" >>confdefs.h
5929fbe7 2983
eb697db5
DN
2984fi
2985
d9170db5
DN
2986# Check whether --enable-use-lisp-union-type was given.
2987if test "${enable_use_lisp_union_type+set}" = set; then :
2988 enableval=$enable_use_lisp_union_type; if test "${enableval}" != "no"; then
2989
2990$as_echo "#define USE_LISP_UNION_TYPE 1" >>confdefs.h
2991
2992fi
2993fi
2994
2995
2996
eb697db5
DN
2997# Check whether --enable-profiling was given.
2998if test "${enable_profiling+set}" = set; then :
2999 enableval=$enable_profiling; ac_enable_profiling="${enableval}"
3000fi
3001
3002if test x$ac_enable_profiling != x ; then
3003 PROFILING_CFLAGS="-DPROFILING=1 -pg"
3004 PROFILING_LDFLAGS="-pg"
5929fbe7 3005else
eb697db5
DN
3006 PROFILING_CFLAGS=
3007 PROFILING_LDFLAGS=
3008fi
a4f64981 3009
eb697db5
DN
3010# Check whether --enable-autodepend was given.
3011if test "${enable_autodepend+set}" = set; then :
3012 enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
3013else
3014 ac_enable_autodepend=yes
3015fi
8c5ff6dd 3016
eb697db5
DN
3017
3018#### Make srcdir absolute, if it isn't already. It's important to
3019#### avoid running the path through pwd unnecessarily, since pwd can
3020#### give you automounter prefixes, which can go away. We do all this
3021#### so Emacs can find its files when run uninstalled.
3022## Make sure CDPATH doesn't affect cd (in case PWD is relative).
3023unset CDPATH
3024case "${srcdir}" in
3025 /* ) ;;
3026 . )
3027 ## We may be able to use the $PWD environment variable to make this
3028 ## absolute. But sometimes PWD is inaccurate.
3029 ## Note: we used to use ${PWD} at the end instead of `pwd`,
3030 ## but that tested only for a well-formed and valid PWD,
3031 ## it did not object when PWD was well-formed and valid but just wrong.
3032 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
3033 then
3034 srcdir="$PWD"
3035 else
3036 srcdir="`(cd ${srcdir}; pwd)`"
3037 fi
3038 ;;
3039 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
a4f64981 3040esac
e6df49e4 3041
eb697db5
DN
3042#### Check if the source directory already has a configured system in it.
3043if test `pwd` != `(cd ${srcdir} && pwd)` \
3044 && test -f "${srcdir}/src/config.h" ; then
3045 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The directory tree \`${srcdir}' is being used
3046 as a build directory right now; it has been configured in its own
3047 right. To configure in another directory as well, you MUST
3048 use GNU make. If you do not have GNU make, then you must
3049 now do \`make distclean' in ${srcdir},
3050 and then run $0 again." >&5
3051$as_echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
3052 as a build directory right now; it has been configured in its own
3053 right. To configure in another directory as well, you MUST
3054 use GNU make. If you do not have GNU make, then you must
3055 now do \`make distclean' in ${srcdir},
3056 and then run $0 again." >&2;}
5929fbe7
GM
3057fi
3058
eb697db5
DN
3059#### Given the configuration name, set machfile and opsysfile to the
3060#### names of the m/*.h and s/*.h files we should use.
3061
3062### Canonicalize the configuration name.
3063
3064ac_aux_dir=
3065for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3066 for ac_t in install-sh install.sh shtool; do
3067 if test -f "$ac_dir/$ac_t"; then
3068 ac_aux_dir=$ac_dir
3069 ac_install_sh="$ac_aux_dir/$ac_t -c"
3070 break 2
3071 fi
3072 done
3073done
3074if test -z "$ac_aux_dir"; then
3075 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5929fbe7 3076fi
eb697db5
DN
3077
3078# These three variables are undocumented and unsupported,
3079# and are intended to be withdrawn in a future Autoconf release.
3080# They can cause serious problems if a builder's source tree is in a directory
3081# whose full name contains unusual characters.
3082ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3083ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3084ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3085
3086
3087# Make sure we can run config.sub.
3088$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3089 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3090
3091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3092$as_echo_n "checking build system type... " >&6; }
3093if test "${ac_cv_build+set}" = set; then :
3094 $as_echo_n "(cached) " >&6
8c5ff6dd 3095else
eb697db5
DN
3096 ac_build_alias=$build_alias
3097test "x$ac_build_alias" = x &&
3098 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3099test "x$ac_build_alias" = x &&
3100 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
3101ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3102 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3103
15e12598 3104fi
eb697db5
DN
3105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3106$as_echo "$ac_cv_build" >&6; }
3107case $ac_cv_build in
3108*-*-*) ;;
3109*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
3110esac
3111build=$ac_cv_build
3112ac_save_IFS=$IFS; IFS='-'
3113set x $ac_cv_build
3114shift
3115build_cpu=$1
3116build_vendor=$2
3117shift; shift
3118# Remember, the first character of IFS is used to create $*,
3119# except with old shells:
3120build_os=$*
3121IFS=$ac_save_IFS
3122case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15e12598 3123
5929fbe7 3124
eb697db5
DN
3125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3126$as_echo_n "checking host system type... " >&6; }
3127if test "${ac_cv_host+set}" = set; then :
5929fbe7
GM
3128 $as_echo_n "(cached) " >&6
3129else
eb697db5
DN
3130 if test "x$host_alias" = x; then
3131 ac_cv_host=$ac_cv_build
3132else
3133 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3134 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3135fi
5929fbe7 3136
eb697db5
DN
3137fi
3138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3139$as_echo "$ac_cv_host" >&6; }
3140case $ac_cv_host in
3141*-*-*) ;;
3142*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
3143esac
3144host=$ac_cv_host
3145ac_save_IFS=$IFS; IFS='-'
3146set x $ac_cv_host
3147shift
3148host_cpu=$1
3149host_vendor=$2
3150shift; shift
3151# Remember, the first character of IFS is used to create $*,
3152# except with old shells:
3153host_os=$*
3154IFS=$ac_save_IFS
3155case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5929fbe7 3156
5929fbe7 3157
eb697db5
DN
3158canonical=$host
3159configuration=${host_alias-${build_alias-$host}}
5929fbe7 3160
5929fbe7 3161
5929fbe7 3162
eb697db5
DN
3163### If you add support for a new configuration, add code to this
3164### switch statement to recognize your configuration name and select
3165### the appropriate operating system and machine description files.
8c5ff6dd 3166
eb697db5
DN
3167### You would hope that you could choose an m/*.h file pretty much
3168### based on the machine portion of the configuration name, and an s/*.h
3169### file based on the operating system portion. However, it turns out
3170### that each m/*.h file is pretty manufacturer-specific - for
3171### example mips.h is MIPS
3172### So we basically have to have a special case for each
3173### configuration name.
3174###
3175### As far as handling version numbers on operating systems is
3176### concerned, make sure things will fail in a fixable way. If
3177### /etc/MACHINES doesn't say anything about version numbers, be
3178### prepared to handle anything reasonably. If version numbers
3179### matter, be sure /etc/MACHINES says something about it.
3180
3181machine='' opsys='' unported=no
3182case "${canonical}" in
3183
3184 ## FreeBSD ports
3185 *-*-freebsd* )
3186 opsys=freebsd
3187 case "${canonical}" in
3188 alpha*) machine=alpha ;;
3189 amd64-*|x86_64-*) machine=amdx86-64 ;;
3190 arm*) machine=arm ;;
3191 ia64-*) machine=ia64 ;;
3192 i[3456]86-*) machine=intel386 ;;
3193 powerpc-*) machine=macppc ;;
3194 sparc-*) machine=sparc ;;
3195 sparc64-*) machine=sparc ;;
3196 esac
3197 ;;
5929fbe7 3198
eb697db5
DN
3199 ## FreeBSD kernel + glibc based userland
3200 *-*-kfreebsd*gnu* )
3201 opsys=gnu-kfreebsd
3202 case "${canonical}" in
3203 alpha*) machine=alpha ;;
3204 amd64-*|x86_64-*) machine=amdx86-64 ;;
3205 ia64-*) machine=ia64 ;;
3206 i[3456]86-*) machine=intel386 ;;
3207 powerpc-*) machine=macppc ;;
3208 sparc-*) machine=sparc ;;
3209 sparc64-*) machine=sparc ;;
3210 esac
3211 ;;
5929fbe7 3212
eb697db5
DN
3213 ## NetBSD ports
3214 *-*-netbsd* )
3215 opsys=netbsd
3216 case "${canonical}" in
3217 alpha*) machine=alpha ;;
3218 x86_64-*) machine=amdx86-64 ;;
3219 arm-*) machine=arm ;;
3220 hppa-*) machine=hp800 ;;
3221 i[3456]86-*) machine=intel386 ;;
3222 m68k-*) machine=m68k ;;
3223 powerpc-*) machine=macppc ;;
3224 mips-*) machine=mips ;;
3225 mipse[bl]-*) machine=mips ;;
3226 sparc*-) machine=sparc ;;
3227 vax-*) machine=vax ;;
3228 esac
3229 ;;
e6df49e4 3230
eb697db5
DN
3231 ## OpenBSD ports
3232 *-*-openbsd* )
3233 opsys=openbsd
3234 case "${canonical}" in
3235 alpha*) machine=alpha ;;
3236 x86_64-*) machine=amdx86-64 ;;
3237 arm-*) machine=arm ;;
3238 hppa-*) machine=hp800 ;;
3239 i386-*) machine=intel386 ;;
3240 powerpc-*) machine=macppc ;;
3241 sparc*) machine=sparc ;;
3242 vax-*) machine=vax ;;
3243 esac
3244 ;;
e6df49e4 3245
eb697db5
DN
3246 alpha*-*-linux-gnu* )
3247 machine=alpha opsys=gnu-linux
3248 ;;
e6df49e4 3249
eb697db5
DN
3250 arm*-*-linux-gnu* )
3251 machine=arm opsys=gnu-linux
3252 ;;
5929fbe7 3253
eb697db5
DN
3254 ## Apple Darwin / Mac OS X
3255 *-apple-darwin* )
3256 case "${canonical}" in
3257 i[3456]86-* ) machine=intel386 ;;
3258 powerpc-* ) machine=macppc ;;
3259 x86_64-* ) machine=amdx86-64 ;;
3260 * ) unported=yes ;;
3261 esac
3262 opsys=darwin
3263 # Define CPP as follows to make autoconf work correctly.
3264 CPP="${CC-cc} -E -no-cpp-precomp"
3265 # Use fink packages if available.
3266 if test -d /sw/include && test -d /sw/lib; then
3267 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3268 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3269 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3270 fi
3271 ;;
5929fbe7 3272
eb697db5
DN
3273 ## HP 9000 series 700 and 800, running HP/UX
3274 hppa*-hp-hpux10.2* )
3275 machine=hp800 opsys=hpux10-20
3276 ;;
3277 hppa*-hp-hpux1[1-9]* )
3278 machine=hp800 opsys=hpux11
3279 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
3280 ;;
5929fbe7 3281
eb697db5
DN
3282 hppa*-*-linux-gnu* )
3283 machine=hp800 opsys=gnu-linux
3284 ;;
5929fbe7 3285
eb697db5
DN
3286 ## IBM machines
3287 s390-*-linux-gnu* )
3288 machine=ibms390 opsys=gnu-linux
3289 ;;
3290 s390x-*-linux-gnu* )
3291 machine=ibms390x opsys=gnu-linux
3292 ;;
3293 rs6000-ibm-aix4.[23]* )
3294 machine=ibmrs6000 opsys=aix4-2
3295 ;;
3296 powerpc-ibm-aix4.[23]* )
3297 machine=ibmrs6000 opsys=aix4-2
3298 ;;
3299 rs6000-ibm-aix[56]* )
3300 machine=ibmrs6000 opsys=aix4-2
3301 ;;
3302 powerpc-ibm-aix[56]* )
3303 machine=ibmrs6000 opsys=aix4-2
3304 ;;
5929fbe7 3305
eb697db5
DN
3306 ## Macintosh PowerPC
3307 powerpc*-*-linux-gnu* )
3308 machine=macppc opsys=gnu-linux
3309 ;;
5929fbe7 3310
eb697db5
DN
3311 ## Silicon Graphics machines
3312 ## Iris 4D
3313 mips-sgi-irix6.5 )
3314 machine=iris4d opsys=irix6-5
3315 # Without defining _LANGUAGE_C, things get masked out in the headers
3316 # so that, for instance, grepping for `free' in stdlib.h fails and
3317 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
3318 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
3319 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
3320 ;;
5929fbe7 3321
eb697db5
DN
3322 ## Suns
3323 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
3324 machine=sparc opsys=gnu-linux
3325 ;;
15e12598 3326
eb697db5
DN
3327 *-sun-solaris* \
3328 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
3329 | x86_64-*-solaris2* | x86_64-*-sunos5*)
3330 case "${canonical}" in
3331 i[3456]86-*-* ) machine=intel386 ;;
3332 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
3333 sparc* ) machine=sparc ;;
3334 * ) unported=yes ;;
3335 esac
3336 case "${canonical}" in
3337 *-sunos5.6* | *-solaris2.6* )
3338 opsys=sol2-6
3339 NON_GNU_CPP=/usr/ccs/lib/cpp
3340 RANLIB="ar -ts"
3341 ;;
3342 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
3343 opsys=sol2-6
3344 emacs_check_sunpro_c=yes
3345 NON_GNU_CPP=/usr/ccs/lib/cpp
3346 ;;
3347 *-sunos5* | *-solaris* )
3348 opsys=sol2-10
3349 emacs_check_sunpro_c=yes
3350 NON_GNU_CPP=/usr/ccs/lib/cpp
3351 ;;
3352 esac
3353 ## Watch out for a compiler that we know will not work.
3354 case "${canonical}" in
3355 *-solaris* | *-sunos5* )
3356 if [ "x$CC" = x/usr/ucb/cc ]; then
3357 ## /usr/ucb/cc doesn't work;
3358 ## we should find some other compiler that does work.
3359 unset CC
3360 fi
3361 ;;
3362 *) ;;
3363 esac
3364 ;;
5929fbe7 3365
eb697db5
DN
3366 ## IA-64
3367 ia64*-*-linux* )
3368 machine=ia64 opsys=gnu-linux
3369 ;;
aaa36002 3370
eb697db5
DN
3371 ## Intel 386 machines where we don't care about the manufacturer.
3372 i[3456]86-*-* )
3373 machine=intel386
3374 case "${canonical}" in
3375 *-cygwin ) opsys=cygwin ;;
3376 *-darwin* ) opsys=darwin
3377 CPP="${CC-cc} -E -no-cpp-precomp"
3378 ;;
3379 *-linux-gnu* ) opsys=gnu-linux ;;
3380 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3381 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3382 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3383 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3384 esac
3385 ;;
5929fbe7 3386
eb697db5
DN
3387 ## m68k Linux-based GNU system
3388 m68k-*-linux-gnu* )
3389 machine=m68k opsys=gnu-linux
3390 ;;
5929fbe7 3391
eb697db5
DN
3392 ## Mips Linux-based GNU system
3393 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
3394 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
3395 machine=mips opsys=gnu-linux
3396 ;;
5929fbe7 3397
eb697db5
DN
3398 ## AMD x86-64 Linux-based GNU system
3399 x86_64-*-linux-gnu* )
3400 machine=amdx86-64 opsys=gnu-linux
3401 ;;
5929fbe7 3402
eb697db5
DN
3403 ## Tensilica Xtensa Linux-based GNU system
3404 xtensa*-*-linux-gnu* )
3405 machine=xtensa opsys=gnu-linux
3406 ;;
5929fbe7 3407
eb697db5
DN
3408 ## SuperH Linux-based GNU system
3409 sh[34]*-*-linux-gnu* )
3410 machine=sh3 opsys=gnu-linux
3411 ;;
5929fbe7 3412
eb697db5
DN
3413 * )
3414 unported=yes
3415 ;;
5929fbe7 3416esac
aaa36002 3417
eb697db5
DN
3418### If the code above didn't choose an operating system, just choose
3419### an operating system based on the configuration name. You really
3420### only want to use this when you have no idea what the right
3421### operating system is; if you know what operating systems a machine
3422### runs, it's cleaner to make it explicit in the case statement
3423### above.
3424if test x"${opsys}" = x; then
3425 case "${canonical}" in
3426 *-gnu* ) opsys=gnu ;;
3427 * )
3428 unported=yes
3429 ;;
3430 esac
5929fbe7 3431fi
aaa36002 3432
5929fbe7 3433
5929fbe7 3434
eb697db5
DN
3435if test $unported = yes; then
3436 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
3437Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
5929fbe7
GM
3438fi
3439
eb697db5
DN
3440machfile="m/${machine}.h"
3441opsysfile="s/${opsys}.h"
5929fbe7 3442
5929fbe7 3443
eb697db5
DN
3444#### Choose a compiler.
3445test -n "$CC" && cc_specified=yes
3446
3447# Save the value of CFLAGS that the user specified.
3448SPECIFIED_CFLAGS="$CFLAGS"
3449
3450ac_ext=c
3451ac_cpp='$CPP $CPPFLAGS'
3452ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3453ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3454ac_compiler_gnu=$ac_cv_c_compiler_gnu
3455if test -n "$ac_tool_prefix"; then
3456 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3457set dummy ${ac_tool_prefix}gcc; ac_word=$2
3458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3459$as_echo_n "checking for $ac_word... " >&6; }
3460if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3461 $as_echo_n "(cached) " >&6
3462else
eb697db5
DN
3463 if test -n "$CC"; then
3464 ac_cv_prog_CC="$CC" # Let the user override the test.
3465else
3466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3467for as_dir in $PATH
3468do
3469 IFS=$as_save_IFS
3470 test -z "$as_dir" && as_dir=.
3471 for ac_exec_ext in '' $ac_executable_extensions; do
3472 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3473 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3474 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3475 break 2
3476 fi
3477done
3478 done
3479IFS=$as_save_IFS
5929fbe7
GM
3480
3481fi
eb697db5
DN
3482fi
3483CC=$ac_cv_prog_CC
3484if test -n "$CC"; then
3485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3486$as_echo "$CC" >&6; }
3487else
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3489$as_echo "no" >&6; }
5929fbe7 3490fi
7186fb09 3491
08b47d3d 3492
eb697db5
DN
3493fi
3494if test -z "$ac_cv_prog_CC"; then
3495 ac_ct_CC=$CC
3496 # Extract the first word of "gcc", so it can be a program name with args.
3497set dummy gcc; ac_word=$2
3498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3499$as_echo_n "checking for $ac_word... " >&6; }
3500if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5929fbe7 3501 $as_echo_n "(cached) " >&6
8c5ff6dd 3502else
eb697db5
DN
3503 if test -n "$ac_ct_CC"; then
3504 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3505else
eb697db5
DN
3506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3507for as_dir in $PATH
3508do
3509 IFS=$as_save_IFS
3510 test -z "$as_dir" && as_dir=.
3511 for ac_exec_ext in '' $ac_executable_extensions; do
3512 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3513 ac_cv_prog_ac_ct_CC="gcc"
3514 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3515 break 2
3516 fi
3517done
3518 done
3519IFS=$as_save_IFS
5929fbe7 3520
8c5ff6dd 3521fi
8c5ff6dd 3522fi
eb697db5
DN
3523ac_ct_CC=$ac_cv_prog_ac_ct_CC
3524if test -n "$ac_ct_CC"; then
3525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3526$as_echo "$ac_ct_CC" >&6; }
3527else
3528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3529$as_echo "no" >&6; }
8c5ff6dd 3530fi
5929fbe7 3531
eb697db5
DN
3532 if test "x$ac_ct_CC" = x; then
3533 CC=""
3534 else
3535 case $cross_compiling:$ac_tool_warned in
3536yes:)
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3539ac_tool_warned=yes ;;
3540esac
3541 CC=$ac_ct_CC
8c5ff6dd 3542 fi
eb697db5
DN
3543else
3544 CC="$ac_cv_prog_CC"
8c5ff6dd 3545fi
e6df49e4 3546
eb697db5
DN
3547if test -z "$CC"; then
3548 if test -n "$ac_tool_prefix"; then
3549 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3550set dummy ${ac_tool_prefix}cc; ac_word=$2
3551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3552$as_echo_n "checking for $ac_word... " >&6; }
eb697db5
DN
3553if test "${ac_cv_prog_CC+set}" = set; then :
3554 $as_echo_n "(cached) " >&6
3555else
3556 if test -n "$CC"; then
3557 ac_cv_prog_CC="$CC" # Let the user override the test.
3558else
3559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3560for as_dir in $PATH
a4f64981 3561do
5929fbe7
GM
3562 IFS=$as_save_IFS
3563 test -z "$as_dir" && as_dir=.
eb697db5 3564 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3565 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3566 ac_cv_prog_CC="${ac_tool_prefix}cc"
3567 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3568 break 2
3569 fi
a4f64981 3570done
eb697db5 3571 done
5929fbe7 3572IFS=$as_save_IFS
9452ded1 3573
5929fbe7 3574fi
eb697db5
DN
3575fi
3576CC=$ac_cv_prog_CC
3577if test -n "$CC"; then
3578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3579$as_echo "$CC" >&6; }
5929fbe7 3580else
eb697db5 3581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3582$as_echo "no" >&6; }
8c5ff6dd 3583fi
cd03c74a 3584
9452ded1 3585
5929fbe7 3586 fi
eb697db5
DN
3587fi
3588if test -z "$CC"; then
3589 # Extract the first word of "cc", so it can be a program name with args.
3590set dummy cc; ac_word=$2
3591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592$as_echo_n "checking for $ac_word... " >&6; }
3593if test "${ac_cv_prog_CC+set}" = set; then :
5929fbe7
GM
3594 $as_echo_n "(cached) " >&6
3595else
eb697db5
DN
3596 if test -n "$CC"; then
3597 ac_cv_prog_CC="$CC" # Let the user override the test.
8c5ff6dd 3598else
eb697db5
DN
3599 ac_prog_rejected=no
3600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3601for as_dir in $PATH
3602do
3603 IFS=$as_save_IFS
3604 test -z "$as_dir" && as_dir=.
3605 for ac_exec_ext in '' $ac_executable_extensions; do
3606 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3607 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3608 ac_prog_rejected=yes
3609 continue
3610 fi
3611 ac_cv_prog_CC="cc"
3612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3613 break 2
3614 fi
3615done
3616 done
3617IFS=$as_save_IFS
e6df49e4 3618
eb697db5
DN
3619if test $ac_prog_rejected = yes; then
3620 # We found a bogon in the path, so make sure we never use it.
3621 set dummy $ac_cv_prog_CC
3622 shift
3623 if test $# != 0; then
3624 # We chose a different compiler from the bogus one.
3625 # However, it has the same basename, so the bogon will be chosen
3626 # first if we set CC to just the basename; use the full file name.
3627 shift
3628 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3629 fi
8c5ff6dd 3630fi
8c5ff6dd 3631fi
8c5ff6dd 3632fi
eb697db5
DN
3633CC=$ac_cv_prog_CC
3634if test -n "$CC"; then
3635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3636$as_echo "$CC" >&6; }
3637else
3638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3639$as_echo "no" >&6; }
8c5ff6dd 3640fi
cd03c74a 3641
8c5ff6dd 3642
eb697db5
DN
3643fi
3644if test -z "$CC"; then
3645 if test -n "$ac_tool_prefix"; then
3646 for ac_prog in cl.exe
3647 do
3648 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3649set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 3651$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 3652if test "${ac_cv_prog_CC+set}" = set; then :
a5edbe4a 3653 $as_echo_n "(cached) " >&6
a5edbe4a 3654else
eb697db5
DN
3655 if test -n "$CC"; then
3656 ac_cv_prog_CC="$CC" # Let the user override the test.
3657else
3658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929fbe7 3659for as_dir in $PATH
8c5ff6dd 3660do
5929fbe7
GM
3661 IFS=$as_save_IFS
3662 test -z "$as_dir" && as_dir=.
eb697db5 3663 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 3664 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
3665 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7
GM
3667 break 2
3668 fi
3669done
eb697db5 3670 done
5929fbe7 3671IFS=$as_save_IFS
8c5ff6dd 3672
8c5ff6dd 3673fi
eb697db5
DN
3674fi
3675CC=$ac_cv_prog_CC
3676if test -n "$CC"; then
3677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3678$as_echo "$CC" >&6; }
8c5ff6dd 3679else
eb697db5 3680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 3681$as_echo "no" >&6; }
8c5ff6dd 3682fi
a4f64981 3683
a4f64981 3684
eb697db5
DN
3685 test -n "$CC" && break
3686 done
3687fi
3688if test -z "$CC"; then
3689 ac_ct_CC=$CC
3690 for ac_prog in cl.exe
3691do
3692 # Extract the first word of "$ac_prog", so it can be a program name with args.
3693set dummy $ac_prog; ac_word=$2
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3695$as_echo_n "checking for $ac_word... " >&6; }
3696if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5929fbe7 3697 $as_echo_n "(cached) " >&6
a4f64981 3698else
eb697db5
DN
3699 if test -n "$ac_ct_CC"; then
3700 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5929fbe7 3701else
eb697db5
DN
3702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703for as_dir in $PATH
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
3707 for ac_exec_ext in '' $ac_executable_extensions; do
3708 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3709 ac_cv_prog_ac_ct_CC="$ac_prog"
3710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3711 break 2
3712 fi
3713done
3714 done
3715IFS=$as_save_IFS
a4f64981 3716
5929fbe7 3717fi
5929fbe7 3718fi
eb697db5
DN
3719ac_ct_CC=$ac_cv_prog_ac_ct_CC
3720if test -n "$ac_ct_CC"; then
3721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3722$as_echo "$ac_ct_CC" >&6; }
8c5ff6dd 3723else
eb697db5
DN
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3725$as_echo "no" >&6; }
8c5ff6dd 3726fi
a4f64981 3727
5929fbe7 3728
eb697db5
DN
3729 test -n "$ac_ct_CC" && break
3730done
5929fbe7 3731
eb697db5
DN
3732 if test "x$ac_ct_CC" = x; then
3733 CC=""
3734 else
3735 case $cross_compiling:$ac_tool_warned in
3736yes:)
3737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3739ac_tool_warned=yes ;;
3740esac
3741 CC=$ac_ct_CC
3742 fi
8c5ff6dd 3743fi
a4f64981 3744
eb697db5 3745fi
8c5ff6dd 3746
5929fbe7 3747
eb697db5
DN
3748test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3750as_fn_error "no acceptable C compiler found in \$PATH
3751See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 3752
eb697db5
DN
3753# Provide some information about the compiler.
3754$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3755set X $ac_compile
3756ac_compiler=$2
3757for ac_option in --version -v -V -qversion; do
3758 { { ac_try="$ac_compiler $ac_option >&5"
5929fbe7
GM
3759case "(($ac_try" in
3760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3761 *) ac_try_echo=$ac_try;;
3762esac
eb697db5
DN
3763eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3764$as_echo "$ac_try_echo"; } >&5
3765 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5929fbe7 3766 ac_status=$?
eb697db5
DN
3767 if test -s conftest.err; then
3768 sed '10a\
3769... rest of stderr output deleted ...
3770 10q' conftest.err >conftest.er1
3771 cat conftest.er1 >&5
5929fbe7 3772 fi
eb697db5
DN
3773 rm -f conftest.er1 conftest.err
3774 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3775 test $ac_status = 0; }
3776done
a4f64981 3777
eb697db5 3778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 3779/* end confdefs.h. */
8c5ff6dd 3780
5929fbe7
GM
3781int
3782main ()
3783{
3784
3785 ;
3786 return 0;
3787}
3788_ACEOF
eb697db5
DN
3789ac_clean_files_save=$ac_clean_files
3790ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3791# Try to create an executable without -o first, disregard a.out.
3792# It will help us diagnose broken compilers, and finding out an intuition
3793# of exeext.
3794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3795$as_echo_n "checking whether the C compiler works... " >&6; }
3796ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3797
3798# The possible output files:
3799ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3800
3801ac_rmfiles=
3802for ac_file in $ac_files
3803do
3804 case $ac_file in
3805 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3806 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3807 esac
3808done
3809rm -f $ac_rmfiles
3810
3811if { { ac_try="$ac_link_default"
5929fbe7
GM
3812case "(($ac_try" in
3813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3814 *) ac_try_echo=$ac_try;;
3815esac
eb697db5
DN
3816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3817$as_echo "$ac_try_echo"; } >&5
3818 (eval "$ac_link_default") 2>&5
5929fbe7 3819 ac_status=$?
eb697db5
DN
3820 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3821 test $ac_status = 0; }; then :
3822 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3823# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3824# in a Makefile. We should not override ac_cv_exeext if it was cached,
3825# so that the user can short-circuit this test for compilers unknown to
3826# Autoconf.
3827for ac_file in $ac_files ''
3828do
3829 test -f "$ac_file" || continue
3830 case $ac_file in
3831 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3832 ;;
3833 [ab].out )
3834 # We found the default executable, but exeext='' is most
3835 # certainly right.
3836 break;;
3837 *.* )
3838 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3839 then :; else
3840 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3841 fi
3842 # We set ac_cv_exeext here because the later test for it is not
3843 # safe: cross compilers may not add the suffix if given an `-o'
3844 # argument, so we may need to know it at that point already.
3845 # Even if this section looks crufty: it has the advantage of
3846 # actually working.
3847 break;;
3848 * )
3849 break;;
3850 esac
3851done
3852test "$ac_cv_exeext" = no && ac_cv_exeext=
5929fbe7 3853
eb697db5
DN
3854else
3855 ac_file=''
49ebbd65 3856fi
eb697db5
DN
3857if test -z "$ac_file"; then :
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859$as_echo "no" >&6; }
3860$as_echo "$as_me: failed program was:" >&5
3861sed 's/^/| /' conftest.$ac_ext >&5
49ebbd65 3862
eb697db5
DN
3863{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3865{ as_fn_set_status 77
3866as_fn_error "C compiler cannot create executables
3867See \`config.log' for more details." "$LINENO" 5; }; }
3868else
3869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3870$as_echo "yes" >&6; }
8c5ff6dd 3871fi
eb697db5
DN
3872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3873$as_echo_n "checking for C compiler default output file name... " >&6; }
3874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3875$as_echo "$ac_file" >&6; }
3876ac_exeext=$ac_cv_exeext
e6df49e4 3877
eb697db5
DN
3878rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3879ac_clean_files=$ac_clean_files_save
3880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3881$as_echo_n "checking for suffix of executables... " >&6; }
3882if { { ac_try="$ac_link"
3883case "(($ac_try" in
3884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885 *) ac_try_echo=$ac_try;;
3886esac
3887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888$as_echo "$ac_try_echo"; } >&5
3889 (eval "$ac_link") 2>&5
3890 ac_status=$?
3891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3892 test $ac_status = 0; }; then :
3893 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3894# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3895# work properly (i.e., refer to `conftest.exe'), while it won't with
3896# `rm'.
3897for ac_file in conftest.exe conftest conftest.*; do
3898 test -f "$ac_file" || continue
3899 case $ac_file in
3900 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3901 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3902 break;;
3903 * ) break;;
3904 esac
3905done
3906else
3907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3909as_fn_error "cannot compute suffix of executables: cannot compile and link
3910See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 3911fi
eb697db5
DN
3912rm -f conftest conftest$ac_cv_exeext
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3914$as_echo "$ac_cv_exeext" >&6; }
49ebbd65 3915
eb697db5
DN
3916rm -f conftest.$ac_ext
3917EXEEXT=$ac_cv_exeext
3918ac_exeext=$EXEEXT
3919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 3920/* end confdefs.h. */
eb697db5 3921#include <stdio.h>
5929fbe7
GM
3922int
3923main ()
3924{
eb697db5
DN
3925FILE *f = fopen ("conftest.out", "w");
3926 return ferror (f) || fclose (f) != 0;
49ebbd65 3927
5929fbe7
GM
3928 ;
3929 return 0;
3930}
3931_ACEOF
eb697db5
DN
3932ac_clean_files="$ac_clean_files conftest.out"
3933# Check that the compiler produces executables we can run. If not, either
3934# the compiler is broken, or we cross compile.
3935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3936$as_echo_n "checking whether we are cross compiling... " >&6; }
3937if test "$cross_compiling" != yes; then
3938 { { ac_try="$ac_link"
5929fbe7
GM
3939case "(($ac_try" in
3940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3941 *) ac_try_echo=$ac_try;;
3942esac
eb697db5
DN
3943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3944$as_echo "$ac_try_echo"; } >&5
3945 (eval "$ac_link") 2>&5
5929fbe7 3946 ac_status=$?
eb697db5
DN
3947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3948 test $ac_status = 0; }
3949 if { ac_try='./conftest$ac_cv_exeext'
3950 { { case "(($ac_try" in
3951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3952 *) ac_try_echo=$ac_try;;
3953esac
3954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3955$as_echo "$ac_try_echo"; } >&5
3956 (eval "$ac_try") 2>&5
3957 ac_status=$?
3958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3959 test $ac_status = 0; }; }; then
3960 cross_compiling=no
5929fbe7 3961 else
eb697db5
DN
3962 if test "$cross_compiling" = maybe; then
3963 cross_compiling=yes
3964 else
3965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3967as_fn_error "cannot run C compiled programs.
3968If you meant to cross compile, use \`--host'.
3969See \`config.log' for more details." "$LINENO" 5; }
3970 fi
5929fbe7 3971 fi
eb697db5
DN
3972fi
3973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3974$as_echo "$cross_compiling" >&6; }
5929fbe7 3975
eb697db5
DN
3976rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3977ac_clean_files=$ac_clean_files_save
3978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3979$as_echo_n "checking for suffix of object files... " >&6; }
3980if test "${ac_cv_objext+set}" = set; then :
a4f64981 3981 $as_echo_n "(cached) " >&6
a4f64981 3982else
eb697db5 3983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 3984/* end confdefs.h. */
8c5ff6dd
KR
3985
3986int
3987main ()
3988{
eb697db5 3989
8c5ff6dd
KR
3990 ;
3991 return 0;
3992}
a4f64981 3993_ACEOF
eb697db5
DN
3994rm -f conftest.o conftest.obj
3995if { { ac_try="$ac_compile"
5929fbe7
GM
3996case "(($ac_try" in
3997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3998 *) ac_try_echo=$ac_try;;
3999esac
eb697db5
DN
4000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4001$as_echo "$ac_try_echo"; } >&5
4002 (eval "$ac_compile") 2>&5
5929fbe7 4003 ac_status=$?
eb697db5
DN
4004 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4005 test $ac_status = 0; }; then :
4006 for ac_file in conftest.o conftest.obj conftest.*; do
4007 test -f "$ac_file" || continue;
4008 case $ac_file in
4009 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4010 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4011 break;;
4012 esac
4013done
a4f64981 4014else
5929fbe7
GM
4015 $as_echo "$as_me: failed program was:" >&5
4016sed 's/^/| /' conftest.$ac_ext >&5
a4f64981 4017
eb697db5
DN
4018{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4020as_fn_error "cannot compute suffix of object files: cannot compile
4021See \`config.log' for more details." "$LINENO" 5; }
5929fbe7 4022fi
eb697db5 4023rm -f conftest.$ac_cv_objext conftest.$ac_ext
5929fbe7 4024fi
eb697db5
DN
4025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4026$as_echo "$ac_cv_objext" >&6; }
4027OBJEXT=$ac_cv_objext
4028ac_objext=$OBJEXT
4029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4030$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4031if test "${ac_cv_c_compiler_gnu+set}" = set; then :
4032 $as_echo_n "(cached) " >&6
4033else
4034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4035/* end confdefs.h. */
8c5ff6dd 4036
eb697db5
DN
4037int
4038main ()
4039{
4040#ifndef __GNUC__
4041 choke me
4042#endif
5929fbe7 4043
eb697db5
DN
4044 ;
4045 return 0;
4046}
4047_ACEOF
4048if ac_fn_c_try_compile "$LINENO"; then :
4049 ac_compiler_gnu=yes
4050else
4051 ac_compiler_gnu=no
8c5ff6dd 4052fi
eb697db5
DN
4053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4054ac_cv_c_compiler_gnu=$ac_compiler_gnu
a4f64981 4055
a4f64981 4056fi
eb697db5
DN
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4058$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4059if test $ac_compiler_gnu = yes; then
4060 GCC=yes
4061else
4062 GCC=
4063fi
4064ac_test_CFLAGS=${CFLAGS+set}
4065ac_save_CFLAGS=$CFLAGS
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4067$as_echo_n "checking whether $CC accepts -g... " >&6; }
4068if test "${ac_cv_prog_cc_g+set}" = set; then :
5929fbe7 4069 $as_echo_n "(cached) " >&6
08b47d3d 4070else
eb697db5
DN
4071 ac_save_c_werror_flag=$ac_c_werror_flag
4072 ac_c_werror_flag=yes
4073 ac_cv_prog_cc_g=no
4074 CFLAGS="-g"
4075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0c309b80 4076/* end confdefs.h. */
8c5ff6dd 4077
9452ded1
DN
4078int
4079main ()
4080{
eb697db5 4081
5929fbe7 4082 ;
9452ded1
DN
4083 return 0;
4084}
0c309b80 4085_ACEOF
eb697db5
DN
4086if ac_fn_c_try_compile "$LINENO"; then :
4087 ac_cv_prog_cc_g=yes
8c5ff6dd 4088else
eb697db5
DN
4089 CFLAGS=""
4090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4091/* end confdefs.h. */
a4f64981 4092
eb697db5
DN
4093int
4094main ()
4095{
cd03c74a 4096
eb697db5
DN
4097 ;
4098 return 0;
4099}
a4f64981 4100_ACEOF
eb697db5 4101if ac_fn_c_try_compile "$LINENO"; then :
e6df49e4 4102
eb697db5
DN
4103else
4104 ac_c_werror_flag=$ac_save_c_werror_flag
4105 CFLAGS="-g"
4106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4107/* end confdefs.h. */
a5edbe4a 4108
eb697db5
DN
4109int
4110main ()
4111{
e6df49e4 4112
eb697db5
DN
4113 ;
4114 return 0;
4115}
4116_ACEOF
4117if ac_fn_c_try_compile "$LINENO"; then :
4118 ac_cv_prog_cc_g=yes
4119fi
4120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4121fi
4122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4123fi
4124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4125 ac_c_werror_flag=$ac_save_c_werror_flag
4126fi
4127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4128$as_echo "$ac_cv_prog_cc_g" >&6; }
4129if test "$ac_test_CFLAGS" = set; then
4130 CFLAGS=$ac_save_CFLAGS
4131elif test $ac_cv_prog_cc_g = yes; then
4132 if test "$GCC" = yes; then
4133 CFLAGS="-g -O2"
4134 else
4135 CFLAGS="-g"
4136 fi
4137else
4138 if test "$GCC" = yes; then
4139 CFLAGS="-O2"
4140 else
4141 CFLAGS=
5929fbe7
GM
4142 fi
4143fi
eb697db5
DN
4144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4145$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4146if test "${ac_cv_prog_cc_c89+set}" = set; then :
5929fbe7
GM
4147 $as_echo_n "(cached) " >&6
4148else
eb697db5
DN
4149 ac_cv_prog_cc_c89=no
4150ac_save_CC=$CC
4151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4152/* end confdefs.h. */
eb697db5
DN
4153#include <stdarg.h>
4154#include <stdio.h>
4155#include <sys/types.h>
4156#include <sys/stat.h>
4157/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4158struct buf { int x; };
4159FILE * (*rcsopen) (struct buf *, struct stat *, int);
4160static char *e (p, i)
4161 char **p;
4162 int i;
5929fbe7 4163{
eb697db5
DN
4164 return p[i];
4165}
4166static char *f (char * (*g) (char **, int), char **p, ...)
4167{
4168 char *s;
4169 va_list v;
4170 va_start (v,p);
4171 s = g (p, va_arg (v,int));
4172 va_end (v);
4173 return s;
5929fbe7 4174}
e6df49e4 4175
eb697db5
DN
4176/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4177 function prototypes and stuff, but not '\xHH' hex character constants.
4178 These don't provoke an error unfortunately, instead are silently treated
4179 as 'x'. The following induces an error, until -std is added to get
4180 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4181 array size at least. It's necessary to write '\x00'==0 to get something
4182 that's true only with -std. */
4183int osf4_cc_array ['\x00' == 0 ? 1 : -1];
e6df49e4 4184
eb697db5
DN
4185/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4186 inside strings and character constants. */
4187#define FOO(x) 'x'
4188int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
49ebbd65 4189
eb697db5
DN
4190int test (int i, double x);
4191struct s1 {int (*f) (int a);};
4192struct s2 {int (*f) (double a);};
4193int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4194int argc;
4195char **argv;
5929fbe7
GM
4196int
4197main ()
4198{
eb697db5 4199return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5929fbe7
GM
4200 ;
4201 return 0;
4202}
4203_ACEOF
eb697db5
DN
4204for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4205 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4206do
4207 CC="$ac_save_CC $ac_arg"
4208 if ac_fn_c_try_compile "$LINENO"; then :
4209 ac_cv_prog_cc_c89=$ac_arg
4210fi
4211rm -f core conftest.err conftest.$ac_objext
4212 test "x$ac_cv_prog_cc_c89" != "xno" && break
4213done
4214rm -f conftest.$ac_ext
4215CC=$ac_save_CC
49ebbd65 4216
5929fbe7 4217fi
eb697db5
DN
4218# AC_CACHE_VAL
4219case "x$ac_cv_prog_cc_c89" in
4220 x)
4221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4222$as_echo "none needed" >&6; } ;;
4223 xno)
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4225$as_echo "unsupported" >&6; } ;;
4226 *)
4227 CC="$CC $ac_cv_prog_cc_c89"
4228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4229$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4230esac
4231if test "x$ac_cv_prog_cc_c89" != xno; then :
e6df49e4 4232
5929fbe7 4233fi
eb697db5
DN
4234
4235ac_ext=c
4236ac_cpp='$CPP $CPPFLAGS'
4237ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4238ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4239ac_compiler_gnu=$ac_cv_c_compiler_gnu
4240
4241
4242# On Suns, sometimes $CPP names a directory.
4243if test -n "$CPP" && test -d "$CPP"; then
4244 CPP=
5929fbe7 4245fi
a4f64981 4246
eb697db5
DN
4247## If not using gcc, and on Solaris, and no CPP specified, see if
4248## using a Sun compiler, which needs -Xs to prevent whitespace.
4249if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4250 test x"$CPP" = x; then
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
4252$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
4253
4254if test "${emacs_cv_sunpro_c+set}" = set; then :
a4f64981
GM
4255 $as_echo_n "(cached) " >&6
4256else
eb697db5 4257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
cd03c74a 4258/* end confdefs.h. */
eb697db5 4259
15e12598
VB
4260int
4261main ()
4262{
eb697db5
DN
4263#ifndef __SUNPRO_C
4264fail;
4265#endif
4266
15e12598
VB
4267 ;
4268 return 0;
4269}
0c309b80 4270_ACEOF
eb697db5
DN
4271if ac_fn_c_try_link "$LINENO"; then :
4272 emacs_cv_sunpro_c=yes
aaa36002 4273else
eb697db5 4274 emacs_cv_sunpro_c=no
a4f64981 4275fi
eb697db5
DN
4276rm -f core conftest.err conftest.$ac_objext \
4277 conftest$ac_exeext conftest.$ac_ext
5929fbe7 4278fi
a4f64981 4279
eb697db5
DN
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
4281$as_echo "$emacs_cv_sunpro_c" >&6; }
a4f64981 4282
eb697db5
DN
4283 if test x"$emacs_cv_sunpro_c" = xyes; then
4284 NON_GNU_CPP="$CC -E -Xs"
4285 fi
4286fi
a4f64981 4287
eb697db5
DN
4288#### Some systems specify a CPP to use unless we are using GCC.
4289#### Now that we know whether we are using GCC, we can decide whether
4290#### to use that one.
4291if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4292then
4293 CPP="$NON_GNU_CPP"
4294fi
a4f64981 4295
eb697db5
DN
4296#### Some systems specify a CC to use unless we are using GCC.
4297#### Now that we know whether we are using GCC, we can decide whether
4298#### to use that one.
4299if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4300 test x$cc_specified != xyes
4301then
4302 CC="$NON_GNU_CC"
4303fi
a4f64981 4304
e7586c7a
GM
4305if test x$GCC = xyes; then
4306 C_OPTIMIZE_SWITCH=-O2
4307 test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
4308else
d9170db5 4309 C_OPTIMIZE_SWITCH=-O
e7586c7a 4310 test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
5929fbe7
GM
4311fi
4312
eb697db5
DN
4313ac_ext=c
4314ac_cpp='$CPP $CPPFLAGS'
4315ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4316ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4317ac_compiler_gnu=$ac_cv_c_compiler_gnu
4318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4319$as_echo_n "checking how to run the C preprocessor... " >&6; }
4320# On Suns, sometimes $CPP names a directory.
4321if test -n "$CPP" && test -d "$CPP"; then
4322 CPP=
4323fi
4324if test -z "$CPP"; then
4325 if test "${ac_cv_prog_CPP+set}" = set; then :
4326 $as_echo_n "(cached) " >&6
4327else
4328 # Double quotes because CPP needs to be expanded
4329 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4330 do
4331 ac_preproc_ok=false
4332for ac_c_preproc_warn_flag in '' yes
4333do
4334 # Use a header file that comes with gcc, so configuring glibc
4335 # with a fresh cross-compiler works.
4336 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4337 # <limits.h> exists even on freestanding compilers.
4338 # On the NeXT, cc -E runs the code through the compiler's parser,
4339 # not just through cpp. "Syntax error" is here to catch this case.
4340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 4341/* end confdefs.h. */
eb697db5
DN
4342#ifdef __STDC__
4343# include <limits.h>
4344#else
4345# include <assert.h>
4346#endif
4347 Syntax error
49ebbd65 4348_ACEOF
eb697db5
DN
4349if ac_fn_c_try_cpp "$LINENO"; then :
4350
4351else
4352 # Broken: fails on valid input.
4353continue
4354fi
4355rm -f conftest.err conftest.$ac_ext
5929fbe7 4356
eb697db5
DN
4357 # OK, works on sane cases. Now check whether nonexistent headers
4358 # can be detected and how.
4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4360/* end confdefs.h. */
4361#include <ac_nonexistent.h>
5929fbe7 4362_ACEOF
eb697db5
DN
4363if ac_fn_c_try_cpp "$LINENO"; then :
4364 # Broken: success on invalid input.
4365continue
8c5ff6dd 4366else
eb697db5
DN
4367 # Passes both tests.
4368ac_preproc_ok=:
4369break
8c5ff6dd 4370fi
eb697db5 4371rm -f conftest.err conftest.$ac_ext
5929fbe7 4372
eb697db5
DN
4373done
4374# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4375rm -f conftest.err conftest.$ac_ext
4376if $ac_preproc_ok; then :
4377 break
4378fi
5929fbe7 4379
eb697db5
DN
4380 done
4381 ac_cv_prog_CPP=$CPP
5929fbe7 4382
eb697db5
DN
4383fi
4384 CPP=$ac_cv_prog_CPP
4385else
4386 ac_cv_prog_CPP=$CPP
4387fi
4388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4389$as_echo "$CPP" >&6; }
4390ac_preproc_ok=false
4391for ac_c_preproc_warn_flag in '' yes
4392do
4393 # Use a header file that comes with gcc, so configuring glibc
4394 # with a fresh cross-compiler works.
4395 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4396 # <limits.h> exists even on freestanding compilers.
4397 # On the NeXT, cc -E runs the code through the compiler's parser,
4398 # not just through cpp. "Syntax error" is here to catch this case.
4399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4400/* end confdefs.h. */
4401#ifdef __STDC__
4402# include <limits.h>
4403#else
4404# include <assert.h>
4405#endif
4406 Syntax error
5929fbe7 4407_ACEOF
eb697db5 4408if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4409
eb697db5
DN
4410else
4411 # Broken: fails on valid input.
4412continue
8c5ff6dd 4413fi
eb697db5 4414rm -f conftest.err conftest.$ac_ext
8c5ff6dd 4415
eb697db5
DN
4416 # OK, works on sane cases. Now check whether nonexistent headers
4417 # can be detected and how.
4418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 4419/* end confdefs.h. */
eb697db5 4420#include <ac_nonexistent.h>
8c5ff6dd 4421_ACEOF
eb697db5
DN
4422if ac_fn_c_try_cpp "$LINENO"; then :
4423 # Broken: success on invalid input.
4424continue
a5edbe4a 4425else
eb697db5
DN
4426 # Passes both tests.
4427ac_preproc_ok=:
4428break
4429fi
4430rm -f conftest.err conftest.$ac_ext
e6df49e4 4431
eb697db5
DN
4432done
4433# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4434rm -f conftest.err conftest.$ac_ext
4435if $ac_preproc_ok; then :
cd03c74a 4436
eb697db5
DN
4437else
4438 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4440as_fn_error "C preprocessor \"$CPP\" fails sanity check
4441See \`config.log' for more details." "$LINENO" 5; }
a4f64981 4442fi
e6df49e4 4443
eb697db5
DN
4444ac_ext=c
4445ac_cpp='$CPP $CPPFLAGS'
4446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4448ac_compiler_gnu=$ac_cv_c_compiler_gnu
15e12598 4449
a5edbe4a 4450
eb697db5
DN
4451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4452$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4453if test "${ac_cv_path_GREP+set}" = set; then :
4454 $as_echo_n "(cached) " >&6
4455else
4456 if test -z "$GREP"; then
4457 ac_path_GREP_found=false
4458 # Loop through the user's path and test for each of PROGNAME-LIST
4459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4461do
4462 IFS=$as_save_IFS
4463 test -z "$as_dir" && as_dir=.
4464 for ac_prog in grep ggrep; do
4465 for ac_exec_ext in '' $ac_executable_extensions; do
4466 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4467 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4468# Check for GNU ac_path_GREP and select it if it is found.
4469 # Check for GNU $ac_path_GREP
4470case `"$ac_path_GREP" --version 2>&1` in
4471*GNU*)
4472 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4473*)
4474 ac_count=0
4475 $as_echo_n 0123456789 >"conftest.in"
4476 while :
4477 do
4478 cat "conftest.in" "conftest.in" >"conftest.tmp"
4479 mv "conftest.tmp" "conftest.in"
4480 cp "conftest.in" "conftest.nl"
4481 $as_echo 'GREP' >> "conftest.nl"
4482 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4483 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4484 as_fn_arith $ac_count + 1 && ac_count=$as_val
4485 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4486 # Best one so far, save it but keep looking for a better one
4487 ac_cv_path_GREP="$ac_path_GREP"
4488 ac_path_GREP_max=$ac_count
4489 fi
4490 # 10*(2^10) chars as input seems more than enough
4491 test $ac_count -gt 10 && break
4492 done
4493 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4494esac
a5edbe4a 4495
eb697db5
DN
4496 $ac_path_GREP_found && break 3
4497 done
4498 done
4499 done
4500IFS=$as_save_IFS
4501 if test -z "$ac_cv_path_GREP"; then
4502 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5929fbe7 4503 fi
eb697db5
DN
4504else
4505 ac_cv_path_GREP=$GREP
cd03c74a 4506fi
0c309b80 4507
eb697db5
DN
4508fi
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4510$as_echo "$ac_cv_path_GREP" >&6; }
4511 GREP="$ac_cv_path_GREP"
15e12598 4512
8c5ff6dd 4513
eb697db5
DN
4514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4515$as_echo_n "checking for egrep... " >&6; }
4516if test "${ac_cv_path_EGREP+set}" = set; then :
8c5ff6dd 4517 $as_echo_n "(cached) " >&6
aaa36002 4518else
eb697db5
DN
4519 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4520 then ac_cv_path_EGREP="$GREP -E"
4521 else
4522 if test -z "$EGREP"; then
4523 ac_path_EGREP_found=false
4524 # Loop through the user's path and test for each of PROGNAME-LIST
8c5ff6dd 4525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 4526for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
8c5ff6dd
KR
4527do
4528 IFS=$as_save_IFS
4529 test -z "$as_dir" && as_dir=.
eb697db5
DN
4530 for ac_prog in egrep; do
4531 for ac_exec_ext in '' $ac_executable_extensions; do
4532 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4533 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4534# Check for GNU ac_path_EGREP and select it if it is found.
4535 # Check for GNU $ac_path_EGREP
4536case `"$ac_path_EGREP" --version 2>&1` in
4537*GNU*)
4538 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4539*)
4540 ac_count=0
4541 $as_echo_n 0123456789 >"conftest.in"
4542 while :
4543 do
4544 cat "conftest.in" "conftest.in" >"conftest.tmp"
4545 mv "conftest.tmp" "conftest.in"
4546 cp "conftest.in" "conftest.nl"
4547 $as_echo 'EGREP' >> "conftest.nl"
4548 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4549 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4550 as_fn_arith $ac_count + 1 && ac_count=$as_val
4551 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4552 # Best one so far, save it but keep looking for a better one
4553 ac_cv_path_EGREP="$ac_path_EGREP"
4554 ac_path_EGREP_max=$ac_count
4555 fi
4556 # 10*(2^10) chars as input seems more than enough
4557 test $ac_count -gt 10 && break
4558 done
4559 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4560esac
4561
4562 $ac_path_EGREP_found && break 3
4563 done
4564 done
4565 done
5929fbe7 4566IFS=$as_save_IFS
eb697db5
DN
4567 if test -z "$ac_cv_path_EGREP"; then
4568 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4569 fi
4570else
4571 ac_cv_path_EGREP=$EGREP
4572fi
5929fbe7 4573
eb697db5 4574 fi
5929fbe7 4575fi
eb697db5
DN
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4577$as_echo "$ac_cv_path_EGREP" >&6; }
4578 EGREP="$ac_cv_path_EGREP"
4579
4580
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4582$as_echo_n "checking for ANSI C header files... " >&6; }
4583if test "${ac_cv_header_stdc+set}" = set; then :
4584 $as_echo_n "(cached) " >&6
4585else
4586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4587/* end confdefs.h. */
4588#include <stdlib.h>
4589#include <stdarg.h>
4590#include <string.h>
4591#include <float.h>
4592
4593int
4594main ()
4595{
4596
4597 ;
4598 return 0;
4599}
4600_ACEOF
4601if ac_fn_c_try_compile "$LINENO"; then :
4602 ac_cv_header_stdc=yes
5929fbe7 4603else
eb697db5 4604 ac_cv_header_stdc=no
5929fbe7 4605fi
eb697db5 4606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 4607
eb697db5
DN
4608if test $ac_cv_header_stdc = yes; then
4609 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611/* end confdefs.h. */
4612#include <string.h>
15e12598 4613
eb697db5
DN
4614_ACEOF
4615if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4616 $EGREP "memchr" >/dev/null 2>&1; then :
a4f64981 4617
eb697db5
DN
4618else
4619 ac_cv_header_stdc=no
4620fi
4621rm -f conftest*
5929fbe7 4622
eb697db5 4623fi
5929fbe7 4624
eb697db5
DN
4625if test $ac_cv_header_stdc = yes; then
4626 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4628/* end confdefs.h. */
4629#include <stdlib.h>
5929fbe7 4630
eb697db5
DN
4631_ACEOF
4632if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4633 $EGREP "free" >/dev/null 2>&1; then :
5929fbe7 4634
eb697db5
DN
4635else
4636 ac_cv_header_stdc=no
4637fi
4638rm -f conftest*
5929fbe7 4639
eb697db5 4640fi
5929fbe7 4641
eb697db5
DN
4642if test $ac_cv_header_stdc = yes; then
4643 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4644 if test "$cross_compiling" = yes; then :
4645 :
4646else
4647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4648/* end confdefs.h. */
4649#include <ctype.h>
4650#include <stdlib.h>
4651#if ((' ' & 0x0FF) == 0x020)
4652# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4653# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4654#else
4655# define ISLOWER(c) \
4656 (('a' <= (c) && (c) <= 'i') \
4657 || ('j' <= (c) && (c) <= 'r') \
4658 || ('s' <= (c) && (c) <= 'z'))
4659# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4660#endif
5929fbe7 4661
eb697db5
DN
4662#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4663int
4664main ()
4665{
4666 int i;
4667 for (i = 0; i < 256; i++)
4668 if (XOR (islower (i), ISLOWER (i))
4669 || toupper (i) != TOUPPER (i))
4670 return 2;
4671 return 0;
4672}
4673_ACEOF
4674if ac_fn_c_try_run "$LINENO"; then :
a4f64981 4675
eb697db5
DN
4676else
4677 ac_cv_header_stdc=no
4678fi
4679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4680 conftest.$ac_objext conftest.beam conftest.$ac_ext
4681fi
aaa36002 4682
eb697db5
DN
4683fi
4684fi
4685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4686$as_echo "$ac_cv_header_stdc" >&6; }
4687if test $ac_cv_header_stdc = yes; then
cd03c74a 4688
eb697db5 4689$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a5edbe4a 4690
eb697db5 4691fi
5929fbe7 4692
eb697db5
DN
4693# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4694for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4695 inttypes.h stdint.h unistd.h
4696do :
4697 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4698ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4699"
4700eval as_val=\$$as_ac_Header
4701 if test "x$as_val" = x""yes; then :
4702 cat >>confdefs.h <<_ACEOF
4703#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4704_ACEOF
4705
4706fi
5929fbe7 4707
5929fbe7 4708done
a5edbe4a 4709
5929fbe7
GM
4710
4711
eb697db5
DN
4712 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4713if test "x$ac_cv_header_minix_config_h" = x""yes; then :
4714 MINIX=yes
4715else
4716 MINIX=
4717fi
5929fbe7 4718
5929fbe7 4719
eb697db5 4720 if test "$MINIX" = yes; then
5929fbe7 4721
eb697db5 4722$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5929fbe7 4723
5929fbe7 4724
eb697db5 4725$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5929fbe7
GM
4726
4727
eb697db5 4728$as_echo "#define _MINIX 1" >>confdefs.h
5929fbe7 4729
5929fbe7
GM
4730 fi
4731
5929fbe7 4732
eb697db5
DN
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4734$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4735if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
5929fbe7
GM
4736 $as_echo_n "(cached) " >&6
4737else
eb697db5 4738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7
GM
4739/* end confdefs.h. */
4740
eb697db5
DN
4741# define __EXTENSIONS__ 1
4742 $ac_includes_default
5929fbe7
GM
4743int
4744main ()
4745{
eb697db5 4746
5929fbe7
GM
4747 ;
4748 return 0;
4749}
4750_ACEOF
eb697db5
DN
4751if ac_fn_c_try_compile "$LINENO"; then :
4752 ac_cv_safe_to_define___extensions__=yes
5929fbe7 4753else
eb697db5 4754 ac_cv_safe_to_define___extensions__=no
e6df49e4 4755fi
eb697db5 4756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9452ded1 4757fi
eb697db5
DN
4758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4759$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4760 test $ac_cv_safe_to_define___extensions__ = yes &&
4761 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
8c5ff6dd 4762
eb697db5 4763 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
a4f64981 4764
eb697db5 4765 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
a4f64981 4766
eb697db5 4767 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5929fbe7 4768
eb697db5 4769 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
a4f64981
GM
4770
4771
a4f64981 4772
eb697db5
DN
4773### Use -Wno-pointer-sign if the compiler supports it
4774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wno-pointer-sign" >&5
4775$as_echo_n "checking whether gcc understands -Wno-pointer-sign... " >&6; }
4776SAVE_CFLAGS="$CFLAGS"
4777CFLAGS="$CFLAGS -Wno-pointer-sign"
4778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4779/* end confdefs.h. */
e6df49e4 4780
eb697db5
DN
4781int
4782main ()
4783{
4784
4785 ;
4786 return 0;
4787}
4788_ACEOF
4789if ac_fn_c_try_compile "$LINENO"; then :
4790 has_option=yes
5929fbe7 4791else
eb697db5 4792 has_option=no
cd03c74a 4793fi
eb697db5
DN
4794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4795if test $has_option = yes; then
4796 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
5929fbe7 4797fi
eb697db5
DN
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4799$as_echo "$has_option" >&6; }
4800CFLAGS="$SAVE_CFLAGS"
4801unset has_option
4802unset SAVE_CFLAGS
4803
4804### Use -Wdeclaration-after-statement if the compiler supports it
4805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -Wdeclaration-after-statement" >&5
4806$as_echo_n "checking whether gcc understands -Wdeclaration-after-statement... " >&6; }
4807SAVE_CFLAGS="$CFLAGS"
4808CFLAGS="$CFLAGS -Wdeclaration-after-statement"
4809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 4810/* end confdefs.h. */
aaa36002 4811
5929fbe7
GM
4812int
4813main ()
4814{
eb697db5 4815
5929fbe7
GM
4816 ;
4817 return 0;
4818}
4819_ACEOF
eb697db5
DN
4820if ac_fn_c_try_compile "$LINENO"; then :
4821 has_option=yes
7186fb09 4822else
eb697db5
DN
4823 has_option=no
4824fi
4825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4826if test $has_option = yes; then
4827 C_WARNINGS_SWITCH="-Wdeclaration-after-statement $C_WARNINGS_SWITCH"
4828fi
4829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
4830$as_echo "$has_option" >&6; }
4831CFLAGS="$SAVE_CFLAGS"
4832unset has_option
4833unset SAVE_CFLAGS
4834
4835#### Some other nice autoconf tests.
e6df49e4 4836
eb697db5
DN
4837ac_ext=c
4838ac_cpp='$CPP $CPPFLAGS'
4839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4841ac_compiler_gnu=$ac_cv_c_compiler_gnu
4842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4843$as_echo_n "checking how to run the C preprocessor... " >&6; }
4844# On Suns, sometimes $CPP names a directory.
4845if test -n "$CPP" && test -d "$CPP"; then
4846 CPP=
5929fbe7 4847fi
eb697db5
DN
4848if test -z "$CPP"; then
4849 if test "${ac_cv_prog_CPP+set}" = set; then :
4850 $as_echo_n "(cached) " >&6
4851else
4852 # Double quotes because CPP needs to be expanded
4853 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4854 do
4855 ac_preproc_ok=false
4856for ac_c_preproc_warn_flag in '' yes
4857do
4858 # Use a header file that comes with gcc, so configuring glibc
4859 # with a fresh cross-compiler works.
4860 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4861 # <limits.h> exists even on freestanding compilers.
4862 # On the NeXT, cc -E runs the code through the compiler's parser,
4863 # not just through cpp. "Syntax error" is here to catch this case.
4864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4865/* end confdefs.h. */
4866#ifdef __STDC__
4867# include <limits.h>
4868#else
4869# include <assert.h>
4870#endif
4871 Syntax error
4872_ACEOF
4873if ac_fn_c_try_cpp "$LINENO"; then :
15e12598 4874
eb697db5
DN
4875else
4876 # Broken: fails on valid input.
4877continue
8c5ff6dd 4878fi
eb697db5
DN
4879rm -f conftest.err conftest.$ac_ext
4880
4881 # OK, works on sane cases. Now check whether nonexistent headers
4882 # can be detected and how.
4883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4884/* end confdefs.h. */
4885#include <ac_nonexistent.h>
4886_ACEOF
4887if ac_fn_c_try_cpp "$LINENO"; then :
4888 # Broken: success on invalid input.
4889continue
4890else
4891 # Passes both tests.
4892ac_preproc_ok=:
4893break
a4f64981 4894fi
eb697db5 4895rm -f conftest.err conftest.$ac_ext
e6df49e4 4896
eb697db5
DN
4897done
4898# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4899rm -f conftest.err conftest.$ac_ext
4900if $ac_preproc_ok; then :
4901 break
5929fbe7 4902fi
8c5ff6dd 4903
eb697db5
DN
4904 done
4905 ac_cv_prog_CPP=$CPP
aaa36002 4906
eb697db5
DN
4907fi
4908 CPP=$ac_cv_prog_CPP
4909else
4910 ac_cv_prog_CPP=$CPP
4911fi
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4913$as_echo "$CPP" >&6; }
4914ac_preproc_ok=false
4915for ac_c_preproc_warn_flag in '' yes
4916do
4917 # Use a header file that comes with gcc, so configuring glibc
4918 # with a fresh cross-compiler works.
4919 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4920 # <limits.h> exists even on freestanding compilers.
4921 # On the NeXT, cc -E runs the code through the compiler's parser,
4922 # not just through cpp. "Syntax error" is here to catch this case.
4923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4924/* end confdefs.h. */
4925#ifdef __STDC__
4926# include <limits.h>
4927#else
4928# include <assert.h>
4929#endif
4930 Syntax error
4931_ACEOF
4932if ac_fn_c_try_cpp "$LINENO"; then :
5929fbe7 4933
eb697db5
DN
4934else
4935 # Broken: fails on valid input.
4936continue
4937fi
4938rm -f conftest.err conftest.$ac_ext
5929fbe7 4939
eb697db5
DN
4940 # OK, works on sane cases. Now check whether nonexistent headers
4941 # can be detected and how.
4942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4943/* end confdefs.h. */
4944#include <ac_nonexistent.h>
5929fbe7 4945_ACEOF
eb697db5
DN
4946if ac_fn_c_try_cpp "$LINENO"; then :
4947 # Broken: success on invalid input.
4948continue
4949else
4950 # Passes both tests.
4951ac_preproc_ok=:
4952break
4953fi
4954rm -f conftest.err conftest.$ac_ext
5929fbe7 4955
eb697db5
DN
4956done
4957# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4958rm -f conftest.err conftest.$ac_ext
4959if $ac_preproc_ok; then :
5929fbe7 4960
eb697db5
DN
4961else
4962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4964as_fn_error "C preprocessor \"$CPP\" fails sanity check
4965See \`config.log' for more details." "$LINENO" 5; }
4966fi
5929fbe7 4967
eb697db5
DN
4968ac_ext=c
4969ac_cpp='$CPP $CPPFLAGS'
4970ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4971ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4972ac_compiler_gnu=$ac_cv_c_compiler_gnu
4973
4974# Find a good install program. We prefer a C program (faster),
4975# so one script is as good as another. But avoid the broken or
4976# incompatible versions:
4977# SysV /etc/install, /usr/sbin/install
4978# SunOS /usr/etc/install
4979# IRIX /sbin/install
4980# AIX /bin/install
4981# AmigaOS /C/install, which installs bootblocks on floppy discs
4982# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4983# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4984# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4985# OS/2's system install, which has a completely different semantic
4986# ./install, which can be erroneously created by make from ./install.sh.
4987# Reject install programs that cannot install multiple files.
4988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4989$as_echo_n "checking for a BSD-compatible install... " >&6; }
4990if test -z "$INSTALL"; then
4991if test "${ac_cv_path_install+set}" = set; then :
4992 $as_echo_n "(cached) " >&6
4993else
4994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995for as_dir in $PATH
4996do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
4999 # Account for people who put trailing slashes in PATH elements.
5000case $as_dir/ in #((
5001 ./ | .// | /[cC]/* | \
5002 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5003 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5004 /usr/ucb/* ) ;;
5005 *)
5006 # OSF1 and SCO ODT 3.0 have their own names for install.
5007 # Don't use installbsd from OSF since it installs stuff as root
5008 # by default.
5009 for ac_prog in ginstall scoinst install; do
5010 for ac_exec_ext in '' $ac_executable_extensions; do
5011 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5012 if test $ac_prog = install &&
5013 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5014 # AIX install. It has an incompatible calling convention.
5015 :
5016 elif test $ac_prog = install &&
5017 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5018 # program-specific install script used by HP pwplus--don't use.
5019 :
5020 else
5021 rm -rf conftest.one conftest.two conftest.dir
5022 echo one > conftest.one
5023 echo two > conftest.two
5024 mkdir conftest.dir
5025 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5026 test -s conftest.one && test -s conftest.two &&
5027 test -s conftest.dir/conftest.one &&
5028 test -s conftest.dir/conftest.two
5029 then
5030 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5031 break 3
5032 fi
5033 fi
5034 fi
5035 done
5036 done
5037 ;;
5038esac
15e12598 5039
eb697db5
DN
5040 done
5041IFS=$as_save_IFS
8c5ff6dd 5042
eb697db5 5043rm -rf conftest.one conftest.two conftest.dir
8c5ff6dd 5044
eb697db5
DN
5045fi
5046 if test "${ac_cv_path_install+set}" = set; then
5047 INSTALL=$ac_cv_path_install
5048 else
5049 # As a last resort, use the slow shell script. Don't cache a
5050 # value for INSTALL within a source directory, because that will
5051 # break other packages using the cache if that directory is
5052 # removed, or if the value is a relative name.
5053 INSTALL=$ac_install_sh
5054 fi
5055fi
5056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5057$as_echo "$INSTALL" >&6; }
cd03c74a 5058
eb697db5
DN
5059# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5060# It thinks the first close brace ends the variable substitution.
5061test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
15e12598 5062
eb697db5 5063test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
15e12598 5064
eb697db5 5065test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
a4f64981 5066
eb697db5
DN
5067if test "x$RANLIB" = x; then
5068 if test -n "$ac_tool_prefix"; then
5069 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5070set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8c5ff6dd 5072$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5073if test "${ac_cv_prog_RANLIB+set}" = set; then :
7186fb09
GM
5074 $as_echo_n "(cached) " >&6
5075else
eb697db5
DN
5076 if test -n "$RANLIB"; then
5077 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5078else
5079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8c5ff6dd
KR
5080for as_dir in $PATH
5081do
5082 IFS=$as_save_IFS
5083 test -z "$as_dir" && as_dir=.
eb697db5 5084 for ac_exec_ext in '' $ac_executable_extensions; do
8c5ff6dd 5085 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5086 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8c5ff6dd
KR
5088 break 2
5089 fi
5090done
eb697db5 5091 done
8c5ff6dd 5092IFS=$as_save_IFS
a4f64981 5093
e6df49e4 5094fi
eb697db5
DN
5095fi
5096RANLIB=$ac_cv_prog_RANLIB
5097if test -n "$RANLIB"; then
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5099$as_echo "$RANLIB" >&6; }
a4f64981 5100else
eb697db5 5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8c5ff6dd 5102$as_echo "no" >&6; }
a4f64981
GM
5103fi
5104
a4f64981 5105
eb697db5
DN
5106fi
5107if test -z "$ac_cv_prog_RANLIB"; then
5108 ac_ct_RANLIB=$RANLIB
5109 # Extract the first word of "ranlib", so it can be a program name with args.
5110set dummy ranlib; ac_word=$2
5111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5112$as_echo_n "checking for $ac_word... " >&6; }
5113if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
5114 $as_echo_n "(cached) " >&6
5115else
5116 if test -n "$ac_ct_RANLIB"; then
5117 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5118else
5119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5120for as_dir in $PATH
5121do
5122 IFS=$as_save_IFS
5123 test -z "$as_dir" && as_dir=.
5124 for ac_exec_ext in '' $ac_executable_extensions; do
5125 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5126 ac_cv_prog_ac_ct_RANLIB="ranlib"
5127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5128 break 2
5129 fi
5130done
5131 done
5132IFS=$as_save_IFS
8c5ff6dd 5133
eb697db5
DN
5134fi
5135fi
5136ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5137if test -n "$ac_ct_RANLIB"; then
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5139$as_echo "$ac_ct_RANLIB" >&6; }
5140else
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5142$as_echo "no" >&6; }
eb697db5 5143fi
e6df49e4 5144
eb697db5
DN
5145 if test "x$ac_ct_RANLIB" = x; then
5146 RANLIB=":"
5147 else
5148 case $cross_compiling:$ac_tool_warned in
5149yes:)
5150{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5151$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5152ac_tool_warned=yes ;;
5153esac
5154 RANLIB=$ac_ct_RANLIB
5155 fi
5156else
5157 RANLIB="$ac_cv_prog_RANLIB"
5158fi
a5edbe4a 5159
eb697db5 5160fi
15e12598 5161
eb697db5
DN
5162## Although we're running on an amd64 kernel, we're actually compiling for
5163## the x86 architecture. The user should probably have provided an
5164## explicit --build to `configure', but if everything else than the kernel
5165## is running in i386 mode, we can help them out.
5166if test "$machine" = "amdx86-64"; then
5167 ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
5168if test "x$ac_cv_have_decl_i386" = x""yes; then :
15e12598 5169
eb697db5 5170fi
cd03c74a 5171
eb697db5
DN
5172 if test "$ac_cv_have_decl_i386" = "yes"; then
5173 canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
5174 machine=intel386
5175 machfile="m/${machine}.h"
5929fbe7 5176 fi
eb697db5 5177fi
49ebbd65 5178
eb697db5
DN
5179# Extract the first word of "install-info", so it can be a program name with args.
5180set dummy install-info; ac_word=$2
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5182$as_echo_n "checking for $ac_word... " >&6; }
5183if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5929fbe7
GM
5184 $as_echo_n "(cached) " >&6
5185else
eb697db5
DN
5186 case $INSTALL_INFO in
5187 [\\/]* | ?:[\\/]*)
5188 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5189 ;;
5190 *)
5191 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192for as_dir in $PATH
5193do
5194 IFS=$as_save_IFS
5195 test -z "$as_dir" && as_dir=.
5196 for ac_exec_ext in '' $ac_executable_extensions; do
5197 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5198 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5200 break 2
5201 fi
5202done
5203 done
5204IFS=$as_save_IFS
8c5ff6dd 5205
eb697db5 5206 ;;
a4f64981 5207esac
eb697db5
DN
5208fi
5209INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5210if test -n "$INSTALL_INFO"; then
5211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5212$as_echo "$INSTALL_INFO" >&6; }
5213else
5214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5215$as_echo "no" >&6; }
5929fbe7 5216fi
49ebbd65 5217
08b47d3d 5218
eb697db5
DN
5219# Extract the first word of "install-info", so it can be a program name with args.
5220set dummy install-info; ac_word=$2
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929fbe7 5222$as_echo_n "checking for $ac_word... " >&6; }
eb697db5 5223if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5929fbe7
GM
5224 $as_echo_n "(cached) " >&6
5225else
eb697db5 5226 case $INSTALL_INFO in
5929fbe7 5227 [\\/]* | ?:[\\/]*)
eb697db5 5228 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5929fbe7
GM
5229 ;;
5230 *)
5231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
eb697db5 5232for as_dir in /usr/sbin
5929fbe7
GM
5233do
5234 IFS=$as_save_IFS
5235 test -z "$as_dir" && as_dir=.
eb697db5 5236 for ac_exec_ext in '' $ac_executable_extensions; do
5929fbe7 5237 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
eb697db5
DN
5238 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5929fbe7 5240 break 2
8c5ff6dd 5241 fi
5929fbe7 5242done
eb697db5 5243 done
5929fbe7
GM
5244IFS=$as_save_IFS
5245
5929fbe7
GM
5246 ;;
5247esac
5248fi
eb697db5
DN
5249INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5250if test -n "$INSTALL_INFO"; then
5251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5252$as_echo "$INSTALL_INFO" >&6; }
5929fbe7 5253else
eb697db5 5254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929fbe7 5255$as_echo "no" >&6; }
8c5ff6dd 5256fi
08b47d3d 5257
08b47d3d 5258
eb697db5
DN
5259# Extract the first word of "install-info", so it can be a program name with args.
5260set dummy install-info; ac_word=$2
5261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5262$as_echo_n "checking for $ac_word... " >&6; }
5263if test "${ac_cv_path_INSTALL_INFO+set}" = set; then :
5264 $as_echo_n "(cached) " >&6
5265else
5266 case $INSTALL_INFO in
5267 [\\/]* | ?:[\\/]*)
5268 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5269 ;;
5270 *)
5271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5272for as_dir in /sbin
5273do
5274 IFS=$as_save_IFS
5275 test -z "$as_dir" && as_dir=.
5276 for ac_exec_ext in '' $ac_executable_extensions; do
5277 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5278 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5279 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5280 break 2
5929fbe7 5281 fi
eb697db5
DN
5282done
5283 done
5284IFS=$as_save_IFS
08b47d3d 5285
eb697db5
DN
5286 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5287 ;;
5288esac
5289fi
5290INSTALL_INFO=$ac_cv_path_INSTALL_INFO
5291if test -n "$INSTALL_INFO"; then
5292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_INFO" >&5
5293$as_echo "$INSTALL_INFO" >&6; }
8c5ff6dd 5294else
eb697db5
DN
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296$as_echo "no" >&6; }
a4f64981 5297fi
08b47d3d 5298
5929fbe7 5299
eb697db5
DN
5300# Extract the first word of "gzip", so it can be a program name with args.
5301set dummy gzip; ac_word=$2
5302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5303$as_echo_n "checking for $ac_word... " >&6; }
5304if test "${ac_cv_path_GZIP_PROG+set}" = set; then :
5929fbe7 5305 $as_echo_n "(cached) " >&6
5929fbe7 5306else
eb697db5
DN
5307 case $GZIP_PROG in
5308 [\\/]* | ?:[\\/]*)
5309 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
5310 ;;
5311 *)
5312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5313for as_dir in $PATH
5314do
5315 IFS=$as_save_IFS
5316 test -z "$as_dir" && as_dir=.
5317 for ac_exec_ext in '' $ac_executable_extensions; do
5318 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5319 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
5320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5321 break 2
5322 fi
5323done
5324 done
5325IFS=$as_save_IFS
5929fbe7 5326
eb697db5 5327 ;;
8c5ff6dd 5328esac
eb697db5
DN
5329fi
5330GZIP_PROG=$ac_cv_path_GZIP_PROG
5331if test -n "$GZIP_PROG"; then
5332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_PROG" >&5
5333$as_echo "$GZIP_PROG" >&6; }
5929fbe7 5334else
eb697db5
DN
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5336$as_echo "no" >&6; }
5929fbe7
GM
5337fi
5338
5929fbe7 5339
5929fbe7 5340
8c5ff6dd 5341
eb697db5
DN
5342## Need makeinfo >= 4.6 (?) to build the manuals.
5343# Extract the first word of "makeinfo", so it can be a program name with args.
5344set dummy makeinfo; ac_word=$2
5345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5346$as_echo_n "checking for $ac_word... " >&6; }
5347if test "${ac_cv_path_MAKEINFO+set}" = set; then :
5929fbe7
GM
5348 $as_echo_n "(cached) " >&6
5349else
eb697db5
DN
5350 case $MAKEINFO in
5351 [\\/]* | ?:[\\/]*)
5352 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5353 ;;
5354 *)
5355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5356for as_dir in $PATH
5357do
5358 IFS=$as_save_IFS
5359 test -z "$as_dir" && as_dir=.
5360 for ac_exec_ext in '' $ac_executable_extensions; do
5361 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5362 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5363 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5364 break 2
5365 fi
5366done
5367 done
5368IFS=$as_save_IFS
5929fbe7 5369
eb697db5
DN
5370 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5371 ;;
a4f64981 5372esac
eb697db5
DN
5373fi
5374MAKEINFO=$ac_cv_path_MAKEINFO
5375if test -n "$MAKEINFO"; then
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5
5377$as_echo "$MAKEINFO" >&6; }
5929fbe7 5378else
eb697db5
DN
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380$as_echo "no" >&6; }
5381fi
e6df49e4 5382
eb697db5
DN
5383
5384if test "$MAKEINFO" != "no" && \
5385 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
5386 MAKEINFO=no
5929fbe7 5387fi
e6df49e4 5388
eb697db5
DN
5389## Makeinfo is unusual. For a released Emacs, the manuals are
5390## pre-built, and not deleted by the normal clean rules. makeinfo is
5391## therefore in the category of "special tools" not normally required, which
5392## configure does not have to check for (eg autoconf itself).
5393## In a Bazaar checkout on the other hand, the manuals are not included.
5394## So makeinfo is a requirement to build from Bazaar, and configure
5395## should test for it as it does for any other build requirement.
5396## We use the presence of $srcdir/info/emacs to distinguish a release,
5397## with pre-built manuals, from a Bazaar checkout.
5398if test "$MAKEINFO" = "no"; then
5399 if test "x${with_makeinfo}" = "xno"; then
5400 MAKEINFO=off
5401 elif test ! -e $srcdir/info/emacs; then
5402 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
5403source tree does not seem to have pre-built manuals in the \`info' directory.
5404Either install a suitable version of makeinfo, or re-run configure
5405with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
5406 fi
5929fbe7 5407fi
eb697db5
DN
5408
5409
5410if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5411then
f4981b7e 5412 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5929fbe7 5413fi
e6df49e4 5414
eb697db5
DN
5415if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5416then
f4981b7e 5417 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5929fbe7 5418fi
e6df49e4
GM
5419
5420
eb697db5
DN
5421late_LDFLAGS=$LDFLAGS
5422if test "$GCC" = yes; then
5423 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5424else
5425 LDFLAGS="$LDFLAGS -znocombreloc"
5426fi
e6df49e4 5427
eb697db5
DN
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -znocombreloc" >&5
5429$as_echo_n "checking for -znocombreloc... " >&6; }
5430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5431/* end confdefs.h. */
5432main(){return 0;}
5929fbe7 5433_ACEOF
eb697db5
DN
5434if ac_fn_c_try_link "$LINENO"; then :
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5436$as_echo "yes" >&6; }
a4f64981 5437else
eb697db5
DN
5438 LDFLAGS=$late_LDFLAGS
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5440$as_echo "no" >&6; }
8c5ff6dd 5441fi
eb697db5
DN
5442rm -f core conftest.err conftest.$ac_objext \
5443 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 5444
e7586c7a
GM
5445LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}"
5446
5447
5448# The value of CPP is a quoted variable reference, so we need to do this
5449# to get its actual value...
5450CPP=`eval "echo $CPP"`
8c5ff6dd 5451
8c5ff6dd 5452
eb697db5
DN
5453### First figure out CFLAGS (which we use for running the compiler here)
5454### and REAL_CFLAGS (which we use for real compilation).
f71cd38a
DN
5455### The two are the same except when using GCC where we might use
5456### extra warning and profiling flags.
8c5ff6dd 5457
eb697db5
DN
5458### If the CFLAGS env var is specified, we use that value
5459### instead of the default.
8c5ff6dd 5460
eb697db5 5461if test "x$SPECIFIED_CFLAGS" = x; then
f71cd38a 5462 CFLAGS="-g $C_OPTIMIZE_SWITCH"
e7586c7a 5463 if test x$GCC = xyes; then
e7586c7a
GM
5464 REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS"
5465 else
f71cd38a 5466 REAL_CFLAGS="$CFLAGS"
e7586c7a 5467 fi
5929fbe7 5468else
eb697db5 5469 REAL_CFLAGS="$CFLAGS"
5929fbe7 5470fi
5929fbe7 5471
e6df49e4 5472
e7586c7a
GM
5473CANNOT_DUMP=no
5474case "$opsys" in
5475 your-opsys-here)
5476 CANNOT_DUMP=yes
5477
5478$as_echo "#define CANNOT_DUMP 1" >>confdefs.h
5479
5480 ;;
5481esac
5482
eb697db5
DN
5483
5484
5485UNEXEC_OBJ=unexelf.o
5486case "$opsys" in
5487 aix4-2)
5488 UNEXEC_OBJ=unexaix.o
5489 ;;
5490 cygwin)
5491 UNEXEC_OBJ=unexcw.o
5492 ;;
5493 darwin)
5494 UNEXEC_OBJ=unexmacosx.o
5495 ;;
5496 hpux10-20 | hpux11)
5497 UNEXEC_OBJ=unexhp9k800.o
5498 ;;
5499 sol2-10)
5500 # Use the Solaris dldump() function, called from unexsol.c, to dump
5501 # emacs, instead of the generic ELF dump code found in unexelf.c.
5502 # The resulting binary has a complete symbol table, and is better
5503 # for debugging and other observability tools (debuggers, pstack, etc).
5504 #
5505 # If you encounter a problem using dldump(), please consider sending
5506 # a message to the OpenSolaris tools-linking mailing list:
5507 # http://mail.opensolaris.org/mailman/listinfo/tools-linking
5508 #
5509 # It is likely that dldump() works with older Solaris too, but this has
5510 # not been tested, so for now this change is for Solaris 10 or newer.
5511 UNEXEC_OBJ=unexsol.o
5512 ;;
5929fbe7 5513esac
5929fbe7 5514
eb697db5
DN
5515LD_SWITCH_SYSTEM=
5516case "$opsys" in
5517 freebsd)
5518 ## Let `ld' find image libs and similar things in /usr/local/lib.
5519 ## The system compiler, GCC, has apparently been modified to not
5520 ## look there, contrary to what a stock GCC would do.
5521 LD_SWITCH_SYSTEM=-L/usr/local/lib
5522 ;;
5929fbe7 5523
eb697db5
DN
5524 gnu-linux)
5525 ## cpp test was "ifdef __mips__", but presumably this is equivalent...
5526 test "$machine" = "mips" && LD_SWITCH_SYSTEM="-G 0"
5527 ;;
e6df49e4 5528
eb697db5
DN
5529 netbsd)
5530 LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
5531 ;;
8c5ff6dd 5532
eb697db5
DN
5533 openbsd)
5534 ## Han Boetes <han@mijncomputer.nl> says this is necessary,
5535 ## otherwise Emacs dumps core on elf systems.
5536 LD_SWITCH_SYSTEM="-Z"
5537 ;;
5538esac
8c5ff6dd
KR
5539
5540
eb697db5 5541ac_link="$ac_link $LD_SWITCH_SYSTEM"
8c5ff6dd 5542
eb697db5
DN
5543## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
5544## which has not been defined yet. When this was handled with cpp,
5545## it was expanded to null when configure sourced the s/*.h file.
5546## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
5547## FIXME it would be cleaner to put this in LD_SWITCH_SYSTEM_TEMACS
5548## (or somesuch), but because it is supposed to go at the _front_
5549## of LD_SWITCH_SYSTEM, we cannot do that in exactly the same way.
5550## Compare with the gnu-linux case below, which added to the end
5551## of LD_SWITCH_SYSTEM, and so can instead go at the front of
5552## LD_SWITCH_SYSTEM_TEMACS.
5553case "$opsys" in
5554 netbsd|openbsd)
5555 ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
5556 LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
5557esac
8c5ff6dd 5558
8c5ff6dd 5559
eb697db5
DN
5560C_SWITCH_MACHINE=
5561if test "$machine" = "alpha"; then
5562 ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
5563if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
8c5ff6dd 5564
5929fbe7 5565fi
8c5ff6dd 5566
eb697db5
DN
5567 if test "$ac_cv_have_decl___ELF__" = "yes"; then
5568 ## With ELF, make sure that all common symbols get allocated to in the
5569 ## data section. Otherwise, the dump of temacs may miss variables in
5570 ## the shared library that have been initialized. For example, with
5571 ## GNU libc, __malloc_initialized would normally be resolved to the
5572 ## shared library's .bss section, which is fatal.
5573 if test "x$GCC" = "xyes"; then
5574 C_SWITCH_MACHINE="-fno-common"
5575 else
5576 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
5577 fi
5578 else
5579 UNEXEC_OBJ=unexalpha.o
8c5ff6dd 5580 fi
15e12598 5581fi
8c5ff6dd 5582
8c5ff6dd 5583
8c5ff6dd 5584
8c5ff6dd 5585
eb697db5
DN
5586C_SWITCH_SYSTEM=
5587## Some programs in src produce warnings saying certain subprograms
5588## are too complex and need a MAXMEM value greater than 2000 for
5589## additional optimization. --nils@exp-math.uni-essen.de
5590test "$opsys" = "aix4.2" && test "x$GCC" != "xyes" && \
5591 C_SWITCH_SYSTEM="-ma -qmaxmem=4000"
5592## gnu-linux might need -D_BSD_SOURCE on old libc5 systems.
5593## It is redundant in glibc2, since we define _GNU_SOURCE.
a4f64981 5594
e6df49e4 5595
8c5ff6dd 5596
eb697db5
DN
5597LIBS_SYSTEM=
5598case "$opsys" in
5599 ## IBM's X11R5 uses -lIM and -liconv in AIX 3.2.2.
5600 aix4-2) LIBS_SYSTEM="-lrts -lIM -liconv" ;;
5929fbe7 5601
eb697db5 5602 freebsd) LIBS_SYSTEM="-lutil" ;;
e6df49e4 5603
eb697db5 5604 hpux*) LIBS_SYSTEM="-l:libdld.sl" ;;
8c5ff6dd 5605
eb697db5 5606 sol2*) LIBS_SYSTEM="-lsocket -lnsl -lkstat" ;;
e6df49e4 5607
eb697db5
DN
5608 ## Motif needs -lgen.
5609 unixware) LIBS_SYSTEM="-lsocket -lnsl -lelf -lgen" ;;
5929fbe7 5610esac
eb697db5
DN
5611
5612
5613
5614### Make sure subsequent tests use flags consistent with the build flags.
5615
5616if test x"${OVERRIDE_CPPFLAGS}" != x; then
5617 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5929fbe7 5618else
eb697db5 5619 CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
15e12598 5620fi
e6df49e4 5621
a4f64981 5622
eb697db5
DN
5623
5624# Check whether --enable-largefile was given.
5625if test "${enable_largefile+set}" = set; then :
5626 enableval=$enable_largefile;
a4f64981
GM
5627fi
5628
eb697db5 5629if test "$enable_largefile" != no; then
a4f64981 5630
eb697db5
DN
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5632$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5633if test "${ac_cv_sys_largefile_CC+set}" = set; then :
a4f64981
GM
5634 $as_echo_n "(cached) " >&6
5635else
eb697db5
DN
5636 ac_cv_sys_largefile_CC=no
5637 if test "$GCC" != yes; then
5638 ac_save_CC=$CC
5639 while :; do
5640 # IRIX 6.2 and later do not support large files by default,
5641 # so use the C compiler's -n32 option if that helps.
5642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5643/* end confdefs.h. */
eb697db5
DN
5644#include <sys/types.h>
5645 /* Check that off_t can represent 2**63 - 1 correctly.
5646 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5647 since some C++ compilers masquerading as C compilers
5648 incorrectly reject 9223372036854775807. */
5649#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5650 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5651 && LARGE_OFF_T % 2147483647 == 1)
5652 ? 1 : -1];
a4f64981
GM
5653int
5654main ()
5655{
eb697db5 5656
a4f64981
GM
5657 ;
5658 return 0;
5659}
5660_ACEOF
eb697db5
DN
5661 if ac_fn_c_try_compile "$LINENO"; then :
5662 break
15e12598 5663fi
eb697db5
DN
5664rm -f core conftest.err conftest.$ac_objext
5665 CC="$CC -n32"
5666 if ac_fn_c_try_compile "$LINENO"; then :
5667 ac_cv_sys_largefile_CC=' -n32'; break
5929fbe7 5668fi
eb697db5
DN
5669rm -f core conftest.err conftest.$ac_objext
5670 break
5671 done
5672 CC=$ac_save_CC
5673 rm -f conftest.$ac_ext
5674 fi
a4f64981 5675fi
eb697db5
DN
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5677$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5678 if test "$ac_cv_sys_largefile_CC" != no; then
5679 CC=$CC$ac_cv_sys_largefile_CC
5680 fi
a4f64981 5681
eb697db5
DN
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5683$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5684if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
5685 $as_echo_n "(cached) " >&6
5686else
5687 while :; do
5688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5689/* end confdefs.h. */
5690#include <sys/types.h>
5691 /* Check that off_t can represent 2**63 - 1 correctly.
5692 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5693 since some C++ compilers masquerading as C compilers
5694 incorrectly reject 9223372036854775807. */
5695#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5696 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5697 && LARGE_OFF_T % 2147483647 == 1)
5698 ? 1 : -1];
5699int
5700main ()
5701{
8c5ff6dd 5702
eb697db5
DN
5703 ;
5704 return 0;
5705}
5929fbe7 5706_ACEOF
eb697db5
DN
5707if ac_fn_c_try_compile "$LINENO"; then :
5708 ac_cv_sys_file_offset_bits=no; break
5709fi
5710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 5712/* end confdefs.h. */
eb697db5
DN
5713#define _FILE_OFFSET_BITS 64
5714#include <sys/types.h>
5715 /* Check that off_t can represent 2**63 - 1 correctly.
5716 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5717 since some C++ compilers masquerading as C compilers
5718 incorrectly reject 9223372036854775807. */
5719#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5720 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5721 && LARGE_OFF_T % 2147483647 == 1)
5722 ? 1 : -1];
5723int
5724main ()
5725{
a5edbe4a 5726
eb697db5
DN
5727 ;
5728 return 0;
5729}
5730_ACEOF
5731if ac_fn_c_try_compile "$LINENO"; then :
5732 ac_cv_sys_file_offset_bits=64; break
a4f64981 5733fi
eb697db5
DN
5734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5735 ac_cv_sys_file_offset_bits=unknown
5736 break
5737done
5738fi
5739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5740$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5741case $ac_cv_sys_file_offset_bits in #(
5742 no | unknown) ;;
5743 *)
5744cat >>confdefs.h <<_ACEOF
5745#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5746_ACEOF
5747;;
5929fbe7 5748esac
eb697db5
DN
5749rm -rf conftest*
5750 if test $ac_cv_sys_file_offset_bits = unknown; then
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5752$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5753if test "${ac_cv_sys_large_files+set}" = set; then :
5929fbe7 5754 $as_echo_n "(cached) " >&6
a4f64981 5755else
eb697db5
DN
5756 while :; do
5757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5758/* end confdefs.h. */
5759#include <sys/types.h>
5760 /* Check that off_t can represent 2**63 - 1 correctly.
5761 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5762 since some C++ compilers masquerading as C compilers
5763 incorrectly reject 9223372036854775807. */
5764#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5765 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5766 && LARGE_OFF_T % 2147483647 == 1)
5767 ? 1 : -1];
5768int
5769main ()
5770{
8c5ff6dd 5771
eb697db5
DN
5772 ;
5773 return 0;
5774}
5929fbe7 5775_ACEOF
eb697db5
DN
5776if ac_fn_c_try_compile "$LINENO"; then :
5777 ac_cv_sys_large_files=no; break
5778fi
5779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 5781/* end confdefs.h. */
eb697db5
DN
5782#define _LARGE_FILES 1
5783#include <sys/types.h>
5784 /* Check that off_t can represent 2**63 - 1 correctly.
5785 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5786 since some C++ compilers masquerading as C compilers
5787 incorrectly reject 9223372036854775807. */
5788#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5789 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5790 && LARGE_OFF_T % 2147483647 == 1)
5791 ? 1 : -1];
8c5ff6dd
KR
5792int
5793main ()
5794{
eb697db5 5795
8c5ff6dd
KR
5796 ;
5797 return 0;
5798}
5799_ACEOF
eb697db5
DN
5800if ac_fn_c_try_compile "$LINENO"; then :
5801 ac_cv_sys_large_files=1; break
8c5ff6dd 5802fi
eb697db5
DN
5803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 ac_cv_sys_large_files=unknown
5805 break
5806done
5929fbe7 5807fi
eb697db5
DN
5808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5809$as_echo "$ac_cv_sys_large_files" >&6; }
5810case $ac_cv_sys_large_files in #(
5811 no | unknown) ;;
5812 *)
5813cat >>confdefs.h <<_ACEOF
5814#define _LARGE_FILES $ac_cv_sys_large_files
5815_ACEOF
5816;;
5817esac
5818rm -rf conftest*
5819 fi
e6df49e4 5820fi
a5edbe4a 5821
5929fbe7
GM
5822
5823
eb697db5
DN
5824## If user specified a crt-dir, use that unconditionally.
5825if test "X$CRT_DIR" = "X"; then
5929fbe7 5826
eb697db5
DN
5827 case "$canonical" in
5828 x86_64-*-linux-gnu* | s390x-*-linux-gnu*)
5829 ## On x86-64 and s390x GNU/Linux distributions, the standard library
5830 ## can be in a variety of places. We only try /usr/lib64 and /usr/lib.
5831 ## For anything else (eg /usr/lib32), it is up the user to specify
5832 ## the location (bug#5655).
5833 ## Test for crtn.o, not just the directory, because sometimes the
5834 ## directory exists but does not have the relevant files (bug#1287).
5835 ## FIXME better to test for binary compatibility somehow.
5836 test -e /usr/lib64/crtn.o && CRT_DIR=/usr/lib64
5837 ;;
5929fbe7 5838
eb697db5
DN
5839 powerpc64-*-linux-gnu* | sparc64-*-linux-gnu*) CRT_DIR=/usr/lib64 ;;
5840 esac
e6df49e4 5841
eb697db5
DN
5842 case "$opsys" in
5843 hpux10-20) CRT_DIR=/lib ;;
5844 esac
15e12598 5845
eb697db5
DN
5846 ## Default is /usr/lib.
5847 test "X$CRT_DIR" = "X" && CRT_DIR=/usr/lib
8c5ff6dd 5848
15e12598 5849else
eb697db5
DN
5850
5851 ## Some platforms don't use any of these files, so it is not
5852 ## appropriate to put this test outside the if block.
5853 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
5854 as_fn_error "crt*.o not found in specified location." "$LINENO" 5
5855
5856fi
5857
5858
5859
5860LIB_MATH=-lm
5861LIB_STANDARD=
5862START_FILES=
5863
5864case $opsys in
5865 cygwin )
5866 LIB_MATH=
5867 START_FILES='ecrt0.o'
5868 ;;
5869 darwin )
5870 ## Adding -lm confuses the dynamic linker, so omit it.
5871 LIB_MATH=
5872 START_FILES='pre-crt0.o'
5873 ;;
5874 freebsd )
5875 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5876 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5877 ;;
5878 gnu-linux | gnu-kfreebsd )
5879 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtn.o'
5880 START_FILES='pre-crt0.o $(CRT_DIR)/crt1.o $(CRT_DIR)/crti.o'
5881 ;;
5882 hpux10-20 | hpux11 )
5883 LIB_STANDARD=-lc
5884 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
5885 ;;
5886 netbsd | openbsd )
5887 if test -f $CRT_DIR/crti.o; then
5888 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
5889 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
5890 else
5891 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
5892 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
5893 fi
5894 ;;
5929fbe7 5895esac
5929fbe7 5896
5929fbe7 5897
5929fbe7 5898
5929fbe7 5899
a4f64981 5900
5929fbe7 5901
e6df49e4 5902
eb697db5
DN
5903if test "${with_sound}" != "no"; then
5904 # Sound support for GNU/Linux and the free BSDs.
5905 for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5906do :
5907 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5908ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5909eval as_val=\$$as_ac_Header
5910 if test "x$as_val" = x""yes; then :
5911 cat >>confdefs.h <<_ACEOF
5912#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5913_ACEOF
a46007e9 5914 have_sound_header=yes
5929fbe7 5915fi
eb697db5
DN
5916
5917done
5918
5919 # Emulation library used on NetBSD.
5920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
5921$as_echo_n "checking for _oss_ioctl in -lossaudio... " >&6; }
5922if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then :
a4f64981 5923 $as_echo_n "(cached) " >&6
a4f64981 5924else
5929fbe7 5925 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
5926LIBS="-lossaudio $LIBS"
5927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 5928/* end confdefs.h. */
8c5ff6dd 5929
5929fbe7
GM
5930/* Override any GCC internal prototype to avoid an error.
5931 Use char because int might match the return type of a GCC
5932 builtin and then its argument prototype would still apply. */
5933#ifdef __cplusplus
5934extern "C"
5935#endif
eb697db5 5936char _oss_ioctl ();
8c5ff6dd
KR
5937int
5938main ()
5939{
eb697db5 5940return _oss_ioctl ();
8c5ff6dd
KR
5941 ;
5942 return 0;
5943}
a4f64981 5944_ACEOF
eb697db5
DN
5945if ac_fn_c_try_link "$LINENO"; then :
5946 ac_cv_lib_ossaudio__oss_ioctl=yes
a4f64981 5947else
eb697db5 5948 ac_cv_lib_ossaudio__oss_ioctl=no
a5edbe4a 5949fi
eb697db5
DN
5950rm -f core conftest.err conftest.$ac_objext \
5951 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
5952LIBS=$ac_check_lib_save_LIBS
5953fi
eb697db5
DN
5954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
5955$as_echo "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
5956if test "x$ac_cv_lib_ossaudio__oss_ioctl" = x""yes; then :
5957 LIBSOUND=-lossaudio
5929fbe7 5958else
eb697db5 5959 LIBSOUND=
8c5ff6dd 5960fi
a4f64981 5961
8c5ff6dd
KR
5962
5963
eb697db5
DN
5964 ALSA_REQUIRED=1.0.0
5965 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8c5ff6dd 5966
eb697db5
DN
5967 succeeded=no
5968
5969 # Extract the first word of "pkg-config", so it can be a program name with args.
5970set dummy pkg-config; ac_word=$2
5971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5972$as_echo_n "checking for $ac_word... " >&6; }
5973if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8c5ff6dd
KR
5974 $as_echo_n "(cached) " >&6
5975else
eb697db5
DN
5976 case $PKG_CONFIG in
5977 [\\/]* | ?:[\\/]*)
5978 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5979 ;;
5980 *)
5981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5982for as_dir in $PATH
5983do
5984 IFS=$as_save_IFS
5985 test -z "$as_dir" && as_dir=.
5986 for ac_exec_ext in '' $ac_executable_extensions; do
5987 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5988 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5990 break 2
5991 fi
5992done
5993 done
5994IFS=$as_save_IFS
5929fbe7 5995
eb697db5
DN
5996 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
5997 ;;
5929fbe7 5998esac
a4f64981 5999fi
eb697db5
DN
6000PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6001if test -n "$PKG_CONFIG"; then
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6003$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 6004else
eb697db5
DN
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
8c5ff6dd 6007fi
15e12598
VB
6008
6009
6010
eb697db5
DN
6011 if test "$PKG_CONFIG" = "no" ; then
6012 HAVE_ALSA=no
6013 else
6014 PKG_CONFIG_MIN_VERSION=0.9.0
6015 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
6017$as_echo_n "checking for $ALSA_MODULES... " >&6; }
5929fbe7 6018
eb697db5
DN
6019 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6021$as_echo "yes" >&6; }
6022 succeeded=yes
e6df49e4 6023
eb697db5
DN
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
6025$as_echo_n "checking ALSA_CFLAGS... " >&6; }
6026 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
6028$as_echo "$ALSA_CFLAGS" >&6; }
4e569696 6029
eb697db5
DN
6030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
6031$as_echo_n "checking ALSA_LIBS... " >&6; }
6032 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
6034$as_echo "$ALSA_LIBS" >&6; }
6035 else
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038 ALSA_CFLAGS=""
6039 ALSA_LIBS=""
6040 ## If we have a custom action on failure, don't print errors, but
6041 ## do set a variable so people can do so.
6042 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
5929fbe7 6043
eb697db5
DN
6044 fi
6045
6046
6047
6048 else
6049 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6050 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6051 fi
5929fbe7 6052 fi
4e569696 6053
eb697db5
DN
6054 if test $succeeded = yes; then
6055 HAVE_ALSA=yes
6056 else
6057 HAVE_ALSA=no
6058 fi
6059
6060 if test $HAVE_ALSA = yes; then
6061 SAVE_CFLAGS="$CFLAGS"
6062 SAVE_LDFLAGS="$LDFLAGS"
6063 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6064 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6066/* end confdefs.h. */
eb697db5
DN
6067#include <asoundlib.h>
6068int
6069main ()
6070{
6071snd_lib_error_set_handler (0);
6072 ;
6073 return 0;
6074}
6075_ACEOF
6076if ac_fn_c_try_compile "$LINENO"; then :
6077 emacs_alsa_normal=yes
8c5ff6dd 6078else
eb697db5 6079 emacs_alsa_normal=no
8c5ff6dd 6080fi
5929fbe7 6081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6082 if test "$emacs_alsa_normal" != yes; then
6083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6084/* end confdefs.h. */
eb697db5
DN
6085#include <alsa/asoundlib.h>
6086int
6087main ()
6088{
6089snd_lib_error_set_handler (0);
6090 ;
6091 return 0;
6092}
5929fbe7 6093_ACEOF
eb697db5
DN
6094if ac_fn_c_try_compile "$LINENO"; then :
6095 emacs_alsa_subdir=yes
5929fbe7 6096else
eb697db5 6097 emacs_alsa_subdir=no
8c5ff6dd 6098fi
eb697db5
DN
6099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6100 if test "$emacs_alsa_subdir" != yes; then
6101 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
6102 fi
6103 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6104 fi
e6df49e4 6105
eb697db5
DN
6106 CFLAGS="$SAVE_CFLAGS"
6107 LDFLAGS="$SAVE_LDFLAGS"
6108 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6109 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
e6df49e4 6110
eb697db5 6111$as_echo "#define HAVE_ALSA 1" >>confdefs.h
e6df49e4 6112
eb697db5 6113 fi
e6df49e4 6114
a46007e9
GM
6115 if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
6116 case "$opsys" in
6117 gnu-linux|freebsd|netbsd)
6118
6119$as_echo "#define HAVE_SOUND 1" >>confdefs.h
6120
6121 ;;
6122 esac
6123 fi
6124
6125
5929fbe7 6126fi
eb697db5
DN
6127
6128for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6129 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
6130 stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
6131 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
6132 sys/utsname.h pwd.h utmp.h
6133do :
6134 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6135ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6136eval as_val=\$$as_ac_Header
6137 if test "x$as_val" = x""yes; then :
6138 cat >>confdefs.h <<_ACEOF
6139#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5929fbe7 6140_ACEOF
15e12598 6141
eb697db5
DN
6142fi
6143
6144done
6145
6146
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if personality LINUX32 can be set" >&5
6148$as_echo_n "checking if personality LINUX32 can be set... " >&6; }
6149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6150/* end confdefs.h. */
6151#include <sys/personality.h>
8c5ff6dd
KR
6152int
6153main ()
6154{
eb697db5 6155personality (PER_LINUX32)
8c5ff6dd
KR
6156 ;
6157 return 0;
6158}
6159_ACEOF
eb697db5
DN
6160if ac_fn_c_try_compile "$LINENO"; then :
6161 emacs_cv_personality_linux32=yes
8c5ff6dd 6162else
eb697db5 6163 emacs_cv_personality_linux32=no
5929fbe7 6164fi
eb697db5
DN
6165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_personality_linux32" >&5
6167$as_echo "$emacs_cv_personality_linux32" >&6; }
08b47d3d 6168
eb697db5 6169if test $emacs_cv_personality_linux32 = yes; then
08b47d3d 6170
eb697db5 6171$as_echo "#define HAVE_PERSONALITY_LINUX32 1" >>confdefs.h
08b47d3d 6172
eb697db5 6173fi
a4f64981 6174
eb697db5
DN
6175for ac_header in term.h
6176do :
6177 ac_fn_c_check_header_preproc "$LINENO" "term.h" "ac_cv_header_term_h"
6178if test "x$ac_cv_header_term_h" = x""yes; then :
6179 cat >>confdefs.h <<_ACEOF
6180#define HAVE_TERM_H 1
5929fbe7 6181_ACEOF
a4f64981 6182
8c5ff6dd 6183fi
a4f64981 6184
eb697db5 6185done
a4f64981 6186
eb697db5
DN
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6188$as_echo_n "checking for ANSI C header files... " >&6; }
6189if test "${ac_cv_header_stdc+set}" = set; then :
8c5ff6dd
KR
6190 $as_echo_n "(cached) " >&6
6191else
eb697db5 6192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6193/* end confdefs.h. */
eb697db5
DN
6194#include <stdlib.h>
6195#include <stdarg.h>
6196#include <string.h>
6197#include <float.h>
6198
6199int
6200main ()
6201{
6202
6203 ;
6204 return 0;
6205}
8c5ff6dd 6206_ACEOF
eb697db5
DN
6207if ac_fn_c_try_compile "$LINENO"; then :
6208 ac_cv_header_stdc=yes
8c5ff6dd 6209else
eb697db5 6210 ac_cv_header_stdc=no
8c5ff6dd 6211fi
5929fbe7 6212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 6213
eb697db5
DN
6214if test $ac_cv_header_stdc = yes; then
6215 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6217/* end confdefs.h. */
eb697db5
DN
6218#include <string.h>
6219
5929fbe7 6220_ACEOF
eb697db5
DN
6221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6222 $EGREP "memchr" >/dev/null 2>&1; then :
6223
5929fbe7 6224else
eb697db5
DN
6225 ac_cv_header_stdc=no
6226fi
6227rm -f conftest*
a4f64981 6228
8c5ff6dd 6229fi
a4f64981 6230
eb697db5
DN
6231if test $ac_cv_header_stdc = yes; then
6232 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6234/* end confdefs.h. */
6235#include <stdlib.h>
a4f64981 6236
eb697db5
DN
6237_ACEOF
6238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6239 $EGREP "free" >/dev/null 2>&1; then :
a4f64981 6240
5929fbe7 6241else
eb697db5 6242 ac_cv_header_stdc=no
5929fbe7 6243fi
eb697db5 6244rm -f conftest*
a4f64981 6245
8c5ff6dd 6246fi
a4f64981 6247
eb697db5
DN
6248if test $ac_cv_header_stdc = yes; then
6249 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6250 if test "$cross_compiling" = yes; then :
6251 :
6252else
6253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6254/* end confdefs.h. */
6255#include <ctype.h>
6256#include <stdlib.h>
6257#if ((' ' & 0x0FF) == 0x020)
6258# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6259# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6260#else
6261# define ISLOWER(c) \
6262 (('a' <= (c) && (c) <= 'i') \
6263 || ('j' <= (c) && (c) <= 'r') \
6264 || ('s' <= (c) && (c) <= 'z'))
6265# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6266#endif
6267
6268#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6269int
6270main ()
6271{
6272 int i;
6273 for (i = 0; i < 256; i++)
6274 if (XOR (islower (i), ISLOWER (i))
6275 || toupper (i) != TOUPPER (i))
6276 return 2;
6277 return 0;
6278}
8c5ff6dd 6279_ACEOF
eb697db5
DN
6280if ac_fn_c_try_run "$LINENO"; then :
6281
6282else
6283 ac_cv_header_stdc=no
6284fi
6285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6286 conftest.$ac_objext conftest.beam conftest.$ac_ext
6287fi
a4f64981 6288
8c5ff6dd 6289fi
eb697db5
DN
6290fi
6291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6292$as_echo "$ac_cv_header_stdc" >&6; }
6293if test $ac_cv_header_stdc = yes; then
a4f64981 6294
eb697db5 6295$as_echo "#define STDC_HEADERS 1" >>confdefs.h
a4f64981 6296
eb697db5 6297fi
a4f64981 6298
eb697db5
DN
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
6300$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
6301if test "${ac_cv_header_time+set}" = set; then :
6302 $as_echo_n "(cached) " >&6
6303else
6304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6305/* end confdefs.h. */
6306#include <sys/types.h>
6307#include <sys/time.h>
6308#include <time.h>
a4f64981 6309
eb697db5
DN
6310int
6311main ()
6312{
6313if ((struct tm *) 0)
6314return 0;
6315 ;
6316 return 0;
6317}
8c5ff6dd 6318_ACEOF
eb697db5
DN
6319if ac_fn_c_try_compile "$LINENO"; then :
6320 ac_cv_header_time=yes
6321else
6322 ac_cv_header_time=no
6323fi
6324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6325fi
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
6327$as_echo "$ac_cv_header_time" >&6; }
6328if test $ac_cv_header_time = yes; then
6329
6330$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
6331
6332fi
a4f64981 6333
eb697db5
DN
6334ac_fn_c_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "$ac_includes_default"
6335if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then :
6336 ac_have_decl=1
6337else
6338 ac_have_decl=0
6339fi
a4f64981 6340
eb697db5
DN
6341cat >>confdefs.h <<_ACEOF
6342#define HAVE_DECL_SYS_SIGLIST $ac_have_decl
5929fbe7 6343_ACEOF
a4f64981 6344
eb697db5
DN
6345if test $ac_cv_have_decl_sys_siglist != yes; then
6346 # For Tru64, at least:
6347 ac_fn_c_check_decl "$LINENO" "__sys_siglist" "ac_cv_have_decl___sys_siglist" "$ac_includes_default"
6348if test "x$ac_cv_have_decl___sys_siglist" = x""yes; then :
6349 ac_have_decl=1
6350else
6351 ac_have_decl=0
6352fi
5929fbe7 6353
eb697db5
DN
6354cat >>confdefs.h <<_ACEOF
6355#define HAVE_DECL___SYS_SIGLIST $ac_have_decl
5929fbe7
GM
6356_ACEOF
6357
eb697db5 6358 if test $ac_cv_have_decl___sys_siglist = yes; then
5929fbe7 6359
eb697db5 6360$as_echo "#define sys_siglist __sys_siglist" >>confdefs.h
a4f64981 6361
5929fbe7 6362 fi
5929fbe7 6363fi
eb697db5
DN
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
6365$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
6366if test "${ac_cv_header_sys_wait_h+set}" = set; then :
5929fbe7 6367 $as_echo_n "(cached) " >&6
5929fbe7 6368else
eb697db5 6369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6370/* end confdefs.h. */
eb697db5
DN
6371#include <sys/types.h>
6372#include <sys/wait.h>
6373#ifndef WEXITSTATUS
6374# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
6375#endif
6376#ifndef WIFEXITED
6377# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
6378#endif
6379
6380int
6381main ()
6382{
6383 int s;
6384 wait (&s);
6385 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
6386 ;
6387 return 0;
6388}
5929fbe7 6389_ACEOF
eb697db5
DN
6390if ac_fn_c_try_compile "$LINENO"; then :
6391 ac_cv_header_sys_wait_h=yes
5929fbe7 6392else
eb697db5 6393 ac_cv_header_sys_wait_h=no
5929fbe7 6394fi
5929fbe7 6395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
6396fi
6397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
6398$as_echo "$ac_cv_header_sys_wait_h" >&6; }
6399if test $ac_cv_header_sys_wait_h = yes; then
a4f64981 6400
eb697db5 6401$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
a4f64981 6402
5929fbe7 6403fi
a4f64981 6404
a4f64981 6405
eb697db5
DN
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
6407$as_echo_n "checking for struct utimbuf... " >&6; }
6408if test "${emacs_cv_struct_utimbuf+set}" = set; then :
5929fbe7 6409 $as_echo_n "(cached) " >&6
8c5ff6dd 6410else
eb697db5
DN
6411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6412/* end confdefs.h. */
6413#ifdef TIME_WITH_SYS_TIME
6414#include <sys/time.h>
6415#include <time.h>
6416#else
6417#ifdef HAVE_SYS_TIME_H
6418#include <sys/time.h>
6419#else
6420#include <time.h>
6421#endif
6422#endif
6423#ifdef HAVE_UTIME_H
6424#include <utime.h>
6425#endif
6426int
6427main ()
6428{
6429static struct utimbuf x; x.actime = x.modtime;
6430 ;
6431 return 0;
6432}
6433_ACEOF
6434if ac_fn_c_try_compile "$LINENO"; then :
6435 emacs_cv_struct_utimbuf=yes
6436else
6437 emacs_cv_struct_utimbuf=no
6438fi
6439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6440fi
eb697db5
DN
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_utimbuf" >&5
6442$as_echo "$emacs_cv_struct_utimbuf" >&6; }
6443if test $emacs_cv_struct_utimbuf = yes; then
6444
6445$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
a4f64981 6446
5929fbe7 6447fi
eb697db5
DN
6448
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
6450$as_echo_n "checking return type of signal handlers... " >&6; }
6451if test "${ac_cv_type_signal+set}" = set; then :
8c5ff6dd
KR
6452 $as_echo_n "(cached) " >&6
6453else
eb697db5 6454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6455/* end confdefs.h. */
eb697db5
DN
6456#include <sys/types.h>
6457#include <signal.h>
a4f64981 6458
8c5ff6dd
KR
6459int
6460main ()
6461{
eb697db5 6462return *(signal (0, 0)) (0) == 1;
8c5ff6dd
KR
6463 ;
6464 return 0;
6465}
6466_ACEOF
eb697db5
DN
6467if ac_fn_c_try_compile "$LINENO"; then :
6468 ac_cv_type_signal=int
8c5ff6dd 6469else
eb697db5 6470 ac_cv_type_signal=void
5929fbe7 6471fi
eb697db5 6472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929fbe7 6473fi
eb697db5
DN
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
6475$as_echo "$ac_cv_type_signal" >&6; }
5929fbe7 6476
eb697db5
DN
6477cat >>confdefs.h <<_ACEOF
6478#define RETSIGTYPE $ac_cv_type_signal
5929fbe7
GM
6479_ACEOF
6480
a4f64981 6481
5929fbe7 6482
eb697db5
DN
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for speed_t" >&5
6484$as_echo_n "checking for speed_t... " >&6; }
6485if test "${emacs_cv_speed_t+set}" = set; then :
e6df49e4
GM
6486 $as_echo_n "(cached) " >&6
6487else
eb697db5 6488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 6489/* end confdefs.h. */
eb697db5 6490#include <termios.h>
8c5ff6dd
KR
6491int
6492main ()
6493{
eb697db5 6494speed_t x = 1;
8c5ff6dd
KR
6495 ;
6496 return 0;
6497}
6498_ACEOF
eb697db5
DN
6499if ac_fn_c_try_compile "$LINENO"; then :
6500 emacs_cv_speed_t=yes
8c5ff6dd 6501else
eb697db5 6502 emacs_cv_speed_t=no
8c5ff6dd 6503fi
eb697db5 6504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6505fi
eb697db5
DN
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_speed_t" >&5
6507$as_echo "$emacs_cv_speed_t" >&6; }
6508if test $emacs_cv_speed_t = yes; then
8c5ff6dd 6509
eb697db5 6510$as_echo "#define HAVE_SPEED_T 1" >>confdefs.h
91e84f96 6511
8c5ff6dd
KR
6512fi
6513
eb697db5
DN
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
6515$as_echo_n "checking for struct timeval... " >&6; }
6516if test "${emacs_cv_struct_timeval+set}" = set; then :
8c5ff6dd
KR
6517 $as_echo_n "(cached) " >&6
6518else
eb697db5 6519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6520/* end confdefs.h. */
eb697db5
DN
6521#ifdef TIME_WITH_SYS_TIME
6522#include <sys/time.h>
6523#include <time.h>
6524#else
6525#ifdef HAVE_SYS_TIME_H
6526#include <sys/time.h>
6527#else
6528#include <time.h>
6529#endif
6530#endif
49ebbd65
DN
6531int
6532main ()
6533{
eb697db5 6534static struct timeval x; x.tv_sec = x.tv_usec;
49ebbd65
DN
6535 ;
6536 return 0;
6537}
6538_ACEOF
eb697db5
DN
6539if ac_fn_c_try_compile "$LINENO"; then :
6540 emacs_cv_struct_timeval=yes
6541else
6542 emacs_cv_struct_timeval=no
6543fi
6544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6545fi
6546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_timeval" >&5
6547$as_echo "$emacs_cv_struct_timeval" >&6; }
6548HAVE_TIMEVAL=$emacs_cv_struct_timeval
6549if test $emacs_cv_struct_timeval = yes; then
6550
6551$as_echo "#define HAVE_TIMEVAL 1" >>confdefs.h
6552
6553fi
6554
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct exception" >&5
6556$as_echo_n "checking for struct exception... " >&6; }
6557if test "${emacs_cv_struct_exception+set}" = set; then :
6558 $as_echo_n "(cached) " >&6
6559else
6560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6561/* end confdefs.h. */
6562#include <math.h>
6563int
6564main ()
6565{
6566static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
6567 ;
6568 return 0;
6569}
6570_ACEOF
6571if ac_fn_c_try_compile "$LINENO"; then :
6572 emacs_cv_struct_exception=yes
8c5ff6dd 6573else
eb697db5
DN
6574 emacs_cv_struct_exception=no
6575fi
6576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6577fi
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_struct_exception" >&5
6579$as_echo "$emacs_cv_struct_exception" >&6; }
6580HAVE_EXCEPTION=$emacs_cv_struct_exception
6581if test $emacs_cv_struct_exception != yes; then
6582
6583$as_echo "#define NO_MATHERR 1" >>confdefs.h
91e84f96 6584
08b47d3d 6585fi
91e84f96 6586
eb697db5
DN
6587for ac_header in sys/socket.h
6588do :
6589 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
6590if test "x$ac_cv_header_sys_socket_h" = x""yes; then :
6591 cat >>confdefs.h <<_ACEOF
6592#define HAVE_SYS_SOCKET_H 1
6593_ACEOF
6594
5929fbe7 6595fi
91e84f96 6596
eb697db5
DN
6597done
6598
6599for ac_header in net/if.h
6600do :
6601 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
6602#if HAVE_SYS_SOCKET_H
6603#include <sys/socket.h>
6604#endif
6605"
6606if test "x$ac_cv_header_net_if_h" = x""yes; then :
6607 cat >>confdefs.h <<_ACEOF
6608#define HAVE_NET_IF_H 1
5929fbe7 6609_ACEOF
91e84f96 6610
5929fbe7 6611fi
8c5ff6dd 6612
eb697db5
DN
6613done
6614
6615
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
6617$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
6618if test "${ac_cv_struct_tm+set}" = set; then :
15e12598 6619 $as_echo_n "(cached) " >&6
15e12598 6620else
eb697db5 6621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 6622/* end confdefs.h. */
eb697db5
DN
6623#include <sys/types.h>
6624#include <time.h>
a5edbe4a 6625
8c5ff6dd
KR
6626int
6627main ()
6628{
eb697db5
DN
6629struct tm tm;
6630 int *p = &tm.tm_sec;
6631 return !p;
8c5ff6dd
KR
6632 ;
6633 return 0;
6634}
6635_ACEOF
eb697db5
DN
6636if ac_fn_c_try_compile "$LINENO"; then :
6637 ac_cv_struct_tm=time.h
a4f64981 6638else
eb697db5
DN
6639 ac_cv_struct_tm=sys/time.h
6640fi
6641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15e12598 6642fi
eb697db5
DN
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
6644$as_echo "$ac_cv_struct_tm" >&6; }
6645if test $ac_cv_struct_tm = sys/time.h; then
6646
6647$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
a4f64981 6648
8c5ff6dd 6649fi
91e84f96 6650
eb697db5
DN
6651ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
6652#include <$ac_cv_struct_tm>
6653
6654"
6655if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then :
a4f64981 6656
eb697db5
DN
6657cat >>confdefs.h <<_ACEOF
6658#define HAVE_STRUCT_TM_TM_ZONE 1
5929fbe7 6659_ACEOF
a4f64981
GM
6660
6661
eb697db5 6662fi
a4f64981 6663
eb697db5 6664if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
a4f64981 6665
eb697db5 6666$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
15e12598 6667
15e12598 6668else
eb697db5
DN
6669 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
6670"
6671if test "x$ac_cv_have_decl_tzname" = x""yes; then :
6672 ac_have_decl=1
8c5ff6dd 6673else
eb697db5 6674 ac_have_decl=0
8c5ff6dd 6675fi
49ebbd65 6676
eb697db5
DN
6677cat >>confdefs.h <<_ACEOF
6678#define HAVE_DECL_TZNAME $ac_have_decl
6679_ACEOF
6680
6681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
6682$as_echo_n "checking for tzname... " >&6; }
6683if test "${ac_cv_var_tzname+set}" = set; then :
5929fbe7
GM
6684 $as_echo_n "(cached) " >&6
6685else
eb697db5 6686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6687/* end confdefs.h. */
eb697db5
DN
6688#include <time.h>
6689#if !HAVE_DECL_TZNAME
6690extern char *tzname[];
5929fbe7
GM
6691#endif
6692
a4f64981
GM
6693int
6694main ()
6695{
eb697db5 6696return tzname[0][0];
a4f64981
GM
6697 ;
6698 return 0;
6699}
6700_ACEOF
eb697db5
DN
6701if ac_fn_c_try_link "$LINENO"; then :
6702 ac_cv_var_tzname=yes
a4f64981 6703else
eb697db5
DN
6704 ac_cv_var_tzname=no
6705fi
6706rm -f core conftest.err conftest.$ac_objext \
6707 conftest$ac_exeext conftest.$ac_ext
6708fi
6709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
6710$as_echo "$ac_cv_var_tzname" >&6; }
6711 if test $ac_cv_var_tzname = yes; then
5929fbe7 6712
eb697db5
DN
6713$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
6714
6715 fi
a4f64981 6716fi
aaa36002 6717
eb697db5
DN
6718ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
6719"
6720if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then :
6721
6722$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
6723
15e12598 6724fi
eb697db5
DN
6725
6726ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_flags" "ac_cv_member_struct_ifreq_ifr_flags" "$ac_includes_default
6727#if HAVE_SYS_SOCKET_H
6728#include <sys/socket.h>
6729#endif
6730#if HAVE_NET_IF_H
6731#include <net/if.h>
6732#endif
6733"
6734if test "x$ac_cv_member_struct_ifreq_ifr_flags" = x""yes; then :
aaa36002 6735
5929fbe7 6736cat >>confdefs.h <<_ACEOF
eb697db5 6737#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
5929fbe7
GM
6738_ACEOF
6739
cd03c74a 6740
8c5ff6dd 6741fi
eb697db5
DN
6742ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "$ac_includes_default
6743#if HAVE_SYS_SOCKET_H
6744#include <sys/socket.h>
6745#endif
6746#if HAVE_NET_IF_H
6747#include <net/if.h>
6748#endif
6749"
6750if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then :
49ebbd65 6751
eb697db5
DN
6752cat >>confdefs.h <<_ACEOF
6753#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
5929fbe7 6754_ACEOF
49ebbd65 6755
aaa36002 6756
8c5ff6dd 6757fi
eb697db5
DN
6758ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_netmask" "ac_cv_member_struct_ifreq_ifr_netmask" "$ac_includes_default
6759#if HAVE_SYS_SOCKET_H
6760#include <sys/socket.h>
6761#endif
6762#if HAVE_NET_IF_H
6763#include <net/if.h>
6764#endif
6765"
6766if test "x$ac_cv_member_struct_ifreq_ifr_netmask" = x""yes; then :
6767
6768cat >>confdefs.h <<_ACEOF
6769#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
6770_ACEOF
aaa36002 6771
5929fbe7 6772
8c5ff6dd 6773fi
eb697db5
DN
6774ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_broadaddr" "ac_cv_member_struct_ifreq_ifr_broadaddr" "$ac_includes_default
6775#if HAVE_SYS_SOCKET_H
6776#include <sys/socket.h>
6777#endif
6778#if HAVE_NET_IF_H
6779#include <net/if.h>
6780#endif
6781"
6782if test "x$ac_cv_member_struct_ifreq_ifr_broadaddr" = x""yes; then :
cd03c74a 6783
5929fbe7 6784cat >>confdefs.h <<_ACEOF
eb697db5 6785#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
5929fbe7 6786_ACEOF
49ebbd65 6787
7186fb09 6788
8c5ff6dd 6789fi
eb697db5
DN
6790ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_addr" "ac_cv_member_struct_ifreq_ifr_addr" "$ac_includes_default
6791#if HAVE_SYS_SOCKET_H
6792#include <sys/socket.h>
6793#endif
6794#if HAVE_NET_IF_H
6795#include <net/if.h>
6796#endif
6797"
6798if test "x$ac_cv_member_struct_ifreq_ifr_addr" = x""yes; then :
6799
6800cat >>confdefs.h <<_ACEOF
6801#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
6802_ACEOF
7186fb09 6803
5929fbe7 6804
8c5ff6dd
KR
6805fi
6806
5929fbe7 6807
5929fbe7 6808
eb697db5
DN
6809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
6810$as_echo_n "checking for function prototypes... " >&6; }
6811if test "$ac_cv_prog_cc_c89" != no; then
6812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6813$as_echo "yes" >&6; }
5929fbe7 6814
eb697db5 6815$as_echo "#define PROTOTYPES 1" >>confdefs.h
5929fbe7 6816
5929fbe7 6817
eb697db5 6818$as_echo "#define __PROTOTYPES 1" >>confdefs.h
5929fbe7 6819
eb697db5
DN
6820else
6821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6822$as_echo "no" >&6; }
8c5ff6dd 6823fi
15e12598 6824
eb697db5
DN
6825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6826$as_echo_n "checking for working volatile... " >&6; }
6827if test "${ac_cv_c_volatile+set}" = set; then :
5929fbe7
GM
6828 $as_echo_n "(cached) " >&6
6829else
eb697db5 6830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 6831/* end confdefs.h. */
5929fbe7 6832
8c5ff6dd
KR
6833int
6834main ()
a4f64981 6835{
eb697db5
DN
6836
6837volatile int x;
6838int * volatile y = (int *) 0;
6839return !x && !y;
8c5ff6dd
KR
6840 ;
6841 return 0;
a4f64981 6842}
8c5ff6dd 6843_ACEOF
eb697db5
DN
6844if ac_fn_c_try_compile "$LINENO"; then :
6845 ac_cv_c_volatile=yes
8c5ff6dd 6846else
eb697db5 6847 ac_cv_c_volatile=no
8c5ff6dd 6848fi
eb697db5 6849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6850fi
eb697db5
DN
6851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6852$as_echo "$ac_cv_c_volatile" >&6; }
6853if test $ac_cv_c_volatile = no; then
9452ded1 6854
eb697db5 6855$as_echo "#define volatile /**/" >>confdefs.h
5929fbe7 6856
8c5ff6dd 6857fi
eb697db5
DN
6858
6859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
6860$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
6861if test "${ac_cv_c_const+set}" = set; then :
5929fbe7
GM
6862 $as_echo_n "(cached) " >&6
6863else
eb697db5 6864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7
GM
6865/* end confdefs.h. */
6866
5929fbe7
GM
6867int
6868main ()
6869{
eb697db5
DN
6870/* FIXME: Include the comments suggested by Paul. */
6871#ifndef __cplusplus
6872 /* Ultrix mips cc rejects this. */
6873 typedef int charset[2];
6874 const charset cs;
6875 /* SunOS 4.1.1 cc rejects this. */
6876 char const *const *pcpcc;
6877 char **ppc;
6878 /* NEC SVR4.0.2 mips cc rejects this. */
6879 struct point {int x, y;};
6880 static struct point const zero = {0,0};
6881 /* AIX XL C 1.02.0.0 rejects this.
6882 It does not let you subtract one const X* pointer from another in
6883 an arm of an if-expression whose if-part is not a constant
6884 expression */
6885 const char *g = "string";
6886 pcpcc = &g + (g ? g-g : 0);
6887 /* HPUX 7.0 cc rejects these. */
6888 ++pcpcc;
6889 ppc = (char**) pcpcc;
6890 pcpcc = (char const *const *) ppc;
6891 { /* SCO 3.2v4 cc rejects this. */
6892 char *t;
6893 char const *s = 0 ? (char *) 0 : (char const *) 0;
6894
6895 *t++ = 0;
6896 if (s) return 0;
6897 }
6898 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6899 int x[] = {25, 17};
6900 const int *foo = &x[0];
6901 ++foo;
6902 }
6903 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6904 typedef const int *iptr;
6905 iptr p = 0;
6906 ++p;
6907 }
6908 { /* AIX XL C 1.02.0.0 rejects this saying
6909 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6910 struct s { int j; const int *ap[3]; };
6911 struct s *b; b->j = 5;
6912 }
6913 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6914 const int foo = 10;
6915 if (!foo) return 0;
6916 }
6917 return !cs[0] && !zero.x;
6918#endif
6919
5929fbe7
GM
6920 ;
6921 return 0;
6922}
6923_ACEOF
eb697db5
DN
6924if ac_fn_c_try_compile "$LINENO"; then :
6925 ac_cv_c_const=yes
8c5ff6dd 6926else
eb697db5 6927 ac_cv_c_const=no
8c5ff6dd 6928fi
eb697db5 6929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8c5ff6dd 6930fi
eb697db5
DN
6931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
6932$as_echo "$ac_cv_c_const" >&6; }
6933if test $ac_cv_c_const = no; then
91e84f96 6934
eb697db5 6935$as_echo "#define const /**/" >>confdefs.h
08b47d3d 6936
8c5ff6dd 6937fi
91e84f96 6938
eb697db5
DN
6939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
6940$as_echo_n "checking for void * support... " >&6; }
6941if test "${emacs_cv_void_star+set}" = set; then :
5929fbe7 6942 $as_echo_n "(cached) " >&6
8c5ff6dd 6943else
eb697db5 6944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 6945/* end confdefs.h. */
8c5ff6dd 6946
8c5ff6dd
KR
6947int
6948main ()
6949{
eb697db5 6950void * foo;
8c5ff6dd
KR
6951 ;
6952 return 0;
a4f64981 6953}
a5edbe4a 6954_ACEOF
eb697db5
DN
6955if ac_fn_c_try_compile "$LINENO"; then :
6956 emacs_cv_void_star=yes
15e12598 6957else
eb697db5 6958 emacs_cv_void_star=no
a4f64981 6959fi
eb697db5 6960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 6961fi
eb697db5
DN
6962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
6963$as_echo "$emacs_cv_void_star" >&6; }
6964if test $emacs_cv_void_star = yes; then
6965 $as_echo "#define POINTER_TYPE void" >>confdefs.h
6966
6967else
6968 $as_echo "#define POINTER_TYPE char" >>confdefs.h
15e12598
VB
6969
6970fi
15e12598 6971
a4f64981 6972
eb697db5
DN
6973
6974
6975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
6976$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
6977set x ${MAKE-make}
6978ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
6979if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
5929fbe7 6980 $as_echo_n "(cached) " >&6
5929fbe7 6981else
eb697db5
DN
6982 cat >conftest.make <<\_ACEOF
6983SHELL = /bin/sh
6984all:
6985 @echo '@@@%%%=$(MAKE)=@@@%%%'
5929fbe7 6986_ACEOF
eb697db5
DN
6987# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6988case `${MAKE-make} -f conftest.make 2>/dev/null` in
6989 *@@@%%%=?*=@@@%%%*)
6990 eval ac_cv_prog_make_${ac_make}_set=yes;;
6991 *)
6992 eval ac_cv_prog_make_${ac_make}_set=no;;
5929fbe7 6993esac
eb697db5
DN
6994rm -f conftest.make
6995fi
6996if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6998$as_echo "yes" >&6; }
6999 SET_MAKE=
5929fbe7 7000else
eb697db5
DN
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7002$as_echo "no" >&6; }
7003 SET_MAKE="MAKE=${MAKE-make}"
5929fbe7 7004fi
8c5ff6dd
KR
7005
7006
eb697db5
DN
7007DEPFLAGS=
7008MKDEPDIR=":"
7009deps_frag=deps.mk
7010if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using GNU Make" >&5
7012$as_echo_n "checking whether we are using GNU Make... " >&6; }
7013 HAVE_GNU_MAKE=no
7014 testval=`make --version 2>/dev/null | grep 'GNU Make'`
7015 if test "x$testval" != x; then
7016 HAVE_GNU_MAKE=yes
7017 else
7018 ac_enable_autodepend=no
7019 fi
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_GNU_MAKE" >&5
7021$as_echo "$HAVE_GNU_MAKE" >&6; }
7022 if test $HAVE_GNU_MAKE = yes; then
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands -MMD -MF" >&5
7024$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
7025 SAVE_CFLAGS="$CFLAGS"
7026 CFLAGS="$CFLAGS -MMD -MF deps.d"
7027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7028/* end confdefs.h. */
eb697db5
DN
7029
7030int
7031main ()
7032{
7033
7034 ;
7035 return 0;
7036}
8c5ff6dd 7037_ACEOF
eb697db5 7038if ac_fn_c_try_compile "$LINENO"; then :
8c5ff6dd 7039
eb697db5
DN
7040else
7041 ac_enable_autodepend=no
7042fi
7043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7044 CFLAGS="$SAVE_CFLAGS"
7045 test -f deps.d || ac_enable_autodepend=no
7046 rm -rf deps.d
7047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_autodepend" >&5
7048$as_echo "$ac_enable_autodepend" >&6; }
7049 fi
7050 if test $ac_enable_autodepend = yes; then
7051 DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
7052 ## In parallel builds, another make might create depdir between
7053 ## the first test and mkdir, so stick another test on the end.
7054 ## Or use mkinstalldirs? mkdir -p is not portable.
7055 MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
7056 deps_frag=autodeps.mk
7057 fi
8c5ff6dd 7058fi
eb697db5 7059deps_frag=$srcdir/src/$deps_frag
a4f64981 7060
a4f64981 7061
a4f64981 7062
eb697db5
DN
7063
7064
7065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
7066$as_echo_n "checking for long file names... " >&6; }
7067if test "${ac_cv_sys_long_file_names+set}" = set; then :
5929fbe7
GM
7068 $as_echo_n "(cached) " >&6
7069else
eb697db5
DN
7070 ac_cv_sys_long_file_names=yes
7071# Test for long file names in all the places we know might matter:
7072# . the current directory, where building will happen
7073# $prefix/lib where we will be installing things
7074# $exec_prefix/lib likewise
7075# $TMPDIR if set, where it might want to write temporary files
7076# /tmp where it might want to write temporary files
7077# /var/tmp likewise
7078# /usr/tmp likewise
7079for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
7080 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
7081 # in the usual case where exec_prefix is '${prefix}'.
7082 case $ac_dir in #(
7083 . | /* | ?:[\\/]*) ;; #(
7084 *) continue;;
7085 esac
7086 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
7087 ac_xdir=$ac_dir/cf$$
7088 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
7089 ac_tf1=$ac_xdir/conftest9012345
7090 ac_tf2=$ac_xdir/conftest9012346
7091 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
7092 ac_cv_sys_long_file_names=no
7093 rm -f -r "$ac_xdir" 2>/dev/null
7094 test $ac_cv_sys_long_file_names = no && break
7095done
5929fbe7 7096fi
eb697db5
DN
7097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
7098$as_echo "$ac_cv_sys_long_file_names" >&6; }
7099if test $ac_cv_sys_long_file_names = yes; then
7100
7101$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
49ebbd65 7102
5929fbe7 7103fi
a4f64981 7104
eb697db5
DN
7105
7106#### Choose a window system.
7107
7108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
7109$as_echo_n "checking for X... " >&6; }
7110
7111
7112# Check whether --with-x was given.
7113if test "${with_x+set}" = set; then :
7114 withval=$with_x;
7115fi
7116
7117# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7118if test "x$with_x" = xno; then
7119 # The user explicitly disabled X.
7120 have_x=disabled
7121else
7122 case $x_includes,$x_libraries in #(
7123 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
7124 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
7125 $as_echo_n "(cached) " >&6
7126else
7127 # One or both of the vars are not set, and there is no cached value.
7128ac_x_includes=no ac_x_libraries=no
7129rm -f -r conftest.dir
7130if mkdir conftest.dir; then
7131 cd conftest.dir
7132 cat >Imakefile <<'_ACEOF'
7133incroot:
7134 @echo incroot='${INCROOT}'
7135usrlibdir:
7136 @echo usrlibdir='${USRLIBDIR}'
7137libdir:
7138 @echo libdir='${LIBDIR}'
7139_ACEOF
7140 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
7141 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7142 for ac_var in incroot usrlibdir libdir; do
7143 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
7144 done
7145 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7146 for ac_extension in a so sl dylib la dll; do
7147 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
7148 test -f "$ac_im_libdir/libX11.$ac_extension"; then
7149 ac_im_usrlibdir=$ac_im_libdir; break
7150 fi
7151 done
7152 # Screen out bogus values from the imake configuration. They are
7153 # bogus both because they are the default anyway, and because
7154 # using them would break gcc on systems where it needs fixed includes.
7155 case $ac_im_incroot in
7156 /usr/include) ac_x_includes= ;;
7157 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7158 esac
7159 case $ac_im_usrlibdir in
7160 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
7161 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7162 esac
7163 fi
7164 cd ..
7165 rm -f -r conftest.dir
5929fbe7 7166fi
8c5ff6dd 7167
eb697db5
DN
7168# Standard set of common directories for X headers.
7169# Check X11 before X11Rn because it is often a symlink to the current release.
7170ac_x_header_dirs='
7171/usr/X11/include
7172/usr/X11R7/include
7173/usr/X11R6/include
7174/usr/X11R5/include
7175/usr/X11R4/include
7176
7177/usr/include/X11
7178/usr/include/X11R7
7179/usr/include/X11R6
7180/usr/include/X11R5
7181/usr/include/X11R4
8c5ff6dd 7182
eb697db5
DN
7183/usr/local/X11/include
7184/usr/local/X11R7/include
7185/usr/local/X11R6/include
7186/usr/local/X11R5/include
7187/usr/local/X11R4/include
8c5ff6dd 7188
eb697db5
DN
7189/usr/local/include/X11
7190/usr/local/include/X11R7
7191/usr/local/include/X11R6
7192/usr/local/include/X11R5
7193/usr/local/include/X11R4
8c5ff6dd 7194
eb697db5
DN
7195/usr/X386/include
7196/usr/x386/include
7197/usr/XFree86/include/X11
8c5ff6dd 7198
eb697db5
DN
7199/usr/include
7200/usr/local/include
7201/usr/unsupported/include
7202/usr/athena/include
7203/usr/local/x11r5/include
7204/usr/lpp/Xamples/include
8c5ff6dd 7205
eb697db5
DN
7206/usr/openwin/include
7207/usr/openwin/share/include'
8c5ff6dd 7208
eb697db5
DN
7209if test "$ac_x_includes" = no; then
7210 # Guess where to find include files, by looking for Xlib.h.
7211 # First, try using that file with no special directory specified.
7212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7213/* end confdefs.h. */
7214#include <X11/Xlib.h>
e6df49e4 7215_ACEOF
eb697db5
DN
7216if ac_fn_c_try_cpp "$LINENO"; then :
7217 # We can compile using X headers with no special include directory.
7218ac_x_includes=
7219else
7220 for ac_dir in $ac_x_header_dirs; do
7221 if test -r "$ac_dir/X11/Xlib.h"; then
7222 ac_x_includes=$ac_dir
7223 break
7224 fi
7225done
7226fi
7227rm -f conftest.err conftest.$ac_ext
7228fi # $ac_x_includes = no
49ebbd65 7229
eb697db5
DN
7230if test "$ac_x_libraries" = no; then
7231 # Check for the libraries.
7232 # See if we find them without any special options.
7233 # Don't add to $LIBS permanently.
7234 ac_save_LIBS=$LIBS
7235 LIBS="-lX11 $LIBS"
7236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7237/* end confdefs.h. */
7238#include <X11/Xlib.h>
7239int
7240main ()
7241{
7242XrmInitialize ()
7243 ;
7244 return 0;
7245}
5929fbe7 7246_ACEOF
eb697db5
DN
7247if ac_fn_c_try_link "$LINENO"; then :
7248 LIBS=$ac_save_LIBS
7249# We can link X programs with no special library path.
7250ac_x_libraries=
7251else
7252 LIBS=$ac_save_LIBS
7253for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7254do
7255 # Don't even attempt the hair of trying to link an X program!
7256 for ac_extension in a so sl dylib la dll; do
7257 if test -r "$ac_dir/libX11.$ac_extension"; then
7258 ac_x_libraries=$ac_dir
7259 break 2
7260 fi
7261 done
7262done
7263fi
7264rm -f core conftest.err conftest.$ac_objext \
7265 conftest$ac_exeext conftest.$ac_ext
7266fi # $ac_x_libraries = no
8c5ff6dd 7267
eb697db5
DN
7268case $ac_x_includes,$ac_x_libraries in #(
7269 no,* | *,no | *\'*)
7270 # Didn't find X, or a directory has "'" in its name.
7271 ac_cv_have_x="have_x=no";; #(
7272 *)
7273 # Record where we found X for the cache.
7274 ac_cv_have_x="have_x=yes\
7275 ac_x_includes='$ac_x_includes'\
7276 ac_x_libraries='$ac_x_libraries'"
5929fbe7 7277esac
eb697db5
DN
7278fi
7279;; #(
7280 *) have_x=yes;;
7281 esac
7282 eval "$ac_cv_have_x"
7283fi # $with_x != no
49ebbd65 7284
eb697db5
DN
7285if test "$have_x" != yes; then
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
7287$as_echo "$have_x" >&6; }
7288 no_x=yes
7289else
7290 # If each of the values was on the command line, it overrides each guess.
7291 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7292 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7293 # Update the cache value to reflect the command line values.
7294 ac_cv_have_x="have_x=yes\
7295 ac_x_includes='$x_includes'\
7296 ac_x_libraries='$x_libraries'"
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
7298$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
7299fi
8c5ff6dd 7300
eb697db5
DN
7301if test "$no_x" = yes; then
7302 window_system=none
7303else
7304 window_system=x11
7305fi
15e12598 7306
eb697db5
DN
7307## Workaround for bug in autoconf <= 2.62.
7308## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
7309## No need to do anything special for these standard directories.
7310if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
15e12598 7311
eb697db5 7312 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
15e12598 7313
eb697db5 7314fi
91e84f96 7315
eb697db5
DN
7316LD_SWITCH_X_SITE_AUX=
7317LD_SWITCH_X_SITE_AUX_RPATH=
7318if test "${x_libraries}" != NONE; then
7319 if test -n "${x_libraries}"; then
7320 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
7321 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
7322 LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
7323 fi
7324 x_default_search_path=""
7325 x_search_path=${x_libraries}
7326 if test -z "${x_search_path}"; then
7327 x_search_path=/usr/lib
7328 fi
7329 for x_library in `echo ${x_search_path}: | \
7330 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
7331 x_search_path="\
7332${x_library}/X11/%L/%T/%N%C%S:\
7333${x_library}/X11/%l/%T/%N%C%S:\
7334${x_library}/X11/%T/%N%C%S:\
7335${x_library}/X11/%L/%T/%N%S:\
7336${x_library}/X11/%l/%T/%N%S:\
7337${x_library}/X11/%T/%N%S"
7338 if test x"${x_default_search_path}" = x; then
7339 x_default_search_path=${x_search_path}
7340 else
7341 x_default_search_path="${x_search_path}:${x_default_search_path}"
7342 fi
7343 done
7344fi
e6df49e4 7345
15e12598 7346
15e12598 7347
eb697db5
DN
7348if test "${x_includes}" != NONE && test -n "${x_includes}"; then
7349 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
7350fi
8c5ff6dd 7351
eb697db5
DN
7352if test x"${x_includes}" = x; then
7353 bitmapdir=/usr/include/X11/bitmaps
7354else
7355 # accumulate include directories that have X11 bitmap subdirectories
7356 bmd_acc="dummyval"
7357 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
7358 if test -d "${bmd}/X11/bitmaps"; then
7359 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
7360 fi
7361 if test -d "${bmd}/bitmaps"; then
7362 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
7363 fi
7364 done
7365 if test ${bmd_acc} != "dummyval"; then
7366 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
7367 fi
7368fi
8c5ff6dd 7369
eb697db5
DN
7370HAVE_NS=no
7371NS_IMPL_COCOA=no
7372NS_IMPL_GNUSTEP=no
7373tmp_CPPFLAGS="$CPPFLAGS"
7374tmp_CFLAGS="$CFLAGS"
7375CPPFLAGS="$CPPFLAGS -x objective-c"
7376CFLAGS="$CFLAGS -x objective-c"
7377TEMACS_LDFLAGS2="\${LDFLAGS}"
7378if test "${with_ns}" != no; then
7379 if test "${opsys}" = darwin; then
7380 NS_IMPL_COCOA=yes
7381 ns_appdir=`pwd`/nextstep/Emacs.app/
7382 ns_appbindir=${ns_appdir}Contents/MacOS/
7383 ns_appresdir=${ns_appdir}Contents/Resources
7384 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
7385 elif test -f $GNUSTEP_CONFIG_FILE; then
7386 NS_IMPL_GNUSTEP=yes
7387 ns_appdir=`pwd`/nextstep/Emacs.app/
7388 ns_appbindir=${ns_appdir}
7389 ns_appresdir=${ns_appdir}Resources
7390 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7391 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
7392 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
7393 GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)"
7394 GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)"
7395 test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \
7396 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
7397 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
7398 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
7399 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7400 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7401 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
7402 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
7403 LIB_STANDARD=
7404 START_FILES=
7405 TEMACS_LDFLAGS2=
7406 fi
7407 ac_fn_c_check_header_mongrel "$LINENO" "AppKit/AppKit.h" "ac_cv_header_AppKit_AppKit_h" "$ac_includes_default"
7408if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
7409 HAVE_NS=yes
7410else
7411 as_fn_error "\`--with-ns' was specified, but the include
7412 files are missing or cannot be compiled." "$LINENO" 5
7413fi
8c5ff6dd
KR
7414
7415
eb697db5
DN
7416 NS_HAVE_NSINTEGER=yes
7417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7418/* end confdefs.h. */
7419#include <Foundation/NSObjCRuntime.h>
7420int
7421main ()
7422{
7423NSInteger i;
7424 ;
7425 return 0;
7426}
7427_ACEOF
7428if ac_fn_c_try_compile "$LINENO"; then :
7429 ns_have_nsinteger=yes
7430else
7431 ns_have_nsinteger=no
7432fi
7433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7434 if test $ns_have_nsinteger = no; then
7435 NS_HAVE_NSINTEGER=no
7436 fi
7437fi
15e12598 7438
15e12598 7439
eb697db5
DN
7440ns_frag=/dev/null
7441NS_OBJ=
7442NS_SUPPORT=
7443if test "${HAVE_NS}" = yes; then
7444 window_system=nextstep
7445 with_xft=no
7446 # set up packaging dirs
7447 exec_prefix=${ns_appbindir}
7448 libexecdir=${ns_appbindir}/libexec
7449 if test "${EN_NS_SELF_CONTAINED}" = yes; then
7450 prefix=${ns_appresdir}
7451 fi
7452 ns_frag=$srcdir/src/ns.mk
7453 NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o"
7454 NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc"
7455fi
7456CFLAGS="$tmp_CFLAGS"
7457CPPFLAGS="$tmp_CPPFLAGS"
15e12598 7458
15e12598 7459
a4f64981 7460
8c5ff6dd
KR
7461
7462
eb697db5
DN
7463case "${window_system}" in
7464 x11 )
7465 HAVE_X_WINDOWS=yes
7466 HAVE_X11=yes
7467 case "${with_x_toolkit}" in
7468 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7469 motif ) USE_X_TOOLKIT=MOTIF ;;
7470 gtk ) with_gtk=yes
7471 USE_X_TOOLKIT=none ;;
e547b051
J
7472 gtk3 ) with_gtk3=yes
7473 USE_X_TOOLKIT=none ;;
eb697db5
DN
7474 no ) USE_X_TOOLKIT=none ;;
7475 * ) USE_X_TOOLKIT=maybe ;;
7476 esac
7477 ;;
7478 nextstep | none )
7479 HAVE_X_WINDOWS=no
7480 HAVE_X11=no
7481 USE_X_TOOLKIT=none
7482 ;;
7483esac
8c5ff6dd 7484
eb697db5
DN
7485if test "$window_system" = none && test "X$with_x" != "Xno"; then
7486 # Extract the first word of "X", so it can be a program name with args.
7487set dummy X; ac_word=$2
7488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7489$as_echo_n "checking for $ac_word... " >&6; }
7490if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then :
7491 $as_echo_n "(cached) " >&6
7492else
7493 if test -n "$HAVE_XSERVER"; then
7494 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
7495else
7496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7497for as_dir in $PATH
7498do
7499 IFS=$as_save_IFS
7500 test -z "$as_dir" && as_dir=.
7501 for ac_exec_ext in '' $ac_executable_extensions; do
7502 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7503 ac_cv_prog_HAVE_XSERVER="true"
7504 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7505 break 2
7506 fi
7507done
7508 done
7509IFS=$as_save_IFS
8c5ff6dd 7510
eb697db5
DN
7511 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
7512fi
7513fi
7514HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
7515if test -n "$HAVE_XSERVER"; then
7516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_XSERVER" >&5
7517$as_echo "$HAVE_XSERVER" >&6; }
7518else
7519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7520$as_echo "no" >&6; }
7521fi
8c5ff6dd 7522
8c5ff6dd 7523
eb697db5
DN
7524 if test "$HAVE_XSERVER" = true ||
7525 test -n "$DISPLAY" ||
7526 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
7527 as_fn_error "You seem to be running X, but no X development libraries
7528were found. You should install the relevant development files for X
7529and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
7530sure you have development files for image handling, i.e.
7531tiff, gif, jpeg, png and xpm.
7532If you are sure you want Emacs compiled without X window support, pass
7533 --without-x
7534to configure." "$LINENO" 5
7535 fi
7536fi
8c5ff6dd 7537
eb697db5
DN
7538### If we're using X11, we should use the X menu package.
7539HAVE_MENUS=no
7540case ${HAVE_X11} in
7541 yes ) HAVE_MENUS=yes ;;
7542esac
8c5ff6dd 7543
eb697db5
DN
7544# Do the opsystem or machine files prohibit the use of the GNU malloc?
7545# Assume not, until told otherwise.
7546GNU_MALLOC=yes
7547doug_lea_malloc=yes
7548ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
7549if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
8c5ff6dd 7550
eb697db5
DN
7551else
7552 doug_lea_malloc=no
7553fi
8c5ff6dd 7554
eb697db5
DN
7555ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
7556if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
8c5ff6dd 7557
eb697db5
DN
7558else
7559 doug_lea_malloc=no
7560fi
8c5ff6dd 7561
eb697db5
DN
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
7563$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
7564if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
7565 $as_echo_n "(cached) " >&6
7566else
7567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7568/* end confdefs.h. */
7569extern void (* __after_morecore_hook)();
7570int
7571main ()
7572{
7573__after_morecore_hook = 0
7574 ;
7575 return 0;
7576}
7577_ACEOF
7578if ac_fn_c_try_link "$LINENO"; then :
7579 emacs_cv_var___after_morecore_hook=yes
7580else
7581 emacs_cv_var___after_morecore_hook=no
7582fi
7583rm -f core conftest.err conftest.$ac_objext \
7584 conftest$ac_exeext conftest.$ac_ext
7585fi
7586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
7587$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
7588if test $emacs_cv_var___after_morecore_hook = no; then
7589 doug_lea_malloc=no
7590fi
8c5ff6dd 7591
e7586c7a
GM
7592
7593system_malloc=no
7594case "$opsys" in
7595 ## darwin ld insists on the use of malloc routines in the System framework.
7596 darwin|sol2-10) system_malloc=yes ;;
7597esac
7598
eb697db5 7599if test "${system_malloc}" = "yes"; then
e7586c7a
GM
7600
7601$as_echo "#define SYSTEM_MALLOC 1" >>confdefs.h
7602
eb697db5
DN
7603 GNU_MALLOC=no
7604 GNU_MALLOC_reason="
7605 (The GNU allocators don't work with this system configuration.)"
7606 GMALLOC_OBJ=
7607 VMLIMIT_OBJ=
7608else
7609 test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o
7610 VMLIMIT_OBJ=vm-limit.o
7611fi
0c309b80 7612
8c5ff6dd 7613
8c5ff6dd 7614
eb697db5
DN
7615if test "$doug_lea_malloc" = "yes" ; then
7616 if test "$GNU_MALLOC" = yes ; then
7617 GNU_MALLOC_reason="
7618 (Using Doug Lea's new malloc from the GNU C Library.)"
7619 fi
8c5ff6dd 7620
eb697db5 7621$as_echo "#define DOUG_LEA_MALLOC 1" >>confdefs.h
8c5ff6dd 7622
a4f64981 7623
eb697db5
DN
7624 ## Use mmap directly for allocating larger buffers.
7625 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
7626 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
7627 ## Does the AC_FUNC_MMAP test below make this check unecessary?
7628 case "$opsys" in
7629 gnu*) REL_ALLOC=no ;;
7630 esac
7631fi
49ebbd65 7632
eb697db5
DN
7633if test x"${REL_ALLOC}" = x; then
7634 REL_ALLOC=${GNU_MALLOC}
7635fi
8c5ff6dd 7636
e7586c7a
GM
7637use_mmap_for_buffers=no
7638case "$opsys" in
7639 freebsd|irix6-5) use_mmap_for_buffers=yes ;;
7640esac
8c5ff6dd 7641
8c5ff6dd 7642
8c5ff6dd 7643
7186fb09 7644
eb697db5
DN
7645 for ac_header in $ac_header_list
7646do :
7647 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7648ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7649"
7650eval as_val=\$$as_ac_Header
7651 if test "x$as_val" = x""yes; then :
7652 cat >>confdefs.h <<_ACEOF
7653#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7654_ACEOF
15e12598 7655
eb697db5 7656fi
8c5ff6dd 7657
eb697db5 7658done
8c5ff6dd
KR
7659
7660
8c5ff6dd 7661
8c5ff6dd 7662
15e12598 7663
8c5ff6dd
KR
7664
7665
8c5ff6dd 7666
eb697db5
DN
7667for ac_func in getpagesize
7668do :
7669 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
7670if test "x$ac_cv_func_getpagesize" = x""yes; then :
7671 cat >>confdefs.h <<_ACEOF
7672#define HAVE_GETPAGESIZE 1
7673_ACEOF
8c5ff6dd 7674
eb697db5
DN
7675fi
7676done
8c5ff6dd 7677
eb697db5
DN
7678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
7679$as_echo_n "checking for working mmap... " >&6; }
7680if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then :
7681 $as_echo_n "(cached) " >&6
7682else
7683 if test "$cross_compiling" = yes; then :
7684 ac_cv_func_mmap_fixed_mapped=no
7685else
7686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7687/* end confdefs.h. */
7688$ac_includes_default
7689/* malloc might have been renamed as rpl_malloc. */
7690#undef malloc
8c5ff6dd 7691
eb697db5
DN
7692/* Thanks to Mike Haertel and Jim Avera for this test.
7693 Here is a matrix of mmap possibilities:
7694 mmap private not fixed
7695 mmap private fixed at somewhere currently unmapped
7696 mmap private fixed at somewhere already mapped
7697 mmap shared not fixed
7698 mmap shared fixed at somewhere currently unmapped
7699 mmap shared fixed at somewhere already mapped
7700 For private mappings, we should verify that changes cannot be read()
7701 back from the file, nor mmap's back from the file at a different
7702 address. (There have been systems where private was not correctly
7703 implemented like the infamous i386 svr4.0, and systems where the
7704 VM page cache was not coherent with the file system buffer cache
7705 like early versions of FreeBSD and possibly contemporary NetBSD.)
7706 For shared mappings, we should conversely verify that changes get
7707 propagated back to all the places they're supposed to be.
8c5ff6dd 7708
eb697db5
DN
7709 Grep wants private fixed already mapped.
7710 The main things grep needs to know about mmap are:
7711 * does it exist and is it safe to write into the mmap'd area
7712 * how to use it (BSD variants) */
8c5ff6dd 7713
eb697db5
DN
7714#include <fcntl.h>
7715#include <sys/mman.h>
8c5ff6dd 7716
eb697db5
DN
7717#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
7718char *malloc ();
7719#endif
8c5ff6dd 7720
eb697db5
DN
7721/* This mess was copied from the GNU getpagesize.h. */
7722#ifndef HAVE_GETPAGESIZE
7723# ifdef _SC_PAGESIZE
7724# define getpagesize() sysconf(_SC_PAGESIZE)
7725# else /* no _SC_PAGESIZE */
7726# ifdef HAVE_SYS_PARAM_H
7727# include <sys/param.h>
7728# ifdef EXEC_PAGESIZE
7729# define getpagesize() EXEC_PAGESIZE
7730# else /* no EXEC_PAGESIZE */
7731# ifdef NBPG
7732# define getpagesize() NBPG * CLSIZE
7733# ifndef CLSIZE
7734# define CLSIZE 1
7735# endif /* no CLSIZE */
7736# else /* no NBPG */
7737# ifdef NBPC
7738# define getpagesize() NBPC
7739# else /* no NBPC */
7740# ifdef PAGESIZE
7741# define getpagesize() PAGESIZE
7742# endif /* PAGESIZE */
7743# endif /* no NBPC */
7744# endif /* no NBPG */
7745# endif /* no EXEC_PAGESIZE */
7746# else /* no HAVE_SYS_PARAM_H */
7747# define getpagesize() 8192 /* punt totally */
7748# endif /* no HAVE_SYS_PARAM_H */
7749# endif /* no _SC_PAGESIZE */
8c5ff6dd 7750
eb697db5 7751#endif /* no HAVE_GETPAGESIZE */
8c5ff6dd 7752
eb697db5
DN
7753int
7754main ()
7755{
7756 char *data, *data2, *data3;
7757 int i, pagesize;
7758 int fd, fd2;
8c5ff6dd 7759
eb697db5 7760 pagesize = getpagesize ();
8c5ff6dd 7761
eb697db5
DN
7762 /* First, make a file with some known garbage in it. */
7763 data = (char *) malloc (pagesize);
7764 if (!data)
7765 return 1;
7766 for (i = 0; i < pagesize; ++i)
7767 *(data + i) = rand ();
7768 umask (0);
7769 fd = creat ("conftest.mmap", 0600);
7770 if (fd < 0)
7771 return 2;
7772 if (write (fd, data, pagesize) != pagesize)
7773 return 3;
7774 close (fd);
8c5ff6dd 7775
eb697db5
DN
7776 /* Next, check that the tail of a page is zero-filled. File must have
7777 non-zero length, otherwise we risk SIGBUS for entire page. */
7778 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
7779 if (fd2 < 0)
7780 return 4;
7781 data2 = "";
7782 if (write (fd2, data2, 1) != 1)
7783 return 5;
7784 data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
7785 if (data2 == MAP_FAILED)
7786 return 6;
7787 for (i = 0; i < pagesize; ++i)
7788 if (*(data2 + i))
7789 return 7;
7790 close (fd2);
7791 if (munmap (data2, pagesize))
7792 return 8;
8c5ff6dd 7793
eb697db5
DN
7794 /* Next, try to mmap the file at a fixed address which already has
7795 something else allocated at it. If we can, also make sure that
7796 we see the same garbage. */
7797 fd = open ("conftest.mmap", O_RDWR);
7798 if (fd < 0)
7799 return 9;
7800 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
7801 MAP_PRIVATE | MAP_FIXED, fd, 0L))
7802 return 10;
7803 for (i = 0; i < pagesize; ++i)
7804 if (*(data + i) != *(data2 + i))
7805 return 11;
8c5ff6dd 7806
eb697db5
DN
7807 /* Finally, make sure that changes to the mapped area do not
7808 percolate back to the file as seen by read(). (This is a bug on
7809 some variants of i386 svr4.0.) */
7810 for (i = 0; i < pagesize; ++i)
7811 *(data2 + i) = *(data2 + i) + 1;
7812 data3 = (char *) malloc (pagesize);
7813 if (!data3)
7814 return 12;
7815 if (read (fd, data3, pagesize) != pagesize)
7816 return 13;
7817 for (i = 0; i < pagesize; ++i)
7818 if (*(data + i) != *(data3 + i))
7819 return 14;
7820 close (fd);
7821 return 0;
7822}
7823_ACEOF
7824if ac_fn_c_try_run "$LINENO"; then :
7825 ac_cv_func_mmap_fixed_mapped=yes
7826else
7827 ac_cv_func_mmap_fixed_mapped=no
7828fi
7829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7830 conftest.$ac_objext conftest.beam conftest.$ac_ext
7831fi
8c5ff6dd 7832
eb697db5
DN
7833fi
7834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
7835$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
7836if test $ac_cv_func_mmap_fixed_mapped = yes; then
8c5ff6dd 7837
eb697db5 7838$as_echo "#define HAVE_MMAP 1" >>confdefs.h
8c5ff6dd 7839
eb697db5
DN
7840fi
7841rm -f conftest.mmap conftest.txt
8c5ff6dd 7842
eb697db5 7843if test $use_mmap_for_buffers = yes; then
e7586c7a
GM
7844
7845$as_echo "#define USE_MMAP_FOR_BUFFERS 1" >>confdefs.h
7846
eb697db5
DN
7847 REL_ALLOC=no
7848fi
8c5ff6dd 7849
eb697db5 7850LIBS="$LIBS_SYSTEM $LIBS"
5929fbe7 7851
eb697db5
DN
7852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
7853$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
7854if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
5929fbe7 7855 $as_echo_n "(cached) " >&6
8c5ff6dd 7856else
eb697db5
DN
7857 ac_check_lib_save_LIBS=$LIBS
7858LIBS="-ldnet $LIBS"
7859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7860/* end confdefs.h. */
8c5ff6dd 7861
5929fbe7
GM
7862/* Override any GCC internal prototype to avoid an error.
7863 Use char because int might match the return type of a GCC
7864 builtin and then its argument prototype would still apply. */
7865#ifdef __cplusplus
7866extern "C"
7867#endif
eb697db5 7868char dnet_ntoa ();
5929fbe7
GM
7869int
7870main ()
7871{
eb697db5 7872return dnet_ntoa ();
5929fbe7
GM
7873 ;
7874 return 0;
7875}
7876_ACEOF
eb697db5
DN
7877if ac_fn_c_try_link "$LINENO"; then :
7878 ac_cv_lib_dnet_dnet_ntoa=yes
5929fbe7 7879else
eb697db5 7880 ac_cv_lib_dnet_dnet_ntoa=no
5929fbe7 7881fi
eb697db5
DN
7882rm -f core conftest.err conftest.$ac_objext \
7883 conftest$ac_exeext conftest.$ac_ext
7884LIBS=$ac_check_lib_save_LIBS
5929fbe7 7885fi
eb697db5
DN
7886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7887$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
7888if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
5929fbe7 7889 cat >>confdefs.h <<_ACEOF
eb697db5 7890#define HAVE_LIBDNET 1
5929fbe7 7891_ACEOF
aaa36002 7892
eb697db5 7893 LIBS="-ldnet $LIBS"
5929fbe7 7894
a4f64981 7895fi
5929fbe7 7896
a4f64981 7897
eb697db5
DN
7898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXbsd" >&5
7899$as_echo_n "checking for main in -lXbsd... " >&6; }
7900if test "${ac_cv_lib_Xbsd_main+set}" = set; then :
5929fbe7 7901 $as_echo_n "(cached) " >&6
5929fbe7 7902else
eb697db5
DN
7903 ac_check_lib_save_LIBS=$LIBS
7904LIBS="-lXbsd $LIBS"
7905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 7906/* end confdefs.h. */
a4f64981 7907
a4f64981 7908
eb697db5
DN
7909int
7910main ()
7911{
7912return main ();
7913 ;
7914 return 0;
7915}
5929fbe7 7916_ACEOF
eb697db5
DN
7917if ac_fn_c_try_link "$LINENO"; then :
7918 ac_cv_lib_Xbsd_main=yes
a4f64981 7919else
eb697db5 7920 ac_cv_lib_Xbsd_main=no
8c5ff6dd 7921fi
eb697db5
DN
7922rm -f core conftest.err conftest.$ac_objext \
7923 conftest$ac_exeext conftest.$ac_ext
7924LIBS=$ac_check_lib_save_LIBS
5929fbe7 7925fi
eb697db5
DN
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xbsd_main" >&5
7927$as_echo "$ac_cv_lib_Xbsd_main" >&6; }
7928if test "x$ac_cv_lib_Xbsd_main" = x""yes; then :
7929 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
8c5ff6dd 7930fi
a4f64981 7931
8c5ff6dd 7932
eb697db5
DN
7933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cma_open in -lpthreads" >&5
7934$as_echo_n "checking for cma_open in -lpthreads... " >&6; }
7935if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then :
15e12598
VB
7936 $as_echo_n "(cached) " >&6
7937else
eb697db5
DN
7938 ac_check_lib_save_LIBS=$LIBS
7939LIBS="-lpthreads $LIBS"
7940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15e12598 7941/* end confdefs.h. */
e6df49e4
GM
7942
7943/* Override any GCC internal prototype to avoid an error.
7944 Use char because int might match the return type of a GCC
7945 builtin and then its argument prototype would still apply. */
7946#ifdef __cplusplus
eb697db5 7947extern "C"
5929fbe7 7948#endif
eb697db5 7949char cma_open ();
aaa36002
DN
7950int
7951main ()
7952{
eb697db5 7953return cma_open ();
aaa36002
DN
7954 ;
7955 return 0;
7956}
7186fb09 7957_ACEOF
eb697db5
DN
7958if ac_fn_c_try_link "$LINENO"; then :
7959 ac_cv_lib_pthreads_cma_open=yes
7186fb09 7960else
eb697db5 7961 ac_cv_lib_pthreads_cma_open=no
cd03c74a 7962fi
eb697db5
DN
7963rm -f core conftest.err conftest.$ac_objext \
7964 conftest$ac_exeext conftest.$ac_ext
7965LIBS=$ac_check_lib_save_LIBS
49ebbd65 7966fi
eb697db5
DN
7967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_cma_open" >&5
7968$as_echo "$ac_cv_lib_pthreads_cma_open" >&6; }
7969if test "x$ac_cv_lib_pthreads_cma_open" = x""yes; then :
5929fbe7 7970 cat >>confdefs.h <<_ACEOF
eb697db5 7971#define HAVE_LIBPTHREADS 1
5929fbe7
GM
7972_ACEOF
7973
eb697db5 7974 LIBS="-lpthreads $LIBS"
5929fbe7 7975
eb697db5 7976fi
5929fbe7
GM
7977
7978
eb697db5
DN
7979## Note: when using cpp in s/aix4.2.h, this definition depended on
7980## HAVE_LIBPTHREADS. That was not defined earlier in configure when
7981## the system file was sourced. Hence the value of LIBS_SYSTEM
7982## added to LIBS in configure would never contain the pthreads part,
7983## but the value used in Makefiles might. FIXME?
7984##
7985## -lpthreads seems to be necessary for Xlib in X11R6, and should
7986## be harmless on older versions of X where it happens to exist.
7987test "$opsys" = "aix4-2" && \
7988 test $ac_cv_lib_pthreads_cma_open = yes && \
7989 LIBS_SYSTEM="$LIBS_SYSTEM -lpthreads"
5929fbe7
GM
7990
7991
eb697db5
DN
7992case ${host_os} in
7993aix*)
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
7995$as_echo_n "checking for -bbigtoc option... " >&6; }
7996if test "${gdb_cv_bigtoc+set}" = set; then :
7186fb09 7997 $as_echo_n "(cached) " >&6
a5edbe4a 7998else
a4f64981 7999
eb697db5
DN
8000 case $GCC in
8001 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8002 *) gdb_cv_bigtoc=-bbigtoc ;;
8003 esac
a4f64981 8004
eb697db5
DN
8005 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8007/* end confdefs.h. */
8c5ff6dd 8008
eb697db5
DN
8009int
8010main ()
8011{
8012int i;
8013 ;
8014 return 0;
8015}
8016_ACEOF
8017if ac_fn_c_try_link "$LINENO"; then :
8c5ff6dd 8018
eb697db5
DN
8019else
8020 gdb_cv_bigtoc=
8021fi
8022rm -f core conftest.err conftest.$ac_objext \
8023 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 8024
eb697db5
DN
8025fi
8026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
8027$as_echo "$gdb_cv_bigtoc" >&6; }
8028 ;;
8029esac
8c5ff6dd 8030
eb697db5
DN
8031# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
8032# used for the tests that follow. We set them back to REAL_CFLAGS and
8033# REAL_CPPFLAGS later on.
8c5ff6dd 8034
eb697db5 8035REAL_CPPFLAGS="$CPPFLAGS"
8c5ff6dd 8036
eb697db5
DN
8037if test "${HAVE_X11}" = "yes"; then
8038 DEFS="$C_SWITCH_X_SITE $DEFS"
8039 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
e7586c7a 8040 LIBS="-lX11 $LIBS"
eb697db5
DN
8041 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
8042 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
8c5ff6dd 8043
eb697db5
DN
8044 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
8045 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
8046 # but it's more convenient here to set LD_RUN_PATH
8047 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
8048 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
8049 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
8050 export LD_RUN_PATH
8051 fi
8c5ff6dd 8052
eb697db5
DN
8053 if test "${opsys}" = "gnu-linux"; then
8054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether X on GNU/Linux needs -b to link" >&5
8055$as_echo_n "checking whether X on GNU/Linux needs -b to link... " >&6; }
8056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057/* end confdefs.h. */
8c5ff6dd 8058
eb697db5
DN
8059int
8060main ()
5929fbe7 8061{
eb697db5
DN
8062XOpenDisplay ("foo");
8063 ;
8064 return 0;
5929fbe7 8065}
eb697db5
DN
8066_ACEOF
8067if ac_fn_c_try_link "$LINENO"; then :
8068 xlinux_first_failure=no
8069else
8070 xlinux_first_failure=yes
8071fi
8072rm -f core conftest.err conftest.$ac_objext \
8073 conftest$ac_exeext conftest.$ac_ext
8074 if test "${xlinux_first_failure}" = "yes"; then
8075 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
8076 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
8077 OLD_CPPFLAGS="$CPPFLAGS"
8078 OLD_LIBS="$LIBS"
8079 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
8080 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
8081 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
8082 LIBS="$LIBS -b i486-linuxaout"
8083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8084/* end confdefs.h. */
8c5ff6dd 8085
eb697db5
DN
8086int
8087main ()
5929fbe7 8088{
eb697db5
DN
8089XOpenDisplay ("foo");
8090 ;
8091 return 0;
5929fbe7 8092}
eb697db5
DN
8093_ACEOF
8094if ac_fn_c_try_link "$LINENO"; then :
8095 xlinux_second_failure=no
8096else
8097 xlinux_second_failure=yes
8098fi
8099rm -f core conftest.err conftest.$ac_objext \
8100 conftest$ac_exeext conftest.$ac_ext
8101 if test "${xlinux_second_failure}" = "yes"; then
8102 # If we get the same failure with -b, there is no use adding -b.
8103 # So take it out. This plays safe.
8104 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
8105 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
8106 CPPFLAGS="$OLD_CPPFLAGS"
8107 LIBS="$OLD_LIBS"
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109$as_echo "no" >&6; }
8110 else
8111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8112$as_echo "yes" >&6; }
8113 fi
8114 else
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116$as_echo "no" >&6; }
8117 fi
8118 fi
8c5ff6dd 8119
eb697db5
DN
8120 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
8121 # header files included from there.
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Xkb" >&5
8123$as_echo_n "checking for Xkb... " >&6; }
8124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8125/* end confdefs.h. */
8126#include <X11/Xlib.h>
8127#include <X11/XKBlib.h>
5929fbe7
GM
8128int
8129main ()
8130{
eb697db5
DN
8131XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
8132 ;
8133 return 0;
5929fbe7
GM
8134}
8135_ACEOF
eb697db5
DN
8136if ac_fn_c_try_link "$LINENO"; then :
8137 emacs_xkb=yes
a4f64981 8138else
eb697db5 8139 emacs_xkb=no
5929fbe7 8140fi
eb697db5
DN
8141rm -f core conftest.err conftest.$ac_objext \
8142 conftest$ac_exeext conftest.$ac_ext
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_xkb" >&5
8144$as_echo "$emacs_xkb" >&6; }
8145 if test $emacs_xkb = yes; then
a4f64981 8146
eb697db5 8147$as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
a4f64981 8148
eb697db5 8149 fi
a4f64981 8150
eb697db5
DN
8151 for ac_func in XrmSetDatabase XScreenResourceString \
8152XScreenNumberOfScreen XSetWMProtocols
8153do :
8154 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8155ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8156eval as_val=\$$as_ac_var
8157 if test "x$as_val" = x""yes; then :
8158 cat >>confdefs.h <<_ACEOF
8159#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5929fbe7 8160_ACEOF
a4f64981 8161
5929fbe7 8162fi
eb697db5 8163done
a4f64981 8164
eb697db5 8165fi
8c5ff6dd 8166
eb697db5
DN
8167if test "${window_system}" = "x11"; then
8168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 version 6" >&5
8169$as_echo_n "checking X11 version 6... " >&6; }
8170 if test "${emacs_cv_x11_version_6+set}" = set; then :
a4f64981
GM
8171 $as_echo_n "(cached) " >&6
8172else
eb697db5 8173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 8174/* end confdefs.h. */
eb697db5 8175#include <X11/Xlib.h>
9452ded1
DN
8176int
8177main ()
8178{
eb697db5
DN
8179#if XlibSpecificationRelease < 6
8180fail;
8181#endif
8182
9452ded1
DN
8183 ;
8184 return 0;
8185}
0c309b80 8186_ACEOF
eb697db5
DN
8187if ac_fn_c_try_link "$LINENO"; then :
8188 emacs_cv_x11_version_6=yes
7186fb09 8189else
eb697db5
DN
8190 emacs_cv_x11_version_6=no
8191fi
8192rm -f core conftest.err conftest.$ac_objext \
8193 conftest$ac_exeext conftest.$ac_ext
8194fi
8195
8196 if test $emacs_cv_x11_version_6 = yes; then
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
8198$as_echo "6 or newer" >&6; }
8199
8200$as_echo "#define HAVE_X11R6 1" >>confdefs.h
5929fbe7 8201
a46007e9
GM
8202
8203$as_echo "#define HAVE_X_I18N 1" >>confdefs.h
8204
8205 ## inoue@ainet.or.jp says Solaris has a bug related to X11R6-style
8206 ## XIM support.
8207 case "$opsys" in
8208 sol2-*) : ;;
8209 *)
8210$as_echo "#define HAVE_X11R6_XIM 1" >>confdefs.h
8211
8212 ;;
8213 esac
eb697db5
DN
8214 else
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
8216$as_echo "before 6" >&6; }
8217 fi
aaa36002 8218fi
5929fbe7 8219
eb697db5
DN
8220
8221### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
8222HAVE_RSVG=no
8223if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then
8224 if test "${with_rsvg}" != "no"; then
8225 RSVG_REQUIRED=2.11.0
8226 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
8227
8228
8229 succeeded=no
8230
8231 # Extract the first word of "pkg-config", so it can be a program name with args.
8232set dummy pkg-config; ac_word=$2
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8234$as_echo_n "checking for $ac_word... " >&6; }
8235if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8236 $as_echo_n "(cached) " >&6
8237else
8238 case $PKG_CONFIG in
8239 [\\/]* | ?:[\\/]*)
8240 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8241 ;;
8242 *)
8243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8244for as_dir in $PATH
8245do
8246 IFS=$as_save_IFS
8247 test -z "$as_dir" && as_dir=.
8248 for ac_exec_ext in '' $ac_executable_extensions; do
8249 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8250 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8251 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8252 break 2
8253 fi
8254done
8255 done
8256IFS=$as_save_IFS
8257
8258 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8259 ;;
8260esac
aaa36002 8261fi
eb697db5
DN
8262PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8263if test -n "$PKG_CONFIG"; then
8264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8265$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 8266else
eb697db5
DN
8267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
a4f64981
GM
8269fi
8270
8c5ff6dd 8271
e6df49e4 8272
eb697db5
DN
8273 if test "$PKG_CONFIG" = "no" ; then
8274 :
8275 else
8276 PKG_CONFIG_MIN_VERSION=0.9.0
8277 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $RSVG_MODULE" >&5
8279$as_echo_n "checking for $RSVG_MODULE... " >&6; }
8280
8281 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8283$as_echo "yes" >&6; }
8284 succeeded=yes
8285
8286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_CFLAGS" >&5
8287$as_echo_n "checking RSVG_CFLAGS... " >&6; }
8288 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_CFLAGS" >&5
8290$as_echo "$RSVG_CFLAGS" >&6; }
8291
8292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking RSVG_LIBS" >&5
8293$as_echo_n "checking RSVG_LIBS... " >&6; }
8294 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG_LIBS" >&5
8296$as_echo "$RSVG_LIBS" >&6; }
8297 else
8298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8299$as_echo "no" >&6; }
8300 RSVG_CFLAGS=""
8301 RSVG_LIBS=""
8302 ## If we have a custom action on failure, don't print errors, but
8303 ## do set a variable so people can do so.
8304 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
8305
8306 fi
8307
8308
8309
8310 else
8311 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8312 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8313 fi
8314 fi
8315
8316 if test $succeeded = yes; then
8317 :
8318 else
8319 :
8320 fi
7186fb09 8321
a5edbe4a 8322
a5edbe4a 8323
91e84f96 8324
eb697db5
DN
8325 if test ".${RSVG_CFLAGS}" != "."; then
8326 HAVE_RSVG=yes
7186fb09 8327
eb697db5 8328$as_echo "#define HAVE_RSVG 1" >>confdefs.h
7186fb09 8329
eb697db5
DN
8330 CFLAGS="$CFLAGS $RSVG_CFLAGS"
8331 LIBS="$RSVG_LIBS $LIBS"
8332 fi
8333 fi
a4f64981 8334fi
08b47d3d 8335
eb697db5
DN
8336
8337HAVE_GTK=no
e547b051
J
8338if test "${with_gtk3}" = "yes"; then
8339 GLIB_REQUIRED=2.6
8340 GTK_REQUIRED=2.90
8341 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8342
8343
8344 succeeded=no
8345
8346 # Extract the first word of "pkg-config", so it can be a program name with args.
8347set dummy pkg-config; ac_word=$2
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8349$as_echo_n "checking for $ac_word... " >&6; }
8350if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8351 $as_echo_n "(cached) " >&6
8352else
8353 case $PKG_CONFIG in
8354 [\\/]* | ?:[\\/]*)
8355 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8356 ;;
8357 *)
8358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8359for as_dir in $PATH
8360do
8361 IFS=$as_save_IFS
8362 test -z "$as_dir" && as_dir=.
8363 for ac_exec_ext in '' $ac_executable_extensions; do
8364 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8365 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8367 break 2
8368 fi
8369done
8370 done
8371IFS=$as_save_IFS
8372
8373 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8374 ;;
8375esac
8376fi
8377PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8378if test -n "$PKG_CONFIG"; then
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8380$as_echo "$PKG_CONFIG" >&6; }
8381else
8382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383$as_echo "no" >&6; }
8384fi
8385
8386
8387
8388 if test "$PKG_CONFIG" = "no" ; then
8389 pkg_check_gtk=no
8390 else
8391 PKG_CONFIG_MIN_VERSION=0.9.0
8392 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8394$as_echo_n "checking for $GTK_MODULES... " >&6; }
8395
8396 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8398$as_echo "yes" >&6; }
8399 succeeded=yes
8400
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8402$as_echo_n "checking GTK_CFLAGS... " >&6; }
8403 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8405$as_echo "$GTK_CFLAGS" >&6; }
8406
8407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8408$as_echo_n "checking GTK_LIBS... " >&6; }
8409 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8411$as_echo "$GTK_LIBS" >&6; }
8412 else
8413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414$as_echo "no" >&6; }
8415 GTK_CFLAGS=""
8416 GTK_LIBS=""
8417 ## If we have a custom action on failure, don't print errors, but
8418 ## do set a variable so people can do so.
8419 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8420
8421 fi
8422
8423
8424
8425 else
8426 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8427 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8428 fi
8429 fi
8430
8431 if test $succeeded = yes; then
8432 pkg_check_gtk=yes
8433 else
8434 pkg_check_gtk=no
8435 fi
8436
8437 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
8438 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
8439 fi
8440fi
8441
8442if test "$pkg_check_gtk" != "yes"; then
8443 HAVE_GTK=no
eb697db5
DN
8444if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8445 GLIB_REQUIRED=2.6
8446 GTK_REQUIRED=2.6
8447 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
5929fbe7
GM
8448
8449
eb697db5 8450 succeeded=no
5929fbe7 8451
eb697db5
DN
8452 # Extract the first word of "pkg-config", so it can be a program name with args.
8453set dummy pkg-config; ac_word=$2
8454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8455$as_echo_n "checking for $ac_word... " >&6; }
8456if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981 8457 $as_echo_n "(cached) " >&6
a4f64981 8458else
eb697db5
DN
8459 case $PKG_CONFIG in
8460 [\\/]* | ?:[\\/]*)
8461 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8462 ;;
8463 *)
8464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8465for as_dir in $PATH
8466do
8467 IFS=$as_save_IFS
8468 test -z "$as_dir" && as_dir=.
8469 for ac_exec_ext in '' $ac_executable_extensions; do
8470 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8471 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8472 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8473 break 2
8474 fi
8475done
8476 done
8477IFS=$as_save_IFS
8c5ff6dd 8478
eb697db5
DN
8479 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8480 ;;
5929fbe7 8481esac
eb697db5
DN
8482fi
8483PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8484if test -n "$PKG_CONFIG"; then
8485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8486$as_echo "$PKG_CONFIG" >&6; }
a4f64981 8487else
eb697db5
DN
8488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8489$as_echo "no" >&6; }
a4f64981 8490fi
5929fbe7 8491
9452ded1 8492
a4f64981 8493
eb697db5
DN
8494 if test "$PKG_CONFIG" = "no" ; then
8495 pkg_check_gtk=no
8496 else
8497 PKG_CONFIG_MIN_VERSION=0.9.0
8498 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8500$as_echo_n "checking for $GTK_MODULES... " >&6; }
a4f64981 8501
eb697db5
DN
8502 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8504$as_echo "yes" >&6; }
8505 succeeded=yes
a4f64981 8506
eb697db5
DN
8507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8508$as_echo_n "checking GTK_CFLAGS... " >&6; }
8509 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8511$as_echo "$GTK_CFLAGS" >&6; }
91e84f96 8512
eb697db5
DN
8513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8514$as_echo_n "checking GTK_LIBS... " >&6; }
8515 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8517$as_echo "$GTK_LIBS" >&6; }
8518 else
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8520$as_echo "no" >&6; }
8521 GTK_CFLAGS=""
8522 GTK_LIBS=""
8523 ## If we have a custom action on failure, don't print errors, but
8524 ## do set a variable so people can do so.
8525 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8732a4e9 8526
eb697db5 8527 fi
8732a4e9 8528
5929fbe7 8529
9452ded1 8530
eb697db5
DN
8531 else
8532 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8533 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8534 fi
8535 fi
8536
8537 if test $succeeded = yes; then
8538 pkg_check_gtk=yes
8539 else
8540 pkg_check_gtk=no
8541 fi
5929fbe7 8542
eb697db5
DN
8543 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
8544 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
8545 fi
8c5ff6dd 8546fi
e547b051 8547fi
8c5ff6dd 8548
eb697db5
DN
8549GTK_OBJ=
8550if test x"$pkg_check_gtk" = xyes; then
91e84f96 8551
8c5ff6dd 8552
8c5ff6dd 8553
eb697db5
DN
8554 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
8555 CFLAGS="$CFLAGS $GTK_CFLAGS"
8556 LIBS="$GTK_LIBS $LIBS"
8557 GTK_COMPILES=no
8558 for ac_func in gtk_main
8559do :
8560 ac_fn_c_check_func "$LINENO" "gtk_main" "ac_cv_func_gtk_main"
8561if test "x$ac_cv_func_gtk_main" = x""yes; then :
8562 cat >>confdefs.h <<_ACEOF
8563#define HAVE_GTK_MAIN 1
8564_ACEOF
8565 GTK_COMPILES=yes
5929fbe7 8566fi
eb697db5 8567done
8c5ff6dd 8568
eb697db5
DN
8569 if test "${GTK_COMPILES}" != "yes"; then
8570 if test "$USE_X_TOOLKIT" != "maybe"; then
8571 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
8572 fi
8573 else
8574 HAVE_GTK=yes
5929fbe7 8575
eb697db5 8576$as_echo "#define USE_GTK 1" >>confdefs.h
91e84f96 8577
eb697db5
DN
8578 GTK_OBJ=gtkutil.o
8579 USE_X_TOOLKIT=none
8580 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
8581 :
8582 else
8583 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your version of Gtk+ will have problems with
8584 closing open displays. This is no problem if you just use
8585 one display, but if you use more than one and close one of them
8586 Emacs may crash." >&5
8587$as_echo "$as_me: WARNING: Your version of Gtk+ will have problems with
8588 closing open displays. This is no problem if you just use
8589 one display, but if you use more than one and close one of them
8590 Emacs may crash." >&2;}
8591 sleep 3
8592 fi
8593 fi
8c5ff6dd 8594
a4f64981 8595fi
08b47d3d 8596
15e12598
VB
8597
8598
eb697db5 8599if test "${HAVE_GTK}" = "yes"; then
15e12598 8600
eb697db5
DN
8601 if test "$with_toolkit_scroll_bars" != no; then
8602 with_toolkit_scroll_bars=yes
eb697db5 8603 fi
8c5ff6dd 8604
eb697db5
DN
8605 HAVE_GTK_FILE_SELECTION=no
8606 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
8607#include <gtk/gtk.h>
8608"
8609if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
8610 HAVE_GTK_FILE_SELECTION=yes
5929fbe7 8611else
eb697db5 8612 HAVE_GTK_FILE_SELECTION=no
5929fbe7 8613fi
91e84f96 8614
eb697db5
DN
8615 if test "$HAVE_GTK_FILE_SELECTION" = yes; then
8616 for ac_func in gtk_file_selection_new
8617do :
8618 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
8619if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
5929fbe7 8620 cat >>confdefs.h <<_ACEOF
eb697db5 8621#define HAVE_GTK_FILE_SELECTION_NEW 1
5929fbe7 8622_ACEOF
8c5ff6dd 8623
8c5ff6dd 8624fi
eb697db5 8625done
5929fbe7 8626
eb697db5 8627 fi
5929fbe7 8628
e547b051 8629 HAVE_GTK_AND_PTHREAD=no
eb697db5
DN
8630 for ac_header in pthread.h
8631do :
8632 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8633if test "x$ac_cv_header_pthread_h" = x""yes; then :
8634 cat >>confdefs.h <<_ACEOF
8635#define HAVE_PTHREAD_H 1
5929fbe7
GM
8636_ACEOF
8637
eb697db5 8638fi
5929fbe7 8639
eb697db5
DN
8640done
8641
8642 if test "$ac_cv_header_pthread_h"; then
8643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_self in -lpthread" >&5
8644$as_echo_n "checking for pthread_self in -lpthread... " >&6; }
8645if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then :
8c5ff6dd
KR
8646 $as_echo_n "(cached) " >&6
8647else
8648 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
8649LIBS="-lpthread $LIBS"
8650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 8651/* end confdefs.h. */
8c5ff6dd
KR
8652
8653/* Override any GCC internal prototype to avoid an error.
8654 Use char because int might match the return type of a GCC
8655 builtin and then its argument prototype would still apply. */
8656#ifdef __cplusplus
8657extern "C"
8658#endif
eb697db5 8659char pthread_self ();
a4f64981
GM
8660int
8661main ()
8662{
eb697db5 8663return pthread_self ();
a4f64981
GM
8664 ;
8665 return 0;
8666}
8667_ACEOF
eb697db5
DN
8668if ac_fn_c_try_link "$LINENO"; then :
8669 ac_cv_lib_pthread_pthread_self=yes
a4f64981 8670else
eb697db5 8671 ac_cv_lib_pthread_pthread_self=no
8c5ff6dd 8672fi
eb697db5
DN
8673rm -f core conftest.err conftest.$ac_objext \
8674 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
8675LIBS=$ac_check_lib_save_LIBS
8676fi
eb697db5
DN
8677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_self" >&5
8678$as_echo "$ac_cv_lib_pthread_pthread_self" >&6; }
8679if test "x$ac_cv_lib_pthread_pthread_self" = x""yes; then :
8680 HAVE_GTK_AND_PTHREAD=yes
8681fi
91e84f96 8682
eb697db5
DN
8683 fi
8684 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
8685 case "${canonical}" in
8686 *-hpux*) ;;
8687 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
8688 esac
91e84f96 8689
eb697db5 8690$as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
cd03c74a 8691
eb697db5 8692 fi
e547b051
J
8693
8694 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
8695 gtk_dialog_get_action_area gtk_widget_get_sensitive \
8696 gtk_widget_get_mapped gtk_adjustment_get_page_size \
8697 gtk_orientable_set_orientation
8698do :
8699 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8700ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8701eval as_val=\$$as_ac_var
8702 if test "x$as_val" = x""yes; then :
8703 cat >>confdefs.h <<_ACEOF
8704#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8705_ACEOF
8706
8707fi
8708done
8709
8710
5929fbe7 8711fi
49ebbd65 8712
eb697db5
DN
8713HAVE_DBUS=no
8714DBUS_OBJ=
8715if test "${with_dbus}" = "yes"; then
15e12598 8716
eb697db5 8717 succeeded=no
a4f64981 8718
eb697db5
DN
8719 # Extract the first word of "pkg-config", so it can be a program name with args.
8720set dummy pkg-config; ac_word=$2
8721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8722$as_echo_n "checking for $ac_word... " >&6; }
8723if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
91e84f96
GM
8724 $as_echo_n "(cached) " >&6
8725else
eb697db5
DN
8726 case $PKG_CONFIG in
8727 [\\/]* | ?:[\\/]*)
8728 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8729 ;;
8730 *)
8731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8732for as_dir in $PATH
8733do
8734 IFS=$as_save_IFS
8735 test -z "$as_dir" && as_dir=.
8736 for ac_exec_ext in '' $ac_executable_extensions; do
8737 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8738 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8740 break 2
8741 fi
8742done
8743 done
8744IFS=$as_save_IFS
8745
8746 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8747 ;;
a4f64981 8748esac
eb697db5
DN
8749fi
8750PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8751if test -n "$PKG_CONFIG"; then
8752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8753$as_echo "$PKG_CONFIG" >&6; }
91e84f96 8754else
eb697db5
DN
8755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8756$as_echo "no" >&6; }
5929fbe7 8757fi
a4f64981 8758
49ebbd65 8759
eb697db5
DN
8760
8761 if test "$PKG_CONFIG" = "no" ; then
8762 HAVE_DBUS=no
8763 else
8764 PKG_CONFIG_MIN_VERSION=0.9.0
8765 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.0" >&5
8767$as_echo_n "checking for dbus-1 >= 1.0... " >&6; }
8768
8769 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8771$as_echo "yes" >&6; }
8772 succeeded=yes
8773
8774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_CFLAGS" >&5
8775$as_echo_n "checking DBUS_CFLAGS... " >&6; }
8776 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_CFLAGS" >&5
8778$as_echo "$DBUS_CFLAGS" >&6; }
8779
8780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking DBUS_LIBS" >&5
8781$as_echo_n "checking DBUS_LIBS... " >&6; }
8782 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_LIBS" >&5
8784$as_echo "$DBUS_LIBS" >&6; }
8785 else
8786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8787$as_echo "no" >&6; }
8788 DBUS_CFLAGS=""
8789 DBUS_LIBS=""
8790 ## If we have a custom action on failure, don't print errors, but
8791 ## do set a variable so people can do so.
8792 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
8793
8794 fi
8795
8796
8797
8798 else
8799 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8800 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8801 fi
8802 fi
8803
8804 if test $succeeded = yes; then
8805 HAVE_DBUS=yes
8806 else
8807 HAVE_DBUS=no
8808 fi
8809
8810 if test "$HAVE_DBUS" = yes; then
8811 LIBS="$LIBS $DBUS_LIBS"
8812
8813$as_echo "#define HAVE_DBUS 1" >>confdefs.h
8814
8815 for ac_func in dbus_watch_get_unix_fd
8816do :
8817 ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
8818if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
8819 cat >>confdefs.h <<_ACEOF
8820#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
5929fbe7 8821_ACEOF
eb697db5
DN
8822
8823fi
8824done
8825
8826 DBUS_OBJ=dbusbind.o
8827 fi
8828fi
8829
8830
8831HAVE_GCONF=no
8832if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then
8833
8834 succeeded=no
8835
8836 # Extract the first word of "pkg-config", so it can be a program name with args.
8837set dummy pkg-config; ac_word=$2
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839$as_echo_n "checking for $ac_word... " >&6; }
8840if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8841 $as_echo_n "(cached) " >&6
8842else
8843 case $PKG_CONFIG in
8844 [\\/]* | ?:[\\/]*)
8845 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8846 ;;
8847 *)
8848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849for as_dir in $PATH
8850do
8851 IFS=$as_save_IFS
8852 test -z "$as_dir" && as_dir=.
8853 for ac_exec_ext in '' $ac_executable_extensions; do
8854 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8855 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857 break 2
8858 fi
8859done
8860 done
8861IFS=$as_save_IFS
8862
8863 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8864 ;;
5929fbe7 8865esac
eb697db5
DN
8866fi
8867PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8868if test -n "$PKG_CONFIG"; then
8869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8870$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 8871else
eb697db5
DN
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
8874fi
8875
8876
8877
8878 if test "$PKG_CONFIG" = "no" ; then
8879 HAVE_GCONF=no
8880 else
8881 PKG_CONFIG_MIN_VERSION=0.9.0
8882 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gconf-2.0 >= 2.13" >&5
8884$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
8885
8886 if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
8887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8888$as_echo "yes" >&6; }
8889 succeeded=yes
8890
8891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_CFLAGS" >&5
8892$as_echo_n "checking GCONF_CFLAGS... " >&6; }
8893 GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_CFLAGS" >&5
8895$as_echo "$GCONF_CFLAGS" >&6; }
8896
8897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GCONF_LIBS" >&5
8898$as_echo_n "checking GCONF_LIBS... " >&6; }
8899 GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
8900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCONF_LIBS" >&5
8901$as_echo "$GCONF_LIBS" >&6; }
8902 else
8903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8904$as_echo "no" >&6; }
8905 GCONF_CFLAGS=""
8906 GCONF_LIBS=""
8907 ## If we have a custom action on failure, don't print errors, but
8908 ## do set a variable so people can do so.
8909 GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
cd03c74a 8910
eb697db5 8911 fi
49ebbd65 8912
e6df49e4 8913
49ebbd65 8914
eb697db5
DN
8915 else
8916 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8917 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8918 fi
8919 fi
cd03c74a 8920
eb697db5
DN
8921 if test $succeeded = yes; then
8922 HAVE_GCONF=yes
8923 else
8924 HAVE_GCONF=no
8925 fi
49ebbd65 8926
eb697db5 8927 if test "$HAVE_GCONF" = yes; then
a4f64981 8928
eb697db5 8929$as_echo "#define HAVE_GCONF 1" >>confdefs.h
8c5ff6dd 8930
eb697db5
DN
8931 fi
8932fi
8933
8934HAVE_LIBSELINUX=no
8935LIBSELINUX_LIBS=
8936if test "${with_selinux}" = "yes"; then
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lgetfilecon in -lselinux" >&5
8938$as_echo_n "checking for lgetfilecon in -lselinux... " >&6; }
8939if test "${ac_cv_lib_selinux_lgetfilecon+set}" = set; then :
15e12598 8940 $as_echo_n "(cached) " >&6
49ebbd65 8941else
eb697db5
DN
8942 ac_check_lib_save_LIBS=$LIBS
8943LIBS="-lselinux $LIBS"
8944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 8945/* end confdefs.h. */
15e12598
VB
8946
8947/* Override any GCC internal prototype to avoid an error.
8948 Use char because int might match the return type of a GCC
8949 builtin and then its argument prototype would still apply. */
8950#ifdef __cplusplus
8951extern "C"
8952#endif
eb697db5 8953char lgetfilecon ();
91e84f96
GM
8954int
8955main ()
8956{
eb697db5 8957return lgetfilecon ();
91e84f96
GM
8958 ;
8959 return 0;
8960}
8961_ACEOF
eb697db5
DN
8962if ac_fn_c_try_link "$LINENO"; then :
8963 ac_cv_lib_selinux_lgetfilecon=yes
91e84f96 8964else
eb697db5 8965 ac_cv_lib_selinux_lgetfilecon=no
a4f64981 8966fi
eb697db5
DN
8967rm -f core conftest.err conftest.$ac_objext \
8968 conftest$ac_exeext conftest.$ac_ext
8969LIBS=$ac_check_lib_save_LIBS
15e12598 8970fi
eb697db5
DN
8971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_lgetfilecon" >&5
8972$as_echo "$ac_cv_lib_selinux_lgetfilecon" >&6; }
8973if test "x$ac_cv_lib_selinux_lgetfilecon" = x""yes; then :
8974 HAVE_LIBSELINUX=yes
8975else
8976 HAVE_LIBSELINUX=no
5929fbe7 8977fi
a4f64981 8978
eb697db5 8979 if test "$HAVE_LIBSELINUX" = yes; then
15e12598 8980
eb697db5 8981$as_echo "#define HAVE_LIBSELINUX 1" >>confdefs.h
e6df49e4 8982
eb697db5
DN
8983 LIBSELINUX_LIBS=-lselinux
8984 fi
5929fbe7 8985fi
e6df49e4 8986
eb697db5
DN
8987
8988HAVE_XAW3D=no
8989LUCID_LIBW=
8990if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
8991 if test "$with_xaw3d" != no; then
8992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xaw3d" >&5
8993$as_echo_n "checking for xaw3d... " >&6; }
8994 if test "${emacs_cv_xaw3d+set}" = set; then :
a4f64981
GM
8995 $as_echo_n "(cached) " >&6
8996else
eb697db5 8997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 8998/* end confdefs.h. */
5929fbe7 8999
eb697db5
DN
9000#include <X11/Intrinsic.h>
9001#include <X11/Xaw3d/Simple.h>
9002int
9003main ()
9004{
5929fbe7 9005
eb697db5
DN
9006 ;
9007 return 0;
9008}
5929fbe7 9009_ACEOF
eb697db5
DN
9010if ac_fn_c_try_link "$LINENO"; then :
9011 emacs_cv_xaw3d=yes
a4f64981 9012else
eb697db5 9013 emacs_cv_xaw3d=no
a4f64981 9014fi
eb697db5
DN
9015rm -f core conftest.err conftest.$ac_objext \
9016 conftest$ac_exeext conftest.$ac_ext
5929fbe7 9017fi
8c5ff6dd 9018
eb697db5
DN
9019 else
9020 emacs_cv_xaw3d=no
9021 fi
9022 if test $emacs_cv_xaw3d = yes; then
9023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9024$as_echo "yes; using Lucid toolkit" >&6; }
9025 USE_X_TOOLKIT=LUCID
9026 HAVE_XAW3D=yes
9027 LUCID_LIBW=-lXaw3d
8c5ff6dd 9028
eb697db5 9029$as_echo "#define HAVE_XAW3D 1" >>confdefs.h
5929fbe7 9030
eb697db5
DN
9031 else
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9033$as_echo "no" >&6; }
9034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libXaw" >&5
9035$as_echo_n "checking for libXaw... " >&6; }
9036 if test "${emacs_cv_xaw+set}" = set; then :
5929fbe7 9037 $as_echo_n "(cached) " >&6
5929fbe7 9038else
eb697db5 9039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9040/* end confdefs.h. */
5929fbe7 9041
eb697db5
DN
9042#include <X11/Intrinsic.h>
9043#include <X11/Xaw/Simple.h>
9044int
9045main ()
9046{
5929fbe7 9047
eb697db5
DN
9048 ;
9049 return 0;
9050}
5929fbe7 9051_ACEOF
eb697db5
DN
9052if ac_fn_c_try_link "$LINENO"; then :
9053 emacs_cv_xaw=yes
5929fbe7 9054else
eb697db5
DN
9055 emacs_cv_xaw=no
9056fi
9057rm -f core conftest.err conftest.$ac_objext \
9058 conftest$ac_exeext conftest.$ac_ext
9059fi
5929fbe7 9060
eb697db5
DN
9061 if test $emacs_cv_xaw = yes; then
9062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; using Lucid toolkit" >&5
9063$as_echo "yes; using Lucid toolkit" >&6; }
9064 USE_X_TOOLKIT=LUCID
9065 LUCID_LIBW=-lXaw
9066 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
9067 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
9068 else
9069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
9070$as_echo "no; do not use toolkit by default" >&6; }
9071 USE_X_TOOLKIT=none
9072 fi
9073 fi
5929fbe7 9074fi
8c5ff6dd 9075
eb697db5 9076X_TOOLKIT_TYPE=$USE_X_TOOLKIT
a4f64981 9077
eb697db5
DN
9078LIBXTR6=
9079if test "${USE_X_TOOLKIT}" != "none"; then
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking X11 toolkit version" >&5
9081$as_echo_n "checking X11 toolkit version... " >&6; }
9082 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then :
9083 $as_echo_n "(cached) " >&6
9084else
9085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9086/* end confdefs.h. */
9087#include <X11/Intrinsic.h>
9088int
9089main ()
9090{
9091#if XtSpecificationRelease < 6
9092fail;
9093#endif
aaa36002 9094
eb697db5
DN
9095 ;
9096 return 0;
9097}
9098_ACEOF
9099if ac_fn_c_try_link "$LINENO"; then :
9100 emacs_cv_x11_toolkit_version_6=yes
5929fbe7 9101else
eb697db5 9102 emacs_cv_x11_toolkit_version_6=no
5929fbe7 9103fi
eb697db5
DN
9104rm -f core conftest.err conftest.$ac_objext \
9105 conftest$ac_exeext conftest.$ac_ext
5929fbe7 9106fi
15e12598 9107
eb697db5
DN
9108 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
9109 if test $emacs_cv_x11_toolkit_version_6 = yes; then
9110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 6 or newer" >&5
9111$as_echo "6 or newer" >&6; }
15e12598 9112
eb697db5 9113$as_echo "#define HAVE_X11XTR6 1" >>confdefs.h
15e12598 9114
eb697db5
DN
9115 LIBXTR6="-lSM -lICE"
9116 case "$opsys" in
9117 ## Use libw.a along with X11R6 Xt.
9118 unixware) LIBXTR6="$LIBXTR6 -lw" ;;
9119 esac
9120 else
9121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: before 6" >&5
9122$as_echo "before 6" >&6; }
9123 fi
5929fbe7 9124
eb697db5
DN
9125 OLDLIBS="$LIBS"
9126 if test x$HAVE_X11XTR6 = xyes; then
9127 LIBS="-lXt -lSM -lICE $LIBS"
9128 else
9129 LIBS="-lXt $LIBS"
9130 fi
9131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuConvertStandardSelection in -lXmu" >&5
9132$as_echo_n "checking for XmuConvertStandardSelection in -lXmu... " >&6; }
9133if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then :
5929fbe7 9134 $as_echo_n "(cached) " >&6
5929fbe7 9135else
eb697db5
DN
9136 ac_check_lib_save_LIBS=$LIBS
9137LIBS="-lXmu $LIBS"
9138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9139/* end confdefs.h. */
eb697db5
DN
9140
9141/* Override any GCC internal prototype to avoid an error.
9142 Use char because int might match the return type of a GCC
9143 builtin and then its argument prototype would still apply. */
9144#ifdef __cplusplus
9145extern "C"
9146#endif
9147char XmuConvertStandardSelection ();
9148int
9149main ()
9150{
9151return XmuConvertStandardSelection ();
9152 ;
9153 return 0;
9154}
5929fbe7 9155_ACEOF
eb697db5
DN
9156if ac_fn_c_try_link "$LINENO"; then :
9157 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
5929fbe7 9158else
eb697db5 9159 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
8c5ff6dd 9160fi
eb697db5
DN
9161rm -f core conftest.err conftest.$ac_objext \
9162 conftest$ac_exeext conftest.$ac_ext
9163LIBS=$ac_check_lib_save_LIBS
9164fi
9165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
9166$as_echo "$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
9167if test "x$ac_cv_lib_Xmu_XmuConvertStandardSelection" = x""yes; then :
9168 cat >>confdefs.h <<_ACEOF
9169#define HAVE_LIBXMU 1
5929fbe7 9170_ACEOF
a4f64981 9171
eb697db5
DN
9172 LIBS="-lXmu $LIBS"
9173
5929fbe7 9174fi
a4f64981 9175
eb697db5
DN
9176 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
9177fi
a4f64981 9178
a4f64981 9179
eb697db5
DN
9180LIBXMU=-lXmu
9181case "$machine" in
9182 ## These machines don't supply Xmu.
9183 hpux* | aix4-2 )
9184 test "X$ac_cv_lib_Xmu_XmuConvertStandardSelection" != "Xyes" && LIBXMU=
5929fbe7
GM
9185 ;;
9186esac
eb697db5
DN
9187
9188
9189# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
9190if test "${HAVE_X11}" = "yes"; then
9191 if test "${USE_X_TOOLKIT}" != "none"; then
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeQueryExtension in -lXext" >&5
9193$as_echo_n "checking for XShapeQueryExtension in -lXext... " >&6; }
9194if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then :
5929fbe7
GM
9195 $as_echo_n "(cached) " >&6
9196else
eb697db5
DN
9197 ac_check_lib_save_LIBS=$LIBS
9198LIBS="-lXext $LIBS"
9199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9200/* end confdefs.h. */
49ebbd65 9201
eb697db5
DN
9202/* Override any GCC internal prototype to avoid an error.
9203 Use char because int might match the return type of a GCC
9204 builtin and then its argument prototype would still apply. */
9205#ifdef __cplusplus
9206extern "C"
9207#endif
9208char XShapeQueryExtension ();
9209int
9210main ()
9211{
9212return XShapeQueryExtension ();
9213 ;
9214 return 0;
9215}
9216_ACEOF
9217if ac_fn_c_try_link "$LINENO"; then :
9218 ac_cv_lib_Xext_XShapeQueryExtension=yes
9219else
9220 ac_cv_lib_Xext_XShapeQueryExtension=no
9221fi
9222rm -f core conftest.err conftest.$ac_objext \
9223 conftest$ac_exeext conftest.$ac_ext
9224LIBS=$ac_check_lib_save_LIBS
5929fbe7 9225fi
eb697db5
DN
9226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
9227$as_echo "$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
9228if test "x$ac_cv_lib_Xext_XShapeQueryExtension" = x""yes; then :
5929fbe7 9229 cat >>confdefs.h <<_ACEOF
eb697db5 9230#define HAVE_LIBXEXT 1
5929fbe7 9231_ACEOF
15e12598 9232
eb697db5 9233 LIBS="-lXext $LIBS"
a4f64981 9234
5929fbe7 9235fi
8c5ff6dd 9236
eb697db5
DN
9237 fi
9238fi
8c5ff6dd 9239
eb697db5
DN
9240LIBXP=
9241if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Motif version 2.1" >&5
9243$as_echo_n "checking for Motif version 2.1... " >&6; }
9244if test "${emacs_cv_motif_version_2_1+set}" = set; then :
91e84f96
GM
9245 $as_echo_n "(cached) " >&6
9246else
eb697db5 9247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 9248/* end confdefs.h. */
eb697db5
DN
9249#include <Xm/Xm.h>
9250int
9251main ()
9252{
9253#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
9254int x = 5;
9255#else
9256Motif version prior to 2.1.
9257#endif
9258 ;
9259 return 0;
9260}
91e84f96 9261_ACEOF
eb697db5
DN
9262if ac_fn_c_try_compile "$LINENO"; then :
9263 emacs_cv_motif_version_2_1=yes
91e84f96 9264else
eb697db5 9265 emacs_cv_motif_version_2_1=no
91e84f96 9266fi
5929fbe7 9267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9268fi
9269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_motif_version_2_1" >&5
9270$as_echo "$emacs_cv_motif_version_2_1" >&6; }
9271 if test $emacs_cv_motif_version_2_1 = yes; then
9272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpCreateContext in -lXp" >&5
9273$as_echo_n "checking for XpCreateContext in -lXp... " >&6; }
9274if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then :
9275 $as_echo_n "(cached) " >&6
9276else
9277 ac_check_lib_save_LIBS=$LIBS
9278LIBS="-lXp $LIBS"
9279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9280/* end confdefs.h. */
a4f64981 9281
eb697db5
DN
9282/* Override any GCC internal prototype to avoid an error.
9283 Use char because int might match the return type of a GCC
9284 builtin and then its argument prototype would still apply. */
9285#ifdef __cplusplus
9286extern "C"
9287#endif
9288char XpCreateContext ();
9289int
9290main ()
9291{
9292return XpCreateContext ();
9293 ;
9294 return 0;
9295}
5929fbe7 9296_ACEOF
eb697db5
DN
9297if ac_fn_c_try_link "$LINENO"; then :
9298 ac_cv_lib_Xp_XpCreateContext=yes
9299else
9300 ac_cv_lib_Xp_XpCreateContext=no
9301fi
9302rm -f core conftest.err conftest.$ac_objext \
9303 conftest$ac_exeext conftest.$ac_ext
9304LIBS=$ac_check_lib_save_LIBS
9305fi
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xp_XpCreateContext" >&5
9307$as_echo "$ac_cv_lib_Xp_XpCreateContext" >&6; }
9308if test "x$ac_cv_lib_Xp_XpCreateContext" = x""yes; then :
9309 LIBXP=-lXp
9310fi
9311
9312 else
9313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LessTif where some systems put it" >&5
9314$as_echo_n "checking for LessTif where some systems put it... " >&6; }
9315if test "${emacs_cv_lesstif+set}" = set; then :
9316 $as_echo_n "(cached) " >&6
9317else
9318 # We put this in CFLAGS temporarily to precede other -I options
9319 # that might be in CFLAGS temporarily.
9320 # We put this in CPPFLAGS where it precedes the other -I options.
9321 OLD_CPPFLAGS=$CPPFLAGS
9322 OLD_CFLAGS=$CFLAGS
9323 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
9324 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
9325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9326/* end confdefs.h. */
eb697db5
DN
9327#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
9328int
9329main ()
9330{
9331int x = 5;
9332 ;
9333 return 0;
9334}
a4f64981 9335_ACEOF
eb697db5
DN
9336if ac_fn_c_try_compile "$LINENO"; then :
9337 emacs_cv_lesstif=yes
8c5ff6dd 9338else
eb697db5
DN
9339 emacs_cv_lesstif=no
9340fi
9341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9342fi
9343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_lesstif" >&5
9344$as_echo "$emacs_cv_lesstif" >&6; }
9345 if test $emacs_cv_lesstif = yes; then
9346 # Make sure this -I option remains in CPPFLAGS after it is set
9347 # back to REAL_CPPFLAGS.
9348 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
9349 # have those other -I options anyway. Ultimately, having this
9350 # directory ultimately in CPPFLAGS will be enough.
9351 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
9352 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
9353 else
9354 CFLAGS=$OLD_CFLAGS
9355 CPPFLAGS=$OLD_CPPFLAGS
9356 fi
9357 fi
5929fbe7 9358fi
cd03c74a 9359
49ebbd65 9360
eb697db5
DN
9361USE_TOOLKIT_SCROLL_BARS=no
9362if test "${with_toolkit_scroll_bars}" != "no"; then
9363 if test "${USE_X_TOOLKIT}" != "none"; then
9364 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
9365 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9366
eb697db5
DN
9367 HAVE_XAW3D=no
9368 USE_TOOLKIT_SCROLL_BARS=yes
9369 elif test "${HAVE_XAW3D}" = "yes"; then
9370 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9371
9372 USE_TOOLKIT_SCROLL_BARS=yes
9373 fi
9374 elif test "${HAVE_GTK}" = "yes"; then
9375 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
9376
9377 USE_TOOLKIT_SCROLL_BARS=yes
9378 elif test "${HAVE_NS}" = "yes"; then
9379 $as_echo "#define USE_TOOLKIT_SCROLL_BARS 1" >>confdefs.h
a4f64981 9380
eb697db5
DN
9381 USE_TOOLKIT_SCROLL_BARS=yes
9382 fi
5929fbe7 9383fi
eb697db5
DN
9384
9385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 9386/* end confdefs.h. */
91e84f96 9387
eb697db5
DN
9388 #include <X11/Xlib.h>
9389 #include <X11/Xresource.h>
91e84f96
GM
9390int
9391main ()
9392{
eb697db5 9393XIMProc callback;
91e84f96
GM
9394 ;
9395 return 0;
9396}
9397_ACEOF
eb697db5
DN
9398if ac_fn_c_try_compile "$LINENO"; then :
9399 HAVE_XIM=yes
9400
9401$as_echo "#define HAVE_XIM 1" >>confdefs.h
9402
5929fbe7 9403else
eb697db5
DN
9404 HAVE_XIM=no
9405fi
9406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5929fbe7 9407
eb697db5
DN
9408
9409if test "${with_xim}" != "no"; then
9410
9411$as_echo "#define USE_XIM 1" >>confdefs.h
9412
9413fi
9414
9415
9416if test "${HAVE_XIM}" != "no"; then
9417 late_CFLAGS=$CFLAGS
9418 if test "$GCC" = yes; then
9419 CFLAGS="$CFLAGS --pedantic-errors"
9420 fi
9421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9422/* end confdefs.h. */
5929fbe7 9423
eb697db5
DN
9424#include <X11/Xlib.h>
9425#include <X11/Xresource.h>
5929fbe7
GM
9426int
9427main ()
9428{
eb697db5
DN
9429Display *display;
9430XrmDatabase db;
9431char *res_name;
9432char *res_class;
9433XIMProc callback;
9434XPointer *client_data;
9435#ifndef __GNUC__
9436/* If we're not using GCC, it's probably not XFree86, and this is
9437 probably right, but we can't use something like --pedantic-errors. */
9438extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
9439 char*, XIMProc, XPointer*);
9440#endif
9441(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
9442 client_data);
5929fbe7
GM
9443 ;
9444 return 0;
9445}
9446_ACEOF
eb697db5
DN
9447if ac_fn_c_try_compile "$LINENO"; then :
9448 emacs_cv_arg6_star=yes
5929fbe7 9449fi
5929fbe7 9450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
9451 if test "$emacs_cv_arg6_star" = yes; then
9452 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer*" >>confdefs.h
5929fbe7 9453
eb697db5
DN
9454 else
9455 $as_echo "#define XRegisterIMInstantiateCallback_arg6 XPointer" >>confdefs.h
9456
9457 fi
9458 CFLAGS=$late_CFLAGS
8c5ff6dd 9459fi
5929fbe7 9460
eb697db5
DN
9461### Start of font-backend (under any platform) section.
9462# (nothing here yet -- this is a placeholder)
9463### End of font-backend (under any platform) section.
5929fbe7 9464
eb697db5
DN
9465### Start of font-backend (under X11) section.
9466if test "${HAVE_X11}" = "yes"; then
5929fbe7 9467
eb697db5
DN
9468 succeeded=no
9469
9470 # Extract the first word of "pkg-config", so it can be a program name with args.
9471set dummy pkg-config; ac_word=$2
9472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9473$as_echo_n "checking for $ac_word... " >&6; }
9474if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
9475 $as_echo_n "(cached) " >&6
9476else
9477 case $PKG_CONFIG in
9478 [\\/]* | ?:[\\/]*)
9479 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9480 ;;
9481 *)
9482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9483for as_dir in $PATH
9484do
9485 IFS=$as_save_IFS
9486 test -z "$as_dir" && as_dir=.
9487 for ac_exec_ext in '' $ac_executable_extensions; do
9488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9489 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9491 break 2
9492 fi
9493done
9494 done
9495IFS=$as_save_IFS
5929fbe7 9496
eb697db5
DN
9497 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9498 ;;
9499esac
9500fi
9501PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9502if test -n "$PKG_CONFIG"; then
9503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9504$as_echo "$PKG_CONFIG" >&6; }
9505else
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9507$as_echo "no" >&6; }
8c5ff6dd 9508fi
91e84f96 9509
5929fbe7 9510
91e84f96 9511
eb697db5
DN
9512 if test "$PKG_CONFIG" = "no" ; then
9513 HAVE_FC=no
9514 else
9515 PKG_CONFIG_MIN_VERSION=0.9.0
9516 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig >= 2.2.0" >&5
9518$as_echo_n "checking for fontconfig >= 2.2.0... " >&6; }
8c5ff6dd 9519
eb697db5
DN
9520 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
9521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9522$as_echo "yes" >&6; }
9523 succeeded=yes
8c5ff6dd 9524
eb697db5
DN
9525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_CFLAGS" >&5
9526$as_echo_n "checking FONTCONFIG_CFLAGS... " >&6; }
9527 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_CFLAGS" >&5
9529$as_echo "$FONTCONFIG_CFLAGS" >&6; }
8c5ff6dd 9530
eb697db5
DN
9531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking FONTCONFIG_LIBS" >&5
9532$as_echo_n "checking FONTCONFIG_LIBS... " >&6; }
9533 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_LIBS" >&5
9535$as_echo "$FONTCONFIG_LIBS" >&6; }
9536 else
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
9539 FONTCONFIG_CFLAGS=""
9540 FONTCONFIG_LIBS=""
9541 ## If we have a custom action on failure, don't print errors, but
9542 ## do set a variable so people can do so.
9543 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
9544
9545 fi
9546
9547
9548
9549 else
9550 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9551 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9552 fi
9553 fi
9554
9555 if test $succeeded = yes; then
9556 HAVE_FC=yes
9557 else
9558 HAVE_FC=no
9559 fi
9560
9561
9562 ## Use -lXft if available, unless `--with-xft=no'.
9563 HAVE_XFT=maybe
9564 if test "${HAVE_FC}" = "no" || test "x${with_x}" = "xno"; then
9565 with_xft="no";
9566 fi
9567 if test "x${with_xft}" != "xno"; then
9568
9569
9570 succeeded=no
9571
9572 # Extract the first word of "pkg-config", so it can be a program name with args.
9573set dummy pkg-config; ac_word=$2
9574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9575$as_echo_n "checking for $ac_word... " >&6; }
9576if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
9577 $as_echo_n "(cached) " >&6
9578else
eb697db5
DN
9579 case $PKG_CONFIG in
9580 [\\/]* | ?:[\\/]*)
9581 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9582 ;;
9583 *)
9584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9585for as_dir in $PATH
9586do
9587 IFS=$as_save_IFS
9588 test -z "$as_dir" && as_dir=.
9589 for ac_exec_ext in '' $ac_executable_extensions; do
9590 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9591 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9593 break 2
9594 fi
9595done
9596 done
9597IFS=$as_save_IFS
9598
9599 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9600 ;;
9601esac
9602fi
9603PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9604if test -n "$PKG_CONFIG"; then
9605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9606$as_echo "$PKG_CONFIG" >&6; }
8c5ff6dd 9607else
eb697db5
DN
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
15e12598 9610fi
8c5ff6dd 9611
8c5ff6dd 9612
15e12598 9613
eb697db5
DN
9614 if test "$PKG_CONFIG" = "no" ; then
9615 HAVE_XFT=no
9616 else
9617 PKG_CONFIG_MIN_VERSION=0.9.0
9618 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xft >= 0.13.0" >&5
9620$as_echo_n "checking for xft >= 0.13.0... " >&6; }
9621
9622 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9624$as_echo "yes" >&6; }
9625 succeeded=yes
9626
9627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_CFLAGS" >&5
9628$as_echo_n "checking XFT_CFLAGS... " >&6; }
9629 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_CFLAGS" >&5
9631$as_echo "$XFT_CFLAGS" >&6; }
9632
9633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking XFT_LIBS" >&5
9634$as_echo_n "checking XFT_LIBS... " >&6; }
9635 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XFT_LIBS" >&5
9637$as_echo "$XFT_LIBS" >&6; }
9638 else
9639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9640$as_echo "no" >&6; }
9641 XFT_CFLAGS=""
9642 XFT_LIBS=""
9643 ## If we have a custom action on failure, don't print errors, but
9644 ## do set a variable so people can do so.
9645 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
8c5ff6dd 9646
eb697db5 9647 fi
8c5ff6dd 9648
5929fbe7
GM
9649
9650
eb697db5
DN
9651 else
9652 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9653 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9654 fi
9655 fi
5929fbe7 9656
eb697db5
DN
9657 if test $succeeded = yes; then
9658 :
9659 else
9660 HAVE_XFT=no
9661 fi
9662
9663 ## Because xftfont.c uses XRenderQueryExtension, we also
9664 ## need to link to -lXrender.
9665 HAVE_XRENDER=no
9666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XRenderQueryExtension in -lXrender" >&5
9667$as_echo_n "checking for XRenderQueryExtension in -lXrender... " >&6; }
9668if test "${ac_cv_lib_Xrender_XRenderQueryExtension+set}" = set; then :
e6df49e4
GM
9669 $as_echo_n "(cached) " >&6
9670else
eb697db5
DN
9671 ac_check_lib_save_LIBS=$LIBS
9672LIBS="-lXrender $LIBS"
9673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 9674/* end confdefs.h. */
eb697db5
DN
9675
9676/* Override any GCC internal prototype to avoid an error.
9677 Use char because int might match the return type of a GCC
9678 builtin and then its argument prototype would still apply. */
9679#ifdef __cplusplus
9680extern "C"
9681#endif
9682char XRenderQueryExtension ();
5929fbe7
GM
9683int
9684main ()
9685{
eb697db5 9686return XRenderQueryExtension ();
5929fbe7
GM
9687 ;
9688 return 0;
9689}
9690_ACEOF
eb697db5
DN
9691if ac_fn_c_try_link "$LINENO"; then :
9692 ac_cv_lib_Xrender_XRenderQueryExtension=yes
5929fbe7 9693else
eb697db5
DN
9694 ac_cv_lib_Xrender_XRenderQueryExtension=no
9695fi
9696rm -f core conftest.err conftest.$ac_objext \
9697 conftest$ac_exeext conftest.$ac_ext
9698LIBS=$ac_check_lib_save_LIBS
9699fi
9700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xrender_XRenderQueryExtension" >&5
9701$as_echo "$ac_cv_lib_Xrender_XRenderQueryExtension" >&6; }
9702if test "x$ac_cv_lib_Xrender_XRenderQueryExtension" = x""yes; then :
9703 HAVE_XRENDER=yes
5929fbe7
GM
9704fi
9705
eb697db5
DN
9706 if test "$HAVE_XFT" != no && test "$HAVE_XRENDER" != no; then
9707 OLD_CPPFLAGS="$CPPFLAGS"
9708 OLD_CFLAGS="$CFLAGS"
9709 OLD_LIBS="$LIBS"
9710 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
9711 CFLAGS="$CFLAGS $XFT_CFLAGS"
9712 XFT_LIBS="-lXrender $XFT_LIBS"
9713 LIBS="$XFT_LIBS $LIBS"
9714 ac_fn_c_check_header_mongrel "$LINENO" "X11/Xft/Xft.h" "ac_cv_header_X11_Xft_Xft_h" "$ac_includes_default"
9715if test "x$ac_cv_header_X11_Xft_Xft_h" = x""yes; then :
9716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XftFontOpen in -lXft" >&5
9717$as_echo_n "checking for XftFontOpen in -lXft... " >&6; }
9718if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then :
9719 $as_echo_n "(cached) " >&6
9720else
9721 ac_check_lib_save_LIBS=$LIBS
9722LIBS="-lXft $XFT_LIBS $LIBS"
9723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 9724/* end confdefs.h. */
eb697db5
DN
9725
9726/* Override any GCC internal prototype to avoid an error.
9727 Use char because int might match the return type of a GCC
9728 builtin and then its argument prototype would still apply. */
9729#ifdef __cplusplus
9730extern "C"
9731#endif
9732char XftFontOpen ();
e6df49e4
GM
9733int
9734main ()
8c5ff6dd 9735{
eb697db5 9736return XftFontOpen ();
8c5ff6dd
KR
9737 ;
9738 return 0;
9739}
9740_ACEOF
eb697db5
DN
9741if ac_fn_c_try_link "$LINENO"; then :
9742 ac_cv_lib_Xft_XftFontOpen=yes
e6df49e4 9743else
eb697db5 9744 ac_cv_lib_Xft_XftFontOpen=no
15e12598 9745fi
eb697db5
DN
9746rm -f core conftest.err conftest.$ac_objext \
9747 conftest$ac_exeext conftest.$ac_ext
9748LIBS=$ac_check_lib_save_LIBS
15e12598 9749fi
eb697db5
DN
9750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xft_XftFontOpen" >&5
9751$as_echo "$ac_cv_lib_Xft_XftFontOpen" >&6; }
9752if test "x$ac_cv_lib_Xft_XftFontOpen" = x""yes; then :
9753 HAVE_XFT=yes
15e12598 9754fi
91e84f96 9755
eb697db5 9756fi
8c5ff6dd 9757
5929fbe7
GM
9758
9759
eb697db5 9760 if test "${HAVE_XFT}" = "yes"; then
5929fbe7 9761
eb697db5 9762$as_echo "#define HAVE_XFT 1" >>confdefs.h
5929fbe7
GM
9763
9764
eb697db5
DN
9765 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
9766 else
9767 CPPFLAGS="$OLD_CPPFLAGS"
9768 CFLAGS="$OLD_CFLAGS"
9769 LIBS="$OLD_LIBS"
9770 fi # "${HAVE_XFT}" = "yes"
9771 fi # "$HAVE_XFT" != no
9772 fi # "x${with_xft}" != "xno"
5929fbe7 9773
eb697db5
DN
9774 if test "$HAVE_XFT" != "yes"; then
9775 HAVE_XFT=no
9776 fi
5929fbe7
GM
9777
9778
eb697db5
DN
9779 HAVE_FREETYPE=no
9780 ## We used to allow building with FreeType and without Xft.
9781 ## However, the ftx font backend driver is not in good shape.
9782 if test "${HAVE_XFT}" = "yes"; then
9783 HAVE_FREETYPE=yes
9784 FONTCONFIG_CFLAGS=
9785 FONTCONFIG_LIBS=
9786 fi
5929fbe7 9787
eb697db5
DN
9788 HAVE_LIBOTF=no
9789 if test "${HAVE_FREETYPE}" = "yes"; then
5929fbe7 9790
eb697db5 9791$as_echo "#define HAVE_FREETYPE 1" >>confdefs.h
5929fbe7 9792
eb697db5 9793 if test "${with_libotf}" != "no"; then
5929fbe7 9794
eb697db5 9795 succeeded=no
5929fbe7 9796
eb697db5
DN
9797 # Extract the first word of "pkg-config", so it can be a program name with args.
9798set dummy pkg-config; ac_word=$2
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9800$as_echo_n "checking for $ac_word... " >&6; }
9801if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
a4f64981
GM
9802 $as_echo_n "(cached) " >&6
9803else
eb697db5
DN
9804 case $PKG_CONFIG in
9805 [\\/]* | ?:[\\/]*)
9806 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9807 ;;
9808 *)
9809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9810for as_dir in $PATH
9811do
9812 IFS=$as_save_IFS
9813 test -z "$as_dir" && as_dir=.
9814 for ac_exec_ext in '' $ac_executable_extensions; do
9815 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9816 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9818 break 2
9819 fi
9820done
9821 done
9822IFS=$as_save_IFS
9823
9824 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9825 ;;
5929fbe7 9826esac
eb697db5
DN
9827fi
9828PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9829if test -n "$PKG_CONFIG"; then
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9831$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 9832else
eb697db5
DN
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9834$as_echo "no" >&6; }
5929fbe7
GM
9835fi
9836
5929fbe7 9837
91e84f96 9838
eb697db5
DN
9839 if test "$PKG_CONFIG" = "no" ; then
9840 HAVE_LIBOTF=no
9841 else
9842 PKG_CONFIG_MIN_VERSION=0.9.0
9843 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libotf" >&5
9845$as_echo_n "checking for libotf... " >&6; }
91e84f96 9846
eb697db5
DN
9847 if $PKG_CONFIG --exists "libotf" 2>&5; then
9848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9849$as_echo "yes" >&6; }
9850 succeeded=yes
91e84f96 9851
eb697db5
DN
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_CFLAGS" >&5
9853$as_echo_n "checking LIBOTF_CFLAGS... " >&6; }
9854 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_CFLAGS" >&5
9856$as_echo "$LIBOTF_CFLAGS" >&6; }
8c5ff6dd 9857
eb697db5
DN
9858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBOTF_LIBS" >&5
9859$as_echo_n "checking LIBOTF_LIBS... " >&6; }
9860 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBOTF_LIBS" >&5
9862$as_echo "$LIBOTF_LIBS" >&6; }
9863 else
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
9866 LIBOTF_CFLAGS=""
9867 LIBOTF_LIBS=""
9868 ## If we have a custom action on failure, don't print errors, but
9869 ## do set a variable so people can do so.
9870 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
5929fbe7 9871
eb697db5 9872 fi
15e12598 9873
15e12598
VB
9874
9875
eb697db5
DN
9876 else
9877 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
9878 echo "*** See http://www.freedesktop.org/software/pkgconfig"
9879 fi
9880 fi
8c5ff6dd 9881
eb697db5
DN
9882 if test $succeeded = yes; then
9883 HAVE_LIBOTF=yes
9884 else
9885 HAVE_LIBOTF=no
9886 fi
5929fbe7 9887
eb697db5 9888 if test "$HAVE_LIBOTF" = "yes"; then
5929fbe7 9889
eb697db5 9890$as_echo "#define HAVE_LIBOTF 1" >>confdefs.h
5929fbe7 9891
eb697db5
DN
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTF_get_variation_glyphs in -lotf" >&5
9893$as_echo_n "checking for OTF_get_variation_glyphs in -lotf... " >&6; }
9894if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then :
9895 $as_echo_n "(cached) " >&6
9896else
9897 ac_check_lib_save_LIBS=$LIBS
9898LIBS="-lotf $LIBS"
9899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9900/* end confdefs.h. */
91e84f96
GM
9901
9902/* Override any GCC internal prototype to avoid an error.
9903 Use char because int might match the return type of a GCC
9904 builtin and then its argument prototype would still apply. */
9905#ifdef __cplusplus
9906extern "C"
9907#endif
eb697db5 9908char OTF_get_variation_glyphs ();
91e84f96 9909int
49ebbd65
DN
9910main ()
9911{
eb697db5 9912return OTF_get_variation_glyphs ();
49ebbd65
DN
9913 ;
9914 return 0;
9915}
15e12598 9916_ACEOF
eb697db5
DN
9917if ac_fn_c_try_link "$LINENO"; then :
9918 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
a4f64981 9919else
eb697db5 9920 ac_cv_lib_otf_OTF_get_variation_glyphs=no
8c5ff6dd 9921fi
eb697db5
DN
9922rm -f core conftest.err conftest.$ac_objext \
9923 conftest$ac_exeext conftest.$ac_ext
9924LIBS=$ac_check_lib_save_LIBS
5929fbe7 9925fi
eb697db5
DN
9926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
9927$as_echo "$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
9928if test "x$ac_cv_lib_otf_OTF_get_variation_glyphs" = x""yes; then :
9929 HAVE_OTF_GET_VARIATION_GLYPHS=yes
5929fbe7 9930else
eb697db5 9931 HAVE_OTF_GET_VARIATION_GLYPHS=no
5929fbe7 9932fi
8c5ff6dd 9933
eb697db5 9934 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
5929fbe7 9935
eb697db5 9936$as_echo "#define HAVE_OTF_GET_VARIATION_GLYPHS 1" >>confdefs.h
a4f64981 9937
eb697db5
DN
9938 fi
9939 fi
9940 fi
9941 fi
a4f64981 9942
eb697db5
DN
9943 HAVE_M17N_FLT=no
9944 if test "${HAVE_LIBOTF}" = yes; then
9945 if test "${with_m17n_flt}" != "no"; then
a4f64981 9946
eb697db5 9947 succeeded=no
a4f64981 9948
eb697db5
DN
9949 # Extract the first word of "pkg-config", so it can be a program name with args.
9950set dummy pkg-config; ac_word=$2
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9952$as_echo_n "checking for $ac_word... " >&6; }
9953if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
5929fbe7
GM
9954 $as_echo_n "(cached) " >&6
9955else
eb697db5
DN
9956 case $PKG_CONFIG in
9957 [\\/]* | ?:[\\/]*)
9958 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9959 ;;
9960 *)
9961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962for as_dir in $PATH
9963do
9964 IFS=$as_save_IFS
9965 test -z "$as_dir" && as_dir=.
9966 for ac_exec_ext in '' $ac_executable_extensions; do
9967 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9968 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970 break 2
9971 fi
9972done
9973 done
9974IFS=$as_save_IFS
5929fbe7 9975
eb697db5
DN
9976 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
9977 ;;
5929fbe7 9978esac
5929fbe7 9979fi
eb697db5
DN
9980PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9981if test -n "$PKG_CONFIG"; then
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9983$as_echo "$PKG_CONFIG" >&6; }
5929fbe7 9984else
eb697db5
DN
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9986$as_echo "no" >&6; }
8c5ff6dd
KR
9987fi
9988
5929fbe7 9989
5929fbe7 9990
eb697db5
DN
9991 if test "$PKG_CONFIG" = "no" ; then
9992 HAVE_M17N_FLT=no
9993 else
9994 PKG_CONFIG_MIN_VERSION=0.9.0
9995 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for m17n-flt" >&5
9997$as_echo_n "checking for m17n-flt... " >&6; }
9998
9999 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10001$as_echo "yes" >&6; }
10002 succeeded=yes
10003
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_CFLAGS" >&5
10005$as_echo_n "checking M17N_FLT_CFLAGS... " >&6; }
10006 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_CFLAGS" >&5
10008$as_echo "$M17N_FLT_CFLAGS" >&6; }
10009
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking M17N_FLT_LIBS" >&5
10011$as_echo_n "checking M17N_FLT_LIBS... " >&6; }
10012 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
10013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M17N_FLT_LIBS" >&5
10014$as_echo "$M17N_FLT_LIBS" >&6; }
10015 else
10016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018 M17N_FLT_CFLAGS=""
10019 M17N_FLT_LIBS=""
10020 ## If we have a custom action on failure, don't print errors, but
10021 ## do set a variable so people can do so.
10022 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
10023
10024 fi
10025
5929fbe7 10026
15e12598 10027
eb697db5
DN
10028 else
10029 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10030 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10031 fi
10032 fi
15e12598 10033
eb697db5
DN
10034 if test $succeeded = yes; then
10035 HAVE_M17N_FLT=yes
10036 else
10037 HAVE_M17N_FLT=no
5929fbe7 10038 fi
15e12598 10039
eb697db5 10040 if test "$HAVE_M17N_FLT" = "yes"; then
5929fbe7 10041
eb697db5 10042$as_echo "#define HAVE_M17N_FLT 1" >>confdefs.h
5929fbe7 10043
eb697db5
DN
10044 fi
10045 fi
10046 fi
10047else
10048 HAVE_XFT=no
10049 HAVE_FREETYPE=no
10050 HAVE_LIBOTF=no
10051 HAVE_M17N_FLT=no
10052fi
5929fbe7 10053
eb697db5 10054### End of font-backend (under X11) section.
5929fbe7 10055
5929fbe7 10056
5929fbe7
GM
10057
10058
10059
5929fbe7 10060
5929fbe7
GM
10061
10062
10063
10064
eb697db5
DN
10065### Use -lXpm if available, unless `--with-xpm=no'.
10066HAVE_XPM=no
10067LIBXPM=
10068if test "${HAVE_X11}" = "yes"; then
10069 if test "${with_xpm}" != "no"; then
10070 ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default"
10071if test "x$ac_cv_header_X11_xpm_h" = x""yes; then :
10072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReadFileToPixmap in -lXpm" >&5
10073$as_echo_n "checking for XpmReadFileToPixmap in -lXpm... " >&6; }
10074if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then :
8c5ff6dd
KR
10075 $as_echo_n "(cached) " >&6
10076else
eb697db5
DN
10077 ac_check_lib_save_LIBS=$LIBS
10078LIBS="-lXpm -lX11 $LIBS"
10079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10080/* end confdefs.h. */
eb697db5
DN
10081
10082/* Override any GCC internal prototype to avoid an error.
10083 Use char because int might match the return type of a GCC
10084 builtin and then its argument prototype would still apply. */
10085#ifdef __cplusplus
10086extern "C"
10087#endif
10088char XpmReadFileToPixmap ();
7186fb09
GM
10089int
10090main ()
10091{
eb697db5 10092return XpmReadFileToPixmap ();
a4f64981
GM
10093 ;
10094 return 0;
7186fb09 10095}
0c309b80 10096_ACEOF
eb697db5
DN
10097if ac_fn_c_try_link "$LINENO"; then :
10098 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
aaa36002 10099else
eb697db5
DN
10100 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
10101fi
10102rm -f core conftest.err conftest.$ac_objext \
10103 conftest$ac_exeext conftest.$ac_ext
10104LIBS=$ac_check_lib_save_LIBS
10105fi
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
10107$as_echo "$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
10108if test "x$ac_cv_lib_Xpm_XpmReadFileToPixmap" = x""yes; then :
10109 HAVE_XPM=yes
10110fi
5929fbe7 10111
8c5ff6dd 10112fi
5929fbe7 10113
5929fbe7 10114
eb697db5
DN
10115 if test "${HAVE_XPM}" = "yes"; then
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmReturnAllocPixels preprocessor define" >&5
10117$as_echo_n "checking for XpmReturnAllocPixels preprocessor define... " >&6; }
10118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10119/* end confdefs.h. */
10120#include "X11/xpm.h"
10121#ifndef XpmReturnAllocPixels
10122no_return_alloc_pixels
10123#endif
8c5ff6dd 10124
5929fbe7 10125_ACEOF
eb697db5
DN
10126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10127 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then :
10128 HAVE_XPM=no
10129else
10130 HAVE_XPM=yes
15e12598 10131fi
eb697db5 10132rm -f conftest*
8c5ff6dd 10133
5929fbe7 10134
eb697db5
DN
10135 if test "${HAVE_XPM}" = "yes"; then
10136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10137$as_echo "yes" >&6; }
10138 else
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141 fi
10142 fi
10143 fi
5929fbe7 10144
eb697db5 10145 if test "${HAVE_XPM}" = "yes"; then
5929fbe7 10146
eb697db5 10147$as_echo "#define HAVE_XPM 1" >>confdefs.h
5929fbe7 10148
eb697db5
DN
10149 LIBXPM=-lXpm
10150 fi
10151fi
5929fbe7 10152
eb697db5
DN
10153
10154### Use -ljpeg if available, unless `--with-jpeg=no'.
10155HAVE_JPEG=no
10156LIBJPEG=
10157if test "${HAVE_X11}" = "yes"; then
10158 if test "${with_jpeg}" != "no"; then
10159 ac_fn_c_check_header_mongrel "$LINENO" "jerror.h" "ac_cv_header_jerror_h" "$ac_includes_default"
10160if test "x$ac_cv_header_jerror_h" = x""yes; then :
10161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
10162$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
10163if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then :
10164 $as_echo_n "(cached) " >&6
10165else
10166 ac_check_lib_save_LIBS=$LIBS
10167LIBS="-ljpeg $LIBS"
10168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10169/* end confdefs.h. */
5929fbe7
GM
10170
10171/* Override any GCC internal prototype to avoid an error.
10172 Use char because int might match the return type of a GCC
10173 builtin and then its argument prototype would still apply. */
10174#ifdef __cplusplus
10175extern "C"
10176#endif
eb697db5 10177char jpeg_destroy_compress ();
08b47d3d
JD
10178int
10179main ()
10180{
eb697db5 10181return jpeg_destroy_compress ();
08b47d3d
JD
10182 ;
10183 return 0;
10184}
7186fb09 10185_ACEOF
eb697db5
DN
10186if ac_fn_c_try_link "$LINENO"; then :
10187 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
cd03c74a 10188else
eb697db5
DN
10189 ac_cv_lib_jpeg_jpeg_destroy_compress=no
10190fi
10191rm -f core conftest.err conftest.$ac_objext \
10192 conftest$ac_exeext conftest.$ac_ext
10193LIBS=$ac_check_lib_save_LIBS
10194fi
10195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
10196$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
10197if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = x""yes; then :
10198 HAVE_JPEG=yes
10199fi
10200
10201fi
10202
10203
10204 fi
10205
10206 if test "${HAVE_JPEG}" = "yes"; then
10207 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
10208
10209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10210/* end confdefs.h. */
10211#include <jpeglib.h>
10212 version=JPEG_LIB_VERSION
10213
10214_ACEOF
10215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10216 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then :
10217 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
8c5ff6dd 10218
eb697db5
DN
10219else
10220 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libjpeg found, but not version 6b or later" >&5
10221$as_echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
10222 HAVE_JPEG=no
5929fbe7 10223fi
eb697db5 10224rm -f conftest*
8c5ff6dd 10225
eb697db5
DN
10226 fi
10227 if test "${HAVE_JPEG}" = "yes"; then
10228 LIBJPEG=-ljpeg
10229 fi
5929fbe7 10230fi
eb697db5
DN
10231
10232
10233### Use -lpng if available, unless `--with-png=no'.
10234HAVE_PNG=no
10235LIBPNG=
10236if test "${HAVE_X11}" = "yes"; then
10237 if test "${with_png}" != "no"; then
10238 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
10239 # in /usr/include/libpng.
10240 for ac_header in png.h libpng/png.h
10241do :
10242 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
10243ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
10244eval as_val=\$$as_ac_Header
10245 if test "x$as_val" = x""yes; then :
5929fbe7 10246 cat >>confdefs.h <<_ACEOF
eb697db5 10247#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5929fbe7 10248_ACEOF
8c5ff6dd 10249
eb697db5
DN
10250fi
10251
10252done
10253
10254 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
10255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_get_channels in -lpng" >&5
10256$as_echo_n "checking for png_get_channels in -lpng... " >&6; }
10257if test "${ac_cv_lib_png_png_get_channels+set}" = set; then :
a5edbe4a
GM
10258 $as_echo_n "(cached) " >&6
10259else
5929fbe7 10260 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10261LIBS="-lpng -lz -lm $LIBS"
10262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10263/* end confdefs.h. */
8c5ff6dd 10264
5929fbe7
GM
10265/* Override any GCC internal prototype to avoid an error.
10266 Use char because int might match the return type of a GCC
10267 builtin and then its argument prototype would still apply. */
10268#ifdef __cplusplus
10269extern "C"
10270#endif
eb697db5 10271char png_get_channels ();
5929fbe7
GM
10272int
10273main ()
10274{
eb697db5 10275return png_get_channels ();
5929fbe7
GM
10276 ;
10277 return 0;
10278}
8c5ff6dd 10279_ACEOF
eb697db5
DN
10280if ac_fn_c_try_link "$LINENO"; then :
10281 ac_cv_lib_png_png_get_channels=yes
8c5ff6dd 10282else
eb697db5
DN
10283 ac_cv_lib_png_png_get_channels=no
10284fi
10285rm -f core conftest.err conftest.$ac_objext \
10286 conftest$ac_exeext conftest.$ac_ext
10287LIBS=$ac_check_lib_save_LIBS
10288fi
10289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_get_channels" >&5
10290$as_echo "$ac_cv_lib_png_png_get_channels" >&6; }
10291if test "x$ac_cv_lib_png_png_get_channels" = x""yes; then :
10292 HAVE_PNG=yes
8c5ff6dd 10293fi
5929fbe7 10294
eb697db5
DN
10295 fi
10296 fi
10297
10298 if test "${HAVE_PNG}" = "yes"; then
8c5ff6dd 10299
eb697db5 10300$as_echo "#define HAVE_PNG 1" >>confdefs.h
8c5ff6dd 10301
eb697db5
DN
10302 LIBPNG="-lpng -lz -lm"
10303 fi
8c5ff6dd
KR
10304fi
10305
5929fbe7 10306
eb697db5
DN
10307### Use -ltiff if available, unless `--with-tiff=no'.
10308HAVE_TIFF=no
10309LIBTIFF=
10310if test "${HAVE_X11}" = "yes"; then
10311 if test "${with_tiff}" != "no"; then
10312 ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
10313if test "x$ac_cv_header_tiffio_h" = x""yes; then :
10314 tifflibs="-lz -lm"
10315 # At least one tiff package requires the jpeg library.
10316 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFGetVersion in -ltiff" >&5
10318$as_echo_n "checking for TIFFGetVersion in -ltiff... " >&6; }
10319if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then :
8c5ff6dd
KR
10320 $as_echo_n "(cached) " >&6
10321else
eb697db5
DN
10322 ac_check_lib_save_LIBS=$LIBS
10323LIBS="-ltiff $tifflibs $LIBS"
10324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a5edbe4a 10325/* end confdefs.h. */
5929fbe7
GM
10326
10327/* Override any GCC internal prototype to avoid an error.
10328 Use char because int might match the return type of a GCC
10329 builtin and then its argument prototype would still apply. */
10330#ifdef __cplusplus
10331extern "C"
10332#endif
eb697db5 10333char TIFFGetVersion ();
a5edbe4a
GM
10334int
10335main ()
10336{
eb697db5 10337return TIFFGetVersion ();
5929fbe7
GM
10338 ;
10339 return 0;
a5edbe4a 10340}
08b47d3d 10341_ACEOF
eb697db5
DN
10342if ac_fn_c_try_link "$LINENO"; then :
10343 ac_cv_lib_tiff_TIFFGetVersion=yes
49ebbd65 10344else
eb697db5 10345 ac_cv_lib_tiff_TIFFGetVersion=no
8c5ff6dd 10346fi
eb697db5
DN
10347rm -f core conftest.err conftest.$ac_objext \
10348 conftest$ac_exeext conftest.$ac_ext
10349LIBS=$ac_check_lib_save_LIBS
10350fi
10351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
10352$as_echo "$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
10353if test "x$ac_cv_lib_tiff_TIFFGetVersion" = x""yes; then :
10354 HAVE_TIFF=yes
49ebbd65 10355fi
8c5ff6dd 10356
49ebbd65 10357fi
8c5ff6dd
KR
10358
10359
eb697db5 10360 fi
8c5ff6dd 10361
eb697db5 10362 if test "${HAVE_TIFF}" = "yes"; then
5929fbe7 10363
eb697db5
DN
10364$as_echo "#define HAVE_TIFF 1" >>confdefs.h
10365
10366 LIBTIFF=-ltiff
10367 fi
10368fi
5929fbe7 10369
5929fbe7 10370
eb697db5
DN
10371### Use -lgif or -lungif if available, unless `--with-gif=no'.
10372HAVE_GIF=no
10373LIBGIF=
10374if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
10375 ac_fn_c_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
10376if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
10377 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
10378# Earlier versions can crash Emacs.
10379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lgif" >&5
10380$as_echo_n "checking for EGifPutExtensionLast in -lgif... " >&6; }
10381if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then :
10382 $as_echo_n "(cached) " >&6
10383else
10384 ac_check_lib_save_LIBS=$LIBS
10385LIBS="-lgif $LIBS"
10386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10387/* end confdefs.h. */
cd03c74a 10388
e6df49e4
GM
10389/* Override any GCC internal prototype to avoid an error.
10390 Use char because int might match the return type of a GCC
10391 builtin and then its argument prototype would still apply. */
10392#ifdef __cplusplus
10393extern "C"
10394#endif
eb697db5 10395char EGifPutExtensionLast ();
e6df49e4
GM
10396int
10397main ()
10398{
eb697db5 10399return EGifPutExtensionLast ();
e6df49e4
GM
10400 ;
10401 return 0;
10402}
a5edbe4a 10403_ACEOF
eb697db5
DN
10404if ac_fn_c_try_link "$LINENO"; then :
10405 ac_cv_lib_gif_EGifPutExtensionLast=yes
15e12598 10406else
eb697db5 10407 ac_cv_lib_gif_EGifPutExtensionLast=no
15e12598 10408fi
eb697db5
DN
10409rm -f core conftest.err conftest.$ac_objext \
10410 conftest$ac_exeext conftest.$ac_ext
10411LIBS=$ac_check_lib_save_LIBS
10412fi
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
10414$as_echo "$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
10415if test "x$ac_cv_lib_gif_EGifPutExtensionLast" = x""yes; then :
10416 HAVE_GIF=yes
10417else
10418 HAVE_GIF=maybe
15e12598 10419fi
15e12598 10420
8c5ff6dd 10421fi
49ebbd65 10422
49ebbd65 10423
eb697db5
DN
10424
10425 if test "$HAVE_GIF" = yes; then
10426 LIBGIF=-lgif
10427 elif test "$HAVE_GIF" = maybe; then
10428# If gif_lib.h but no libgif, try libungif.
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGifPutExtensionLast in -lungif" >&5
10430$as_echo_n "checking for EGifPutExtensionLast in -lungif... " >&6; }
10431if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then :
8c5ff6dd
KR
10432 $as_echo_n "(cached) " >&6
10433else
eb697db5
DN
10434 ac_check_lib_save_LIBS=$LIBS
10435LIBS="-lungif $LIBS"
10436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10437/* end confdefs.h. */
15e12598 10438
a4f64981
GM
10439/* Override any GCC internal prototype to avoid an error.
10440 Use char because int might match the return type of a GCC
10441 builtin and then its argument prototype would still apply. */
10442#ifdef __cplusplus
10443extern "C"
10444#endif
eb697db5 10445char EGifPutExtensionLast ();
a4f64981
GM
10446int
10447main ()
10448{
eb697db5 10449return EGifPutExtensionLast ();
a4f64981
GM
10450 ;
10451 return 0;
10452}
e6df49e4 10453_ACEOF
eb697db5
DN
10454if ac_fn_c_try_link "$LINENO"; then :
10455 ac_cv_lib_ungif_EGifPutExtensionLast=yes
a4f64981 10456else
eb697db5 10457 ac_cv_lib_ungif_EGifPutExtensionLast=no
e6df49e4 10458fi
eb697db5
DN
10459rm -f core conftest.err conftest.$ac_objext \
10460 conftest$ac_exeext conftest.$ac_ext
10461LIBS=$ac_check_lib_save_LIBS
a4f64981 10462fi
eb697db5
DN
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
10464$as_echo "$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
10465if test "x$ac_cv_lib_ungif_EGifPutExtensionLast" = x""yes; then :
10466 HAVE_GIF=yes
e6df49e4 10467else
eb697db5 10468 HAVE_GIF=no
5929fbe7 10469fi
8c5ff6dd 10470
eb697db5
DN
10471 test "$HAVE_GIF" = yes && LIBGIF=-lungif
10472 fi
5929fbe7 10473
eb697db5 10474 if test "${HAVE_GIF}" = "yes"; then
5929fbe7 10475
eb697db5 10476$as_echo "#define HAVE_GIF 1" >>confdefs.h
5929fbe7 10477
eb697db5
DN
10478 fi
10479fi
5929fbe7 10480
5929fbe7 10481
eb697db5
DN
10482if test "${HAVE_X11}" = "yes"; then
10483 MISSING=""
10484 WITH_NO=""
10485 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
10486 MISSING="libXpm" && WITH_NO="--with-xpm=no"
10487 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
10488 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
10489 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
10490 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
10491 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
10492 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
10493 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
10494 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
10495
10496 if test "X${MISSING}" != X; then
10497 as_fn_error "The following required libraries were not found:
10498 $MISSING
10499Maybe some development libraries/packages are missing?
10500If you don't want to link with them give
10501 $WITH_NO
10502as options to configure" "$LINENO" 5
10503 fi
10504fi
5929fbe7 10505
eb697db5
DN
10506### Use -lgpm if available, unless `--with-gpm=no'.
10507HAVE_GPM=no
10508LIBGPM=
10509MOUSE_SUPPORT=
10510if test "${with_gpm}" != "no"; then
10511 ac_fn_c_check_header_mongrel "$LINENO" "gpm.h" "ac_cv_header_gpm_h" "$ac_includes_default"
10512if test "x$ac_cv_header_gpm_h" = x""yes; then :
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Gpm_Open in -lgpm" >&5
10514$as_echo_n "checking for Gpm_Open in -lgpm... " >&6; }
10515if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then :
a4f64981 10516 $as_echo_n "(cached) " >&6
15e12598 10517else
eb697db5
DN
10518 ac_check_lib_save_LIBS=$LIBS
10519LIBS="-lgpm $LIBS"
10520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
e6df49e4 10521/* end confdefs.h. */
eb697db5
DN
10522
10523/* Override any GCC internal prototype to avoid an error.
10524 Use char because int might match the return type of a GCC
10525 builtin and then its argument prototype would still apply. */
10526#ifdef __cplusplus
10527extern "C"
10528#endif
10529char Gpm_Open ();
a4f64981
GM
10530int
10531main ()
15e12598 10532{
eb697db5 10533return Gpm_Open ();
a4f64981
GM
10534 ;
10535 return 0;
15e12598 10536}
a4f64981 10537_ACEOF
eb697db5
DN
10538if ac_fn_c_try_link "$LINENO"; then :
10539 ac_cv_lib_gpm_Gpm_Open=yes
a4f64981 10540else
eb697db5
DN
10541 ac_cv_lib_gpm_Gpm_Open=no
10542fi
10543rm -f core conftest.err conftest.$ac_objext \
10544 conftest$ac_exeext conftest.$ac_ext
10545LIBS=$ac_check_lib_save_LIBS
10546fi
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10548$as_echo "$ac_cv_lib_gpm_Gpm_Open" >&6; }
10549if test "x$ac_cv_lib_gpm_Gpm_Open" = x""yes; then :
10550 HAVE_GPM=yes
10551fi
5929fbe7 10552
a4f64981 10553fi
5929fbe7 10554
eb697db5
DN
10555
10556
10557 if test "${HAVE_GPM}" = "yes"; then
10558
10559$as_echo "#define HAVE_GPM 1" >>confdefs.h
10560
10561 LIBGPM=-lgpm
10562 ## May be reset below.
10563 MOUSE_SUPPORT="\$(GPM_MOUSE_SUPPORT)"
10564 fi
a4f64981 10565fi
15e12598 10566
8c5ff6dd 10567
eb697db5
DN
10568ac_fn_c_check_header_mongrel "$LINENO" "malloc/malloc.h" "ac_cv_header_malloc_malloc_h" "$ac_includes_default"
10569if test "x$ac_cv_header_malloc_malloc_h" = x""yes; then :
8c5ff6dd 10570
eb697db5 10571$as_echo "#define HAVE_MALLOC_MALLOC_H 1" >>confdefs.h
8c5ff6dd 10572
eb697db5 10573fi
298b8a34 10574
15e12598 10575
15e12598 10576
eb697db5
DN
10577C_SWITCH_X_SYSTEM=
10578### Use NeXTstep API to implement GUI.
10579if test "${HAVE_NS}" = "yes"; then
8c5ff6dd 10580
eb697db5 10581$as_echo "#define HAVE_NS 1" >>confdefs.h
8c5ff6dd 10582
eb697db5 10583 if test "${NS_IMPL_COCOA}" = "yes"; then
5929fbe7 10584
eb697db5 10585$as_echo "#define NS_IMPL_COCOA 1" >>confdefs.h
8c5ff6dd 10586
eb697db5
DN
10587 GNU_OBJC_CFLAGS=
10588 fi
10589 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
8c5ff6dd 10590
eb697db5 10591$as_echo "#define NS_IMPL_GNUSTEP 1" >>confdefs.h
8c5ff6dd 10592
eb697db5
DN
10593 # See also .m.o rule in Makefile.in */
10594 # FIXME: are all these flags really needed? Document here why. */
10595 C_SWITCH_X_SYSTEM="-D_REENTRANT -fPIC -fno-strict-aliasing"
10596 GNU_OBJC_CFLAGS="-fgnu-runtime -Wno-import -fconstant-string-class=NSConstantString -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN -DGSDIAGNOSE"
10597 fi
10598 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
8c5ff6dd 10599
eb697db5 10600$as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
8c5ff6dd 10601
eb697db5
DN
10602 fi
10603 # We also have mouse menus.
10604 HAVE_MENUS=yes
10605 OTHER_FILES=ns-app
10606fi
8c5ff6dd 10607
8c5ff6dd 10608
eb697db5
DN
10609### Use session management (-lSM -lICE) if available
10610HAVE_X_SM=no
10611LIBXSM=
10612if test "${HAVE_X11}" = "yes"; then
10613 ac_fn_c_check_header_mongrel "$LINENO" "X11/SM/SMlib.h" "ac_cv_header_X11_SM_SMlib_h" "$ac_includes_default"
10614if test "x$ac_cv_header_X11_SM_SMlib_h" = x""yes; then :
10615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SmcOpenConnection in -lSM" >&5
10616$as_echo_n "checking for SmcOpenConnection in -lSM... " >&6; }
10617if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then :
10618 $as_echo_n "(cached) " >&6
10619else
10620 ac_check_lib_save_LIBS=$LIBS
10621LIBS="-lSM -lICE $LIBS"
10622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10623/* end confdefs.h. */
eb697db5
DN
10624
10625/* Override any GCC internal prototype to avoid an error.
10626 Use char because int might match the return type of a GCC
10627 builtin and then its argument prototype would still apply. */
10628#ifdef __cplusplus
10629extern "C"
10630#endif
10631char SmcOpenConnection ();
5929fbe7
GM
10632int
10633main ()
10634{
eb697db5 10635return SmcOpenConnection ();
5929fbe7
GM
10636 ;
10637 return 0;
10638}
10639_ACEOF
eb697db5
DN
10640if ac_fn_c_try_link "$LINENO"; then :
10641 ac_cv_lib_SM_SmcOpenConnection=yes
5929fbe7 10642else
eb697db5
DN
10643 ac_cv_lib_SM_SmcOpenConnection=no
10644fi
10645rm -f core conftest.err conftest.$ac_objext \
10646 conftest$ac_exeext conftest.$ac_ext
10647LIBS=$ac_check_lib_save_LIBS
10648fi
10649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
10650$as_echo "$ac_cv_lib_SM_SmcOpenConnection" >&6; }
10651if test "x$ac_cv_lib_SM_SmcOpenConnection" = x""yes; then :
10652 HAVE_X_SM=yes
10653fi
8c5ff6dd 10654
5929fbe7 10655fi
8c5ff6dd 10656
eb697db5
DN
10657
10658
10659 if test "${HAVE_X_SM}" = "yes"; then
10660
10661$as_echo "#define HAVE_X_SM 1" >>confdefs.h
10662
10663 LIBXSM="-lSM -lICE"
10664 case "$LIBS" in
10665 *-lSM*) ;;
10666 *) LIBS="$LIBXSM $LIBS" ;;
10667 esac
10668 fi
10669fi
10670
10671
10672# If netdb.h doesn't declare h_errno, we must declare it by hand.
10673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether netdb declares h_errno" >&5
10674$as_echo_n "checking whether netdb declares h_errno... " >&6; }
10675if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then :
10676 $as_echo_n "(cached) " >&6
10677else
10678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10679/* end confdefs.h. */
eb697db5 10680#include <netdb.h>
5929fbe7
GM
10681int
10682main ()
10683{
eb697db5 10684return h_errno;
5929fbe7
GM
10685 ;
10686 return 0;
10687}
10688_ACEOF
eb697db5
DN
10689if ac_fn_c_try_link "$LINENO"; then :
10690 emacs_cv_netdb_declares_h_errno=yes
5929fbe7 10691else
eb697db5 10692 emacs_cv_netdb_declares_h_errno=no
5929fbe7 10693fi
eb697db5
DN
10694rm -f core conftest.err conftest.$ac_objext \
10695 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 10696fi
eb697db5
DN
10697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_netdb_declares_h_errno" >&5
10698$as_echo "$emacs_cv_netdb_declares_h_errno" >&6; }
10699if test $emacs_cv_netdb_declares_h_errno = yes; then
8c5ff6dd 10700
eb697db5 10701$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
8c5ff6dd
KR
10702
10703fi
10704
eb697db5
DN
10705# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10706# for constant arguments. Useless!
10707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
10708$as_echo_n "checking for working alloca.h... " >&6; }
10709if test "${ac_cv_working_alloca_h+set}" = set; then :
5929fbe7
GM
10710 $as_echo_n "(cached) " >&6
10711else
eb697db5 10712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10713/* end confdefs.h. */
eb697db5
DN
10714#include <alloca.h>
10715int
10716main ()
10717{
10718char *p = (char *) alloca (2 * sizeof (int));
10719 if (p) return 0;
10720 ;
10721 return 0;
10722}
10723_ACEOF
10724if ac_fn_c_try_link "$LINENO"; then :
10725 ac_cv_working_alloca_h=yes
10726else
10727 ac_cv_working_alloca_h=no
10728fi
10729rm -f core conftest.err conftest.$ac_objext \
10730 conftest$ac_exeext conftest.$ac_ext
10731fi
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
10733$as_echo "$ac_cv_working_alloca_h" >&6; }
10734if test $ac_cv_working_alloca_h = yes; then
10735
10736$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
10737
10738fi
10739
10740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
10741$as_echo_n "checking for alloca... " >&6; }
10742if test "${ac_cv_func_alloca_works+set}" = set; then :
10743 $as_echo_n "(cached) " >&6
10744else
10745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10746/* end confdefs.h. */
10747#ifdef __GNUC__
10748# define alloca __builtin_alloca
10749#else
10750# ifdef _MSC_VER
10751# include <malloc.h>
10752# define alloca _alloca
10753# else
10754# ifdef HAVE_ALLOCA_H
10755# include <alloca.h>
10756# else
10757# ifdef _AIX
10758 #pragma alloca
10759# else
10760# ifndef alloca /* predefined by HP cc +Olibcalls */
10761char *alloca ();
10762# endif
10763# endif
10764# endif
10765# endif
5929fbe7 10766#endif
8c5ff6dd 10767
5929fbe7
GM
10768int
10769main ()
10770{
eb697db5
DN
10771char *p = (char *) alloca (1);
10772 if (p) return 0;
5929fbe7
GM
10773 ;
10774 return 0;
10775}
8c5ff6dd 10776_ACEOF
eb697db5
DN
10777if ac_fn_c_try_link "$LINENO"; then :
10778 ac_cv_func_alloca_works=yes
5929fbe7 10779else
eb697db5 10780 ac_cv_func_alloca_works=no
8c5ff6dd 10781fi
eb697db5
DN
10782rm -f core conftest.err conftest.$ac_objext \
10783 conftest$ac_exeext conftest.$ac_ext
5929fbe7 10784fi
eb697db5
DN
10785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
10786$as_echo "$ac_cv_func_alloca_works" >&6; }
10787
10788if test $ac_cv_func_alloca_works = yes; then
10789
10790$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
10791
8c5ff6dd 10792else
eb697db5
DN
10793 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10794# that cause trouble. Some versions do not even contain alloca or
10795# contain a buggy version. If you still want to use their alloca,
10796# use ar to extract alloca.o from them instead of compiling alloca.c.
10797
10798ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
10799
10800$as_echo "#define C_ALLOCA 1" >>confdefs.h
10801
10802
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
10804$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
10805if test "${ac_cv_os_cray+set}" = set; then :
5929fbe7 10806 $as_echo_n "(cached) " >&6
8c5ff6dd 10807else
eb697db5 10808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 10809/* end confdefs.h. */
eb697db5
DN
10810#if defined CRAY && ! defined CRAY2
10811webecray
8c5ff6dd 10812#else
eb697db5 10813wenotbecray
8c5ff6dd
KR
10814#endif
10815
eb697db5
DN
10816_ACEOF
10817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10818 $EGREP "webecray" >/dev/null 2>&1; then :
10819 ac_cv_os_cray=yes
10820else
10821 ac_cv_os_cray=no
10822fi
10823rm -f conftest*
8c5ff6dd 10824
eb697db5
DN
10825fi
10826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
10827$as_echo "$ac_cv_os_cray" >&6; }
10828if test $ac_cv_os_cray = yes; then
10829 for ac_func in _getb67 GETB67 getb67; do
10830 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10831ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10832eval as_val=\$$as_ac_var
10833 if test "x$as_val" = x""yes; then :
15e12598 10834
eb697db5
DN
10835cat >>confdefs.h <<_ACEOF
10836#define CRAY_STACKSEG_END $ac_func
5929fbe7 10837_ACEOF
15e12598 10838
eb697db5 10839 break
5929fbe7 10840fi
15e12598 10841
eb697db5 10842 done
5929fbe7 10843fi
eb697db5
DN
10844
10845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
10846$as_echo_n "checking stack direction for C alloca... " >&6; }
10847if test "${ac_cv_c_stack_direction+set}" = set; then :
5929fbe7
GM
10848 $as_echo_n "(cached) " >&6
10849else
eb697db5
DN
10850 if test "$cross_compiling" = yes; then :
10851 ac_cv_c_stack_direction=0
10852else
10853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10854/* end confdefs.h. */
eb697db5
DN
10855$ac_includes_default
10856int
10857find_stack_direction ()
10858{
10859 static char *addr = 0;
10860 auto char dummy;
10861 if (addr == 0)
10862 {
10863 addr = &dummy;
10864 return find_stack_direction ();
10865 }
10866 else
10867 return (&dummy > addr) ? 1 : -1;
10868}
15e12598 10869
5929fbe7
GM
10870int
10871main ()
a4f64981 10872{
eb697db5 10873 return find_stack_direction () < 0;
7186fb09 10874}
5929fbe7 10875_ACEOF
eb697db5
DN
10876if ac_fn_c_try_run "$LINENO"; then :
10877 ac_cv_c_stack_direction=1
5929fbe7 10878else
eb697db5
DN
10879 ac_cv_c_stack_direction=-1
10880fi
10881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10882 conftest.$ac_objext conftest.beam conftest.$ac_ext
10883fi
49ebbd65 10884
5929fbe7 10885fi
eb697db5
DN
10886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
10887$as_echo "$ac_cv_c_stack_direction" >&6; }
10888cat >>confdefs.h <<_ACEOF
10889#define STACK_DIRECTION $ac_cv_c_stack_direction
10890_ACEOF
10891
15e12598 10892
5929fbe7 10893fi
eb697db5
DN
10894
10895
10896if test x"$ac_cv_func_alloca_works" != xyes; then
10897 as_fn_error "a system implementation of alloca is required " "$LINENO" 5
10898fi
10899
10900# fmod, logb, and frexp are found in -lm on most systems.
10901# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
10902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
10903$as_echo_n "checking for sqrt in -lm... " >&6; }
10904if test "${ac_cv_lib_m_sqrt+set}" = set; then :
5929fbe7
GM
10905 $as_echo_n "(cached) " >&6
10906else
10907 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
10908LIBS="-lm $LIBS"
10909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10910/* end confdefs.h. */
e6df49e4 10911
5929fbe7
GM
10912/* Override any GCC internal prototype to avoid an error.
10913 Use char because int might match the return type of a GCC
10914 builtin and then its argument prototype would still apply. */
10915#ifdef __cplusplus
10916extern "C"
10917#endif
eb697db5 10918char sqrt ();
a4f64981
GM
10919int
10920main ()
10921{
eb697db5 10922return sqrt ();
5929fbe7
GM
10923 ;
10924 return 0;
a4f64981 10925}
e6df49e4 10926_ACEOF
eb697db5
DN
10927if ac_fn_c_try_link "$LINENO"; then :
10928 ac_cv_lib_m_sqrt=yes
a4f64981 10929else
eb697db5 10930 ac_cv_lib_m_sqrt=no
8c5ff6dd 10931fi
eb697db5
DN
10932rm -f core conftest.err conftest.$ac_objext \
10933 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
10934LIBS=$ac_check_lib_save_LIBS
10935fi
eb697db5
DN
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5
10937$as_echo "$ac_cv_lib_m_sqrt" >&6; }
10938if test "x$ac_cv_lib_m_sqrt" = x""yes; then :
10939 cat >>confdefs.h <<_ACEOF
10940#define HAVE_LIBM 1
10941_ACEOF
15e12598 10942
eb697db5 10943 LIBS="-lm $LIBS"
8c5ff6dd 10944
5929fbe7 10945fi
8c5ff6dd 10946
8c5ff6dd 10947
eb697db5
DN
10948# Check for mail-locking functions in a "mail" library. Probably this should
10949# have the same check as for liblockfile below.
10950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -lmail" >&5
10951$as_echo_n "checking for maillock in -lmail... " >&6; }
10952if test "${ac_cv_lib_mail_maillock+set}" = set; then :
5929fbe7
GM
10953 $as_echo_n "(cached) " >&6
10954else
eb697db5
DN
10955 ac_check_lib_save_LIBS=$LIBS
10956LIBS="-lmail $LIBS"
10957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 10958/* end confdefs.h. */
15e12598 10959
5929fbe7
GM
10960/* Override any GCC internal prototype to avoid an error.
10961 Use char because int might match the return type of a GCC
10962 builtin and then its argument prototype would still apply. */
10963#ifdef __cplusplus
10964extern "C"
10965#endif
eb697db5 10966char maillock ();
5929fbe7
GM
10967int
10968main ()
10969{
eb697db5 10970return maillock ();
5929fbe7
GM
10971 ;
10972 return 0;
10973}
a4f64981 10974_ACEOF
eb697db5
DN
10975if ac_fn_c_try_link "$LINENO"; then :
10976 ac_cv_lib_mail_maillock=yes
5929fbe7 10977else
eb697db5 10978 ac_cv_lib_mail_maillock=no
8c5ff6dd 10979fi
eb697db5
DN
10980rm -f core conftest.err conftest.$ac_objext \
10981 conftest$ac_exeext conftest.$ac_ext
10982LIBS=$ac_check_lib_save_LIBS
5929fbe7 10983fi
eb697db5
DN
10984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mail_maillock" >&5
10985$as_echo "$ac_cv_lib_mail_maillock" >&6; }
10986if test "x$ac_cv_lib_mail_maillock" = x""yes; then :
10987 have_mail=yes
5929fbe7 10988else
eb697db5
DN
10989 have_mail=no
10990fi
10991
10992if test $have_mail = yes; then
10993 LIBS_MAIL=-lmail
10994 LIBS="$LIBS_MAIL $LIBS"
10995
10996$as_echo "#define HAVE_LIBMAIL 1" >>confdefs.h
10997
10998else
10999 LIBS_MAIL=
11000fi
11001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maillock in -llockfile" >&5
11002$as_echo_n "checking for maillock in -llockfile... " >&6; }
11003if test "${ac_cv_lib_lockfile_maillock+set}" = set; then :
e9a63f04 11004 $as_echo_n "(cached) " >&6
98418dba 11005else
0ca10bb7 11006 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11007LIBS="-llockfile $LIBS"
11008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 11009/* end confdefs.h. */
ca81d7a0 11010
0ca10bb7
RC
11011/* Override any GCC internal prototype to avoid an error.
11012 Use char because int might match the return type of a GCC
11013 builtin and then its argument prototype would still apply. */
11014#ifdef __cplusplus
11015extern "C"
11016#endif
eb697db5 11017char maillock ();
0ca10bb7
RC
11018int
11019main ()
11020{
eb697db5 11021return maillock ();
0ca10bb7
RC
11022 ;
11023 return 0;
11024}
503d2be0 11025_ACEOF
eb697db5
DN
11026if ac_fn_c_try_link "$LINENO"; then :
11027 ac_cv_lib_lockfile_maillock=yes
503d2be0 11028else
eb697db5 11029 ac_cv_lib_lockfile_maillock=no
a21616bd 11030fi
eb697db5
DN
11031rm -f core conftest.err conftest.$ac_objext \
11032 conftest$ac_exeext conftest.$ac_ext
0ca10bb7
RC
11033LIBS=$ac_check_lib_save_LIBS
11034fi
eb697db5
DN
11035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lockfile_maillock" >&5
11036$as_echo "$ac_cv_lib_lockfile_maillock" >&6; }
11037if test "x$ac_cv_lib_lockfile_maillock" = x""yes; then :
11038 have_lockfile=yes
5929fbe7 11039else
eb697db5
DN
11040 have_lockfile=no
11041fi
11042
11043if test $have_lockfile = yes; then
11044 LIBS_MAIL=-llockfile
11045 LIBS="$LIBS_MAIL $LIBS"
11046
11047$as_echo "#define HAVE_LIBLOCKFILE 1" >>confdefs.h
11048
11049else
11050# If we have the shared liblockfile, assume we must use it for mail
11051# locking (e.g. Debian). If we couldn't link against liblockfile
11052# (no liblockfile.a installed), ensure that we don't need to.
11053 # Extract the first word of "liblockfile.so", so it can be a program name with args.
11054set dummy liblockfile.so; ac_word=$2
11055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11056$as_echo_n "checking for $ac_word... " >&6; }
11057if test "${ac_cv_prog_liblockfile+set}" = set; then :
11058 $as_echo_n "(cached) " >&6
11059else
11060 if test -n "$liblockfile"; then
11061 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
11062else
11063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11064as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
11065for as_dir in $as_dummy
11066do
11067 IFS=$as_save_IFS
11068 test -z "$as_dir" && as_dir=.
11069 for ac_exec_ext in '' $ac_executable_extensions; do
11070 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11071 ac_cv_prog_liblockfile="yes"
11072 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11073 break 2
11074 fi
11075done
11076 done
11077IFS=$as_save_IFS
11078
11079 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
11080fi
11081fi
11082liblockfile=$ac_cv_prog_liblockfile
11083if test -n "$liblockfile"; then
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $liblockfile" >&5
11085$as_echo "$liblockfile" >&6; }
11086else
11087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088$as_echo "no" >&6; }
11089fi
11090
11091
11092 if test $ac_cv_prog_liblockfile = yes; then
11093 as_fn_error "Shared liblockfile found but can't link against it.
11094This probably means that movemail could lose mail.
11095There may be a \`development' package to install containing liblockfile." "$LINENO" 5
11096 fi
11097fi
11098for ac_func in touchlock
11099do :
11100 ac_fn_c_check_func "$LINENO" "touchlock" "ac_cv_func_touchlock"
11101if test "x$ac_cv_func_touchlock" = x""yes; then :
11102 cat >>confdefs.h <<_ACEOF
11103#define HAVE_TOUCHLOCK 1
11104_ACEOF
11105
11106fi
11107done
11108
11109for ac_header in maillock.h
11110do :
11111 ac_fn_c_check_header_mongrel "$LINENO" "maillock.h" "ac_cv_header_maillock_h" "$ac_includes_default"
11112if test "x$ac_cv_header_maillock_h" = x""yes; then :
11113 cat >>confdefs.h <<_ACEOF
11114#define HAVE_MAILLOCK_H 1
11115_ACEOF
11116
11117fi
11118
11119done
11120
11121
11122
11123## Define MAIL_USE_FLOCK (or LOCKF) if the mailer uses flock (or lockf) to
11124## interlock access to the mail spool. The alternative is a lock file named
11125## /usr/spool/mail/$USER.lock.
11126mail_lock=no
11127case "$opsys" in
11128 aix4-2) mail_lock="lockf" ;;
11129
11130 gnu|freebsd|netbsd|openbsd|darwin|irix6-5) mail_lock="flock" ;;
11131
11132 ## On GNU/Linux systems, both methods are used by various mail programs.
11133 ## I assume most people are using newer mailers that have heard of flock.
11134 ## Change this if you need to.
11135 ## Debian contains a patch which says: ``On Debian/GNU/Linux systems,
11136 ## configure gets the right answers, and that means *NOT* using flock.
11137 ## Using flock is guaranteed to be the wrong thing. See Debian Policy
11138 ## for details.'' and then uses `#ifdef DEBIAN'. Unfortunately the
11139 ## Debian maintainer hasn't provided a clean fix for Emacs.
11140 ## movemail.c will use `maillock' when MAILDIR, HAVE_LIBMAIL and
11141 ## HAVE_MAILLOCK_H are defined, so the following appears to be the
11142 ## correct logic. -- fx
11143 ## We must check for HAVE_LIBLOCKFILE too, as movemail does.
11144 ## liblockfile is a Free Software replacement for libmail, used on
11145 ## Debian systems and elsewhere. -rfr.
11146 gnu-*)
11147 mail_lock="flock"
11148 if test $have_mail = yes || test $have_lockfile = yes; then
11149 test $ac_cv_header_maillock_h = yes && mail_lock=no
11150 fi
11151 ;;
11152esac
11153
11154BLESSMAIL_TARGET=
11155case "$mail_lock" in
11156 flock)
11157$as_echo "#define MAIL_USE_FLOCK 1" >>confdefs.h
11158 ;;
11159
11160 lockf)
11161$as_echo "#define MAIL_USE_LOCKF 1" >>confdefs.h
11162 ;;
11163
11164 *) BLESSMAIL_TARGET="need-blessmail" ;;
11165esac
11166
11167
11168
11169for ac_func in gethostname getdomainname dup2 \
11170rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
11171random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
11172strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
11173utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
11174__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
11175sendto recvfrom getsockopt setsockopt getsockname getpeername \
11176gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
11177memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
11178cfmakeraw cfsetspeed isnan copysign
11179do :
11180 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11181ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11182eval as_val=\$$as_ac_var
11183 if test "x$as_val" = x""yes; then :
11184 cat >>confdefs.h <<_ACEOF
11185#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11186_ACEOF
11187
11188fi
11189done
11190
11191
11192for ac_header in sys/un.h
11193do :
11194 ac_fn_c_check_header_mongrel "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
11195if test "x$ac_cv_header_sys_un_h" = x""yes; then :
11196 cat >>confdefs.h <<_ACEOF
11197#define HAVE_SYS_UN_H 1
11198_ACEOF
11199
11200fi
11201
11202done
11203
11204
11205
11206
11207
11208
11209
11210 for ac_func in $ac_func_list
11211do :
11212 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11213ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11214eval as_val=\$$as_ac_var
11215 if test "x$as_val" = x""yes; then :
11216 cat >>confdefs.h <<_ACEOF
11217#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11218_ACEOF
11219
5929fbe7 11220fi
eb697db5
DN
11221done
11222
11223
11224
11225
11226
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
11228$as_echo_n "checking for working mktime... " >&6; }
11229if test "${ac_cv_func_working_mktime+set}" = set; then :
11230 $as_echo_n "(cached) " >&6
11231else
11232 if test "$cross_compiling" = yes; then :
11233 ac_cv_func_working_mktime=no
11234else
11235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11236/* end confdefs.h. */
11237/* Test program from Paul Eggert and Tony Leneis. */
11238#ifdef TIME_WITH_SYS_TIME
11239# include <sys/time.h>
11240# include <time.h>
11241#else
11242# ifdef HAVE_SYS_TIME_H
11243# include <sys/time.h>
11244# else
11245# include <time.h>
11246# endif
11247#endif
11248
11249#include <limits.h>
11250#include <stdlib.h>
11251
11252#ifdef HAVE_UNISTD_H
11253# include <unistd.h>
11254#endif
11255
11256#ifndef HAVE_ALARM
11257# define alarm(X) /* empty */
11258#endif
11259
11260/* Work around redefinition to rpl_putenv by other config tests. */
11261#undef putenv
11262
11263static time_t time_t_max;
11264static time_t time_t_min;
11265
11266/* Values we'll use to set the TZ environment variable. */
11267static char *tz_strings[] = {
11268 (char *) 0, "TZ=GMT0", "TZ=JST-9",
11269 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
11270};
11271#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
5929fbe7 11272
eb697db5
DN
11273/* Return 0 if mktime fails to convert a date in the spring-forward gap.
11274 Based on a problem report from Andreas Jaeger. */
11275static int
11276spring_forward_gap ()
11277{
11278 /* glibc (up to about 1998-10-07) failed this test. */
11279 struct tm tm;
5929fbe7 11280
eb697db5
DN
11281 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11282 instead of "TZ=America/Vancouver" in order to detect the bug even
11283 on systems that don't support the Olson extension, or don't have the
11284 full zoneinfo tables installed. */
11285 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
5929fbe7 11286
eb697db5
DN
11287 tm.tm_year = 98;
11288 tm.tm_mon = 3;
11289 tm.tm_mday = 5;
11290 tm.tm_hour = 2;
11291 tm.tm_min = 0;
11292 tm.tm_sec = 0;
11293 tm.tm_isdst = -1;
11294 return mktime (&tm) != (time_t) -1;
11295}
5929fbe7 11296
eb697db5
DN
11297static int
11298mktime_test1 (now)
11299 time_t now;
11300{
11301 struct tm *lt;
11302 return ! (lt = localtime (&now)) || mktime (lt) == now;
11303}
e6df49e4 11304
eb697db5
DN
11305static int
11306mktime_test (now)
11307 time_t now;
11308{
11309 return (mktime_test1 (now)
11310 && mktime_test1 ((time_t) (time_t_max - now))
11311 && mktime_test1 ((time_t) (time_t_min + now)));
11312}
5929fbe7 11313
eb697db5
DN
11314static int
11315irix_6_4_bug ()
11316{
11317 /* Based on code from Ariel Faigon. */
11318 struct tm tm;
11319 tm.tm_year = 96;
11320 tm.tm_mon = 3;
11321 tm.tm_mday = 0;
11322 tm.tm_hour = 0;
11323 tm.tm_min = 0;
11324 tm.tm_sec = 0;
11325 tm.tm_isdst = -1;
11326 mktime (&tm);
11327 return tm.tm_mon == 2 && tm.tm_mday == 31;
11328}
5929fbe7 11329
eb697db5
DN
11330static int
11331bigtime_test (j)
11332 int j;
11333{
11334 struct tm tm;
11335 time_t now;
11336 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
11337 now = mktime (&tm);
11338 if (now != (time_t) -1)
11339 {
11340 struct tm *lt = localtime (&now);
11341 if (! (lt
11342 && lt->tm_year == tm.tm_year
11343 && lt->tm_mon == tm.tm_mon
11344 && lt->tm_mday == tm.tm_mday
11345 && lt->tm_hour == tm.tm_hour
11346 && lt->tm_min == tm.tm_min
11347 && lt->tm_sec == tm.tm_sec
11348 && lt->tm_yday == tm.tm_yday
11349 && lt->tm_wday == tm.tm_wday
11350 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
11351 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
11352 return 0;
11353 }
11354 return 1;
11355}
5929fbe7 11356
eb697db5
DN
11357static int
11358year_2050_test ()
11359{
11360 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
11361 ignoring leap seconds. */
11362 unsigned long int answer = 2527315200UL;
15e12598 11363
eb697db5
DN
11364 struct tm tm;
11365 time_t t;
11366 tm.tm_year = 2050 - 1900;
11367 tm.tm_mon = 2 - 1;
11368 tm.tm_mday = 1;
11369 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
11370 tm.tm_isdst = -1;
a4f64981 11371
eb697db5
DN
11372 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
11373 instead of "TZ=America/Vancouver" in order to detect the bug even
11374 on systems that don't support the Olson extension, or don't have the
11375 full zoneinfo tables installed. */
11376 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
8c5ff6dd 11377
eb697db5 11378 t = mktime (&tm);
5929fbe7 11379
eb697db5
DN
11380 /* Check that the result is either a failure, or close enough
11381 to the correct answer that we can assume the discrepancy is
11382 due to leap seconds. */
11383 return (t == (time_t) -1
11384 || (0 < t && answer - 120 <= t && t <= answer + 120));
11385}
21287a21
CY
11386
11387int
11388main ()
11389{
eb697db5
DN
11390 time_t t, delta;
11391 int i, j;
5929fbe7 11392
eb697db5
DN
11393 /* This test makes some buggy mktime implementations loop.
11394 Give up after 60 seconds; a mktime slower than that
11395 isn't worth using anyway. */
11396 alarm (60);
bf89cb4d 11397
eb697db5
DN
11398 for (;;)
11399 {
11400 t = (time_t_max << 1) + 1;
11401 if (t <= time_t_max)
11402 break;
11403 time_t_max = t;
11404 }
11405 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
5929fbe7 11406
eb697db5
DN
11407 delta = time_t_max / 997; /* a suitable prime number */
11408 for (i = 0; i < N_STRINGS; i++)
11409 {
11410 if (tz_strings[i])
11411 putenv (tz_strings[i]);
5929fbe7 11412
eb697db5
DN
11413 for (t = 0; t <= time_t_max - delta; t += delta)
11414 if (! mktime_test (t))
11415 return 1;
11416 if (! (mktime_test ((time_t) 1)
11417 && mktime_test ((time_t) (60 * 60))
11418 && mktime_test ((time_t) (60 * 60 * 24))))
11419 return 1;
21287a21 11420
eb697db5
DN
11421 for (j = 1; ; j <<= 1)
11422 if (! bigtime_test (j))
11423 return 1;
11424 else if (INT_MAX / 2 < j)
11425 break;
11426 if (! bigtime_test (INT_MAX))
11427 return 1;
11428 }
11429 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
9452ded1
DN
11430}
11431_ACEOF
eb697db5
DN
11432if ac_fn_c_try_run "$LINENO"; then :
11433 ac_cv_func_working_mktime=yes
21287a21 11434else
eb697db5
DN
11435 ac_cv_func_working_mktime=no
11436fi
11437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11438 conftest.$ac_objext conftest.beam conftest.$ac_ext
11439fi
11440
11441fi
11442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5
11443$as_echo "$ac_cv_func_working_mktime" >&6; }
11444if test $ac_cv_func_working_mktime = no; then
11445 case " $LIBOBJS " in
11446 *" mktime.$ac_objext "* ) ;;
11447 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
11448 ;;
11449esac
11450
11451fi
11452
11453if test "$ac_cv_func_working_mktime" = no; then
5929fbe7 11454
eb697db5 11455$as_echo "#define BROKEN_MKTIME 1" >>confdefs.h
5929fbe7 11456
21287a21 11457fi
eb697db5
DN
11458
11459ac_have_func=no # yes means we've found a way to get the load average.
11460
11461# Make sure getloadavg.c is where it belongs, at configure-time.
11462test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
11463 as_fn_error "$srcdir/$ac_config_libobj_dir/getloadavg.c is missing" "$LINENO" 5
11464
11465ac_save_LIBS=$LIBS
11466
11467# Check for getloadavg, but be sure not to touch the cache variable.
11468(ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11469if test "x$ac_cv_func_getloadavg" = x""yes; then :
11470 exit 0
5929fbe7 11471else
eb697db5 11472 exit 1
21287a21 11473fi
eb697db5 11474) && ac_have_func=yes
21287a21 11475
eb697db5
DN
11476# On HPUX9, an unprivileged user can get load averages through this function.
11477for ac_func in pstat_getdynamic
11478do :
11479 ac_fn_c_check_func "$LINENO" "pstat_getdynamic" "ac_cv_func_pstat_getdynamic"
11480if test "x$ac_cv_func_pstat_getdynamic" = x""yes; then :
11481 cat >>confdefs.h <<_ACEOF
11482#define HAVE_PSTAT_GETDYNAMIC 1
5929fbe7
GM
11483_ACEOF
11484
eb697db5
DN
11485fi
11486done
11487
11488
11489# Solaris has libkstat which does not require root.
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5
11491$as_echo_n "checking for kstat_open in -lkstat... " >&6; }
11492if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then :
e9a63f04 11493 $as_echo_n "(cached) " >&6
21287a21 11494else
0ca10bb7 11495 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11496LIBS="-lkstat $LIBS"
11497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11498/* end confdefs.h. */
21287a21 11499
0ca10bb7
RC
11500/* Override any GCC internal prototype to avoid an error.
11501 Use char because int might match the return type of a GCC
11502 builtin and then its argument prototype would still apply. */
11503#ifdef __cplusplus
11504extern "C"
15e12598 11505#endif
eb697db5 11506char kstat_open ();
15e12598
VB
11507int
11508main ()
11509{
eb697db5 11510return kstat_open ();
15e12598
VB
11511 ;
11512 return 0;
11513}
11514_ACEOF
eb697db5
DN
11515if ac_fn_c_try_link "$LINENO"; then :
11516 ac_cv_lib_kstat_kstat_open=yes
0ca10bb7 11517else
eb697db5 11518 ac_cv_lib_kstat_kstat_open=no
0ca10bb7 11519fi
eb697db5
DN
11520rm -f core conftest.err conftest.$ac_objext \
11521 conftest$ac_exeext conftest.$ac_ext
bf89cb4d
GM
11522LIBS=$ac_check_lib_save_LIBS
11523fi
eb697db5
DN
11524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5
11525$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; }
11526if test "x$ac_cv_lib_kstat_kstat_open" = x""yes; then :
11527 cat >>confdefs.h <<_ACEOF
11528#define HAVE_LIBKSTAT 1
11529_ACEOF
6da23aaa 11530
eb697db5 11531 LIBS="-lkstat $LIBS"
a4f64981 11532
eb697db5 11533fi
5929fbe7 11534
eb697db5
DN
11535test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
11536
11537# Some systems with -lutil have (and need) -lkvm as well, some do not.
11538# On Solaris, -lkvm requires nlist from -lelf, so check that first
11539# to get the right answer into the cache.
11540# For kstat on solaris, we need libelf to force the definition of SVR4 below.
11541if test $ac_have_func = no; then
11542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_begin in -lelf" >&5
11543$as_echo_n "checking for elf_begin in -lelf... " >&6; }
11544if test "${ac_cv_lib_elf_elf_begin+set}" = set; then :
0ca10bb7
RC
11545 $as_echo_n "(cached) " >&6
11546else
11547 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11548LIBS="-lelf $LIBS"
11549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21287a21 11550/* end confdefs.h. */
21287a21 11551
0ca10bb7
RC
11552/* Override any GCC internal prototype to avoid an error.
11553 Use char because int might match the return type of a GCC
11554 builtin and then its argument prototype would still apply. */
11555#ifdef __cplusplus
11556extern "C"
11557#endif
eb697db5 11558char elf_begin ();
21287a21
CY
11559int
11560main ()
11561{
eb697db5 11562return elf_begin ();
21287a21
CY
11563 ;
11564 return 0;
11565}
11566_ACEOF
eb697db5
DN
11567if ac_fn_c_try_link "$LINENO"; then :
11568 ac_cv_lib_elf_elf_begin=yes
bf89cb4d 11569else
eb697db5 11570 ac_cv_lib_elf_elf_begin=no
0c309b80 11571fi
eb697db5
DN
11572rm -f core conftest.err conftest.$ac_objext \
11573 conftest$ac_exeext conftest.$ac_ext
7186fb09 11574LIBS=$ac_check_lib_save_LIBS
9452ded1 11575fi
eb697db5
DN
11576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elf_elf_begin" >&5
11577$as_echo "$ac_cv_lib_elf_elf_begin" >&6; }
11578if test "x$ac_cv_lib_elf_elf_begin" = x""yes; then :
11579 LIBS="-lelf $LIBS"
8c5ff6dd
KR
11580fi
11581
eb697db5
DN
11582fi
11583if test $ac_have_func = no; then
11584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5
11585$as_echo_n "checking for kvm_open in -lkvm... " >&6; }
11586if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then :
7186fb09
GM
11587 $as_echo_n "(cached) " >&6
11588else
aaa36002 11589 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11590LIBS="-lkvm $LIBS"
11591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
91e84f96 11592/* end confdefs.h. */
7186fb09 11593
aaa36002
DN
11594/* Override any GCC internal prototype to avoid an error.
11595 Use char because int might match the return type of a GCC
11596 builtin and then its argument prototype would still apply. */
11597#ifdef __cplusplus
11598extern "C"
11599#endif
eb697db5 11600char kvm_open ();
8732a4e9
MB
11601int
11602main ()
11603{
eb697db5 11604return kvm_open ();
0c309b80
GM
11605 ;
11606 return 0;
11607}
11608_ACEOF
eb697db5
DN
11609if ac_fn_c_try_link "$LINENO"; then :
11610 ac_cv_lib_kvm_kvm_open=yes
7186fb09 11611else
eb697db5 11612 ac_cv_lib_kvm_kvm_open=no
cd03c74a 11613fi
eb697db5
DN
11614rm -f core conftest.err conftest.$ac_objext \
11615 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11616LIBS=$ac_check_lib_save_LIBS
a4f64981 11617fi
eb697db5
DN
11618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5
11619$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; }
11620if test "x$ac_cv_lib_kvm_kvm_open" = x""yes; then :
11621 LIBS="-lkvm $LIBS"
8c5ff6dd 11622fi
8c5ff6dd 11623
eb697db5
DN
11624 # Check for the 4.4BSD definition of getloadavg.
11625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lutil" >&5
11626$as_echo_n "checking for getloadavg in -lutil... " >&6; }
11627if test "${ac_cv_lib_util_getloadavg+set}" = set; then :
5929fbe7 11628 $as_echo_n "(cached) " >&6
8c5ff6dd 11629else
5929fbe7 11630 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11631LIBS="-lutil $LIBS"
11632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11633/* end confdefs.h. */
8c5ff6dd 11634
5929fbe7
GM
11635/* Override any GCC internal prototype to avoid an error.
11636 Use char because int might match the return type of a GCC
11637 builtin and then its argument prototype would still apply. */
11638#ifdef __cplusplus
11639extern "C"
11640#endif
eb697db5 11641char getloadavg ();
5929fbe7
GM
11642int
11643main ()
11644{
eb697db5 11645return getloadavg ();
5929fbe7
GM
11646 ;
11647 return 0;
11648}
11649_ACEOF
eb697db5
DN
11650if ac_fn_c_try_link "$LINENO"; then :
11651 ac_cv_lib_util_getloadavg=yes
49ebbd65 11652else
eb697db5 11653 ac_cv_lib_util_getloadavg=no
8c5ff6dd 11654fi
eb697db5
DN
11655rm -f core conftest.err conftest.$ac_objext \
11656 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11657LIBS=$ac_check_lib_save_LIBS
8c5ff6dd 11658fi
eb697db5
DN
11659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_getloadavg" >&5
11660$as_echo "$ac_cv_lib_util_getloadavg" >&6; }
11661if test "x$ac_cv_lib_util_getloadavg" = x""yes; then :
11662 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
8c5ff6dd 11663fi
8c5ff6dd 11664
eb697db5 11665fi
8c5ff6dd 11666
eb697db5
DN
11667if test $ac_have_func = no; then
11668 # There is a commonly available library for RS/6000 AIX.
11669 # Since it is not a standard part of AIX, it might be installed locally.
11670 ac_getloadavg_LIBS=$LIBS
11671 LIBS="-L/usr/local/lib $LIBS"
11672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getloadavg in -lgetloadavg" >&5
11673$as_echo_n "checking for getloadavg in -lgetloadavg... " >&6; }
11674if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then :
8c5ff6dd
KR
11675 $as_echo_n "(cached) " >&6
11676else
5929fbe7 11677 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11678LIBS="-lgetloadavg $LIBS"
11679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 11680/* end confdefs.h. */
5929fbe7
GM
11681
11682/* Override any GCC internal prototype to avoid an error.
11683 Use char because int might match the return type of a GCC
11684 builtin and then its argument prototype would still apply. */
11685#ifdef __cplusplus
11686extern "C"
11687#endif
eb697db5 11688char getloadavg ();
8c5ff6dd
KR
11689int
11690main ()
11691{
eb697db5 11692return getloadavg ();
8c5ff6dd
KR
11693 ;
11694 return 0;
11695}
a4f64981 11696_ACEOF
eb697db5
DN
11697if ac_fn_c_try_link "$LINENO"; then :
11698 ac_cv_lib_getloadavg_getloadavg=yes
5929fbe7 11699else
eb697db5 11700 ac_cv_lib_getloadavg_getloadavg=no
5929fbe7 11701fi
eb697db5
DN
11702rm -f core conftest.err conftest.$ac_objext \
11703 conftest$ac_exeext conftest.$ac_ext
5929fbe7 11704LIBS=$ac_check_lib_save_LIBS
8c5ff6dd 11705fi
eb697db5
DN
11706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_getloadavg_getloadavg" >&5
11707$as_echo "$ac_cv_lib_getloadavg_getloadavg" >&6; }
11708if test "x$ac_cv_lib_getloadavg_getloadavg" = x""yes; then :
11709 LIBS="-lgetloadavg $LIBS"
5929fbe7 11710else
eb697db5 11711 LIBS=$ac_getloadavg_LIBS
5929fbe7
GM
11712fi
11713
eb697db5 11714fi
5929fbe7 11715
eb697db5
DN
11716# Make sure it is really in the library, if we think we found it,
11717# otherwise set up the replacement function.
11718for ac_func in getloadavg
11719do :
11720 ac_fn_c_check_func "$LINENO" "getloadavg" "ac_cv_func_getloadavg"
11721if test "x$ac_cv_func_getloadavg" = x""yes; then :
11722 cat >>confdefs.h <<_ACEOF
11723#define HAVE_GETLOADAVG 1
5929fbe7
GM
11724_ACEOF
11725
eb697db5
DN
11726else
11727 case " $LIBOBJS " in
11728 *" getloadavg.$ac_objext "* ) ;;
11729 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
11730 ;;
11731esac
11732
11733
11734$as_echo "#define C_GETLOADAVG 1" >>confdefs.h
11735
11736# Figure out what our getloadavg.c needs.
11737ac_have_func=no
11738ac_fn_c_check_header_mongrel "$LINENO" "sys/dg_sys_info.h" "ac_cv_header_sys_dg_sys_info_h" "$ac_includes_default"
11739if test "x$ac_cv_header_sys_dg_sys_info_h" = x""yes; then :
11740 ac_have_func=yes
11741
11742$as_echo "#define DGUX 1" >>confdefs.h
11743
11744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dg_sys_info in -ldgc" >&5
11745$as_echo_n "checking for dg_sys_info in -ldgc... " >&6; }
11746if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then :
5929fbe7
GM
11747 $as_echo_n "(cached) " >&6
11748else
11749 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
11750LIBS="-ldgc $LIBS"
11751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
a4f64981 11752/* end confdefs.h. */
5929fbe7
GM
11753
11754/* Override any GCC internal prototype to avoid an error.
11755 Use char because int might match the return type of a GCC
11756 builtin and then its argument prototype would still apply. */
11757#ifdef __cplusplus
11758extern "C"
11759#endif
eb697db5 11760char dg_sys_info ();
a4f64981
GM
11761int
11762main ()
11763{
eb697db5 11764return dg_sys_info ();
15e12598
VB
11765 ;
11766 return 0;
11767}
e6df49e4 11768_ACEOF
eb697db5
DN
11769if ac_fn_c_try_link "$LINENO"; then :
11770 ac_cv_lib_dgc_dg_sys_info=yes
5929fbe7 11771else
eb697db5 11772 ac_cv_lib_dgc_dg_sys_info=no
49ebbd65 11773fi
eb697db5
DN
11774rm -f core conftest.err conftest.$ac_objext \
11775 conftest$ac_exeext conftest.$ac_ext
5929fbe7
GM
11776LIBS=$ac_check_lib_save_LIBS
11777fi
eb697db5
DN
11778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dgc_dg_sys_info" >&5
11779$as_echo "$ac_cv_lib_dgc_dg_sys_info" >&6; }
11780if test "x$ac_cv_lib_dgc_dg_sys_info" = x""yes; then :
11781 cat >>confdefs.h <<_ACEOF
11782#define HAVE_LIBDGC 1
11783_ACEOF
11784
11785 LIBS="-ldgc $LIBS"
11786
5929fbe7 11787fi
a5edbe4a 11788
eb697db5 11789fi
49ebbd65
DN
11790
11791
15e12598 11792
eb697db5
DN
11793ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
11794if test "x$ac_cv_header_locale_h" = x""yes; then :
a4f64981 11795
5929fbe7 11796fi
eb697db5
DN
11797
11798
11799for ac_func in setlocale
11800do :
11801 ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
11802if test "x$ac_cv_func_setlocale" = x""yes; then :
11803 cat >>confdefs.h <<_ACEOF
11804#define HAVE_SETLOCALE 1
5929fbe7 11805_ACEOF
a4f64981 11806
5929fbe7 11807fi
eb697db5 11808done
a4f64981 11809
a4f64981 11810
eb697db5
DN
11811# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
11812# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
11813# Irix 4.0.5F has the header but not the library.
11814if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
11815 ac_have_func=yes
11816
11817$as_echo "#define SVR4 1" >>confdefs.h
cd03c74a 11818
5929fbe7 11819fi
8c5ff6dd 11820
eb697db5
DN
11821if test $ac_have_func = no; then
11822 ac_fn_c_check_header_mongrel "$LINENO" "inq_stats/cpustats.h" "ac_cv_header_inq_stats_cpustats_h" "$ac_includes_default"
11823if test "x$ac_cv_header_inq_stats_cpustats_h" = x""yes; then :
11824 ac_have_func=yes
8c5ff6dd 11825
eb697db5
DN
11826$as_echo "#define UMAX 1" >>confdefs.h
11827
11828
11829$as_echo "#define UMAX4_3 1" >>confdefs.h
8c5ff6dd 11830
5929fbe7 11831fi
eb697db5
DN
11832
11833
11834fi
11835
11836if test $ac_have_func = no; then
11837 ac_fn_c_check_header_mongrel "$LINENO" "sys/cpustats.h" "ac_cv_header_sys_cpustats_h" "$ac_includes_default"
11838if test "x$ac_cv_header_sys_cpustats_h" = x""yes; then :
11839 ac_have_func=yes; $as_echo "#define UMAX 1" >>confdefs.h
11840
11841fi
11842
8c5ff6dd 11843
5929fbe7 11844fi
eb697db5
DN
11845
11846if test $ac_have_func = no; then
11847 for ac_header in mach/mach.h
11848do :
11849 ac_fn_c_check_header_mongrel "$LINENO" "mach/mach.h" "ac_cv_header_mach_mach_h" "$ac_includes_default"
11850if test "x$ac_cv_header_mach_mach_h" = x""yes; then :
8c5ff6dd 11851 cat >>confdefs.h <<_ACEOF
eb697db5 11852#define HAVE_MACH_MACH_H 1
5929fbe7 11853_ACEOF
e6df49e4 11854
eb697db5
DN
11855fi
11856
11857done
8c5ff6dd 11858
eb697db5
DN
11859fi
11860
11861for ac_header in nlist.h
11862do :
11863 ac_fn_c_check_header_mongrel "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
11864if test "x$ac_cv_header_nlist_h" = x""yes; then :
11865 cat >>confdefs.h <<_ACEOF
11866#define HAVE_NLIST_H 1
a4f64981 11867_ACEOF
eb697db5
DN
11868 ac_fn_c_check_member "$LINENO" "struct nlist" "n_un.n_name" "ac_cv_member_struct_nlist_n_un_n_name" "#include <nlist.h>
11869"
11870if test "x$ac_cv_member_struct_nlist_n_un_n_name" = x""yes; then :
cd03c74a 11871
eb697db5
DN
11872cat >>confdefs.h <<_ACEOF
11873#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
5929fbe7 11874_ACEOF
5929fbe7 11875
eb697db5
DN
11876
11877$as_echo "#define NLIST_NAME_UNION 1" >>confdefs.h
11878
8c5ff6dd 11879fi
49ebbd65 11880
eb697db5 11881
5929fbe7 11882fi
8c5ff6dd 11883
eb697db5
DN
11884done
11885
8c5ff6dd 11886fi
eb697db5 11887done
8c5ff6dd 11888
eb697db5
DN
11889
11890# Some definitions of getloadavg require that the program be installed setgid.
11891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getloadavg requires setgid" >&5
11892$as_echo_n "checking whether getloadavg requires setgid... " >&6; }
11893if test "${ac_cv_func_getloadavg_setgid+set}" = set; then :
11894 $as_echo_n "(cached) " >&6
11895else
11896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11897/* end confdefs.h. */
11898#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
11899#ifdef LDAV_PRIVILEGED
11900Yowza Am I SETGID yet
11901#endif
5929fbe7 11902_ACEOF
eb697db5
DN
11903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11904 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then :
11905 ac_cv_func_getloadavg_setgid=yes
11906else
11907 ac_cv_func_getloadavg_setgid=no
11908fi
11909rm -f conftest*
11910
11911fi
11912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getloadavg_setgid" >&5
11913$as_echo "$ac_cv_func_getloadavg_setgid" >&6; }
11914if test $ac_cv_func_getloadavg_setgid = yes; then
11915 NEED_SETGID=true
8c5ff6dd 11916
eb697db5 11917$as_echo "#define GETLOADAVG_PRIVILEGED 1" >>confdefs.h
8c5ff6dd 11918
eb697db5
DN
11919else
11920 NEED_SETGID=false
5929fbe7 11921fi
eb697db5
DN
11922
11923if test $ac_cv_func_getloadavg_setgid = yes; then
11924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking group of /dev/kmem" >&5
11925$as_echo_n "checking group of /dev/kmem... " >&6; }
11926if test "${ac_cv_group_kmem+set}" = set; then :
5929fbe7 11927 $as_echo_n "(cached) " >&6
a5edbe4a 11928else
eb697db5
DN
11929 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
11930 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
11931 # If we got an error (system does not support symlinks), try without -L.
11932 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
11933 ac_cv_group_kmem=`$as_echo "$ac_ls_output" \
11934 | sed -ne 's/[ ][ ]*/ /g;
11935 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
11936 / /s/.* //;p;'`
11937
11938fi
11939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_group_kmem" >&5
11940$as_echo "$ac_cv_group_kmem" >&6; }
11941 KMEM_GROUP=$ac_cv_group_kmem
11942fi
11943if test "x$ac_save_LIBS" = x; then
11944 GETLOADAVG_LIBS=$LIBS
11945else
11946 GETLOADAVG_LIBS=`$as_echo "$LIBS" | sed "s|$ac_save_LIBS||"`
11947fi
11948LIBS=$ac_save_LIBS
11949
11950
5929fbe7 11951
eb697db5
DN
11952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11953$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
11954if test "${ac_cv_sys_largefile_source+set}" = set; then :
11955 $as_echo_n "(cached) " >&6
11956else
11957 while :; do
11958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11959/* end confdefs.h. */
11960#include <sys/types.h> /* for off_t */
11961 #include <stdio.h>
8c5ff6dd
KR
11962int
11963main ()
11964{
eb697db5
DN
11965int (*fp) (FILE *, off_t, int) = fseeko;
11966 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5929fbe7
GM
11967 ;
11968 return 0;
11969}
11970_ACEOF
eb697db5
DN
11971if ac_fn_c_try_link "$LINENO"; then :
11972 ac_cv_sys_largefile_source=no; break
11973fi
11974rm -f core conftest.err conftest.$ac_objext \
11975 conftest$ac_exeext conftest.$ac_ext
11976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 11977/* end confdefs.h. */
eb697db5
DN
11978#define _LARGEFILE_SOURCE 1
11979#include <sys/types.h> /* for off_t */
11980 #include <stdio.h>
5929fbe7
GM
11981int
11982main ()
11983{
eb697db5
DN
11984int (*fp) (FILE *, off_t, int) = fseeko;
11985 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
8c5ff6dd
KR
11986 ;
11987 return 0;
11988}
08b47d3d 11989_ACEOF
eb697db5
DN
11990if ac_fn_c_try_link "$LINENO"; then :
11991 ac_cv_sys_largefile_source=1; break
11992fi
11993rm -f core conftest.err conftest.$ac_objext \
11994 conftest$ac_exeext conftest.$ac_ext
11995 ac_cv_sys_largefile_source=unknown
11996 break
11997done
11998fi
11999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
12000$as_echo "$ac_cv_sys_largefile_source" >&6; }
12001case $ac_cv_sys_largefile_source in #(
12002 no | unknown) ;;
12003 *)
12004cat >>confdefs.h <<_ACEOF
12005#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12006_ACEOF
12007;;
5929fbe7 12008esac
eb697db5 12009rm -rf conftest*
a4f64981 12010
eb697db5
DN
12011# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12012# in glibc 2.1.3, but that breaks too many other things.
12013# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12014if test $ac_cv_sys_largefile_source != unknown; then
49ebbd65 12015
eb697db5 12016$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
e6df49e4 12017
5929fbe7 12018fi
8c5ff6dd
KR
12019
12020
eb697db5
DN
12021# Configure getopt.
12022# getopt.m4 serial 10
8c5ff6dd 12023
eb697db5
DN
12024# The getopt module assume you want GNU getopt, with getopt_long etc,
12025# rather than vanilla POSIX getopt. This means your your code should
12026# always include <getopt.h> for the getopt prototypes.
15e12598 12027
15e12598 12028
a4f64981 12029
8c5ff6dd 12030
5929fbe7 12031
5929fbe7 12032
5929fbe7 12033
e6df49e4 12034
49ebbd65 12035
a4f64981 12036
e6df49e4 12037
eb697db5
DN
12038# Prerequisites of lib/getopt*.
12039
12040
12041
12042
12043 GETOPT_H=
12044 for ac_header in getopt.h
12045do :
12046 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
12047if test "x$ac_cv_header_getopt_h" = x""yes; then :
12048 cat >>confdefs.h <<_ACEOF
12049#define HAVE_GETOPT_H 1
12050_ACEOF
12051
5929fbe7 12052else
eb697db5 12053 GETOPT_H=getopt.h
5929fbe7 12054fi
a4f64981 12055
eb697db5
DN
12056done
12057
12058 if test -z "$GETOPT_H"; then
12059 for ac_func in getopt_long_only
12060do :
12061 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
12062if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
8c5ff6dd 12063 cat >>confdefs.h <<_ACEOF
eb697db5 12064#define HAVE_GETOPT_LONG_ONLY 1
8c5ff6dd 12065_ACEOF
e6df49e4 12066
8c5ff6dd 12067else
eb697db5
DN
12068 GETOPT_H=getopt.h
12069fi
12070done
5929fbe7 12071
eb697db5
DN
12072 fi
12073
12074 if test -z "$GETOPT_H"; then
12075 ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
12076"
12077if test "x$ac_cv_have_decl_optreset" = x""yes; then :
12078 GETOPT_H=getopt.h
12079fi
12080
12081 fi
12082
12083 if test -z "$GETOPT_H"; then
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
12085$as_echo_n "checking for working GNU getopt function... " >&6; }
12086if test "${gl_cv_func_gnu_getopt+set}" = set; then :
a4f64981 12087 $as_echo_n "(cached) " >&6
eb697db5
DN
12088else
12089 if test "$cross_compiling" = yes; then :
12090 ac_fn_c_check_decl "$LINENO" "getopt_clip" "ac_cv_have_decl_getopt_clip" "#include <getopt.h>
12091"
12092if test "x$ac_cv_have_decl_getopt_clip" = x""yes; then :
12093 gl_cv_func_gnu_getopt=no
12094else
12095 gl_cv_func_gnu_getopt=yes
5929fbe7 12096fi
eb697db5 12097
a4f64981 12098else
eb697db5 12099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12100/* end confdefs.h. */
eb697db5
DN
12101#include <getopt.h>
12102int
12103main ()
12104{
12105
12106 char *myargv[3];
12107 myargv[0] = "conftest";
12108 myargv[1] = "-+";
12109 myargv[2] = 0;
12110 return getopt (2, myargv, "+a") != '?';
12111
12112 ;
12113 return 0;
12114}
5929fbe7 12115_ACEOF
eb697db5
DN
12116if ac_fn_c_try_run "$LINENO"; then :
12117 gl_cv_func_gnu_getopt=yes
5929fbe7 12118else
eb697db5
DN
12119 gl_cv_func_gnu_getopt=no
12120fi
12121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12122 conftest.$ac_objext conftest.beam conftest.$ac_ext
12123fi
8c5ff6dd 12124
5929fbe7 12125fi
eb697db5
DN
12126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gnu_getopt" >&5
12127$as_echo "$gl_cv_func_gnu_getopt" >&6; }
12128 if test "$gl_cv_func_gnu_getopt" = "no"; then
12129 GETOPT_H=getopt.h
12130 fi
12131 fi
5929fbe7 12132
5929fbe7 12133
a4f64981 12134
eb697db5 12135 if test -n "$GETOPT_H"; then :
8c5ff6dd
KR
12136
12137
eb697db5 12138 GETOPT_H=getopt.h
a5edbe4a 12139
eb697db5 12140$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
15e12598 12141
49ebbd65 12142
15e12598 12143
eb697db5
DN
12144 :
12145 GETOPTOBJS='getopt.o getopt1.o'
a4f64981 12146
8c5ff6dd 12147fi
e6df49e4 12148
e6df49e4 12149
eb697db5
DN
12150
12151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
12152$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
12153if test "${ac_cv_func_getpgrp_void+set}" = set; then :
12154 $as_echo_n "(cached) " >&6
12155else
12156 # Use it with a single arg.
12157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12158/* end confdefs.h. */
eb697db5
DN
12159$ac_includes_default
12160int
12161main ()
12162{
12163getpgrp (0);
12164 ;
12165 return 0;
12166}
12167_ACEOF
12168if ac_fn_c_try_compile "$LINENO"; then :
12169 ac_cv_func_getpgrp_void=no
5929fbe7 12170else
eb697db5
DN
12171 ac_cv_func_getpgrp_void=yes
12172fi
12173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
a4f64981 12174
5929fbe7 12175fi
eb697db5
DN
12176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
12177$as_echo "$ac_cv_func_getpgrp_void" >&6; }
12178if test $ac_cv_func_getpgrp_void = yes; then
8c5ff6dd 12179
eb697db5 12180$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
a4f64981 12181
eb697db5 12182fi
8c5ff6dd 12183
eb697db5
DN
12184
12185for ac_func in strftime
12186do :
12187 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
12188if test "x$ac_cv_func_strftime" = x""yes; then :
12189 cat >>confdefs.h <<_ACEOF
12190#define HAVE_STRFTIME 1
12191_ACEOF
12192
12193else
12194 # strftime is in -lintl on SCO UNIX.
12195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
12196$as_echo_n "checking for strftime in -lintl... " >&6; }
12197if test "${ac_cv_lib_intl_strftime+set}" = set; then :
a4f64981
GM
12198 $as_echo_n "(cached) " >&6
12199else
eb697db5
DN
12200 ac_check_lib_save_LIBS=$LIBS
12201LIBS="-lintl $LIBS"
12202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12203/* end confdefs.h. */
12204
12205/* Override any GCC internal prototype to avoid an error.
12206 Use char because int might match the return type of a GCC
12207 builtin and then its argument prototype would still apply. */
12208#ifdef __cplusplus
12209extern "C"
12210#endif
12211char strftime ();
12212int
12213main ()
12214{
12215return strftime ();
12216 ;
12217 return 0;
12218}
12219_ACEOF
12220if ac_fn_c_try_link "$LINENO"; then :
12221 ac_cv_lib_intl_strftime=yes
12222else
12223 ac_cv_lib_intl_strftime=no
12224fi
12225rm -f core conftest.err conftest.$ac_objext \
12226 conftest$ac_exeext conftest.$ac_ext
12227LIBS=$ac_check_lib_save_LIBS
12228fi
12229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
12230$as_echo "$ac_cv_lib_intl_strftime" >&6; }
12231if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
12232 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
12233
12234LIBS="-lintl $LIBS"
5929fbe7 12235fi
e6df49e4 12236
5929fbe7 12237fi
eb697db5
DN
12238done
12239
12240
12241# UNIX98 PTYs.
12242for ac_func in grantpt
12243do :
12244 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
12245if test "x$ac_cv_func_grantpt" = x""yes; then :
5929fbe7 12246 cat >>confdefs.h <<_ACEOF
eb697db5 12247#define HAVE_GRANTPT 1
a4f64981 12248_ACEOF
5929fbe7 12249
a4f64981 12250fi
5929fbe7
GM
12251done
12252
8c5ff6dd 12253
eb697db5
DN
12254# PTY-related GNU extensions.
12255for ac_func in getpt
12256do :
12257 ac_fn_c_check_func "$LINENO" "getpt" "ac_cv_func_getpt"
12258if test "x$ac_cv_func_getpt" = x""yes; then :
12259 cat >>confdefs.h <<_ACEOF
12260#define HAVE_GETPT 1
12261_ACEOF
8c5ff6dd 12262
5929fbe7 12263fi
5929fbe7 12264done
8c5ff6dd 12265
5929fbe7 12266
eb697db5
DN
12267# Check this now, so that we will NOT find the above functions in ncurses.
12268# That is because we have not set up to link ncurses in lib-src.
12269# It's better to believe a function is not available
12270# than to expect to find it in ncurses.
12271# Also we need tputs and friends to be able to build at all.
12272have_tputs_et_al=true
12273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5
12274$as_echo_n "checking for library containing tputs... " >&6; }
12275if test "${ac_cv_search_tputs+set}" = set; then :
5929fbe7 12276 $as_echo_n "(cached) " >&6
5929fbe7 12277else
eb697db5
DN
12278 ac_func_search_save_LIBS=$LIBS
12279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12280/* end confdefs.h. */
eb697db5
DN
12281
12282/* Override any GCC internal prototype to avoid an error.
12283 Use char because int might match the return type of a GCC
12284 builtin and then its argument prototype would still apply. */
12285#ifdef __cplusplus
12286extern "C"
12287#endif
12288char tputs ();
12289int
12290main ()
12291{
12292return tputs ();
12293 ;
12294 return 0;
12295}
5929fbe7 12296_ACEOF
eb697db5
DN
12297for ac_lib in '' ncurses terminfo termcap; do
12298 if test -z "$ac_lib"; then
12299 ac_res="none required"
12300 else
12301 ac_res=-l$ac_lib
12302 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12303 fi
12304 if ac_fn_c_try_link "$LINENO"; then :
12305 ac_cv_search_tputs=$ac_res
12306fi
12307rm -f core conftest.err conftest.$ac_objext \
12308 conftest$ac_exeext
12309 if test "${ac_cv_search_tputs+set}" = set; then :
12310 break
12311fi
12312done
12313if test "${ac_cv_search_tputs+set}" = set; then :
12314
5929fbe7 12315else
eb697db5
DN
12316 ac_cv_search_tputs=no
12317fi
12318rm conftest.$ac_ext
12319LIBS=$ac_func_search_save_LIBS
12320fi
12321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5
12322$as_echo "$ac_cv_search_tputs" >&6; }
12323ac_res=$ac_cv_search_tputs
12324if test "$ac_res" != no; then :
12325 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
a4f64981 12326
eb697db5
DN
12327else
12328 have_tputs_et_al=false
5929fbe7 12329fi
8c5ff6dd 12330
eb697db5
DN
12331if test "$have_tputs_et_al" != true; then
12332 as_fn_error "I couldn't find termcap functions (tputs and friends).
12333Maybe some development libraries/packages are missing? Try installing
12334libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
12335fi
12336# Must define this when any termcap library is found.
8c5ff6dd 12337
eb697db5
DN
12338$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
12339
12340## FIXME This was the cpp logic, but I am not sure it is right.
12341## The above test has not necessarily found libncurses.
12342HAVE_LIBNCURSES=yes
12343
12344## Use terminfo instead of termcap?
12345## Note only system files NOT using terminfo are:
12346## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
12347## darwin|gnu without ncurses.
12348TERMINFO=no
12349LIBS_TERMCAP=
12350case "$opsys" in
12351 ## cygwin: Fewer environment variables to go wrong, more terminal types.
12352 ## hpux10-20: Use the system provided termcap(3) library.
12353 ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
12354 ## is necessary. Otherwise Emacs dumps core when run -nw.
12355 aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
12356
12357 ## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
12358 ## The ncurses library has been moved out of the System framework in
12359 ## Mac OS X 10.2. So if configure detects it, set the command-line
12360 ## option to use it.
12361 darwin|gnu*)
12362 ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
12363 if test "x$HAVE_LIBNCURSES" = "xyes"; then
12364 TERMINFO=yes
12365 LIBS_TERMCAP="-lncurses"
12366 fi
12367 ;;
12368
12369 freebsd)
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
12371$as_echo_n "checking whether FreeBSD is new enough to use terminfo... " >&6; }
12372 if test "${emacs_cv_freebsd_terminfo+set}" = set; then :
12373 $as_echo_n "(cached) " >&6
12374else
12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12376/* end confdefs.h. */
eb697db5
DN
12377#include <osreldate.h>
12378int
12379main ()
12380{
12381#if __FreeBSD_version < 400000
12382fail;
12383#endif
12384
12385 ;
12386 return 0;
12387}
5929fbe7 12388_ACEOF
eb697db5
DN
12389if ac_fn_c_try_link "$LINENO"; then :
12390 emacs_cv_freebsd_terminfo=yes
5929fbe7 12391else
eb697db5
DN
12392 emacs_cv_freebsd_terminfo=no
12393fi
12394rm -f core conftest.err conftest.$ac_objext \
12395 conftest$ac_exeext conftest.$ac_ext
5929fbe7 12396fi
8c5ff6dd
KR
12397
12398
eb697db5
DN
12399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_freebsd_terminfo" >&5
12400$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
12401
12402 if test $emacs_cv_freebsd_terminfo = yes; then
12403 TERMINFO=yes
12404 LIBS_TERMCAP="-lncurses"
12405 else
12406 LIBS_TERMCAP="-ltermcap"
12407 fi
5929fbe7 12408 ;;
8c5ff6dd 12409
eb697db5
DN
12410 netbsd)
12411 if test $ac_cv_search_tputs = -lterminfo; then
12412 TERMINFO=yes
12413 LIBS_TERMCAP="-lterminfo"
12414 else
12415 LIBS_TERMCAP="-ltermcap"
12416 fi
5929fbe7 12417 ;;
eb697db5 12418
5929fbe7 12419esac
a4f64981 12420
eb697db5
DN
12421case "$opsys" in
12422 ## hpux: Make sure we get select from libc rather than from libcurses
12423 ## because libcurses on HPUX 10.10 has a broken version of select.
12424 ## We used to use -lc -lcurses, but this may be cleaner.
12425 hpux*) LIBS_TERMCAP="-ltermcap" ;;
a4f64981 12426
eb697db5
DN
12427 openbsd) LIBS_TERMCAP="-lncurses" ;;
12428
12429 ## Must use system termcap, if we use any termcap. It does special things.
12430 sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
12431esac
12432
12433TERMCAP_OBJ=tparam.o
12434if test $TERMINFO = yes; then
12435
12436$as_echo "#define TERMINFO 1" >>confdefs.h
8c5ff6dd 12437
5929fbe7 12438
eb697db5
DN
12439 ## Default used to be -ltermcap. Add a case above if need something else.
12440 test "x$LIBS_TERMCAP" = "x" && LIBS_TERMCAP="-lcurses"
12441
12442 TERMCAP_OBJ=terminfo.o
8c5ff6dd 12443fi
5929fbe7 12444
5929fbe7 12445
eb697db5
DN
12446
12447
12448# Do we have res_init, for detecting changes in /etc/resolv.conf?
12449resolv=no
12450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12451/* end confdefs.h. */
12452#include <netinet/in.h>
12453#include <arpa/nameser.h>
12454#include <resolv.h>
12455int
12456main ()
12457{
12458return res_init();
12459 ;
12460 return 0;
12461}
5929fbe7 12462_ACEOF
eb697db5
DN
12463if ac_fn_c_try_link "$LINENO"; then :
12464 have_res_init=yes
12465else
12466 have_res_init=no
12467fi
12468rm -f core conftest.err conftest.$ac_objext \
12469 conftest$ac_exeext conftest.$ac_ext
12470if test "$have_res_init" = no; then
12471 OLIBS="$LIBS"
12472 LIBS="$LIBS -lresolv"
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init with -lresolv" >&5
12474$as_echo_n "checking for res_init with -lresolv... " >&6; }
12475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12476/* end confdefs.h. */
eb697db5
DN
12477#include <netinet/in.h>
12478#include <arpa/nameser.h>
12479#include <resolv.h>
12480int
12481main ()
12482{
12483return res_init();
12484 ;
12485 return 0;
12486}
aaa36002 12487_ACEOF
eb697db5
DN
12488if ac_fn_c_try_link "$LINENO"; then :
12489 have_res_init=yes
7186fb09 12490else
eb697db5
DN
12491 have_res_init=no
12492fi
12493rm -f core conftest.err conftest.$ac_objext \
12494 conftest$ac_exeext conftest.$ac_ext
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_res_init" >&5
12496$as_echo "$have_res_init" >&6; }
12497 if test "$have_res_init" = yes ; then
12498 resolv=yes
12499 fi
12500 LIBS="$OLIBS"
6da23aaa 12501fi
bf89cb4d 12502
eb697db5 12503if test "$have_res_init" = yes; then
ca81d7a0 12504
eb697db5 12505$as_echo "#define HAVE_RES_INIT 1" >>confdefs.h
7186fb09 12506
6da23aaa 12507fi
ca81d7a0 12508
eb697db5
DN
12509# Do we need the Hesiod library to provide the support routines?
12510LIBHESIOD=
12511if test "$with_hesiod" != no ; then
12512 # Don't set $LIBS here -- see comments above. FIXME which comments?
12513 ac_fn_c_check_func "$LINENO" "res_send" "ac_cv_func_res_send"
12514if test "x$ac_cv_func_res_send" = x""yes; then :
7186fb09 12515
aaa36002 12516else
eb697db5
DN
12517 ac_fn_c_check_func "$LINENO" "__res_send" "ac_cv_func___res_send"
12518if test "x$ac_cv_func___res_send" = x""yes; then :
6da23aaa 12519
eb697db5
DN
12520else
12521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_send in -lresolv" >&5
12522$as_echo_n "checking for res_send in -lresolv... " >&6; }
12523if test "${ac_cv_lib_resolv_res_send+set}" = set; then :
6da23aaa
EZ
12524 $as_echo_n "(cached) " >&6
12525else
eb697db5
DN
12526 ac_check_lib_save_LIBS=$LIBS
12527LIBS="-lresolv $LIBS"
12528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 12529/* end confdefs.h. */
eb697db5
DN
12530
12531/* Override any GCC internal prototype to avoid an error.
12532 Use char because int might match the return type of a GCC
12533 builtin and then its argument prototype would still apply. */
12534#ifdef __cplusplus
12535extern "C"
12536#endif
12537char res_send ();
12538int
12539main ()
12540{
12541return res_send ();
12542 ;
12543 return 0;
12544}
7186fb09 12545_ACEOF
eb697db5
DN
12546if ac_fn_c_try_link "$LINENO"; then :
12547 ac_cv_lib_resolv_res_send=yes
7186fb09 12548else
eb697db5 12549 ac_cv_lib_resolv_res_send=no
8c5ff6dd 12550fi
eb697db5
DN
12551rm -f core conftest.err conftest.$ac_objext \
12552 conftest$ac_exeext conftest.$ac_ext
12553LIBS=$ac_check_lib_save_LIBS
12554fi
12555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_send" >&5
12556$as_echo "$ac_cv_lib_resolv_res_send" >&6; }
12557if test "x$ac_cv_lib_resolv_res_send" = x""yes; then :
12558 resolv=yes
12559else
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_send in -lresolv" >&5
12561$as_echo_n "checking for __res_send in -lresolv... " >&6; }
12562if test "${ac_cv_lib_resolv___res_send+set}" = set; then :
12563 $as_echo_n "(cached) " >&6
12564else
12565 ac_check_lib_save_LIBS=$LIBS
12566LIBS="-lresolv $LIBS"
12567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5929fbe7 12568/* end confdefs.h. */
eb697db5
DN
12569
12570/* Override any GCC internal prototype to avoid an error.
12571 Use char because int might match the return type of a GCC
12572 builtin and then its argument prototype would still apply. */
12573#ifdef __cplusplus
12574extern "C"
12575#endif
12576char __res_send ();
12577int
12578main ()
12579{
12580return __res_send ();
12581 ;
12582 return 0;
12583}
5929fbe7 12584_ACEOF
eb697db5
DN
12585if ac_fn_c_try_link "$LINENO"; then :
12586 ac_cv_lib_resolv___res_send=yes
9452ded1 12587else
eb697db5 12588 ac_cv_lib_resolv___res_send=no
aaa36002 12589fi
eb697db5
DN
12590rm -f core conftest.err conftest.$ac_objext \
12591 conftest$ac_exeext conftest.$ac_ext
12592LIBS=$ac_check_lib_save_LIBS
aaa36002 12593fi
eb697db5
DN
12594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_send" >&5
12595$as_echo "$ac_cv_lib_resolv___res_send" >&6; }
12596if test "x$ac_cv_lib_resolv___res_send" = x""yes; then :
12597 resolv=yes
aaa36002 12598fi
7186fb09 12599
9452ded1 12600fi
7186fb09 12601
aaa36002 12602fi
7186fb09 12603
aaa36002 12604fi
7186fb09 12605
eb697db5
DN
12606 if test "$resolv" = yes ; then
12607 RESOLVLIB=-lresolv
12608 else
12609 RESOLVLIB=
aaa36002 12610 fi
eb697db5
DN
12611 ac_fn_c_check_func "$LINENO" "hes_getmailhost" "ac_cv_func_hes_getmailhost"
12612if test "x$ac_cv_func_hes_getmailhost" = x""yes; then :
aaa36002 12613
eb697db5
DN
12614else
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hes_getmailhost in -lhesiod" >&5
12616$as_echo_n "checking for hes_getmailhost in -lhesiod... " >&6; }
12617if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then :
7186fb09 12618 $as_echo_n "(cached) " >&6
ba4481b5 12619else
eb697db5
DN
12620 ac_check_lib_save_LIBS=$LIBS
12621LIBS="-lhesiod $RESOLVLIB $LIBS"
12622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
aaa36002 12623/* end confdefs.h. */
5929fbe7 12624
eb697db5
DN
12625/* Override any GCC internal prototype to avoid an error.
12626 Use char because int might match the return type of a GCC
12627 builtin and then its argument prototype would still apply. */
12628#ifdef __cplusplus
12629extern "C"
12630#endif
12631char hes_getmailhost ();
12632int
12633main ()
12634{
12635return hes_getmailhost ();
12636 ;
12637 return 0;
12638}
5929fbe7 12639_ACEOF
eb697db5
DN
12640if ac_fn_c_try_link "$LINENO"; then :
12641 ac_cv_lib_hesiod_hes_getmailhost=yes
12642else
12643 ac_cv_lib_hesiod_hes_getmailhost=no
e6df49e4 12644fi
eb697db5
DN
12645rm -f core conftest.err conftest.$ac_objext \
12646 conftest$ac_exeext conftest.$ac_ext
12647LIBS=$ac_check_lib_save_LIBS
12648fi
12649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
12650$as_echo "$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
12651if test "x$ac_cv_lib_hesiod_hes_getmailhost" = x""yes; then :
12652 hesiod=yes
5929fbe7 12653else
eb697db5 12654 :
8c5ff6dd 12655fi
a5edbe4a 12656
5929fbe7 12657fi
cd03c74a 12658
8732a4e9 12659
eb697db5 12660 if test x"$hesiod" = xyes; then
49ebbd65 12661
eb697db5 12662$as_echo "#define HAVE_LIBHESIOD 1" >>confdefs.h
a5edbe4a 12663
eb697db5
DN
12664 LIBHESIOD=-lhesiod
12665 fi
12666fi
e6df49e4 12667
a4f64981 12668
eb697db5
DN
12669# Do we need libresolv (due to res_init or Hesiod)?
12670if test "$resolv" = yes ; then
49ebbd65 12671
eb697db5 12672$as_echo "#define HAVE_LIBRESOLV 1" >>confdefs.h
15e12598 12673
eb697db5
DN
12674 LIBRESOLV=-lresolv
12675else
12676 LIBRESOLV=
12677fi
8c5ff6dd 12678
e6df49e4 12679
eb697db5
DN
12680# These tell us which Kerberos-related libraries to use.
12681COM_ERRLIB=
12682CRYPTOLIB=
12683KRB5LIB=
12684DESLIB=
12685KRB4LIB=
5929fbe7 12686
eb697db5
DN
12687if test "${with_kerberos}" != no; then
12688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5
12689$as_echo_n "checking for com_err in -lcom_err... " >&6; }
12690if test "${ac_cv_lib_com_err_com_err+set}" = set; then :
49ebbd65 12691 $as_echo_n "(cached) " >&6
cd03c74a 12692else
8c5ff6dd 12693 ac_check_lib_save_LIBS=$LIBS
eb697db5
DN
12694LIBS="-lcom_err $LIBS"
12695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49ebbd65 12696/* end confdefs.h. */
8c5ff6dd
KR
12697
12698/* Override any GCC internal prototype to avoid an error.
12699 Use char because int might match the return type of a GCC
12700 builtin and then its argument prototype would still apply. */
12701#ifdef __cplusplus
12702extern "C"
12703#endif
eb697db5 12704char com_err ();
8c5ff6dd
KR
12705int
12706main ()
a4f64981 12707{
eb697db5 12708return com_err ();
8c5ff6dd
KR
12709 ;
12710 return 0;
49ebbd65 12711}
a5edbe4a 12712_ACEOF
eb697db5
DN
12713if ac_fn_c_try_link "$LINENO"; then :
12714 ac_cv_lib_com_err_com_err=yes
49ebbd65 12715else
eb697db5 12716 ac_cv_lib_com_err_com_err=no
8c5ff6dd 12717fi
eb697db5
DN
12718rm -f core conftest.err conftest.$ac_objext \
12719 conftest$ac_exeext conftest.$ac_ext
8c5ff6dd 12720LIBS=$ac_check_lib_save_LIBS
49ebbd65 12721fi
eb697db5
DN
12722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5
12723$as_echo "$ac_cv_lib_com_err_com_err" >&6; }
12724if test "x$ac_cv_lib_com_err_com_err" = x""yes; then :
12725 have_com_err=yes
12726else
12727 have_com_err=no
5929fbe7 12728fi
49ebbd65 12729
eb697db5
DN
12730 if test $have_com_err = yes; then
12731 COM_ERRLIB=-lcom_err
12732 LIBS="$COM_ERRLIB $LIBS"
5929fbe7 12733
eb697db5
DN
12734$as_echo "#define HAVE_LIBCOM_ERR 1" >>confdefs.h
12735
12736 fi
12737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lcrypto" >&5
12738$as_echo_n "checking for mit_des_cbc_encrypt in -lcrypto... " >&6; }
12739if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then :
8c5ff6dd 12740 $as_echo_n "(cached) " >&6
15e12598 12741else
eb697db5
DN
12742 ac_check_lib_save_LIBS=$LIBS
12743LIBS="-lcrypto $LIBS"
12744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12745/* end confdefs.h. */
eb697db5
DN
12746
12747/* Override any GCC internal prototype to avoid an error.
12748 Use char because int might match the return type of a GCC
12749 builtin and then its argument prototype would still apply. */
12750#ifdef __cplusplus
12751extern "C"
12752#endif
12753char mit_des_cbc_encrypt ();
12754int
12755main ()
5929fbe7 12756{
eb697db5
DN
12757return mit_des_cbc_encrypt ();
12758 ;
12759 return 0;
8c5ff6dd 12760}
a4f64981 12761_ACEOF
eb697db5
DN
12762if ac_fn_c_try_link "$LINENO"; then :
12763 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
8c5ff6dd 12764else
eb697db5 12765 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
8c5ff6dd 12766fi
eb697db5
DN
12767rm -f core conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext conftest.$ac_ext
12769LIBS=$ac_check_lib_save_LIBS
12770fi
12771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
12772$as_echo "$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
12773if test "x$ac_cv_lib_crypto_mit_des_cbc_encrypt" = x""yes; then :
12774 have_crypto=yes
12775else
12776 have_crypto=no
a4f64981 12777fi
15e12598 12778
eb697db5
DN
12779 if test $have_crypto = yes; then
12780 CRYPTOLIB=-lcrypto
12781 LIBS="$CRYPTOLIB $LIBS"
12782
12783$as_echo "#define HAVE_LIBCRYPTO 1" >>confdefs.h
e6df49e4 12784
eb697db5
DN
12785 fi
12786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
12787$as_echo_n "checking for mit_des_cbc_encrypt in -lk5crypto... " >&6; }
12788if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then :
12789 $as_echo_n "(cached) " >&6
8c5ff6dd 12790else
eb697db5
DN
12791 ac_check_lib_save_LIBS=$LIBS
12792LIBS="-lk5crypto $LIBS"
12793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12794/* end confdefs.h. */
8c5ff6dd 12795
eb697db5
DN
12796/* Override any GCC internal prototype to avoid an error.
12797 Use char because int might match the return type of a GCC
12798 builtin and then its argument prototype would still apply. */
12799#ifdef __cplusplus
12800extern "C"
12801#endif
12802char mit_des_cbc_encrypt ();
12803int
12804main ()
12805{
12806return mit_des_cbc_encrypt ();
12807 ;
12808 return 0;
12809}
5929fbe7 12810_ACEOF
eb697db5
DN
12811if ac_fn_c_try_link "$LINENO"; then :
12812 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
12813else
12814 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
12815fi
12816rm -f core conftest.err conftest.$ac_objext \
12817 conftest$ac_exeext conftest.$ac_ext
12818LIBS=$ac_check_lib_save_LIBS
12819fi
12820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
12821$as_echo "$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
12822if test "x$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" = x""yes; then :
12823 have_k5crypto=yes
12824else
12825 have_k5crypto=no
5929fbe7 12826fi
8c5ff6dd 12827
eb697db5
DN
12828 if test $have_k5crypto = yes; then
12829 CRYPTOLIB=-lk5crypto
12830 LIBS="$CRYPTOLIB $LIBS"
5929fbe7 12831
eb697db5
DN
12832$as_echo "#define HAVE_LIBK5CRYPTO 1" >>confdefs.h
12833
12834 fi
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5
12836$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; }
12837if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then :
8c5ff6dd
KR
12838 $as_echo_n "(cached) " >&6
12839else
eb697db5
DN
12840 ac_check_lib_save_LIBS=$LIBS
12841LIBS="-lkrb5 $LIBS"
12842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 12843/* end confdefs.h. */
5929fbe7 12844
eb697db5
DN
12845/* Override any GCC internal prototype to avoid an error.
12846 Use char because int might match the return type of a GCC
12847 builtin and then its argument prototype would still apply. */
12848#ifdef __cplusplus
12849extern "C"
5929fbe7 12850#endif
eb697db5
DN
12851char krb5_init_context ();
12852int
12853main ()
12854{
12855return krb5_init_context ();
12856 ;
12857 return 0;
12858}
12859_ACEOF
12860if ac_fn_c_try_link "$LINENO"; then :
12861 ac_cv_lib_krb5_krb5_init_context=yes
12862else
12863 ac_cv_lib_krb5_krb5_init_context=no
12864fi
12865rm -f core conftest.err conftest.$ac_objext \
12866 conftest$ac_exeext conftest.$ac_ext
12867LIBS=$ac_check_lib_save_LIBS
12868fi
12869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5
12870$as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
12871if test "x$ac_cv_lib_krb5_krb5_init_context" = x""yes; then :
12872 have_krb5=yes
12873else
12874 have_krb5=no
12875fi
12876
12877 if test $have_krb5=yes; then
12878 KRB5LIB=-lkrb5
12879 LIBS="$KRB5LIB $LIBS"
12880
12881$as_echo "#define HAVE_LIBKRB5 1" >>confdefs.h
5929fbe7 12882
eb697db5
DN
12883 fi
12884 if test "${with_kerberos5}" = no; then
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes425" >&5
12886$as_echo_n "checking for des_cbc_encrypt in -ldes425... " >&6; }
12887if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then :
12888 $as_echo_n "(cached) " >&6
12889else
12890 ac_check_lib_save_LIBS=$LIBS
12891LIBS="-ldes425 $LIBS"
12892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12893/* end confdefs.h. */
aaa36002
DN
12894
12895/* Override any GCC internal prototype to avoid an error.
12896 Use char because int might match the return type of a GCC
12897 builtin and then its argument prototype would still apply. */
12898#ifdef __cplusplus
12899extern "C"
7186fb09 12900#endif
eb697db5 12901char des_cbc_encrypt ();
0ca10bb7
RC
12902int
12903main ()
12904{
eb697db5 12905return des_cbc_encrypt ();
0ca10bb7
RC
12906 ;
12907 return 0;
12908}
12909_ACEOF
eb697db5
DN
12910if ac_fn_c_try_link "$LINENO"; then :
12911 ac_cv_lib_des425_des_cbc_encrypt=yes
8c5ff6dd 12912else
eb697db5 12913 ac_cv_lib_des425_des_cbc_encrypt=no
a4f64981 12914fi
eb697db5
DN
12915rm -f core conftest.err conftest.$ac_objext \
12916 conftest$ac_exeext conftest.$ac_ext
12917LIBS=$ac_check_lib_save_LIBS
5929fbe7 12918fi
eb697db5
DN
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
12920$as_echo "$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
12921if test "x$ac_cv_lib_des425_des_cbc_encrypt" = x""yes; then :
12922 have_des425=yes
12923else
12924 have_des425=no
5929fbe7 12925fi
8c5ff6dd 12926
eb697db5
DN
12927 if test $have_des425 = yes; then
12928 DESLIB=-ldes425
12929 LIBS="$DESLIB $LIBS"
12930
12931$as_echo "#define HAVE_LIBDES425 1" >>confdefs.h
12932
12933 else
12934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
12935$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
12936if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then :
0ca10bb7
RC
12937 $as_echo_n "(cached) " >&6
12938else
eb697db5
DN
12939 ac_check_lib_save_LIBS=$LIBS
12940LIBS="-ldes $LIBS"
12941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
0ca10bb7 12942/* end confdefs.h. */
edfaf76d 12943
eb697db5
DN
12944/* Override any GCC internal prototype to avoid an error.
12945 Use char because int might match the return type of a GCC
12946 builtin and then its argument prototype would still apply. */
12947#ifdef __cplusplus
12948extern "C"
503d2be0 12949#endif
eb697db5 12950char des_cbc_encrypt ();
19650fd6
AS
12951int
12952main ()
12953{
eb697db5 12954return des_cbc_encrypt ();
503d2be0
AS
12955 ;
12956 return 0;
12957}
12958_ACEOF
eb697db5
DN
12959if ac_fn_c_try_link "$LINENO"; then :
12960 ac_cv_lib_des_des_cbc_encrypt=yes
8c5ff6dd 12961else
eb697db5 12962 ac_cv_lib_des_des_cbc_encrypt=no
a4f64981 12963fi
eb697db5
DN
12964rm -f core conftest.err conftest.$ac_objext \
12965 conftest$ac_exeext conftest.$ac_ext
12966LIBS=$ac_check_lib_save_LIBS
12967fi
12968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
12969$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
12970if test "x$ac_cv_lib_des_des_cbc_encrypt" = x""yes; then :
12971 have_des=yes
12972else
12973 have_des=no
5929fbe7 12974fi
e6df49e4 12975
eb697db5
DN
12976 if test $have_des = yes; then
12977 DESLIB=-ldes
12978 LIBS="$DESLIB $LIBS"
a4f64981 12979
eb697db5 12980$as_echo "#define HAVE_LIBDES 1" >>confdefs.h
5929fbe7 12981
eb697db5
DN
12982 fi
12983 fi
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb4" >&5
12985$as_echo_n "checking for krb_get_cred in -lkrb4... " >&6; }
12986if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then :
e9a63f04 12987 $as_echo_n "(cached) " >&6
ba4481b5 12988else
eb697db5
DN
12989 ac_check_lib_save_LIBS=$LIBS
12990LIBS="-lkrb4 $LIBS"
12991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 12992/* end confdefs.h. */
ba4481b5 12993
0ca10bb7
RC
12994/* Override any GCC internal prototype to avoid an error.
12995 Use char because int might match the return type of a GCC
12996 builtin and then its argument prototype would still apply. */
12997#ifdef __cplusplus
12998extern "C"
a3f08d9e 12999#endif
eb697db5 13000char krb_get_cred ();
503d2be0
AS
13001int
13002main ()
13003{
eb697db5 13004return krb_get_cred ();
503d2be0
AS
13005 ;
13006 return 0;
13007}
13008_ACEOF
eb697db5
DN
13009if ac_fn_c_try_link "$LINENO"; then :
13010 ac_cv_lib_krb4_krb_get_cred=yes
bf89cb4d 13011else
eb697db5 13012 ac_cv_lib_krb4_krb_get_cred=no
91e84f96 13013fi
eb697db5
DN
13014rm -f core conftest.err conftest.$ac_objext \
13015 conftest$ac_exeext conftest.$ac_ext
13016LIBS=$ac_check_lib_save_LIBS
91e84f96 13017fi
eb697db5
DN
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb4_krb_get_cred" >&5
13019$as_echo "$ac_cv_lib_krb4_krb_get_cred" >&6; }
13020if test "x$ac_cv_lib_krb4_krb_get_cred" = x""yes; then :
13021 have_krb4=yes
bf89cb4d 13022else
eb697db5 13023 have_krb4=no
91e84f96
GM
13024fi
13025
eb697db5
DN
13026 if test $have_krb4 = yes; then
13027 KRB4LIB=-lkrb4
13028 LIBS="$KRB4LIB $LIBS"
13029
13030$as_echo "#define HAVE_LIBKRB4 1" >>confdefs.h
13031
13032 else
13033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_get_cred in -lkrb" >&5
13034$as_echo_n "checking for krb_get_cred in -lkrb... " >&6; }
13035if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then :
bf89cb4d 13036 $as_echo_n "(cached) " >&6
bf89cb4d 13037else
eb697db5
DN
13038 ac_check_lib_save_LIBS=$LIBS
13039LIBS="-lkrb $LIBS"
13040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13041/* end confdefs.h. */
a4f64981 13042
eb697db5
DN
13043/* Override any GCC internal prototype to avoid an error.
13044 Use char because int might match the return type of a GCC
13045 builtin and then its argument prototype would still apply. */
13046#ifdef __cplusplus
13047extern "C"
13048#endif
13049char krb_get_cred ();
13050int
13051main ()
13052{
13053return krb_get_cred ();
13054 ;
13055 return 0;
13056}
5929fbe7 13057_ACEOF
eb697db5
DN
13058if ac_fn_c_try_link "$LINENO"; then :
13059 ac_cv_lib_krb_krb_get_cred=yes
5929fbe7 13060else
eb697db5 13061 ac_cv_lib_krb_krb_get_cred=no
a4f64981 13062fi
eb697db5
DN
13063rm -f core conftest.err conftest.$ac_objext \
13064 conftest$ac_exeext conftest.$ac_ext
13065LIBS=$ac_check_lib_save_LIBS
5929fbe7 13066fi
eb697db5
DN
13067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb_krb_get_cred" >&5
13068$as_echo "$ac_cv_lib_krb_krb_get_cred" >&6; }
13069if test "x$ac_cv_lib_krb_krb_get_cred" = x""yes; then :
13070 have_krb=yes
91e84f96 13071else
eb697db5 13072 have_krb=no
6da23aaa 13073fi
0ca10bb7 13074
eb697db5
DN
13075 if test $have_krb = yes; then
13076 KRB4LIB=-lkrb
13077 LIBS="$KRB4LIB $LIBS"
2d2b6695 13078
eb697db5 13079$as_echo "#define HAVE_LIBKRB 1" >>confdefs.h
ca81d7a0 13080
eb697db5
DN
13081 fi
13082 fi
13083 fi
ca81d7a0 13084
eb697db5
DN
13085 if test "${with_kerberos5}" != no; then
13086 for ac_header in krb5.h
13087do :
13088 ac_fn_c_check_header_mongrel "$LINENO" "krb5.h" "ac_cv_header_krb5_h" "$ac_includes_default"
13089if test "x$ac_cv_header_krb5_h" = x""yes; then :
13090 cat >>confdefs.h <<_ACEOF
13091#define HAVE_KRB5_H 1
6da23aaa 13092_ACEOF
eb697db5
DN
13093 ac_fn_c_check_member "$LINENO" "krb5_error" "text" "ac_cv_member_krb5_error_text" "#include <krb5.h>
13094"
13095if test "x$ac_cv_member_krb5_error_text" = x""yes; then :
13096
13097cat >>confdefs.h <<_ACEOF
13098#define HAVE_KRB5_ERROR_TEXT 1
bf89cb4d 13099_ACEOF
2d2b6695 13100
eb697db5 13101
2d2b6695 13102fi
eb697db5
DN
13103ac_fn_c_check_member "$LINENO" "krb5_error" "e_text" "ac_cv_member_krb5_error_e_text" "#include <krb5.h>
13104"
13105if test "x$ac_cv_member_krb5_error_e_text" = x""yes; then :
6da23aaa 13106
eb697db5
DN
13107cat >>confdefs.h <<_ACEOF
13108#define HAVE_KRB5_ERROR_E_TEXT 1
13109_ACEOF
0ca10bb7 13110
0ca10bb7 13111
bf89cb4d 13112fi
2d2b6695
KS
13113
13114fi
13115
eb697db5
DN
13116done
13117
13118 else
13119 for ac_header in des.h
13120do :
13121 ac_fn_c_check_header_mongrel "$LINENO" "des.h" "ac_cv_header_des_h" "$ac_includes_default"
13122if test "x$ac_cv_header_des_h" = x""yes; then :
13123 cat >>confdefs.h <<_ACEOF
13124#define HAVE_DES_H 1
13125_ACEOF
8c5ff6dd 13126
eb697db5
DN
13127else
13128 for ac_header in kerberosIV/des.h
13129do :
13130 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/des.h" "ac_cv_header_kerberosIV_des_h" "$ac_includes_default"
13131if test "x$ac_cv_header_kerberosIV_des_h" = x""yes; then :
13132 cat >>confdefs.h <<_ACEOF
13133#define HAVE_KERBEROSIV_DES_H 1
13134_ACEOF
6da23aaa 13135
eb697db5
DN
13136else
13137 for ac_header in kerberos/des.h
13138do :
13139 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/des.h" "ac_cv_header_kerberos_des_h" "$ac_includes_default"
13140if test "x$ac_cv_header_kerberos_des_h" = x""yes; then :
13141 cat >>confdefs.h <<_ACEOF
13142#define HAVE_KERBEROS_DES_H 1
6da23aaa 13143_ACEOF
3d9fec71 13144
3d9fec71
DL
13145fi
13146
eb697db5 13147done
0ca10bb7 13148
0ca10bb7 13149fi
6da23aaa 13150
eb697db5
DN
13151done
13152
0ca10bb7 13153fi
6da23aaa 13154
eb697db5 13155done
6da23aaa 13156
eb697db5
DN
13157 for ac_header in krb.h
13158do :
13159 ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default"
13160if test "x$ac_cv_header_krb_h" = x""yes; then :
13161 cat >>confdefs.h <<_ACEOF
13162#define HAVE_KRB_H 1
6da23aaa 13163_ACEOF
eb697db5
DN
13164
13165else
13166 for ac_header in kerberosIV/krb.h
13167do :
13168 ac_fn_c_check_header_mongrel "$LINENO" "kerberosIV/krb.h" "ac_cv_header_kerberosIV_krb_h" "$ac_includes_default"
13169if test "x$ac_cv_header_kerberosIV_krb_h" = x""yes; then :
13170 cat >>confdefs.h <<_ACEOF
13171#define HAVE_KERBEROSIV_KRB_H 1
6da23aaa 13172_ACEOF
eb697db5 13173
6da23aaa 13174else
eb697db5
DN
13175 for ac_header in kerberos/krb.h
13176do :
13177 ac_fn_c_check_header_mongrel "$LINENO" "kerberos/krb.h" "ac_cv_header_kerberos_krb_h" "$ac_includes_default"
13178if test "x$ac_cv_header_kerberos_krb_h" = x""yes; then :
13179 cat >>confdefs.h <<_ACEOF
13180#define HAVE_KERBEROS_KRB_H 1
13181_ACEOF
0ca10bb7 13182
0ca10bb7
RC
13183fi
13184
eb697db5 13185done
15e12598 13186
a4f64981 13187fi
eb697db5
DN
13188
13189done
8c5ff6dd 13190
5929fbe7 13191fi
eb697db5
DN
13192
13193done
13194
13195 fi
13196 for ac_header in com_err.h
13197do :
13198 ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default"
13199if test "x$ac_cv_header_com_err_h" = x""yes; then :
6da23aaa 13200 cat >>confdefs.h <<_ACEOF
eb697db5 13201#define HAVE_COM_ERR_H 1
0ca10bb7
RC
13202_ACEOF
13203
13204fi
0ca10bb7 13205
6da23aaa
EZ
13206done
13207
eb697db5 13208fi
6da23aaa 13209
6da23aaa 13210
91e84f96 13211
6da23aaa 13212
6da23aaa 13213
6da23aaa
EZ
13214
13215
eb697db5
DN
13216# Solaris requires -lintl if you want strerror (which calls dgettext)
13217# to return localized messages.
13218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
13219$as_echo_n "checking for dgettext in -lintl... " >&6; }
13220if test "${ac_cv_lib_intl_dgettext+set}" = set; then :
6da23aaa
EZ
13221 $as_echo_n "(cached) " >&6
13222else
eb697db5
DN
13223 ac_check_lib_save_LIBS=$LIBS
13224LIBS="-lintl $LIBS"
13225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
bf89cb4d 13226/* end confdefs.h. */
eb697db5
DN
13227
13228/* Override any GCC internal prototype to avoid an error.
13229 Use char because int might match the return type of a GCC
13230 builtin and then its argument prototype would still apply. */
13231#ifdef __cplusplus
13232extern "C"
13233#endif
13234char dgettext ();
91e84f96
GM
13235int
13236main ()
6da23aaa 13237{
eb697db5 13238return dgettext ();
91e84f96
GM
13239 ;
13240 return 0;
6da23aaa
EZ
13241}
13242_ACEOF
eb697db5
DN
13243if ac_fn_c_try_link "$LINENO"; then :
13244 ac_cv_lib_intl_dgettext=yes
13245else
13246 ac_cv_lib_intl_dgettext=no
13247fi
13248rm -f core conftest.err conftest.$ac_objext \
13249 conftest$ac_exeext conftest.$ac_ext
13250LIBS=$ac_check_lib_save_LIBS
13251fi
13252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
13253$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
13254if test "x$ac_cv_lib_intl_dgettext" = x""yes; then :
13255 cat >>confdefs.h <<_ACEOF
13256#define HAVE_LIBINTL 1
8c5ff6dd 13257_ACEOF
eb697db5
DN
13258
13259 LIBS="-lintl $LIBS"
13260
13261fi
13262
13263
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime caches TZ" >&5
13265$as_echo_n "checking whether localtime caches TZ... " >&6; }
13266if test "${emacs_cv_localtime_cache+set}" = set; then :
13267 $as_echo_n "(cached) " >&6
13268else
13269 if test x$ac_cv_func_tzset = xyes; then
13270if test "$cross_compiling" = yes; then :
13271 # If we have tzset, assume the worst when cross-compiling.
13272emacs_cv_localtime_cache=yes
13273else
13274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8c5ff6dd 13275/* end confdefs.h. */
eb697db5
DN
13276#include <time.h>
13277extern char **environ;
13278unset_TZ ()
13279{
13280 char **from, **to;
13281 for (to = from = environ; (*to = *from); from++)
13282 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
13283 to++;
13284}
13285char TZ_GMT0[] = "TZ=GMT0";
13286char TZ_PST8[] = "TZ=PST8";
13287main()
13288{
13289 time_t now = time ((time_t *) 0);
13290 int hour_GMT0, hour_unset;
13291 if (putenv (TZ_GMT0) != 0)
13292 exit (1);
13293 hour_GMT0 = localtime (&now)->tm_hour;
13294 unset_TZ ();
13295 hour_unset = localtime (&now)->tm_hour;
13296 if (putenv (TZ_PST8) != 0)
13297 exit (1);
13298 if (localtime (&now)->tm_hour == hour_GMT0)
13299 exit (1);
13300 unset_TZ ();
13301 if (localtime (&now)->tm_hour != hour_unset)
13302 exit (1);
13303 exit (0);
13304}
13305_ACEOF
13306if ac_fn_c_try_run "$LINENO"; then :
13307 emacs_cv_localtime_cache=no
13308else
13309 emacs_cv_localtime_cache=yes
13310fi
13311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13312 conftest.$ac_objext conftest.beam conftest.$ac_ext
13313fi
13314
13315else
13316 # If we lack tzset, report that localtime does not cache TZ,
13317 # since we can't invalidate the cache if we don't have tzset.
13318 emacs_cv_localtime_cache=no
13319fi
13320fi
13321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_localtime_cache" >&5
13322$as_echo "$emacs_cv_localtime_cache" >&6; }
13323if test $emacs_cv_localtime_cache = yes; then
13324
13325$as_echo "#define LOCALTIME_CACHE 1" >>confdefs.h
13326
13327fi
13328
13329if test "x$HAVE_TIMEVAL" = xyes; then
13330 for ac_func in gettimeofday
13331do :
13332 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
13333if test "x$ac_cv_func_gettimeofday" = x""yes; then :
13334 cat >>confdefs.h <<_ACEOF
13335#define HAVE_GETTIMEOFDAY 1
13336_ACEOF
13337
13338fi
13339done
13340
13341 if test $ac_cv_func_gettimeofday = yes; then
13342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday can accept two arguments" >&5
13343$as_echo_n "checking whether gettimeofday can accept two arguments... " >&6; }
13344if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then :
13345 $as_echo_n "(cached) " >&6
13346else
13347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13348/* end confdefs.h. */
13349
13350#ifdef TIME_WITH_SYS_TIME
13351#include <sys/time.h>
13352#include <time.h>
13353#else
13354#ifdef HAVE_SYS_TIME_H
13355#include <sys/time.h>
13356#else
13357#include <time.h>
13358#endif
13359#endif
aaa36002
DN
13360int
13361main ()
a4f64981 13362{
eb697db5
DN
13363struct timeval time;
13364 gettimeofday (&time, 0);
aaa36002
DN
13365 ;
13366 return 0;
eb697db5
DN
13367}
13368_ACEOF
13369if ac_fn_c_try_compile "$LINENO"; then :
13370 emacs_cv_gettimeofday_two_arguments=yes
e9a63f04 13371else
eb697db5 13372 emacs_cv_gettimeofday_two_arguments=no
e9a63f04 13373fi
e9a63f04 13374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
eb697db5
DN
13375fi
13376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_gettimeofday_two_arguments" >&5
13377$as_echo "$emacs_cv_gettimeofday_two_arguments" >&6; }
13378 if test $emacs_cv_gettimeofday_two_arguments = no; then
19650fd6 13379
eb697db5 13380$as_echo "#define GETTIMEOFDAY_ONE_ARGUMENT 1" >>confdefs.h
e9a63f04 13381
eb697db5
DN
13382 fi
13383 fi
647847ea 13384fi
ca81d7a0 13385
eb697db5
DN
13386ok_so_far=yes
13387ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13388if test "x$ac_cv_func_socket" = x""yes; then :
13389
5929fbe7 13390else
eb697db5
DN
13391 ok_so_far=no
13392fi
503d2be0 13393
eb697db5
DN
13394if test $ok_so_far = yes; then
13395 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
13396if test "x$ac_cv_header_netinet_in_h" = x""yes; then :
647847ea 13397
eb697db5
DN
13398else
13399 ok_so_far=no
647847ea
DL
13400fi
13401
c0d27fcc 13402
c0d27fcc 13403fi
eb697db5
DN
13404if test $ok_so_far = yes; then
13405 ac_fn_c_check_header_mongrel "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default"
13406if test "x$ac_cv_header_arpa_inet_h" = x""yes; then :
5929fbe7 13407
eb697db5
DN
13408else
13409 ok_so_far=no
c0d27fcc 13410fi
ca81d7a0 13411
19650fd6 13412
647847ea 13413fi
eb697db5 13414if test $ok_so_far = yes; then
ca81d7a0 13415
eb697db5 13416$as_echo "#define HAVE_INET_SOCKETS 1" >>confdefs.h
ca81d7a0 13417
647847ea 13418fi
c0d27fcc 13419
eb697db5
DN
13420for ac_header in sys/ioctl.h
13421do :
13422 ac_fn_c_check_header_mongrel "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
13423if test "x$ac_cv_header_sys_ioctl_h" = x""yes; then :
c0d27fcc 13424 cat >>confdefs.h <<_ACEOF
eb697db5 13425#define HAVE_SYS_IOCTL_H 1
c0d27fcc 13426_ACEOF
647847ea 13427
73b77ee5 13428fi
c0d27fcc 13429
503d2be0 13430done
73b77ee5 13431
c0d27fcc 13432
eb697db5 13433if test -f /usr/lpp/X11/bin/smt.exp; then
15e12598 13434
eb697db5 13435$as_echo "#define HAVE_AIX_SMT_EXP 1" >>confdefs.h
8c5ff6dd 13436
eb697db5 13437fi
49ebbd65 13438
eb697db5
DN
13439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports dynamic ptys" >&5
13440$as_echo_n "checking whether system supports dynamic ptys... " >&6; }
13441if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13443$as_echo "yes" >&6; }
15e12598 13444
eb697db5 13445$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
8c5ff6dd 13446
eb697db5
DN
13447else
13448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13449$as_echo "no" >&6; }
13450fi
13451
13452ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13453if test "x$ac_cv_type_pid_t" = x""yes; then :
15e12598 13454
5929fbe7 13455else
8c5ff6dd 13456
eb697db5
DN
13457cat >>confdefs.h <<_ACEOF
13458#define pid_t int
13459_ACEOF
13460
a4f64981 13461fi
8c5ff6dd 13462
eb697db5
DN
13463for ac_header in vfork.h
13464do :
13465 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13466if test "x$ac_cv_header_vfork_h" = x""yes; then :
13467 cat >>confdefs.h <<_ACEOF
13468#define HAVE_VFORK_H 1
13469_ACEOF
13470
5929fbe7 13471fi
eb697db5
DN
13472
13473done
13474
13475for ac_func in fork vfork
13476do :
13477 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13478ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13479eval as_val=\$$as_ac_var
13480 if test "x$as_val" = x""yes; then :
c0d27fcc 13481 cat >>confdefs.h <<_ACEOF
e9a63f04 13482#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 13483_ACEOF
503d2be0 13484
fa0b693c 13485fi
503d2be0 13486done
fa0b693c 13487
503d2be0 13488if test "x$ac_cv_func_fork" = xyes; then
eb697db5 13489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
e9a63f04 13490$as_echo_n "checking for working fork... " >&6; }
eb697db5 13491if test "${ac_cv_func_fork_works+set}" = set; then :
e9a63f04 13492 $as_echo_n "(cached) " >&6
fa0b693c 13493else
eb697db5 13494 if test "$cross_compiling" = yes; then :
503d2be0
AS
13495 ac_cv_func_fork_works=cross
13496else
eb697db5 13497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
ca81d7a0
JD
13498/* end confdefs.h. */
13499$ac_includes_default
13500int
13501main ()
13502{
13503
13504 /* By Ruediger Kuhlmann. */
13505 return fork () < 0;
13506
13507 ;
13508 return 0;
13509}
503d2be0 13510_ACEOF
eb697db5 13511if ac_fn_c_try_run "$LINENO"; then :
503d2be0
AS
13512 ac_cv_func_fork_works=yes
13513else
eb697db5 13514 ac_cv_func_fork_works=no
503d2be0 13515fi
eb697db5
DN
13516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13517 conftest.$ac_objext conftest.beam conftest.$ac_ext
503d2be0 13518fi
ca81d7a0 13519
503d2be0 13520fi
eb697db5 13521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
e9a63f04 13522$as_echo "$ac_cv_func_fork_works" >&6; }
503d2be0 13523
6bae0ccf
DL
13524else
13525 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
13526fi
13527if test "x$ac_cv_func_fork_works" = xcross; then
13528 case $host in
13529 *-*-amigaos* | *-*-msdosdjgpp*)
13530 # Override, as these systems have only a dummy fork() stub
13531 ac_cv_func_fork_works=no
13532 ;;
13533 *)
13534 ac_cv_func_fork_works=yes
13535 ;;
13536 esac
eb697db5 13537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
e9a63f04 13538$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 13539fi
73b77ee5 13540ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 13541if test "x$ac_cv_func_vfork" = xyes; then
eb697db5 13542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
e9a63f04 13543$as_echo_n "checking for working vfork... " >&6; }
eb697db5 13544if test "${ac_cv_func_vfork_works+set}" = set; then :
e9a63f04 13545 $as_echo_n "(cached) " >&6
503d2be0 13546else
eb697db5 13547 if test "$cross_compiling" = yes; then :
503d2be0 13548 ac_cv_func_vfork_works=cross
fa0b693c 13549else
eb697db5 13550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13551/* end confdefs.h. */
73b77ee5 13552/* Thanks to Paul Eggert for this test. */
ca81d7a0 13553$ac_includes_default
19650fd6 13554#include <sys/wait.h>
f053c89f 13555#ifdef HAVE_VFORK_H
503d2be0 13556# include <vfork.h>
73b77ee5
GM
13557#endif
13558/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
13559 argument registers are propagated back to the parent. The compiler
13560 is told about this with #include <vfork.h>, but some compilers
13561 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13562 static variable whose address is put into a register that is
13563 clobbered by the vfork. */
19650fd6 13564static void
fa0b693c 13565#ifdef __cplusplus
73b77ee5 13566sparc_address_test (int arg)
503d2be0 13567# else
73b77ee5 13568sparc_address_test (arg) int arg;
fa0b693c 13569#endif
fa0b693c 13570{
73b77ee5
GM
13571 static pid_t child;
13572 if (!child) {
13573 child = vfork ();
13574 if (child < 0) {
13575 perror ("vfork");
13576 _exit(2);
13577 }
13578 if (!child) {
13579 arg = getpid();
13580 write(-1, "", 0);
13581 _exit (arg);
13582 }
13583 }
13584}
503d2be0
AS
13585
13586int
13587main ()
13588{
73b77ee5
GM
13589 pid_t parent = getpid ();
13590 pid_t child;
fa0b693c 13591
19650fd6 13592 sparc_address_test (0);
fa0b693c 13593
73b77ee5 13594 child = vfork ();
fa0b693c 13595
73b77ee5 13596 if (child == 0) {
503d2be0
AS
13597 /* Here is another test for sparc vfork register problems. This
13598 test uses lots of local variables, at least as many local
13599 variables as main has allocated so far including compiler
13600 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13601 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13602 reuse the register of parent for one of the local variables,
13603 since it will think that parent can't possibly be used any more
13604 in this routine. Assigning to the local variable will thus
13605 munge parent in the parent process. */
73b77ee5
GM
13606 pid_t
13607 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13608 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13609 /* Convince the compiler that p..p7 are live; otherwise, it might
13610 use the same hardware register for all 8 local variables. */
13611 if (p != p1 || p != p2 || p != p3 || p != p4
13612 || p != p5 || p != p6 || p != p7)
13613 _exit(1);
fa0b693c 13614
503d2be0
AS
13615 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13616 from child file descriptors. If the child closes a descriptor
13617 before it execs or exits, this munges the parent's descriptor
13618 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
13619 _exit(close(fileno(stdout)) != 0);
13620 } else {
13621 int status;
13622 struct stat st;
13623
13624 while (wait(&status) != child)
13625 ;
ca81d7a0 13626 return (
73b77ee5
GM
13627 /* Was there some problem with vforking? */
13628 child < 0
13629
13630 /* Did the child fail? (This shouldn't happen.) */
13631 || status
13632
13633 /* Did the vfork/compiler bug occur? */
13634 || parent != getpid()
fa0b693c 13635
73b77ee5
GM
13636 /* Did the file descriptor bug occur? */
13637 || fstat(fileno(stdout), &st) != 0
13638 );
13639 }
13640}
503d2be0 13641_ACEOF
eb697db5 13642if ac_fn_c_try_run "$LINENO"; then :
73b77ee5 13643 ac_cv_func_vfork_works=yes
fa0b693c 13644else
eb697db5 13645 ac_cv_func_vfork_works=no
503d2be0 13646fi
eb697db5
DN
13647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13648 conftest.$ac_objext conftest.beam conftest.$ac_ext
fa0b693c 13649fi
ca81d7a0 13650
fa0b693c 13651fi
eb697db5 13652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
e9a63f04 13653$as_echo "$ac_cv_func_vfork_works" >&6; }
fa0b693c 13654
503d2be0
AS
13655fi;
13656if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 13657 ac_cv_func_vfork_works=$ac_cv_func_vfork
eb697db5 13658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
e9a63f04 13659$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
13660fi
13661
503d2be0
AS
13662if test "x$ac_cv_func_vfork_works" = xyes; then
13663
eb697db5 13664$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
503d2be0
AS
13665
13666else
13667
eb697db5 13668$as_echo "#define vfork fork" >>confdefs.h
fa0b693c
GM
13669
13670fi
503d2be0
AS
13671if test "x$ac_cv_func_fork_works" = xyes; then
13672
eb697db5 13673$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
fa0b693c 13674
503d2be0 13675fi
647847ea 13676
c0d27fcc 13677
eb697db5 13678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
e9a63f04 13679$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
eb697db5 13680if test "${emacs_cv_langinfo_codeset+set}" = set; then :
e9a63f04 13681 $as_echo_n "(cached) " >&6
6a3a24fa 13682else
eb697db5 13683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13684/* end confdefs.h. */
6a3a24fa
JD
13685#include <langinfo.h>
13686int
13687main ()
13688{
13689char* cs = nl_langinfo(CODESET);
15e12598
VB
13690 ;
13691 return 0;
8c5ff6dd 13692}
eb697db5
DN
13693_ACEOF
13694if ac_fn_c_try_link "$LINENO"; then :
13695 emacs_cv_langinfo_codeset=yes
5929fbe7 13696else
eb697db5 13697 emacs_cv_langinfo_codeset=no
8c5ff6dd 13698fi
eb697db5
DN
13699rm -f core conftest.err conftest.$ac_objext \
13700 conftest$ac_exeext conftest.$ac_ext
a4f64981 13701
eb697db5
DN
13702fi
13703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_langinfo_codeset" >&5
13704$as_echo "$emacs_cv_langinfo_codeset" >&6; }
13705if test $emacs_cv_langinfo_codeset = yes; then
5929fbe7 13706
eb697db5 13707$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
e9a63f04 13708
8730a8da 13709fi
dc2933eb 13710
eb697db5
DN
13711ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13712if test "x$ac_cv_type_size_t" = x""yes; then :
503d2be0 13713
c0d27fcc
MR
13714cat >>confdefs.h <<_ACEOF
13715#define HAVE_SIZE_T 1
13716_ACEOF
13717
8730a8da
DL
13718
13719fi
13720
c0d27fcc 13721
eb697db5 13722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
e9a63f04 13723$as_echo_n "checking for mbstate_t... " >&6; }
eb697db5 13724if test "${ac_cv_type_mbstate_t+set}" = set; then :
e9a63f04 13725 $as_echo_n "(cached) " >&6
973a76b1 13726else
eb697db5 13727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13728/* end confdefs.h. */
973a76b1
DL
13729$ac_includes_default
13730# include <wchar.h>
13731int
13732main ()
13733{
13734mbstate_t x; return sizeof x;
13735 ;
13736 return 0;
13737}
13738_ACEOF
eb697db5 13739if ac_fn_c_try_compile "$LINENO"; then :
973a76b1
DL
13740 ac_cv_type_mbstate_t=yes
13741else
eb697db5 13742 ac_cv_type_mbstate_t=no
973a76b1 13743fi
ca81d7a0 13744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 13745fi
eb697db5 13746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
e9a63f04 13747$as_echo "$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
13748 if test $ac_cv_type_mbstate_t = yes; then
13749
eb697db5 13750$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
973a76b1
DL
13751
13752 else
13753
eb697db5 13754$as_echo "#define mbstate_t int" >>confdefs.h
973a76b1
DL
13755
13756 fi
13757
eb697db5 13758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restrict keyword" >&5
e9a63f04 13759$as_echo_n "checking for C restrict keyword... " >&6; }
eb697db5 13760if test "${emacs_cv_c_restrict+set}" = set; then :
e9a63f04 13761 $as_echo_n "(cached) " >&6
22044edf 13762else
eb697db5 13763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13764/* end confdefs.h. */
22044edf
DL
13765void fred (int *restrict x);
13766int
13767main ()
13768{
b936fae4 13769
22044edf
DL
13770 ;
13771 return 0;
13772}
c0d27fcc 13773_ACEOF
eb697db5 13774if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13775 emacs_cv_c_restrict=yes
13776else
eb697db5 13777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13778/* end confdefs.h. */
22044edf
DL
13779void fred (int *__restrict x);
13780int
13781main ()
13782{
c0d27fcc 13783
22044edf
DL
13784 ;
13785 return 0;
13786}
c0d27fcc 13787_ACEOF
eb697db5 13788if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13789 emacs_cv_c_restrict=__restrict
13790else
eb697db5 13791 emacs_cv_c_restrict=no
ba4481b5 13792fi
ca81d7a0 13793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13794fi
ca81d7a0 13795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 13796fi
eb697db5 13797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict" >&5
e9a63f04 13798$as_echo "$emacs_cv_c_restrict" >&6; }
22044edf
DL
13799case "$emacs_cv_c_restrict" in
13800 yes) emacs_restrict=restrict;;
13801 no) emacs_restrict="";;
13802 *) emacs_restrict="$emacs_cv_c_restrict";;
13803esac
13804if test "$emacs_restrict" != __restrict; then
b936fae4 13805
22044edf
DL
13806cat >>confdefs.h <<_ACEOF
13807#define __restrict $emacs_restrict
c0d27fcc 13808_ACEOF
ba4481b5
DL
13809
13810fi
ba4481b5 13811
eb697db5 13812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C restricted array declarations" >&5
e9a63f04 13813$as_echo_n "checking for C restricted array declarations... " >&6; }
eb697db5 13814if test "${emacs_cv_c_restrict_arr+set}" = set; then :
e9a63f04 13815 $as_echo_n "(cached) " >&6
22044edf 13816else
eb697db5 13817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19650fd6 13818/* end confdefs.h. */
22044edf
DL
13819void fred (int x[__restrict]);
13820int
13821main ()
13822{
b936fae4 13823
22044edf
DL
13824 ;
13825 return 0;
13826}
c0d27fcc 13827_ACEOF
eb697db5 13828if ac_fn_c_try_compile "$LINENO"; then :
22044edf
DL
13829 emacs_cv_c_restrict_arr=yes
13830else
eb697db5 13831 emacs_cv_c_restrict_arr=no
ba4481b5 13832fi
ca81d7a0 13833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 13834fi
eb697db5 13835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_c_restrict_arr" >&5
e9a63f04 13836$as_echo "$emacs_cv_c_restrict_arr" >&6; }
22044edf 13837if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 13838
eb697db5 13839$as_echo "#define __restrict_arr __restrict" >>confdefs.h
ba4481b5 13840
ba4481b5
DL
13841fi
13842
c0d27fcc 13843
c0d27fcc 13844
22044edf
DL
13845# Set up the CFLAGS for real compilation, so we can substitute it.
13846CFLAGS="$REAL_CFLAGS"
13847CPPFLAGS="$REAL_CPPFLAGS"
13848
9978c06c
CY
13849## Hack to detect a buggy GCC version.
13850if test "x$GCC" = xyes \
13851 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
13852 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
13853 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
eb697db5 13854 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
9978c06c
CY
13855fi
13856
22044edf 13857#### Find out which version of Emacs this is.
8c5ff6dd 13858version=`grep 'const char emacs_version' ${srcdir}/src/emacs.c \
22044edf
DL
13859 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
13860if test x"${version}" = x; then
eb697db5 13861 as_fn_error "can't find current emacs version in \`${srcdir}/src/emacs.c'." "$LINENO" 5
22044edf 13862fi
879de935 13863if test x"${version}" != x"$PACKAGE_VERSION"; then
eb697db5 13864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&5
8c5ff6dd 13865$as_echo "$as_me: WARNING: version mismatch between \`${srcdir}/configure.in' and \`${srcdir}/src/emacs.c'." >&2;}
879de935 13866fi
22044edf
DL
13867
13868### Specify what sort of things we'll be editing into Makefile and config.h.
13869### Use configuration here uncanonicalized to avoid exceeding size limits.
13870
13871
4286c48d 13872## Unused?
22044edf
DL
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
22044edf 13892
4286c48d
GM
13893## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
13894## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
13895## end of LIBX_BASE, but nothing ever set it.
22044edf
DL
13896
13897
13898
13899
c82a7244 13900## Used in lwlib/Makefile.in.
22044edf
DL
13901
13902
6a3a24fa 13903
06b62770
AR
13904
13905
13906
48fad8e8
DN
13907
13908
5e159d07
CY
13909
13910
edfda783 13911
91231421 13912
22044edf
DL
13913cat >>confdefs.h <<_ACEOF
13914#define EMACS_CONFIGURATION "${canonical}"
13915_ACEOF
13916
13917
13918cat >>confdefs.h <<_ACEOF
13919#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
13920_ACEOF
13921
13922
13923cat >>confdefs.h <<_ACEOF
13924#define config_machfile "${machfile}"
13925_ACEOF
13926
13927
13928cat >>confdefs.h <<_ACEOF
13929#define config_opsysfile "${opsysfile}"
13930_ACEOF
13931
13932
e765bf58
JD
13933XMENU_OBJ=
13934XOBJ=
5929fbe7 13935FONT_OBJ=
22044edf
DL
13936if test "${HAVE_X_WINDOWS}" = "yes" ; then
13937
eb697db5 13938$as_echo "#define HAVE_X_WINDOWS 1" >>confdefs.h
22044edf 13939
e765bf58
JD
13940 XMENU_OBJ=xmenu.o
13941 XOBJ="xterm.o xfns.o xselect.o xrdb.o fontset.o xsmfns.o fringe.o image.o xsettings.o xgselect.o"
5929fbe7
GM
13942 FONT_OBJ=xfont.o
13943 if test "$HAVE_XFT" = "yes"; then
13944 FONT_OBJ="$FONT_OBJ ftfont.o xftfont.o ftxfont.o"
13945 elif test "$HAVE_FREETYPE" = "yes"; then
13946 FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
13947 fi
13948
22044edf 13949fi
e765bf58
JD
13950
13951
13952
5929fbe7 13953
7186fb09 13954WIDGET_OBJ=
c82a7244 13955MOTIF_LIBW=
22044edf 13956if test "${USE_X_TOOLKIT}" != "none" ; then
7186fb09 13957 WIDGET_OBJ=widget.o
22044edf 13958
eb697db5 13959$as_echo "#define USE_X_TOOLKIT 1" >>confdefs.h
22044edf 13960
39dd4d52 13961 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5 13962
eb697db5 13963$as_echo "#define USE_LUCID 1" >>confdefs.h
73d798d5 13964
39dd4d52 13965 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5 13966
eb697db5 13967$as_echo "#define USE_MOTIF 1" >>confdefs.h
73d798d5 13968
c82a7244
GM
13969 MOTIF_LIBW=-lXm
13970 case "$opsys" in
13971 gnu-linux)
13972 ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
13973 MOTIF_LIBW="$MOTIF_LIBW -lXpm"
13974 ;;
13975
13976 unixware)
13977 ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
13978 ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
13979 MOTIF_LIBW="MOTIF_LIBW -lXimp"
13980 ;;
13981
13982 aix4-2)
13983 ## olson@mcs.anl.gov says -li18n is needed by -lXm.
13984 MOTIF_LIBW="$MOTIF_LIBW -li18n"
13985 ;;
13986 esac
13987 MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
73d798d5 13988 fi
22044edf 13989fi
7186fb09 13990
c82a7244 13991
718a19c8 13992TOOLKIT_LIBW=
c82a7244
GM
13993case "$USE_X_TOOLKIT" in
13994 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
13995 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
718a19c8 13996 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
c82a7244
GM
13997esac
13998
13999
a5edbe4a
GM
14000if test "$USE_X_TOOLKIT" = "none"; then
14001 LIBXT_OTHER="\$(LIBXSM)"
8b44daa0 14002 OLDXMENU_TARGET="really-oldXMenu"
a5edbe4a
GM
14003else
14004 LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
8b44daa0 14005 OLDXMENU_TARGET="really-lwlib"
a5edbe4a
GM
14006fi
14007
14008
718a19c8
GM
14009## The X Menu stuff is present in the X10 distribution, but missing
14010## from X11. If we have X10, just use the installed library;
14011## otherwise, use our own copy.
22044edf
DL
14012if test "${HAVE_X11}" = "yes" ; then
14013
eb697db5 14014$as_echo "#define HAVE_X11 1" >>confdefs.h
22044edf 14015
718a19c8
GM
14016
14017 if test "$USE_X_TOOLKIT" = "none"; then
14018 OLDXMENU="\${oldXMenudir}libXMenu11.a"
14019 else
14020 OLDXMENU="\${lwlibdir}liblw.a"
14021 fi
14022 LIBXMENU="\$(OLDXMENU)"
a5edbe4a 14023 LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)"
16455a85 14024 OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}"
718a19c8 14025else
298b8a34
GM
14026 ## For a syntactically valid Makefile; not actually used for anything.
14027 ## See comments in src/Makefile.in.
14028 OLDXMENU=nothing
1dea46de
GM
14029 ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?).
14030 if test "${HAVE_X_WINDOWS}" = "yes"; then
14031 LIBXMENU="-lXMenu"
14032 else
14033 LIBXMENU=
14034 fi
a5edbe4a 14035 LIBX_OTHER=
16455a85 14036 OLDXMENU_DEPS=
22044edf 14037fi
718a19c8 14038
4286c48d 14039if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then
298b8a34
GM
14040 OLDXMENU_TARGET=
14041 OLDXMENU=nothing
718a19c8 14042 LIBXMENU=
16455a85 14043 OLDXMENU_DEPS=
718a19c8
GM
14044fi
14045
14046
14047
14048
a5edbe4a 14049
16455a85 14050
298b8a34 14051
22044edf
DL
14052if test "${HAVE_MENUS}" = "yes" ; then
14053
eb697db5 14054$as_echo "#define HAVE_MENUS 1" >>confdefs.h
22044edf
DL
14055
14056fi
4f91d9c8 14057
22044edf
DL
14058if test "${GNU_MALLOC}" = "yes" ; then
14059
eb697db5 14060$as_echo "#define GNU_MALLOC 1" >>confdefs.h
22044edf
DL
14061
14062fi
4f91d9c8
GM
14063
14064RALLOC_OBJ=
22044edf
DL
14065if test "${REL_ALLOC}" = "yes" ; then
14066
eb697db5 14067$as_echo "#define REL_ALLOC 1" >>confdefs.h
22044edf 14068
4f91d9c8
GM
14069
14070 test "$system_malloc" != "yes" && RALLOC_OBJ=ralloc.o
22044edf
DL
14071fi
14072
718a19c8 14073
718a19c8
GM
14074if test "$opsys" = "cygwin"; then
14075 CYGWIN_OBJ="sheap.o"
14076 ## Cygwin differs because of its unexec().
7acac9f4 14077 PRE_ALLOC_OBJ=
4f91d9c8 14078 POST_ALLOC_OBJ=lastfile.o
718a19c8
GM
14079else
14080 CYGWIN_OBJ=
7acac9f4 14081 PRE_ALLOC_OBJ=lastfile.o
4f91d9c8 14082 POST_ALLOC_OBJ=
718a19c8
GM
14083fi
14084
106c6f74 14085
22044edf
DL
14086
14087
c0d27fcc 14088
ede4834a
GM
14089case "$opsys" in
14090 aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
14091
14092 darwin)
a0c06748
GM
14093 ## The -headerpad option tells ld (see man page) to leave room at the
14094 ## end of the header for adding load commands. Needed for dumping.
14095 ## 0x690 is the total size of 30 segment load commands (at 56
14096 ## each); under Cocoa 31 commands are required.
14097 if test "$HAVE_NS" = "yes"; then
14098 libs_nsgui="-framework AppKit"
14099 headerpad_extra=6C8
14100 else
14101 libs_nsgui=
14102 headerpad_extra=690
14103 fi
14104 LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
14105
14106 ## This is here because src/Makefile.in did some extra fiddling around
14107 ## with LD_SWITCH_SYSTEM. The cpp logic was:
14108 ## #ifndef LD_SWITCH_SYSTEM
14109 ## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
14110 ## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
14111 ## not using gcc, darwin system not on an alpha (ie darwin, since
14112 ## darwin + alpha does not occur).
14113 ## Because this was done in src/Makefile.in, the resulting part of
14114 ## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
14115 ## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
14116 ## rather than LD_SWITCH_SYSTEM.
14117 test "x$LD_SWITCH_SYSTEM" = "x" && test "x$GCC" != "xyes" && \
14118 LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
14119 ;;
14120
14121 ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
14122 ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
14123 ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
14124 ## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
14125 ## had different values in configure (in ac_link) and src/Makefile.in.
14126 ## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
14127 gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
ede4834a
GM
14128
14129 *) LD_SWITCH_SYSTEM_TEMACS= ;;
14130esac
14131
a25e81b3 14132if test "$NS_IMPL_GNUSTEP" = "yes"; then
7dddde4b
GM
14133 LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread"
14134fi
14135
14136
ede4834a
GM
14137
14138
ebbc2619
GM
14139LINKER=
14140ORDINARY_LINK=
14141case "$opsys" in
14142 ## gnu: GNU needs its own crt0.
14143 aix4-2|darwin|gnu|usg5-4|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;;
14144
14145 cygwin) LINKER="\$(CC)" ;;
14146
14147 ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the
14148 ## library search parth, i.e. it won't search /usr/lib for libc and
14149 ## friends. Using -nostartfiles instead avoids this problem, and
14150 ## will also work on earlier NetBSD releases.
14151 netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;;
14152
14153 ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
14154 ## MkLinux/LinuxPPC needs this.
14155 ## ibms390x only supports opsys = gnu-linux so it can be added here.
14156 gnu-*)
14157 case "$machine" in
14158 macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;;
14159 esac
14160 ;;
14161esac
14162
90278cb6
GM
14163
14164PRE_EDIT_LDFLAGS=
14165POST_EDIT_LDFLAGS=
ebbc2619
GM
14166if test "x$ORDINARY_LINK" = "xyes"; then
14167
14168 LINKER="\$(CC)"
14169
eb697db5 14170$as_echo "#define ORDINARY_LINK 1" >>confdefs.h
ebbc2619
GM
14171
14172
14173## The system files defining neither ORDINARY_LINK nor LINKER are:
14174## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*.
14175elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then
14176
14177 ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
14178 ## places that are difficult to figure out at make time. Fortunately,
14179 ## these same versions allow you to pass arbitrary flags on to the
14180 ## linker, so there is no reason not to use it as a linker.
14181 ##
14182 ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from
14183 ## searching for libraries in its internal directories, so we have to
14184 ## ask GCC explicitly where to find libgcc.a (LIB_GCC below).
14185 LINKER="\$(CC) -nostdlib"
14186 ## GCC passes any argument prefixed with -Xlinker directly to the linker.
14187 ## See prefix-args.c for an explanation of why we do not do this with the
14188 ## shell''s ``for'' construct. Note that sane people do not have '.' in
14189 ## their paths, so we must use ./prefix-args.
14190 ## TODO either make prefix-args check ORDINARY_LINK internally,
90278cb6
GM
14191 ## or remove it altogether (bug#6184), removing the need for this hack.
14192 PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker'
14193 POST_EDIT_LDFLAGS='`'
ebbc2619
GM
14194fi
14195
14196
90278cb6 14197
ebbc2619 14198test "x$LINKER" = "x" && LINKER=ld
81ac4f35 14199## FIXME? What setting of EDIT_LDFLAGS should this have?
ebbc2619
GM
14200test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic"
14201
14202
14203
14204
81ac4f35
GM
14205## FIXME? The logic here is not precisely the same as that above.
14206## There is no check here for a pre-defined LINKER.
14207## Should we only be setting LIB_GCC if LD ~ -nostdlib?
057886a3 14208LIB_GCC=
ebbc2619 14209if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then
057886a3
GM
14210
14211 case "$opsys" in
14212 ## cygwin: don't link against static libgcc.
14213 cygwin|freebsd|netbsd|openbsd) LIB_GCC= ;;
14214
14215 gnu-*)
14216 ## armin76@gentoo.org reported that the lgcc_s flag is necessary to
14217 ## build on ARM EABI under GNU/Linux. (Bug#5518)
14218 ## Note that m/arm.h never bothered to undefine LIB_GCC first.
14219 if test "$machine" = "arm"; then
14220 LIB_GCC="-lgcc_s"
14221 else
14222 ## FIXME? s/gnu-linux.h used to define LIB_GCC as below, then
14223 ## immediately undefine it again and redefine it to empty.
14224 ## Was the C_SWITCH_X_SITE part really necessary?
3536f993 14225## LIB_GCC=`$CC $C_SWITCH_X_SITE -print-libgcc-file-name`
057886a3
GM
14226 LIB_GCC=
14227 fi
14228 ;;
14229
14230 ## Ask GCC where to find libgcc.a.
3536f993 14231 *) LIB_GCC=`$CC -print-libgcc-file-name 2> /dev/null` ;;
057886a3
GM
14232 esac
14233fi
14234
14235
372b4090
GM
14236TOOLTIP_SUPPORT=
14237WINDOW_SUPPORT=
14238## If we're using X11/GNUstep, define some consequences.
14239if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then
14240
eb697db5 14241$as_echo "#define HAVE_WINDOW_SYSTEM 1" >>confdefs.h
372b4090
GM
14242
14243
eb697db5 14244$as_echo "#define HAVE_MOUSE 1" >>confdefs.h
372b4090
GM
14245
14246 MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)"
14247 TOOLTIP_SUPPORT="\${lispsource}mouse.elc"
14248
14249 WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)"
14250 test "$HAVE_X_WINDOWS" = "yes" && \
14251 WINDOW_SUPPORT="$WINDOW_SUPPORT \$(X_WINDOW_SUPPORT)"
14252
14253fi
14254
14255
14256
14257
14258
e6df49e4
GM
14259
14260
ba4481b5 14261#### Report on what we decided to do.
488dd4c4
JD
14262#### Report GTK as a toolkit, even if it doesn't use Xt.
14263#### It makes printing result more understandable as using GTK sets
14264#### toolkit_scroll_bars to yes by default.
14265if test "${HAVE_GTK}" = "yes"; then
14266 USE_X_TOOLKIT=GTK
14267fi
14268
ba4481b5
DL
14269echo "
14270Configured for \`${canonical}'.
14271
14272 Where should the build process find the source code? ${srcdir}
14273 What operating system and machine description files should Emacs use?
14274 \`${opsysfile}' and \`${machfile}'
14275 What compiler should emacs be built with? ${CC} ${CFLAGS}
14276 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 14277 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 14278 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 14279 What window system should Emacs use? ${window_system}
8e967cf7 14280 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
14281
14282if test -n "${x_includes}"; then
14283echo " Where do we find X Windows header files? ${x_includes}"
14284else
14285echo " Where do we find X Windows header files? Standard dirs"
14286fi
14287if test -n "${x_libraries}"; then
14288echo " Where do we find X Windows libraries? ${x_libraries}"
14289else
14290echo " Where do we find X Windows libraries? Standard dirs"
14291fi
14292
14293echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
14294echo " Does Emacs use -lXpm? ${HAVE_XPM}"
14295echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
14296echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
91e84f96 14297echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF"
ba4481b5 14298echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 14299echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 14300echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 14301echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
637fa988 14302echo " Does Emacs use -lgconf? ${HAVE_GCONF}"
022c122a 14303echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}"
2ee27f27 14304
edfda783
AR
14305echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
14306echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
14307echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
14308echo " Does Emacs use -lxft? ${HAVE_XFT}"
14309
8d87199b 14310echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
14311echo
14312
d0098f13
JD
14313if test $USE_XASSERTS = yes; then
14314 echo " Compiling with asserts turned on."
d0098f13 14315 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 14316fi
05cf15c6 14317
ca34d75a
JD
14318echo
14319
06b62770
AR
14320if test "$HAVE_NS" = "yes"; then
14321 echo
14322 echo "You must run \"make install\" in order to test the built application.
14323The installed application will go to nextstep/Emacs.app and can be
14324run or moved from there."
14325 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
14326 echo "The application will be fully self-contained."
14327 else
14328 echo "The lisp resources for the application will be installed under ${prefix}.
14329You may need to run \"make install\" with sudo. The application will fail
14330to run if these resources are not installed."
14331 fi
14332 echo
14333fi
14334
131e4133
MA
14335if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
14336 echo "D-Bus integration has been tested for GNU/Linux only."
14337 echo
14338fi
14339
05cf15c6 14340
ba4481b5
DL
14341# Remove any trailing slashes in these variables.
14342test "${prefix}" != NONE &&
14343 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
14344test "${exec_prefix}" != NONE &&
14345 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
14346
81ac4f35 14347ac_config_files="$ac_config_files Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile"
ca81d7a0
JD
14348
14349ac_config_commands="$ac_config_commands default"
14350
503d2be0 14351cat >confcache <<\_ACEOF
ba4481b5
DL
14352# This file is a shell script that caches the results of configure
14353# tests run on this system so they can be shared between configure
503d2be0
AS
14354# scripts and configure runs, see configure's option --config-cache.
14355# It is not useful on other systems. If it contains results you don't
14356# want to keep, you may remove or edit it.
ba4481b5 14357#
503d2be0
AS
14358# config.status only pays attention to the cache file if you give it
14359# the --recheck option to rerun configure.
ba4481b5 14360#
6bae0ccf 14361# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
14362# loading this file, other *unset* `ac_cv_foo' will be assigned the
14363# following values.
14364
14365_ACEOF
14366
ba4481b5
DL
14367# The following way of writing the cache mishandles newlines in values,
14368# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 14369# So, we kill variables containing newlines.
ba4481b5
DL
14370# Ultrix sh set writes to stderr and can't be redirected directly,
14371# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
14372(
14373 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14374 eval ac_val=\$$ac_var
14375 case $ac_val in #(
14376 *${as_nl}*)
14377 case $ac_var in #(
eb697db5
DN
14378 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14379$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
ca81d7a0
JD
14380 esac
14381 case $ac_var in #(
14382 _ | IFS | as_nl) ;; #(
e9a63f04 14383 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
eb697db5 14384 *) { eval $ac_var=; unset $ac_var;} ;;
ca81d7a0
JD
14385 esac ;;
14386 esac
14387 done
14388
503d2be0 14389 (set) 2>&1 |
ca81d7a0
JD
14390 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14391 *${as_nl}ac_space=\ *)
eb697db5
DN
14392 # `set' does not quote correctly, so add quotes: double-quote
14393 # substitution turns \\\\ into \\, and sed turns \\ into \.
503d2be0 14394 sed -n \
edfaf76d
LK
14395 "s/'/'\\\\''/g;
14396 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 14397 ;; #(
503d2be0
AS
14398 *)
14399 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 14400 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 14401 ;;
ca81d7a0
JD
14402 esac |
14403 sort
14404) |
503d2be0 14405 sed '
ca81d7a0 14406 /^ac_cv_env_/b end
503d2be0 14407 t clear
ca81d7a0 14408 :clear
503d2be0
AS
14409 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14410 t end
ca81d7a0
JD
14411 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14412 :end' >>confcache
14413if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14414 if test -w "$cache_file"; then
14415 test "x$cache_file" != "x/dev/null" &&
eb697db5 14416 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
e9a63f04 14417$as_echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 14418 cat confcache >$cache_file
ba4481b5 14419 else
eb697db5 14420 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
e9a63f04 14421$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
14422 fi
14423fi
14424rm -f confcache
14425
ba4481b5
DL
14426test "x$prefix" = xNONE && prefix=$ac_default_prefix
14427# Let make expand exec_prefix.
14428test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14429
ba4481b5
DL
14430DEFS=-DHAVE_CONFIG_H
14431
6bae0ccf
DL
14432ac_libobjs=
14433ac_ltlibobjs=
14434for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14435 # 1. Remove the extension, and $U if already installed.
ca81d7a0 14436 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
e9a63f04 14437 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
ca81d7a0
JD
14438 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
14439 # will be set to the directory where LIBOBJS objects are built.
eb697db5
DN
14440 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14441 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
14442done
14443LIBOBJS=$ac_libobjs
14444
14445LTLIBOBJS=$ac_ltlibobjs
14446
14447
c0d27fcc 14448
ba4481b5 14449: ${CONFIG_STATUS=./config.status}
e9a63f04 14450ac_write_fail=0
503d2be0
AS
14451ac_clean_files_save=$ac_clean_files
14452ac_clean_files="$ac_clean_files $CONFIG_STATUS"
eb697db5 14453{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
e9a63f04 14454$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
eb697db5
DN
14455as_write_fail=0
14456cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
503d2be0 14457#! $SHELL
c0d27fcc 14458# Generated by $as_me.
ba4481b5 14459# Run this file to recreate the current configuration.
ba4481b5 14460# Compiler output produced by configure, useful for debugging
503d2be0 14461# configure, is in config.log if it exists.
ba4481b5 14462
503d2be0 14463debug=false
19650fd6
AS
14464ac_cs_recheck=false
14465ac_cs_silent=false
5929fbe7 14466
eb697db5
DN
14467SHELL=\${CONFIG_SHELL-$SHELL}
14468export SHELL
14469_ASEOF
14470cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14471## -------------------- ##
14472## M4sh Initialization. ##
14473## -------------------- ##
c0d27fcc 14474
f053c89f
CY
14475# Be more Bourne compatible
14476DUALCASE=1; export DUALCASE # for MKS sh
eb697db5 14477if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
503d2be0
AS
14478 emulate sh
14479 NULLCMD=:
e9a63f04 14480 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6bae0ccf
DL
14481 # is contrary to our usage. Disable this feature.
14482 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
14483 setopt NO_GLOB_SUBST
14484else
eb697db5
DN
14485 case `(set -o) 2>/dev/null` in #(
14486 *posix*) :
14487 set -o posix ;; #(
14488 *) :
14489 ;;
f053c89f 14490esac
503d2be0 14491fi
f053c89f
CY
14492
14493
e9a63f04
GM
14494as_nl='
14495'
14496export as_nl
14497# Printing a long string crashes Solaris 7 /usr/bin/printf.
14498as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14499as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14500as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
eb697db5
DN
14501# Prefer a ksh shell builtin over an external printf program on Solaris,
14502# but without wasting forks for bash or zsh.
14503if test -z "$BASH_VERSION$ZSH_VERSION" \
14504 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14505 as_echo='print -r --'
14506 as_echo_n='print -rn --'
14507elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
e9a63f04
GM
14508 as_echo='printf %s\n'
14509 as_echo_n='printf %s'
14510else
14511 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14512 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14513 as_echo_n='/usr/ucb/echo -n'
7bbec45b 14514 else
e9a63f04
GM
14515 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14516 as_echo_n_body='eval
14517 arg=$1;
eb697db5 14518 case $arg in #(
e9a63f04
GM
14519 *"$as_nl"*)
14520 expr "X$arg" : "X\\(.*\\)$as_nl";
14521 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14522 esac;
14523 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14524 '
14525 export as_echo_n_body
14526 as_echo_n='sh -c $as_echo_n_body as_echo'
7bbec45b 14527 fi
e9a63f04
GM
14528 export as_echo_body
14529 as_echo='sh -c $as_echo_body as_echo'
14530fi
14531
14532# The user is always right.
14533if test "${PATH_SEPARATOR+set}" != set; then
14534 PATH_SEPARATOR=:
14535 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14536 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14537 PATH_SEPARATOR=';'
14538 }
503d2be0
AS
14539fi
14540
6bae0ccf 14541
ca81d7a0
JD
14542# IFS
14543# We need space, tab and new line, in precisely that order. Quoting is
14544# there to prevent editors from complaining about space-tab.
14545# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14546# splitting by setting IFS to empty value.)
ca81d7a0
JD
14547IFS=" "" $as_nl"
14548
14549# Find who we are. Look in the path if we contain no directory separator.
eb697db5 14550case $0 in #((
ca81d7a0
JD
14551 *[\\/]* ) as_myself=$0 ;;
14552 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14553for as_dir in $PATH
14554do
14555 IFS=$as_save_IFS
14556 test -z "$as_dir" && as_dir=.
eb697db5
DN
14557 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14558 done
ca81d7a0
JD
14559IFS=$as_save_IFS
14560
14561 ;;
14562esac
14563# We did not find ourselves, most probably we were run as `sh COMMAND'
14564# in which case we are not to be found in the path.
14565if test "x$as_myself" = x; then
14566 as_myself=$0
14567fi
14568if test ! -f "$as_myself"; then
e9a63f04 14569 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
eb697db5 14570 exit 1
ca81d7a0
JD
14571fi
14572
eb697db5
DN
14573# Unset variables that we do not need and which cause bugs (e.g. in
14574# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
14575# suppresses any "Segmentation fault" message there. '((' could
14576# trigger a bug in pdksh 5.2.14.
14577for as_var in BASH_ENV ENV MAIL MAILPATH
14578do eval test x\${$as_var+set} = xset \
14579 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
ca81d7a0 14580done
6bae0ccf
DL
14581PS1='$ '
14582PS2='> '
14583PS4='+ '
14584
14585# NLS nuisances.
e9a63f04
GM
14586LC_ALL=C
14587export LC_ALL
14588LANGUAGE=C
14589export LANGUAGE
6bae0ccf 14590
eb697db5
DN
14591# CDPATH.
14592(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14593
14594
14595# as_fn_error ERROR [LINENO LOG_FD]
14596# ---------------------------------
14597# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14598# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14599# script with status $?, using 1 if that was 0.
14600as_fn_error ()
14601{
14602 as_status=$?; test $as_status -eq 0 && as_status=1
14603 if test "$3"; then
14604 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14605 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
14606 fi
14607 $as_echo "$as_me: error: $1" >&2
14608 as_fn_exit $as_status
14609} # as_fn_error
14610
14611
14612# as_fn_set_status STATUS
14613# -----------------------
14614# Set $? to STATUS, without forking.
14615as_fn_set_status ()
14616{
14617 return $1
14618} # as_fn_set_status
14619
14620# as_fn_exit STATUS
14621# -----------------
14622# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14623as_fn_exit ()
14624{
14625 set +e
14626 as_fn_set_status $1
14627 exit $1
14628} # as_fn_exit
14629
14630# as_fn_unset VAR
14631# ---------------
14632# Portably unset VAR.
14633as_fn_unset ()
14634{
14635 { eval $1=; unset $1;}
14636}
14637as_unset=as_fn_unset
14638# as_fn_append VAR VALUE
14639# ----------------------
14640# Append the text in VALUE to the end of the definition contained in VAR. Take
14641# advantage of any shell optimizations that allow amortized linear growth over
14642# repeated appends, instead of the typical quadratic growth present in naive
14643# implementations.
14644if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14645 eval 'as_fn_append ()
14646 {
14647 eval $1+=\$2
14648 }'
14649else
14650 as_fn_append ()
14651 {
14652 eval $1=\$$1\$2
14653 }
14654fi # as_fn_append
14655
14656# as_fn_arith ARG...
14657# ------------------
14658# Perform arithmetic evaluation on the ARGs, and store the result in the
14659# global $as_val. Take advantage of shells that can avoid forks. The arguments
14660# must be portable across $(()) and expr.
14661if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14662 eval 'as_fn_arith ()
14663 {
14664 as_val=$(( $* ))
14665 }'
14666else
14667 as_fn_arith ()
14668 {
14669 as_val=`expr "$@" || test $? -eq 1`
14670 }
14671fi # as_fn_arith
14672
14673
ca81d7a0
JD
14674if expr a : '\(a\)' >/dev/null 2>&1 &&
14675 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
14676 as_expr=expr
14677else
14678 as_expr=false
14679fi
14680
ca81d7a0 14681if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
14682 as_basename=basename
14683else
14684 as_basename=false
14685fi
c0d27fcc 14686
eb697db5
DN
14687if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14688 as_dirname=dirname
14689else
14690 as_dirname=false
14691fi
c0d27fcc 14692
ca81d7a0 14693as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
14694$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14695 X"$0" : 'X\(//\)$' \| \
ca81d7a0 14696 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 14697$as_echo X/"$0" |
ca81d7a0
JD
14698 sed '/^.*\/\([^/][^/]*\)\/*$/{
14699 s//\1/
14700 q
14701 }
14702 /^X\/\(\/\/\)$/{
14703 s//\1/
14704 q
14705 }
14706 /^X\/\(\/\).*/{
14707 s//\1/
14708 q
14709 }
14710 s/.*/./; q'`
c0d27fcc 14711
eb697db5
DN
14712# Avoid depending upon Character Ranges.
14713as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14714as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14715as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14716as_cr_digits='0123456789'
14717as_cr_alnum=$as_cr_Letters$as_cr_digits
ca81d7a0
JD
14718
14719ECHO_C= ECHO_N= ECHO_T=
eb697db5 14720case `echo -n x` in #(((((
ca81d7a0 14721-n*)
eb697db5 14722 case `echo 'xy\c'` in
ca81d7a0 14723 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
eb697db5
DN
14724 xy) ECHO_C='\c';;
14725 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
14726 ECHO_T=' ';;
ca81d7a0
JD
14727 esac;;
14728*)
14729 ECHO_N='-n';;
c0d27fcc 14730esac
503d2be0
AS
14731
14732rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
14733if test -d conf$$.dir; then
14734 rm -f conf$$.dir/conf$$.file
14735else
14736 rm -f conf$$.dir
e9a63f04
GM
14737 mkdir conf$$.dir 2>/dev/null
14738fi
14739if (echo >conf$$.file) 2>/dev/null; then
14740 if ln -s conf$$.file conf$$ 2>/dev/null; then
14741 as_ln_s='ln -s'
14742 # ... but there are two gotchas:
14743 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14744 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14745 # In both cases, we have to default to `cp -p'.
14746 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14747 as_ln_s='cp -p'
14748 elif ln conf$$.file conf$$ 2>/dev/null; then
14749 as_ln_s=ln
14750 else
503d2be0 14751 as_ln_s='cp -p'
e9a63f04 14752 fi
503d2be0
AS
14753else
14754 as_ln_s='cp -p'
14755fi
ca81d7a0
JD
14756rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14757rmdir conf$$.dir 2>/dev/null
503d2be0 14758
eb697db5
DN
14759
14760# as_fn_mkdir_p
14761# -------------
14762# Create "$as_dir" as a directory, including parents if necessary.
14763as_fn_mkdir_p ()
14764{
14765
14766 case $as_dir in #(
14767 -*) as_dir=./$as_dir;;
14768 esac
14769 test -d "$as_dir" || eval $as_mkdir_p || {
14770 as_dirs=
14771 while :; do
14772 case $as_dir in #(
14773 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14774 *) as_qdir=$as_dir;;
14775 esac
14776 as_dirs="'$as_qdir' $as_dirs"
14777 as_dir=`$as_dirname -- "$as_dir" ||
14778$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14779 X"$as_dir" : 'X\(//\)[^/]' \| \
14780 X"$as_dir" : 'X\(//\)$' \| \
14781 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14782$as_echo X"$as_dir" |
14783 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14784 s//\1/
14785 q
14786 }
14787 /^X\(\/\/\)[^/].*/{
14788 s//\1/
14789 q
14790 }
14791 /^X\(\/\/\)$/{
14792 s//\1/
14793 q
14794 }
14795 /^X\(\/\).*/{
14796 s//\1/
14797 q
14798 }
14799 s/.*/./; q'`
14800 test -d "$as_dir" && break
14801 done
14802 test -z "$as_dirs" || eval "mkdir $as_dirs"
14803 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
14804
14805
14806} # as_fn_mkdir_p
6bae0ccf 14807if mkdir -p . 2>/dev/null; then
eb697db5 14808 as_mkdir_p='mkdir -p "$as_dir"'
6bae0ccf 14809else
edfaf76d 14810 test -d ./-p && rmdir ./-p
6bae0ccf
DL
14811 as_mkdir_p=false
14812fi
14813
f053c89f
CY
14814if test -x / >/dev/null 2>&1; then
14815 as_test_x='test -x'
ca81d7a0 14816else
f053c89f
CY
14817 if ls -dL / >/dev/null 2>&1; then
14818 as_ls_L_option=L
14819 else
14820 as_ls_L_option=
14821 fi
14822 as_test_x='
14823 eval sh -c '\''
14824 if test -d "$1"; then
e9a63f04 14825 test -d "$1/.";
f053c89f 14826 else
eb697db5 14827 case $1 in #(
e9a63f04 14828 -*)set "./$1";;
f053c89f 14829 esac;
eb697db5 14830 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
f053c89f
CY
14831 ???[sx]*):;;*)false;;esac;fi
14832 '\'' sh
14833 '
ca81d7a0 14834fi
f053c89f 14835as_executable_p=$as_test_x
503d2be0 14836
c0d27fcc 14837# Sed expression to map a string onto a valid CPP name.
edfaf76d 14838as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
14839
14840# Sed expression to map a string onto a valid variable name.
edfaf76d 14841as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 14842
503d2be0 14843
503d2be0 14844exec 6>&1
eb697db5
DN
14845## ----------------------------------- ##
14846## Main body of $CONFIG_STATUS script. ##
14847## ----------------------------------- ##
14848_ASEOF
14849test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
503d2be0 14850
eb697db5
DN
14851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14852# Save the log message, to keep $0 and so on meaningful, and to
c0d27fcc 14853# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
14854# values after options handling.
14855ac_log="
49a62e8a 14856This file was extended by emacs $as_me 24.0.50, which was
eb697db5 14857generated by GNU Autoconf 2.65. Invocation command line was
c0d27fcc
MR
14858
14859 CONFIG_FILES = $CONFIG_FILES
14860 CONFIG_HEADERS = $CONFIG_HEADERS
14861 CONFIG_LINKS = $CONFIG_LINKS
14862 CONFIG_COMMANDS = $CONFIG_COMMANDS
14863 $ $0 $@
14864
ca81d7a0
JD
14865on `(hostname || uname -n) 2>/dev/null | sed 1q`
14866"
14867
503d2be0
AS
14868_ACEOF
14869
eb697db5
DN
14870case $ac_config_files in *"
14871"*) set x $ac_config_files; shift; ac_config_files=$*;;
14872esac
14873
14874case $ac_config_headers in *"
14875"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14876esac
14877
14878
e9a63f04 14879cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 14880# Files that config.status was made for.
ca81d7a0
JD
14881config_files="$ac_config_files"
14882config_headers="$ac_config_headers"
14883config_commands="$ac_config_commands"
503d2be0 14884
ca81d7a0 14885_ACEOF
503d2be0 14886
e9a63f04 14887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0 14888ac_cs_usage="\
eb697db5
DN
14889\`$as_me' instantiates files and other configuration actions
14890from templates according to the current configuration. Unless the files
14891and actions are specified as TAGs, all are instantiated by default.
503d2be0 14892
eb697db5 14893Usage: $0 [OPTION]... [TAG]...
503d2be0
AS
14894
14895 -h, --help print this help, then exit
f053c89f 14896 -V, --version print version number and configuration settings, then exit
eb697db5
DN
14897 --config print configuration, then exit
14898 -q, --quiet, --silent
14899 do not print progress messages
503d2be0
AS
14900 -d, --debug don't remove temporary files
14901 --recheck update $as_me by reconfiguring in the same conditions
eb697db5 14902 --file=FILE[:TEMPLATE]
e9a63f04 14903 instantiate the configuration file FILE
eb697db5 14904 --header=FILE[:TEMPLATE]
e9a63f04 14905 instantiate the configuration header FILE
503d2be0
AS
14906
14907Configuration files:
14908$config_files
14909
14910Configuration headers:
14911$config_headers
14912
14913Configuration commands:
14914$config_commands
14915
eb697db5 14916Report bugs to the package provider."
503d2be0 14917
ca81d7a0 14918_ACEOF
e9a63f04 14919cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
eb697db5 14920ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
503d2be0 14921ac_cs_version="\\
49a62e8a 14922emacs config.status 24.0.50
eb697db5
DN
14923configured by $0, generated by GNU Autoconf 2.65,
14924 with options \\"\$ac_cs_config\\"
503d2be0 14925
eb697db5 14926Copyright (C) 2009 Free Software Foundation, Inc.
503d2be0
AS
14927This config.status script is free software; the Free Software Foundation
14928gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
14929
14930ac_pwd='$ac_pwd'
14931srcdir='$srcdir'
14932INSTALL='$INSTALL'
e9a63f04 14933test -n "\$AWK" || AWK=awk
c0d27fcc 14934_ACEOF
503d2be0 14935
e9a63f04
GM
14936cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14937# The default lists apply if the user does not specify any file.
503d2be0
AS
14938ac_need_defaults=:
14939while test $# != 0
ba4481b5 14940do
503d2be0
AS
14941 case $1 in
14942 --*=*)
ca81d7a0
JD
14943 ac_option=`expr "X$1" : 'X\([^=]*\)='`
14944 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
14945 ac_shift=:
14946 ;;
ca81d7a0 14947 *)
6bae0ccf
DL
14948 ac_option=$1
14949 ac_optarg=$2
14950 ac_shift=shift
503d2be0 14951 ;;
503d2be0
AS
14952 esac
14953
6bae0ccf 14954 case $ac_option in
503d2be0 14955 # Handling of the options.
19650fd6
AS
14956 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14957 ac_cs_recheck=: ;;
ca81d7a0 14958 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
e9a63f04 14959 $as_echo "$ac_cs_version"; exit ;;
eb697db5
DN
14960 --config | --confi | --conf | --con | --co | --c )
14961 $as_echo "$ac_cs_config"; exit ;;
ca81d7a0 14962 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
14963 debug=: ;;
14964 --file | --fil | --fi | --f )
6bae0ccf 14965 $ac_shift
e9a63f04
GM
14966 case $ac_optarg in
14967 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14968 esac
eb697db5 14969 as_fn_append CONFIG_FILES " '$ac_optarg'"
503d2be0
AS
14970 ac_need_defaults=false;;
14971 --header | --heade | --head | --hea )
6bae0ccf 14972 $ac_shift
e9a63f04
GM
14973 case $ac_optarg in
14974 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14975 esac
eb697db5 14976 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
503d2be0 14977 ac_need_defaults=false;;
ca81d7a0
JD
14978 --he | --h)
14979 # Conflict between --help and --header
eb697db5
DN
14980 as_fn_error "ambiguous option: \`$1'
14981Try \`$0 --help' for more information.";;
ca81d7a0 14982 --help | --hel | -h )
e9a63f04 14983 $as_echo "$ac_cs_usage"; exit ;;
19650fd6
AS
14984 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14985 | -silent | --silent | --silen | --sile | --sil | --si | --s)
14986 ac_cs_silent=: ;;
503d2be0
AS
14987
14988 # This is an error.
eb697db5
DN
14989 -*) as_fn_error "unrecognized option: \`$1'
14990Try \`$0 --help' for more information." ;;
503d2be0 14991
eb697db5 14992 *) as_fn_append ac_config_targets " $1"
ca81d7a0 14993 ac_need_defaults=false ;;
503d2be0 14994
ba4481b5 14995 esac
503d2be0 14996 shift
ba4481b5
DL
14997done
14998
19650fd6
AS
14999ac_configure_extra_args=
15000
15001if $ac_cs_silent; then
15002 exec 6>/dev/null
15003 ac_configure_extra_args="$ac_configure_extra_args --silent"
15004fi
15005
15006_ACEOF
e9a63f04 15007cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19650fd6 15008if \$ac_cs_recheck; then
e9a63f04
GM
15009 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
15010 shift
15011 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15012 CONFIG_SHELL='$SHELL'
ca81d7a0 15013 export CONFIG_SHELL
e9a63f04 15014 exec "\$@"
19650fd6
AS
15015fi
15016
503d2be0 15017_ACEOF
e9a63f04 15018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15019exec 5>>config.log
15020{
15021 echo
15022 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15023## Running $as_me. ##
15024_ASBOX
e9a63f04 15025 $as_echo "$ac_log"
ca81d7a0 15026} >&5
ba4481b5 15027
ca81d7a0 15028_ACEOF
e9a63f04 15029cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
503d2be0 15030#
ca81d7a0 15031# INIT-COMMANDS
503d2be0 15032#
81ac4f35 15033GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
503d2be0 15034
c0d27fcc
MR
15035_ACEOF
15036
e9a63f04 15037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15038
15039# Handling of arguments.
503d2be0
AS
15040for ac_config_target in $ac_config_targets
15041do
ca81d7a0
JD
15042 case $ac_config_target in
15043 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
15044 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
981f8c13 15045 "lib-src/Makefile") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile" ;;
ca81d7a0 15046 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
15047 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
15048 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
15049 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
15050 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
81ac4f35 15051 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
f657c21b 15052 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 15053 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
15054 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
15055 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15056
eb697db5 15057 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
503d2be0 15058 esac
ba4481b5 15059done
503d2be0 15060
ca81d7a0 15061
503d2be0
AS
15062# If the user did not use the arguments to specify the items to instantiate,
15063# then the envvar interface is used. Set only those that are not.
15064# We use the long form for the default assignment because of an extremely
15065# bizarre bug on SunOS 4.1.3.
15066if $ac_need_defaults; then
15067 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15068 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15069 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 15070fi
503d2be0 15071
19650fd6 15072# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 15073# simply because there is no reason against having it here, and in addition,
19650fd6 15074# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
15075# Hook for its removal unless debugging.
15076# Note that there is a small window in which the directory will not be cleaned:
15077# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
15078$debug ||
15079{
ca81d7a0
JD
15080 tmp=
15081 trap 'exit_status=$?
15082 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
15083' 0
eb697db5 15084 trap 'as_fn_exit 1' 1 2 13 15
503d2be0 15085}
503d2be0 15086# Create a (secure) tmp directory for tmp files.
19650fd6 15087
503d2be0 15088{
ca81d7a0 15089 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
15090 test -n "$tmp" && test -d "$tmp"
15091} ||
15092{
ca81d7a0
JD
15093 tmp=./conf$$-$RANDOM
15094 (umask 077 && mkdir "$tmp")
eb697db5 15095} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
503d2be0 15096
e9a63f04
GM
15097# Set up the scripts for CONFIG_FILES section.
15098# No need to generate them if there are no CONFIG_FILES.
15099# This happens for instance with `./config.status config.h'.
ca81d7a0
JD
15100if test -n "$CONFIG_FILES"; then
15101
648b8e6d
GM
15102if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
15103 ac_cs_awk_getline=:
15104 ac_cs_awk_pipe_init=
15105 ac_cs_awk_read_file='
15106 while ((getline aline < (F[key])) > 0)
15107 print(aline)
15108 close(F[key])'
15109 ac_cs_awk_pipe_fini=
15110else
15111 ac_cs_awk_getline=false
15112 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
15113 ac_cs_awk_read_file='
15114 print "|#_!!_#|"
15115 print "cat " F[key] " &&"
15116 '$ac_cs_awk_pipe_init
15117 # The final `:' finishes the AND list.
15118 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
15119fi
eb697db5
DN
15120ac_cr=`echo X | tr X '\015'`
15121# On cygwin, bash can eat \r inside `` if the user requested igncr.
15122# But we know of no other shell where ac_cr would be empty at this
15123# point, so we can use a bashism as a fallback.
15124if test "x$ac_cr" = x; then
15125 eval ac_cr=\$\'\\r\'
15126fi
e9a63f04
GM
15127ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15128if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
eb697db5 15129 ac_cs_awk_cr='\r'
e9a63f04
GM
15130else
15131 ac_cs_awk_cr=$ac_cr
ca81d7a0 15132fi
503d2be0 15133
e9a63f04 15134echo 'BEGIN {' >"$tmp/subs1.awk" &&
ca81d7a0 15135_ACEOF
503d2be0 15136
648b8e6d
GM
15137# Create commands to substitute file output variables.
15138{
15139 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
15140 echo 'cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&' &&
15141 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
15142 echo "_ACAWK" &&
15143 echo "_ACEOF"
15144} >conf$$files.sh &&
15145. ./conf$$files.sh ||
eb697db5 15146 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
648b8e6d 15147rm -f conf$$files.sh
ca81d7a0 15148
e9a63f04
GM
15149{
15150 echo "cat >conf$$subs.awk <<_ACEOF" &&
15151 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15152 echo "_ACEOF"
15153} >conf$$subs.sh ||
eb697db5 15154 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15155ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ca81d7a0
JD
15156ac_delim='%!_!# '
15157for ac_last_try in false false false false false :; do
e9a63f04 15158 . ./conf$$subs.sh ||
eb697db5 15159 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15160
eb697db5
DN
15161 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15162 if test $ac_delim_n = $ac_delim_num; then
c24fa7dc
MB
15163 break
15164 elif $ac_last_try; then
eb697db5 15165 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
c24fa7dc
MB
15166 else
15167 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 15168 fi
ca81d7a0 15169done
e9a63f04
GM
15170rm -f conf$$subs.sh
15171
15172cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15173cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
15174_ACEOF
15175sed -n '
15176h
15177s/^/S["/; s/!.*/"]=/
15178p
15179g
15180s/^[^!]*!//
15181:repl
15182t repl
15183s/'"$ac_delim"'$//
15184t delim
15185:nl
15186h
eb697db5 15187s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15188t more1
15189s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15190p
15191n
15192b repl
15193:more1
15194s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15195p
15196g
15197s/.\{148\}//
15198t nl
15199:delim
15200h
eb697db5 15201s/\(.\{148\}\)..*/\1/
e9a63f04
GM
15202t more2
15203s/["\\]/\\&/g; s/^/"/; s/$/"/
15204p
15205b
15206:more2
15207s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15208p
15209g
15210s/.\{148\}//
15211t delim
15212' <conf$$subs.awk | sed '
15213/^[^""]/{
15214 N
15215 s/\n//
15216}
15217' >>$CONFIG_STATUS || ac_write_fail=1
15218rm -f conf$$subs.awk
15219cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15220_ACAWK
15221cat >>"\$tmp/subs1.awk" <<_ACAWK &&
15222 for (key in S) S_is_set[key] = 1
15223 FS = "\a"
648b8e6d 15224 \$ac_cs_awk_pipe_init
e9a63f04
GM
15225}
15226{
15227 line = $ 0
15228 nfields = split(line, field, "@")
15229 substed = 0
15230 len = length(field[1])
15231 for (i = 2; i < nfields; i++) {
15232 key = field[i]
15233 keylen = length(key)
15234 if (S_is_set[key]) {
15235 value = S[key]
15236 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15237 len += length(value) + length(field[++i])
15238 substed = 1
15239 } else
15240 len += 1 + keylen
15241 }
648b8e6d
GM
15242 if (nfields == 3 && !substed) {
15243 key = field[2]
15244 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
15245 \$ac_cs_awk_read_file
15246 next
15247 }
15248 }
e9a63f04
GM
15249 print line
15250}
648b8e6d 15251\$ac_cs_awk_pipe_fini
e9a63f04 15252_ACAWK
ca81d7a0 15253_ACEOF
e9a63f04
GM
15254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15255if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15256 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15257else
15258 cat
15259fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
eb697db5 15260 || as_fn_error "could not setup config files machinery" "$LINENO" 5
c0d27fcc 15261_ACEOF
ca81d7a0 15262
ca81d7a0
JD
15263# VPATH may cause trouble with some makes, so we remove $(srcdir),
15264# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15265# trailing colons and then remove the whole line if VPATH becomes empty
15266# (actually we leave an empty line to preserve line numbers).
15267if test "x$srcdir" = x.; then
15268 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15269s/:*\$(srcdir):*/:/
15270s/:*\${srcdir}:*/:/
15271s/:*@srcdir@:*/:/
15272s/^\([^=]*=[ ]*\):*/\1/
15273s/:*$//
15274s/^[^=]*=[ ]*$//
15275}'
15276fi
15277
e9a63f04 15278cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15279fi # test -n "$CONFIG_FILES"
15280
e9a63f04
GM
15281# Set up the scripts for CONFIG_HEADERS section.
15282# No need to generate them if there are no CONFIG_HEADERS.
15283# This happens for instance with `./config.status Makefile'.
15284if test -n "$CONFIG_HEADERS"; then
15285cat >"$tmp/defines.awk" <<\_ACAWK ||
15286BEGIN {
15287_ACEOF
dc2933eb 15288
e9a63f04
GM
15289# Transform confdefs.h into an awk script `defines.awk', embedded as
15290# here-document in config.status, that substitutes the proper values into
15291# config.h.in to produce config.h.
15292
15293# Create a delimiter string that does not exist in confdefs.h, to ease
15294# handling of long lines.
15295ac_delim='%!_!# '
15296for ac_last_try in false false :; do
15297 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
15298 if test -z "$ac_t"; then
15299 break
15300 elif $ac_last_try; then
eb697db5 15301 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
e9a63f04
GM
15302 else
15303 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15304 fi
15305done
15306
15307# For the awk script, D is an array of macro values keyed by name,
15308# likewise P contains macro parameters if any. Preserve backslash
15309# newline sequences.
15310
15311ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15312sed -n '
15313s/.\{148\}/&'"$ac_delim"'/g
15314t rset
15315:rset
15316s/^[ ]*#[ ]*define[ ][ ]*/ /
15317t def
15318d
15319:def
15320s/\\$//
15321t bsnl
15322s/["\\]/\\&/g
15323s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15324D["\1"]=" \3"/p
15325s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15326d
15327:bsnl
15328s/["\\]/\\&/g
15329s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15330D["\1"]=" \3\\\\\\n"\\/p
15331t cont
15332s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15333t cont
15334d
15335:cont
15336n
15337s/.\{148\}/&'"$ac_delim"'/g
15338t clear
15339:clear
15340s/\\$//
15341t bsnlc
15342s/["\\]/\\&/g; s/^/"/; s/$/"/p
15343d
15344:bsnlc
15345s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15346b cont
15347' <confdefs.h | sed '
15348s/'"$ac_delim"'/"\\\
15349"/g' >>$CONFIG_STATUS || ac_write_fail=1
15350
15351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15352 for (key in D) D_is_set[key] = 1
15353 FS = "\a"
15354}
15355/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15356 line = \$ 0
15357 split(line, arg, " ")
15358 if (arg[1] == "#") {
15359 defundef = arg[2]
15360 mac1 = arg[3]
15361 } else {
15362 defundef = substr(arg[1], 2)
15363 mac1 = arg[2]
15364 }
15365 split(mac1, mac2, "(") #)
15366 macro = mac2[1]
eb697db5 15367 prefix = substr(line, 1, index(line, defundef) - 1)
e9a63f04
GM
15368 if (D_is_set[macro]) {
15369 # Preserve the white space surrounding the "#".
e9a63f04
GM
15370 print prefix "define", macro P[macro] D[macro]
15371 next
15372 } else {
15373 # Replace #undef with comments. This is necessary, for example,
15374 # in the case of _POSIX_SOURCE, which is predefined and required
15375 # on some systems where configure will not decide to define it.
15376 if (defundef == "undef") {
eb697db5 15377 print "/*", prefix defundef, macro, "*/"
e9a63f04
GM
15378 next
15379 }
15380 }
15381}
15382{ print }
15383_ACAWK
15384_ACEOF
15385cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
eb697db5 15386 as_fn_error "could not setup config headers machinery" "$LINENO" 5
e9a63f04
GM
15387fi # test -n "$CONFIG_HEADERS"
15388
15389
15390eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
15391shift
15392for ac_tag
ca81d7a0
JD
15393do
15394 case $ac_tag in
15395 :[FHLC]) ac_mode=$ac_tag; continue;;
15396 esac
15397 case $ac_mode$ac_tag in
15398 :[FHL]*:*);;
eb697db5 15399 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
ca81d7a0
JD
15400 :[FH]-) ac_tag=-:-;;
15401 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15402 esac
15403 ac_save_IFS=$IFS
15404 IFS=:
15405 set x $ac_tag
15406 IFS=$ac_save_IFS
15407 shift
15408 ac_file=$1
15409 shift
15410
15411 case $ac_mode in
15412 :L) ac_source=$1;;
15413 :[FH])
15414 ac_file_inputs=
15415 for ac_f
15416 do
15417 case $ac_f in
15418 -) ac_f="$tmp/stdin";;
15419 *) # Look for the file first in the build tree, then in the source tree
15420 # (if the path is not absolute). The absolute path cannot be DOS-style,
15421 # because $ac_f cannot contain `:'.
15422 test -f "$ac_f" ||
15423 case $ac_f in
15424 [\\/$]*) false;;
15425 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
15426 esac ||
eb697db5 15427 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
ca81d7a0 15428 esac
e9a63f04 15429 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
eb697db5 15430 as_fn_append ac_file_inputs " '$ac_f'"
ca81d7a0
JD
15431 done
15432
15433 # Let's still pretend it is `configure' which instantiates (i.e., don't
15434 # use $as_me), people would be surprised to read:
15435 # /* config.h. Generated by config.status. */
e9a63f04
GM
15436 configure_input='Generated from '`
15437 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15438 `' by configure.'
ca81d7a0
JD
15439 if test x"$ac_file" != x-; then
15440 configure_input="$ac_file. $configure_input"
eb697db5 15441 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
e9a63f04 15442$as_echo "$as_me: creating $ac_file" >&6;}
ca81d7a0 15443 fi
e9a63f04
GM
15444 # Neutralize special characters interpreted by sed in replacement strings.
15445 case $configure_input in #(
15446 *\&* | *\|* | *\\* )
15447 ac_sed_conf_input=`$as_echo "$configure_input" |
15448 sed 's/[\\\\&|]/\\\\&/g'`;; #(
15449 *) ac_sed_conf_input=$configure_input;;
15450 esac
ca81d7a0
JD
15451
15452 case $ac_tag in
e9a63f04 15453 *:-:* | *:-) cat >"$tmp/stdin" \
eb697db5 15454 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
ca81d7a0
JD
15455 esac
15456 ;;
ba4481b5
DL
15457 esac
15458
ca81d7a0 15459 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 15460$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
15461 X"$ac_file" : 'X\(//\)[^/]' \| \
15462 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 15463 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
e9a63f04 15464$as_echo X"$ac_file" |
ca81d7a0
JD
15465 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15466 s//\1/
15467 q
15468 }
15469 /^X\(\/\/\)[^/].*/{
15470 s//\1/
15471 q
15472 }
15473 /^X\(\/\/\)$/{
15474 s//\1/
15475 q
15476 }
15477 /^X\(\/\).*/{
15478 s//\1/
15479 q
15480 }
15481 s/.*/./; q'`
eb697db5 15482 as_dir="$ac_dir"; as_fn_mkdir_p
c0d27fcc 15483 ac_builddir=.
98418dba 15484
ca81d7a0
JD
15485case "$ac_dir" in
15486.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15487*)
e9a63f04 15488 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
ca81d7a0 15489 # A ".." for each directory in $ac_dir_suffix.
e9a63f04 15490 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
ca81d7a0
JD
15491 case $ac_top_builddir_sub in
15492 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15493 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15494 esac ;;
15495esac
15496ac_abs_top_builddir=$ac_pwd
15497ac_abs_builddir=$ac_pwd$ac_dir_suffix
15498# for backward compatibility:
15499ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
15500
15501case $srcdir in
ca81d7a0 15502 .) # We are building in place.
c0d27fcc 15503 ac_srcdir=.
ca81d7a0
JD
15504 ac_top_srcdir=$ac_top_builddir_sub
15505 ac_abs_top_srcdir=$ac_pwd ;;
15506 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 15507 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
15508 ac_top_srcdir=$srcdir
15509 ac_abs_top_srcdir=$srcdir ;;
15510 *) # Relative name.
15511 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15512 ac_top_srcdir=$ac_top_build_prefix$srcdir
15513 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 15514esac
ca81d7a0 15515ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 15516
c0d27fcc 15517
ca81d7a0
JD
15518 case $ac_mode in
15519 :F)
15520 #
15521 # CONFIG_FILE
15522 #
ba4481b5 15523
503d2be0
AS
15524 case $INSTALL in
15525 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 15526 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 15527 esac
ca81d7a0 15528_ACEOF
ba4481b5 15529
e9a63f04 15530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ca81d7a0
JD
15531# If the template does not know about datarootdir, expand it.
15532# FIXME: This hack should be removed a few years after 2.60.
15533ac_datarootdir_hack=; ac_datarootdir_seen=
e9a63f04
GM
15534ac_sed_dataroot='
15535/datarootdir/ {
ca81d7a0
JD
15536 p
15537 q
15538}
15539/@datadir@/p
15540/@docdir@/p
15541/@infodir@/p
15542/@localedir@/p
eb697db5 15543/@mandir@/p'
e9a63f04 15544case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
ca81d7a0
JD
15545*datarootdir*) ac_datarootdir_seen=yes;;
15546*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
eb697db5 15547 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
e9a63f04 15548$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 15549_ACEOF
e9a63f04 15550cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ca81d7a0
JD
15551 ac_datarootdir_hack='
15552 s&@datadir@&$datadir&g
15553 s&@docdir@&$docdir&g
15554 s&@infodir@&$infodir&g
15555 s&@localedir@&$localedir&g
15556 s&@mandir@&$mandir&g
eb697db5 15557 s&\\\${datarootdir}&$datarootdir&g' ;;
ca81d7a0 15558esac
c0d27fcc 15559_ACEOF
ca81d7a0
JD
15560
15561# Neutralize VPATH when `$srcdir' = `.'.
15562# Shell code in configure.ac might set extrasub.
15563# FIXME: do we really want to maintain this feature?
e9a63f04
GM
15564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15565ac_sed_extra="$ac_vpsub
503d2be0 15566$extrasub
c0d27fcc 15567_ACEOF
e9a63f04 15568cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
503d2be0
AS
15569:t
15570/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
e9a63f04 15571s|@configure_input@|$ac_sed_conf_input|;t t
ca81d7a0 15572s&@top_builddir@&$ac_top_builddir_sub&;t t
e9a63f04 15573s&@top_build_prefix@&$ac_top_build_prefix&;t t
ca81d7a0
JD
15574s&@srcdir@&$ac_srcdir&;t t
15575s&@abs_srcdir@&$ac_abs_srcdir&;t t
15576s&@top_srcdir@&$ac_top_srcdir&;t t
15577s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15578s&@builddir@&$ac_builddir&;t t
15579s&@abs_builddir@&$ac_abs_builddir&;t t
15580s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15581s&@INSTALL@&$ac_INSTALL&;t t
15582$ac_datarootdir_hack
e9a63f04 15583"
648b8e6d
GM
15584eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
15585if $ac_cs_awk_getline; then
15586 $AWK -f "$tmp/subs.awk"
15587else
15588 $AWK -f "$tmp/subs.awk" | $SHELL
15589fi >$tmp/out \
eb697db5 15590 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15591
15592test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15593 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
15594 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
eb697db5 15595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0 15596which seems to be undefined. Please make sure it is defined." >&5
e9a63f04 15597$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
ca81d7a0
JD
15598which seems to be undefined. Please make sure it is defined." >&2;}
15599
15600 rm -f "$tmp/stdin"
503d2be0 15601 case $ac_file in
e9a63f04
GM
15602 -) cat "$tmp/out" && rm -f "$tmp/out";;
15603 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
15604 esac \
eb697db5 15605 || as_fn_error "could not create $ac_file" "$LINENO" 5
ca81d7a0
JD
15606 ;;
15607 :H)
15608 #
15609 # CONFIG_HEADER
15610 #
503d2be0 15611 if test x"$ac_file" != x-; then
e9a63f04
GM
15612 {
15613 $as_echo "/* $configure_input */" \
15614 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
15615 } >"$tmp/config.h" \
eb697db5 15616 || as_fn_error "could not create $ac_file" "$LINENO" 5
e9a63f04 15617 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
eb697db5 15618 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
e9a63f04 15619$as_echo "$as_me: $ac_file is unchanged" >&6;}
503d2be0 15620 else
e9a63f04
GM
15621 rm -f "$ac_file"
15622 mv "$tmp/config.h" "$ac_file" \
eb697db5 15623 || as_fn_error "could not create $ac_file" "$LINENO" 5
ba4481b5 15624 fi
503d2be0 15625 else
e9a63f04
GM
15626 $as_echo "/* $configure_input */" \
15627 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
eb697db5 15628 || as_fn_error "could not create -" "$LINENO" 5
ba4481b5 15629 fi
ca81d7a0 15630 ;;
edfaf76d 15631
eb697db5 15632 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
e9a63f04 15633$as_echo "$as_me: executing $ac_file commands" >&6;}
ca81d7a0
JD
15634 ;;
15635 esac
ba4481b5 15636
c0d27fcc 15637
ca81d7a0
JD
15638 case $ac_file$ac_mode in
15639 "default":C)
ba4481b5
DL
15640
15641### Make the necessary directories, if they don't exist.
15642for dir in etc lisp ; do
15643 test -d ${dir} || mkdir ${dir}
15644done
15645
ba4481b5 15646echo creating src/epaths.h
4aa6b955 15647${MAKE-make} epaths-force
ba4481b5 15648
bf3126f6 15649if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 15650 echo creating src/.gdbinit
503d2be0 15651 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
15652fi
15653
503d2be0 15654 ;;
ca81d7a0 15655
503d2be0 15656 esac
ca81d7a0 15657done # for ac_tag
503d2be0 15658
ba4481b5 15659
eb697db5 15660as_fn_exit 0
c0d27fcc 15661_ACEOF
503d2be0
AS
15662ac_clean_files=$ac_clean_files_save
15663
e9a63f04 15664test $ac_write_fail = 0 ||
eb697db5 15665 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
e9a63f04 15666
c0d27fcc 15667
503d2be0
AS
15668# configure is writing to config.log, and then calls config.status.
15669# config.status does its own redirection, appending to config.log.
15670# Unfortunately, on DOS this fails, as config.log is still kept open
15671# by configure, so config.status won't be able to write to it; its
15672# output is simply discarded. So we exec the FD to /dev/null,
15673# effectively closing config.log, so it can be properly (re)opened and
15674# appended to by config.status. When coming back to configure, we
15675# need to make the FD available again.
15676if test "$no_create" != yes; then
15677 ac_cs_success=:
19650fd6
AS
15678 ac_config_status_args=
15679 test "$silent" = yes &&
15680 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 15681 exec 5>/dev/null
19650fd6 15682 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
15683 exec 5>>config.log
15684 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15685 # would make configure fail if this is the last instruction.
eb697db5 15686 $ac_cs_success || as_fn_exit $?
503d2be0 15687fi
e9a63f04 15688if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
eb697db5
DN
15689 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15690$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
e9a63f04 15691fi
f5f47add 15692
c0d27fcc 15693